← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21057: PT noext.

 

------------------------------------------------------------
revno: 21057
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-11-15 00:41:41 +0100
message:
  PT noext.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js	2015-11-13 23:15:35 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js	2015-11-14 23:41:41 +0000
@@ -7,24 +7,24 @@
             var t = this;
 
             t.getScrollbarSize = function(force) {
-                var scrollbarSize,
-                    db = document.body,
+                var size,
+                    body = document.body,
                     div = document.createElement('div');
 
                 div.style.width = div.style.height = '100px';
                 div.style.overflow = 'scroll';
                 div.style.position = 'absolute';
 
-                db.appendChild(div);
+                body.appendChild(div);
 
-                scrollbarSize = {
+                size = {
                     width: div.offsetWidth - div.clientWidth,
                     height: div.offsetHeight - div.clientHeight
                 };
 
-                db.removeChild(div);
+                body.removeChild(div);
 
-                return scrollbarSize;
+                return size;
             };
         };
 
@@ -33,6 +33,40 @@
 
     // UiMenuRegion
     (function() {
+        var UiMenuAccordion = function(config) {
+            var t = this;
+
+            config = N.isObject(config) ? config : {};
+
+            // constants
+            var tabHeight = config.tabHeight || 28;
+
+            // constructor
+            $.extend(this, Ext.create('Ext.panel.Panel', {
+                bodyStyle: 'border-style:none; padding:1px; padding-bottom:0; overflow-y:scroll;',
+                items: new N.UiMenuAccordionBody()
+            }));
+        };
+
+        //UiMenuAccordion.prototype.thisSetHeight = function(mx) {
+            //var panelHeight = this.panels.length * 28,
+                //height;
+
+            //if (westRegion.hasScrollbar) {
+                //height = panelHeight + mx;
+                //this.setHeight(viewport.getHeight() - 2);
+                //accordionBody.setHeight(height - 2);
+            //}
+            //else {
+                //height = westRegion.getHeight() - ns.core.conf.layout.west_fill;
+                //mx += panelHeight;
+                //accordion.setHeight((height > mx ? mx : height) - 2);
+                //accordionBody.setHeight((height > mx ? mx : height) - 2);
+            //}
+    })();
+
+    // UiMenuRegion
+    (function() {
         var UiMenuRegion = function(config) {
             var t = this;