mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 10:41:55 +02:00
use font-awesome icons for close/open
This commit is contained in:
@@ -512,19 +512,29 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// close button
|
// close button
|
||||||
this.$closebtn = $('<a />').addClass(csscls('close-btn')).appendTo(this.$headerRight);
|
this.$closebtn = $('<a/>').addClass(csscls('close-btn'))
|
||||||
|
.append($('<i />').attr('class', 'phpdebugbar-fa phpdebugbar-fa-times'))
|
||||||
|
.css('background', 'none')
|
||||||
|
.appendTo(this.$headerRight);
|
||||||
this.$closebtn.click(function() {
|
this.$closebtn.click(function() {
|
||||||
self.close();
|
self.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
// minimize button
|
// minimize button
|
||||||
this.$minimizebtn = $('<a />').addClass(csscls('minimize-btn') ).appendTo(this.$headerRight);
|
this.$minimizebtn = $('<a/>').addClass(csscls('minimize-btn'))
|
||||||
|
.append($('<i />').attr('class', 'phpdebugbar-fa phpdebugbar-fa-chevron-down'))
|
||||||
|
.css('background', 'none')
|
||||||
|
.appendTo(this.$headerRight);
|
||||||
this.$minimizebtn.click(function() {
|
this.$minimizebtn.click(function() {
|
||||||
self.minimize();
|
self.minimize();
|
||||||
});
|
});
|
||||||
|
|
||||||
// maximize button
|
// maximize button
|
||||||
this.$maximizebtn = $('<a />').addClass(csscls('maximize-btn') ).appendTo(this.$headerRight);
|
this.$maximizebtn = $('<a/>')
|
||||||
|
.append($('<i />').attr('class', 'phpdebugbar-fa phpdebugbar-fa-chevron-up'))
|
||||||
|
.css('background', 'none')
|
||||||
|
.addClass(csscls('maximize-btn'))
|
||||||
|
.appendTo(this.$headerRight);
|
||||||
this.$maximizebtn.click(function() {
|
this.$maximizebtn.click(function() {
|
||||||
self.restore();
|
self.restore();
|
||||||
});
|
});
|
||||||
@@ -536,7 +546,11 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// open button
|
// open button
|
||||||
this.$openbtn = $('<a />').addClass(csscls('open-btn')).appendTo(this.$headerRight).hide();
|
this.$openbtn = $('<a/>').addClass(csscls('open-btn'))
|
||||||
|
.append($('<i />').attr('class', 'phpdebugbar-fa phpdebugbar-fa-folder-open'))
|
||||||
|
.css('background', 'none')
|
||||||
|
.appendTo(this.$headerRight)
|
||||||
|
.hide();
|
||||||
this.$openbtn.click(function() {
|
this.$openbtn.click(function() {
|
||||||
self.openHandler.show(function(id, dataset) {
|
self.openHandler.show(function(id, dataset) {
|
||||||
self.addDataSet(dataset, id, "(opened)");
|
self.addDataSet(dataset, id, "(opened)");
|
||||||
@@ -561,13 +575,13 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
* @this {DebugBar}
|
* @this {DebugBar}
|
||||||
*/
|
*/
|
||||||
setHeight: function(height) {
|
setHeight: function(height) {
|
||||||
var min_h = 40;
|
var min_h = 40;
|
||||||
var max_h = $(window).innerHeight() - this.$header.height() - 10;
|
var max_h = $(window).innerHeight() - this.$header.height() - 10;
|
||||||
height = Math.min(height, max_h);
|
height = Math.min(height, max_h);
|
||||||
height = Math.max(height, min_h);
|
height = Math.max(height, min_h);
|
||||||
this.$body.css('height', height);
|
this.$body.css('height', height);
|
||||||
localStorage.setItem('phpdebugbar-height', height);
|
localStorage.setItem('phpdebugbar-height', height);
|
||||||
this.recomputeBottomOffset();
|
this.recomputeBottomOffset();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user