source: public/assets/js/custom.js@ 24a616f

develop
Last change on this file since 24a616f was 24a616f, checked in by Berat Kjufliju <kufliju@…>, 3 years ago

added documents crud, added last_seen_to_user, edited views

  • Property mode set to 100644
File size: 6.6 KB
Line 
1/******/ (() => { // webpackBootstrap
2/******/ "use strict";
3var __webpack_exports__ = {};
4/*!***************************************!*\
5 !*** ./resources/assets/js/custom.js ***!
6 \***************************************/
7
8
9(function ($) {
10 $(document).on('click', '.layout-builder .layout-builder-toggle', function () {
11 $('.layout-builder').toggleClass('show');
12 });
13 $(window).on('load', function () {
14 setTimeout(function () {
15 $('.layout-builder').removeClass('show');
16 }, 500);
17 });
18 $('.body').append("\n <div class=\"layout-builder show\">\n <div class=\"layout-builder-toggle shw\">\n <i class=\"ti-settings\"></i>\n </div>\n <div class=\"layout-builder-toggle hdn\">\n <i class=\"ti-close\"></i>\n </div>\n <div class=\"layout-builder-body\">\n <h5>Customizer</h5>\n <div class=\"mb-3\">\n <p>Layout</p>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"horizontal-side-menu\" data-layout=\"horizontal-side-menu\">\n <label class=\"custom-control-label\" for=\"horizontal-side-menu\">Horizontal Menu</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"icon-side-menu\" data-layout=\"icon-side-menu\">\n <label class=\"custom-control-label\" for=\"icon-side-menu\">Icon Menu</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"hidden-side-menu\" data-layout=\"hidden-side-menu\">\n <label class=\"custom-control-label\" for=\"hidden-side-menu\">Hidden Menu</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"layout-container-1\" data-layout=\"layout-container icon-side-menu\">\n <label class=\"custom-control-label\" for=\"layout-container-1\">Container Layout 1</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"layout-container-2\" data-layout=\"layout-container horizontal-side-menu\">\n <label class=\"custom-control-label\" for=\"layout-container-2\">Container Layout 2</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"layout-container-3\" data-layout=\"layout-container hidden-side-menu\">\n <label class=\"custom-control-label\" for=\"layout-container-3\">Container Layout 3</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"dark-1\" data-layout=\"dark\">\n <label class=\"custom-control-label\" for=\"dark-1\">Dark Layout 1</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"dark-2\" data-layout=\"layout-container dark icon-side-menu\">\n <label class=\"custom-control-label\" for=\"dark-2\">Dark Layout 2</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"dark-3\" data-layout=\"layout-container dark horizontal-side-menu\">\n <label class=\"custom-control-label\" for=\"dark-3\">Dark Layout 3</label>\n </div>\n <div class=\"custom-control custom-radio\">\n <input type=\"radio\" class=\"custom-control-input\" name=\"layout\" id=\"dark-4\" data-layout=\"layout-container dark hidden-side-menu\">\n <label class=\"custom-control-label\" for=\"dark-4\">Dark Layout 4</label>\n </div>\n </div>\n <button id=\"btn-layout-builder-reset\" class=\"btn btn-danger btn-uppercase\">Reset</button>\n <div class=\"layout-alert mt-3\">\n <i class=\"fa fa-warning m-r-5 text-warning\"></i>Some theme options can not be displayed in case of combined when they are not relevant each other. For that reason, you are adviced to try all theme options seperately.\n </div>\n </div>\n </div>");
19 var site_layout = localStorage.getItem('site_layout');
20 $('body').addClass(site_layout);
21 $('.layout-builder .layout-builder-body input[type="radio"][data-layout="' + $('body').attr('class') + '"]').prop('checked', true);
22 $('.layout-builder .layout-builder-body input[type="radio"]').click(function () {
23 var class_names = '';
24 $('.layout-builder .layout-builder-body input[type="radio"]:checked').each(function () {
25 class_names += ' ' + $(this).data('layout');
26 });
27 localStorage.setItem('site_layout', class_names);
28 window.location.href = window.location.href.replace('#', '');
29 });
30 $(document).on('click', '#btn-layout-builder', function () {});
31 $(document).on('click', '#btn-layout-builder-reset', function () {
32 localStorage.removeItem('site_layout');
33 localStorage.removeItem('site_layout_dark');
34 window.location.href = window.location.href.replace('#', '');
35 });
36 $(window).on('load', function () {
37 if ($('body').hasClass('horizontal-side-menu') && $(window).width() > 768) {
38 if ($('body').hasClass('layout-container')) {
39 $('.side-menu .side-menu-body').wrap('<div class="container"></div>');
40 } else {
41 $('.side-menu .side-menu-body').wrap('<div class="container"></div>');
42 }
43
44 setTimeout(function () {
45 $('.side-menu .side-menu-body > ul').append('<li><a href="#"><span>Other</span></a><ul></ul></li>');
46 }, 100);
47 $('.side-menu .side-menu-body > ul > li').each(function () {
48 var index = $(this).index(),
49 $this = $(this);
50
51 if (index > 7) {
52 setTimeout(function () {
53 $('.side-menu .side-menu-body > ul > li:last-child > ul').append($this.clone());
54 $this.addClass('d-none');
55 }, 100);
56 }
57 });
58 }
59 });
60 $(document).on('click', '[data-attr="layout-builder-toggle"]', function () {
61 $('.layout-builder').toggleClass('show');
62 return false;
63 });
64})(jQuery);
65/******/ })()
66;
Note: See TracBrowser for help on using the repository browser.