Changeset 24a616f for resources/assets/js
- Timestamp:
- 10/13/21 15:44:57 (3 years ago)
- Branches:
- develop, master
- Children:
- 120759b
- Parents:
- 194a359
- Location:
- resources/assets/js
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/assets/js/app.js
r194a359 r24a616f 1 /******/ (function(modules) { // webpackBootstrap 2 /******/ // The module cache 3 /******/ var installedModules = {}; 4 /******/ 5 /******/ // The require function 6 /******/ function __webpack_require__(moduleId) { 7 /******/ 8 /******/ // Check if module is in cache 9 /******/ if(installedModules[moduleId]) { 10 /******/ return installedModules[moduleId].exports; 11 /******/ } 12 /******/ // Create a new module (and put it into the cache) 13 /******/ var module = installedModules[moduleId] = { 14 /******/ i: moduleId, 15 /******/ l: false, 16 /******/ exports: {} 17 /******/ }; 18 /******/ 19 /******/ // Execute the module function 20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 /******/ 22 /******/ // Flag the module as loaded 23 /******/ module.l = true; 24 /******/ 25 /******/ // Return the exports of the module 26 /******/ return module.exports; 27 /******/ } 28 /******/ 29 /******/ 30 /******/ // expose the modules object (__webpack_modules__) 31 /******/ __webpack_require__.m = modules; 32 /******/ 33 /******/ // expose the module cache 34 /******/ __webpack_require__.c = installedModules; 35 /******/ 36 /******/ // define getter function for harmony exports 37 /******/ __webpack_require__.d = function(exports, name, getter) { 38 /******/ if(!__webpack_require__.o(exports, name)) { 39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40 /******/ } 41 /******/ }; 42 /******/ 43 /******/ // define __esModule on exports 44 /******/ __webpack_require__.r = function(exports) { 45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47 /******/ } 48 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 49 /******/ }; 50 /******/ 51 /******/ // create a fake namespace object 52 /******/ // mode & 1: value is a module id, require it 53 /******/ // mode & 2: merge all properties of value into the ns 54 /******/ // mode & 4: return value when already ns object 55 /******/ // mode & 8|1: behave like require 56 /******/ __webpack_require__.t = function(value, mode) { 57 /******/ if(mode & 1) value = __webpack_require__(value); 58 /******/ if(mode & 8) return value; 59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60 /******/ var ns = Object.create(null); 61 /******/ __webpack_require__.r(ns); 62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64 /******/ return ns; 65 /******/ }; 66 /******/ 67 /******/ // getDefaultExport function for compatibility with non-harmony modules 68 /******/ __webpack_require__.n = function(module) { 69 /******/ var getter = module && module.__esModule ? 70 /******/ function getDefault() { return module['default']; } : 71 /******/ function getModuleExports() { return module; }; 72 /******/ __webpack_require__.d(getter, 'a', getter); 73 /******/ return getter; 74 /******/ }; 75 /******/ 76 /******/ // Object.prototype.hasOwnProperty.call 77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78 /******/ 79 /******/ // __webpack_public_path__ 80 /******/ __webpack_require__.p = "/"; 81 /******/ 82 /******/ 83 /******/ // Load entry module and return exports 84 /******/ return __webpack_require__(__webpack_require__.s = 0); 85 /******/ }) 86 /************************************************************************/ 87 /******/ ({ 88 89 /***/ "./public/assets/sass/app.scss": 90 /*!*************************************!*\ 91 !*** ./public/assets/sass/app.scss ***! 92 \*************************************/ 93 /*! no static exports found */ 94 /***/ (function(module, exports) { 95 96 // removed by extract-text-webpack-plugin 97 98 /***/ }), 99 100 /***/ "./resources/js/app.js": 101 /*!*****************************!*\ 102 !*** ./resources/js/app.js ***! 103 \*****************************/ 104 /*! no static exports found */ 105 /***/ (function(module, exports, __webpack_require__) { 106 107 "use strict"; 108 1 'use strict'; 109 2 110 3 (function ($) { 111 var wind_ = $(window), 112 body_ = $('body'); 113 feather.replace({ 114 'stroke-width': 1.5 115 }); 116 $(document).on('click', '[data-toggle="fullscreen"]', function () { 117 $(this).toggleClass('active-fullscreen'); 118 119 if (document.fullscreenEnabled) { 120 if ($(this).hasClass("active-fullscreen")) { 121 document.documentElement.requestFullscreen(); 122 } else { 123 document.exitFullscreen(); 124 } 125 } else { 126 alert("Your browser does not support fullscreen."); 4 5 var wind_ = $(window), 6 body_ = $('body'); 7 8 feather.replace({ 9 'stroke-width': 1.5 10 }); 11 12 $(document).on('click', '[data-toggle="fullscreen"]', function () { 13 $(this).toggleClass('active-fullscreen'); 14 if (document.fullscreenEnabled) { 15 if ($(this).hasClass("active-fullscreen")) { 16 document.documentElement.requestFullscreen(); 17 } else { 18 document.exitFullscreen(); 19 } 20 } else { 21 alert("Your browser does not support fullscreen."); 22 } 23 return false; 24 }); 25 26 $(document).on('click', '.overlay', function () { 27 $.removeOverlay(); 28 if (body_.hasClass('horizontal-navigation')) { 29 $('.horizontal-navigation').removeClass('open'); 30 } else { 31 $('.navigation').removeClass('open'); 32 } 33 body_.removeClass('navigation-show'); 34 }); 35 36 $(document).on('click', '[data-sidebar-target]', function () { 37 var target = $(this).data('sidebar-target'); 38 $('body').addClass('no-scroll'); 39 $('.sidebar-group').addClass('show'); 40 $('.sidebar-group .sidebar').removeClass('show'); 41 $('.sidebar-group .sidebar' + target).addClass('show'); 42 return false; 43 }); 44 45 $(document).on('click', '.sidebar-group', function (e) { 46 if ($(e.target).is($('.sidebar-group'))) { 47 $('.sidebar-group').removeClass('show'); 48 $('body').removeClass('no-scroll'); 49 $('.sidebar-group .sidebar').removeClass('show'); 50 } 51 }); 52 53 // Active pages, automatically show on the menu 54 $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('ul').parent('li').addClass('open').closest('ul').parent('li').addClass('open'); 55 $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('div').addClass('open'); 56 $('.navigation .navigation-menu-tab [data-nav-target="#' + $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('div').attr('id') + '"]').addClass('active'); 57 $('body.horizontal-navigation .horizontal-navigation ul li a.active').closest('ul').parent('li').addClass('open').closest('ul').parent('li').addClass('open'); 58 59 60 /*------------- create/remove overlay -------------*/ 61 $.createOverlay = function () { 62 if ($('.overlay').length < 1) { 63 body_.addClass('no-scroll').append('<div class="overlay"></div>'); 64 $('.overlay').addClass('show'); 65 } 66 }; 67 68 $.removeOverlay = function () { 69 body_.removeClass('no-scroll'); 70 $('.overlay').remove(); 71 }; 72 /*------------- create/remove overlay -------------*/ 73 74 $('[data-backround-image]').each(function (e) { 75 $(this).css("background", 'url(' + $(this).data('backround-image') + ')'); 76 }); 77 78 /*------------- page loader -------------*/ 79 wind_.on('load', function () { 80 $('.preloader').fadeOut(400, function () { 81 setTimeout(function () { 82 toastr.options = { 83 timeOut: 2000, 84 progressBar: true, 85 showMethod: "slideDown", 86 hideMethod: "slideUp", 87 showDuration: 200, 88 hideDuration: 200, 89 positionClass: "toast-top-center", 90 }; 91 //toastr.success('Welcome'); 92 93 $('.theme-switcher').removeClass('open'); 94 }, 500); 95 96 // $('.theme-switcher').css('opacity', 1); 97 }); 98 }); 99 /*------------- page loader -------------*/ 100 101 /*------------- side menu (sub menü arrow) -------------*/ 102 wind_.on('load', function () { 103 setTimeout(function () { 104 $('.navigation .navigation-menu-body ul li a').each(function () { 105 var $this = $(this); 106 if ($this.next('ul').length) { 107 $this.append('<i class="sub-menu-arrow ti-angle-up"></i>'); 108 } 109 }); 110 $('.navigation .navigation-menu-body ul li.open>a>.sub-menu-arrow').removeClass('ti-plus').addClass('ti-minus').addClass('rotate-in'); 111 $('body.horizontal-navigation .horizontal-navigation ul li a').each(function () { 112 var $this = $(this); 113 if ($this.next('ul').length) { 114 $this.append('<i class="sub-menu-arrow ti-angle-right"></i>'); 115 } 116 }); 117 }, 200); 118 }); 119 /*------------- side menu (sub menü arrow) -------------*/ 120 121 $(document).on('click', '[data-action="navigation-toggler"]', function () { 122 if (body_.hasClass('horizontal-navigation')) { 123 $('.horizontal-navigation').toggleClass('open'); 124 } else { 125 $('.navigation').toggleClass('open'); 126 } 127 $.createOverlay(); 128 }); 129 130 $(document).on('click', '[data-nav-target]', function () { 131 var $this = $(this), 132 target = $this.data('nav-target'); 133 if (body_.hasClass('navigation-toggle-one')) { 134 body_.addClass('navigation-show'); 135 } 136 if (body_.hasClass('horizontal-navigation')) { 137 $('.navigation .navigation-menu-body').show(); 138 } 139 $('.navigation .navigation-menu-body .navigation-menu-group > div').removeClass('open'); 140 $('.navigation .navigation-menu-body .navigation-menu-group ' + target).addClass('open'); 141 $('[data-nav-target]').removeClass('active'); 142 $this.addClass('active'); 143 $this.tooltip('hide'); 144 return false; 145 }); 146 147 var c = $('.header .header-left .header-logo').clone(); 148 $('.navigation .navigation-header').append(c.addClass('navigation-logo').removeClass('header-logo')); 149 150 $(document).on('click', '.navigation-toggler a', function () { 151 if (wind_.width() < 1200) { 152 $.createOverlay(); 153 body_.addClass('navigation-show'); 154 } else { 155 if (!body_.hasClass('navigation-toggle-one') && !body_.hasClass('navigation-toggle-two')) { 156 body_.addClass('navigation-toggle-one'); 157 } else if (body_.hasClass('navigation-toggle-one') && !body_.hasClass('navigation-toggle-two')) { 158 body_.addClass('navigation-toggle-two'); 159 body_.removeClass('navigation-toggle-one'); 160 } else if (!body_.hasClass('navigation-toggle-one') && body_.hasClass('navigation-toggle-two')) { 161 body_.removeClass('navigation-toggle-two'); 162 body_.removeClass('navigation-toggle-one'); 163 } 164 } 165 return false; 166 }); 167 168 $(document).on('click', '.header-toggler a', function () { 169 $('.header ul.navbar-nav').toggleClass('open'); 170 return false; 171 }); 172 173 $(document).on('click', '*', function (e) { 174 if (!$(e.target).is($('.navigation, .navigation *, .navigation-toggler *')) && body_.hasClass('navigation-toggle-one')) { 175 body_.removeClass('navigation-show'); 176 } 177 }); 178 179 $(document).on('click', '*', function (e) { 180 if (!$(e.target).is('.header ul.navbar-nav, .header ul.navbar-nav *, .header-toggler, .header-toggler *')) { 181 $('.header ul.navbar-nav').removeClass('open'); 182 } 183 }); 184 185 /*------------- form validation -------------*/ 186 window.addEventListener('load', function () { 187 // Fetch all the forms we want to apply custom Bootstrap validation styles to 188 var forms = document.getElementsByClassName('needs-validation'); 189 // Loop over them and prevent submission 190 Array.prototype.filter.call(forms, function (form) { 191 form.addEventListener('submit', function (event) { 192 if (form.checkValidity() === false) { 193 event.preventDefault(); 194 event.stopPropagation(); 195 } 196 form.classList.add('was-validated'); 197 }, false); 198 }); 199 }, false); 200 /*------------- form validation -------------*/ 201 202 /*------------- responsive html table -------------*/ 203 var table_responsive_stack = $(".table-responsive-stack"); 204 table_responsive_stack 205 .find("th") 206 .each(function (i) { 207 $(".table-responsive-stack td:nth-child(" + (i + 1) + ")").prepend( 208 '<span class="table-responsive-stack-thead">' + 209 $(this).text() + 210 ":</span> " 211 ); 212 $(".table-responsive-stack-thead").hide(); 213 }); 214 215 table_responsive_stack.each(function () { 216 var thCount = $(this).find("th").length, 217 rowGrow = 100 / thCount + "%"; 218 $(this).find("th, td").css("flex-basis", rowGrow); 219 }); 220 221 function flexTable() { 222 if (wind_.width() < 768) { 223 $(".table-responsive-stack").each(function (i) { 224 $(this) 225 .find(".table-responsive-stack-thead") 226 .show(); 227 $(this) 228 .find("thead") 229 .hide(); 230 }); 231 232 // window is less than 768px 233 } else { 234 $(".table-responsive-stack").each(function (i) { 235 $(this) 236 .find(".table-responsive-stack-thead") 237 .hide(); 238 $(this) 239 .find("thead") 240 .show(); 241 }); 242 } 127 243 } 128 244 129 return false; 130 }); 131 $(document).on('click', '.overlay', function () { 132 $.removeOverlay(); 133 134 if (body_.hasClass('horizontal-navigation')) { 135 $('.horizontal-navigation').removeClass('open'); 136 } else { 137 $('.navigation').removeClass('open'); 245 flexTable(); 246 247 window.onresize = function (event) { 248 flexTable(); 249 }; 250 /*------------- responsive html table -------------*/ 251 252 /*------------- header search -------------*/ 253 $(document).on('click', '[data-toggle="search"], [data-toggle="search"] *', function () { 254 $('.header .header-body .header-search').show().find('.form-control').focus(); 255 return false; 256 }); 257 258 $(document).on('click', '.close-header-search, .close-header-search svg', function () { 259 $('.header .header-body .header-search').hide(); 260 return false; 261 }); 262 263 $(document).on('click', '*', function (e) { 264 if (!$(e.target).is($('.header, .header *, [data-toggle="search"], [data-toggle="search"] *'))) { 265 $('.header .header-body .header-search').hide(); 266 } 267 }); 268 /*------------- header search -------------*/ 269 270 /*------------- custom accordion -------------*/ 271 $(document).on('click', '.accordion.custom-accordion .accordion-row a.accordion-header', function () { 272 var $this = $(this); 273 $this.closest('.accordion.custom-accordion').find('.accordion-row').not($this.parent()).removeClass('open'); 274 $this.parent('.accordion-row').toggleClass('open'); 275 return false; 276 }); 277 /*------------- custom accordion -------------*/ 278 279 /*------------- responsive table dropdown -------------*/ 280 var dropdownMenu, 281 table_responsive = $('.table-responsive'); 282 283 table_responsive.on('show.bs.dropdown', function (e) { 284 dropdownMenu = $(e.target).find('.dropdown-menu'); 285 body_.append(dropdownMenu.detach()); 286 var eOffset = $(e.target).offset(); 287 dropdownMenu.css({ 288 'display': 'block', 289 'top': eOffset.top + $(e.target).outerHeight(), 290 'left': eOffset.left, 291 'width': '184px', 292 'font-size': '14px' 293 }); 294 dropdownMenu.addClass("mobPosDropdown"); 295 }); 296 297 table_responsive.on('hide.bs.dropdown', function (e) { 298 $(e.target).append(dropdownMenu.detach()); 299 dropdownMenu.hide(); 300 }); 301 /*------------- responsive table dropdown -------------*/ 302 303 /*------------- chat -------------*/ 304 $(document).on('click', '.chat-block .chat-sidebar .chat-sidebar-content .list-group .list-group-item', function () { 305 $('.chat-block .chat-content').addClass('chat-mobile-open'); 306 return false; 307 }); 308 309 $(document).on('click', '.chat-block .chat-content .mobile-chat-close-btn a', function () { 310 $('.chat-block .chat-content').removeClass('chat-mobile-open'); 311 return false; 312 }); 313 /*------------- chat -------------*/ 314 315 /*------------- aside menu toggle -------------*/ 316 $(document).on('click', '.navigation ul li a', function () { 317 var $this = $(this); 318 if ($this.next('ul').length) { 319 var sub_menu_arrow = $this.find('.sub-menu-arrow'); 320 sub_menu_arrow.toggleClass('rotate-in'); 321 $this.next('ul').toggle(200); 322 $this.parent('li').siblings().find('ul').not($this.parent('li').find('ul')).slideUp(200); 323 $this.next('ul').find('li ul').slideUp(200); 324 $this.next('ul').find('li>a').find('.sub-menu-arrow').removeClass('ti-minus').addClass('ti-plus'); 325 $this.next('ul').find('li>a').find('.sub-menu-arrow').removeClass('rotate-in'); 326 $this.parent('li').siblings().not($this.parent('li').find('ul')).find('>a').find('.sub-menu-arrow').removeClass('ti-minus').addClass('ti-plus'); 327 $this.parent('li').siblings().not($this.parent('li').find('ul')).find('>a').find('.sub-menu-arrow').removeClass('rotate-in'); 328 if (sub_menu_arrow.hasClass('rotate-in')) { 329 setTimeout(function () { 330 sub_menu_arrow.removeClass('ti-plus').addClass('ti-minus'); 331 }, 200); 332 } else { 333 sub_menu_arrow.removeClass('ti-minus').addClass('ti-plus'); 334 } 335 if (!body_.hasClass('horizontal-side-menu') && wind_.width() >= 1200) { 336 setTimeout(function (e) { 337 $('.navigation .navigation-menu-body').getNiceScroll().resize(); 338 }, 300); 339 } 340 return false; 341 } 342 }); 343 344 $(document).on('click', '.horizontal-navigation ul li a', function () { 345 var $this = $(this); 346 if ($this.next('ul').length) { 347 $this.next('ul').toggle(200); 348 $this.parent('li').siblings().find('ul').not($this.parent('li').find('ul')).slideUp(200); 349 $this.next('ul').find('li ul').slideUp(200); 350 return false; 351 } 352 }); 353 354 /*------------- aside menu toggle -------------*/ 355 356 /*------------- other -------------*/ 357 $(document).on('click', '.dropdown-menu', function (e) { 358 e.stopPropagation(); 359 }); 360 361 $('#exampleModal').on('show.bs.modal', function (event) { 362 var button = $(event.relatedTarget), 363 recipient = button.data('whatever'), 364 modal = $(this); 365 366 modal.find('.modal-title').text('New message to ' + recipient); 367 modal.find('.modal-body input').val(recipient); 368 }); 369 370 $('[data-toggle="tooltip"]').tooltip({ 371 container: 'body' 372 }); 373 374 $('[data-toggle="popover"]').popover(); 375 376 $('.carousel').carousel(); 377 378 if (wind_.width() >= 992) { 379 $('.card-scroll').niceScroll(); 380 $('.table-responsive').niceScroll(); 381 $('.sidebar-group .sidebar').niceScroll(); 382 383 $('.app-block .app-content .app-lists').niceScroll(); 384 $('.app-block .app-sidebar .app-sidebar-menu').niceScroll(); 385 $('.chat-block .chat-sidebar .chat-sidebar-content').niceScroll(); 386 var chat_messages = $('.chat-block .chat-content .messages'); 387 if (chat_messages.length) { 388 chat_messages.niceScroll({ 389 horizrailenabled: false 390 }); 391 chat_messages.getNiceScroll(0).doScrollTop(chat_messages.get(0).scrollHeight, -1); 392 } 138 393 } 139 394 140 body_.removeClass('navigation-show'); 141 }); 142 $(document).on('click', '[data-sidebar-target]', function () { 143 var target = $(this).data('sidebar-target'); 144 $('body').addClass('no-scroll'); 145 $('.sidebar-group').addClass('show'); 146 $('.sidebar-group .sidebar').removeClass('show'); 147 $('.sidebar-group .sidebar' + target).addClass('show'); 148 return false; 149 }); 150 $(document).on('click', '.sidebar-group', function (e) { 151 if ($(e.target).is($('.sidebar-group'))) { 152 $('.sidebar-group').removeClass('show'); 153 $('body').removeClass('no-scroll'); 154 $('.sidebar-group .sidebar').removeClass('show'); 395 if (!body_.hasClass('small-navigation') && !body_.hasClass('horizontal-navigation') && wind_.width() >= 992) { 396 $('.navigation .navigation-menu-body').niceScroll(); 155 397 } 156 }); // Active pages, automatically show on the menu 157 158 $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('ul').parent('li').addClass('open').closest('ul').parent('li').addClass('open'); 159 $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('div').addClass('open'); 160 $('.navigation .navigation-menu-tab [data-nav-target="#' + $('.navigation .navigation-menu-body .navigation-menu-group ul li a.active').closest('div').attr('id') + '"]').addClass('active'); 161 $('body.horizontal-navigation .horizontal-navigation ul li a.active').closest('ul').parent('li').addClass('open').closest('ul').parent('li').addClass('open'); 162 /*------------- create/remove overlay -------------*/ 163 164 $.createOverlay = function () { 165 if ($('.overlay').length < 1) { 166 body_.addClass('no-scroll').append('<div class="overlay"></div>'); 167 $('.overlay').addClass('show'); 168 } 169 }; 170 171 $.removeOverlay = function () { 172 body_.removeClass('no-scroll'); 173 $('.overlay').remove(); 174 }; 175 /*------------- create/remove overlay -------------*/ 176 177 178 $('[data-backround-image]').each(function (e) { 179 $(this).css("background", 'url(' + $(this).data('backround-image') + ')'); 180 }); 181 /*------------- page loader -------------*/ 182 183 wind_.on('load', function () { 184 $('.preloader').fadeOut(400, function () { 185 setTimeout(function () { 186 toastr.options = { 187 timeOut: 2000, 188 progressBar: true, 189 showMethod: "slideDown", 190 hideMethod: "slideUp", 191 showDuration: 200, 192 hideDuration: 200, 193 positionClass: "toast-top-center" 194 }; 195 //toastr.success('Welcome'); 196 $('.theme-switcher').removeClass('open'); 197 }, 500); // $('.theme-switcher').css('opacity', 1); 198 }); 199 }); 200 /*------------- page loader -------------*/ 201 202 /*------------- side menu (sub menü arrow) -------------*/ 203 204 wind_.on('load', function () { 205 setTimeout(function () { 206 $('.navigation .navigation-menu-body ul li a').each(function () { 207 var $this = $(this); 208 209 if ($this.next('ul').length) { 210 $this.append('<i class="sub-menu-arrow ti-angle-up"></i>'); 211 } 212 }); 213 $('.navigation .navigation-menu-body ul li.open>a>.sub-menu-arrow').removeClass('ti-plus').addClass('ti-minus').addClass('rotate-in'); 214 $('body.horizontal-navigation .horizontal-navigation ul li a').each(function () { 215 var $this = $(this); 216 217 if ($this.next('ul').length) { 218 $this.append('<i class="sub-menu-arrow ti-angle-right"></i>'); 219 } 220 }); 221 }, 200); 222 }); 223 /*------------- side menu (sub menü arrow) -------------*/ 224 225 $(document).on('click', '[data-action="navigation-toggler"]', function () { 226 if (body_.hasClass('horizontal-navigation')) { 227 $('.horizontal-navigation').toggleClass('open'); 228 } else { 229 $('.navigation').toggleClass('open'); 230 } 231 232 $.createOverlay(); 233 }); 234 $(document).on('click', '[data-nav-target]', function () { 235 var $this = $(this), 236 target = $this.data('nav-target'); 237 238 if (body_.hasClass('navigation-toggle-one')) { 239 body_.addClass('navigation-show'); 240 } 241 242 if (body_.hasClass('horizontal-navigation')) { 243 $('.navigation .navigation-menu-body').show(); 244 } 245 246 $('.navigation .navigation-menu-body .navigation-menu-group > div').removeClass('open'); 247 $('.navigation .navigation-menu-body .navigation-menu-group ' + target).addClass('open'); 248 $('[data-nav-target]').removeClass('active'); 249 $this.addClass('active'); 250 $this.tooltip('hide'); 251 return false; 252 }); 253 var c = $('.header .header-left .header-logo').clone(); 254 $('.navigation .navigation-header').append(c.addClass('navigation-logo').removeClass('header-logo')); 255 $(document).on('click', '.navigation-toggler a', function () { 256 if (wind_.width() < 1200) { 257 $.createOverlay(); 258 body_.addClass('navigation-show'); 259 } else { 260 if (!body_.hasClass('navigation-toggle-one') && !body_.hasClass('navigation-toggle-two')) { 261 body_.addClass('navigation-toggle-one'); 262 } else if (body_.hasClass('navigation-toggle-one') && !body_.hasClass('navigation-toggle-two')) { 263 body_.addClass('navigation-toggle-two'); 264 body_.removeClass('navigation-toggle-one'); 265 } else if (!body_.hasClass('navigation-toggle-one') && body_.hasClass('navigation-toggle-two')) { 266 body_.removeClass('navigation-toggle-two'); 267 body_.removeClass('navigation-toggle-one'); 268 } 269 } 270 271 return false; 272 }); 273 $(document).on('click', '.header-toggler a', function () { 274 $('.header ul.navbar-nav').toggleClass('open'); 275 return false; 276 }); 277 $(document).on('click', '*', function (e) { 278 if (!$(e.target).is($('.navigation, .navigation *, .navigation-toggler *')) && body_.hasClass('navigation-toggle-one')) { 279 body_.removeClass('navigation-show'); 280 } 281 }); 282 $(document).on('click', '*', function (e) { 283 if (!$(e.target).is('.header ul.navbar-nav, .header ul.navbar-nav *, .header-toggler, .header-toggler *')) { 284 $('.header ul.navbar-nav').removeClass('open'); 285 } 286 }); 287 /*------------- form validation -------------*/ 288 289 window.addEventListener('load', function () { 290 // Fetch all the forms we want to apply custom Bootstrap validation styles to 291 var forms = document.getElementsByClassName('needs-validation'); // Loop over them and prevent submission 292 293 Array.prototype.filter.call(forms, function (form) { 294 form.addEventListener('submit', function (event) { 295 if (form.checkValidity() === false) { 296 event.preventDefault(); 297 event.stopPropagation(); 298 } 299 300 form.classList.add('was-validated'); 301 }, false); 302 }); 303 }, false); 304 /*------------- form validation -------------*/ 305 306 /*------------- responsive html table -------------*/ 307 308 var table_responsive_stack = $(".table-responsive-stack"); 309 table_responsive_stack.find("th").each(function (i) { 310 $(".table-responsive-stack td:nth-child(" + (i + 1) + ")").prepend('<span class="table-responsive-stack-thead">' + $(this).text() + ":</span> "); 311 $(".table-responsive-stack-thead").hide(); 312 }); 313 table_responsive_stack.each(function () { 314 var thCount = $(this).find("th").length, 315 rowGrow = 100 / thCount + "%"; 316 $(this).find("th, td").css("flex-basis", rowGrow); 317 }); 318 319 function flexTable() { 320 if (wind_.width() < 768) { 321 $(".table-responsive-stack").each(function (i) { 322 $(this).find(".table-responsive-stack-thead").show(); 323 $(this).find("thead").hide(); 324 }); // window is less than 768px 325 } else { 326 $(".table-responsive-stack").each(function (i) { 327 $(this).find(".table-responsive-stack-thead").hide(); 328 $(this).find("thead").show(); 329 }); 330 } 331 } 332 333 flexTable(); 334 335 window.onresize = function (event) { 336 flexTable(); 337 }; 338 /*------------- responsive html table -------------*/ 339 340 /*------------- header search -------------*/ 341 342 343 $(document).on('click', '[data-toggle="search"], [data-toggle="search"] *', function () { 344 $('.header .header-body .header-search').show().find('.form-control').focus(); 345 return false; 346 }); 347 $(document).on('click', '.close-header-search, .close-header-search svg', function () { 348 $('.header .header-body .header-search').hide(); 349 return false; 350 }); 351 $(document).on('click', '*', function (e) { 352 if (!$(e.target).is($('.header, .header *, [data-toggle="search"], [data-toggle="search"] *'))) { 353 $('.header .header-body .header-search').hide(); 354 } 355 }); 356 /*------------- header search -------------*/ 357 358 /*------------- custom accordion -------------*/ 359 360 $(document).on('click', '.accordion.custom-accordion .accordion-row a.accordion-header', function () { 361 var $this = $(this); 362 $this.closest('.accordion.custom-accordion').find('.accordion-row').not($this.parent()).removeClass('open'); 363 $this.parent('.accordion-row').toggleClass('open'); 364 return false; 365 }); 366 /*------------- custom accordion -------------*/ 367 368 /*------------- responsive table dropdown -------------*/ 369 370 var dropdownMenu, 371 table_responsive = $('.table-responsive'); 372 table_responsive.on('show.bs.dropdown', function (e) { 373 dropdownMenu = $(e.target).find('.dropdown-menu'); 374 body_.append(dropdownMenu.detach()); 375 var eOffset = $(e.target).offset(); 376 dropdownMenu.css({ 377 'display': 'block', 378 'top': eOffset.top + $(e.target).outerHeight(), 379 'left': eOffset.left, 380 'width': '184px', 381 'font-size': '14px' 382 }); 383 dropdownMenu.addClass("mobPosDropdown"); 384 }); 385 table_responsive.on('hide.bs.dropdown', function (e) { 386 $(e.target).append(dropdownMenu.detach()); 387 dropdownMenu.hide(); 388 }); 389 /*------------- responsive table dropdown -------------*/ 390 391 /*------------- chat -------------*/ 392 393 $(document).on('click', '.chat-block .chat-sidebar .chat-sidebar-content .list-group .list-group-item', function () { 394 $('.chat-block .chat-content').addClass('chat-mobile-open'); 395 return false; 396 }); 397 $(document).on('click', '.chat-block .chat-content .mobile-chat-close-btn a', function () { 398 $('.chat-block .chat-content').removeClass('chat-mobile-open'); 399 return false; 400 }); 401 /*------------- chat -------------*/ 402 403 /*------------- aside menu toggle -------------*/ 404 405 $(document).on('click', '.navigation ul li a', function () { 406 var $this = $(this); 407 408 if ($this.next('ul').length) { 409 var sub_menu_arrow = $this.find('.sub-menu-arrow'); 410 sub_menu_arrow.toggleClass('rotate-in'); 411 $this.next('ul').toggle(200); 412 $this.parent('li').siblings().find('ul').not($this.parent('li').find('ul')).slideUp(200); 413 $this.next('ul').find('li ul').slideUp(200); 414 $this.next('ul').find('li>a').find('.sub-menu-arrow').removeClass('ti-minus').addClass('ti-plus'); 415 $this.next('ul').find('li>a').find('.sub-menu-arrow').removeClass('rotate-in'); 416 $this.parent('li').siblings().not($this.parent('li').find('ul')).find('>a').find('.sub-menu-arrow').removeClass('ti-minus').addClass('ti-plus'); 417 $this.parent('li').siblings().not($this.parent('li').find('ul')).find('>a').find('.sub-menu-arrow').removeClass('rotate-in'); 418 419 if (sub_menu_arrow.hasClass('rotate-in')) { 420 setTimeout(function () { 421 sub_menu_arrow.removeClass('ti-plus').addClass('ti-minus'); 422 }, 200); 423 } else { 424 sub_menu_arrow.removeClass('ti-minus').addClass('ti-plus'); 425 } 426 427 if (!body_.hasClass('horizontal-side-menu') && wind_.width() >= 1200) { 428 setTimeout(function (e) { 429 $('.navigation .navigation-menu-body').getNiceScroll().resize(); 430 }, 300); 431 } 432 433 return false; 434 } 435 }); 436 $(document).on('click', '.horizontal-navigation ul li a', function () { 437 var $this = $(this); 438 439 if ($this.next('ul').length) { 440 $this.next('ul').toggle(200); 441 $this.parent('li').siblings().find('ul').not($this.parent('li').find('ul')).slideUp(200); 442 $this.next('ul').find('li ul').slideUp(200); 443 return false; 444 } 445 }); 446 /*------------- aside menu toggle -------------*/ 447 448 /*------------- other -------------*/ 449 450 $(document).on('click', '.dropdown-menu', function (e) { 451 e.stopPropagation(); 452 }); 453 $('#exampleModal').on('show.bs.modal', function (event) { 454 var button = $(event.relatedTarget), 455 recipient = button.data('whatever'), 456 modal = $(this); 457 modal.find('.modal-title').text('New message to ' + recipient); 458 modal.find('.modal-body input').val(recipient); 459 }); 460 $('[data-toggle="tooltip"]').tooltip({ 461 container: 'body' 462 }); 463 $('[data-toggle="popover"]').popover(); 464 $('.carousel').carousel(); 465 466 if (wind_.width() >= 992) { 467 $('.card-scroll').niceScroll(); 468 $('.table-responsive').niceScroll(); 469 $('.sidebar-group .sidebar').niceScroll(); 470 $('.app-block .app-content .app-lists').niceScroll(); 471 $('.app-block .app-sidebar .app-sidebar-menu').niceScroll(); 472 $('.chat-block .chat-sidebar .chat-sidebar-content').niceScroll(); 473 var chat_messages = $('.chat-block .chat-content .messages'); 474 475 if (chat_messages.length) { 476 chat_messages.niceScroll({ 477 horizrailenabled: false 478 }); 479 chat_messages.getNiceScroll(0).doScrollTop(chat_messages.get(0).scrollHeight, -1); 480 } 481 } 482 483 if (!body_.hasClass('small-navigation') && !body_.hasClass('horizontal-navigation') && wind_.width() >= 992) { 484 $('.navigation .navigation-menu-body').niceScroll(); 485 } 486 487 $('.dropdown-menu ul.list-group').niceScroll(); 488 /* Theme Switcher */ 489 490 /* var path = window.location.pathname; 491 var page = path.split("/").pop(); 492 var theme_switcher_html = '<div class="theme-switcher open"> \n\ 493 <div class="theme-switcher-button"> \n\ 494 <i class="fa fa-cog"></i> \n\ 495 </div> \n\ 496 <div class="theme-switcher-panel"> \n\ 497 <div class="card"> \n\ 498 <div class="card-body"> \n\ 499 <h6 class="card-title">Theme Switcher</h6> \n\ 500 <div class="form-group mb-2"> \n\ 501 <div class="custom-control custom-switch"> \n\ 502 <input type="checkbox" class="custom-control-input" id="dark"> \n\ 503 <label class="custom-control-label" for="dark">Dark</label> \n\ 504 </div> \n\ 505 </div> \n\ 506 <div class="form-group mb-2"> \n\ 507 <div class="custom-control custom-switch"> \n\ 508 <input type="checkbox" class="custom-control-input" id="semi-dark"> \n\ 509 <label class="custom-control-label" for="semi-dark">Semi dark</label> \n\ 510 </div> \n\ 511 </div> \n\ 512 <div class="form-group mb-2"> \n\ 513 <div class="custom-control custom-switch"> \n\ 514 <input type="checkbox" class="custom-control-input" id="shadow-layout"> \n\ 515 <label class="custom-control-label" for="shadow-layout">Shadow layout</label> \n\ 516 </div> \n\ 517 </div> \n\ 518 <div class="form-group mb-2"> \n\ 519 <div class="custom-control custom-switch"> \n\ 520 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-navigation"> \n\ 521 <label class="custom-control-label" for="sticky-navigation">Sticky navigation</label> \n\ 522 </div> \n\ 523 </div> \n\ 524 <div class="form-group mb-2"> \n\ 525 <div class="custom-control custom-switch"> \n\ 526 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="small-navigation"> \n\ 527 <label class="custom-control-label" for="small-navigation">Small navigation</label> \n\ 528 </div> \n\ 529 </div> \n\ 530 <div class="form-group mb-2"> \n\ 531 <div class="custom-control custom-switch"> \n\ 532 <input type="checkbox" class="custom-control-input" id="hidden-navigation"> \n\ 533 <label class="custom-control-label" for="hidden-navigation">Hidden navigation</label> \n\ 534 </div> \n\ 535 </div> \n\ 536 <div class="form-group mb-2"> \n\ 537 <div class="custom-control custom-switch"> \n\ 538 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-header"> \n\ 539 <label class="custom-control-label" for="sticky-header">Sticky header</label> \n\ 540 </div> \n\ 541 </div> \n\ 542 <div class="form-group mb-2"> \n\ 543 <div class="custom-control custom-switch"> \n\ 544 <input type="checkbox" class="custom-control-input" id="light-header"> \n\ 545 <label class="custom-control-label" for="light-header">Light header</label> \n\ 546 </div> \n\ 547 </div> \n\ 548 <div class="form-group mb-2"> \n\ 549 <div class="custom-control custom-switch"> \n\ 550 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-footer"> \n\ 551 <label class="custom-control-label" for="sticky-footer">Sticky footer</label> \n\ 552 </div> \n\ 553 </div> \n\ 554 </div> \n\ 555 </div> \n\ 556 </div> \n\ 557 </div>'; 558 $('body').append(theme_switcher_html); 559 $(document).on('click', '.theme-switcher input[type="checkbox"]', function () { 560 var id = $(this).attr('id'); 561 if (id === 'sticky-navigation') { 562 if ($(this).prop('checked')) { 563 $('.navigation').niceScroll().resize(); 564 } else { 565 $('.navigation').niceScroll().remove(); 566 } 567 if ($('body').hasClass('small-navigation')) { 568 $('.navigation .navigation-menu-body > ul > li').each(function () { 569 if ($(this).find('> a').next('ul').length) { 570 // Dropdown add header title 571 $(this).find('.dropdown-divider').remove(); 572 } else { 573 // Add tooltip 574 $(this).find('> a').tooltip('dispose'); 575 } 576 }); 577 $('body').removeClass('small-navigation'); 578 $('.theme-switcher input[type="checkbox"][id="small-navigation"]').prop('checked', false); 579 } 580 if ($('body').hasClass('hidden-navigation')) {CUSTOMİZABLE 581 $('body').removeClass('hidden-navigation'); 582 $('.theme-switcher input[type="checkbox"][id="hidden-navigation"]').prop('checked', false); 583 } 584 } 585 if (id === 'small-navigation') { 586 if ($(this).prop('checked')) { 587 $('.navigation .navigation-menu-body > ul > li').each(function () { 588 if ($(this).find('> a').next('ul').length) { 589 // Dropdown add header title 590 $(this).find('> a').next('ul').prepend('<li class="dropdown-divider">' + $(this).find('> a > span:not(.badge)').text() + '</li>') 591 } else { 592 // Add tooltip 593 $(this).find('> a').attr('title', $(this).find('> a > span:not(.badge)').text()); 594 $(this).find('> a').tooltip({ 595 placement: "right" 596 }); 597 } 598 }); 599 } else { 600 $('.navigation .navigation-menu-body > ul > li').each(function () { 601 if ($(this).find('> a').next('ul').length) { 602 // Dropdown add header title 603 $(this).find('.dropdown-divider').remove(); 604 } else { 605 // Add tooltip 606 $(this).find('> a').tooltip('dispose'); 607 } 608 }); 609 } 610 if ($('body').hasClass('sticky-navigation')) { 611 $('body').removeClass('sticky-navigation'); 612 $('.navigation').niceScroll().remove(); 613 $('.theme-switcher input[type="checkbox"][id="sticky-navigation"]').prop('checked', false); 614 } 615 if ($('body').hasClass('hidden-navigation')) { 616 $('body').removeClass('hidden-navigation'); 617 $('.theme-switcher input[type="checkbox"][id="hidden-navigation"]').prop('checked', false); 618 } 619 } 620 if (id === 'hidden-navigation') { 621 setTimeout(function () { 622 $('.navigation').niceScroll().resize(); 623 $('.app-block .app-content .app-lists').niceScroll().resize(); 624 $('.app-block .app-sidebar .app-sidebar-menu').niceScroll().resize(); 625 $('.chat-block .chat-sidebar .chat-sidebar-content .tab-content .tab-pane').niceScroll().resize(); 626 }, 200); 627 if (!$(this).prop('checked')) { 628 $.removeOverlay(); 629 $('.navigation').removeClass('open'); 630 } 631 if (page != 'chat.html' && page != 'inbox.html' && page != 'app-todo.html') { 632 if ($('body').hasClass('sticky-navigation')) { 633 $('body').removeClass('sticky-navigation'); 634 $('.theme-switcher input[type="checkbox"][id="sticky-navigation"]').prop('checked', false); 635 } 636 } 637 if ($('body').hasClass('small-navigation')) { 638 $('.navigation .navigation-menu-body > ul > li').each(function () { 639 if ($(this).find('> a').next('ul').length) { 640 // Dropdown add header title 641 $(this).find('.dropdown-divider').remove(); 642 } else { 643 // Add tooltip 644 $(this).find('> a').tooltip('dispose'); 645 } 646 }); 647 $('body').removeClass('small-navigation'); 648 $('.theme-switcher input[type="checkbox"][id="small-navigation"]').prop('checked', false); 649 } 650 } 651 if (id === 'dark') { 652 if ($('body').hasClass('semi-dark')) { 653 $('body').removeClass('semi-dark'); 654 $('.theme-switcher input[type="checkbox"][id="semi-dark"]').prop('checked', false); 655 } 656 } 657 if (id === 'semi-dark') { 658 if ($('body').hasClass('dark')) { 659 $('body').removeClass('dark'); 660 $('.theme-switcher input[type="checkbox"][id="dark"]').prop('checked', false); 661 } 662 } 663 $('body').toggleClass(id); 664 }); 665 $(document).on('click', '.theme-switcher .theme-switcher-button', function () { 666 $('.theme-switcher').toggleClass('open'); 667 }); */ 398 399 $('.dropdown-menu ul.list-group').niceScroll(); 668 400 })(jQuery); 669 670 /***/ }),671 672 /***/ 0:673 /*!*****************************************************************!*\674 !*** multi ./resources/js/app.js ./public/assets/sass/app.scss ***!675 \*****************************************************************/676 /*! no static exports found */677 /***/ (function(module, exports, __webpack_require__) {678 679 __webpack_require__(/**/"./resources/js/app.js");680 module.exports = __webpack_require__(/**/"./public/assets/sass/app.scss");681 682 683 /***/ })684 685 /******/ }); -
resources/assets/js/app.min.js
r194a359 r24a616f 193 193 positionClass: "toast-top-center" 194 194 }; 195 //toastr.success('Welcome'); 195 196 $('.theme-switcher').removeClass('open'); 196 197 }, 500); // $('.theme-switcher').css('opacity', 1); … … 485 486 486 487 $('.dropdown-menu ul.list-group').niceScroll(); 487 /* Theme Switcher */488 489 /* var path = window.location.pathname;490 var page = path.split("/").pop();491 var theme_switcher_html = '<div class="theme-switcher open"> \n\492 <div class="theme-switcher-button"> \n\493 <i class="fa fa-cog"></i> \n\494 </div> \n\495 <div class="theme-switcher-panel"> \n\496 <div class="card"> \n\497 <div class="card-body"> \n\498 <h6 class="card-title">Theme Switcher</h6> \n\499 <div class="form-group mb-2"> \n\500 <div class="custom-control custom-switch"> \n\501 <input type="checkbox" class="custom-control-input" id="dark"> \n\502 <label class="custom-control-label" for="dark">Dark</label> \n\503 </div> \n\504 </div> \n\505 <div class="form-group mb-2"> \n\506 <div class="custom-control custom-switch"> \n\507 <input type="checkbox" class="custom-control-input" id="semi-dark"> \n\508 <label class="custom-control-label" for="semi-dark">Semi dark</label> \n\509 </div> \n\510 </div> \n\511 <div class="form-group mb-2"> \n\512 <div class="custom-control custom-switch"> \n\513 <input type="checkbox" class="custom-control-input" id="shadow-layout"> \n\514 <label class="custom-control-label" for="shadow-layout">Shadow layout</label> \n\515 </div> \n\516 </div> \n\517 <div class="form-group mb-2"> \n\518 <div class="custom-control custom-switch"> \n\519 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-navigation"> \n\520 <label class="custom-control-label" for="sticky-navigation">Sticky navigation</label> \n\521 </div> \n\522 </div> \n\523 <div class="form-group mb-2"> \n\524 <div class="custom-control custom-switch"> \n\525 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="small-navigation"> \n\526 <label class="custom-control-label" for="small-navigation">Small navigation</label> \n\527 </div> \n\528 </div> \n\529 <div class="form-group mb-2"> \n\530 <div class="custom-control custom-switch"> \n\531 <input type="checkbox" class="custom-control-input" id="hidden-navigation"> \n\532 <label class="custom-control-label" for="hidden-navigation">Hidden navigation</label> \n\533 </div> \n\534 </div> \n\535 <div class="form-group mb-2"> \n\536 <div class="custom-control custom-switch"> \n\537 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-header"> \n\538 <label class="custom-control-label" for="sticky-header">Sticky header</label> \n\539 </div> \n\540 </div> \n\541 <div class="form-group mb-2"> \n\542 <div class="custom-control custom-switch"> \n\543 <input type="checkbox" class="custom-control-input" id="light-header"> \n\544 <label class="custom-control-label" for="light-header">Light header</label> \n\545 </div> \n\546 </div> \n\547 <div class="form-group mb-2"> \n\548 <div class="custom-control custom-switch"> \n\549 <input type="checkbox" class="custom-control-input" ' + (page === 'chat.html' || page === 'inbox.html' || page === 'app-todo.html' ? 'disabled' : '') + ' id="sticky-footer"> \n\550 <label class="custom-control-label" for="sticky-footer">Sticky footer</label> \n\551 </div> \n\552 </div> \n\553 </div> \n\554 </div> \n\555 </div> \n\556 </div>';557 $('body').append(theme_switcher_html);558 $(document).on('click', '.theme-switcher input[type="checkbox"]', function () {559 var id = $(this).attr('id');560 if (id === 'sticky-navigation') {561 if ($(this).prop('checked')) {562 $('.navigation').niceScroll().resize();563 } else {564 $('.navigation').niceScroll().remove();565 }566 if ($('body').hasClass('small-navigation')) {567 $('.navigation .navigation-menu-body > ul > li').each(function () {568 if ($(this).find('> a').next('ul').length) {569 // Dropdown add header title570 $(this).find('.dropdown-divider').remove();571 } else {572 // Add tooltip573 $(this).find('> a').tooltip('dispose');574 }575 });576 $('body').removeClass('small-navigation');577 $('.theme-switcher input[type="checkbox"][id="small-navigation"]').prop('checked', false);578 }579 if ($('body').hasClass('hidden-navigation')) {CUSTOMİZABLE580 $('body').removeClass('hidden-navigation');581 $('.theme-switcher input[type="checkbox"][id="hidden-navigation"]').prop('checked', false);582 }583 }584 if (id === 'small-navigation') {585 if ($(this).prop('checked')) {586 $('.navigation .navigation-menu-body > ul > li').each(function () {587 if ($(this).find('> a').next('ul').length) {588 // Dropdown add header title589 $(this).find('> a').next('ul').prepend('<li class="dropdown-divider">' + $(this).find('> a > span:not(.badge)').text() + '</li>')590 } else {591 // Add tooltip592 $(this).find('> a').attr('title', $(this).find('> a > span:not(.badge)').text());593 $(this).find('> a').tooltip({594 placement: "right"595 });596 }597 });598 } else {599 $('.navigation .navigation-menu-body > ul > li').each(function () {600 if ($(this).find('> a').next('ul').length) {601 // Dropdown add header title602 $(this).find('.dropdown-divider').remove();603 } else {604 // Add tooltip605 $(this).find('> a').tooltip('dispose');606 }607 });608 }609 if ($('body').hasClass('sticky-navigation')) {610 $('body').removeClass('sticky-navigation');611 $('.navigation').niceScroll().remove();612 $('.theme-switcher input[type="checkbox"][id="sticky-navigation"]').prop('checked', false);613 }614 if ($('body').hasClass('hidden-navigation')) {615 $('body').removeClass('hidden-navigation');616 $('.theme-switcher input[type="checkbox"][id="hidden-navigation"]').prop('checked', false);617 }618 }619 if (id === 'hidden-navigation') {620 setTimeout(function () {621 $('.navigation').niceScroll().resize();622 $('.app-block .app-content .app-lists').niceScroll().resize();623 $('.app-block .app-sidebar .app-sidebar-menu').niceScroll().resize();624 $('.chat-block .chat-sidebar .chat-sidebar-content .tab-content .tab-pane').niceScroll().resize();625 }, 200);626 if (!$(this).prop('checked')) {627 $.removeOverlay();628 $('.navigation').removeClass('open');629 }630 if (page != 'chat.html' && page != 'inbox.html' && page != 'app-todo.html') {631 if ($('body').hasClass('sticky-navigation')) {632 $('body').removeClass('sticky-navigation');633 $('.theme-switcher input[type="checkbox"][id="sticky-navigation"]').prop('checked', false);634 }635 }636 if ($('body').hasClass('small-navigation')) {637 $('.navigation .navigation-menu-body > ul > li').each(function () {638 if ($(this).find('> a').next('ul').length) {639 // Dropdown add header title640 $(this).find('.dropdown-divider').remove();641 } else {642 // Add tooltip643 $(this).find('> a').tooltip('dispose');644 }645 });646 $('body').removeClass('small-navigation');647 $('.theme-switcher input[type="checkbox"][id="small-navigation"]').prop('checked', false);648 }649 }650 if (id === 'dark') {651 if ($('body').hasClass('semi-dark')) {652 $('body').removeClass('semi-dark');653 $('.theme-switcher input[type="checkbox"][id="semi-dark"]').prop('checked', false);654 }655 }656 if (id === 'semi-dark') {657 if ($('body').hasClass('dark')) {658 $('body').removeClass('dark');659 $('.theme-switcher input[type="checkbox"][id="dark"]').prop('checked', false);660 }661 }662 $('body').toggleClass(id);663 });664 $(document).on('click', '.theme-switcher .theme-switcher-button', function () {665 $('.theme-switcher').toggleClass('open');666 }); */667 488 })(jQuery); 668 489 … … 676 497 /***/ (function(module, exports, __webpack_require__) { 677 498 678 __webpack_require__(/* */"./resources/js/app.js");679 module.exports = __webpack_require__(/* */"./public/assets/sass/app.scss");499 __webpack_require__(/*! C:\wamp64\www\themeforest\nago\resources\js\app.js */"./resources/js/app.js"); 500 module.exports = __webpack_require__(/*! C:\wamp64\www\themeforest\nago\public\assets\sass\app.scss */"./public/assets/sass/app.scss"); 680 501 681 502 -
resources/assets/js/examples/pages/user-list.js
r194a359 r24a616f 5 5 'targets': 0, 6 6 'className': 'dt-body-center', 7 //'render': function (data, type, full, meta) {8 //return '<div class="custom-control custom-checkbox">' +9 //'<input type="checkbox" class="custom-control-input" id="customCheck' + meta.row + '">' +10 //'<label class="custom-control-label" for="customCheck' + meta.row + '"></label>' +11 //'</div>';12 //}7 'render': function (data, type, full, meta) { 8 return '<div class="custom-control custom-checkbox">' + 9 '<input type="checkbox" class="custom-control-input" id="customCheck' + meta.row + '">' + 10 '<label class="custom-control-label" for="customCheck' + meta.row + '"></label>' + 11 '</div>'; 12 } 13 13 }, 14 14 { 15 15 "orderable": false, 16 "targets": [ ]16 "targets": [0, 8] 17 17 } 18 18 ], … … 20 20 }); 21 21 22 //$(document).on('click', '#user-list-select-all', function () {23 //// Check/uncheck all checkboxes in the table24 //var rows = table.rows({'search': 'applied'}).nodes();25 //$('input[type="checkbox"]', rows)26 //.prop('checked', this.checked);27 //if (this.checked) {28 //$('input[type="checkbox"]', rows).closest('tr').addClass('tr-selected');29 //} else {30 //$('input[type="checkbox"]', rows).closest('tr').removeClass('tr-selected');31 //}32 //});33 // 34 //// Handle click on checkbox to set state of "Select all" control35 //$('#user-list tbody').on('change', 'input[type="checkbox"]', function () {36 //// If checkbox is not checked37 //if (!this.checked) {38 //var el = $('#user-list-select-all').get(0);39 //// If "Select all" control is checked and has 'indeterminate' property40 //if (el && el.checked && ('indeterminate' in el)) {41 //// Set visual state of "Select all" control42 //// as 'indeterminate'43 //el.indeterminate = true;44 //}45 //}46 //});47 // 48 //$(document).on('click', '.custom-control-input', function () {49 //if ($(this).prop('checked')) {50 //$(this).closest('td').closest('tr').addClass('tr-selected');51 //} else {52 //$(this).closest('td').closest('tr').removeClass('tr-selected');53 //}54 //});22 $(document).on('click', '#user-list-select-all', function () { 23 // Check/uncheck all checkboxes in the table 24 var rows = table.rows({'search': 'applied'}).nodes(); 25 $('input[type="checkbox"]', rows) 26 .prop('checked', this.checked); 27 if (this.checked) { 28 $('input[type="checkbox"]', rows).closest('tr').addClass('tr-selected'); 29 } else { 30 $('input[type="checkbox"]', rows).closest('tr').removeClass('tr-selected'); 31 } 32 }); 33 34 // Handle click on checkbox to set state of "Select all" control 35 $('#user-list tbody').on('change', 'input[type="checkbox"]', function () { 36 // If checkbox is not checked 37 if (!this.checked) { 38 var el = $('#user-list-select-all').get(0); 39 // If "Select all" control is checked and has 'indeterminate' property 40 if (el && el.checked && ('indeterminate' in el)) { 41 // Set visual state of "Select all" control 42 // as 'indeterminate' 43 el.indeterminate = true; 44 } 45 } 46 }); 47 48 $(document).on('click', '.custom-control-input', function () { 49 if ($(this).prop('checked')) { 50 $(this).closest('td').closest('tr').addClass('tr-selected'); 51 } else { 52 $(this).closest('td').closest('tr').removeClass('tr-selected'); 53 } 54 }); 55 55 });
Note:
See TracChangeset
for help on using the changeset viewer.