From 306b5579fdaa264b1e0eb71ea185c929a346c595 Mon Sep 17 00:00:00 2001 From: Harsh Gautam Date: Sun, 24 Dec 2023 12:32:35 +0530 Subject: [PATCH] Vercel debug try-5 --- .../lib/jquery.mCustomScrollbar.concat.min.js | 5 - .../pcassets/js/lib/jquery.mousewheel.min.js | 8 - files/assets/pcassets/js/pcoded.min.js | 1029 --------- files/{assets/pcassets/css => }/bootstrap.css | 0 .../pcassets/css => }/bootstrap.min.css | 0 .../{assets/pcassets/js => }/bootstrap.min.js | 0 .../echarts => }/customerConversionCharts.js | 0 files/{assets/pcassets/js => }/demo-1.js | 0 files/{assets/pcassets/js => }/demo-10.js | 0 files/{assets/pcassets/js => }/demo-11.js | 0 files/{assets/pcassets/js => }/demo-12.js | 0 files/{assets/pcassets/js => }/demo-13.js | 0 files/{assets/pcassets/js => }/demo-14.js | 0 files/{assets/pcassets/js => }/demo-15.js | 0 files/{assets/pcassets/js => }/demo-16.js | 0 files/{assets/pcassets/js => }/demo-17.js | 0 files/{assets/pcassets/js => }/demo-18.js | 0 files/{assets/pcassets/js => }/demo-19.js | 0 files/{assets/pcassets/js => }/demo-2.js | 0 files/{assets/pcassets/js => }/demo-20.js | 0 files/{assets/pcassets/js => }/demo-21.js | 0 files/{assets/pcassets/js => }/demo-22.js | 0 files/{assets/pcassets/js => }/demo-23.js | 0 files/{assets/pcassets/js => }/demo-24.js | 0 files/{assets/pcassets/js => }/demo-25.js | 0 files/{assets/pcassets/js => }/demo-3.js | 0 files/{assets/pcassets/js => }/demo-4.js | 0 files/{assets/pcassets/js => }/demo-5.js | 0 files/{assets/pcassets/js => }/demo-6.js | 0 files/{assets/pcassets/js => }/demo-7.js | 0 files/{assets/pcassets/js => }/demo-8.js | 0 files/{assets/pcassets/js => }/demo-9.js | 0 .../js/lib/echarts => }/echarts-all.js | 0 .../lib/echarts/theme => }/echarts-theme.js | 0 .../js/lib/echarts => }/echartsConfig.js | 0 .../{assets/pcassets/css => }/fakeLoader.css | 0 .../pcassets/js/lib => }/fakeLoader.js | 0 .../pcassets/css => }/flag-icon.min.css | 0 .../pcassets/css => }/font-awesome.min.css | 0 .../{assets/pcassets/css => }/fonts-face.css | 0 .../pcassets/js => }/horizontal-demo.js | 0 files/{assets/pcassets/css => }/ionicons.css | 0 .../pcassets/js => }/jquery.1.11.3.min.js | 0 .../css => }/jquery.mCustomScrollbar.css | 0 .../{assets/pcassets/css => }/linearicons.css | 0 .../js/lib/echarts => }/mdtStoreCharts.js | 0 .../pcassets/css => }/pcoded-horizontal.css | 0 .../css => }/pcoded-horizontal.min.css | 0 .../pcassets/css => }/pcoded-vertical.css | 0 .../pcassets/css => }/pcoded-vertical.min.css | 0 files/{assets/pcassets/js => }/pcoded.js | 0 files/pcoded.min.js | 1920 ++++++++--------- .../js/lib/echarts => }/salesCharts.js | 0 .../pcassets/css => }/simple-line-icons.css | 0 .../pcassets/js/lib/echarts => }/skuCharts.js | 0 .../pcassets/js/lib => }/sparkline.min.js | 0 .../{assets/pcassets/js => }/vertical-demo.js | 0 57 files changed, 927 insertions(+), 2035 deletions(-) delete mode 100644 files/assets/pcassets/js/lib/jquery.mCustomScrollbar.concat.min.js delete mode 100644 files/assets/pcassets/js/lib/jquery.mousewheel.min.js delete mode 100644 files/assets/pcassets/js/pcoded.min.js rename files/{assets/pcassets/css => }/bootstrap.css (100%) rename files/{assets/pcassets/css => }/bootstrap.min.css (100%) rename files/{assets/pcassets/js => }/bootstrap.min.js (100%) rename files/{assets/pcassets/js/lib/echarts => }/customerConversionCharts.js (100%) rename files/{assets/pcassets/js => }/demo-1.js (100%) rename files/{assets/pcassets/js => }/demo-10.js (100%) rename files/{assets/pcassets/js => }/demo-11.js (100%) rename files/{assets/pcassets/js => }/demo-12.js (100%) rename files/{assets/pcassets/js => }/demo-13.js (100%) rename files/{assets/pcassets/js => }/demo-14.js (100%) rename files/{assets/pcassets/js => }/demo-15.js (100%) rename files/{assets/pcassets/js => }/demo-16.js (100%) rename files/{assets/pcassets/js => }/demo-17.js (100%) rename files/{assets/pcassets/js => }/demo-18.js (100%) rename files/{assets/pcassets/js => }/demo-19.js (100%) rename files/{assets/pcassets/js => }/demo-2.js (100%) rename files/{assets/pcassets/js => }/demo-20.js (100%) rename files/{assets/pcassets/js => }/demo-21.js (100%) rename files/{assets/pcassets/js => }/demo-22.js (100%) rename files/{assets/pcassets/js => }/demo-23.js (100%) rename files/{assets/pcassets/js => }/demo-24.js (100%) rename files/{assets/pcassets/js => }/demo-25.js (100%) rename files/{assets/pcassets/js => }/demo-3.js (100%) rename files/{assets/pcassets/js => }/demo-4.js (100%) rename files/{assets/pcassets/js => }/demo-5.js (100%) rename files/{assets/pcassets/js => }/demo-6.js (100%) rename files/{assets/pcassets/js => }/demo-7.js (100%) rename files/{assets/pcassets/js => }/demo-8.js (100%) rename files/{assets/pcassets/js => }/demo-9.js (100%) rename files/{assets/pcassets/js/lib/echarts => }/echarts-all.js (100%) rename files/{assets/pcassets/js/lib/echarts/theme => }/echarts-theme.js (100%) rename files/{assets/pcassets/js/lib/echarts => }/echartsConfig.js (100%) rename files/{assets/pcassets/css => }/fakeLoader.css (100%) rename files/{assets/pcassets/js/lib => }/fakeLoader.js (100%) rename files/{assets/pcassets/css => }/flag-icon.min.css (100%) rename files/{assets/pcassets/css => }/font-awesome.min.css (100%) rename files/{assets/pcassets/css => }/fonts-face.css (100%) rename files/{assets/pcassets/js => }/horizontal-demo.js (100%) rename files/{assets/pcassets/css => }/ionicons.css (100%) rename files/{assets/pcassets/js => }/jquery.1.11.3.min.js (100%) rename files/{assets/pcassets/css => }/jquery.mCustomScrollbar.css (100%) rename files/{assets/pcassets/css => }/linearicons.css (100%) rename files/{assets/pcassets/js/lib/echarts => }/mdtStoreCharts.js (100%) rename files/{assets/pcassets/css => }/pcoded-horizontal.css (100%) rename files/{assets/pcassets/css => }/pcoded-horizontal.min.css (100%) rename files/{assets/pcassets/css => }/pcoded-vertical.css (100%) rename files/{assets/pcassets/css => }/pcoded-vertical.min.css (100%) rename files/{assets/pcassets/js => }/pcoded.js (100%) rename files/{assets/pcassets/js/lib/echarts => }/salesCharts.js (100%) rename files/{assets/pcassets/css => }/simple-line-icons.css (100%) rename files/{assets/pcassets/js/lib/echarts => }/skuCharts.js (100%) rename files/{assets/pcassets/js/lib => }/sparkline.min.js (100%) rename files/{assets/pcassets/js => }/vertical-demo.js (100%) diff --git a/files/assets/pcassets/js/lib/jquery.mCustomScrollbar.concat.min.js b/files/assets/pcassets/js/lib/jquery.mCustomScrollbar.concat.min.js deleted file mode 100644 index 61180865..00000000 --- a/files/assets/pcassets/js/lib/jquery.mCustomScrollbar.concat.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); -/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["
","
"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"
":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("
");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("
").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["","","",""],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r0&&cr?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]=0&&a[0]+e[1]a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){ -return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&a[0]+ae(n)[0]=0&&a[1]+ae(n)[1]=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}); \ No newline at end of file diff --git a/files/assets/pcassets/js/lib/jquery.mousewheel.min.js b/files/assets/pcassets/js/lib/jquery.mousewheel.min.js deleted file mode 100644 index 03bfd60c..00000000 --- a/files/assets/pcassets/js/lib/jquery.mousewheel.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * jQuery Mousewheel 3.1.13 - * - * Copyright 2015 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); \ No newline at end of file diff --git a/files/assets/pcassets/js/pcoded.min.js b/files/assets/pcassets/js/pcoded.min.js deleted file mode 100644 index 86920a08..00000000 --- a/files/assets/pcassets/js/pcoded.min.js +++ /dev/null @@ -1,1029 +0,0 @@ -$.fn.pcodedmenu = function( settings ) { - var oid = this.attr("id"); - // Pcoded Menu default settings: - var defaults = { - // Common option both for vertical nad horizontal - themelayout: 'vertical', // value should be horizontal/vertical - MenuTrigger: 'click', // value should be hover/click - SubMenuTrigger: 'click', // value should be hover/click - activeMenuClass: 'active', - ThemeBackgroundPattern: 'pattern6', // Value should be - HeaderBackground: 'theme4' , // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - LHeaderBackground :'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - NavbarBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - ActiveItemBackground: 'theme0', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - SubItemBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - ActiveItemStyle: 'style0', - ItemBorder: true, - ItemBorderStyle: 'solid', // value should be solid/dotted/dashed - SubItemBorder: true, - DropDownIconStyle: 'style1', // value should be style1,style2,style3 - FixedNavbarPosition: false, - FixedHeaderPosition: false, - - // Horizontal Navigation option - horizontalMenuplacement: 'top', // value should be top/bottom - horizontalMenulayout: 'widebox', //value should be wide/box/widebox - horizontalBrandItem: true, - horizontalLeftNavItem: true, - horizontalRightItem: false, - horizontalSearchItem: false, - horizontalBrandItemAlign: 'left', - horizontalLeftNavItemAlign: 'right', - horizontalRightItemAlign: 'right', - horizontalsearchItemAlign: 'right', - horizontalstickynavigation: false, - horizontalNavigationView: 'view1', - horizontalNavIsCentered: false, - horizontalNavigationMenuIcon: true, - - // Vertical Navigation option - verticalMenuplacement: 'left', // value should be left/right - verticalMenulayout: 'wide', // value should be wide/box/widebox - collapseVerticalLeftHeader: true, - VerticalSubMenuItemIconStyle: 'style6', // value should be style1,style2,style3 - VerticalNavigationView: 'view1', - verticalMenueffect:{ - desktop : "shrink", - tablet : "push", - phone : "overlay", - }, - defaultVerticalMenu: { - desktop : "expanded", // value should be offcanvas/collapsed/expanded/compact/compact-acc/fullpage/ex-popover/sub-expanded - tablet : "collapsed", // value should be offcanvas/collapsed/expanded/compact - phone : "offcanvas", // value should be offcanvas/collapsed/expanded/compact - }, - onToggleVerticalMenu : { - desktop : "collapsed", // value should be offcanvas/collapsed/expanded/compact - tablet : "expanded", // value should be offcanvas/collapsed/expanded/compact - phone : "expanded", // value should be offcanvas/collapsed/expanded/compact - }, - }; - var settings = $.extend( {}, defaults, settings ); - var PcodedMenu = { - PcodedMenuInit: function() { - PcodedMenu.Handlethemelayout(); - PcodedMenu.HandleverticalMenuplacement(); - PcodedMenu.HandlehorizontalMenuplacement(); - PcodedMenu.HandleMenulayout(); - PcodedMenu.HandleDeviceType(); - PcodedMenu.Handlecomponetheight(); - PcodedMenu.HandleMenuOnClick(); - PcodedMenu.HandleMenuTrigger(); - PcodedMenu.HandleSubMenuTrigger(); - PcodedMenu.HandleActiveItem(); - PcodedMenu.HandleOffcanvasMenu(); - PcodedMenu.HandleVerticalLeftHeader(); - PcodedMenu.HandleThemeBackground(); - PcodedMenu.HandleActiveItemStyle(); - PcodedMenu.HandleItemBorder (); - PcodedMenu.HandleBorderStyle (); - PcodedMenu.HandleSubItemBorder (); - PcodedMenu.HandleDropDownIconStyle (); - PcodedMenu.HandleOptionSelectorPanel (); - PcodedMenu.HandleNavbarPosition (); - PcodedMenu.HandleVerticalSubMenuItemIconStyle (); - PcodedMenu.HandleVerticalNavigationView (); - PcodedMenu.HandleHorizontalItemIsCentered(); - PcodedMenu.HandleHorizontalItemAlignment (); - PcodedMenu.HandleSubMenuOffset(); - PcodedMenu.HandleHorizontalStickyNavigation(); - PcodedMenu.HandleDocumentClickEvent(); - PcodedMenu.HandleVerticalScrollbar(); - PcodedMenu.HandleHorizontalMobileMenuToggle(); - PcodedMenu.horizontalNavigationMenuIcon(); - PcodedMenu.verticalNavigationSearchBar(); - PcodedMenu.safariBrowsercompatibility(); - - }, - safariBrowsercompatibility: function() { - is_chrome = navigator.userAgent.indexOf('Chrome') > -1; - is_explorer = navigator.userAgent.indexOf('MSIE') > -1; - is_firefox = navigator.userAgent.indexOf('Firefox') > -1; - is_safari = navigator.userAgent.indexOf("Safari") > -1; - is_opera = navigator.userAgent.indexOf("Presto") > -1; - is_mac = (navigator.userAgent.indexOf('Mac OS') != -1); - is_windows = !is_mac; - - if (is_chrome && is_safari){ - is_safari=false; - } - if (is_safari || is_windows){ - $('body').css('-webkit-text-stroke', '0.05px'); - $('body').css('-webkit-font-smoothing', 'antialiased'); - } - }, - - verticalNavigationSearchBar: function() { - if (settings.themelayout === "vertical"){ - $('.searchbar-toggle').on('click', function( ){ - $(this).parent('.pcoded-search').toggleClass('open'); - }); - } - }, - horizontalNavigationMenuIcon: function() { - if (settings.themelayout === "horizontal"){ - switch(settings.horizontalNavigationMenuIcon){ - case false: - $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item > li > a .pcoded-micon').hide(); - $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-search-item > li > a .pcoded-micon').show(); - break; - default: - } - } - }, - HandleHorizontalMobileMenuToggle: function() { - if (settings.themelayout === "horizontal"){ - $('.pcodedbrand-xs .menu-toggle a').on('click', function( ){ - $('.pcoded-navbar').toggleClass('show-menu') - }); - } - }, - - - HandleVerticalScrollbar: function() { - if (settings.themelayout === "vertical"){ - satnt = settings.defaultVerticalMenu.desktop; - if (satnt === "expanded" || satnt === "compact"){ - mt = settings.MenuTrigger; - if (mt === "click"){ - $(window).on("load",function(){ - $(".pcoded-navbar").mCustomScrollbar({ - axis:"y", - autoHideScrollbar: false, - scrollInertia: 100, - theme:"minimal", - }); - // $(".sidebar_toggle a").click(function(e){ - // e.preventDefault(); - // var $this=$(this); - // rel=$this.attr("rel"); - // el=$(".pcoded-navbar"); - // if(el.hasClass("mCS_destroyed")){ - // el.mCustomScrollbar({ - // axis:"y", - // autoHideScrollbar: false, - // scrollInertia: 100, - // theme:"minimal", - // }); - // }else{ - // el.mCustomScrollbar("destroy"); - // } - // }); - - }); - } - } - } - }, - - HandleDocumentClickEvent: function() { - function closeSubMenu() { - $(document).on('click', function(evt) { - var target = $(evt.target); - var sdt = $('#'+oid).attr('pcoded-device-type'); - var vnt = $('#'+oid).attr('vertical-nav-type'); - var el = $('#'+oid + ' .pcoded-item li'); - if (!target.parents('.pcoded-item').length) { - if( sdt != "phone"){ - if( vnt != "expanded"){ - el.removeClass('pcoded-trigger'); - } - } - } - }); - }; - function closeLeftbarSearch() { - $(document).on('click', function(evt) { - var target = $(evt.target); - var el = $('#'+oid + ' .pcoded-search'); - if (!target.parents('.pcoded-search').length) { - el.removeClass('open'); - } - - }); - }; - - closeSubMenu(); - closeLeftbarSearch(); - }, - - - - - HandleHorizontalStickyNavigation: function() { - switch(settings.horizontalstickynavigation){ - case true: - $(window).on('scroll',function() { - var scrolltop = $(this).scrollTop(); - - if(scrolltop >= 100) { - $('.pcoded-navbar').addClass('stickybar'); - $('stickybar').fadeIn(3000); - } - - else if(scrolltop <= 100) { - $('.pcoded-navbar').removeClass('stickybar') - $('.stickybar').fadeOut(3000); - } - }); - break; - case false: - $('.pcoded-navbar').removeClass('stickybar') - break; - default: - } - }, - HandleSubMenuOffset: function() { - switch(settings.themelayout){ - case 'horizontal': - var trigger = settings.SubMenuTrigger; - if(trigger === "hover" ) { - $("li.pcoded-hasmenu").on('mouseenter mouseleave', function (e) { - if ($('.pcoded-submenu', this).length) { - var elm = $('.pcoded-submenu:first', this); - var off = elm.offset(); - var l = off.left; - var w = elm.width(); - var docH = $( window ).height(); - var docW = $( window ).width(); - - var isEntirelyVisible = (l + w <= docW); - if (!isEntirelyVisible) { - $(this).addClass('edge'); - } else { - $(this).removeClass('edge'); - } - } - }); - } else { - $("li.pcoded-hasmenu").on('click', function (e) { - e.preventDefault(); - if ($('.pcoded-submenu', this).length) { - var elm = $('.pcoded-submenu:first', this); - var off = elm.offset(); - var l = off.left; - var w = elm.width(); - var docH = $( window ).height(); - var docW = $( window ).width(); - - var isEntirelyVisible = (l + w <= docW); - if (!isEntirelyVisible) { - $(this).toggleClass('edge'); - } - - } - }); - } - break; - default: - } - }, - HandleHorizontalItemIsCentered: function() { - if (settings.themelayout === "horizontal"){ - switch(settings.horizontalNavIsCentered){ - case true: - $('#'+oid + ' .pcoded-navbar').addClass("isCentered"); - break; - case false: - $('#'+oid + ' .pcoded-navbar').removeClass("isCentered"); - break; - default: - } - } - }, - HandleHorizontalItemAlignment: function() { - var layout = settings.themelayout; - if(layout === "horizontal" ) { - function branditemalignment() { - var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-brand'); - if (settings.horizontalBrandItem === true){ - - switch(settings.horizontalBrandItemAlign){ - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - }else { - elm.hide(); - } - }; - function leftitemalignment() { - var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-left-item'); - if (settings.horizontalLeftNavItem === true){ - switch(settings.horizontalLeftNavItemAlign){ - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - }else { - elm.hide(); - } - }; - function rightitemalignment() { - var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-right-item'); - if (settings.horizontalRightItem === true){ - switch(settings.horizontalRightItemAlign){ - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - }else{ - elm.hide(); - } - }; - function searchitemalignment() { - var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-search-item'); - if (settings.horizontalSearchItem === true){ - switch(settings.horizontalsearchItemAlign){ - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - }else { - elm.hide(); - } - }; - if (settings.horizontalNavIsCentered === false){ - branditemalignment(); - leftitemalignment(); - rightitemalignment(); - searchitemalignment(); - } - } - - - }, - HandleVerticalNavigationView: function() { - switch(settings.themelayout){ - case 'vertical': - var ev = settings.VerticalNavigationView; - $('#'+oid + '.pcoded').attr("vnavigation-view", ev ); - break; - case 'horizontal': - var ev = settings.horizontalNavigationView; - $('#'+oid + '.pcoded').attr("hnavigation-view", ev ); - break; - default: - } - }, - HandleVerticalSubMenuItemIconStyle: function() { - switch(settings.themelayout){ - case 'vertical': - var ev = settings.VerticalSubMenuItemIconStyle; - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev ); - break; - case 'horizontal': - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev ); - break; - default: - } - }, - HandleNavbarPosition: function() { - var navposition = settings.FixedNavbarPosition; - var headerposition = settings.FixedHeaderPosition; - var rheaderposition = settings.FixedRightHeaderPosition; - switch(settings.themelayout){ - case 'vertical': - if ( navposition == true){ - $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed' ); - $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed' ); - }else { - $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'absolute' ); - $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'absolute' ); - } - if ( headerposition == true){ - $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed' ); - $('#'+oid + ' .pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight()); - - }else { - $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'relative' ); - $('#'+oid + ' .pcoded-main-container').css('margin-top', '0px'); - } - break; - case 'horizontal': - if ( navposition == true){ - $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed' ); - $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed' ); - $('#'+oid + ' .pcoded-navbar').css('margin-top', $(".pcoded-header").outerHeight()); - }else{ - $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", ' ' ); - $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'relative' ); - $('#'+oid + ' .pcoded-navbar').css('margin-top', '0px'); - } - break; - default: - } - }, - HandleOptionSelectorPanel: function() { - $('.selector-toggle > a').on("click", function() { - $('#styleSelector').toggleClass('open') - }); - - }, - HandleDropDownIconStyle: function() { - var ev = settings.DropDownIconStyle; - switch(settings.themelayout){ - case 'vertical': - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev ); - break; - case 'horizontal': - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev ); - break; - default: - } - }, - HandleSubItemBorder: function() { - switch(settings.SubItemBorder){ - case true: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border","true" ); - break; - case false: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border","false" ); - break; - default: - } - }, - HandleBorderStyle: function() { - var ev = settings.ItemBorderStyle; - switch(settings.ItemBorder){ - case true: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", ev ); - break; - case false: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", "" ); - break; - default: - } - }, - HandleItemBorder: function() { - switch(settings.ItemBorder){ - case true: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border","true" ); - break; - case false: - $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border","false" ); - break; - default: - } - }, - HandleActiveItemStyle: function() { - var ev = settings.ActiveItemStyle; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-navbar').attr("active-item-style", ev); - } else { - $('#'+oid + ' .pcoded-navbar').attr("active-item-style", "style0"); - } - }, - HandleThemeBackground: function() { - function themebackgroundpattern() { - var ev = settings.ThemeBackgroundPattern; - if(ev != undefined && ev != "") { - $('body').attr("themebg-pattern", ev); - } else { - $('body').attr("themebg-pattern", "pattern1"); - } - }; - function setheadertheme() { - var ev = settings.HeaderBackground; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-header').attr("header-theme", ev); - } else { - $('#'+oid + ' .pcoded-header').attr("header-theme", "theme1"); - } - }; - function setlheadertheme() { - var ev = settings.LHeaderBackground; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("lheader-theme", ev); - } else { - $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("lheader-theme", "theme1"); - } - }; - function setnavbartheme() { - var ev = settings.NavbarBackground; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-navbar').attr("navbar-theme", ev); - } else { - $('#'+oid + ' .pcoded-navbar').attr("navbar-theme", "theme1"); - } - }; - function setactiveitemtheme() { - var ev = settings.ActiveItemBackground; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-navbar').attr("active-item-theme", ev); - } else { - $('#'+oid + ' .pcoded-navbar').attr("active-item-theme", "theme1"); - } - }; - function setsubitemtheme() { - var ev = settings.SubItemBackground; - if(ev != undefined && ev != "") { - $('#'+oid + ' .pcoded-navbar').attr("sub-item-theme", ev); - } else { - $('#'+oid + ' .pcoded-navbar').attr("sub-item-theme", "theme1"); - } - }; - themebackgroundpattern(); - setheadertheme(); - setlheadertheme(); - setnavbartheme(); - setactiveitemtheme(); - setsubitemtheme(); - - }, - HandleVerticalLeftHeader: function() { - if (settings.themelayout === "vertical" ) { - switch(settings.collapseVerticalLeftHeader){ - case true: - $('#'+oid + ' .pcoded-header').addClass('iscollapsed'); - $('#'+oid + ' .pcoded-header').removeClass('nocollapsed'); - $('#'+oid + '.pcoded').addClass('iscollapsed'); - $('#'+oid + '.pcoded').removeClass('nocollapsed'); - - /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', ''); */ - break; - case false: - $('#'+oid + ' .pcoded-header').removeClass('iscollapsed'); - $('#'+oid + ' .pcoded-header').addClass('nocollapsed'); - $('#'+oid + '.pcoded').removeClass('iscollapsed'); - $('#'+oid + '.pcoded').addClass('nocollapsed'); - /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', $(".pcoded-navbar").width()); */ - break; - default: - } - }else { - return false; - } - }, - HandleOffcanvasMenu: function() { - if (settings.themelayout === "vertical" ) { - var vnt = $('#'+oid).attr("vertical-nav-type"); - if ( vnt == "offcanvas" ){ - $('#'+oid).attr("vertical-layout", "wide" ); - } - } - }, - HandleActiveItem: function() { - switch(settings.activeMenuClass){ - case "active": - $('li:not("li.pcoded-hasmenu")').on( 'click', function () { - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0){ - $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); - $(this).addClass('active'); - - }else{ - if($(this).hasClass('active')){ - $(this).removeClass('active'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); - $(this).parents('.pcoded-hasmenu').addClass('active'); - $(this).addClass('active'); - } - } - }); - break; - case false: - $('.pcoded-header').removeClass(settings.navbbgclass); - break; - default: - } - }, - HandleSubMenuTrigger: function(){ - switch(settings.SubMenuTrigger){ - case 'hover': - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').addClass('is-hover'); - // Initialize - var $window = $(window); - var $dropdown = $('.pcoded-submenu > li'); - var currentSize = $window.width(); - var currentEvent = ''; - // Attach current event on load - (currentSize >= 767) ? bindTwo('hover') : bindTwo('click'); - // Atach window resize event - $window.resize(function() { - // get windows new size - var newSize = $window.width(); - // Exit if size is same - if (currentSize == newSize) { - return; - } - // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events - if (newSize >= 767 && currentEvent != 'hover') { - bindTwo('hover'); - } else if (newSize < 767 && currentEvent != 'click') { - bindTwo('click'); - } - - // Update new size - currentSize = newSize; - }); - function bindTwo (eventType) { - if (eventType == 'hover') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('click').off('mouseenter mouseleave').hover( - function() { - $(this).addClass('pcoded-trigger'); - }, - function() { - $(this).removeClass('pcoded-trigger'); - } - ); - } - else if (eventType == 'click') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('mouseenter mouseleave').off('click').on('click', - function(e) { - e.stopPropagation(); - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0){ - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - }else{ - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - } - ); - } - } - break; - case 'click': - $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').removeClass('is-hover'); - $(".pcoded-submenu > li").on( 'click', function (e) { - e.stopPropagation(); - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0){ - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - }else{ - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - }); - break; - } - }, - HandleMenuTrigger: function(){ - - switch(settings.MenuTrigger){ - case 'hover': - $('#'+oid + ' .pcoded-navbar').addClass('is-hover'); - // Initialize - var $window = $(window); - var $dropdown = $(".pcoded-item > li"); - var currentSize = $window.width(); - var currentEvent = ''; - // Attach current event on load - (currentSize >= 767) ? bindOne('hover') : bindOne('click'); - // Atach window resize event - $window.resize(function() { - // get windows new size - var newSize = $window.width(); - // Exit if size is same - if (currentSize == newSize) { - return; - } - // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events - if (newSize >= 767 && currentEvent != 'hover') { - bindOne('hover'); - } else if (newSize < 767 && currentEvent != 'click') { - bindOne('click'); - } - - // Update new size - currentSize = newSize; - }); - function bindOne (eventType) { - if (eventType == 'hover') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('click').off('mouseenter mouseleave').hover( - function() { - $(this).addClass('pcoded-trigger'); - }, - function() { - $(this).removeClass('pcoded-trigger'); - } - ); - } - else if (eventType == 'click') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('mouseenter mouseleave').off('click').on('click', - function() { - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - ); - } - } - break; - case 'click': - $('#'+oid + ' .pcoded-navbar').removeClass('is-hover'); - $(".pcoded-item > li ").on( 'click', function () { - if($(this).hasClass('pcoded-trigger')){ - $(this).removeClass('pcoded-trigger'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - - }); - break; - } - }, - HandleMenuOnClick: function() { - var totalwidth = $(window)[0].innerWidth; - if (settings.themelayout === "vertical" ) { - $('#mobile-collapse,.sidebar_toggle a, .pcoded-overlay-box').on("click", function() { - $(this).parent().find('.menu-icon').toggleClass("is-clicked"); - var dt = $('#'+oid).attr("pcoded-device-type"); - console.log('-->'+ dt); - if ( dt == "desktop" ){ - var dmc = settings.onToggleVerticalMenu.desktop; - var dm = settings.defaultVerticalMenu.desktop; - var dn = $('#'+oid).attr("vertical-nav-type"); - if ( dn == dm ) { - $('#'+oid).attr("vertical-nav-type", dmc); - }else if (dn == dmc ) { - $('#'+oid).attr("vertical-nav-type", dm); - } else { - return false; - } - }else if ( dt == "tablet"){ - var tmc = settings.onToggleVerticalMenu.tablet; - var tm = settings.defaultVerticalMenu.tablet; - var tn = $('#'+oid).attr("vertical-nav-type"); - if ( tn == tm ) { - $('#'+oid).attr("vertical-nav-type", tmc); - }else if (dn == dmc ) { - $('#'+oid).attr("vertical-nav-type", tm); - } - }else if ( dt == "phone"){ - var pmc = settings.onToggleVerticalMenu.phone; - var pm = settings.defaultVerticalMenu.phone; - var pn = $('#'+oid).attr("vertical-nav-type"); - if ( pn == pm ) { - $('#'+oid).attr("vertical-nav-type", pmc); - }else if (dn == dmc ) { - $('#'+oid).attr("vertical-nav-type", pm); - } - } - $('.pcoded').addClass("pcoded-toggle-animate"); - setTimeout(function(){ - $('.pcoded').removeClass("pcoded-toggle-animate"); - }, 250); - }); - }else if (settings.themelayout === "horizontal" ) { - if (totalwidth >= 768 && totalwidth <= 1024) { - $('#'+oid).attr("pcoded-device-type", "tablet"); - } else if (totalwidth < 768) { - $('#'+oid).attr("pcoded-device-type", "phone"); - } else { - $('#'+oid).attr("pcoded-device-type", "desktop"); - } - } - }, - Handlecomponetheight: function() { - function setHeight() { - var WH = $(window).height(); - var HH = $(".pcoded-header").innerHeight(); - var NH = $(".pcoded-navbar").innerHeight(); - var FH = $(".pcoded-footer").innerHeight(); - var contentHH = WH - HH; - var contentVH = WH - HH ; - var lpanelH = WH - HH ; - if (settings.themelayout === "horizontal" ) { - $(".pcoded-main-container").css('min-height', contentHH); - } else if (settings.themelayout === "vertical" ) { - if ( contentVH >= lpanelH ){ - $(".pcoded-main-container").css('min-height', contentVH); - }else { - $(".pcoded-main-container").css('min-height', lpanelH); - } - } else { - return false; - } - }; - setHeight(); - - $(window).resize(function() { - setHeight(); - }); - - }, - HandleDeviceType: function() { - function devicesize() { - var totalwidth = $(window)[0].innerWidth; - if (settings.themelayout === "vertical" ) { - if (totalwidth >= 768 && totalwidth <= 1024) { - - $('#'+oid).attr("pcoded-device-type", "tablet"); - var value = settings.defaultVerticalMenu.tablet; - if(value != undefined && value != "") { - $('#'+oid).attr("vertical-nav-type", value); - } else { - $('#'+oid).attr("vertical-nav-type", "collapsed"); - } - - var ev = settings.verticalMenueffect.tablet; - if(ev != undefined && value != "") { - $('#'+oid).attr("vertical-effect", ev); - } else { - $('#'+oid).attr("vertical-effect", "shrink"); - } - - } else if (totalwidth < 768) { - - $('#'+oid).attr("pcoded-device-type", "phone"); - - var value = settings.defaultVerticalMenu.phone; - if(value != undefined && value != "") { - $('#'+oid).attr("vertical-nav-type", value); - } else { - $('#'+oid).attr("vertical-nav-type", "offcanvas"); - } - - var ev = settings.verticalMenueffect.phone; - if(ev != undefined && value != "") { - $('#'+oid).attr("vertical-effect", ev); - } else { - $('#'+oid).attr("vertical-effect", "push"); - } - - } else { - $('#'+oid).attr("pcoded-device-type", "desktop"); - var value = settings.defaultVerticalMenu.desktop; - if(value != undefined && value != "") { - $('#'+oid).attr("vertical-nav-type", value); - } else { - $('#'+oid).attr("vertical-nav-type", "expanded"); - } - - var ev = settings.verticalMenueffect.desktop; - if(ev != undefined && value != "") { - $('#'+oid).attr("vertical-effect", ev); - } else { - $('#'+oid).attr("vertical-effect", "shrink"); - } - - } - }else if (settings.themelayout === "horizontal" ) { - if (totalwidth >= 768 && totalwidth <= 1024) { - $('#'+oid).attr("pcoded-device-type", "tablet"); - } else if (totalwidth < 768) { - $('#'+oid).attr("pcoded-device-type", "phone"); - } else { - $('#'+oid).attr("pcoded-device-type", "desktop"); - } - - } - }; - devicesize(); - - $(window).resize(function() { - tw = $(window)[0].innerWidth; - dt = $('#'+oid).attr('pcoded-device-type') - if ( dt == 'desktop' && tw < 1024 ) { - devicesize(); - } else if ( dt == 'phone' && tw > 768 ) { - devicesize(); - } else if ( dt == 'tablet' && tw < 768 ) { - devicesize(); - }else if ( dt == 'tablet' && tw > 1024 ) { - devicesize(); - } - }); - }, - HandleMenulayout: function() { - if (settings.themelayout === "vertical" ) { - switch(settings.verticalMenulayout){ - case 'wide': - $('#'+oid).attr("vertical-layout","wide" ); - break; - case 'box': - $('#'+oid).attr("vertical-layout","box" ); - break; - case 'widebox': - $('#'+oid).attr("vertical-layout","widebox" ); - break; - default: - } - } - else if (settings.themelayout === "horizontal" ) { - switch(settings.horizontalMenulayout){ - case 'wide': - $('#'+oid).attr("horizontal-layout","wide" ); - break; - case 'box': - $('#'+oid).attr("horizontal-layout","box" ); - break; - case 'widebox': - $('#'+oid).attr("horizontal-layout","widebox" ); - break; - default: - } - } - else { - return false; - } - - }, - HandlehorizontalMenuplacement: function() { - if (settings.themelayout === "horizontal" ) { - switch(settings.horizontalMenuplacement){ - case 'bottom': - $('#'+oid).attr("horizontal-placement","bottom" ); - break; - case 'top': - $('#'+oid).attr("horizontal-placement","top" ); - break; - default: - } - } - else { - $('#'+oid).removeAttr("horizontal-placement"); - } - }, - HandleverticalMenuplacement: function() { - if (settings.themelayout === "vertical" ) { - switch(settings.verticalMenuplacement){ - case 'left': - $('#'+oid).attr("vertical-placement","left" ); - break; - case 'right': - $('#'+oid).attr("vertical-placement","right" ); - break; - default: - } - } - else { - $('#'+oid).removeAttr("vertical-placement"); - } - }, - Handlethemelayout: function() { - switch(settings.themelayout){ - case 'horizontal': - $('#'+oid).attr("theme-layout","horizontal" ); - break; - case 'vertical': - $('#'+oid).attr("theme-layout","vertical" ); - break; - default: - } - }, - }; - PcodedMenu.PcodedMenuInit(); -}; diff --git a/files/assets/pcassets/css/bootstrap.css b/files/bootstrap.css similarity index 100% rename from files/assets/pcassets/css/bootstrap.css rename to files/bootstrap.css diff --git a/files/assets/pcassets/css/bootstrap.min.css b/files/bootstrap.min.css similarity index 100% rename from files/assets/pcassets/css/bootstrap.min.css rename to files/bootstrap.min.css diff --git a/files/assets/pcassets/js/bootstrap.min.js b/files/bootstrap.min.js similarity index 100% rename from files/assets/pcassets/js/bootstrap.min.js rename to files/bootstrap.min.js diff --git a/files/assets/pcassets/js/lib/echarts/customerConversionCharts.js b/files/customerConversionCharts.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/customerConversionCharts.js rename to files/customerConversionCharts.js diff --git a/files/assets/pcassets/js/demo-1.js b/files/demo-1.js similarity index 100% rename from files/assets/pcassets/js/demo-1.js rename to files/demo-1.js diff --git a/files/assets/pcassets/js/demo-10.js b/files/demo-10.js similarity index 100% rename from files/assets/pcassets/js/demo-10.js rename to files/demo-10.js diff --git a/files/assets/pcassets/js/demo-11.js b/files/demo-11.js similarity index 100% rename from files/assets/pcassets/js/demo-11.js rename to files/demo-11.js diff --git a/files/assets/pcassets/js/demo-12.js b/files/demo-12.js similarity index 100% rename from files/assets/pcassets/js/demo-12.js rename to files/demo-12.js diff --git a/files/assets/pcassets/js/demo-13.js b/files/demo-13.js similarity index 100% rename from files/assets/pcassets/js/demo-13.js rename to files/demo-13.js diff --git a/files/assets/pcassets/js/demo-14.js b/files/demo-14.js similarity index 100% rename from files/assets/pcassets/js/demo-14.js rename to files/demo-14.js diff --git a/files/assets/pcassets/js/demo-15.js b/files/demo-15.js similarity index 100% rename from files/assets/pcassets/js/demo-15.js rename to files/demo-15.js diff --git a/files/assets/pcassets/js/demo-16.js b/files/demo-16.js similarity index 100% rename from files/assets/pcassets/js/demo-16.js rename to files/demo-16.js diff --git a/files/assets/pcassets/js/demo-17.js b/files/demo-17.js similarity index 100% rename from files/assets/pcassets/js/demo-17.js rename to files/demo-17.js diff --git a/files/assets/pcassets/js/demo-18.js b/files/demo-18.js similarity index 100% rename from files/assets/pcassets/js/demo-18.js rename to files/demo-18.js diff --git a/files/assets/pcassets/js/demo-19.js b/files/demo-19.js similarity index 100% rename from files/assets/pcassets/js/demo-19.js rename to files/demo-19.js diff --git a/files/assets/pcassets/js/demo-2.js b/files/demo-2.js similarity index 100% rename from files/assets/pcassets/js/demo-2.js rename to files/demo-2.js diff --git a/files/assets/pcassets/js/demo-20.js b/files/demo-20.js similarity index 100% rename from files/assets/pcassets/js/demo-20.js rename to files/demo-20.js diff --git a/files/assets/pcassets/js/demo-21.js b/files/demo-21.js similarity index 100% rename from files/assets/pcassets/js/demo-21.js rename to files/demo-21.js diff --git a/files/assets/pcassets/js/demo-22.js b/files/demo-22.js similarity index 100% rename from files/assets/pcassets/js/demo-22.js rename to files/demo-22.js diff --git a/files/assets/pcassets/js/demo-23.js b/files/demo-23.js similarity index 100% rename from files/assets/pcassets/js/demo-23.js rename to files/demo-23.js diff --git a/files/assets/pcassets/js/demo-24.js b/files/demo-24.js similarity index 100% rename from files/assets/pcassets/js/demo-24.js rename to files/demo-24.js diff --git a/files/assets/pcassets/js/demo-25.js b/files/demo-25.js similarity index 100% rename from files/assets/pcassets/js/demo-25.js rename to files/demo-25.js diff --git a/files/assets/pcassets/js/demo-3.js b/files/demo-3.js similarity index 100% rename from files/assets/pcassets/js/demo-3.js rename to files/demo-3.js diff --git a/files/assets/pcassets/js/demo-4.js b/files/demo-4.js similarity index 100% rename from files/assets/pcassets/js/demo-4.js rename to files/demo-4.js diff --git a/files/assets/pcassets/js/demo-5.js b/files/demo-5.js similarity index 100% rename from files/assets/pcassets/js/demo-5.js rename to files/demo-5.js diff --git a/files/assets/pcassets/js/demo-6.js b/files/demo-6.js similarity index 100% rename from files/assets/pcassets/js/demo-6.js rename to files/demo-6.js diff --git a/files/assets/pcassets/js/demo-7.js b/files/demo-7.js similarity index 100% rename from files/assets/pcassets/js/demo-7.js rename to files/demo-7.js diff --git a/files/assets/pcassets/js/demo-8.js b/files/demo-8.js similarity index 100% rename from files/assets/pcassets/js/demo-8.js rename to files/demo-8.js diff --git a/files/assets/pcassets/js/demo-9.js b/files/demo-9.js similarity index 100% rename from files/assets/pcassets/js/demo-9.js rename to files/demo-9.js diff --git a/files/assets/pcassets/js/lib/echarts/echarts-all.js b/files/echarts-all.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/echarts-all.js rename to files/echarts-all.js diff --git a/files/assets/pcassets/js/lib/echarts/theme/echarts-theme.js b/files/echarts-theme.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/theme/echarts-theme.js rename to files/echarts-theme.js diff --git a/files/assets/pcassets/js/lib/echarts/echartsConfig.js b/files/echartsConfig.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/echartsConfig.js rename to files/echartsConfig.js diff --git a/files/assets/pcassets/css/fakeLoader.css b/files/fakeLoader.css similarity index 100% rename from files/assets/pcassets/css/fakeLoader.css rename to files/fakeLoader.css diff --git a/files/assets/pcassets/js/lib/fakeLoader.js b/files/fakeLoader.js similarity index 100% rename from files/assets/pcassets/js/lib/fakeLoader.js rename to files/fakeLoader.js diff --git a/files/assets/pcassets/css/flag-icon.min.css b/files/flag-icon.min.css similarity index 100% rename from files/assets/pcassets/css/flag-icon.min.css rename to files/flag-icon.min.css diff --git a/files/assets/pcassets/css/font-awesome.min.css b/files/font-awesome.min.css similarity index 100% rename from files/assets/pcassets/css/font-awesome.min.css rename to files/font-awesome.min.css diff --git a/files/assets/pcassets/css/fonts-face.css b/files/fonts-face.css similarity index 100% rename from files/assets/pcassets/css/fonts-face.css rename to files/fonts-face.css diff --git a/files/assets/pcassets/js/horizontal-demo.js b/files/horizontal-demo.js similarity index 100% rename from files/assets/pcassets/js/horizontal-demo.js rename to files/horizontal-demo.js diff --git a/files/assets/pcassets/css/ionicons.css b/files/ionicons.css similarity index 100% rename from files/assets/pcassets/css/ionicons.css rename to files/ionicons.css diff --git a/files/assets/pcassets/js/jquery.1.11.3.min.js b/files/jquery.1.11.3.min.js similarity index 100% rename from files/assets/pcassets/js/jquery.1.11.3.min.js rename to files/jquery.1.11.3.min.js diff --git a/files/assets/pcassets/css/jquery.mCustomScrollbar.css b/files/jquery.mCustomScrollbar.css similarity index 100% rename from files/assets/pcassets/css/jquery.mCustomScrollbar.css rename to files/jquery.mCustomScrollbar.css diff --git a/files/assets/pcassets/css/linearicons.css b/files/linearicons.css similarity index 100% rename from files/assets/pcassets/css/linearicons.css rename to files/linearicons.css diff --git a/files/assets/pcassets/js/lib/echarts/mdtStoreCharts.js b/files/mdtStoreCharts.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/mdtStoreCharts.js rename to files/mdtStoreCharts.js diff --git a/files/assets/pcassets/css/pcoded-horizontal.css b/files/pcoded-horizontal.css similarity index 100% rename from files/assets/pcassets/css/pcoded-horizontal.css rename to files/pcoded-horizontal.css diff --git a/files/assets/pcassets/css/pcoded-horizontal.min.css b/files/pcoded-horizontal.min.css similarity index 100% rename from files/assets/pcassets/css/pcoded-horizontal.min.css rename to files/pcoded-horizontal.min.css diff --git a/files/assets/pcassets/css/pcoded-vertical.css b/files/pcoded-vertical.css similarity index 100% rename from files/assets/pcassets/css/pcoded-vertical.css rename to files/pcoded-vertical.css diff --git a/files/assets/pcassets/css/pcoded-vertical.min.css b/files/pcoded-vertical.min.css similarity index 100% rename from files/assets/pcassets/css/pcoded-vertical.min.css rename to files/pcoded-vertical.min.css diff --git a/files/assets/pcassets/js/pcoded.js b/files/pcoded.js similarity index 100% rename from files/assets/pcassets/js/pcoded.js rename to files/pcoded.js diff --git a/files/pcoded.min.js b/files/pcoded.min.js index 93afb6c2..86920a08 100644 --- a/files/pcoded.min.js +++ b/files/pcoded.min.js @@ -1,1095 +1,1029 @@ -"use strict"; -$.fn.pcodedmenu = function(settings) { - var oid = this.attr("id"); +$.fn.pcodedmenu = function( settings ) { + var oid = this.attr("id"); // Pcoded Menu default settings: var defaults = { - // Common option both for vertical nad horizontal - themelayout: 'vertical', // value should be horizontal/vertical - MenuTrigger: 'click', // value should be hover/click - SubMenuTrigger: 'click', // value should be hover/click - activeMenuClass: 'active', - ThemeBackgroundPattern: 'pattern6', // Value should be - HeaderBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - LHeaderBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - NavbarBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - ActiveItemBackground: 'theme0', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - SubItemBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 - ActiveItemStyle: 'style0', - ItemBorder: true, - ItemBorderStyle: 'solid', // value should be solid/dotted/dashed - SubItemBorder: true, - DropDownIconStyle: 'style1', // value should be style1,style2,style3 - FixedNavbarPosition: false, - FixedHeaderPosition: false, + // Common option both for vertical nad horizontal + themelayout: 'vertical', // value should be horizontal/vertical + MenuTrigger: 'click', // value should be hover/click + SubMenuTrigger: 'click', // value should be hover/click + activeMenuClass: 'active', + ThemeBackgroundPattern: 'pattern6', // Value should be + HeaderBackground: 'theme4' , // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 + LHeaderBackground :'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 + NavbarBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 + ActiveItemBackground: 'theme0', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 + SubItemBackground: 'theme4', // Value should be theme1/theme2/theme3/theme4/theme5/theme6/theme7/theme8/theme9 + ActiveItemStyle: 'style0', + ItemBorder: true, + ItemBorderStyle: 'solid', // value should be solid/dotted/dashed + SubItemBorder: true, + DropDownIconStyle: 'style1', // value should be style1,style2,style3 + FixedNavbarPosition: false, + FixedHeaderPosition: false, - // Horizontal Navigation option - horizontalMenuplacement: 'top', // value should be top/bottom - horizontalMenulayout: 'widebox', //value should be wide/box/widebox - horizontalBrandItem: true, - horizontalLeftNavItem: true, - horizontalRightItem: false, - horizontalSearchItem: false, - horizontalBrandItemAlign: 'left', - horizontalLeftNavItemAlign: 'right', - horizontalRightItemAlign: 'right', - horizontalsearchItemAlign: 'right', - horizontalstickynavigation: false, - horizontalNavigationView: 'view1', - horizontalNavIsCentered: false, - horizontalNavigationMenuIcon: true, - layouttype:'light', - // Vertical Navigation option - verticalMenuplacement: 'left', // value should be left/right - verticalMenulayout: 'wide', // value should be wide/box/widebox - collapseVerticalLeftHeader: true, - VerticalSubMenuItemIconStyle: 'style6', // value should be style1,style2,style3 - VerticalNavigationView: 'view1', - verticalMenueffect: { - desktop: "shrink", - tablet: "push", - phone: "overlay", - }, - defaultVerticalMenu: { - desktop: "expanded", // value should be offcanvas/collapsed/expanded/compact/compact-acc/fullpage/ex-popover/sub-expanded - tablet: "collapsed", // value should be offcanvas/collapsed/expanded/compact - phone: "offcanvas", // value should be offcanvas/collapsed/expanded/compact - }, - onToggleVerticalMenu: { - desktop: "collapsed", // value should be offcanvas/collapsed/expanded/compact - tablet: "expanded", // value should be offcanvas/collapsed/expanded/compact - phone: "expanded", // value should be offcanvas/collapsed/expanded/compact - }, + // Horizontal Navigation option + horizontalMenuplacement: 'top', // value should be top/bottom + horizontalMenulayout: 'widebox', //value should be wide/box/widebox + horizontalBrandItem: true, + horizontalLeftNavItem: true, + horizontalRightItem: false, + horizontalSearchItem: false, + horizontalBrandItemAlign: 'left', + horizontalLeftNavItemAlign: 'right', + horizontalRightItemAlign: 'right', + horizontalsearchItemAlign: 'right', + horizontalstickynavigation: false, + horizontalNavigationView: 'view1', + horizontalNavIsCentered: false, + horizontalNavigationMenuIcon: true, + + // Vertical Navigation option + verticalMenuplacement: 'left', // value should be left/right + verticalMenulayout: 'wide', // value should be wide/box/widebox + collapseVerticalLeftHeader: true, + VerticalSubMenuItemIconStyle: 'style6', // value should be style1,style2,style3 + VerticalNavigationView: 'view1', + verticalMenueffect:{ + desktop : "shrink", + tablet : "push", + phone : "overlay", + }, + defaultVerticalMenu: { + desktop : "expanded", // value should be offcanvas/collapsed/expanded/compact/compact-acc/fullpage/ex-popover/sub-expanded + tablet : "collapsed", // value should be offcanvas/collapsed/expanded/compact + phone : "offcanvas", // value should be offcanvas/collapsed/expanded/compact + }, + onToggleVerticalMenu : { + desktop : "collapsed", // value should be offcanvas/collapsed/expanded/compact + tablet : "expanded", // value should be offcanvas/collapsed/expanded/compact + phone : "expanded", // value should be offcanvas/collapsed/expanded/compact + }, }; - var satnt,mt,tw,dt,is_chrome,is_explorer ,is_firefox,is_safari,is_opera,is_mac,is_windows; - var settings = $.extend({}, defaults, settings); - var PcodedMenu = { + var settings = $.extend( {}, defaults, settings ); + var PcodedMenu = { PcodedMenuInit: function() { - PcodedMenu.Handlethemelayout(); - PcodedMenu.HandleverticalMenuplacement(); - PcodedMenu.HandlehorizontalMenuplacement(); - PcodedMenu.HandleMenulayout(); - PcodedMenu.HandleDeviceType(); - PcodedMenu.Handlecomponetheight(); - PcodedMenu.HandleMenuOnClick(); - PcodedMenu.HandleMenuTrigger(); - PcodedMenu.HandleSubMenuTrigger(); - PcodedMenu.HandleActiveItem(); - PcodedMenu.HandleOffcanvasMenu(); - PcodedMenu.HandleVerticalLeftHeader(); - PcodedMenu.HandleThemeBackground(); - PcodedMenu.HandleActiveItemStyle(); - PcodedMenu.HandleItemBorder(); - PcodedMenu.HandleBorderStyle(); - PcodedMenu.HandleSubItemBorder(); - PcodedMenu.HandleDropDownIconStyle(); - PcodedMenu.HandleOptionSelectorPanel(); - PcodedMenu.HandleNavbarPosition(); - PcodedMenu.HandleVerticalSubMenuItemIconStyle(); - PcodedMenu.HandleVerticalNavigationView(); - PcodedMenu.HandleHorizontalItemIsCentered(); - PcodedMenu.HandleHorizontalItemAlignment(); - PcodedMenu.HandleSubMenuOffset(); - PcodedMenu.HandleHorizontalStickyNavigation(); - PcodedMenu.HandleDocumentClickEvent(); - PcodedMenu.HandleVerticalScrollbar(); - PcodedMenu.HandleHorizontalMobileMenuToggle(); - PcodedMenu.horizontalNavigationMenuIcon(); - PcodedMenu.verticalNavigationSearchBar(); - PcodedMenu.safariBrowsercompatibility(); - PcodedMenu.Handlemenutype(); - PcodedMenu.Handlelayoutvartype(); - }, - safariBrowsercompatibility: function() { - is_chrome = navigator.userAgent.indexOf('Chrome') > -1; - is_explorer = navigator.userAgent.indexOf('MSIE') > -1; - is_firefox = navigator.userAgent.indexOf('Firefox') > -1; - is_safari = navigator.userAgent.indexOf("Safari") > -1; - is_opera = navigator.userAgent.indexOf("Presto") > -1; - is_mac = (navigator.userAgent.indexOf('Mac OS') != -1); - is_windows = !is_mac; + PcodedMenu.Handlethemelayout(); + PcodedMenu.HandleverticalMenuplacement(); + PcodedMenu.HandlehorizontalMenuplacement(); + PcodedMenu.HandleMenulayout(); + PcodedMenu.HandleDeviceType(); + PcodedMenu.Handlecomponetheight(); + PcodedMenu.HandleMenuOnClick(); + PcodedMenu.HandleMenuTrigger(); + PcodedMenu.HandleSubMenuTrigger(); + PcodedMenu.HandleActiveItem(); + PcodedMenu.HandleOffcanvasMenu(); + PcodedMenu.HandleVerticalLeftHeader(); + PcodedMenu.HandleThemeBackground(); + PcodedMenu.HandleActiveItemStyle(); + PcodedMenu.HandleItemBorder (); + PcodedMenu.HandleBorderStyle (); + PcodedMenu.HandleSubItemBorder (); + PcodedMenu.HandleDropDownIconStyle (); + PcodedMenu.HandleOptionSelectorPanel (); + PcodedMenu.HandleNavbarPosition (); + PcodedMenu.HandleVerticalSubMenuItemIconStyle (); + PcodedMenu.HandleVerticalNavigationView (); + PcodedMenu.HandleHorizontalItemIsCentered(); + PcodedMenu.HandleHorizontalItemAlignment (); + PcodedMenu.HandleSubMenuOffset(); + PcodedMenu.HandleHorizontalStickyNavigation(); + PcodedMenu.HandleDocumentClickEvent(); + PcodedMenu.HandleVerticalScrollbar(); + PcodedMenu.HandleHorizontalMobileMenuToggle(); + PcodedMenu.horizontalNavigationMenuIcon(); + PcodedMenu.verticalNavigationSearchBar(); + PcodedMenu.safariBrowsercompatibility(); - if (is_chrome && is_safari) { - is_safari = false; - } - if (is_safari || is_windows) {} }, + safariBrowsercompatibility: function() { + is_chrome = navigator.userAgent.indexOf('Chrome') > -1; + is_explorer = navigator.userAgent.indexOf('MSIE') > -1; + is_firefox = navigator.userAgent.indexOf('Firefox') > -1; + is_safari = navigator.userAgent.indexOf("Safari") > -1; + is_opera = navigator.userAgent.indexOf("Presto") > -1; + is_mac = (navigator.userAgent.indexOf('Mac OS') != -1); + is_windows = !is_mac; - verticalNavigationSearchBar: function() { - if (settings.themelayout === "vertical") { - $('.searchbar-toggle').on('click', function() { - $(this).parent('.pcoded-search').toggleClass('open'); - }); - } - }, - horizontalNavigationMenuIcon: function() { - if (settings.themelayout === "horizontal") { - switch (settings.horizontalNavigationMenuIcon) { - case false: - $('#' + oid + '.pcoded .pcoded-navbar .pcoded-item > li > a .pcoded-micon').hide(); - $('#' + oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-search-item > li > a .pcoded-micon').show(); - break; - default: - } - } - }, - HandleHorizontalMobileMenuToggle: function() { - if (settings.themelayout === "horizontal") { - $('#mobile-collapse').on('click', function() { - $('.pcoded-navbar').toggleClass('show-menu') - }); - } - }, + if (is_chrome && is_safari){ + is_safari=false; + } + if (is_safari || is_windows){ + $('body').css('-webkit-text-stroke', '0.05px'); + $('body').css('-webkit-font-smoothing', 'antialiased'); + } + }, + verticalNavigationSearchBar: function() { + if (settings.themelayout === "vertical"){ + $('.searchbar-toggle').on('click', function( ){ + $(this).parent('.pcoded-search').toggleClass('open'); + }); + } + }, + horizontalNavigationMenuIcon: function() { + if (settings.themelayout === "horizontal"){ + switch(settings.horizontalNavigationMenuIcon){ + case false: + $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item > li > a .pcoded-micon').hide(); + $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-search-item > li > a .pcoded-micon').show(); + break; + default: + } + } + }, + HandleHorizontalMobileMenuToggle: function() { + if (settings.themelayout === "horizontal"){ + $('.pcodedbrand-xs .menu-toggle a').on('click', function( ){ + $('.pcoded-navbar').toggleClass('show-menu') + }); + } + }, - HandleVerticalScrollbar: function() { - if (settings.themelayout === "vertical") { - satnt = settings.defaultVerticalMenu.desktop; - if (satnt === "expanded" || satnt === "compact") { - mt = settings.MenuTrigger; - if (mt === "click") { - $(window).on("load", function() { - $(".sidebar_toggle a").click(function(e) { - e.preventDefault(); - var $this = $(this); - rel = $this.attr("rel"); - el = $(".pcoded-navbar"); - // if (el.hasClass("mCS_destroyed")) { - // el.mCustomScrollbar({ - // axis:"y", - // setHeight:"calc(100% - 80px)", - // autoHideScrollbar: false, - // scrollInertia: 100, - // theme:"minimal", - // }); - // } else { - // el.mCustomScrollbar("destroy"); - // } - }); - }); - } - // $(".main-menu").mCustomScrollbar({ - // axis:"y", - // setHeight:"calc(100% - 80px)", - // autoHideScrollbar: false, - // scrollInertia: 100, - // theme:"minimal", - // }); - } - } - }, - HandleDocumentClickEvent: function() { - function closeSubMenu() { - $(document).on('click', function(evt) { - var target = $(evt.target); - var sdt = $('#' + oid).attr('pcoded-device-type'); - var vnt = $('#' + oid).attr('vertical-nav-type'); - var el = $('#' + oid + ' .pcoded-item li'); - if (!target.parents('.pcoded-item').length) { - if (sdt != "phone") { - if (vnt != "expanded") { - el.removeClass('pcoded-trigger'); - } - } - } - }); - }; + HandleVerticalScrollbar: function() { + if (settings.themelayout === "vertical"){ + satnt = settings.defaultVerticalMenu.desktop; + if (satnt === "expanded" || satnt === "compact"){ + mt = settings.MenuTrigger; + if (mt === "click"){ + $(window).on("load",function(){ + $(".pcoded-navbar").mCustomScrollbar({ + axis:"y", + autoHideScrollbar: false, + scrollInertia: 100, + theme:"minimal", + }); + // $(".sidebar_toggle a").click(function(e){ + // e.preventDefault(); + // var $this=$(this); + // rel=$this.attr("rel"); + // el=$(".pcoded-navbar"); + // if(el.hasClass("mCS_destroyed")){ + // el.mCustomScrollbar({ + // axis:"y", + // autoHideScrollbar: false, + // scrollInertia: 100, + // theme:"minimal", + // }); + // }else{ + // el.mCustomScrollbar("destroy"); + // } + // }); - function closeLeftbarSearch() { - $(document).on('click', function(evt) { - var target = $(evt.target); - var el = $('#' + oid + ' .pcoded-search'); - if (!target.parents('.pcoded-search').length) { - el.removeClass('open'); - } + }); + } + } + } + }, - }); - }; + HandleDocumentClickEvent: function() { + function closeSubMenu() { + $(document).on('click', function(evt) { + var target = $(evt.target); + var sdt = $('#'+oid).attr('pcoded-device-type'); + var vnt = $('#'+oid).attr('vertical-nav-type'); + var el = $('#'+oid + ' .pcoded-item li'); + if (!target.parents('.pcoded-item').length) { + if( sdt != "phone"){ + if( vnt != "expanded"){ + el.removeClass('pcoded-trigger'); + } + } + } + }); + }; + function closeLeftbarSearch() { + $(document).on('click', function(evt) { + var target = $(evt.target); + var el = $('#'+oid + ' .pcoded-search'); + if (!target.parents('.pcoded-search').length) { + el.removeClass('open'); + } - closeSubMenu(); - closeLeftbarSearch(); - }, + }); + }; + closeSubMenu(); + closeLeftbarSearch(); + }, - HandleHorizontalStickyNavigation: function() { - switch (settings.horizontalstickynavigation) { - case true: - $(window).on('scroll', function() { - var scrolltop = $(this).scrollTop(); - if (scrolltop >= 100) { - $('.pcoded-navbar').addClass('stickybar'); - $('stickybar').fadeIn(3000); - } else if (scrolltop <= 100) { - $('.pcoded-navbar').removeClass('stickybar') - $('.stickybar').fadeOut(3000); - } - }); - break; - case false: - $('.pcoded-navbar').removeClass('stickybar') - break; - default: - } - }, - HandleSubMenuOffset: function() { - switch (settings.themelayout) { - case 'horizontal': - var trigger = settings.SubMenuTrigger; - if (trigger === "hover") { - $("li.pcoded-hasmenu").on('mouseenter mouseleave', function(e) { - if ($('.pcoded-submenu', this).length) { - var elm = $('.pcoded-submenu:first', this); - var off = elm.offset(); - var l = off.left; - var w = elm.width(); - var docH = $(window).height(); - var docW = $(window).width(); - //console.log("length = " + $('.pcoded-submenu', this).length + " off=" + off + " l=" + l+ " w=" + w + " doch=" + docH + " docW=" + docW) - var isEntirelyVisible = (l + w <= docW); - if (!isEntirelyVisible) { - $(this).addClass('edge'); - } else { - $(this).removeClass('edge'); - } - } - }); - } else { - $("li.pcoded-hasmenu").on('click', function(e) { - e.preventDefault(); - if ($('.pcoded-submenu', this).length) { - var elm = $('.pcoded-submenu:first', this); - var off = elm.offset(); - var l = off.left; - var w = elm.width(); - var docH = $(window).height(); - var docW = $(window).width(); + HandleHorizontalStickyNavigation: function() { + switch(settings.horizontalstickynavigation){ + case true: + $(window).on('scroll',function() { + var scrolltop = $(this).scrollTop(); - var isEntirelyVisible = (l + w <= docW); - if (!isEntirelyVisible) { - $(this).toggleClass('edge'); - } + if(scrolltop >= 100) { + $('.pcoded-navbar').addClass('stickybar'); + $('stickybar').fadeIn(3000); + } - } - }); - } - break; - default: - } - }, - HandleHorizontalItemIsCentered: function() { - if (settings.themelayout === "horizontal") { - switch (settings.horizontalNavIsCentered) { - case true: - $('#' + oid + ' .pcoded-navbar').addClass("isCentered"); - break; - case false: - $('#' + oid + ' .pcoded-navbar').removeClass("isCentered"); - break; - default: - } - } + else if(scrolltop <= 100) { + $('.pcoded-navbar').removeClass('stickybar') + $('.stickybar').fadeOut(3000); + } + }); + break; + case false: + $('.pcoded-navbar').removeClass('stickybar') + break; + default: + } }, - HandleHorizontalItemAlignment: function() { - var layout = settings.themelayout; - if (layout === "horizontal") { - function branditemalignment() { - var elm = $('#' + oid + '.pcoded .pcoded-navbar .pcoded-brand'); - if (settings.horizontalBrandItem === true) { + HandleSubMenuOffset: function() { + switch(settings.themelayout){ + case 'horizontal': + var trigger = settings.SubMenuTrigger; + if(trigger === "hover" ) { + $("li.pcoded-hasmenu").on('mouseenter mouseleave', function (e) { + if ($('.pcoded-submenu', this).length) { + var elm = $('.pcoded-submenu:first', this); + var off = elm.offset(); + var l = off.left; + var w = elm.width(); + var docH = $( window ).height(); + var docW = $( window ).width(); - switch (settings.horizontalBrandItemAlign) { - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - } else { - elm.hide(); - } - }; + var isEntirelyVisible = (l + w <= docW); + if (!isEntirelyVisible) { + $(this).addClass('edge'); + } else { + $(this).removeClass('edge'); + } + } + }); + } else { + $("li.pcoded-hasmenu").on('click', function (e) { + e.preventDefault(); + if ($('.pcoded-submenu', this).length) { + var elm = $('.pcoded-submenu:first', this); + var off = elm.offset(); + var l = off.left; + var w = elm.width(); + var docH = $( window ).height(); + var docW = $( window ).width(); - function leftitemalignment() { - var elm = $('#' + oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-left-item'); - if (settings.horizontalLeftNavItem === true) { - switch (settings.horizontalLeftNavItemAlign) { - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - } else { - elm.hide(); - } - }; + var isEntirelyVisible = (l + w <= docW); + if (!isEntirelyVisible) { + $(this).toggleClass('edge'); + } - function rightitemalignment() { - var elm = $('#' + oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-right-item'); - if (settings.horizontalRightItem === true) { - switch (settings.horizontalRightItemAlign) { - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - } else { - elm.hide(); - } - }; + } + }); + } + break; + default: + } + }, + HandleHorizontalItemIsCentered: function() { + if (settings.themelayout === "horizontal"){ + switch(settings.horizontalNavIsCentered){ + case true: + $('#'+oid + ' .pcoded-navbar').addClass("isCentered"); + break; + case false: + $('#'+oid + ' .pcoded-navbar').removeClass("isCentered"); + break; + default: + } + } + }, + HandleHorizontalItemAlignment: function() { + var layout = settings.themelayout; + if(layout === "horizontal" ) { + function branditemalignment() { + var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-brand'); + if (settings.horizontalBrandItem === true){ - function searchitemalignment() { - var elm = $('#' + oid + '.pcoded .pcoded-navbar .pcoded-search-item'); - if (settings.horizontalSearchItem === true) { - switch (settings.horizontalsearchItemAlign) { - case 'left': - elm.removeClass('pcoded-right-align'); - elm.addClass('pcoded-left-align'); - break; - case 'right': - elm.removeClass('pcoded-left-align'); - elm.addClass('pcoded-right-align'); - break; - default: - } - } else { - elm.hide(); - } - }; - if (settings.horizontalNavIsCentered === false) { - branditemalignment(); - leftitemalignment(); - rightitemalignment(); - searchitemalignment(); - } - } + switch(settings.horizontalBrandItemAlign){ + case 'left': + elm.removeClass('pcoded-right-align'); + elm.addClass('pcoded-left-align'); + break; + case 'right': + elm.removeClass('pcoded-left-align'); + elm.addClass('pcoded-right-align'); + break; + default: + } + }else { + elm.hide(); + } + }; + function leftitemalignment() { + var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-left-item'); + if (settings.horizontalLeftNavItem === true){ + switch(settings.horizontalLeftNavItemAlign){ + case 'left': + elm.removeClass('pcoded-right-align'); + elm.addClass('pcoded-left-align'); + break; + case 'right': + elm.removeClass('pcoded-left-align'); + elm.addClass('pcoded-right-align'); + break; + default: + } + }else { + elm.hide(); + } + }; + function rightitemalignment() { + var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-item.pcoded-right-item'); + if (settings.horizontalRightItem === true){ + switch(settings.horizontalRightItemAlign){ + case 'left': + elm.removeClass('pcoded-right-align'); + elm.addClass('pcoded-left-align'); + break; + case 'right': + elm.removeClass('pcoded-left-align'); + elm.addClass('pcoded-right-align'); + break; + default: + } + }else{ + elm.hide(); + } + }; + function searchitemalignment() { + var elm = $('#'+oid + '.pcoded .pcoded-navbar .pcoded-search-item'); + if (settings.horizontalSearchItem === true){ + switch(settings.horizontalsearchItemAlign){ + case 'left': + elm.removeClass('pcoded-right-align'); + elm.addClass('pcoded-left-align'); + break; + case 'right': + elm.removeClass('pcoded-left-align'); + elm.addClass('pcoded-right-align'); + break; + default: + } + }else { + elm.hide(); + } + }; + if (settings.horizontalNavIsCentered === false){ + branditemalignment(); + leftitemalignment(); + rightitemalignment(); + searchitemalignment(); + } + } }, - HandleVerticalNavigationView: function() { - switch (settings.themelayout) { - case 'vertical': - var ev = settings.VerticalNavigationView; - $('#' + oid + '.pcoded').attr("vnavigation-view", ev); - break; - case 'horizontal': - var ev = settings.horizontalNavigationView; - $('#' + oid + '.pcoded').attr("hnavigation-view", ev); - break; - default: - } + HandleVerticalNavigationView: function() { + switch(settings.themelayout){ + case 'vertical': + var ev = settings.VerticalNavigationView; + $('#'+oid + '.pcoded').attr("vnavigation-view", ev ); + break; + case 'horizontal': + var ev = settings.horizontalNavigationView; + $('#'+oid + '.pcoded').attr("hnavigation-view", ev ); + break; + default: + } }, - HandleVerticalSubMenuItemIconStyle: function() { - switch (settings.themelayout) { - case 'vertical': - var ev = settings.VerticalSubMenuItemIconStyle; - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev); - break; - case 'horizontal': - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev); - break; - default: - } + HandleVerticalSubMenuItemIconStyle: function() { + switch(settings.themelayout){ + case 'vertical': + var ev = settings.VerticalSubMenuItemIconStyle; + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev ); + break; + case 'horizontal': + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("subitem-icon", ev ); + break; + default: + } }, - HandleNavbarPosition: function() { - var navposition = settings.FixedNavbarPosition; - var headerposition = settings.FixedHeaderPosition; - var rheaderposition = settings.FixedRightHeaderPosition; - switch (settings.themelayout) { - case 'vertical': - if (navposition == true) { - $('#' + oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed'); - $('#' + oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed'); - } else { - $('#' + oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'absolute'); - $('#' + oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'absolute'); - } - if (headerposition == true) { - $('#' + oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed'); - $('#' + oid + ' .pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight()); + HandleNavbarPosition: function() { + var navposition = settings.FixedNavbarPosition; + var headerposition = settings.FixedHeaderPosition; + var rheaderposition = settings.FixedRightHeaderPosition; + switch(settings.themelayout){ + case 'vertical': + if ( navposition == true){ + $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed' ); + $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed' ); + }else { + $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'absolute' ); + $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'absolute' ); + } + if ( headerposition == true){ + $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed' ); + $('#'+oid + ' .pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight()); - } else { - $('#' + oid + ' .pcoded-header').attr("pcoded-header-position", 'relative'); - $('#' + oid + ' .pcoded-main-container').css('margin-top', '0px'); - } - break; - case 'horizontal': - if (navposition == true) { - $('#' + oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed'); - $('#' + oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed'); - } else { - $('#' + oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'absolute'); - $('#' + oid + ' .pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'absolute'); - } - if (headerposition == true) { - $('#' + oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed'); - $('#' + oid + ' .pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight()); - - } else { - $('#' + oid + ' .pcoded-header').attr("pcoded-header-position", 'relative'); - $('#' + oid + ' .pcoded-main-container').css('margin-top', '0px'); - } - break; - default: - } + }else { + $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'relative' ); + $('#'+oid + ' .pcoded-main-container').css('margin-top', '0px'); + } + break; + case 'horizontal': + if ( navposition == true){ + $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", 'fixed' ); + $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'fixed' ); + $('#'+oid + ' .pcoded-navbar').css('margin-top', $(".pcoded-header").outerHeight()); + }else{ + $('#'+oid + ' .pcoded-navbar').attr("pcoded-navbar-position", ' ' ); + $('#'+oid + ' .pcoded-header').attr("pcoded-header-position", 'relative' ); + $('#'+oid + ' .pcoded-navbar').css('margin-top', '0px'); + } + break; + default: + } }, - HandleOptionSelectorPanel: function() { + HandleOptionSelectorPanel: function() { $('.selector-toggle > a').on("click", function() { - //debugger; $('#styleSelector').toggleClass('open') }); }, - HandleDropDownIconStyle: function() { + HandleDropDownIconStyle: function() { var ev = settings.DropDownIconStyle; - switch (settings.themelayout) { - case 'vertical': - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev); - break; - case 'horizontal': - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev); - break; - default: - } - }, - HandleSubItemBorder: function() { - switch (settings.SubItemBorder) { - case true: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border", "true"); - break; - case false: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border", "false"); - break; - default: - } + switch(settings.themelayout){ + case 'vertical': + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev ); + break; + case 'horizontal': + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').attr("dropdown-icon", ev ); + break; + default: + } }, - HandleBorderStyle: function() { - var ev = settings.ItemBorderStyle; - switch (settings.ItemBorder) { - case true: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", ev); - break; - case false: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", ""); - break; - default: - } + HandleSubItemBorder: function() { + switch(settings.SubItemBorder){ + case true: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border","true" ); + break; + case false: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("subitem-border","false" ); + break; + default: + } }, - HandleItemBorder: function() { - switch (settings.ItemBorder) { - case true: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("item-border", "true"); - break; - case false: - $('#' + oid + ' .pcoded-navbar .pcoded-item').attr("item-border", "false"); - break; - default: - } + HandleBorderStyle: function() { + var ev = settings.ItemBorderStyle; + switch(settings.ItemBorder){ + case true: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", ev ); + break; + case false: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border-style", "" ); + break; + default: + } }, - HandleActiveItemStyle: function() { - var ev = settings.ActiveItemStyle; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-navbar').attr("active-item-style", ev); - } else { - $('#' + oid + ' .pcoded-navbar').attr("active-item-style", "style0"); - } + HandleItemBorder: function() { + switch(settings.ItemBorder){ + case true: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border","true" ); + break; + case false: + $('#'+oid + ' .pcoded-navbar .pcoded-item').attr("item-border","false" ); + break; + default: + } }, - Handlemenutype: function() { - var ev = settings.menutype; - var ef = settings.freamtype; - var nimg = settings.NavbarImage; - var img = settings.ActiveNavbarImage; - if (ev != undefined && ev != "") { - $('#' + oid).attr("nav-type", ev); - } else { - $('#' + oid).attr("nav-type", "st1"); - } - if (ef != undefined && ef != "") { - $('#' + oid).attr("fream-type", ef); - } else { - $('#' + oid).attr("fream-type", "theme1"); - } - if (nimg != undefined && nimg != "") { - $('#' + oid).attr("sidebar-img", nimg); - } else { - $('#' + oid).attr("sidebar-img", "false"); - } - if (img != undefined && img != "") { - $('#' + oid).attr("sidebar-img-type", img); - } else { - $('#' + oid).attr("sidebar-img-type", "img1"); - } + HandleActiveItemStyle: function() { + var ev = settings.ActiveItemStyle; + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-navbar').attr("active-item-style", ev); + } else { + $('#'+oid + ' .pcoded-navbar').attr("active-item-style", "style0"); + } }, - Handlelayoutvartype: function() { - var ev = settings.layouttype; - if (ev != undefined && ev != "") { - $('#' + oid).attr("layout-type", ev); - } else { - $('#' + oid).attr("layout-type", "light"); - } - }, - HandleThemeBackground: function() { - function themebackgroundpattern() { + HandleThemeBackground: function() { + function themebackgroundpattern() { var ev = settings.ThemeBackgroundPattern; - if (ev != undefined && ev != "") { - $('body').attr("themebg-pattern", ev); - } else { - $('body').attr("themebg-pattern", "pattern1"); - } + if(ev != undefined && ev != "") { + $('body').attr("themebg-pattern", ev); + } else { + $('body').attr("themebg-pattern", "pattern1"); + } }; - - function setheadertheme() { + function setheadertheme() { var ev = settings.HeaderBackground; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-header').attr("header-theme", ev); - } else { - $('#' + oid + ' .pcoded-header').attr("header-theme", "theme1"); - } + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-header').attr("header-theme", ev); + } else { + $('#'+oid + ' .pcoded-header').attr("header-theme", "theme1"); + } }; - function setlheadertheme() { var ev = settings.LHeaderBackground; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-header .navbar-logo').attr("logo-theme", ev); - $('#' + oid + ' .pcoded-navigatio-lavel').attr("menu-title-theme", "theme5"); - } else { - $('#' + oid + ' .pcoded-header .navbar-logo').attr("logo-theme", "theme4"); - $('#' + oid + ' .pcoded-navigatio-lavel').attr("menu-title-theme", "theme5"); - } + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("lheader-theme", ev); + } else { + $('#'+oid + ' .pcoded-header .pcoded-left-header').attr("lheader-theme", "theme1"); + } }; - function setnavbartheme() { var ev = settings.NavbarBackground; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-navbar').attr("navbar-theme", ev); - } else { - $('#' + oid + ' .pcoded-navbar').attr("navbar-theme", "theme1"); - } + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-navbar').attr("navbar-theme", ev); + } else { + $('#'+oid + ' .pcoded-navbar').attr("navbar-theme", "theme1"); + } }; - - function setactiveitemtheme() { + function setactiveitemtheme() { var ev = settings.ActiveItemBackground; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-navbar').attr("active-item-theme", ev); - } else { - $('#' + oid + ' .pcoded-navbar').attr("active-item-theme", "theme1"); - } + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-navbar').attr("active-item-theme", ev); + } else { + $('#'+oid + ' .pcoded-navbar').attr("active-item-theme", "theme1"); + } }; - - function setsubitemtheme() { + function setsubitemtheme() { var ev = settings.SubItemBackground; - if (ev != undefined && ev != "") { - $('#' + oid + ' .pcoded-navbar').attr("sub-item-theme", ev); - } else { - $('#' + oid + ' .pcoded-navbar').attr("sub-item-theme", "theme1"); - } + if(ev != undefined && ev != "") { + $('#'+oid + ' .pcoded-navbar').attr("sub-item-theme", ev); + } else { + $('#'+oid + ' .pcoded-navbar').attr("sub-item-theme", "theme1"); + } }; - themebackgroundpattern(); - setheadertheme(); + themebackgroundpattern(); + setheadertheme(); setlheadertheme(); - setnavbartheme(); - setactiveitemtheme(); - setsubitemtheme(); + setnavbartheme(); + setactiveitemtheme(); + setsubitemtheme(); }, - HandleVerticalLeftHeader: function() { - if (settings.themelayout === "vertical") { - switch (settings.collapseVerticalLeftHeader) { - case true: - $('#' + oid + ' .pcoded-header').addClass('iscollapsed'); - $('#' + oid + ' .pcoded-header').removeClass('nocollapsed'); - $('#' + oid + '.pcoded').addClass('iscollapsed'); - $('#' + oid + '.pcoded').removeClass('nocollapsed'); + HandleVerticalLeftHeader: function() { + if (settings.themelayout === "vertical" ) { + switch(settings.collapseVerticalLeftHeader){ + case true: + $('#'+oid + ' .pcoded-header').addClass('iscollapsed'); + $('#'+oid + ' .pcoded-header').removeClass('nocollapsed'); + $('#'+oid + '.pcoded').addClass('iscollapsed'); + $('#'+oid + '.pcoded').removeClass('nocollapsed'); - /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', ''); */ - break; - case false: - $('#' + oid + ' .pcoded-header').removeClass('iscollapsed'); - $('#' + oid + ' .pcoded-header').addClass('nocollapsed'); - $('#' + oid + '.pcoded').removeClass('iscollapsed'); - $('#' + oid + '.pcoded').addClass('nocollapsed'); - /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', $(".pcoded-navbar").width()); */ - break; - default: - } - } else { - return false; - } + /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', ''); */ + break; + case false: + $('#'+oid + ' .pcoded-header').removeClass('iscollapsed'); + $('#'+oid + ' .pcoded-header').addClass('nocollapsed'); + $('#'+oid + '.pcoded').removeClass('iscollapsed'); + $('#'+oid + '.pcoded').addClass('nocollapsed'); + /* $('#'+oid + ' .pcoded-header.nocollapsed .pcoded-left-header').css('width', $(".pcoded-navbar").width()); */ + break; + default: + } + }else { + return false; + } }, - HandleOffcanvasMenu: function() { - if (settings.themelayout === "vertical") { - var vnt = $('#' + oid).attr("vertical-nav-type"); - if (vnt == "offcanvas") { - $('#' + oid).attr("vertical-layout", "wide"); - } - } + HandleOffcanvasMenu: function() { + if (settings.themelayout === "vertical" ) { + var vnt = $('#'+oid).attr("vertical-nav-type"); + if ( vnt == "offcanvas" ){ + $('#'+oid).attr("vertical-layout", "wide" ); + } + } }, - HandleActiveItem: function() { - /*switch(settings.activeMenuClass){ - case "active": - $('li:not("li.pcoded-hasmenu")').on( 'click', function () { - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0){ - $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); - $(this).addClass('active'); + HandleActiveItem: function() { + switch(settings.activeMenuClass){ + case "active": + $('li:not("li.pcoded-hasmenu")').on( 'click', function () { + var str = $(this).closest('.pcoded-submenu').length; + if (str === 0){ + $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); + $(this).addClass('active'); - }else{ - if($(this).hasClass('active')){ - $(this).removeClass('active'); - }else{ - $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); - $(this).parents('.pcoded-hasmenu').addClass('active'); - $(this).addClass('active'); - } - } - }); - break; - case false: - $('.pcoded-header').removeClass(settings.navbbgclass); - break; - default: - }*/ + }else{ + if($(this).hasClass('active')){ + $(this).removeClass('active'); + }else{ + $(this).closest('.pcoded-inner-navbar').find('li.active').removeClass('active'); + $(this).parents('.pcoded-hasmenu').addClass('active'); + $(this).addClass('active'); + } + } + }); + break; + case false: + $('.pcoded-header').removeClass(settings.navbbgclass); + break; + default: + } }, - HandleSubMenuTrigger: function() { - switch (settings.SubMenuTrigger) { - case 'hover': - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').addClass('is-hover'); - // Initialize - var $window = $(window); - var $dropdown = $('.pcoded-submenu > li'); - var currentSize = $window.width(); - var currentEvent = ''; - // Attach current event on load - (currentSize >= 767) ? bindTwo('hover'): bindTwo('click'); - // Atach window resize event - $window.resize(function() { - // get windows new size - var newSize = $window.width(); - // Exit if size is same - if (currentSize == newSize) { - return; - } - // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events - if (newSize >= 767 && currentEvent != 'hover') { - bindTwo('hover'); - } else if (newSize < 767 && currentEvent != 'click') { - bindTwo('click'); - } + HandleSubMenuTrigger: function(){ + switch(settings.SubMenuTrigger){ + case 'hover': + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').addClass('is-hover'); + // Initialize + var $window = $(window); + var $dropdown = $('.pcoded-submenu > li'); + var currentSize = $window.width(); + var currentEvent = ''; + // Attach current event on load + (currentSize >= 767) ? bindTwo('hover') : bindTwo('click'); + // Atach window resize event + $window.resize(function() { + // get windows new size + var newSize = $window.width(); + // Exit if size is same + if (currentSize == newSize) { + return; + } + // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events + if (newSize >= 767 && currentEvent != 'hover') { + bindTwo('hover'); + } else if (newSize < 767 && currentEvent != 'click') { + bindTwo('click'); + } - // Update new size - currentSize = newSize; - }); + // Update new size + currentSize = newSize; + }); + function bindTwo (eventType) { + if (eventType == 'hover') { + // Update currentEvent + currentEvent = eventType; + // Make sure all previous events are removed and attach hover + $dropdown.off('click').off('mouseenter mouseleave').hover( + function() { + $(this).addClass('pcoded-trigger'); + }, + function() { + $(this).removeClass('pcoded-trigger'); + } + ); + } + else if (eventType == 'click') { + // Update currentEvent + currentEvent = eventType; + // Make sure all previous events are removed and attach hover + $dropdown.off('mouseenter mouseleave').off('click').on('click', + function(e) { + e.stopPropagation(); + var str = $(this).closest('.pcoded-submenu').length; + if (str === 0){ + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } + }else{ + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } + } + } + ); + } + } + break; + case 'click': + $('#'+oid + ' .pcoded-navbar .pcoded-hasmenu').removeClass('is-hover'); + $(".pcoded-submenu > li").on( 'click', function (e) { + e.stopPropagation(); + var str = $(this).closest('.pcoded-submenu').length; + if (str === 0){ + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } + }else{ + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } + } + }); + break; + } + }, + HandleMenuTrigger: function(){ - function bindTwo(eventType) { - if (eventType == 'hover') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('click').off('mouseenter mouseleave').hover( - function() { - $(this).addClass('pcoded-trigger'); - }, - function() { - $(this).removeClass('pcoded-trigger'); - } - ); - } else if (eventType == 'click') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('mouseenter mouseleave').off('click').on('click', - function(e) { - e.stopPropagation(); - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0) { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } else { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - } - ); - } - } - break; - case 'click': - $('#' + oid + ' .pcoded-navbar .pcoded-hasmenu').removeClass('is-hover'); - $(".pcoded-submenu > li").on('click', function(e) { - e.stopPropagation(); - var str = $(this).closest('.pcoded-submenu').length; - if (str === 0) { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } else { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-submenu').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - }); - break; - } - }, - HandleMenuTrigger: function() { - - switch (settings.MenuTrigger) { - case 'hover': - $('#' + oid + ' .pcoded-navbar').addClass('is-hover'); - // Initialize - var $window = $(window); - var $dropdown = $(".pcoded-item > li"); - var currentSize = $window.width(); - var currentEvent = ''; - // Attach current event on load - (currentSize >= 767) ? bindOne('hover'): bindOne('click'); - // Atach window resize event - $window.resize(function() { - // get windows new size - var newSize = $window.width(); - // Exit if size is same - if (currentSize == newSize) { - return; - } - // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events - if (newSize >= 767 && currentEvent != 'hover') { - bindOne('hover'); - } else if (newSize < 767 && currentEvent != 'click') { - bindOne('click'); - } + switch(settings.MenuTrigger){ + case 'hover': + $('#'+oid + ' .pcoded-navbar').addClass('is-hover'); + // Initialize + var $window = $(window); + var $dropdown = $(".pcoded-item > li"); + var currentSize = $window.width(); + var currentEvent = ''; + // Attach current event on load + (currentSize >= 767) ? bindOne('hover') : bindOne('click'); + // Atach window resize event + $window.resize(function() { + // get windows new size + var newSize = $window.width(); + // Exit if size is same + if (currentSize == newSize) { + return; + } + // Check if size changed, if its greater/smaller and which current event is attached so we dont attach multiple events + if (newSize >= 767 && currentEvent != 'hover') { + bindOne('hover'); + } else if (newSize < 767 && currentEvent != 'click') { + bindOne('click'); + } - // Update new size - currentSize = newSize; - }); + // Update new size + currentSize = newSize; + }); + function bindOne (eventType) { + if (eventType == 'hover') { + // Update currentEvent + currentEvent = eventType; + // Make sure all previous events are removed and attach hover + $dropdown.off('click').off('mouseenter mouseleave').hover( + function() { + $(this).addClass('pcoded-trigger'); + }, + function() { + $(this).removeClass('pcoded-trigger'); + } + ); + } + else if (eventType == 'click') { + // Update currentEvent + currentEvent = eventType; + // Make sure all previous events are removed and attach hover + $dropdown.off('mouseenter mouseleave').off('click').on('click', + function() { + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } + } + ); + } + } + break; + case 'click': + $('#'+oid + ' .pcoded-navbar').removeClass('is-hover'); + $(".pcoded-item > li ").on( 'click', function () { + if($(this).hasClass('pcoded-trigger')){ + $(this).removeClass('pcoded-trigger'); + }else{ + $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); + $(this).addClass('pcoded-trigger'); + } - function bindOne(eventType) { - if (eventType == 'hover') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('click').off('mouseenter mouseleave').hover( - function() { - $(this).addClass('pcoded-trigger'); - }, - function() { - $(this).removeClass('pcoded-trigger'); - } - ); - } else if (eventType == 'click') { - // Update currentEvent - currentEvent = eventType; - // Make sure all previous events are removed and attach hover - $dropdown.off('mouseenter mouseleave').off('click').on('click', - function() { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - } - ); - } - } - break; - case 'click': - $('#' + oid + ' .pcoded-navbar').removeClass('is-hover'); - $(".pcoded-item > li ").on('click', function() { - if ($(this).hasClass('pcoded-trigger')) { - $(this).removeClass('pcoded-trigger'); - } else { - $(this).closest('.pcoded-inner-navbar').find('li.pcoded-trigger').removeClass('pcoded-trigger'); - $(this).addClass('pcoded-trigger'); - } - - }); - break; - } - }, - HandleMenuOnClick: function() { - var totalwidth = $(window)[0].innerWidth; - if (settings.themelayout === "vertical") { - $('#mobile-collapse,.sidebar_toggle a, .pcoded-overlay-box,.menu-toggle a').on("click", function() { - $(this).parent().find('.menu-icon').toggleClass("is-clicked"); - var dt = $('#' + oid).attr("pcoded-device-type"); - if (dt == "desktop") { - var dmc = settings.onToggleVerticalMenu.desktop; - var dm = settings.defaultVerticalMenu.desktop; - var dn = $('#' + oid).attr("vertical-nav-type"); - if (dn == dm) { - $('#' + oid).attr("vertical-nav-type", dmc); - } else if (dn == dmc) { - $('#' + oid).attr("vertical-nav-type", dm); - } else { - return false; - } - } else if (dt == "tablet") { - var tmc = settings.onToggleVerticalMenu.tablet; - var tm = settings.defaultVerticalMenu.tablet; - var tn = $('#' + oid).attr("vertical-nav-type"); - if (tn == tm) { - $('#' + oid).attr("vertical-nav-type", tmc); - } else if (dn == dmc) { - $('#' + oid).attr("vertical-nav-type", tm); - } - } else if (dt == "phone") { - var pmc = settings.onToggleVerticalMenu.phone; - var pm = settings.defaultVerticalMenu.phone; - var pn = $('#' + oid).attr("vertical-nav-type"); - if (pn == pm) { - $('#' + oid).attr("vertical-nav-type", pmc); - } else if (dn == dmc) { - $('#' + oid).attr("vertical-nav-type", pm); - } - } - $('.pcoded').addClass("pcoded-toggle-animate"); - setTimeout(function() { - $('.pcoded').removeClass("pcoded-toggle-animate"); - }, 250); - }); - } else if (settings.themelayout === "horizontal") { - if (totalwidth >= 768 && totalwidth <= 992) { - $('#' + oid).attr("pcoded-device-type", "tablet"); - } else if (totalwidth < 768) { - $('#' + oid).attr("pcoded-device-type", "phone"); - } else { - $('#' + oid).attr("pcoded-device-type", "desktop"); - } - } - }, - Handlecomponetheight: function() { - function setHeight() { - var WH = $(window).height(); + }); + break; + } + }, + HandleMenuOnClick: function() { + var totalwidth = $(window)[0].innerWidth; + if (settings.themelayout === "vertical" ) { + $('#mobile-collapse,.sidebar_toggle a, .pcoded-overlay-box').on("click", function() { + $(this).parent().find('.menu-icon').toggleClass("is-clicked"); + var dt = $('#'+oid).attr("pcoded-device-type"); + console.log('-->'+ dt); + if ( dt == "desktop" ){ + var dmc = settings.onToggleVerticalMenu.desktop; + var dm = settings.defaultVerticalMenu.desktop; + var dn = $('#'+oid).attr("vertical-nav-type"); + if ( dn == dm ) { + $('#'+oid).attr("vertical-nav-type", dmc); + }else if (dn == dmc ) { + $('#'+oid).attr("vertical-nav-type", dm); + } else { + return false; + } + }else if ( dt == "tablet"){ + var tmc = settings.onToggleVerticalMenu.tablet; + var tm = settings.defaultVerticalMenu.tablet; + var tn = $('#'+oid).attr("vertical-nav-type"); + if ( tn == tm ) { + $('#'+oid).attr("vertical-nav-type", tmc); + }else if (dn == dmc ) { + $('#'+oid).attr("vertical-nav-type", tm); + } + }else if ( dt == "phone"){ + var pmc = settings.onToggleVerticalMenu.phone; + var pm = settings.defaultVerticalMenu.phone; + var pn = $('#'+oid).attr("vertical-nav-type"); + if ( pn == pm ) { + $('#'+oid).attr("vertical-nav-type", pmc); + }else if (dn == dmc ) { + $('#'+oid).attr("vertical-nav-type", pm); + } + } + $('.pcoded').addClass("pcoded-toggle-animate"); + setTimeout(function(){ + $('.pcoded').removeClass("pcoded-toggle-animate"); + }, 250); + }); + }else if (settings.themelayout === "horizontal" ) { + if (totalwidth >= 768 && totalwidth <= 1024) { + $('#'+oid).attr("pcoded-device-type", "tablet"); + } else if (totalwidth < 768) { + $('#'+oid).attr("pcoded-device-type", "phone"); + } else { + $('#'+oid).attr("pcoded-device-type", "desktop"); + } + } + }, + Handlecomponetheight: function() { + function setHeight() { + var WH = $(window).height(); var HH = $(".pcoded-header").innerHeight(); var NH = $(".pcoded-navbar").innerHeight(); - var FH = $(".pcoded-footer").innerHeight(); + var FH = $(".pcoded-footer").innerHeight(); var contentHH = WH - HH; - var contentVH = WH - HH; - var lpanelH = WH - HH; - // if (settings.themelayout === "horizontal" ) { - // $(".pcoded-navbar").css('height', contentHH); - // } else if (settings.themelayout === "vertical" ) { - // if ( contentVH >= lpanelH ){ - // $(".pcoded-navbar").css('height', contentVH); - // }else { - // $(".pcoded-navbar").css('height', lpanelH); - // } - // } else { - // return false; - // } + var contentVH = WH - HH ; + var lpanelH = WH - HH ; + if (settings.themelayout === "horizontal" ) { + $(".pcoded-main-container").css('min-height', contentHH); + } else if (settings.themelayout === "vertical" ) { + if ( contentVH >= lpanelH ){ + $(".pcoded-main-container").css('min-height', contentVH); + }else { + $(".pcoded-main-container").css('min-height', lpanelH); + } + } else { + return false; + } }; - setHeight(); + setHeight(); $(window).resize(function() { setHeight(); }); }, - HandleDeviceType: function() { + HandleDeviceType: function() { function devicesize() { - var totalwidth = $(window)[0].innerWidth; - if (settings.themelayout === "vertical") { - if (totalwidth >= 768 && totalwidth <= 992) { + var totalwidth = $(window)[0].innerWidth; + if (settings.themelayout === "vertical" ) { + if (totalwidth >= 768 && totalwidth <= 1024) { - $('#' + oid).attr("pcoded-device-type", "tablet"); - var value = settings.defaultVerticalMenu.tablet; - if (value != undefined && value != "") { - $('#' + oid).attr("vertical-nav-type", value); - } else { - $('#' + oid).attr("vertical-nav-type", "collapsed"); - } + $('#'+oid).attr("pcoded-device-type", "tablet"); + var value = settings.defaultVerticalMenu.tablet; + if(value != undefined && value != "") { + $('#'+oid).attr("vertical-nav-type", value); + } else { + $('#'+oid).attr("vertical-nav-type", "collapsed"); + } - var ev = settings.verticalMenueffect.tablet; - if (ev != undefined && value != "") { - $('#' + oid).attr("vertical-effect", ev); - } else { - $('#' + oid).attr("vertical-effect", "shrink"); - } + var ev = settings.verticalMenueffect.tablet; + if(ev != undefined && value != "") { + $('#'+oid).attr("vertical-effect", ev); + } else { + $('#'+oid).attr("vertical-effect", "shrink"); + } - } else if (totalwidth < 768) { + } else if (totalwidth < 768) { - $('#' + oid).attr("pcoded-device-type", "phone"); + $('#'+oid).attr("pcoded-device-type", "phone"); - var value = settings.defaultVerticalMenu.phone; - if (value != undefined && value != "") { - $('#' + oid).attr("vertical-nav-type", value); - } else { - $('#' + oid).attr("vertical-nav-type", "offcanvas"); - } + var value = settings.defaultVerticalMenu.phone; + if(value != undefined && value != "") { + $('#'+oid).attr("vertical-nav-type", value); + } else { + $('#'+oid).attr("vertical-nav-type", "offcanvas"); + } - var ev = settings.verticalMenueffect.phone; - if (ev != undefined && value != "") { - $('#' + oid).attr("vertical-effect", ev); - } else { - $('#' + oid).attr("vertical-effect", "push"); - } + var ev = settings.verticalMenueffect.phone; + if(ev != undefined && value != "") { + $('#'+oid).attr("vertical-effect", ev); + } else { + $('#'+oid).attr("vertical-effect", "push"); + } - } else { - $('#' + oid).attr("pcoded-device-type", "desktop"); - var value = settings.defaultVerticalMenu.desktop; - if (value != undefined && value != "") { - $('#' + oid).attr("vertical-nav-type", value); - } else { - $('#' + oid).attr("vertical-nav-type", "expanded"); - } + } else { + $('#'+oid).attr("pcoded-device-type", "desktop"); + var value = settings.defaultVerticalMenu.desktop; + if(value != undefined && value != "") { + $('#'+oid).attr("vertical-nav-type", value); + } else { + $('#'+oid).attr("vertical-nav-type", "expanded"); + } - var ev = settings.verticalMenueffect.desktop; - if (ev != undefined && value != "") { - $('#' + oid).attr("vertical-effect", ev); - } else { - $('#' + oid).attr("vertical-effect", "shrink"); - } + var ev = settings.verticalMenueffect.desktop; + if(ev != undefined && value != "") { + $('#'+oid).attr("vertical-effect", ev); + } else { + $('#'+oid).attr("vertical-effect", "shrink"); + } - } - } else if (settings.themelayout === "horizontal") { - if (totalwidth >= 768 && totalwidth <= 992) { - $('#' + oid).attr("pcoded-device-type", "tablet"); - } else if (totalwidth < 768) { - $('#' + oid).attr("pcoded-device-type", "phone"); - } else { - $('#' + oid).attr("pcoded-device-type", "desktop"); - } + } + }else if (settings.themelayout === "horizontal" ) { + if (totalwidth >= 768 && totalwidth <= 1024) { + $('#'+oid).attr("pcoded-device-type", "tablet"); + } else if (totalwidth < 768) { + $('#'+oid).attr("pcoded-device-type", "phone"); + } else { + $('#'+oid).attr("pcoded-device-type", "desktop"); + } - } - }; + } + }; devicesize(); - $(window).resize(function() { - tw = $(window)[0].innerWidth; - dt = $('#' + oid).attr('pcoded-device-type') - if (dt == 'desktop' && tw < 992) { - devicesize(); - } else if (dt == 'phone' && tw > 768) { - devicesize(); - } else if (dt == 'tablet' && tw < 768) { - devicesize(); - } else if (dt == 'tablet' && tw > 992) { - devicesize(); - } + $(window).resize(function() { + tw = $(window)[0].innerWidth; + dt = $('#'+oid).attr('pcoded-device-type') + if ( dt == 'desktop' && tw < 1024 ) { + devicesize(); + } else if ( dt == 'phone' && tw > 768 ) { + devicesize(); + } else if ( dt == 'tablet' && tw < 768 ) { + devicesize(); + }else if ( dt == 'tablet' && tw > 1024 ) { + devicesize(); + } }); }, - HandleMenulayout: function() { - if (settings.themelayout === "vertical") { - switch (settings.verticalMenulayout) { - case 'wide': - $('#' + oid).attr("vertical-layout", "wide"); - break; - case 'box': - $('#' + oid).attr("vertical-layout", "box"); - break; - case 'widebox': - $('#' + oid).attr("vertical-layout", "widebox"); - break; - default: - } - } else if (settings.themelayout === "horizontal") { - switch (settings.horizontalMenulayout) { - case 'wide': - $('#' + oid).attr("horizontal-layout", "wide"); - break; - case 'box': - $('#' + oid).attr("horizontal-layout", "box"); - break; - case 'widebox': - $('#' + oid).attr("horizontal-layout", "widebox"); - break; - default: - } - } else { - return false; - } + HandleMenulayout: function() { + if (settings.themelayout === "vertical" ) { + switch(settings.verticalMenulayout){ + case 'wide': + $('#'+oid).attr("vertical-layout","wide" ); + break; + case 'box': + $('#'+oid).attr("vertical-layout","box" ); + break; + case 'widebox': + $('#'+oid).attr("vertical-layout","widebox" ); + break; + default: + } + } + else if (settings.themelayout === "horizontal" ) { + switch(settings.horizontalMenulayout){ + case 'wide': + $('#'+oid).attr("horizontal-layout","wide" ); + break; + case 'box': + $('#'+oid).attr("horizontal-layout","box" ); + break; + case 'widebox': + $('#'+oid).attr("horizontal-layout","widebox" ); + break; + default: + } + } + else { + return false; + } }, - HandlehorizontalMenuplacement: function() { - if (settings.themelayout === "horizontal") { - switch (settings.horizontalMenuplacement) { - case 'bottom': - $('#' + oid).attr("horizontal-placement", "bottom"); - break; - case 'top': - $('#' + oid).attr("horizontal-placement", "top"); - break; - default: - } - } else { - $('#' + oid).removeAttr("horizontal-placement"); - } + HandlehorizontalMenuplacement: function() { + if (settings.themelayout === "horizontal" ) { + switch(settings.horizontalMenuplacement){ + case 'bottom': + $('#'+oid).attr("horizontal-placement","bottom" ); + break; + case 'top': + $('#'+oid).attr("horizontal-placement","top" ); + break; + default: + } + } + else { + $('#'+oid).removeAttr("horizontal-placement"); + } }, - HandleverticalMenuplacement: function() { - if (settings.themelayout === "vertical") { - switch (settings.verticalMenuplacement) { - case 'left': - $('#' + oid).attr("vertical-placement", "left"); - break; - case 'right': - $('#' + oid).attr("vertical-placement", "right"); - break; - default: - } - } else { - $('#' + oid).removeAttr("vertical-placement"); - } + HandleverticalMenuplacement: function() { + if (settings.themelayout === "vertical" ) { + switch(settings.verticalMenuplacement){ + case 'left': + $('#'+oid).attr("vertical-placement","left" ); + break; + case 'right': + $('#'+oid).attr("vertical-placement","right" ); + break; + default: + } + } + else { + $('#'+oid).removeAttr("vertical-placement"); + } }, - Handlethemelayout: function() { - switch (settings.themelayout) { - case 'horizontal': - $('#' + oid).attr("theme-layout", "horizontal"); - break; - case 'vertical': - $('#' + oid).attr("theme-layout", "vertical"); - break; - default: - } + Handlethemelayout: function() { + switch(settings.themelayout){ + case 'horizontal': + $('#'+oid).attr("theme-layout","horizontal" ); + break; + case 'vertical': + $('#'+oid).attr("theme-layout","vertical" ); + break; + default: + } }, }; - PcodedMenu.PcodedMenuInit(); + PcodedMenu.PcodedMenuInit(); }; -// menu [ vertical ] -$(window).scroll(function() { - if ($(this).scrollTop() > 80) { - $('.pcoded[theme-layout="vertical"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('position', 'fixed'); - $('.pcoded[theme-layout="vertical"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('top', 0); - } else { - $('.pcoded[theme-layout="vertical"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('position', 'absolute'); - $('.pcoded[theme-layout="vertical"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('top', 'auto'); - } -}); -// menu [ horizontal ] -$(window).scroll(function() { - if ($(this).scrollTop() > 80) { - $('.pcoded[theme-layout="horizontal"][pcoded-device-type="desktop"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('position', 'fixed'); - $('.pcoded[theme-layout="horizontal"][pcoded-device-type="desktop"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('top', 0); - } else { - $('.pcoded[theme-layout="horizontal"][pcoded-device-type="desktop"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('position', 'absolute'); - $('.pcoded[theme-layout="horizontal"][pcoded-device-type="desktop"] .pcoded-navbar[pcoded-navbar-position="fixed"][pcoded-header-position="relative"]').css('top', 'auto'); - } -}); diff --git a/files/assets/pcassets/js/lib/echarts/salesCharts.js b/files/salesCharts.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/salesCharts.js rename to files/salesCharts.js diff --git a/files/assets/pcassets/css/simple-line-icons.css b/files/simple-line-icons.css similarity index 100% rename from files/assets/pcassets/css/simple-line-icons.css rename to files/simple-line-icons.css diff --git a/files/assets/pcassets/js/lib/echarts/skuCharts.js b/files/skuCharts.js similarity index 100% rename from files/assets/pcassets/js/lib/echarts/skuCharts.js rename to files/skuCharts.js diff --git a/files/assets/pcassets/js/lib/sparkline.min.js b/files/sparkline.min.js similarity index 100% rename from files/assets/pcassets/js/lib/sparkline.min.js rename to files/sparkline.min.js diff --git a/files/assets/pcassets/js/vertical-demo.js b/files/vertical-demo.js similarity index 100% rename from files/assets/pcassets/js/vertical-demo.js rename to files/vertical-demo.js