[common] added nessesary utils

This commit is contained in:
Maxim Kadushkin 2018-01-23 20:33:59 +03:00
parent d184c3f647
commit 106afacb6e
2 changed files with 28 additions and 1 deletions

View file

@ -185,6 +185,13 @@ define([
return parseInt(el.css('width'));
},
getItem: function (alias) {
for (var p in this.panels) {
var panel = this.panels[p];
if ( panel.alias == alias ) return panel;
}
},
onSelectStart: function(e) {
if (e.preventDefault) e.preventDefault();
return false;

View file

@ -735,4 +735,24 @@ String.prototype.strongMatch = function(regExp){
}
return false;
};
};
Common.Utils.InternalSettings = new(function() {
var settings = {};
var _get = function(name) {
return settings[name];
},
_set = function(name, value) {
settings[name] = value;
};
return {
get: _get,
set: _set
}
});
Common.Utils.InternalSettings.set('toolbar-height-compact', 32);
Common.Utils.InternalSettings.set('toolbar-height-normal', 32+67);
Common.Utils.InternalSettings.set('doc-title-height', 26);