diff --git a/apps/common/main/lib/component/Layout.js b/apps/common/main/lib/component/Layout.js index bb294def8..3eb230841 100644 --- a/apps/common/main/lib/component/Layout.js +++ b/apps/common/main/lib/component/Layout.js @@ -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; diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 45d89d50e..e8f9b7263 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -735,4 +735,24 @@ String.prototype.strongMatch = function(regExp){ } return false; -}; \ No newline at end of file +}; + +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); \ No newline at end of file