Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c25a8710f4 | ||
|
|
c7d5dea45d | ||
|
|
edd6de2e50 | ||
|
|
09b425e63e | ||
|
|
3810f026ce | ||
|
|
c6e7e8dd07 | ||
|
|
544fc08aab |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@
|
||||
/node_modules/
|
||||
TODO
|
||||
*.zip
|
||||
test.html
|
||||
@@ -64,7 +64,7 @@ module.exports = function (grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
//Build the documentaion files
|
||||
//Build the documentation files
|
||||
includes: {
|
||||
build: {
|
||||
src: ['*.html'], // Source files
|
||||
@@ -81,4 +81,4 @@ module.exports = function (grunt) {
|
||||
});
|
||||
// the default task (running "grunt" in console) is "watch"
|
||||
grunt.registerTask('default', ['watch']);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -92,6 +92,9 @@ AdminLTE 1.x can be easily upgraded to 2.x using [this guide](http://almsaeedstu
|
||||
|
||||
Change log
|
||||
----------
|
||||
**v2.0.5:**
|
||||
- Fixed issue #288
|
||||
|
||||
**v2.0.4:**
|
||||
- Fixed bower.json to pick up newest release.
|
||||
-
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "AdminLTE",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.5",
|
||||
"homepage": "http://almsaeedstudio.com",
|
||||
"authors": [
|
||||
"Abdullah Almsaeed <almasaeed2010@gmail.com>"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* AdminLTE v2.0.4
|
||||
* AdminLTE v2.0.5
|
||||
* Author: Almsaeed Studio
|
||||
* Website: Almsaeed Studio <http://almsaeedstudio.com>
|
||||
* License: Open source - MIT
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
CHANGE LOG:
|
||||
v2.0.5:
|
||||
- Fixed issue #288
|
||||
|
||||
v2.0.4:
|
||||
- Fixed bower.json to pick up newest release.
|
||||
|
||||
|
||||
2
dist/css/AdminLTE.css
vendored
2
dist/css/AdminLTE.css
vendored
@@ -1,6 +1,6 @@
|
||||
@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
|
||||
/*!
|
||||
* AdminLTE v2.0.4
|
||||
* AdminLTE v2.0.
|
||||
* Author: Almsaeed Studio
|
||||
* Website: Almsaeed Studio <http://almsaeedstudio.com>
|
||||
* License: Open source - MIT
|
||||
|
||||
2
dist/css/AdminLTE.min.css
vendored
2
dist/css/AdminLTE.min.css
vendored
@@ -1,5 +1,5 @@
|
||||
@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);/*!
|
||||
* AdminLTE v2.0.4
|
||||
* AdminLTE v2.0.
|
||||
* Author: Almsaeed Studio
|
||||
* Website: Almsaeed Studio <http://almsaeedstudio.com>
|
||||
* License: Open source - MIT
|
||||
|
||||
399
dist/js/app.js
vendored
399
dist/js/app.js
vendored
@@ -7,7 +7,7 @@
|
||||
* @Author Almsaeed Studio
|
||||
* @Support <http://www.almsaeedstudio.com>
|
||||
* @Email <support@almsaeedstudio.com>
|
||||
* @version 2.0.4
|
||||
* @version 2.0.5
|
||||
* @license MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
@@ -125,6 +125,9 @@ $(function () {
|
||||
//Easy access to options
|
||||
var o = $.AdminLTE.options;
|
||||
|
||||
//Set up the object
|
||||
_init();
|
||||
|
||||
//Activate the layout maker
|
||||
$.AdminLTE.layout.activate();
|
||||
|
||||
@@ -183,218 +186,220 @@ $(function () {
|
||||
});
|
||||
});
|
||||
|
||||
/* ----------------------
|
||||
* - AdminLTE Functions -
|
||||
* ----------------------
|
||||
/* ----------------------------------
|
||||
* - Initialize the AdminLTE Object -
|
||||
* ----------------------------------
|
||||
* All AdminLTE functions are implemented below.
|
||||
*/
|
||||
function _init() {
|
||||
|
||||
/* prepareLayout
|
||||
* =============
|
||||
* Fixes the layout height in case min-height fails.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.layout.activate()
|
||||
* $.AdminLTE.layout.fix()
|
||||
* $.AdminLTE.layout.fixSidebar()
|
||||
*/
|
||||
$.AdminLTE.layout = {
|
||||
activate: function () {
|
||||
var _this = this;
|
||||
_this.fix();
|
||||
_this.fixSidebar();
|
||||
$(window, ".wrapper").resize(function () {
|
||||
/* Layout
|
||||
* ======
|
||||
* Fixes the layout height in case min-height fails.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.layout.activate()
|
||||
* $.AdminLTE.layout.fix()
|
||||
* $.AdminLTE.layout.fixSidebar()
|
||||
*/
|
||||
$.AdminLTE.layout = {
|
||||
activate: function () {
|
||||
var _this = this;
|
||||
_this.fix();
|
||||
_this.fixSidebar();
|
||||
});
|
||||
},
|
||||
fix: function () {
|
||||
//Get window height and the wrapper height
|
||||
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
|
||||
var window_height = $(window).height();
|
||||
var sidebar_height = $(".sidebar").height();
|
||||
//Set the min-height of the content and sidebar based on the
|
||||
//the height of the document.
|
||||
if ($("body").hasClass("fixed")) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
|
||||
} else {
|
||||
if (window_height >= sidebar_height) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - neg);
|
||||
$(window, ".wrapper").resize(function () {
|
||||
_this.fix();
|
||||
_this.fixSidebar();
|
||||
});
|
||||
},
|
||||
fix: function () {
|
||||
//Get window height and the wrapper height
|
||||
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
|
||||
var window_height = $(window).height();
|
||||
var sidebar_height = $(".sidebar").height();
|
||||
//Set the min-height of the content and sidebar based on the
|
||||
//the height of the document.
|
||||
if ($("body").hasClass("fixed")) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
|
||||
} else {
|
||||
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
|
||||
if (window_height >= sidebar_height) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - neg);
|
||||
} else {
|
||||
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
|
||||
}
|
||||
}
|
||||
},
|
||||
fixSidebar: function () {
|
||||
//Make sure the body tag has the .fixed class
|
||||
if (!$("body").hasClass("fixed")) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
}
|
||||
return;
|
||||
} else if (typeof $.fn.slimScroll == 'undefined' && console) {
|
||||
console.error("Error: the fixed layout requires the slimscroll plugin!");
|
||||
}
|
||||
//Enable slimscroll for fixed layout
|
||||
if ($.AdminLTE.options.sidebarSlimScroll) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
//Distroy if it exists
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
//Add slimscroll
|
||||
$(".sidebar").slimscroll({
|
||||
height: ($(window).height() - $(".main-header").height()) + "px",
|
||||
color: "rgba(0,0,0,0.2)",
|
||||
size: "3px"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
fixSidebar: function () {
|
||||
//Make sure the body tag has the .fixed class
|
||||
if (!$("body").hasClass("fixed")) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
};
|
||||
|
||||
/* PushMenu()
|
||||
* ==========
|
||||
* Adds the push menu functionality to the sidebar.
|
||||
*
|
||||
* @type Function
|
||||
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
||||
*/
|
||||
$.AdminLTE.pushMenu = function (toggleBtn) {
|
||||
//Get the screen sizes
|
||||
var screenSizes = this.options.screenSizes;
|
||||
|
||||
//Enable sidebar toggle
|
||||
$(toggleBtn).click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
//Enable sidebar push menu
|
||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||
$("body").toggleClass('sidebar-collapse');
|
||||
}
|
||||
return;
|
||||
} else if (typeof $.fn.slimScroll == 'undefined' && console) {
|
||||
console.error("Error: the fixed layout requires the slimscroll plugin!");
|
||||
}
|
||||
//Enable slimscroll for fixed layout
|
||||
if ($.AdminLTE.options.sidebarSlimScroll) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
//Distroy if it exists
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
//Add slimscroll
|
||||
$(".sidebar").slimscroll({
|
||||
height: ($(window).height() - $(".main-header").height()) + "px",
|
||||
color: "rgba(0,0,0,0.2)",
|
||||
size: "3px"
|
||||
//Handle sidebar push menu for small screens
|
||||
else {
|
||||
if ($("body").hasClass('sidebar-open')) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
$("body").removeClass('sidebar-collapse')
|
||||
} else {
|
||||
$("body").addClass('sidebar-open');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".content-wrapper").click(function () {
|
||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/* Tree()
|
||||
* ======
|
||||
* Converts the sidebar into a multilevel
|
||||
* tree view menu.
|
||||
*
|
||||
* @type Function
|
||||
* @Usage: $.AdminLTE.tree('.sidebar')
|
||||
*/
|
||||
$.AdminLTE.tree = function (menu) {
|
||||
var _this = this;
|
||||
|
||||
$("li a", $(menu)).click(function (e) {
|
||||
//Get the clicked link and the next element
|
||||
var $this = $(this);
|
||||
var checkElement = $this.next();
|
||||
|
||||
//Check if the next element is a menu and is visible
|
||||
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
|
||||
//Close the menu
|
||||
checkElement.slideUp('normal', function () {
|
||||
checkElement.removeClass('menu-open');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
//_this.layout.fix();
|
||||
});
|
||||
checkElement.parent("li").removeClass("active");
|
||||
}
|
||||
//If the menu is not visible
|
||||
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
||||
//Get the parent menu
|
||||
var parent = $this.parents('ul').first();
|
||||
//Close all open menus within the parent
|
||||
var ul = parent.find('ul:visible').slideUp('normal');
|
||||
//Remove the menu-open class from the parent
|
||||
ul.removeClass('menu-open');
|
||||
//Get the parent li
|
||||
var parent_li = $this.parent("li");
|
||||
|
||||
//Open the target menu and add the menu-open class
|
||||
checkElement.slideDown('normal', function () {
|
||||
//Add the class active to the parent li
|
||||
checkElement.addClass('menu-open');
|
||||
parent.find('li.active').removeClass('active');
|
||||
parent_li.addClass('active');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
_this.layout.fix();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* PushMenu()
|
||||
* ==========
|
||||
* Adds the push menu functionality to the sidebar.
|
||||
*
|
||||
* @type Function
|
||||
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
||||
*/
|
||||
$.AdminLTE.pushMenu = function (toggleBtn) {
|
||||
//Get the screen sizes
|
||||
var screenSizes = this.options.screenSizes;
|
||||
|
||||
//Enable sidebar toggle
|
||||
$(toggleBtn).click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
//Enable sidebar push menu
|
||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||
$("body").toggleClass('sidebar-collapse');
|
||||
}
|
||||
//Handle sidebar push menu for small screens
|
||||
else {
|
||||
if ($("body").hasClass('sidebar-open')) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
$("body").removeClass('sidebar-collapse')
|
||||
} else {
|
||||
$("body").addClass('sidebar-open');
|
||||
//if this isn't a link, prevent the page from being redirected
|
||||
if (checkElement.is('.treeview-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".content-wrapper").click(function () {
|
||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/* Tree()
|
||||
* ======
|
||||
* Converts the sidebar into a multilevel
|
||||
* tree view menu.
|
||||
*
|
||||
* @type Function
|
||||
* @Usage: $.AdminLTE.tree('.sidebar')
|
||||
*/
|
||||
$.AdminLTE.tree = function (menu) {
|
||||
var _this = this;
|
||||
|
||||
$("li a", $(menu)).click(function (e) {
|
||||
//Get the clicked link and the next element
|
||||
var $this = $(this);
|
||||
var checkElement = $this.next();
|
||||
|
||||
//Check if the next element is a menu and is visible
|
||||
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
|
||||
//Close the menu
|
||||
checkElement.slideUp('normal', function () {
|
||||
checkElement.removeClass('menu-open');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
//_this.layout.fix();
|
||||
});
|
||||
checkElement.parent("li").removeClass("active");
|
||||
}
|
||||
//If the menu is not visible
|
||||
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
||||
//Get the parent menu
|
||||
var parent = $this.parents('ul').first();
|
||||
//Close all open menus within the parent
|
||||
var ul = parent.find('ul:visible').slideUp('normal');
|
||||
//Remove the menu-open class from the parent
|
||||
ul.removeClass('menu-open');
|
||||
//Get the parent li
|
||||
var parent_li = $this.parent("li");
|
||||
|
||||
//Open the target menu and add the menu-open class
|
||||
checkElement.slideDown('normal', function () {
|
||||
//Add the class active to the parent li
|
||||
checkElement.addClass('menu-open');
|
||||
parent.find('li.active').removeClass('active');
|
||||
parent_li.addClass('active');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
_this.layout.fix();
|
||||
});
|
||||
}
|
||||
//if this isn't a link, prevent the page from being redirected
|
||||
if (checkElement.is('.treeview-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* BoxWidget
|
||||
* =========
|
||||
* BoxWidget is plugin to handle collapsing and
|
||||
* removing boxes from the screen.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.boxWidget.activate()
|
||||
* Set all of your option in the main $.AdminLTE.options object
|
||||
*/
|
||||
$.AdminLTE.boxWidget = {
|
||||
activate: function () {
|
||||
var o = $.AdminLTE.options;
|
||||
var _this = this;
|
||||
//Listen for collapse event triggers
|
||||
$(o.boxWidgetOptions.boxWidgetSelectors.collapse).click(function (e) {
|
||||
e.preventDefault();
|
||||
_this.collapse($(this));
|
||||
});
|
||||
};
|
||||
|
||||
//Listen for remove event triggers
|
||||
$(o.boxWidgetOptions.boxWidgetSelectors.remove).click(function (e) {
|
||||
e.preventDefault();
|
||||
_this.remove($(this));
|
||||
});
|
||||
},
|
||||
collapse: function (element) {
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
//Find the body and the footer
|
||||
var bf = box.find(".box-body, .box-footer");
|
||||
if (!box.hasClass("collapsed-box")) {
|
||||
//Convert minus into plus
|
||||
element.children(".fa-minus").removeClass("fa-minus").addClass("fa-plus");
|
||||
bf.slideUp(300, function () {
|
||||
box.addClass("collapsed-box");
|
||||
/* BoxWidget
|
||||
* =========
|
||||
* BoxWidget is plugin to handle collapsing and
|
||||
* removing boxes from the screen.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.boxWidget.activate()
|
||||
* Set all of your option in the main $.AdminLTE.options object
|
||||
*/
|
||||
$.AdminLTE.boxWidget = {
|
||||
activate: function () {
|
||||
var o = $.AdminLTE.options;
|
||||
var _this = this;
|
||||
//Listen for collapse event triggers
|
||||
$(o.boxWidgetOptions.boxWidgetSelectors.collapse).click(function (e) {
|
||||
e.preventDefault();
|
||||
_this.collapse($(this));
|
||||
});
|
||||
} else {
|
||||
//Convert plus into minus
|
||||
element.children(".fa-plus").removeClass("fa-plus").addClass("fa-minus");
|
||||
bf.slideDown(300, function () {
|
||||
box.removeClass("collapsed-box");
|
||||
|
||||
//Listen for remove event triggers
|
||||
$(o.boxWidgetOptions.boxWidgetSelectors.remove).click(function (e) {
|
||||
e.preventDefault();
|
||||
_this.remove($(this));
|
||||
});
|
||||
}
|
||||
},
|
||||
remove: function (element) {
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
box.slideUp();
|
||||
},
|
||||
options: $.AdminLTE.options.boxWidgetOptions
|
||||
};
|
||||
},
|
||||
collapse: function (element) {
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
//Find the body and the footer
|
||||
var bf = box.find(".box-body, .box-footer");
|
||||
if (!box.hasClass("collapsed-box")) {
|
||||
//Convert minus into plus
|
||||
element.children(".fa-minus").removeClass("fa-minus").addClass("fa-plus");
|
||||
bf.slideUp(300, function () {
|
||||
box.addClass("collapsed-box");
|
||||
});
|
||||
} else {
|
||||
//Convert plus into minus
|
||||
element.children(".fa-plus").removeClass("fa-plus").addClass("fa-minus");
|
||||
bf.slideDown(300, function () {
|
||||
box.removeClass("collapsed-box");
|
||||
});
|
||||
}
|
||||
},
|
||||
remove: function (element) {
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
box.slideUp();
|
||||
},
|
||||
options: $.AdminLTE.options.boxWidgetOptions
|
||||
};
|
||||
}
|
||||
|
||||
/* ------------------
|
||||
* - Custom Plugins -
|
||||
|
||||
4
dist/js/app.min.js
vendored
4
dist/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -6,6 +6,10 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.content {
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
#components > h3 {
|
||||
font-size: 25px;
|
||||
color: #000;
|
||||
@@ -20,7 +24,7 @@ ul {
|
||||
}
|
||||
.page-header {
|
||||
/*border-bottom: 1px solid #ddd; */
|
||||
margin: 20px 0 20px 0;
|
||||
margin: 20px 0 10px 0!important;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
font-size: 30px;
|
||||
@@ -46,6 +50,7 @@ ul {
|
||||
margin-top: -60px;
|
||||
height: 60px;
|
||||
visibility: hidden;
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
.lead {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "AdminLTE",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.5",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-less": "^0.12.0",
|
||||
|
||||
Reference in New Issue
Block a user