2018-04-23 10:24:26 +00:00
|
|
|
<!-- REQUIRED JS SCRIPTS -->
|
2019-02-08 12:42:58 +00:00
|
|
|
<!-- JQuery and bootstrap are required by Laravel 5.7 in resources/js/bootstrap.js-->
|
2018-04-23 10:24:26 +00:00
|
|
|
<!-- Laravel App -->
|
2019-07-03 07:16:46 +00:00
|
|
|
<script src="{{ asset('/js/app.js') }}" type="text/javascript"></script>
|
2019-02-08 12:42:58 +00:00
|
|
|
<!-- AdminLTE -->
|
2019-06-17 01:44:56 +00:00
|
|
|
<script src="{{ asset('/js/adminlte.min.js') }}"></script>
|
2018-04-23 10:24:26 +00:00
|
|
|
|
2018-06-05 13:39:47 +00:00
|
|
|
<script type="text/javascript">
|
2019-03-28 00:16:50 +00:00
|
|
|
// Our CSRF token to each interaction
|
|
|
|
$.ajaxSetup({
|
|
|
|
headers: {
|
|
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
|
|
}
|
|
|
|
});
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
$.AdminLTESidebarTweak = {};
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
$.AdminLTESidebarTweak.options = {
|
|
|
|
EnableRemember: true,
|
|
|
|
//Removes the transition after page reload.
|
|
|
|
NoTransitionAfterReload: false
|
|
|
|
};
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-08-20 05:50:15 +00:00
|
|
|
// Work out our timezone.
|
|
|
|
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
$(function () {
|
|
|
|
"use strict";
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
$("body").on("collapsed.lte.pushmenu", function(){
|
2019-05-16 01:15:49 +00:00
|
|
|
if($.AdminLTESidebarTweak.options.EnableRemember) {
|
|
|
|
document.cookie = "toggleState=closed;path=/";
|
|
|
|
|
|
|
|
$("body").delay(500).queue(function () {
|
|
|
|
window.dispatchEvent(new Event('resize'));
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
2019-03-28 00:16:50 +00:00
|
|
|
}
|
|
|
|
});
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
// @todo this is not firing.
|
2019-05-16 01:15:49 +00:00
|
|
|
$("body").on("shown.lte.pushmenu", function(){
|
2019-03-28 00:16:50 +00:00
|
|
|
if($.AdminLTESidebarTweak.options.EnableRemember){
|
2019-05-16 01:15:49 +00:00
|
|
|
document.cookie = "toggleState=opened;path=/";
|
|
|
|
|
|
|
|
$("body").delay(500).queue(function () {
|
|
|
|
window.dispatchEvent(new Event('resize'));
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
2019-03-28 00:16:50 +00:00
|
|
|
}
|
|
|
|
});
|
2019-02-18 09:44:17 +00:00
|
|
|
|
2019-03-28 00:16:50 +00:00
|
|
|
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');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2019-02-08 12:42:58 +00:00
|
|
|
</script>
|