Auto formatters used
# HTML - VSCode built-in formatter - `/index.html` # JS - https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode - `/js/*.js` # CSS - https://marketplace.visualstudio.com/items?itemName=aeschli.vscode-css-formatter - `/styles/*.css` # XML - https://marketplace.visualstudio.com/items?itemName=DotJoshJohnson.xml - `/locale/*.xml`
This commit is contained in:
+24
-22
@@ -1,26 +1,28 @@
|
||||
/* ------------------ minimize/restore bar ----------- */
|
||||
|
||||
SQL.Toggle = function(elm) {
|
||||
this._state = null;
|
||||
this._elm = elm;
|
||||
OZ.Event.add(elm, "click", this._click.bind(this));
|
||||
|
||||
var defaultState = true;
|
||||
if (document.location.href.match(/toolbar=hidden/)) { defaultState = false; }
|
||||
this._switch(defaultState);
|
||||
}
|
||||
SQL.Toggle = function (elm) {
|
||||
this._state = null;
|
||||
this._elm = elm;
|
||||
OZ.Event.add(elm, "click", this._click.bind(this));
|
||||
|
||||
SQL.Toggle.prototype._click = function(e) {
|
||||
this._switch(!this._state);
|
||||
}
|
||||
var defaultState = true;
|
||||
if (document.location.href.match(/toolbar=hidden/)) {
|
||||
defaultState = false;
|
||||
}
|
||||
this._switch(defaultState);
|
||||
};
|
||||
|
||||
SQL.Toggle.prototype._switch = function(state) {
|
||||
this._state = state;
|
||||
if (this._state) {
|
||||
OZ.$("bar").style.maxHeight = "";
|
||||
} else {
|
||||
OZ.$("bar").style.overflow = "hidden";
|
||||
OZ.$("bar").style.maxHeight = this._elm.offsetHeight + "px";
|
||||
}
|
||||
this._elm.className = (this._state ? "on" : "off");
|
||||
}
|
||||
SQL.Toggle.prototype._click = function (e) {
|
||||
this._switch(!this._state);
|
||||
};
|
||||
|
||||
SQL.Toggle.prototype._switch = function (state) {
|
||||
this._state = state;
|
||||
if (this._state) {
|
||||
OZ.$("bar").style.maxHeight = "";
|
||||
} else {
|
||||
OZ.$("bar").style.overflow = "hidden";
|
||||
OZ.$("bar").style.maxHeight = this._elm.offsetHeight + "px";
|
||||
}
|
||||
this._elm.className = this._state ? "on" : "off";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user