Merge branch 'menucollapse' of github.com:challgren/startbootstrap-sb-admin-2 into gh-pages
This commit is contained in:
@@ -297,14 +297,14 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a href="panels-wells.html">Panels and Wells</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="buttons.html">Buttons</a>
|
||||
<a href="buttons.html">Buttons</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="notifications.html">Notifications</a>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/*
|
||||
* metismenu - v1.0.3
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumuş
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
.arrow {
|
||||
float: right;
|
||||
line-height: 1.42857;
|
||||
}
|
||||
|
||||
.glyphicon.arrow:before {
|
||||
|
||||
11
css/plugins/metisMenu/metisMenu.min.css
vendored
11
css/plugins/metisMenu/metisMenu.min.css
vendored
@@ -1 +1,10 @@
|
||||
.arrow{float:right}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"}
|
||||
/*
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
|
||||
.arrow{float:right;line-height:1.42857}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"}
|
||||
@@ -282,11 +282,11 @@
|
||||
<li>
|
||||
<a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="active" href="flot.html">Flot Charts</a>
|
||||
<a href="flot.html">Flot Charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="morris.html">Morris.js Charts</a>
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<a href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
@@ -313,7 +313,7 @@
|
||||
<a href="icons.html"> Icons</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="grid.html">Grid</a>
|
||||
<a href="grid.html">Grid</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
@@ -310,7 +310,7 @@
|
||||
<a href="typography.html">Typography</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="icons.html"> Icons</a>
|
||||
<a href="icons.html"> Icons</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="grid.html">Grid</a>
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
<!-- /input-group -->
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
|
||||
<a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* metismenu - v1.0.3
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumuş
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
;(function($, window, document, undefined) {
|
||||
|
||||
var pluginName = "metisMenu",
|
||||
defaults = {
|
||||
toggle: true
|
||||
toggle: true,
|
||||
doubleTapToGo: false
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
this.element = element;
|
||||
this.element = $(element);
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
@@ -24,8 +25,9 @@
|
||||
Plugin.prototype = {
|
||||
init: function() {
|
||||
|
||||
var $this = $(this.element),
|
||||
$toggle = this.settings.toggle;
|
||||
var $this = this.element,
|
||||
$toggle = this.settings.toggle,
|
||||
obj = this;
|
||||
|
||||
if (this.isIE() <= 9) {
|
||||
$this.find("li.active").has("ul").children("ul").collapse("show");
|
||||
@@ -35,14 +37,31 @@
|
||||
$this.find("li").not(".active").has("ul").children("ul").addClass("collapse");
|
||||
}
|
||||
|
||||
$this.find("li").has("ul").children("a").on("click", function (e) {
|
||||
//add the "doubleTapToGo" class to active items if needed
|
||||
if (obj.settings.doubleTapToGo) {
|
||||
$this.find("li.active").has("ul").children("a").addClass("doubleTapToGo");
|
||||
}
|
||||
|
||||
$this.find("li").has("ul").children("a").on("click" + "." + pluginName, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
//Do we need to enable the double tap
|
||||
if (obj.settings.doubleTapToGo) {
|
||||
|
||||
//if we hit a second time on the link and the href is valid, navigate to that url
|
||||
if (obj.doubleTapToGo($(this)) && $(this).attr("href") !== "#" && $(this).attr("href") !== "") {
|
||||
e.stopPropagation();
|
||||
document.location = $(this).attr("href");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$(this).parent("li").toggleClass("active").children("ul").collapse("toggle");
|
||||
|
||||
if ($toggle) {
|
||||
$(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide");
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
@@ -58,15 +77,44 @@
|
||||
) {
|
||||
return v > 4 ? v : undef;
|
||||
}
|
||||
},
|
||||
|
||||
//Enable the link on the second click.
|
||||
doubleTapToGo: function(elem) {
|
||||
var $this = this.element;
|
||||
|
||||
//if the class "doubleTapToGo" exists, remove it and return
|
||||
if (elem.hasClass("doubleTapToGo")) {
|
||||
elem.removeClass("doubleTapToGo");
|
||||
return true;
|
||||
}
|
||||
|
||||
//does not exists, add a new class and return false
|
||||
if (elem.parent().children("ul").length) {
|
||||
//first remove all other class
|
||||
$this.find(".doubleTapToGo").removeClass("doubleTapToGo");
|
||||
//add the class on the current element
|
||||
elem.addClass("doubleTapToGo");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
remove: function() {
|
||||
this.element.off("." + pluginName);
|
||||
this.element.removeData(pluginName);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn[pluginName] = function(options) {
|
||||
return this.each(function () {
|
||||
if (!$.data(this, "plugin_" + pluginName)) {
|
||||
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
|
||||
this.each(function () {
|
||||
var el = $(this);
|
||||
if (el.data(pluginName)) {
|
||||
el.data(pluginName).remove();
|
||||
}
|
||||
el.data(pluginName, new Plugin(this, options));
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
||||
6
js/plugins/metisMenu/metisMenu.min.js
vendored
6
js/plugins/metisMenu/metisMenu.min.js
vendored
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* metismenu - v1.0.3
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumuş
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
!function(a,b,c){function d(b,c){this.element=b,this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0};d.prototype={init:function(){var b=a(this.element),c=this.settings.toggle;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),b.find("li").has("ul").children("a").on("click",function(b){b.preventDefault(),a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),c&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a}},a.fn[e]=function(b){return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new d(this,b))})}}(jQuery,window,document);
|
||||
!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document);
|
||||
@@ -25,4 +25,12 @@ $(function() {
|
||||
$("#page-wrapper").css("min-height", (height) + "px");
|
||||
}
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
var element = $('ul.nav a').filter(function() {
|
||||
return this.href == url;
|
||||
}).addClass('active').parent().parent().addClass('in').parent();
|
||||
if (element.is('li')) {
|
||||
element.addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -279,14 +279,14 @@
|
||||
<li>
|
||||
<a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a href="flot.html">Flot Charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="morris.html">Morris.js Charts</a>
|
||||
<a href="morris.html">Morris.js Charts</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
@@ -304,7 +304,7 @@
|
||||
<a href="buttons.html">Buttons</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="notifications.html">Notifications</a>
|
||||
<a href="notifications.html">Notifications</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="typography.html">Typography</a>
|
||||
|
||||
@@ -294,11 +294,11 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="active" href="panels-wells.html">Panels and Wells</a>
|
||||
<a href="panels-wells.html">Panels and Wells</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="buttons.html">Buttons</a>
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>
|
||||
<a href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<li>
|
||||
<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
@@ -307,7 +307,7 @@
|
||||
<a href="notifications.html">Notifications</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="active" href="typography.html">Typography</a>
|
||||
<a href="typography.html">Typography</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="icons.html"> Icons</a>
|
||||
|
||||
Reference in New Issue
Block a user