Browse Source

Update Layout manager to work with regular layout for now

Abdullah Almsaeed 8 years ago
parent
commit
6841615631

+ 9 - 18
build/js/dist/Layout.js

@@ -1,6 +1,6 @@
 'use strict';
 
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
@@ -11,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
  * --------------------------------------------
  */
 
-var Layout = (function ($) {
+var Layout = function ($) {
   'use strict';
 
   /**
@@ -32,6 +32,7 @@ var Layout = (function ($) {
     SIDEBAR: '.main-sidebar',
     HEADER: '.main-header',
     CONTENT: '.content-wrapper',
+    CONTENT_HEADER: '.content-header',
     WRAPPER: '.wrapper',
     CONTROL_SIDEBAR: '.control-sidebar',
     LAYOUT_FIXED: '.layout-fixed',
@@ -44,14 +45,12 @@ var Layout = (function ($) {
     LAYOUT_FIXED: 'layout-fixed'
   };
 
-  var Default = {};
-
   /**
    * Class Definition
    * ====================================================
    */
 
-  var Layout = (function () {
+  var Layout = function () {
     function Layout(element) {
       _classCallCheck(this, Layout);
 
@@ -65,18 +64,10 @@ var Layout = (function ($) {
     _createClass(Layout, [{
       key: 'fixLayoutHeight',
       value: function fixLayoutHeight() {
-        var $elements = $(Selector.CONTENT + ', ' + Selector.SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR);
-        var maxHeight = undefined;
-
-        $elements.css('min-height', 0);
-
-        var heights = [$(window).height(), $(Selector.SIDEBAR).height(), $(Selector.HEADER).outerHeight(), $(Selector.CONTROL_SIDEBAR).height(), $(Selector.CONTENT).outerHeight(), $(Selector.FOOTER).outerHeight()];
-
-        maxHeight = this._max(heights);
-
-        // $elements.css('min-height', maxHeight)
+        var heights = [$(window).height(), $(Selector.HEADER).outerHeight(), $(Selector.FOOTER).outerHeight()];
 
-        // $(Selector.CONTENT).css('min-height', maxHeight - (heights[2] + heights[5]))
+        $(Selector.CONTENT).css('min-height', heights[0] - (heights[1] + heights[2]));
+        console.log(heights[0] - (heights[1] + heights[2]));
       }
 
       // Private
@@ -131,7 +122,7 @@ var Layout = (function ($) {
     }]);
 
     return Layout;
-  })();
+  }();
 
   /**
    * jQuery API
@@ -146,5 +137,5 @@ var Layout = (function ($) {
   };
 
   return Layout;
-})(jQuery);
+}(jQuery);
 //# sourceMappingURL=Layout.js.map

File diff suppressed because it is too large
+ 0 - 0
build/js/dist/Layout.js.map


+ 5 - 5
build/js/dist/PushMenu.js

@@ -1,6 +1,6 @@
 'use strict';
 
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
@@ -11,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
  * --------------------------------------------
  */
 
-var PushMenu = (function ($) {
+var PushMenu = function ($) {
   'use strict';
 
   /**
@@ -39,7 +39,7 @@ var PushMenu = (function ($) {
    * ====================================================
    */
 
-  var PushMenu = (function () {
+  var PushMenu = function () {
     function PushMenu(element) {
       _classCallCheck(this, PushMenu);
 
@@ -105,7 +105,7 @@ var PushMenu = (function ($) {
     }]);
 
     return PushMenu;
-  })();
+  }();
 
   /**
    * Data API
@@ -137,5 +137,5 @@ var PushMenu = (function ($) {
   };
 
   return PushMenu;
-})(jQuery);
+}(jQuery);
 //# sourceMappingURL=PushMenu.js.map

File diff suppressed because it is too large
+ 0 - 0
build/js/dist/PushMenu.js.map


+ 5 - 5
build/js/dist/Treeview.js

@@ -1,6 +1,6 @@
 'use strict';
 
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
@@ -11,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
  * --------------------------------------------
  */
 
-var Treeview = (function ($) {
+var Treeview = function ($) {
 
   /**
    * Constants
@@ -56,7 +56,7 @@ var Treeview = (function ($) {
    * ====================================================
    */
 
-  var Treeview = (function () {
+  var Treeview = function () {
     function Treeview(element, config) {
       _classCallCheck(this, Treeview);
 
@@ -165,7 +165,7 @@ var Treeview = (function ($) {
     }]);
 
     return Treeview;
-  })();
+  }();
 
   /**
    * Data API
@@ -192,5 +192,5 @@ var Treeview = (function ($) {
   };
 
   return Treeview;
-})(jQuery);
+}(jQuery);
 //# sourceMappingURL=Treeview.js.map

File diff suppressed because it is too large
+ 0 - 0
build/js/dist/Treeview.js.map


+ 5 - 5
build/js/dist/Widget.js

@@ -1,6 +1,6 @@
 'use strict';
 
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
@@ -11,10 +11,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
  * --------------------------------------------
  */
 
-var Widget = (function ($) {
+var Widget = function ($) {
   'use strict';
 
-  var Widget = (function () {
+  var Widget = function () {
     function Widget(element) {
       _classCallCheck(this, Widget);
 
@@ -30,8 +30,8 @@ var Widget = (function ($) {
     }]);
 
     return Widget;
-  })();
+  }();
 
   return Widget;
-})(jQuery);
+}(jQuery);
 //# sourceMappingURL=Widget.js.map

+ 1 - 1
build/js/dist/Widget.js.map

@@ -1 +1 @@
-{"version":3,"sources":["../src/Widget.js"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,IAAM,MAAM,GAAG,CAAC,UAAC,CAAC,EAAK;AACrB,cAAY,CAAA;;MAEN,MAAM;AAEV,aAFI,MAAM,CAEE,OAAO,EAAE;4BAFjB,MAAM;;AAGR,UAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;KACxB;;iBAJG,MAAM;;uCAMc,OAAO,EAAE;AAC/B,YAAI,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAA;AACtB,aAAK,CAAC,IAAI,EAAE,CAAA;OACb;;;WATG,MAAM;;;AAYZ,SAAO,MAAM,CAAA;CAEd,CAAA,CAAE,MAAM,CAAC,CAAA","file":"Widget.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Widget.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Widget = (($) => {\n  'use strict'\n\n  class Widget {\n\n    constructor(element) {\n      this._element = element\n    }\n\n    static _jQueryInterface(element) {\n      let $this = $(element)\n      $this.show()\n    }\n  }\n\n  return Widget\n\n})(jQuery)\n"]}
+{"version":3,"sources":["../src/Widget.js"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,IAAM,SAAU,UAAC,CAAD,EAAO;AACrB;;AADqB,MAGf,MAHe;AAKnB,oBAAY,OAAZ,EAAqB;AAAA;;AACnB,WAAK,QAAL,GAAgB,OAAhB;AACD;;AAPkB;AAAA;AAAA,uCASK,OATL,EASc;AAC/B,YAAI,QAAQ,EAAE,OAAF,CAAZ;AACA,cAAM,IAAN;AACD;AAZkB;;AAAA;AAAA;;AAerB,SAAO,MAAP;AAED,CAjBc,CAiBZ,MAjBY,CAAf","file":"Widget.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Widget.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Widget = (($) => {\n  'use strict'\n\n  class Widget {\n\n    constructor(element) {\n      this._element = element\n    }\n\n    static _jQueryInterface(element) {\n      let $this = $(element)\n      $this.show()\n    }\n  }\n\n  return Widget\n\n})(jQuery)\n"]}

+ 3 - 15
build/js/src/AdminLTE.js

@@ -25,6 +25,7 @@ const Layout = (($) => {
     SIDEBAR: '.main-sidebar',
     HEADER: '.main-header',
     CONTENT: '.content-wrapper',
+    CONTENT_HEADER: '.content-header',
     WRAPPER: '.wrapper',
     CONTROL_SIDEBAR: '.control-sidebar',
     LAYOUT_FIXED: '.layout-fixed',
@@ -37,8 +38,6 @@ const Layout = (($) => {
     LAYOUT_FIXED: 'layout-fixed'
   }
 
-  const Default = {}
-
   /**
    * Class Definition
    * ====================================================
@@ -55,25 +54,14 @@ const Layout = (($) => {
     // Public
 
     fixLayoutHeight() {
-      let $elements = $(`${Selector.CONTENT}, ${Selector.SIDEBAR}, ${Selector.CONTROL_SIDEBAR}`)
-      let maxHeight
-
-      $elements.css('min-height', 0)
-
       let heights = [
         $(window).height(),
-        $(Selector.SIDEBAR).height(),
         $(Selector.HEADER).outerHeight(),
-        $(Selector.CONTROL_SIDEBAR).height(),
-        $(Selector.CONTENT).outerHeight(),
         $(Selector.FOOTER).outerHeight()
       ]
 
-      maxHeight = this._max(heights)
-
-      // $elements.css('min-height', maxHeight)
-
-      // $(Selector.CONTENT).css('min-height', maxHeight - (heights[2] + heights[5]))
+      $(Selector.CONTENT).css('min-height', heights[0] - (heights[1] + heights[2]))
+      console.log(heights[0] - (heights[1] + heights[2]))
     }
 
     // Private

+ 3 - 15
build/js/src/Layout.js

@@ -26,6 +26,7 @@ const Layout = (($) => {
     SIDEBAR: '.main-sidebar',
     HEADER: '.main-header',
     CONTENT: '.content-wrapper',
+    CONTENT_HEADER: '.content-header',
     WRAPPER: '.wrapper',
     CONTROL_SIDEBAR: '.control-sidebar',
     LAYOUT_FIXED: '.layout-fixed',
@@ -38,8 +39,6 @@ const Layout = (($) => {
     LAYOUT_FIXED: 'layout-fixed'
   }
 
-  const Default = {}
-
   /**
    * Class Definition
    * ====================================================
@@ -56,25 +55,14 @@ const Layout = (($) => {
     // Public
 
     fixLayoutHeight() {
-      let $elements = $(`${Selector.CONTENT}, ${Selector.SIDEBAR}, ${Selector.CONTROL_SIDEBAR}`)
-      let maxHeight
-
-      $elements.css('min-height', 0)
-
       let heights = [
         $(window).height(),
-        $(Selector.SIDEBAR).height(),
         $(Selector.HEADER).outerHeight(),
-        $(Selector.CONTROL_SIDEBAR).height(),
-        $(Selector.CONTENT).outerHeight(),
         $(Selector.FOOTER).outerHeight()
       ]
 
-      maxHeight = this._max(heights)
-
-      // $elements.css('min-height', maxHeight)
-
-      // $(Selector.CONTENT).css('min-height', maxHeight - (heights[2] + heights[5]))
+      $(Selector.CONTENT).css('min-height', heights[0] - (heights[1] + heights[2]))
+      console.log(heights[0] - (heights[1] + heights[2]))
     }
 
     // Private

+ 21 - 30
dist/js/adminlte.js

@@ -1,6 +1,6 @@
 'use strict';
 
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
@@ -10,7 +10,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
  * Project website Almsaeed Studio (https://almsaeedstudio.com)
  * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)
  */
-var Layout = (function ($) {
+var Layout = function ($) {
   'use strict';
 
   /**
@@ -31,6 +31,7 @@ var Layout = (function ($) {
     SIDEBAR: '.main-sidebar',
     HEADER: '.main-header',
     CONTENT: '.content-wrapper',
+    CONTENT_HEADER: '.content-header',
     WRAPPER: '.wrapper',
     CONTROL_SIDEBAR: '.control-sidebar',
     LAYOUT_FIXED: '.layout-fixed',
@@ -43,14 +44,12 @@ var Layout = (function ($) {
     LAYOUT_FIXED: 'layout-fixed'
   };
 
-  var Default = {};
-
   /**
    * Class Definition
    * ====================================================
    */
 
-  var Layout = (function () {
+  var Layout = function () {
     function Layout(element) {
       _classCallCheck(this, Layout);
 
@@ -64,18 +63,10 @@ var Layout = (function ($) {
     _createClass(Layout, [{
       key: 'fixLayoutHeight',
       value: function fixLayoutHeight() {
-        var $elements = $(Selector.CONTENT + ', ' + Selector.SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR);
-        var maxHeight = undefined;
-
-        $elements.css('min-height', 0);
-
-        var heights = [$(window).height(), $(Selector.SIDEBAR).height(), $(Selector.HEADER).outerHeight(), $(Selector.CONTROL_SIDEBAR).height(), $(Selector.CONTENT).outerHeight(), $(Selector.FOOTER).outerHeight()];
-
-        maxHeight = this._max(heights);
-
-        // $elements.css('min-height', maxHeight)
+        var heights = [$(window).height(), $(Selector.HEADER).outerHeight(), $(Selector.FOOTER).outerHeight()];
 
-        // $(Selector.CONTENT).css('min-height', maxHeight - (heights[2] + heights[5]))
+        $(Selector.CONTENT).css('min-height', heights[0] - (heights[1] + heights[2]));
+        console.log(heights[0] - (heights[1] + heights[2]));
       }
 
       // Private
@@ -130,7 +121,7 @@ var Layout = (function ($) {
     }]);
 
     return Layout;
-  })();
+  }();
 
   /**
    * jQuery API
@@ -145,9 +136,9 @@ var Layout = (function ($) {
   };
 
   return Layout;
-})(jQuery);
+}(jQuery);
 
-var Treeview = (function ($) {
+var Treeview = function ($) {
 
   /**
    * Constants
@@ -192,7 +183,7 @@ var Treeview = (function ($) {
    * ====================================================
    */
 
-  var Treeview = (function () {
+  var Treeview = function () {
     function Treeview(element, config) {
       _classCallCheck(this, Treeview);
 
@@ -301,7 +292,7 @@ var Treeview = (function ($) {
     }]);
 
     return Treeview;
-  })();
+  }();
 
   /**
    * Data API
@@ -328,9 +319,9 @@ var Treeview = (function ($) {
   };
 
   return Treeview;
-})(jQuery);
+}(jQuery);
 
-var PushMenu = (function ($) {
+var PushMenu = function ($) {
   'use strict';
 
   /**
@@ -358,7 +349,7 @@ var PushMenu = (function ($) {
    * ====================================================
    */
 
-  var PushMenu = (function () {
+  var PushMenu = function () {
     function PushMenu(element) {
       _classCallCheck(this, PushMenu);
 
@@ -424,7 +415,7 @@ var PushMenu = (function ($) {
     }]);
 
     return PushMenu;
-  })();
+  }();
 
   /**
    * Data API
@@ -456,12 +447,12 @@ var PushMenu = (function ($) {
   };
 
   return PushMenu;
-})(jQuery);
+}(jQuery);
 
-var Widget = (function ($) {
+var Widget = function ($) {
   'use strict';
 
-  var Widget = (function () {
+  var Widget = function () {
     function Widget(element) {
       _classCallCheck(this, Widget);
 
@@ -477,8 +468,8 @@ var Widget = (function ($) {
     }]);
 
     return Widget;
-  })();
+  }();
 
   return Widget;
-})(jQuery);
+}(jQuery);
 //# sourceMappingURL=adminlte.js.map

File diff suppressed because it is too large
+ 0 - 0
dist/js/adminlte.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/adminlte.min.js


Some files were not shown because too many files changed in this diff