MDL-38923 dock: allowed for space before first time
authorSam Hemelryk <sam@moodle.com>
Thu, 23 Jan 2014 20:42:39 +0000 (09:42 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 4 Feb 2014 22:21:09 +0000 (11:21 +1300)
lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js
lib/yui/build/moodle-core-dock/moodle-core-dock-min.js
lib/yui/build/moodle-core-dock/moodle-core-dock.js
lib/yui/src/dock/js/tabheightmanager.js

index 56eec93..0e41eea 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js differ
index 5989322..510bb89 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock-min.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock-min.js differ
index 145564e..8c57ec3 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock.js differ
index 4fc5895..4fd5899 100644 (file)
@@ -37,7 +37,11 @@ TABHEIGHTMANAGER.prototype = {
         var dock = this.get('dock'),
             node = dock.get('dockNode'),
             items = dock.dockeditems,
-            possibleheight = node.get('offsetHeight') - node.one('.controls').get('offsetHeight') - (dock.get('bufferPanel')*3) - (items.length*2),
+            containermargin = parseInt(node.one('.dockeditem_container').getStyle('marginTop').replace('/[^0-9]+$/', ''), 10),
+            dockheight = node.get('offsetHeight') - containermargin,
+            controlheight = node.one('.controls').get('offsetHeight'),
+            buffer = (dock.get('bufferPanel') * 3),
+            possibleheight = dockheight - controlheight - buffer - (items.length*2),
             totalheight = 0,
             id, dockedtitle;
         if (items.length > 0) {