Changeset 24a616f for resources/assets/js/app.min.js
- Timestamp:
- 10/13/21 15:44:57 (3 years ago)
- Branches:
- develop, master
- Children:
- 120759b
- Parents:
- 194a359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.