Compare commits

...

2 Commits
0.2.1 ... 0.2.3

Author SHA1 Message Date
Deon George
8aa21663d5 Changed body font size 2018-08-23 16:26:39 +10:00
Deon George
3af5ae6466 Remember sidebar collapse state 2018-08-12 17:01:50 +10:00
2 changed files with 39 additions and 1 deletions

View File

@@ -20,7 +20,7 @@
body {
color: #333;
font-weight: 400;
font-size: 16px;
font-size: 14px;
}
label {

View File

@@ -12,6 +12,44 @@
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.AdminLTESidebarTweak = {};
$.AdminLTESidebarTweak.options = {
EnableRemember: true,
//Removes the transition after page reload.
NoTransitionAfterReload: false
};
$(function () {
"use strict";
$("body").on("collapsed.pushMenu", function(){
if($.AdminLTESidebarTweak.options.EnableRemember){
document.cookie = "toggleState=closed";
}
});
$("body").on("expanded.pushMenu", function(){
if($.AdminLTESidebarTweak.options.EnableRemember){
document.cookie = "toggleState=opened";
}
});
if($.AdminLTESidebarTweak.options.EnableRemember){
var re = new RegExp('toggleState' + "=([^;]+)");
var value = re.exec(document.cookie);
var toggleState = (value != null) ? unescape(value[1]) : null;
if(toggleState == 'closed'){
if($.AdminLTESidebarTweak.options.NoTransitionAfterReload){
$("body").addClass('sidebar-collapse hold-transition').delay(100).queue(function(){
$(this).removeClass('hold-transition');
});
}else{
$("body").addClass('sidebar-collapse');
}
}
}
});
</script>
<!-- Optionally, you can add Slimscroll and FastClick plugins.