1/** 2 * Themes: Velonic Admin theme 3 * 4 **/ 5 6 7! function($) { 8 "use strict"; 9 10 /** 11 Sidebar Module 12 */ 13 var SideBar = function() { 14 this.$body = $("body"), 15 this.$sideBar = $('aside.left-panel'), 16 this.$navbarToggle = $(".navbar-toggle"), 17 this.$navbarItem = $("aside.left-panel nav.navigation > ul > li:has(ul) > a"), 18 this.$navbarItem2 = $("aside.left-panel nav.navigation > ul > li > ul > li:has(ul) > a") 19 }; 20 21 //initilizing 22 SideBar.prototype.init = function() { 23 //on toggle side menu bar 24 var $this = this; 25 $(document).on('click', '.navbar-toggle', function () { 26 $this.$sideBar.toggleClass('collapsed'); 27 }); 28 29 //on menu item clicking 30 this.$navbarItem.click(function () { 31 if ($this.$sideBar.hasClass('collapsed') == false || $(window).width() < 768) { 32 $("aside.left-panel nav.navigation > ul > li > ul").slideUp(300); 33 $("aside.left-panel nav.navigation > ul > li").removeClass('active'); 34 if (!$(this).next().is(":visible")) { 35 $(this).next().slideToggle(300, function () { 36 $("aside.left-panel:not(.collapsed)").getNiceScroll().resize(); 37 }); 38 $(this).closest('li').addClass('active'); 39 } 40 return false; 41 } 42 }); 43 44 this.$navbarItem2.click(function () { 45 if ($this.$sideBar.hasClass('collapsed') == false || $(window).width() < 768) { 46 $("aside.left-panel nav.navigation > ul > li > ul > li > ul").slideUp(300); 47 $("aside.left-panel nav.navigation > ul > li > ul > li").removeClass('active'); 48 if (!$(this).next().is(":visible")) { 49 $(this).next().slideToggle(300, function () { 50 $("aside.left-panel:not(.collapsed)").getNiceScroll().resize(); 51 }); 52 53 } 54 return false; 55 } 56 }); 57 58 //adding nicescroll to sidebar 59 if ($.isFunction($.fn.niceScroll)) { 60 $("aside.left-panel:not(.collapsed)").niceScroll({ 61 cursorcolor: '#8e909a', 62 cursorborder: '0px solid #fff', 63 cursoropacitymax: '0.5', 64 cursorborderradius: '0px' 65 }); 66 } 67 }, 68 69 //exposing the sidebar module 70 $.SideBar = new SideBar, $.SideBar.Constructor = SideBar 71 72}(window.jQuery), 73 74 75//portlets 76function($) { 77 "use strict"; 78 79 /** 80 Portlet Widget 81 */ 82 var Portlet = function() { 83 this.$body = $("body"), 84 this.$portletIdentifier = ".portlet", 85 this.$portletCloser = '.portlet a[data-toggle="remove"]', 86 this.$portletRefresher = '.portlet a[data-toggle="reload"]' 87 }; 88 89 //on init 90 Portlet.prototype.init = function() { 91 // Panel closest 92 var $this = this; 93 $(document).on("click",this.$portletCloser, function (ev) { 94 ev.preventDefault(); 95 var $portlet = $(this).closest($this.$portletIdentifier); 96 var $portlet_parent = $portlet.parent(); 97 $portlet.remove(); 98 if ($portlet_parent.children().length == 0) { 99 $portlet_parent.remove(); 100 } 101 }); 102 103 // Panel Reload 104 $(document).on("click",this.$portletRefresher, function (ev) { 105 ev.preventDefault(); 106 var $portlet = $(this).closest($this.$portletIdentifier); 107 // This is just a simulation, nothing is going to be reloaded 108 $portlet.append('<div class="panel-disabled"><div class="loader-1"></div></div>'); 109 var $pd = $portlet.find('.panel-disabled'); 110 setTimeout(function () { 111 $pd.fadeOut('fast', function () { 112 $pd.remove(); 113 }); 114 }, 500 + 300 * (Math.random() * 5)); 115 }); 116 }, 117 // 118 $.Portlet = new Portlet, $.Portlet.Constructor = Portlet 119 120}(window.jQuery), 121 122 123//main app module 124function($) { 125 "use strict"; 126 127 var VelonicApp = function() { 128 this.VERSION = "1.0.0", 129 this.AUTHOR = "Coderthemes", 130 this.SUPPORT = "[email protected]", 131 this.pageScrollElement = "html, body", 132 this.$body = $("body") 133 }; 134 135 //initializing tooltip 136 VelonicApp.prototype.initTooltipPlugin = function() { 137 $.fn.tooltip && $('[data-toggle="tooltip"]').tooltip() 138 }, 139 140 //initializing popover 141 VelonicApp.prototype.initPopoverPlugin = function() { 142 $.fn.popover && $('[data-toggle="popover"]').popover() 143 }, 144 145 //initializing nicescroll 146 VelonicApp.prototype.initNiceScrollPlugin = function() { 147 //You can change the color of scroll bar here 148 $.fn.niceScroll && $(".nicescroll").niceScroll({ cursorcolor: '#9d9ea5', cursorborderradiu
148s: '0px'}); 149 }, 150 151 //initializing knob 152 VelonicApp.prototype.initKnob = function() { 153 if ($(".knob").length > 0) { 154 $(".knob").knob(); 155 } 156 }, 157 158 //initilizing 159 VelonicApp.prototype.init = function() { 160 this.initTooltipPlugin(), 161 this.initPopoverPlugin(), 162 this.initNiceScrollPlugin(), 163 this.initKnob(), 164 //creating side bar 165 $.SideBar.init(), 166 //creating portles 167 $.Portlet.init(); 168 }, 169 170 $.VelonicApp = new VelonicApp, $.VelonicApp.Constructor = VelonicApp 171 172}(window.jQuery), 173 174//initializing main application module 175function($) { 176 "use strict"; 177 $.VelonicApp.init() 178}(window.jQuery); 179 180 181/* ============================================== 1827.WOW plugin triggers animate.css on scroll 183=============================================== */ 184var wow = new WOW( 185 { 186 boxClass: 'wow', // animated element css class (default is wow) 187 animateClass: 'animated', // animation css class (default is animated) 188 offset: 50, // distance to the element when triggering the animation (default is 0) 189 mobile: false // trigger animations on mobile devices (true is default) 190 } 191); 192wow.init();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.