1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 13:28:35 +01:00

refactoring, fixed coding conventions

This commit is contained in:
maximebf 2014-02-14 11:49:37 -03:00
parent cff4a0fce6
commit 9efc22aca1
2 changed files with 14 additions and 14 deletions

View File

@ -177,6 +177,7 @@ div.phpdebugbar-panel.phpdebugbar-active {
}
/* -------------------------------------- */
div.phpdebugbar-mini-design a.phpdebugbar-tab {
position: relative;
border-right: 1px solid #ddd;

View File

@ -419,26 +419,23 @@ if (typeof(PhpDebugBar) == 'undefined') {
* Resizes the debugbar to fit the current browser window
*/
resize: function() {
var $ = PhpDebugBar.$;
var header = $(".phpdebugbar-header");
var contentSize = this.respCSSSize;
if (this.respCSSSize == 0) {
$(header).find("> *:visible").each(function () {
this.$header.find("> *:visible").each(function () {
contentSize += $(this).outerWidth();
});
}
var currentSize = $(header).width();
var currentSize = this.$header.width();
var cssClass = "phpdebugbar-mini-design";
var bool = this.$header.hasClass(cssClass);
var cssClass = "phpdebugbar-mini-design", bool = $(header).hasClass(cssClass);
if (currentSize <= contentSize && !bool) {
this.respCSSSize = contentSize;
$(header).addClass(cssClass);
this.$header.addClass(cssClass);
} else if (contentSize < currentSize && bool) {
this.respCSSSize = 0;
$(".phpdebugbar-header").removeClass(cssClass);
this.$header.removeClass(cssClass);
}
},
@ -719,6 +716,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
this.$el.removeClass(csscls('minimized'));
localStorage.setItem('phpdebugbar-visible', '1');
localStorage.setItem('phpdebugbar-tab', name);
this.resize();
},
/**
@ -733,6 +731,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
this.recomputeBottomOffset();
localStorage.setItem('phpdebugbar-visible', '0');
this.$el.addClass(csscls('minimized'));
this.resize();
},
/**