jqwidgets-ng 22.0.3 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/jqxform/angular_jqxform.mjs +35 -2
- package/esm2020/jqxgrid/angular_jqxgrid.mjs +12 -0
- package/esm2020/jqxtree/angular_jqxtree.mjs +6 -0
- package/esm2020/jqxwindow/angular_jqxwindow.mjs +6 -0
- package/fesm2015/jqwidgets-ng-jqxform.mjs +35 -2
- package/fesm2015/jqwidgets-ng-jqxgrid.mjs +12 -0
- package/fesm2015/jqwidgets-ng-jqxtree.mjs +6 -0
- package/fesm2015/jqwidgets-ng-jqxwindow.mjs +6 -0
- package/fesm2020/jqwidgets-ng-jqxform.mjs +35 -2
- package/fesm2020/jqwidgets-ng-jqxgrid.mjs +12 -0
- package/fesm2020/jqwidgets-ng-jqxtree.mjs +6 -0
- package/fesm2020/jqwidgets-ng-jqxwindow.mjs +6 -0
- package/jqwidgets/jqx-all.js +28 -2467
- package/jqwidgets/jqxangular.js +3 -1
- package/jqwidgets/jqxbarcode.js +7 -1
- package/jqwidgets/jqxbargauge.js +3 -1
- package/jqwidgets/jqxbulletchart.js +3 -1
- package/jqwidgets/jqxbuttongroup.js +3 -1
- package/jqwidgets/jqxbuttons.js +3 -1
- package/jqwidgets/jqxcalendar.js +3 -1
- package/jqwidgets/jqxchart.annotations.js +3 -1
- package/jqwidgets/jqxchart.api.js +3 -1
- package/jqwidgets/jqxchart.core.js +3 -1
- package/jqwidgets/jqxchart.js +1 -1
- package/jqwidgets/jqxchart.rangeselector.js +3 -1
- package/jqwidgets/jqxchart.waterfall.js +3 -1
- package/jqwidgets/jqxcheckbox.js +3 -1
- package/jqwidgets/jqxcheckboxgroup.js +7 -1
- package/jqwidgets/jqxcolorpicker.js +3 -1
- package/jqwidgets/jqxcombobox.js +3 -1
- package/jqwidgets/jqxcomplexinput.js +3 -1
- package/jqwidgets/jqxcore.js +3 -1
- package/jqwidgets/jqxdata.export.js +3 -1
- package/jqwidgets/jqxdata.js +3 -1
- package/jqwidgets/jqxdatatable.js +3 -1
- package/jqwidgets/jqxdate.js +3 -1
- package/jqwidgets/jqxdatetimeinput.js +3 -1
- package/jqwidgets/jqxdocking.js +3 -1
- package/jqwidgets/jqxdockinglayout.js +3 -1
- package/jqwidgets/jqxdockpanel.js +3 -1
- package/jqwidgets/jqxdragdrop.js +3 -1
- package/jqwidgets/jqxdraw.js +3 -1
- package/jqwidgets/jqxdropdownbutton.js +3 -1
- package/jqwidgets/jqxdropdownlist.js +3 -1
- package/jqwidgets/jqxeditor.js +3 -1
- package/jqwidgets/jqxexpander.js +3 -1
- package/jqwidgets/jqxfileupload.js +3 -1
- package/jqwidgets/jqxform.js +4 -2
- package/jqwidgets/jqxformattedinput.js +3 -1
- package/jqwidgets/jqxgantt.api.js +75 -90
- package/jqwidgets/jqxgantt.js +3 -1
- package/jqwidgets/jqxgauge.js +4 -2
- package/jqwidgets/jqxgrid.aggregates.js +3 -1
- package/jqwidgets/jqxgrid.columnsreorder.js +3 -1
- package/jqwidgets/jqxgrid.columnsresize.js +3 -1
- package/jqwidgets/jqxgrid.edit.js +3 -1
- package/jqwidgets/jqxgrid.export.js +3 -1
- package/jqwidgets/jqxgrid.filter.js +4 -2
- package/jqwidgets/jqxgrid.grouping.js +3 -1
- package/jqwidgets/jqxgrid.js +4 -2
- package/jqwidgets/jqxgrid.pager.js +3 -1
- package/jqwidgets/jqxgrid.selection.js +3 -1
- package/jqwidgets/jqxgrid.sort.js +3 -1
- package/jqwidgets/jqxgrid.storage.js +4 -2
- package/jqwidgets/jqxheatmap.js +3 -1
- package/jqwidgets/jqxinput.js +3 -1
- package/jqwidgets/jqxkanban.js +3 -1
- package/jqwidgets/jqxknob.js +3 -1
- package/jqwidgets/jqxknockout.js +3 -1
- package/jqwidgets/jqxlayout.js +3 -1
- package/jqwidgets/jqxlistbox.js +4 -2
- package/jqwidgets/jqxlistmenu.js +3 -1
- package/jqwidgets/jqxloader.js +3 -1
- package/jqwidgets/jqxmaskedinput.js +3 -1
- package/jqwidgets/jqxmenu.js +3 -1
- package/jqwidgets/jqxnavbar.js +3 -1
- package/jqwidgets/jqxnavigationbar.js +3 -1
- package/jqwidgets/jqxnotification.js +3 -1
- package/jqwidgets/jqxnumberinput.js +3 -1
- package/jqwidgets/jqxpanel.js +3 -1
- package/jqwidgets/jqxpasswordinput.js +3 -1
- package/jqwidgets/jqxpivot.js +3 -1
- package/jqwidgets/jqxpivotdesigner.js +3 -1
- package/jqwidgets/jqxpivotgrid.js +3 -1
- package/jqwidgets/jqxpopover.js +3 -1
- package/jqwidgets/jqxprogressbar.js +3 -1
- package/jqwidgets/jqxqrcode.js +7 -1
- package/jqwidgets/jqxradiobutton.js +3 -1
- package/jqwidgets/jqxradiobuttongroup.js +7 -1
- package/jqwidgets/jqxrangeselector.js +3 -1
- package/jqwidgets/jqxrating.js +3 -1
- package/jqwidgets/jqxresponsivepanel.js +3 -1
- package/jqwidgets/jqxribbon.js +3 -1
- package/jqwidgets/jqxscheduler.api.js +3 -1
- package/jqwidgets/jqxscheduler.js +4 -2
- package/jqwidgets/jqxscrollbar.js +3 -1
- package/jqwidgets/jqxscrollview.js +3 -1
- package/jqwidgets/jqxslider.js +3 -1
- package/jqwidgets/jqxsortable.js +3 -1
- package/jqwidgets/jqxsplitlayout_.js +11 -0
- package/jqwidgets/jqxsplitter.js +3 -1
- package/jqwidgets/jqxswitchbutton.js +4 -2
- package/jqwidgets/jqxtabs.js +3 -1
- package/jqwidgets/jqxtagcloud.js +3 -1
- package/jqwidgets/jqxtextarea.js +3 -1
- package/jqwidgets/jqxtimeline.js +3 -1
- package/jqwidgets/jqxtimepicker.js +3 -1
- package/jqwidgets/jqxtoolbar.js +3 -1
- package/jqwidgets/jqxtooltip.js +3 -1
- package/jqwidgets/jqxtouch.js +3 -1
- package/jqwidgets/jqxtree.js +4 -2
- package/jqwidgets/jqxtreegrid.js +3 -1
- package/jqwidgets/jqxtreemap.js +3 -1
- package/jqwidgets/jqxvalidator.js +3 -1
- package/jqwidgets/jqxwindow.js +4 -2
- package/jqwidgets/modules/jqxbarcode.js +65 -19
- package/jqwidgets/modules/jqxbargauge.js +67 -23
- package/jqwidgets/modules/jqxbulletchart.js +70 -28
- package/jqwidgets/modules/jqxbuttongroup.js +68 -24
- package/jqwidgets/modules/jqxbuttons.js +65 -19
- package/jqwidgets/modules/jqxcalendar.js +72 -30
- package/jqwidgets/modules/jqxchart.js +82 -62
- package/jqwidgets/modules/jqxcheckbox.js +71 -29
- package/jqwidgets/modules/jqxcheckboxgroup.js +71 -29
- package/jqwidgets/modules/jqxcolorpicker.js +74 -34
- package/jqwidgets/modules/jqxcombobox.js +80 -44
- package/jqwidgets/modules/jqxcomplexinput.js +68 -24
- package/jqwidgets/modules/jqxdatatable.js +108 -114
- package/jqwidgets/modules/jqxdatetimeinput.js +98 -74
- package/jqwidgets/modules/jqxdocking.js +208 -29
- package/jqwidgets/modules/jqxdockinglayout.js +219 -48
- package/jqwidgets/modules/jqxdockpanel.js +68 -24
- package/jqwidgets/modules/jqxdragdrop.js +69 -27
- package/jqwidgets/modules/jqxdraw.js +64 -18
- package/jqwidgets/modules/jqxdropdownbutton.js +68 -24
- package/jqwidgets/modules/jqxdropdownlist.js +96 -70
- package/jqwidgets/modules/jqxeditor.js +249 -98
- package/jqwidgets/modules/jqxexpander.js +76 -36
- package/jqwidgets/modules/jqxfileupload.js +71 -29
- package/jqwidgets/modules/jqxform.js +1200 -1020
- package/jqwidgets/modules/jqxformattedinput.js +99 -73
- package/jqwidgets/modules/jqxgantt.js +149 -118
- package/jqwidgets/modules/jqxgauge.js +3063 -3747
- package/jqwidgets/modules/jqxgrid.js +1799 -789
- package/jqwidgets/modules/jqxheatmap.js +68 -24
- package/jqwidgets/modules/jqxinput.js +70 -28
- package/jqwidgets/modules/jqxkanban.js +111 -95
- package/jqwidgets/modules/jqxknob.js +70 -28
- package/jqwidgets/modules/jqxlayout.js +219 -48
- package/jqwidgets/modules/jqxlineargauge.js +3063 -3747
- package/jqwidgets/modules/jqxlinkbutton.js +65 -19
- package/jqwidgets/modules/jqxlistbox.js +84 -50
- package/jqwidgets/modules/jqxlistmenu.js +107 -87
- package/jqwidgets/modules/jqxloader.js +65 -19
- package/jqwidgets/modules/jqxmaskedinput.js +65 -19
- package/jqwidgets/modules/jqxmenu.js +81 -45
- package/jqwidgets/modules/jqxnavbar.js +76 -36
- package/jqwidgets/modules/jqxnavigationbar.js +88 -56
- package/jqwidgets/modules/jqxnotification.js +76 -38
- package/jqwidgets/modules/jqxnumberinput.js +86 -54
- package/jqwidgets/modules/jqxpanel.js +73 -33
- package/jqwidgets/modules/jqxpasswordinput.js +75 -37
- package/jqwidgets/modules/jqxpivotdesigner.js +254 -105
- package/jqwidgets/modules/jqxpivotgrid.js +254 -105
- package/jqwidgets/modules/jqxpopover.js +68 -24
- package/jqwidgets/modules/jqxprogressbar.js +65 -19
- package/jqwidgets/modules/jqxqrcode.js +75 -35
- package/jqwidgets/modules/jqxradiobutongroup.js +71 -29
- package/jqwidgets/modules/jqxradiobutton.js +68 -24
- package/jqwidgets/modules/jqxrangeselector.js +70 -28
- package/jqwidgets/modules/jqxrating.js +68 -24
- package/jqwidgets/modules/jqxrepeatbutton.js +65 -19
- package/jqwidgets/modules/jqxresponsivepanel.js +68 -24
- package/jqwidgets/modules/jqxribbon.js +71 -29
- package/jqwidgets/modules/jqxscheduler.js +261 -142
- package/jqwidgets/modules/jqxscrollbar.js +67 -23
- package/jqwidgets/modules/jqxscrollview.js +67 -23
- package/jqwidgets/modules/jqxslider.js +57 -23
- package/jqwidgets/modules/jqxsortable.js +7 -14119
- package/jqwidgets/modules/jqxsplitlayout.js +7 -13895
- package/jqwidgets/modules/jqxsplitter.js +7 -13468
- package/jqwidgets/modules/jqxswitchbutton.js +63 -33
- package/jqwidgets/modules/jqxtabs.js +73 -49
- package/jqwidgets/modules/jqxtagcloud.js +65 -37
- package/jqwidgets/modules/jqxtextarea.js +65 -37
- package/jqwidgets/modules/jqxtimeline.js +55 -19
- package/jqwidgets/modules/jqxtimepicker.js +56 -22
- package/jqwidgets/modules/jqxtogglebutton.js +55 -19
- package/jqwidgets/modules/jqxtoolbar.js +99 -91
- package/jqwidgets/modules/jqxtooltip.js +54 -18
- package/jqwidgets/modules/jqxtree.js +2638 -2581
- package/jqwidgets/modules/jqxtreegrid.js +100 -118
- package/jqwidgets/modules/jqxtreemap.js +59 -27
- package/jqwidgets/modules/jqxvalidator.js +62 -32
- package/jqwidgets/modules/jqxwindow.js +195 -24
- package/jqwidgets/styles/jqx.base.css +182 -1
- package/jqxform/angular_jqxform.d.ts +7 -1
- package/jqxgrid/angular_jqxgrid.d.ts +2 -0
- package/jqxtree/angular_jqxtree.d.ts +2 -0
- package/jqxwindow/angular_jqxwindow.d.ts +2 -0
- package/package.json +3 -2
package/jqwidgets/jqxmenu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxMenu","",{});a.extend(a.jqx._jqxMenu.prototype,{defineInstance:function(){var b={items:new Array(),mode:"horizontal",width:null,height:null,minimizeWidth:"auto",easing:"easeInOutSine",animationShowDuration:200,animationHideDuration:200,autoCloseInterval:0,animationHideDelay:100,animationShowDelay:10,menuElements:new Array(),autoSizeMainItems:false,autoCloseOnClick:true,autoCloseOnMouseLeave:true,enableRoundedCorners:true,disabled:false,autoOpenPopup:true,enableHover:true,autoOpen:true,autoGenerate:true,clickToOpen:false,showTopLevelArrows:false,touchMode:"auto",source:null,popupZIndex:1000,rtl:false,keyboardNavigation:false,lockFocus:false,title:"",events:["shown","closed","itemclick","initialized","open","close"]};if(this===a.jqx._jqxMenu.prototype){return b}a.extend(true,this,b);return b},createInstance:function(c){var b=this;this.host.attr("role","menubar");a.jqx.utilities.resize(this.host,function(){b.refresh()},false,this.mode!="popup");if(this.minimizeWidth!="auto"&&this.minimizeWidth!=null&&this.width&&this.width.toString().indexOf("%")==-1){a(window).resize(function(){b.refresh()})}if(b.isMaterialized()){var g=window.getComputedStyle(this.element);var f=g.getPropertyValue("--jqx-dropdown-animation");if(f){this.animationType=f.trim();if(this.animationType==="transform"){this.animationShowDuration=0;this.animationHideDuration=0;this.animationShowDelay=0}}}this.host.css("outline","none");if(this.source){if(this.source!=null){var d=this.loadItems(this.source);this.element.innerHTML=d}}this._tmpHTML=this.element.innerHTML;if(this.element.innerHTML.indexOf("UL")){var e=this.host.find("ul:first");if(e.length>0){this._createMenu(e[0])}}this.host.data("autoclose",{});this._render();this._setSize();if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.host.attr("hideFocus",true)}},focus:function(){try{if(this.mode==="popup"&&this.keyboardNavigation){var d=this.host.closest("div.jqx-menu-wrapper");d.focus()}if(this.keyboardNavigation){this.host.focus();var c=this;var e=function(){if(!a.jqx.isHidden(a(c.items[0].element))){a(c.items[0].element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=c.items[0]}else{var f=c._nextVisibleItem(c.items[0],0);if(f){a(f.element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=f}}};if(!this.activeItem){e()}else{if(!a.jqx.isHidden(a(this.activeItem.element))){a(this.activeItem.element).addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{a(this.activeItem.element).removeClass(this.toThemeProperty("jqx-fill-state-focus"));e()}}}}catch(b){}},loadItems:function(c,e){if(c==null){return}if(c.length==0){return""}var b=this;this.items=new Array();var d='<ul class="jqx-menu-ul">';if(e){d='<ul class="jqx-menu-ul" style="width:'+e+';">'}a.map(c,function(f){if(f==undefined){return null}d+=b._parseItem(f)});d+="</ul>";return d},_parseItem:function(f){var c="";if(f==undefined){return null}var b=f.label;if(!f.label&&f.html){b=f.html}if(!b){b="Item"}if(typeof f==="string"){b=f}var e=false;if(f.selected!=undefined&&f.selected){e=true}var d=false;if(f.disabled!=undefined&&f.disabled){d=true}c+="<li";if(d){c+=' item-disabled="true" '}if(f.label&&!f.html){c+=' item-label="'+b+'" '}if(f.value!=null){c+=' item-value="'+f.value+'" '}if(f.id!=undefined){c+=' id="'+f.id+'" '}c+=">"+b;if(f.items){if(f.subMenuWidth){c+=this.loadItems(f.items,f.subMenuWidth)}else{c+=this.loadItems(f.items)}}c+="</li>";return c},_setSize:function(){if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}}if(this.height===null){this.host.height("auto")}var g=this;if(this.minimizeWidth!=null&&this.mode!="popup"){var f=a(window).width();if(!a.jqx.response){var e=false;if(navigator.userAgent.match(/Windows|Linux|MacOS/)){var b=navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0;if(!b){e=true}}var c=this.minimizeWidth;if(e&&this.minimizeWidth=="auto"){return}}if(this.minimizeWidth=="auto"&&a.jqx.response){var d=new a.jqx.response();if(d.device.type=="Phone"||d.device.type=="Tablet"){if(!this.minimized){this.minimize()}}}else{if((f<c)&&!this.minimized){this.minimize()}else{if(this.minimized&&f>=c){this.restore()}}}}},minimize:function(){if(this.minimized){return}var e=this;this.host.addClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=true;this._tmpMode=this.mode;this.mode="simple";var h=this.host.closest("div.jqx-menu-wrapper");h.remove();a("#menuWrapper"+this.element.id).remove();a.each(this.items,function(){var k=this;var j=a(k.element);var i=a(k.subMenuElement);var l=i.closest("div.jqx-menu-popup");l.remove()});if(this.source){var d=this.loadItems(this.source);this.element.innerHTML=d;this._tmpHTML=this.element.innerHTML}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var g=this.host.find("ul:first");if(g.length>0){this._createMenu(g[0])}}this._render();var c=this.host.find("ul:first");c.wrap('<div class="jqx-menu-wrapper" style="z-index:'+this.popupZIndex+'; padding: 0px; display: none; margin: 0px; height: auto; width: auto; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var h=c.closest("div.jqx-menu-wrapper");h[0].id="menuWrapper"+this.element.id;h.detach();h.appendTo(a(document.body));h.addClass(this.toThemeProperty("jqx-widget"));h.addClass(this.toThemeProperty("jqx-menu"));h.addClass(this.toThemeProperty("jqx-menu-minimized"));h.addClass(this.toThemeProperty("jqx-widget-header"));c.children().hide();h.hide();h.find("ul").addClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.minimizedItem=a("<div></div>");this.minimizedItem.addClass(this.toThemeProperty("jqx-item"));this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-item-top"));this.addHandler(h,"keydown",function(i){return e.handleKeyDown(i)});this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-minimized-button"));this.minimizedItem.prependTo(this.host);this.titleElement=a("<div>"+this.title+"</div>");this.titleElement.addClass(this.toThemeProperty("jqx-item"));this.titleElement.addClass(this.toThemeProperty("jqx-menu-title"));this.titleElement.prependTo(this.host);a("<div style='clear:both;'></div>").insertAfter(this.minimizedItem);e.minimizedHidden=true;var b=function(j){e.minimizedHidden=true;e.minimizedItem.show();var i=false;if(e.minimizedItem.css("float")=="right"){i=true}h.animate({left:!i?-h.outerWidth():e.host.coord().left+e.host.width()+h.width(),opacity:0},e.animationHideDuration,function(){h.find("ul:first").children().hide();h.hide()})};var f=function(k){if(e.minimizedHidden){h.find("ul:first").children().show();e.minimizedHidden=false;h.show();h.css("opacity",0);h.css("left",-h.outerWidth());var j=false;var i=h.width();if(e.minimizedItem.css("float")=="right"){h.css("left",e.host.coord().left+e.host.width()+i);j=true}h.css("top",e.host.coord().top+e.host.height());h.animate({left:!j?e.host.coord().left:e.host.coord().left+e.host.width()-i,opacity:0.95},e.animationShowDuration,function(){})}else{b(k)}e._raiseEvent("2",{type:"mouse",item:e.minimizedItem[0],event:k});e._setSize()};this.addHandler(a(window),"orientationchange.jqxmenu"+this.element.id,function(i){setTimeout(function(){if(!e.minimizedHidden){var j=h.width();var k=false;var j=h.width();if(e.minimizedItem.css("float")=="right"){k=true}h.css("top",e.host.coord().top+e.host.height());h.css({left:!k?e.host.coord().left:e.host.coord().left+e.host.width()-j})}},25)});this.addHandler(this.minimizedItem,"click",function(i){f(i)})},restore:function(){if(!this.minimized){return}this.host.find("ul").removeClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.host.removeClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=false;this.mode=this._tmpMode;if(this.minimizedItem){this.minimizedItem.remove()}var d=a("#menuWrapper"+this.element.id);d.remove();if(this.source){var b=this.loadItems(this.source);this.element.innerHTML=b;this._tmpHTML=b}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var c=this.host.find("ul:first");if(c.length>0){this._createMenu(c[0])}}this._setSize();this._render()},isTouchDevice:function(){if(this._isTouchDevice!=undefined){return this._isTouchDevice}var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b){this.host.addClass(this.toThemeProperty("jqx-touch"));a(".jqx-menu-item").addClass(this.toThemeProperty("jqx-touch"))}this._isTouchDevice=b;return b},refresh:function(b){if(!b){this._setSize()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},_closeAll:function(f){var d=f!=null?f.data:this;var b=d.items;a.each(b,function(){var e=this;if(e.hasItems==true){if(e.isOpen){d._closeItem(d,e)}}});if(d.mode=="popup"){if(f!=null){var c=d._isRightClick(f);if(!c){d.close()}}}},closeItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==true&&f.element==c){d._closeItem(d,f);if(f.parentId){}}});return true},openItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==false&&f.element==c){d._openItem(d,f);if(f.parentId){d.openItem(f.parentId)}}});return true},_getClosedSubMenuOffset:function(c){var b=a(c.subMenuElement);var f=-b.outerHeight();var e=-b.outerWidth();var d=c.level==0&&this.mode=="horizontal";if(d){e=0}else{f=0}switch(c.openVerticalDirection){case"up":case"center":f=b.outerHeight();break}switch(c.openHorizontalDirection){case this._getDir("left"):if(d){e=0}else{e=b.outerWidth()}break;case"center":if(d){e=0}else{e=b.outerWidth()}break}return{left:e,top:f}},_closeItem:function(l,o,g,c){if(l==null||o==null){return false}var j=a(o.subMenuElement);var b=o.level==0&&this.mode=="horizontal";var f=this._getClosedSubMenuOffset(o);var m=f.top;var e=f.left;var i=a(o.element);var k=j.closest("div.jqx-menu-popup");if(k!=null){k.removeClass("show");var h=l.animationHideDelay;if(c==true){h=0}if(j.data("timer")&&j.data("timer").show!=null){clearTimeout(j.data("timer").show);j.data("timer").show=null}var n=function(){o.isOpen=false;if(b){j.stop().animate({top:m},l.animationHideDuration,function(){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));a(o.element).removeClass(l.toThemeProperty("jqx-rc-b-expanded"));k.removeClass(l.toThemeProperty("jqx-rc-t-expanded"));var p=a(o.arrow);if(p.length>0&&l.showTopLevelArrows){p.removeClass();if(o.openVerticalDirection=="down"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-down"));p.addClass(l.toThemeProperty("jqx-icon-arrow-down"))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-up"));p.addClass(l.toThemeProperty("jqx-icon-arrow-up"))}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});if(l.animationHideDuration==0){j.css({top:m})}l._raiseEvent("1",o)})}else{if(!a.jqx.browser.msie){}j.stop().animate({left:e},l.animationHideDuration,function(){if(l.animationHideDuration==0){j.css({left:e})}if(o.level>0){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}else{a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});l._raiseEvent("1",o)})}};if(h>0){if(j.data("timer")){j.data("timer").hide=setTimeout(function(){n()},h)}}else{n()}if(g!=undefined&&g){var d=j.children();a.each(d,function(){if(l.menuElements[this.id]&&l.menuElements[this.id].isOpen){var p=a(l.menuElements[this.id].subMenuElement);l._closeItem(l,l.menuElements[this.id],true,true)}})}}},getSubItems:function(i,h){if(i==null){return false}var g=this;var c=new Array();if(h!=null){a.extend(c,h)}var d=i;var f=this.menuElements[d];var b=a(f.subMenuElement);var e=b.find(".jqx-menu-item");a.each(e,function(){c[this.id]=g.menuElements[this.id];var j=g.getSubItems(this.id,c);a.extend(c,j)});return c},disable:function(g,d){if(g==null){return}var c=g;var f=this;if(this.menuElements[c]){var e=this.menuElements[c];e.disabled=d;var b=a(e.element);e.element.disabled=d;a.each(b.children(),function(){this.disabled=d});if(d){b.addClass(f.toThemeProperty("jqx-menu-item-disabled"));b.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{b.removeClass(f.toThemeProperty("jqx-menu-item-disabled"));b.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}}},getItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];return b}return null},disableItem:function(b){this.disable(b,true)},hideItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).hide()}},showItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).show()}},enableItem:function(b){this.disable(b,false)},_setItemProperty:function(g,c,f){if(g==null){return}var b=g;var e=this;if(this.menuElements[b]){var d=this.menuElements[b];if(d[c]){d[c]=f}}},setItemOpenDirection:function(d,c,e){if(d==null){return}var j=d;var g=this;var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(this.menuElements[j]){var i=this.menuElements[j];if(c!=null){i.openHorizontalDirection=c;if(i.hasItems&&i.level>0){var h=a(i.element);if(h!=undefined){var b=a(i.arrow);if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openHorizontalDirection=="left"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("left")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("left")))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}if(e!=null){i.openVerticalDirection=e;var b=a(i.arrow);var h=a(i.element);if(!g.showTopLevelArrows){return}if(h!=undefined){if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openVerticalDirection=="down"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));b.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));b.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}},_getSiblings:function(d){var e=new Array();var b=0;for(var c=0;c<this.items.length;c++){if(this.items[c]==d){continue}if(this.items[c].parentId==d.parentId&&this.items[c].hasItems){e[b++]=this.items[c]}}return e},_openItem:function(s,r,q){if(s==null||r==null){return false}if(r.isOpen){return false}if(r.disabled){return false}if(s.disabled){return false}var l=s.popupZIndex;if(q!=undefined){l=q}var e=s.animationHideDuration;s.animationHideDuration=0;s._closeItem(s,r,true,true);s.animationHideDuration=e;a(r.element).focus();var f=[5,5];var t=a(r.subMenuElement);if(t!=null){t.stop()}if(t.data("timer")&&t.data("timer").hide!=null){clearTimeout(t.data("timer").hide)}var o=t.closest("div.jqx-menu-popup");var h=a(r.element);var i=r.level==0?this._getOffset(r.element):h.position();if(r.level>0&&this.hasTransform){var p=parseInt(h.coord().top)-parseInt(this._getOffset(r.element).top);i.top+=p}if(r.level==0&&this.mode=="popup"){i=h.coord()}var j=r.level==0&&this.mode=="horizontal";var b=j?i.left:this.menuElements[r.parentId]!=null&&this.menuElements[r.parentId].subMenuElement!=null?parseInt(a(a(this.menuElements[r.parentId].subMenuElement).closest("div.jqx-menu-popup")).outerWidth())-f[0]:parseInt(t.outerWidth());o.css({visibility:"visible",display:"block",left:b,top:j?i.top+h.outerHeight():i.top,zIndex:l});t.css("display","block");if(this.mode!="horizontal"&&r.level==0){var d=this._getOffset(this.element);o.css("left",-1+d.left+this.host.outerWidth());t.css("left",-t.outerWidth())}else{var c=this._getClosedSubMenuOffset(r);t.css("left",c.left);t.css("top",c.top)}o.css({height:parseInt(t.outerHeight())+parseInt(f[1])+"px"});var n=0;var g=0;switch(r.openVerticalDirection){case"up":if(j){t.css("top",t.outerHeight());n=f[1];var k=parseInt(t.parent().css("padding-bottom"));if(isNaN(k)){k=0}if(k>0){o.addClass(this.toThemeProperty("jqx-menu-popup-clear"))}t.css("top",t.outerHeight()-k);o.css({display:"block",top:i.top-o.outerHeight(),zIndex:l})}else{n=f[1];t.css("top",t.outerHeight());o.css({display:"block",top:i.top-o.outerHeight()+f[1]+h.outerHeight(),zIndex:l})}break;case"center":if(j){t.css("top",0);o.css({display:"block",top:i.top-o.outerHeight()/2+f[1],zIndex:l})}else{t.css("top",0);o.css({display:"block",top:i.top+h.outerHeight()/2-o.outerHeight()/2+f[1],zIndex:l})}break}switch(r.openHorizontalDirection){case this._getDir("left"):if(j){o.css({left:i.left-(o.outerWidth()-h.outerWidth()-f[0])})}else{g=0;t.css("left",o.outerWidth());o.css({left:i.left-(o.outerWidth())+2*r.level})}break;case"center":if(j){o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)})}else{o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)});t.css("left",o.outerWidth())}break}if(j){if(parseInt(t.css("top"))==n){r.isOpen=true;return}}else{if(parseInt(t.css("left"))==g){r.isOpen==true;return}}a.each(s._getSiblings(r),function(){s._closeItem(s,this,true,true)});var m=a.data(s.element,"animationHideDelay");s.animationHideDelay=m;if(this.autoCloseInterval>0){if(this.host.data("autoclose")!=null&&this.host.data("autoclose").close!=null){clearTimeout(this.host.data("autoclose").close)}if(this.host.data("autoclose")!=null){this.host.data("autoclose").close=setTimeout(function(){s._closeAll()},this.autoCloseInterval)}}if(t.data("timer")){t.data("timer").show=setTimeout(function(){if(o!=null){if(j){t.stop();t.css("left",g);if(!a.jqx.browser.msie){}h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));if(r.openVerticalDirection=="down"){a(r.element).addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("show"))}else{a(r.element).addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("show"))}var u=a(r.arrow);if(u.length>0&&s.showTopLevelArrows){u.removeClass();if(r.openVerticalDirection=="down"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-down-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-down"))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-up-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-up"))}}if(s.animationShowDuration==0){t.css({top:n});r.isOpen=true;s._raiseEvent("0",r);a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({top:n},s.animationShowDuration,s.easing,function(){r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true);s._raiseEvent("0",r)})}}else{t.stop();t.css("top",n);o.addClass(s.toThemeProperty("show"));if(!a.jqx.browser.msie){}if(r.level>0){h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}else{h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}if(!a.jqx.browser.msie){}if(s.animationShowDuration==0){t.css({left:g});s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({left:g},s.animationShowDuration,s.easing,function(){s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)})}}}},this.animationShowDelay)}},_getDir:function(b){switch(b){case"left":return !this.rtl?"left":"right";case"right":return this.rtl?"left":"right"}return"left"},_applyOrientation:function(i,d){var g=this;var f=0;g.host.removeClass(g.toThemeProperty("jqx-menu-horizontal"));g.host.removeClass(g.toThemeProperty("jqx-menu-vertical"));g.host.removeClass(g.toThemeProperty("jqx-menu"));g.host.removeClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-menu"));if(i!=undefined&&d!=undefined&&d=="popup"){if(g.host.parent().length>0&&g.host.parent().parent().length>0&&g.host.parent().parent()[0]==document.body){var h=a.data(document.body,"jqxMenuOldHost"+g.element.id);if(h!=null){var e=g.host.closest("div.jqx-menu-wrapper");e.remove();e.appendTo(h);g.host.css("display","block");g.host.css("visibility","visible");e.css("display","block");e.css("visibility","visible")}}}else{if(i==undefined&&d==undefined){a.data(document.body,"jqxMenuOldHost"+g.element.id,g.host.parent()[0])}}if(g.autoOpenPopup){if(g.mode=="popup"){g.addHandler(a(document),"contextmenu."+g.element.id,function(j){return false});g.addHandler(a(document),"mousedown.menu"+g.element.id,function(j){g._openContextMenu(j)})}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id)}}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id);g.addHandler(a(document),"contextmenu."+g.element.id,function(j){if(j.target&&j.target.className.indexOf&&j.target.className.indexOf("jqx-menu")>=0){return false}})}if(g.rtl){g.host.addClass(g.toThemeProperty("jqx-rtl"))}switch(g.mode){case"horizontal":g.host.addClass(g.toThemeProperty("jqx-widget-header"));g.host.addClass(g.toThemeProperty("jqx-menu-horizontal"));a.each(g.items,function(){var m=this;var k=a(m.element);var l=a(m.arrow);l.removeClass();if(m.hasItems&&m.level>0){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');l.prependTo(k);l.css("float",g._getDir("right"));l.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));l.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")));m.arrow=l[0]}if(m.level==0){a(m.element).css("float",g._getDir("left"));if(!m.ignoretheme&&m.hasItems&&g.showTopLevelArrows){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');var j=a.jqx.browser.msie&&a.jqx.browser.version<8;if(m.arrow==null){if(!j){l.prependTo(k)}else{l.appendTo(k)}}else{l=a(m.arrow)}if(m.openVerticalDirection=="down"){l.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));l.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{l.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));l.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}l.css("visibility","inherit");if(!j){l.css("display","block");l.css("float","right")}else{l.css("display","inline-block")}m.arrow=l[0]}else{if(!m.ignoretheme&&m.hasItems&&!g.showTopLevelArrows){if(m.arrow!=null){var l=a(m.arrow);l.remove();m.arrow=null}}}f=Math.max(f,k.height())}});break;case"vertical":case"popup":case"simple":g.host.addClass(g.toThemeProperty("jqx-menu-vertical"));a.each(g.items,function(){var l=this;var j=a(l.element);if(l.hasItems&&!l.ignoretheme){if(l.arrow){a(l.arrow).remove()}if(g.mode=="simple"){return true}var k=a('<span style="border: none; background-color: transparent;" id="arrow'+j[0].id+'"></span>');k.prependTo(j);k.css("float","right");if(l.level==0){k.addClass(g.toThemeProperty("jqx-menu-item-arrow-top-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}else{k.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}l.arrow=k[0]}j.css("float","none")});if(g.mode=="popup"){g.host.addClass(g.toThemeProperty("jqx-widget-content"));g.host.wrap('<div tabindex=0 class="jqx-menu-wrapper" style="z-index:'+g.popupZIndex+'; border: none; background-color: transparent; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var e=g.host.closest("div.jqx-menu-wrapper");g.host.addClass(g.toThemeProperty("jqx-popup"));e[0].id="menuWrapper"+g.element.id;e.appendTo(a(document.body));g.addHandler(e,"keydown",function(j){return g.handleKeyDown(j)})}else{g.host.addClass(g.toThemeProperty("jqx-widget-header"))}if(g.mode=="popup"){var b=g.host.height();g.host.css("position","absolute");g.host.css("top","0");g.host.css("left","0");if(g.mode!="simple"){g.host.height(b);g.host.css("display","none")}}break}var c=g.isTouchDevice();if(g.autoCloseOnClick){g.removeHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick);g.addHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick,g);if(c){g.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g);g.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g)}}},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},_getOffset:function(c){var e=a.jqx.mobile.isSafariMobileBrowser();var i=a(c).coord(true);var h=i.top;var g=i.left;if(a("body").css("border-top-width")!="0px"){h=parseInt(h)+this._getBodyOffset().top}if(a("body").css("border-left-width")!="0px"){g=parseInt(g)+this._getBodyOffset().left}var d=a.jqx.mobile.isWindowsPhone();var f=a.jqx.mobile.isTouchDevice();if(this.hasTransform||(e!=null&&e)||d||f){var b={left:a.jqx.mobile.getLeftPos(c),top:a.jqx.mobile.getTopPos(c)};return b}else{return{left:g,top:h}}},_isRightClick:function(c){var b;if(!c){var c=window.event}if(c.which){b=(c.which==3)}else{if(c.button){b=(c.button==2)}}return b},_openContextMenu:function(d){var c=this;var b=c._isRightClick(d);if(b){c.open(parseInt(d.clientX)+5,parseInt(d.clientY)+5)}},close:function(){var c=this;if(!this.element){return}var d=a.data(this.element,"contextMenuOpened"+this.element.id);if(d){var b=this.host;c.host.removeClass("jqx-popup-show");a.each(c.items,function(){var e=this;if(e.hasItems){c._closeItem(c,e)}});a.each(c.items,function(){var f=this;if(f.isOpen==true){var e=a(f.subMenuElement);var g=e.closest("div.jqx-menu-popup");g.hide(this.animationHideDuration)}});this.host.hide(this.animationHideDuration);a.data(c.element,"contextMenuOpened"+this.element.id,false);c._raiseEvent("1",c);c._raiseEvent("5")}},open:function(e,d){if(this.mode=="popup"){var c=0;if(this.host.css("display")=="block"){this.close();c=this.animationHideDuration}var b=this;if(e==undefined||e==null){e=0}if(d==undefined||d==null){d=0}setTimeout(function(){b.host.show(b.animationShowDuration);b.host.css("visibility","visible");b.host.addClass("jqx-popup-show");a.data(b.element,"contextMenuOpened"+b.element.id,true);b._raiseEvent("0",b);b._raiseEvent("4",{left:e,top:d});b.host.css("z-index",b.popupZIndex);if(e!=undefined&&d!=undefined){b.host.css({left:e,top:d})}b.focus()},c)}},_renderHover:function(c,e,b){var d=this;if(!e.ignoretheme){this.addHandler(c,"mouseenter",function(){d.hoveredItem=e;if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}});this.addHandler(c,"mouseleave",function(){if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}})}},_closeAfterClick:function(c){var b=c!=null?c.data:this;var d=false;if(b.autoCloseOnClick){a.each(a(c.target).parents(),function(){if(this.className.indexOf){if(this.className.indexOf("jqx-menu")!=-1){d=true;return false}}});if(!d){c.data=b;b._closeAll(c)}}},_autoSizeHorizontalMenuItems:function(){var c=this;if(c.autoSizeMainItems&&this.mode=="horizontal"){var b=this.maxHeight;if(parseInt(b)>parseInt(this.host.height())){b=parseInt(this.host.height())}b=parseInt(this.host.height());a.each(this.items,function(){var m=this;var j=a(m.element);if(m.level==0&&b>0){var d=j.children().length>0?parseInt(j.children().height()):j.height();var g=c.host.find("ul:first");var h=parseInt(g.css("padding-top"));var n=parseInt(g.css("margin-top"));var k=b-2*(n+h);var i=parseInt(k)/2-d/2;var e=parseInt(i);var l=parseInt(i);j.css("padding-top",e);j.css("padding-bottom",l);if(parseInt(j.outerHeight())>k){var f=1;j.css("padding-top",e-f);e=e-f}}})}a.each(this.items,function(){var g=this;var e=a(g.element);if(g.hasItems&&g.level>0){if(g.arrow){var f=a(g.arrow);var d=a(g.element).height();if(d>15){f.css("margin-top",(d-15)/2)}}}})},_nextVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.nextItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_prevVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.prevItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_parentItem:function(d){if(d==null||d==undefined){return null}var c=d.parentElement;if(!c){return null}var b=null;a.each(this.items,function(){if(this.element==c){b=this;return false}});return b},_isElementVisible:function(b){if(b==null){return false}if(a(b).css("display")!="none"&&a(b).css("visibility")!="hidden"){return true}return false},_isVisible:function(c){if(c==null||c==undefined){return false}if(!this._isElementVisible(c.element)){return false}var b=this._parentItem(c);if(b==null){return true}if(this.minimized){return true}if(b!=null){if(!this._isElementVisible(b.element)){return false}if(b.isOpen||this.minimized){while(b!=null){b=this._parentItem(b);if(b!=null&&!this._isElementVisible(b.element)){return false}if(b!=null&&!b.isOpen){return false}}}else{return false}}return true},_render:function(f,g){if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-menu-disabled"))}if(this.host.attr("tabindex")==undefined){this.host.attr("tabindex",0)}var i=this.popupZIndex;var d=[5,5];var h=this;a.data(h.element,"animationHideDelay",h.animationHideDelay);var e=this.isTouchDevice();var c=e&&(a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("Touch")>=0);var j=false;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0){this.touchDevice=true}else{if(navigator.userAgent.indexOf("Touch")>=0){var b=("MSPointerDown" in window);if(b||a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("ARM")>=0){j=true;c=true;h.clickToOpen=true;h.autoCloseOnClick=false;h.enableHover=false}}}}a.data(document.body,"menuel",this);this.hasTransform=a.jqx.utilities.hasTransform(this.host);this._applyOrientation(f,g);this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus");this.addHandler(this.host,"blur",function(k){if(h.keyboardNavigation){if(h.activeItem){if(h.mode==="popup"){if(document.activeElement&&document.activeElement.className.indexOf("jqx-menu-wrapper")>=0){return}}a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}});this.addHandler(this.host,"focus",function(k){if(h.keyboardNavigation){if(!h.activeItem){if(h.hoveredItem){a(h.hoveredItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.hoveredItem}else{var l=function(){if(!a.jqx.isHidden(a(h.items[0].element))){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0]}else{var m=h._nextVisibleItem(h.items[0],0);if(m){a(m.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=m}}};if(!h.activeItem){l()}else{if(!a.jqx.isHidden(a(h.activeItem.element))){a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"))}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));l()}}}}}});this.removeHandler(this.host,"keydown.menu"+this.element.id);h.handleKeyDown=function(k){if(h.keyboardNavigation){if(k.target.nodeName.toLowerCase()==="input"){return true}var q=null;var o=null;a.each(h.items,function(){var A=this;if(this.disabled){return true}if(this.element.className.indexOf("pressed")>=0){o=this}if(this.element.className.indexOf("focus")>=0){q=this;return false}});if(!q&&o){q=o;return false}if(!q){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0];q=h.activeItem;return false}var t=false;if(k.keyCode==27){k.data=h;h._closeAll(k);if(q){var z=q;while(z!=null){if(z.parentItem){z=z.parentItem}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=z;a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));z=z.parentItem}}}t=true}if(k.keyCode==13){if(q){t=true;h._raiseEvent("2",{item:q.element,event:k,type:"keyboard"});var r=q.anchor!=null?a(q.anchor):null;if(r!=null&&r.length>0){var l=r.attr("href");var u=r.attr("target");if(l!=null){if(u!=null){window.open(l,u)}else{window.location=l}}}k.preventDefault();k.stopPropagation();a(q.element).focus()}}var n=function(D){if(D==null){return new Array()}var C=new Array();var A=0;for(var B=0;B<h.items.length;B++){if(h.items[B].parentId==D.parentId){C[A++]=h.items[B]}}return C};var v="";switch(k.keyCode){case 40:v="down";break;case 38:v="up";break;case 39:v="right";break;case 37:v="left";break}if(q&&q.openHorizontalDirection==="left"&&v==="left"){v="right"}if(q&&q.openHorizontalDirection==="left"&&v==="right"){v="left"}if(q&&q.openVerticalDirection==="top"&&v==="top"){v="bottom"}if(q&&q.openVerticalDirection==="top"&&v==="bottom"){v="top"}if(h.rtl){if(v==="right"){v="left"}else{if(v==="left"){v="right"}}}if(v==="right"&&!h.minimized){if(k.altKey&&(q.level!=0&&q.hasItems||h.mode!="horizontal")){h._openItem(h,q)}else{var x=h._nextVisibleItem(q,0);var m=h._nextVisibleItem(q);var w=n(m);if(!x){x=m}if(x&&((x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")||(m.id==w[0].id&&m.level!=0))){if(m.id==w[0].id&&((q.level!=0)||(q.level==0&&h.mode!="horizontal"))){x=m}a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}k.preventDefault();k.stopPropagation()}if(v==="left"&&!h.minimized){if(k.altKey&&((q.level!=0&&h.mode!=="horizontal")||(q.level>1&&h.mode==="horizontal")||(q.level==1&&q.hasItems&&h.mode==="horizontal"))){if(q.hasItems){h._closeItem(h,q)}else{if(q.parentItem){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}}}else{var x=h._prevVisibleItem(q,0);var y=q.parentItem;if(x&&(x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(!(y&&y.level==0&&h.mode=="horizontal")&&y&&y.level==q.level-1){a(y.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=y}}}k.preventDefault();k.stopPropagation()}if(v==="down"){if(k.altKey){if(q.level==0&&q.hasItems){h._openItem(h,q)}if(h.minimized){if(h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._nextVisibleItem(q,q.level);var w=n(x);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==w[0].id&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}if(h.mode==="horizontal"&&q.level===0&&q.isOpen&&q.hasItems){var x=h._nextVisibleItem(q);a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}k.preventDefault();k.stopPropagation()}else{if(v==="up"){if(k.altKey){if(q.parentItem&&q.parentItem.level==0){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}else{if(q.parentItem===null&&q.level===0&&h.mode==="horizontal"){h._closeItem(h,q)}}if(h.minimized){if(!h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._prevVisibleItem(q,q.level);var w=n(q);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==q.parentId&&x.level==0&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode==="horizontal"&&q.level===0)){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}else{if(q&&q.id==w[0].id&&q.parentItem&&q.parentItem.level===0&&h.mode==="horizontal"){var x=q.parentItem;a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}}k.preventDefault();k.stopPropagation()}}if(k.keyCode==9){var x=k.shiftKey?h._prevVisibleItem(q):h._nextVisibleItem(q);if(x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x;k.preventDefault();k.stopPropagation()}else{if(h.lockFocus){var w=new Array();var s=0;for(var p=0;p<h.items.length;p++){if(h.items[p]==q){continue}if(h.items[p].parentId==q.parentId){w[s++]=h.items[p]}}if(w.length>0){if(k.shiftKey){a(w[w.length-1].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[w.length-1]}else{a(w[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[0]}a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}k.preventDefault();k.stopPropagation()}else{if(q){a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}}}}else{return true}};this.addHandler(this.host,"keydown.menu"+this.element.id,function(k){h.handleKeyDown(k)});if(h.enableRoundedCorners){this.host.addClass(h.toThemeProperty("jqx-rc-all"))}a.each(this.items,function(){var r=this;var n=a(r.element);n.attr("role","menuitem");if(h.enableRoundedCorners){n.addClass(h.toThemeProperty("jqx-rc-all"))}h.removeHandler(n,"click");h.addHandler(n,"click",function(w){if(r.disabled){return}if(h.disabled){return}if(h.keyboardNavigation){if(h.activeItem){a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}h.activeItem=r;a(r.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));if(h.minimized){w.stopPropagation()}}h._raiseEvent("2",{type:"mouse",item:r.element,event:w});if(!h.autoOpen){if(r.level>0){if(h.autoCloseOnClick&&!e&&!h.clickToOpen){w.data=h;h._closeAll(w)}}}else{if(h.autoCloseOnClick&&!e&&!h.clickToOpen){if(r.closeOnClick){w.data=h;h._closeAll(w)}}}if(e&&h.autoCloseOnClick){w.data=h;if(!r.hasItems){h._closeAll(w)}}if(w.target.tagName!="A"&&w.target.tagName!="a"){var u=r.anchor!=null?a(r.anchor):null;if(u!=null&&u.length>0){var t=u.attr("href");var v=u.attr("target");if(t!=null){if(v!=null){window.open(t,v)}else{window.location=t}}}}});h.removeHandler(n,"mouseenter");h.removeHandler(n,"mouseleave");if(!c&&h.mode!="simple"){h._renderHover(n,r,e)}if(r.subMenuElement!=null){var o=a(r.subMenuElement);if(h.mode=="simple"){o.show();return true}o.wrap('<div class="jqx-menu-popup '+h.toThemeProperty("jqx-menu-popup")+'" style="border: none; background-color: transparent; z-index:'+i+'; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: hidden;"><div style="background-color: transparent; border: none; position:absolute; overflow:hidden; left: 0; top: 0; right: 0; width: 100%; height: 100%;"></div></div>');o.css({overflow:"hidden",position:"absolute",left:0,display:"inherit",top:-o.outerHeight()});o.data("timer",{});if(r.level>0){o.css("left",-o.outerWidth())}else{if(h.mode=="horizontal"){o.css("left",0)}}i++;var q=a(r.subMenuElement).closest("div.jqx-menu-popup").css({width:parseInt(a(r.subMenuElement).outerWidth())+parseInt(d[0])+"px",height:parseInt(a(r.subMenuElement).outerHeight())+parseInt(d[1])+"px"});var s=n.closest("div.jqx-menu-popup");if(s.length>0){var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");q.addClass("horizontal");q.appendTo(s);o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}else{var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");if(h.mode==="horizontal"){q.addClass("top")}else{q.addClass("horizontal")}q.appendTo(a(document.body));o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}if(!h.clickToOpen){if(e||c){h.removeHandler(n,a.jqx.mobile.getTouchEventName("touchstart"));h.addHandler(n,a.jqx.mobile.getTouchEventName("touchstart"),function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen&&h.mode!="popup"){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}return false})}if(!c){h.addHandler(n,"mouseenter",function(){if(h.autoOpen||(r.level>0&&!h.autoOpen)){clearTimeout(o.data("timer").hide)}if(r.parentId&&r.parentId!=0){if(h.menuElements[r.parentId]){var t=h.menuElements[r.parentId].isOpen;if(!t){return}}}if(h.autoOpen||(r.level>0&&!h.autoOpen)){h._openItem(h,r)}return false});h.addHandler(n,"mousedown",function(){if(!h.autoOpen&&r.level==0){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}}});h.addHandler(n,"mouseleave",function(u){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);var x=a(r.subMenuElement);var t={left:parseInt(u.pageX),top:parseInt(u.pageY)};var w={left:parseInt(x.coord().left),top:parseInt(x.coord().top),width:parseInt(x.outerWidth()),height:parseInt(x.outerHeight())};var v=true;if(w.left-5<=t.left&&t.left<=w.left+w.width+5){if(w.top<=t.top&&t.top<=w.top+w.height){v=false}}if(v){h._closeItem(h,r,true)}}});h.removeHandler(q,"mouseenter");h.addHandler(q,"mouseenter",function(){clearTimeout(o.data("timer").hide)});h.removeHandler(q,"mouseleave");h.addHandler(q,"mouseleave",function(t){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);clearTimeout(o.data("timer").show);if(o!=null){o.stop()}h._closeItem(h,r,true)}})}}else{h.removeHandler(n,"mousedown");h.addHandler(n,"mousedown",function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}})}}});if(this.mode=="simple"){this._renderSimpleMode()}this._autoSizeHorizontalMenuItems();this._raiseEvent("3",this)},_renderSimpleMode:function(){this.host.show()},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;while(this.items[b]){b=Math.random()+"";b=b.replace(".","");b=b/1}return"menuItem"+b},_createMenu:function(c,f){if(c==null){return}if(f==undefined){f=true}if(f==null){f=true}var o=this;a(c).addClass("jqx-menu-ul");var u=a(c).find("li");var q=0;this.itemMapping=new Array();for(var j=0;j<u.length;j++){var m=u[j];var s=a(m);if(m.className.indexOf("jqx-menu")==-1&&this.autoGenerate==false){continue}var p=m.id;if(!p){p=this.createID()}if(f){m.id=p;this.items[q]=new a.jqx._jqxMenu.jqxMenuItem();this.menuElements[p]=this.items[q]}q+=1;var t=0;var x=this;var h=s.children();h.each(function(){if(!f){this.className="";if(x.autoGenerate){a(x.items[q-1].subMenuElement)[0].className="";if(!x.minimized){a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-widget-content"))}a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-popup"))}}if(this.className.indexOf("jqx-menu-dropdown")!=-1){if(f){x.items[q-1].subMenuElement=this}return false}else{if(x.autoGenerate&&(this.tagName=="ul"||this.tagName=="UL")){if(f){x.items[q-1].subMenuElement=this}this.className="";if(!x.minimized){a(this).addClass(x.toThemeProperty("jqx-widget-content"))}a(this).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(this).addClass(x.toThemeProperty("jqx-popup"));a(this).attr("role","menu");if(x.rtl){a(this).addClass(x.toThemeProperty("jqx-rc-l"))}else{a(this).addClass(x.toThemeProperty("jqx-rc-r"))}a(this).addClass(x.toThemeProperty("jqx-rc-b"));return false}}});var w=s.parents();w.each(function(){if(this.className.indexOf("jqx-menu-item")!=-1){t=this.id;return false}else{if(x.autoGenerate&&(this.tagName=="li"||this.tagName=="LI")){t=this.id;return false}}});var e=false;var d=m.getAttribute("type");var b=m.getAttribute("ignoretheme")||m.getAttribute("data-ignoretheme");if(b){if(b=="true"||b==true){b=true}}else{b=false}if(!d){d=m.type}else{if(d=="separator"){var e=true}}if(!e){if(t){d="sub"}else{d="top"}}var g=this.items[q-1];if(f){g.id=p;g.parentId=t;g.type=d;g.separator=e;g.element=u[j];var l=s.children("a");g.disabled=m.getAttribute("item-disabled")=="true"?true:false;g.level=s.parents("li").length;g.anchor=l.length>0?l:null;if(g.anchor){a(g.anchor).attr("tabindex",-1)}}g.ignoretheme=b;var n=this.menuElements[t];if(n!=null){if(n.ignoretheme){g.ignoretheme=n.ignoretheme;b=n.ignoretheme}g.parentItem=n;g.parentElement=n.element}if(this.autoGenerate){if(d=="separator"){s.removeClass();s.addClass(this.toThemeProperty("jqx-menu-item-separator"));s.attr("role","separator")}else{if(!b){if(s[0].className.indexOf("jqx-grid-menu-item-touch")>=0){s[0].className=this.toThemeProperty("jqx-grid-menu-item-touch")}else{s[0].className=""}if(this.rtl){s.addClass(this.toThemeProperty("jqx-rtl"))}if(g.level>0&&!x.minimized){s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item"))}else{s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item-top"))}}}}if(g.disabled){s.addClass(x.toThemeProperty("jqx-menu-item-disabled"));s.addClass(x.toThemeProperty("jqx-fill-state-disabled"))}this.itemMapping[j]={element:u[j],item:g};this.itemMapping["id"+u[j].id]=this.itemMapping[j];if(f&&!b){g.hasItems=s.find("li").length>0;if(g.hasItems){if(g.element){a.jqx.aria(a(g.element),"aria-haspopup",true);if(!g.subMenuElement.id){g.subMenuElement.id=a.jqx.utilities.createId()}a.jqx.aria(a(g.element),"aria-owns",g.subMenuElement.id)}}}}for(var r=0;r<u.length;r++){var v=u[r];if(this.itemMapping["id"+v.id]){var g=this.itemMapping["id"+v.id].item;if(!g){continue}g.prevItem=null;g.nextItem=null;if(r>0){if(this.itemMapping["id"+u[r-1].id]){g.prevItem=this.itemMapping["id"+u[r-1].id].item}}if(r<u.length-1){if(this.itemMapping["id"+u[r+1].id]){g.nextItem=this.itemMapping["id"+u[r+1].id].item}}}}},destroy:function(){var b=this;a.jqx.utilities.resize(b.host,null,true);var d=b.host.closest("div.jqx-menu-wrapper");b.removeHandler(d,"keydown");d.remove();b.removeHandler(a("#menuWrapper"+b.element.id),"keydown");a("#menuWrapper"+b.element.id).remove();b.removeHandler(b.host,"keydown");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(a(document),"mousedown.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"mouseup.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"contextmenu."+b.element.id);b.removeHandler(b.host,"contextmenu."+b.element.id);a.data(document.body,"jqxMenuOldHost"+b.element.id,null);if(b.isTouchDevice()){b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+b.element.id,b._closeAfterClick,this)}if(a(window).off){a(window).off("resize.menu"+b.element.id)}a.each(b.items,function(){var g=this;var f=a(g.element);b.removeHandler(f,"click");b.removeHandler(f,"selectstart");b.removeHandler(f,"mouseenter");b.removeHandler(f,"mouseleave");b.removeHandler(f,"mousedown");b.removeHandler(f,"mouseleave");var e=a(g.subMenuElement);var h=e.closest("div.jqx-menu-popup");h.remove();delete this.subMenuElement;delete this.element});a.data(document.body,"menuel",null);delete b.menuElements;b.items=new Array();delete b.items;var c=a.data(b.element,"jqxMenu");if(c){delete c.instance}b.host.removeClass();b.host.remove();delete b.host;delete b.element},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c;e.owner=this;var f=new a.Event(d);if(g=="2"){e=c.item;e.owner=this;e.clickType=c.type;a.extend(f,c.event);f.type="itemclick"}f.owner=this;f.args=e;var b=this.host.trigger(f);return b},propertiesChangedHandler:function(b,c,e){if(e.width&&e.height&&Object.keys(e).length==2){b._setSize();if(b.mode==="popup"){var d=this.host.closest("div.jqx-menu-wrapper");d[c](e);var f=this.host[0].id;a("#"+f)[c](e)}}},propertyChangedHandler:function(b,d,h,g){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(d=="disabled"){if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.addClass(b.toThemeProperty("jqx-menu-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.removeClass(b.toThemeProperty("jqx-menu-disabled"))}}if(g==h){return}if(d=="touchMode"){this._isTouchDevice=null;b._render(g,h)}if(d==="width"||d==="height"){b._setSize();if(b.mode==="popup"){var e=this.host.closest("div.jqx-menu-wrapper");e[d](g);var i=this.host[0].id;a("#"+i)[d](g)}return}if(d=="source"){if(b.source!=null){var c=b.loadItems(b.source);b.element.innerHTML=c;var f=b.host.find("ul:first");if(f.length>0){b.refresh();b._createMenu(f[0]);b._render()}}}if(d=="autoCloseOnClick"){if(g==false){b.removeHandler(a(document),"mousedown.menu"+this.element.id,b._closeAll)}else{b.addHandler(a(document),"mousedown.menu"+this.element.id,b,b._closeAll)}}else{if(d=="mode"||d=="width"||d=="height"||d=="showTopLevelArrows"){b.refresh();if(d=="mode"){b._render(g,h)}else{b._applyOrientation()}}else{if(d=="theme"){a.jqx.utilities.setTheme(h,g,b.host)}}}}})})(jqxBaseFramework);(function(a){a.jqx._jqxMenu.jqxMenuItem=function(e,d,c){var b={id:e,parentId:d,parentItem:null,anchor:null,type:c,disabled:false,level:0,isOpen:false,hasItems:false,element:null,subMenuElement:null,arrow:null,openHorizontalDirection:"right",openVerticalDirection:"down",closeOnClick:true};return b}})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
package/jqwidgets/jqxnavbar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNavBar","",{});a.extend(a.jqx._jqxNavBar.prototype,{defineInstance:function(){var b={height:"auto",minimizedHeight:30,popupAnimationDelay:250,minimizeButtonPosition:"left",width:"100%",selectedItem:0,selection:true,disabled:false,rtl:false,minimized:false,columns:null,minimizedTitle:"",orientation:"horizontal",events:["change"]};if(this===a.jqx._jqxNavBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){var b=this;if(b.ul&&b.ul.parent()[0]!==b.element){b.ul.detach();b.host.children().remove();b.host.append(b.ul);if(b.popup){b.popup.remove()}b.host.height(null);b.host.removeClass(b.toThemeProperty("jqx-widget-header"));b.host.removeClass(b.toThemeProperty("jqx-navbar-minimized"))}b.ul=b.host.children();b._items=b.ul.children();a.each(b._items,function(){a(this).removeClass()});if(this.width!==null&&(this.width.toString().indexOf("%")>=0||this.width.toString().indexOf("px")>=0)){this.element.style.width=this.width}else{this.element.style.width=this.width+"px"}b._layoutItems();b._addClasses();b._addHandlers();b._handleMinimize();a.jqx.utilities.resize(this.host,function(){b._resizePopup()})},_layoutItems:function(){var k=this;var t=1;var s=0;var o=this.height===null||this.height==="auto";if(k.orientation==="horizontal"){if(k._items.length>5){var c=50+"%";k._items.css("width",c);var q=k.height;t=Math.ceil(k._items.length/2);if(!o){var p;var h=false;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}s=2;if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}}else{var c=k.host.width/2;var g=k._items.length;var c=100/g+"%";k._items.css("width",c);if(!o){if(k.height.toString().indexOf("%")>=0){k._items.css("height",p);k._items.css("line-height",k.height)}else{k._items.height(k.height);k._items.css("line-height",parseInt(k.height)+"px")}}s=g}if(k.columns){var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width",k.columns[l]);l++;if(l>=k.columns.length){l=0;if(k.columns.length!==k._items.length){t++}}}var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(!o){if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=k.columns.length}}else{var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width","100%")}t=k._items.length;if(!o){var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=1}if(k.selection){var b=0;var f=k._items.length/s;var n=false;if(f<t){n=true}for(var e=0;e<t;e++){for(var d=0;d<s;d++){if(d<s-1){var m=k.rtl?"left":"right";a(k._items[b]).css("border-"+m+"-width","1px");a(k._items[b]).css("border-"+m+"-style","solid")}if(t>1&&e>0){a(k._items[b]).css("border-top-width","1px");a(k._items[b]).css("border-top-style","solid")}if(n&&e===t-2&&d===s-1){a(k._items[b]).css("border-bottom-width","1px");a(k._items[b]).css("border-bottom-style","solid")}b++}}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){k._items.css("padding-left","0px");k._items.css("padding-right","0px");a.each(k._items,function(){a(this).css("border-left-width","0px");a(this).css("border-right-width","0px");a(this).css("position","relative");a(this).css("margin-left","-1px")});k.host.css("border","none")}},_handlePopupHeight:function(){var b=this;if(!b.minimized){return}var d;var c=false;if(b.height.toString().indexOf("%")>=0){b.host.css("height",b.height);d=b.host.height()-b.minimizedHeight-1;c=true}if(c){b.popup.height(d);b.ul.height(d);b.host.height(b.minimizedHeight);b._layoutItems()}},_handleMinimize:function(){var d=this;if(d.minimized){var f=d.host;f.height(d.minimizedHeight);f.css("box-sizing","border-box");f.addClass(d.toThemeProperty("jqx-widget-header"));f.addClass(d.toThemeProperty("jqx-navbar-minimized"));var c=a('<div style="cursor: pointer; height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');f.append(c);c.css("float",d.minimizeButtonPosition);var e=a('<div style="height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');e.append(d.minimizedTitle);e.css("float",d.minimizeButtonPosition==="left"?"right":"left");if(d.minimizedHeight!=="auto"){if(d.minimizedHeight.toString().indexOf("%")>=0){e.css("line-height",d.minimizedHeight)}else{e.css("line-height",parseInt(d.minimizedHeight)+"px")}}f.append(e);c.addClass(d.toThemeProperty("jqx-menu-minimized-button"));f.removeClass(d.toThemeProperty("jqx-widget-content"));d.ul.detach();var b=a("<div style='box-sizing: border-box; z-index: 999999; display: none; position: absolute;'></div>");b.addClass(d.toThemeProperty("jqx-widget jqx-widget-content jqx-popup jqx-navbar jqx-navbar-popup"));b.append(d.ul);d.popup=b;a(document.body).append(b);d.opened=false;c.click(function(){if(!d.opened){d.open()}else{d.close()}});d.button=c}},close:function(){var b=this;b.popup.fadeOut(b.popupAnimationDelay);b.opened=false},open:function(){var b=this;b.popup.fadeIn(b.popupAnimationDelay);b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b._handlePopupHeight();b.opened=true},_resizePopup:function(){var b=this;if(b.minimized&&b.popup){b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b._handlePopupHeight()}},selectAt:function(c){var d=this;if(!d.selection){return}a(d._items[d.selectedItem]).removeClass(d.toThemeProperty("jqx-fill-state-pressed"));a(d._items[c]).addClass(d.toThemeProperty("jqx-fill-state-pressed"));var b=d.selectedItem;d.selectedItem=c;d._raiseEvent("0",{selectedItem:c,oldSelectedItem:b})},getSelectedIndex:function(){return this.selectedItem},destroy:function(){var b=this;b._removeHandlers();b.host.remove()},propertyChangedHandler:function(b,c,e,d){b.render()},_raiseEvent:function(h,e){var g=this;var c=g.events[h];var f=new a.Event(c);f.owner=g;f.args=e;try{var b=g.host.trigger(f)}catch(d){}return b},_removeHandlers:function(){var b=this;b.removeHandler(b._items,"click.navbar"+b.element.id);b.removeHandler(b._items,"mouseenter.navbar"+b.element.id);b.removeHandler(b._items,"mouseleave.navbar"+b.element.id)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-navbar"));if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}b._items.addClass(b.toThemeProperty("jqx-navbar-block"));b.host.addClass(b.toThemeProperty("jqx-widget"));b.host.addClass(b.toThemeProperty("jqx-widget-content"));b.host.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-button"));if(b.selectedItem!==-1&&b.selection){a(b._items[b.selectedItem]).addClass(b.toThemeProperty("jqx-fill-state-pressed"))}if(b.selection===false){this.host.css("border","none")}if(b.rtl){b._items.addClass(b.toThemeProperty("jqx-navbar-block-rtl"))}},_addHandlers:function(){var b=this;b.addHandler(b._items,"click.navbar"+b.element.id,function(d){if(!b.disabled&&b.selection){var c=a(b._items).index(this);b.selectAt(c)}});b.addHandler(b._items,"mouseenter.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).addClass(b.toThemeProperty("jqx-fill-state-hover"))}});b.addHandler(b._items,"mouseleave.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).removeClass(b.toThemeProperty("jqx-fill-state-hover"))}})}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNavigationBar","",{});a.extend(a.jqx._jqxNavigationBar.prototype,{defineInstance:function(){var b={width:"auto",height:"auto",expandAnimationDuration:250,collapseAnimationDuration:250,animationType:"slide",toggleMode:"click",showArrow:true,arrowPosition:"right",disabled:false,initContent:null,rtl:false,easing:"easeInOutSine",expandMode:"singleFitHeight",expandedIndexes:[],_expandModes:["singleFitHeight","single","multiple","toggle","none"],aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["expandingItem","expandedItem","collapsingItem","collapsedItem"]};if(this===a.jqx._jqxNavigationBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);this.render()},val:function(b){if(arguments.length===0||typeof(b)=="object"){return this.expandedIndexes}if(typeof b=="string"){this.expandedIndexes.push(parseInt(b,10));this._applyExpandedIndexes()}else{if(b instanceof Array){this.expandedIndexes=b}else{this.expandedIndexes=[b]}this._applyExpandedIndexes()}return this.expandedIndexes},expandAt:function(b){var f=this;if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"){for(var c=0;c<f.items.length;c++){if(c!=b){f.collapseAt(c)}}}var g=this.items[b];if(g.disabled===false&&g.expanded===false&&g._expandChecker==1){g._expandChecker=0;this._raiseEvent("0",{item:b});g._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-normal"));g._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));g._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-down jqx-icon-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-selected jqx-expander-arrow-top"));g._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(this.heightFlag===false){f.element.style.overflowX="hidden";f.element.style.overflowY="hidden"}this.eCFlag=1;switch(this.animationType){case"slide":var e=g._contentHelper,h=0,d=e.outerHeight();e.slideDown({duration:this.expandAnimationDuration,easing:this.easing,step:function(i,j){j.now=Math.round(i);if(j.prop!=="height"){h+=j.now}else{if(f._collapseContent){j.now=Math.round(d-f._collapseContent.outerHeight()-h);h=0}else{j.now=Math.round(i)}}},complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}});break;case"fade":setTimeout(function(){g._contentHelper.fadeIn({duration:this.expandAnimationDuration,complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}})},this.collapseAnimationDuration);break;case"none":g._content.style.display="";g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);this._updateExpandedIndexes();this._raiseEvent("1",{item:b});this._checkHeight();if(this.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(this.initContent&&g._initialized===false){this.initContent(b);g._initialized=true}this.eCFlag=0;break}}},collapseAt:function(b){var e=this.items[b];if(e.disabled===false&&e.expanded===true&&e._expandChecker===0){var d=this;e._expandChecker=1;this._raiseEvent("2",{item:b});e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-normal"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-icon-arrow-down-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));e._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));if(this.heightFlag===false){d.element.style.overflowX="hidden";d.element.style.overflowY="hidden"}this.eCFlag=1;this._collapseContent=e._contentHelper;switch(this.animationType){case"slide":var c=e._contentHelper;c.slideUp({duration:this.collapseAnimationDuration,step:function(f,g){g.now=Math.round(f)},easing:this.easing,complete:function(){e.expanded=false;e._content.style.display="none";a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0;d._collapseContent=null}});break;case"fade":e._contentHelper.fadeOut({duration:this.collapseAnimationDuration,complete:function(){e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0}});break;case"none":e._content.style.display="none";e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);this._updateExpandedIndexes();this._raiseEvent("3",{item:b});this._checkHeight();if(this.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}this.eCFlag=0;break}}},setHeaderContentAt:function(b,c){this.items[b]._headerText.innerHTML=c},getHeaderContentAt:function(b){return this.items[b]._headerText.innerHTML},setContentAt:function(b,c){this.items[b]._content.innerHTML=c;this._checkContent(b)},getContentAt:function(b){return this.items[b]._content.innerHTML},showArrowAt:function(b){this.items[b]._arrow.style.display="block"},hideArrowAt:function(b){this.items[b]._arrow.style.display="none"},enable:function(){this.disabled=false;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",false)},disable:function(){this.disabled=true;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",true)},enableAt:function(b){this.items[b].disabled=false;this.refresh()},disableAt:function(b){this.items[b].disabled=true;this.refresh()},invalidate:function(){this.refresh()},refresh:function(c){if(c===true){return}this._removeHandlers();for(var b=0;b<this.items.length;b++){this.items[b]._arrow.style.display=this.showArrow?"block":"none"}this._updateExpandedIndexes();this._setTheme();this._setSize();this._toggle();this._keyBoard()},render:function(){this.widgetID=this.element.id;var s=this;if(this._expandModes.indexOf(this.expandMode)==-1){this.expandMode="singleFitHeight"}a.jqx.utilities.resize(this.host,function(){s._setSize()});s.element.setAttribute("role","tablist");if(this.items){this._removeHandlers();a.each(this.items,function(){this._header.className="";this._header.setAttribute("tabindex",null);this._header.style.marginTop="0px";this._headerText.className="";this._header.innerHTML=this._headerText.innerHTML;this._content.setAttribute("tabindex",null)})}this.items=[];var t=s.host.children(),p=t.length;var w="Invalid jqxNavigationBar structure. Please add an even number of child div elements that will represent each item's header and content.";try{if(p%2!==0){throw w}}catch(d){throw new Error(d)}var g="Invalid jqxNavigationBar structure. Please make sure all the children elements of the navigationbar are divs.";try{for(var u=0;u<p;u++){if(t[u].tagName.toLowerCase()!="div"){throw g}}}catch(d){throw new Error(d)}for(var x=0;x<p;x+=2){var r=t[x];r.innerHTML="<div>"+r.innerHTML+"</div>"}var o=0;var h;for(var n=0;n<p/2;n++){h=o+1;var v={};v={};v._header=t[o];v._headerHelper=a(t[o]);t[o].setAttribute("role","tab");v._content=t[h];v._contentHelper=a(t[h]);if(v._contentHelper.initAnimate){v._contentHelper.initAnimate()}v.expandedFlag=false;v.expanded=false;v.focusedH=false;v.focusedC=false;this.items[n]=v;t[h].setAttribute("role","tabpanel");o+=2}var b=this.expandedIndexes.length;if(this.items&&this.items.length===0){return}if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"||this.expandMode=="none"){if(b!==0){this.items[this.expandedIndexes[0]].expanded=true}else{if(b===0&&(this.expandMode=="single"||this.expandMode=="singleFitHeight")){this.items[0].expanded=true}}}else{if(this.expandMode=="multiple"){if(b!==0){for(var f=0;f<b;f++){s.items[this.expandedIndexes[f]].expanded=true}}}}this._enabledDisabledCheck();var q=0;a.each(this.items,function(c){var i=this;i._headerText=a(i._header).children()[0];if(!s.rtl){a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content"))}else{a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content-rtl"))}i._arrow=document.createElement("div");i._arrowHelper=a(i._arrow);i._header.appendChild(i._arrow);if(s.showArrow){i._arrow.style.display="block"}else{i._arrow.style.display="none"}if(i.expanded===true){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(s.initContent){setTimeout(function(){s.initContent(c);i._initialized=true},10)}else{i._initialized=true}i._expandChecker=0;a.jqx.aria(i._header,"aria-expanded",true);a.jqx.aria(i._content,"aria-hidden",false)}else{if(i.expanded===false){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));i._initialized=false;i._expandChecker=1;i._content.style.display="none";a.jqx.aria(i._header,"aria-expanded",false);a.jqx.aria(i._content,"aria-hidden",true)}}if(i._header.getAttribute("tabindex")===null){q++;i._header.setAttribute("tabindex",q)}if(i._content.getAttribute("tabindex")===null){q++;i._content.setAttribute("tabindex",q)}});this._setTheme();this._setSize();for(var e=0;e<s.items.length;e++){s._checkContent(e)}this._toggle();this._keyBoard()},insert:function(b,g,e){var f=document.createElement("div"),c=document.createElement("div");f.innerHTML=g;c.innerHTML=e;if(b>=0&&b<=this.items.length){var d=this.items[b]._header;this.element.insertBefore(f,d);this.element.insertBefore(c,d)}else{this.element.appendChild(f);this.element.appendChild(c)}this.render()},add:function(c,b){this.insert(-1,c,b)},update:function(b,d,c){this.setHeaderContentAt(b,d);this.setContentAt(b,c)},remove:function(b){if(isNaN(b)){b=this.items.length-1}if(!this.items[b]){return}this.items[b]._header.remove();this.items[b]._content.remove();this.items.splice(b,1);var c=this.expandedIndexes.indexOf(b);if(c>-1){this.expandedIndexes.splice(c,1)}this.render()},destroy:function(){this._removeHandlers();this.host.remove()},focus:function(){try{for(var c=0;c<this.items.length;c++){var d=this.items[c];if(d.disabled===false){d._header.focus();return false}}}catch(b){}},_applyExpandedIndexes:function(){var g=this;var f=this.expandedIndexes.length;for(var d=0;d<f;d++){var h=g.expandedIndexes[d];for(var c=0;c<g.items.length;c++){var e=g.items[c];if(c==h){e.expandedFlag=true;if(e.expanded===false){g.expandAt(c)}if(g.expandMode=="single"||g.expandMode=="singleFitHeight"||g.expandMode=="toggle"||g.expandMode=="none"){return false}}else{if(c!=h&&e.expandedFlag===false){g.collapseAt(c)}}}}for(var b=0;b<g.items.length;b++){g.items[b].expandedFlag=false}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="width"||c=="height"){b._setSize();return}if(c==="theme"){b.render();return}if(c=="disabled"){b._enabledDisabledCheck()}else{if(c=="expandedIndexes"){b._applyExpandedIndexes()}else{b.refresh()}}},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;f.item=f.args.item;var b;try{b=this.host.trigger(f)}catch(d){}return b},resize:function(c,b){this.width=c;this.height=b;this._setSize()},_setSize:function(){var k=this;this.headersHeight=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}if(this.width=="auto"){k.element.style.width="auto"}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){k.element.style.width=k.width}else{k.element.style.width=(parseInt(this.width,10)+c)+"px"}}if(typeof k.height==="number"){k.element.style.height=k.height+"px"}else{k.element.style.height=k.height}for(var h=0;h<k.items.length;h++){var n=k.items[h];var f=k.arrowPosition;if(k.rtl){switch(f){case"left":f="right";break;case"right":f="left";break}}if(f=="right"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="right";n._arrow.style.position="relative"}else{if(f=="left"){if(k.width=="auto"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="17px";n._arrow.style["float"]="left";n._arrow.style.position="absolute"}else{n._headerText.style["float"]="right";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="left";n._arrow.style.position="relative"}}}n._header.style.height="auto";n._headerText.style.minHeight=n._arrow.offsetHeight;k.headersHeight+=a(n._header).outerHeight();n._arrow.style.marginTop=(n._headerText.offsetHeight/2-n._arrow.offsetHeight/2)+"px"}for(var g=0;g<k.items.length;g++){var m=k.items[g];if(k.height!="auto"){if(k.expandMode=="single"||k.expandMode=="toggle"||k.expandMode=="multiple"){k.element.style.overflowX="hidden";k.element.style.overflowY="auto"}else{if(k.expandMode=="singleFitHeight"){var l=parseInt(m._contentHelper.css("padding-top"),10)+parseInt(m._contentHelper.css("padding-bottom"),10);if(k.height&&k.height.toString().indexOf("%")>=0){m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l+2))+"px"}else{m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l))+"px"}}}}}k._checkHeight()},_toggle:function(){var b=this;if(this._isTouchDevice===false){switch(this.toggleMode){case"click":case"dblclick":a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,b.toggleMode+".navigationbar"+b.widgetID,function(){b.focusedH=true;b._animate(c)})}});break;case"none":break}}else{if(this.toggleMode!="none"){a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,a.jqx.mobile.getTouchEventName("touchstart")+"."+b.widgetID,function(){b._animate(c)})}})}else{return}}},_animate:function(c,b){var d=this;var e=this.items[c];if(this.expandMode!="none"&&this.eCFlag!=1){if(this.items[c].expanded===true){if(this.expandMode=="multiple"||this.expandMode=="toggle"){this.collapseAt(c)}}else{this.expandAt(c)}if(!d._isTouchDevice){if(b!==true){e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.addClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}}}},_removeHandlers:function(){var d=this;this.removeHandler(this.host,"keydown.navigationbar"+this.widgetID);for(var b=0;b<d.items.length;b++){var c=d.items[b];d.removeHandler(c._header,"click.navigationbar"+d.widgetID);d.removeHandler(c._header,"dblclick.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseenter.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseleave.navigationbar"+d.widgetID);d.removeHandler(c._header,"focus.navigationbar"+d.widgetID);d.removeHandler(c._header,"blur.navigationbar"+d.widgetID);d.removeHandler(c._content,"focus.navigationbar"+d.widgetID);d.removeHandler(c._content,"blur.navigationbar"+d.widgetID);d.removeHandler(c._headerText,"focus.navigationbar"+d.widgetID);d.removeHandler(c._arrow,"focus.navigationbar"+d.widgetID)}},_setTheme:function(){var b=this;this.host.addClass(this.toThemeProperty("jqx-reset jqx-widget"));if(this.rtl===true){this.host.addClass(this.toThemeProperty("jqx-rtl"))}a.each(this.items,function(e){var g=this,h=g._headerHelper,i=g._arrowHelper,c=g._contentHelper,f="jqx-widget-header jqx-item jqx-expander-header",d="jqx-widget-content jqx-expander-content jqx-expander-content-bottom";g._header.style.position="relative";g._content.style.position="relative";if(g.disabled===false){h.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));c.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));if(g.expanded===true){f+=" jqx-fill-state-pressed jqx-expander-header-expanded"}else{f+=" jqx-fill-state-normal";h.removeClass(b.toThemeProperty("jqx-expander-header-expanded"))}if(!b._isTouchDevice){b.addHandler(g._header,"mouseenter.navigationbar"+b.widgetID,function(){if(g._expandChecker==1){if(!g.focusedH){g._header.style.zIndex=5}h.removeClass(b.toThemeProperty("jqx-fill-state-normal jqx-fill-state-pressed"));h.addClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.addClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"));if(g.expanded){i.addClass(b.toThemeProperty("jqx-icon-arrow-up-hover"))}else{i.addClass(b.toThemeProperty("jqx-icon-arrow-down-hover"))}}});b.addHandler(g._header,"mouseleave.navigationbar"+b.widgetID,function(){if(!g.focusedH){g._header.style.zIndex=0}h.removeClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.removeClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-hover"));if(g._expandChecker==1){h.addClass(b.toThemeProperty("jqx-fill-state-normal"))}else{h.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}})}}else{f+=" jqx-fill-state-disabled";d+=" jqx-fill-state-disabled"}b.host.addClass(b.toThemeProperty("jqx-navigationbar"));h.addClass(b.toThemeProperty(f));c.addClass(b.toThemeProperty(d));if(e!==0){g._header.style.marginTop="-1px"}i.addClass(b.toThemeProperty("jqx-expander-arrow"))})},_checkContent:function(b){var d=this.items[b];var c=d._content;this._cntntEmpty=/^\s*$/.test(this.items[b]._content.innerHTML);if(this._cntntEmpty===true){c.style.display="none";c.style.height="0px";d._contentHelper.addClass(this.toThemeProperty("jqx-expander-content-empty"))}else{if(d.expanded){c.style.display="block"}if(this.expandMode=="singleFitHeight"){var e=1;if(b!==0){}c.style.height=Math.max(0,(this.element.offsetHeight-this.headersHeight+this.items.length-2))+"px"}else{c.style.height="auto"}d._contentHelper.removeClass(this.toThemeProperty("jqx-expander-content-empty"))}},_checkHeight:function(){var h=this;if(typeof h.width==="string"&&h.width.indexOf("%")!==-1){return}var j=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}var g=17;for(var f=0;f<h.items.length;f++){var k=h.items[f];j+=(k.expanded?k._contentHelper.outerHeight():0)+k._headerHelper.outerHeight()}if(this.width!="auto"&&this.height!="auto"&&this.expandMode!="singleFitHeight"){if(j>h.element.offsetHeight){h.element.style.width=(parseInt(this.width,10)+c+g)+"px";this.heightFlag=true}else{h.element.style.width=(parseInt(this.width,10)+c)+"px";this.heightFlag=false}}},_enabledDisabledCheck:function(){for(var b=0;b<this.items.length;b++){this.items[b].disabled=this.disabled}},_updateExpandedIndexes:function(){var b=this;this.expandedIndexes=[];a.each(this.items,function(c){var d=this;if(d.expanded===true){b.expandedIndexes.push(c);if(b.expandMode=="single"||b.expandMode=="singleFitHeight"||b.expandMode=="toggle"||b.expandMode=="none"){return false}}})},_keyBoard:function(){var b=this;this._focus();this.addHandler(this.host,"keydown.navigationbar"+this.widgetID,function(d){var e=false,c=b.items.length;a.each(b.items,function(f){var g=this;if((g.focusedH===true||g.focusedC===true)&&g.disabled===false){switch(d.keyCode){case 13:case 32:if(b.toggleMode!="none"){if(g.focusedH===true){b._animate(f,true)}e=true}break;case 37:if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}e=true;break;case 38:if(d.ctrlKey===false){if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}}else{if(g.focusedC===true){g._header.focus()}}e=true;break;case 39:if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}e=true;break;case 40:if(d.ctrlKey===false){if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}}else{if(g.expanded===true){g._content.focus()}}e=true;break;case 35:if(f!=c-1){b.items[c-1]._header.focus()}e=true;break;case 36:if(f!==0){b.items[0]._header.focus()}e=true;break}return false}});if(e&&d.preventDefault){d.preventDefault()}return !e})},_focus:function(){var b=this;if(this.disabled){return}a.each(this.items,function(){var c=this;b.addHandler(c._header,"focus.navigationbar"+this.widgetID,function(){c.focusedH=true;a.jqx.aria(c._header,"aria-selected",true);c._headerHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"));c._header.style.zIndex=10});b.addHandler(c._header,"blur.navigationbar"+this.widgetID,function(){c.focusedH=false;a.jqx.aria(c._header,"aria-selected",false);if(c._header.className.indexOf("jqx-expander-header-hover")!==-1){c._header.style.zIndex=5}else{c._header.style.zIndex=0}c._headerHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._headerText,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._arrow,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._content,"focus.navigationbar"+this.widgetID,function(){c.focusedC=true;c._contentHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._content,"blur.navigationbar"+this.widgetID,function(){c.focusedC=false;c._contentHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))})})}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNotification","",{});a.extend(a.jqx._jqxNotification.prototype,{defineInstance:function(){var b={width:"auto",height:"auto",appendContainer:null,position:"top-right",zIndex:99999,browserBoundsOffset:5,notificationOffset:5,opacity:0.9,hoverOpacity:1,autoOpen:false,animationOpenDelay:400,animationCloseDelay:800,closeOnClick:true,autoClose:true,autoCloseDelay:3000,showCloseButton:true,template:"info",icon:null,blink:false,disabled:false,rtl:false,events:["open","close","click"]};if(this===a.jqx._jqxNotification.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;c.render();if(c.autoOpen==true){c.open()}},render:function(){var c=this;if(c.host.hasClass("jqx-notification")==false){c.host.addClass(c.toThemeProperty("jqx-rc-all"));c.host.addClass(c.toThemeProperty("jqx-notification"));c.host.css({zIndex:c.zIndex,display:"none",opacity:c.opacity});c._container=c._notificationContainer();c._appendContent();c._setHoverFunctions();c._instances=new Array();c._instanceKey=0;var b=a.data(document.body,"jqxNotifications");if(b==undefined){b=0}a.data(document.body,"jqxNotifications",(b+1))}else{c.refresh()}},refresh:function(b){if(!b){this._appendContent(true)}},open:function(){var c=this;if(c.disabled==false){var b=c.host.clone();b.removeAttr("id");b.width(c.width);b.height(c.height);if(this.width!=null&&this.width.toString().indexOf("%")!=-1){b.css("width",this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){b.css("height",this.height)}if(!c.appendContainer&&(c.position=="bottom-left"||c.position=="bottom-right")){b.css("margin-top",c.notificationOffset);c._container.prepend(b)}else{b.css("margin-bottom",c.notificationOffset);c._container.append(b)}c._addHandlers(b);b.fadeIn(c.animationOpenDelay,function(){c._raiseEvent("0",{element:b})});if(c.blink==true){b._blinkInterval=setInterval(function(){b.fadeTo(400,c.opacity/1.5,function(){b.fadeTo(400,c.opacity)})},850)}if(c.autoClose==true){b._autoCloseTimeout=setTimeout(function(){c._close(b)},c.autoCloseDelay)}b._key=c._instanceKey;c._instances[c._instanceKey]=b;c._instanceKey++}},closeAll:function(){var c=this;for(var b=0;b<c._instances.length;b++){if(c._instances[b]){c._close(c._instances[b])}}},closeLast:function(){var c=this;for(var b=c._instances.length;b>=0;b--){if(c._instances[b]){c._close(c._instances[b]);break}}},destroy:function(){var c=this;c.closeAll();c.host.remove();var b=a.data(document.body,"jqxNotifications");a.data(document.body,"jqxNotifications",(b-1));c._destroyContainers(b-1)},propertyChangedHandler:function(c,d,h,f){var e=this;if(f!=h){switch(d){case"width":case"height":var b=h.indexOf&&h.indexOf("%")!=-1;b==undefined?b=false:b=b;var g=f.indexOf&&f.indexOf("%")!=-1;g==undefined?g=false:g=g;if(g!=b){e[d]=h}break;case"appendContainer":case"position":e._container=e._notificationContainer();break;case"browserBoundsOffset":if(!e.appendContainer){e._position(e._container)}break;case"opacity":e.host.css("opacity",f);break;case"showCloseButton":case"template":case"icon":case"rtl":e._appendContent(true);break}}},_raiseEvent:function(h,e){var g=this;var c=g.events[h];var f=new a.Event(c);f.owner=g;f.args=e;try{var b=g.host.trigger(f)}catch(d){}return b},_close:function(b){var c=this;if(c._instances[b._key]){c._instances[b._key]=false;clearInterval(b._blinkInterval);clearTimeout(b._autoCloseTimeout);b.fadeOut(c.animationCloseDelay,function(){c._removeHandlers(b);b.remove();c._raiseEvent("1")})}},_addHandlers:function(b){var d=this;d.addHandler(b,"click.notification"+d.element.id,function(e){d._raiseEvent("2");if(d.closeOnClick==true){d._close(b)}});d.addHandler(b,"mouseenter.notification"+d.element.id,function(e){if(!b._blinkInterval){d.mouseenterFunction(b)}});d.addHandler(b,"mouseleave.notification"+d.element.id,function(e){if(!b._blinkInterval&&b.css("display")!="none"){d.mouseleaveFunction(b)}});if(d.showCloseButton==true){var c=b.find(".jqx-notification-close-button");d.addHandler(c,"click.notification"+d.element.id,function(e){e.stopPropagation();d._close(b)})}},_removeHandlers:function(b){var d=this;d.removeHandler(b,"click.notification"+d.element.id);d.removeHandler(b,"click.mouseenter"+d.element.id);d.removeHandler(b,"click.mouseleave"+d.element.id);var c=b.find(".jqx-notification-close-button");if(c.length>0){d.removeHandler(c,"click.notification"+d.element.id)}},_appendContent:function(g){var j=this;var e;var b=j.host.html();if(!g){e=j.host.children().detach()}if(g){j.host.removeAttr("class");j.host.addClass(j.toThemeProperty("jqx-rc-all"));j.host.addClass(j.toThemeProperty("jqx-notification"))}var m=a("<table class='"+j.toThemeProperty("jqx-notification-table")+"'></table>");var d=a("<tr></tr>");m.append(d);var h=j.rtl?"jqx-notification-content-rtl":"";if(!g){var i=a("<td class='"+j.toThemeProperty("jqx-notification-content")+" "+h+"'></td>")}else{var i=j.host.find(".jqx-notification-content");b=i.html();e=i.detach();if(j.rtl){i.addClass("jqx-notification-content-rtl")}else{i.removeClass("jqx-notification-content-rtl")}}d.html(i);var f=function(){if(j.rtl==false){k.addClass("jqx-notification-icon-ltr");i.before(k)}else{k.addClass("jqx-notification-icon-rtl");i.after(k)}};var k;if(j.template){j.host.addClass("jqx-widget");j.host.addClass("jqx-popup");j.host.addClass("jqx-notification-"+j.template);k=a("<td class='"+j.toThemeProperty("jqx-notification-icon")+" jqx-notification-icon-"+j.template+"'></td>");f()}else{j.host.addClass(j.toThemeProperty("jqx-widget"));j.host.addClass(j.toThemeProperty("jqx-popup"));j.host.addClass(j.toThemeProperty("jqx-fill-state-normal"));if(j.icon){k=a("<td class='"+j.toThemeProperty("jqx-notification-icon")+"'></td>");j.icon.padding=j.icon.padding?parseInt(j.icon.padding):5;k.css({width:(parseInt(j.icon.width)+j.icon.padding),height:j.icon.height,"background-image":"url('"+j.icon.url+"')"});f()}}if(j.showCloseButton==true){var l;if(j.template){l="jqx-notification-close-button jqx-notification-close-button-"+j.template}else{l=j.toThemeProperty("jqx-icon-close")+" "+j.toThemeProperty("jqx-notification-close-button")}var c=a("<td class='"+j.toThemeProperty("jqx-notification-close-button-container")+"'><div class='"+l+" "+j.element.id+"CloseButton' title='Close'></div></td>");if(j.rtl==false){c.find("div").addClass("jqx-notification-close-button-ltr");i.after(c)}else{c.find("div").addClass("jqx-notification-close-button-rtl");i.before(c)}}j.host[0].innerHTML="";j.host.append(m);j.host.find(".jqx-notification-content").html(b)},_position:function(b){var e=this;var g;var d;var f;var c;switch(e.position){case"top-right":g="";d=e.browserBoundsOffset;f=e.browserBoundsOffset;c="";break;case"top-left":g=e.browserBoundsOffset;d="";f=e.browserBoundsOffset;c="";break;case"bottom-left":g=e.browserBoundsOffset;d="";f="";c=e.browserBoundsOffset;break;case"bottom-right":g="";d=e.browserBoundsOffset;f="";c=e.browserBoundsOffset;break}b.css({left:g,right:d,top:f,bottom:c})},_notificationContainer:function(){var c=this;var b;if(!c.appendContainer){b=a("#jqxNotificationDefaultContainer-"+c.position);if(b.length==0){a("body").append("<div id='jqxNotificationDefaultContainer-"+c.position+"' class='jqx-notification-container'></div>");b=a("#jqxNotificationDefaultContainer-"+c.position);if(c.width.indexOf&&c.width.indexOf("%")!=-1){b.addClass(c.toThemeProperty("jqx-notification-container-full-width"))}if(c.height.indexOf&&c.height.indexOf("%")!=-1){b.addClass(c.toThemeProperty("jqx-notification-container-full-height"))}c._position(b)}}else{b=a(c.appendContainer);if(b.length==0){throw new Error("jqxNotification: Invalid appendContainer jQuery Selector - "+c.appendContainer+"! Please, check whether the used ID or CSS Class name is correct.")}}return b},_destroyContainers:function(b){if(b==0){a(".jqx-notification-container").remove()}},_setHoverFunctions:function(){var b=this;var c=false;if(a.jqx.browser.browser=="msie"&&a.jqx.browser.version=="9.0"){c=true}if(c==false){b.mouseenterFunction=function(d){d.fadeTo("fast",b.hoverOpacity)};b.mouseleaveFunction=function(d){d.fadeTo("fast",b.opacity)}}else{b.mouseenterFunction=function(d){d.css("filter","alpha(opacity = "+(b.hoverOpacity*100)+")")};b.mouseleaveFunction=function(d){d.css("filter","alpha(opacity = "+(b.opacity*100)+")")}}}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNumberInput","",{});a.extend(a.jqx._jqxNumberInput.prototype,{defineInstance:function(){var b={value:0,decimal:0,min:-99999999,max:99999999,width:200,validationMessage:"Invalid value",height:25,textAlign:"right",readOnly:false,promptChar:"_",decimalDigits:2,decimalSeparator:".",groupSeparator:",",groupSize:3,symbol:"",symbolPosition:"left",digits:8,negative:false,negativeSymbol:"-",disabled:false,inputMode:"advanced",spinButtons:false,spinButtonsWidth:18,spinButtonsStep:1,autoValidate:true,spinMode:"advanced",enableMouseWheel:true,touchMode:"auto",allowNull:true,placeHolder:"",changeType:null,template:"",rtl:false,hint:true,events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","change"],aria:{"aria-valuenow":{name:"decimal",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}},invalidArgumentExceptions:["invalid argument exception"]};if(this===a.jqx._jqxNumberInput.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){if(this.promptChar===""){this.promptChar=" "}var d=this.host.attr("value");if(d!=undefined){this.decimal=d}if(this.decimal===0){if(this.value!=null){this.decimal=this.value}else{if(this.value===null&&this.decimal!==0){this.value=this.decimal}}}var c=this;c._createFromInput("jqxNumberInput");this.render()},_updateHint:function(){var b=this;if(!b.hint){return}if(b.isMaterialized()){setTimeout(function(){if(b.numberInput[0].value.length===0){b.element.removeAttribute("hint");if(b.label&&b.label[0]){b.label[0].innerHTML=b.placeHolder}}else{b.element.setAttribute("hint",true)}})}},_createFromInput:function(c){var h=this;if(h.element.nodeName.toLowerCase()=="input"){h.field=h.element;if(h.field.className){h._className=h.field.className}var i={title:h.field.title};if(h.field.value){h.decimal=parseFloat(h.field.value)}if(h.field.getAttribute("min")){var f=(h.field.getAttribute("min"));h.min=parseFloat(f)}if(h.field.getAttribute("step")){var e=(h.field.getAttribute("step"));h.spinButtonsStep=parseFloat(e)}if(h.field.getAttribute("max")){var j=(h.field.getAttribute("max"));h.max=parseFloat(j)}if(h.field.id.length){i.id=h.field.id.replace(/[^\w]/g,"_")+"_"+c}else{i.id=a.jqx.utilities.createId()+"_"+c}var b=a("<div></div>",i);b[0].style.cssText=h.field.style.cssText;if(!h.width){h.width=a(h.field).width()}if(!h.height){h.height=a(h.field).outerHeight()}a(h.field).hide().after(b);var g=h.host.data();h.host=b;h.host.data(g);h.element=b[0];h.element.id=h.field.id;h.field.id=i.id;if(h._className){h.host.addClass(h._className);a(h.field).removeClass(h._className)}if(h.field.tabIndex){var d=h.field.tabIndex;h.field.tabIndex=-1;h.element.tabIndex=d}}},_doTouchHandling:function(){var e=this;var g=e.savedValue;if(!e.parsing){e.parsing=true}if(e.parsing){if(e.numberInput.val()&&e.numberInput.val().indexOf("-")==0){e.setvalue("negative",true)}else{e.setvalue("negative",false)}var f=e.numberInput.val();for(var c=0;c<f.length-1;c++){var d=f.substring(c,c+1);if(isNaN(parseFloat(d))&&e.symbol.toString().indexOf(d)===-1&&d!="%"&&d!="$"&&d!="."&&d!=","&&d!="-"){e.numberInput[0].value=g;e.parsing=false;return}}e.ValueString=e.GetValueString(e.numberInput.val(),e.decimalSeparator,e.decimalSeparator!="");e._parseDecimalInSimpleMode();e.decimal=e.ValueString;var b=e.getvalue("negative");if(b){e.decimal="-"+e.ValueString}e.parsing=false}},render:function(){this.host.attr({role:"spinbutton"});this.host.attr("data-role","input");a.jqx.aria(this);a.jqx.aria(this,"aria-multiline",false);var f=this;if(this.officeMode||(this.theme&&this.theme.indexOf("office")!=-1)){if(this.spinButtonsWidth==18){this.spinButtonsWidth=15}}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){this.inputMode="textbox";this.spinMode="simple"}if(this.decimalSeparator==""){this.decimalSeparator=" "}this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this._spinButtons()}else{this.numberInput=a("<input style='border:none;' autocomplete='off' type='textarea'/>").appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){this.numberInput.attr("inputmode","decimal")}if(!this.isMaterialized()){this.numberInput.attr("placeholder",this.placeHolder)}var d=this.host.attr("name");if(d){this.numberInput.attr("name",d)}if(this.host.attr("tabindex")){this.numberInput.attr("tabindex",this.host.attr("tabindex"));this.host.removeAttr("tabindex")}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true||this.inputMode=="textbox"){var f=this;f.savedValue="";this.addHandler(this.numberInput,"focus",function(){f.savedValue=f.numberInput[0].value});this.addHandler(this.numberInput,"change",function(){f._doTouchHandling()})}var h=a.data(this.host[0],"jqxNumberInput");h.jqxNumberInput=this;var f=this;if(this.host.parents("form").length>0){this.addHandler(this.host.parents("form"),"reset",function(){setTimeout(function(){f.setDecimal(0)},10)})}this.propertyChangeMap.disabled=function(j,l,k,m){if(m){j.numberInput.addClass(c.toThemeProperty("jqx-input-disabled"));j.numberInput.attr("disabled",true)}else{j.host.removeClass(c.toThemeProperty("jqx-input-disabled"));j.numberInput.attr("disabled",false)}if(j.spinButtons&&j.host.jqxRepeatButton){j.upbutton.jqxRepeatButton({disabled:m});j.downbutton.jqxRepeatButton({disabled:m})}};if(this.disabled){this.numberInput.addClass(this.toThemeProperty("jqx-input-disabled"));this.numberInput.attr("disabled",true);this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}this.selectedText="";this.decimalSeparatorPosition=-1;var i=this.element.id;var e=this.element;var c=this;this.oldValue=this._value();this.items=new Array();var g=this.value;var b=this.decimal;this._initializeLiterals();this._render();this.setDecimal(g!==null?b:null);var f=this;setTimeout(function(){},100);this._addHandlers();a.jqx.utilities.resize(this.host,function(){f._render()})},refresh:function(b){if(!b){this._render()}},wheel:function(d,c){if(!c.enableMouseWheel){return}c.changeType="mouse";var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(d.preventDefault){d.preventDefault()}if(d.originalEvent!=null){d.originalEvent.mouseHandled=true}if(d.stopPropagation!=undefined){d.stopPropagation()}if(b){b=false;d.returnValue=b;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return true},_addHandlers:function(){var b=this;this.addHandler(this.numberInput,"paste",function(g){var d=b._selection();g.preventDefault();if(g.originalEvent.clipboardData){var f=(g.originalEvent||g).clipboardData.getData("text/plain")}else{if(window.clipboardData){var f=window.clipboardData.getData("Text")}}this.selectedText=f;a.data(document.body,"jqxSelection",this.selectedText);if(b.inputMode!="simple"){b._pasteSelectedText()}else{b.val(f)}setTimeout(function(){b._setSelectionStart(d.start)})});this.addHandler(this.numberInput,"mousedown",function(d){return b._raiseEvent(2,d)});this._mousewheelfunc=this._mousewheelfunc||function(d){if(!b.editcell){b.wheel(d,b);return false}};this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var c="";this.addHandler(this.numberInput,"focus",function(d){a.data(b.numberInput,"selectionstart",b._selection().start);b.host.addClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.addClass(b.toThemeProperty("jqx-numberinput-focus"))}c=b.numberInput.val();b._savedValue=b.decimal});this.addHandler(this.numberInput,"blur",function(e){if(b.inputMode=="simple"){b._exitSimpleInputMode(e,b,false,c)}if(b.autoValidate){var f=parseFloat(b.decimal);var d=b.getvalue("negative");if(d&&b.decimal>0){f=-parseFloat(b.decimal)}if(f>b.max){b._disableSetSelection=true;b.setDecimal(b.max);b._disableSetSelection=false}if(f<b.min){b._disableSetSelection=true;b.setDecimal(b.min);b._disableSetSelection=false}}b.host.removeClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.removeClass(b.toThemeProperty("jqx-numberinput-focus"))}if(b.numberInput.val()!=c){b._raiseEvent(7,e);a.jqx.aria(b,"aria-valuenow",b.decimal);b.element.value=b.decimal}return true});this.addHandler(this.numberInput,"mouseup",function(d){return b._raiseEvent(3,d)});this.addHandler(this.numberInput,"keydown",function(d){b.changeType="keyboard";return b._raiseEvent(4,d)});this.addHandler(this.numberInput,"keyup",function(d){return b._raiseEvent(5,d)});this.addHandler(this.numberInput,"keypress",function(d){return b._raiseEvent(6,d)})},focus:function(){try{this.numberInput.focus()}catch(b){}},blur:function(){try{this.numberInput.blur()}catch(b){}},_removeHandlers:function(){var b=this;this.removeHandler(this.numberInput,"mousedown");var c=a.jqx.mobile.isOperaMiniMobileBrowser();if(c){this.removeHandler(a(document),"click."+this.element.id,b._exitSimpleInputMode,b)}this.removeHandler(this.numberInput,"paste");this.removeHandler(this.numberInput,"focus");this.removeHandler(this.numberInput,"blur");this.removeHandler(this.numberInput,"mouseup");this.removeHandler(this.numberInput,"keydown");this.removeHandler(this.numberInput,"keyup");this.removeHandler(this.numberInput,"keypress")},_spinButtons:function(){if(this.host.jqxRepeatButton){if(!this.numberInput){this.numberInput=a("<input autocomplete='off' style='border: none; position: relative; float: left;' type='textarea'/>");this.numberInput.appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}else{this.numberInput.css("float","left")}if(this.spincontainer){if(this.upbutton){this.upbutton.jqxRepeatButton("destroy")}if(this.downbutton){this.downbutton.jqxRepeatButton("destroy")}this.spincontainer.remove()}this.spincontainer=a('<div style="float: right; height: 100%; overflow: hidden; position: relative;"></div>');if(this.rtl){this.spincontainer.css("float","right");this.numberInput.css("float","right");this.spincontainer.css("left","-1px")}this.host.append(this.spincontainer);this.upbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.upbutton);this.upbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"top-right"});this.downbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.downbutton);this.downbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"bottom-right"});if(this.template){this.upbutton.addClass(this.toThemeProperty("jqx-"+this.template));this.downbutton.addClass(this.toThemeProperty("jqx-"+this.template))}var d=this;this.downbutton.addClass(this.toThemeProperty("jqx-fill-state-normal jqx-action-button"));this.upbutton.addClass(this.toThemeProperty("jqx-fill-state-normal jqx-action-button"));this.upbutton.addClass(this.toThemeProperty("jqx-rc-tr"));this.downbutton.addClass(this.toThemeProperty("jqx-rc-br"));this.addHandler(this.downbutton,"mouseup",function(e){if(!d.disabled){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))}});this.addHandler(this.upbutton,"mouseup",function(e){if(!d.disabled){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"))}});this.removeHandler(a(document),"mouseup."+this.element.id);this.addHandler(a(document),"mouseup."+this.element.id,function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))});this.addHandler(this.downbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mouseenter",function(e){d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.upbutton,"mouseleave",function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.downbutton,"mouseenter",function(e){d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.addHandler(this.downbutton,"mouseleave",function(e){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.upbutton.css("border-width","0px");this.downbutton.css("border-width","0px");if(this.disabled){this.upbutton[0].disabled=true;this.downbutton[0].disabled=true}else{this.upbutton[0].disabled=false;this.downbutton[0].disabled=false}this.spincontainer.addClass(this.toThemeProperty("jqx-input"));this.spincontainer.addClass(this.toThemeProperty("jqx-rc-r"));this.spincontainer.css("border-width","0px");if(!this.rtl){this.spincontainer.css("border-left-width","1px")}else{this.spincontainer.css("border-right-width","1px")}this._upArrow=this.upbutton.find("div");this._downArrow=this.downbutton.find("div");this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"));this._upArrow.addClass(this.toThemeProperty("jqx-input-icon"));this._downArrow.addClass(this.toThemeProperty("jqx-input-icon"));var d=this;this._upArrow.hover(function(){if(!d.disabled){d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))}},function(){d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this._downArrow.hover(function(){if(!d.disabled){d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))}},function(){d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});var b=a.jqx.mobile.isTouchDevice();var c="click";if(b){c=a.jqx.mobile.getTouchEventName("touchstart")}if(b){this.addHandler(this.downbutton,"click",function(e){d.spinDown()});this.addHandler(this.upbutton,"click",function(e){d.spinUp()})}this.addHandler(this.downbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinDown();return false});this.addHandler(this.upbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinUp();return false})}else{throw new Error("jqxNumberInput: Missing reference to jqxbuttons.js.")}},spinDown:function(){var m=this;var l=this.decimal;if(m.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(0);return}var b=this.getvalue("negative");var q=b?-1:0;if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){m._doTouchHandling()}if(!m.disabled){var o=this._selection();var n=this.decimal;var j=this.getDecimal();if(j<this.min){j=this.min;this.setDecimal(this.min);this._setSelectionStart(o.start);this.spinDown();return}else{if(j>this.max){j=this.max;this.setDecimal(this.max);this._setSelectionStart(o.start);this.spinDown();return}}if(m.spinButtonsStep<0){m.spinButtonsStep=1}var d=parseInt(m.decimal)-m.spinButtonsStep;d=d.toString().length;var f=q+d<=m.digits+m.decimalDigits;if(m.spinMode!="advanced"||m.decimalDigits===0){if(j-m.spinButtonsStep>=m.min&&f){var s=1;for(g=0;g<m.decimalDigits;g++){s=s*10}var e=(s*j)-(s*m.spinButtonsStep);e=e/s;e=this._parseDecimalValueToEditorValue(e);m.setDecimal(e)}}else{var p=this._getspindecimal();var k=this._getSeparatorPosition();var j=parseFloat(p.decimal);if(m.spinButtonsStep<0){m.spinButtonsStep=1}var d=parseInt(j)-m.spinButtonsStep;d=d.toString().length;var f=q+d<=m.digits;var s=1;var c=p.decimal.indexOf(".");if(c!=-1){var h=p.decimal.length-c-1;var s=1;for(var g=0;g<h;g++){s=s*10}j-=new Number(m.spinButtonsStep/s);j=j.toFixed(h);var c=j.toString().indexOf(".");if(c==-1){j=j.toString()+"."}var r=j.toString()+p.afterdecimal;r=new Number(r);r=r.toFixed(m.decimalDigits);if(r>=m.min){r=this._parseDecimalValueToEditorValue(r);m.setDecimal(r)}}else{if(j-m.spinButtonsStep>=m.min&&f){var e=(s*j)-(s*m.spinButtonsStep);e=e/s;var r=e.toString()+p.afterdecimal;if(r>=m.min){r=this._parseDecimalValueToEditorValue(r);m.setDecimal(r)}}}}if(r==undefined||this.inputMode!="simple"){var b=this.getvalue("negative");if(q==0&&b){this._setSelectionStart(o.start+1)}else{this._setSelectionStart(o.start)}m.savedValue=m.numberInput[0].value;if(l!=this.decimal){if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{})}a.jqx.aria(this,"aria-valuenow",this.decimal);return}r=this.decimal.toString();var b=this.getvalue("negative");if(q==0&&b){this._setSelectionStart(o.start+1)}else{if((r!=undefined&&(n==undefined||n.toString().length==r.length))){this._setSelectionStart(o.start)}else{if(b){this._setSelectionStart(o.start+1)}else{this._setSelectionStart(o.start-1)}}}if(l!=this.decimal){if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{})}a.jqx.aria(this,"aria-valuenow",this.decimal)}},_getspindecimal:function(){var n=this._selection();var o="";var k=this._getSeparatorPosition();var q=this._getVisibleItems();var e=this._getHiddenPrefixCount();var p=this.numberInput.val();if(this.numberInput.val().length==n.start&&n.length==0){this._setSelection(n.start,n.start+1);n=this._selection()}var j=this.inputMode!="advanced";var m=n.start;if(m===0){m++}if(m===1&&this.symbolPosition==="left"&&this.symbol!==""){m+=this.symbol.length}for(var c=0;c<m;c++){if(j){var l=p.substring(c,c+1);var h=(!isNaN(parseInt(l)));if(h){o+=l}if(l==this.decimalSeparator){o+=l}continue}if(q[c].canEdit&&q[c].character!=this.promptChar){o+=q[c].character}else{if(!q[c].canEdit&&this.decimalSeparatorPosition!=-1&&q[c]==q[this.decimalSeparatorPosition-e]){if(o.length==0){o="0"}o+=q[c].character}}}var g="";for(var c=m;c<q.length;c++){if(j){var l=p.substring(c,c+1);var h=(!isNaN(parseInt(l)));if(h){g+=l}if(l==this.decimalSeparator){g+=l}continue}if(q[c].canEdit&&q[c].character!=this.promptChar){g+=q[c].character}else{if(!q[c].canEdit&&this.decimalSeparatorPosition!=-1&&q[c]==q[this.decimalSeparatorPosition-e]){g+=q[c].character}}}var b=this.getvalue("negative");var f=b?"-"+this._parseDecimalValue(o).toString():this._parseDecimalValue(o).toString();return{decimal:f,afterdecimal:this._parseDecimalValue(g)}},_parseDecimalValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(this.decimalSeparator);if(d>=0){var b=c.toString().substring(0,d)+"."+c.toString().substring(d+1);return b}}return c},_parseDecimalValueToEditorValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(".");if(d>=0){var b=c.toString().substring(0,d)+this.decimalSeparator+c.toString().substring(d+1);return b}}return c},spinUp:function(){var r=this;var t=this.decimal;if(r.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(0);return}if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){r._doTouchHandling()}var l=this.getvalue("negative");var e=l?-1:0;if(!r.disabled){var s=this._selection();var h=r.decimal;var d=r.getDecimal();if(d<this.min){d=this.min;this.setDecimal(this.min);this._setSelectionStart(s.start);this.spinUp();return}else{if(d>this.max){d=this.max;this.setDecimal(this.max);this._setSelectionStart(s.start);this.spinUp();return}}if(r.spinButtonsStep<0){r.spinButtonsStep=1}var n=parseInt(r.decimal)+r.spinButtonsStep;n=n.toString().length;var k=e+n<=r.digits+r.decimalDigits;if(r.spinMode!="advanced"||r.decimalDigits===0){if(d+r.spinButtonsStep<=r.max&&k){var p=1;for(var o=0;o<r.decimalDigits;o++){p=p*10}var g=(p*d)+(p*r.spinButtonsStep);g=g/p;g=this._parseDecimalValueToEditorValue(g);r.setDecimal(g)}}else{var c=this._getspindecimal();var f=this._getSeparatorPosition();var d=parseFloat(c.decimal);if(r.spinButtonsStep<0){r.spinButtonsStep=1}var n=parseInt(d)+r.spinButtonsStep;n=n.toString().length;var k=e+n<=r.digits;var p=1;var q=c.decimal.indexOf(".");if(q!=-1){var m=c.decimal.length-q-1;var p=1;for(var o=0;o<m;o++){p=p*10}d+=new Number(r.spinButtonsStep/p);d=d.toFixed(m);var q=d.toString().indexOf(".");if(q==-1){d=d.toString()+"."}var j=d.toString()+c.afterdecimal;j=new Number(j);j=j.toFixed(r.decimalDigits);var b=new Number(j).toFixed(r.decimalDigits);if(b<=r.max){j=this._parseDecimalValueToEditorValue(j);r.setDecimal(j)}else{j=undefined}}else{if(d+r.spinButtonsStep<=r.max&&k){var g=(p*d)+(p*r.spinButtonsStep);g=g/p;var j=g.toString()+c.afterdecimal;var b=new Number(j).toFixed(r.decimalDigits);if(b<=r.max){j=this._parseDecimalValueToEditorValue(j);if(l&&j.indexOf("-")==-1){if(c.decimal!="-0"){j="-"+j}}r.setDecimal(j)}else{j=undefined}}}}if(j==undefined||this.inputMode!="simple"){this._setSelectionStart(s.start);r.savedValue=r.numberInput[0].value;if(t!=this.decimal){if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{})}a.jqx.aria(this,"aria-valuenow",this.decimal);return}j=this.decimal.toString();var l=this.getvalue("negative");if(e==-1&&!l){this._setSelectionStart(-1+s.start)}else{if((j!=undefined&&(h==undefined||h.toString().length==j.length))){this._setSelectionStart(s.start)}else{if(l){this._setSelectionStart(s.start)}else{this._setSelectionStart(1+s.start)}}}if(t!=this.decimal){if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{})}a.jqx.aria(this,"aria-valuenow",this.decimal)}},_exitSimpleInputMode:function(b,k,h,d){if(k==undefined){k=b.data}if(k==null){return}if(h==undefined){if(b.target!=null&&k.element!=null){if((b.target.id!=undefined&&b.target.id.toString().length>0&&k.host.find("#"+b.target.id).length>0)||b.target==k.element){return}}var f=k.host.offset();var e=f.left;var g=f.top;var c=k.host.width();var j=k.host.height();var l=a(b.target).offset();if(l.left>=e&&l.left<=e+c){if(l.top>=g&&l.top<=g+j){return}}}if(a.jqx.mobile.isOperaMiniBrowser()){k.numberInput.attr("readonly",true)}if(k.disabled||k.readOnly){return}var i=a.data(k.numberInput,"simpleInputMode");if(i==null){return}a.data(k.numberInput,"simpleInputMode",null);this._parseDecimalInSimpleMode();return false},_getDecimalInSimpleMode:function(){var d=this.decimal;if(this.decimalSeparator!="."){var b=d.toString().indexOf(this.decimalSeparator);if(b>0){var c=d.toString().substring(0,b);var d=c+"."+d.toString().substring(b+1)}}return d},_parseDecimalInSimpleMode:function(d){var k=this;var b=k.getvalue("negative");var e=this.ValueString;if(e==undefined){e=this.GetValueString(this.numberInput.val(),this.decimalSeparator,this.decimalSeparator!="")}if(this.decimalSeparator!="."){var g=e.toString().indexOf(".");if(g>0){var f=e.toString().substring(0,g);var c=f+this.decimalSeparator+e.toString().substring(g+1);e=c}}var h=b?"-":"";if(this.symbolPosition=="left"){h+=this.symbol}var i=this.digits%this.groupSize;if(i==0){i=this.groupSize}var j=e.toString();if(j.indexOf("-")>=0){j=j.substring(j.indexOf("-")+1)}h+=j;if(this.symbolPosition=="right"){h+=this.symbol}if(d!=false){k.numberInput.val(h)}},_enterSimpleInputMode:function(f,d){if(d==undefined){d=f.data}var e=this._selection();if(d==null){return}var c=d.getvalue("negative");var b=d.decimal;if(c){if(b>0){b=-b}}d.numberInput.val(b);a.data(d.numberInput,"simpleInputMode",true);if(a.jqx.mobile.isOperaMiniBrowser()){d.numberInput.attr("readonly",false)}this._parseDecimalInSimpleMode();this._setSelectionStart(e.start)},setvalue:function(b,c){if(this[b]!==undefined){if(b=="decimal"){this._setDecimal(c)}else{this[b]=c;this.propertyChangedHandler(this,b,c,c)}}},getvalue:function(b){if(b=="decimal"){if(this.negative!=undefined&&this.negative==true){if(this.decimal.toString().indexOf(",")){return -Math.abs(this.decimal.toString().replace(/,/,"."))}return -Math.abs(this[b])}}if(b in this){return this[b]}return null},_getString:function(){var c="";for(var b=0;b<this.items.length;b++){var d=this.items[b].character;c+=d}return c},_literal:function(d,b,c,e){return{character:d,regex:b,canEdit:c,isSeparator:e}},_initializeLiterals:function(){if(this.inputMode=="textbox"){return}var h=0;var e=this.negativeSymbol.length;for(var d=0;d<e;d++){var g=this.negativeSymbol.substring(d,d+1);var k="";var b=false;var l=null;if(this.negative){l=this._literal(g,k,b,false)}else{l=this._literal("",k,b,false)}this.items[h]=l;h++}var c=this.symbol.length;if(this.symbolPosition=="left"){for(d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var k="";var b=false;var l=this._literal(g,k,b,false);this.items[h]=l;h++}}var f=this.digits%this.groupSize;if(f==0){f=this.groupSize}for(var d=0;d<this.digits;d++){var g=this.promptChar;var k="\\d";var b=true;var l=this._literal(g,k,b,false);this.items[h]=l;h++;if(d<this.digits-1&&this.groupSeparator!=undefined&&this.groupSeparator.length>0){f--;if(f==0){f=this.groupSize;var j=this._literal(this.groupSeparator,"",false,false);this.items[h]=j;h++}}else{if(d==this.digits-1){l.character=0}}}this.decimalSeparatorPosition=-1;if(this.decimalDigits!=undefined&&this.decimalDigits>0){var g=this.decimalSeparator;if(g.length==0){g="."}var l=this._literal(g,"",false,true);this.items[h]=l;this.decimalSeparatorPosition=h;h++;for(var d=0;d<this.decimalDigits;d++){var n=0;var k="\\d";var m=this._literal(n,k,true,false);this.items[h]=m;h++}}if(this.symbolPosition=="right"){for(var d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var k="";var b=false;var l=this._literal(g,k,b);this.items[h]=l;h++}}},_match:function(c,b){var d=new RegExp(b,"i");return d.test(c)},_raiseEvent:function(m,d){var k=this.events[m];var c={};c.owner=this;if(this.host.css("display")=="none"){return true}var s=d.charCode?d.charCode:d.keyCode?d.keyCode:0;var f=true;var h=this.readOnly;var q=this;if(m==3||m==2){if(!this.disabled){if(this.inputMode!="simple"&&this.inputMode!="textbox"){this._handleMouse(d)}else{return true}}}if(m==0){var g=this.getvalue("decimal");if((this.max<g)||(this.min>g)){this.host.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.host.removeClass(this.toThemeProperty("jqx-input-invalid"));this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"))}}var n=new a.Event(k);n.owner=this;c.value=this.getvalue("decimal");c.text=this.numberInput.val();n.args=c;if(m==7){c.type=this.changeType;this.changeType=null}if(k!=undefined){if(m!=4&&m!=5&&m!=6){f=this.host.trigger(n)}}var q=this;if(this.inputMode=="textbox"){return f}if(this.inputMode!="simple"){if(m==4){if(h||this.disabled){return false}f=q._handleKeyDown(d,s)}else{if(m==5){if(h||this.disabled){f=false}}else{if(m==6){if(h||this.disabled){return false}f=q._handleKeyPress(d,s)}}}}else{if(m==4||m==5||m==6){if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){return true}if(h||this.disabled){return false}var r=String.fromCharCode(s);var l=parseInt(r);var o=true;if(!d.ctrlKey&&!d.shiftKey&&!d.metaKey){if(s>=65&&s<=90){o=false}}if(m==6&&a.jqx.browser.opera!=undefined){if(s==8){return false}}if(o){if(m==4){o=q._handleSimpleKeyDown(d,s)}if(s==107){var i=q.getvalue("negative");if(i){q.setvalue("negative",false);q.decimal=q.ValueString;q._parseDecimalInSimpleMode();q._setSelectionStart(t.start+1);q._raiseEvent(0,q.value);q._raiseEvent(1,q.numberInput.val())}}if(s==189||s==45||s==109||s==173){var t=q._selection();if(m==4){var i=q.getvalue("negative");if(i==false){q.setvalue("negative",true)}else{q.setvalue("negative",false)}q.decimal=q.ValueString;q._parseDecimalInSimpleMode();if(!i){q._setSelectionStart(t.start+1)}else{q._setSelectionStart(t.start-1)}o=false;q._raiseEvent(0,q.value);q._raiseEvent(1,q.numberInput.val())}}var b=c.ctrlKey||c.metaKey;if(!a.jqx.browser.msie){var p=d;if((b&&s==99)||(b&&s==67)||(b&&s==122)||(b&&s==90)||(b&&s==118)||(b&&s==86)||(p.shiftKey&&s==45)){if(a.jqx.browser.webkit||a.jqx.browser.chrome){q._handleSimpleKeyDown(d,s)}if(s==67){return true}return false}}if((b&&s==97)||(b&&s==65)){return true}if(m==6&&o){var j=this._isSpecialKey(s);return j}}return o}}return f},GetSelectionInValue:function(j,h,g,f){var c=0;for(var d=0;d<h.length;d++){if(d>=j){break}var e=h.substring(d,d+1);var b=(!isNaN(parseInt(e)));if(b||(f&&h.substring(d,d+1)==g)){c++}}return c},GetSelectionLengthInValue:function(h,j,g,f){var c=0;for(var d=0;d<g.length;d++){if(d>=h+j){break}var e=g.substring(d,d+1);var b=(!isNaN(parseInt(e)));if(j>0&&d>=h&&b||(d>=h&&g[d].toString()==f)){c++}}return c},GetInsertTypeByPositionInValue:function(e,g,h,f){var c="before";var b=this.GetValueString(h,g,f);var d=this.GetDigitsToSeparator(0,b,g);if(e>d){c="after"}return c},RemoveRange:function(f,e,m,g,s,b){var h=this.digits;var n=f;var t=e;var c=0;var o=this.decimal;var x=this._selection();var g=this.decimalSeparator;var j=g!="";if(t==0&&this.ValueString.length<this.decimalPossibleChars-1){return c}var u=this.GetSeparatorPositionInText(g,m);if(!s){u=this.GetSeparatorPositionInText(g,m)}if(u<0&&!j&&m.length>1){u=m.length}if(u==-1){u=m.length}var d=j?1:0;if(e<2&&b==true){var w=this.ValueString.length-this.decimalDigits-d;if((w)==h&&f+e<u){t++}}var k="";for(var r=0;r<m.length;r++){if(r<n||r>=n+t){k+=m.substring(r,r+1);continue}else{var q=m.substring(r,r+1);if(q==g){k+=g;continue}else{var q=m.substring(r,r+1);if(this.symbol&&this.symbol!=""&&this.symbol.indexOf(q)>=0){continue}if(r>u){k+="0";continue}}}var q=m.substring(r,r+1);var p=(!isNaN(parseInt(q)));if(p){c++}}if(k.length==0){k="0"}if(s){this.numberInput.val(k)}else{this.ValueString=k}var l=k.substring(0,1);if(l==g&&isNaN(parseInt(l))){var v="0"+k;k=v}this.ValueString=this.GetValueString(k,g,j);this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(n);return c},InsertDigit:function(q,w){if(typeof this.digits!="number"){this.digits=parseInt(this.digits)}if(typeof this.decimalDigits!="number"){this.decimalDigits=parseInt(this.decimalDigits)}var i=1+this.digits;var x=this._selection();var l=this.getvalue("negative");var d=false;if(x.start==0&&this.symbol!=""&&this.symbolPosition=="left"){this._setSelectionStart(x.start+1);x=this._selection();d=true}if((l&&d)||(l&&!d&&x.start==0)){this._setSelectionStart(x.start+1);x=this._selection()}var u=this.numberInput.val().substring(x.start,x.start+1);var n=this.numberInput.val();var g=this.decimalSeparator;var j=g!=""&&this.decimalDigits>0;if(u==this.symbol&&this.symbolPosition=="right"){if(this.decimalDigits==0){this.ValueString=this.GetValueString(n,g,j);if(this.ValueString.length>=i){return}}else{return}}this.ValueString=this.GetValueString(n,g,j);if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits)}var t=this.ValueString;if(this.decimalDigits>0&&w>=t.length){w=t.length-1}var o="";if(w<t.length){o=t.substring(w,w+1)}var h=false;var v=false;var e=this.GetInsertTypeByPositionInValue(w,g,n,j);if(e=="after"){h=true}var b=j?1:0;if(o!=g&&(this.ValueString.length-this.decimalDigits-b)>=i-1){h=true}if(o==="0"&&this.ValueString.length===1&&this.decimalDigits===0){h=true}var p=false;var r=j?1:0;if(!h&&this.ValueString&&this.ValueString.length>=this.digits+this.decimalDigits+r){return}if(h&&o!=g){if(p){w++}var m=t.substring(0,w);if(m.length==t.length){if(this.ValueString.length>=this.digits+this.decimalDigits+r){return}}var s=q;var c="";if(w+1<t.length){c=t.substring(w+1)}var k=m+s+c;this.ValueString=k}else{var m=t.substring(0,w);var s=q;var c=t.substring(w);var k=m+s+c;if(t.substring(0,1)=="0"&&t.substring(1,2)==g){k=s+t.substring(1);if(o==g){this._setSelectionStart(x.start-1);x=this._selection()}}this.ValueString=k}if(l){this.decimal="-"+this.ValueString}else{this.decimal=this.ValueString}this._parseDecimalInSimpleMode();var f=x.start;f+=1;this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},GetStringToSeparator:function(h,f,e){var d="";var b=f;var g=this.GetSeparatorPositionInText(f,h);var c=h.subString(0,g);d=this.GetValueString(c,f,e);return d},GetSeparatorPositionInText:function(d,e){var c=-1;for(var b=0;b<e.length;b++){if(e.substring(b,b+1)==d){c=b;break}}return c},GetValueString:function(h,g,f){var d="";for(var c=0;c<h.length;c++){var e=h.substring(c,c+1);var b=(!isNaN(parseInt(e)));if(b){d+=e}if(e==g){d+=g}}return d},Backspace:function(){var d=this._selection();var e=this._selection();var f=this.numberInput.val();if(d.start==0&&d.length==0){return}this.isBackSpace=true;var c=f.substring[d.start,d.start+1];var b=(!isNaN(parseInt(c)));if(d.start>0&&d.length==0){this._setSelectionStart(d.start-1);var d=this._selection()}this.Delete();this._setSelectionStart(e.start-1);this.isBackSpace=false},Delete:function(c){var e=this._selection();var h=this.numberInput.val();if(e.start===0&&h.substring(0,1)=="-"){this.setvalue("negative",false);var e=this._selection();var h=this.numberInput.val()}var f=e.start;if(e.start>0&&h.substring(0,1)=="-"){f--;e.start=f}var i=e.length;i=Math.max(i,1);this.ValueString=this.GetValueString(h,this.decimalSeparator,this.decimalSeparator!="");if(f>this.ValueString.indexOf(this.decimalSeparator)&&this.decimalDigits>0){f++}var g=0;if(this.symbol){if(this.symbolPosition=="left"){g--}if(this.negative){g--}}this.RemoveRange(e.start+g,i,this.ValueString,".",false);var d=this.ValueString.substring(0,1);var b=(!isNaN(parseInt(d)));if(!b){this.ValueString="0"+this.ValueString}this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},insertsimple:function(d){var i=this._selection();var j=this.numberInput.val();if(i.start==j.length&&this.decimal!=null&&this.decimalDigits>0){return}var b=this.decimal;var g=this.decimalSeparator;this.ValueString=this.GetValueString(j,g,g!="");var h=this.GetSelectionInValue(i.start,j,g,g!="");var e=this.GetSelectionLengthInValue(i.start,i.length,j,g);var f=this.GetDigitsToSeparator(0,this.ValueString,g);var c=false;if(this.decimalDigits>0&&h>=this.ValueString.length){h--}if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits);this.ValueString=this.ValueString.replace(".",g);this.RemoveRange(i.start,e,this.ValueString,g,false,true);this.InsertDigit(d,0,i);return}this.RemoveRange(i.start,e,this.ValueString,g,false,true);this.InsertDigit(d,h,i)},GetDigitsToSeparator:function(d,b,e){if(e==undefined){e="."}if(b.indexOf(e)<0){return b.length}for(var c=0;c<b.length;c++){if(b.substring(c,c+1)==e){d=c;break}}return d},_handleSimpleKeyDown:function(k,r){var q=this._selection();var b=k.ctrlKey||k.metaKey;if((r==8||r==46)&&b){this.setDecimal(null);return false}if(q.start>=0&&q.start<this.items.length){var d=String.fromCharCode(r)}if(r===27){this.setDecimal(this._savedValue);var j=this.GetSeparatorPositionInText(this.decimalSeparator,this.numberInput.val());if(j!=-1){this._setSelectionStart(j)}k.preventDefault()}if(this.rtl&&r==37){var c=k.shiftKey;var g=c?1:0;if(c){this._setSelection(q.start+1-g,q.start+q.length+1)}else{this._setSelection(q.start+1-g,q.start+1)}return false}else{if(this.rtl&&r==39){var c=k.shiftKey;var g=c?1:0;if(c){this._setSelection(q.start-1,q.length+g+q.start-1)}else{this._setSelection(q.start-1,q.start-1)}return false}}if(r==8){this.Backspace();return false}if(r==190||r==110){var j=this.GetSeparatorPositionInText(this.decimalSeparator,this.numberInput.val());if(j!=-1){this._setSelectionStart(j+1)}return false}if(r==188&&this.groupSeparator===","){var p=this.numberInput.val();for(h=q.start;h<p.length;h++){if(p[h]==this.groupSeparator){this._setSelectionStart(1+h);break}}return false}var b=k.ctrlKey||k.metaKey;if((b&&r==99)||(b&&r==67)){var q=this._selection();var s="";var o=this.numberInput.val();if(q.start>0||q.length>0){for(var h=q.start;h<q.end;h++){s+=o.substring(h,h+1)}}a.data(document.body,"jqxSelection",s);if(a.jqx.browser.msie){window.clipboardData.setData("Text",s)}else{var l=this;var f=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');f.val(s);a("body").append(f);f.select();setTimeout(function(){document.designMode="off";f.select();f.remove();l.focus()},100)}this.savedText=s;return true}if((b&&r==122)||(b&&r==90)){return false}if((b&&r==118)||(b&&r==86)||(k.shiftKey&&r==45)){if(a.jqx.browser.msie&&!this.savedText){this.savedText=window.clipboardData.getData("Text")}if(this.savedText!=null&&this.savedText.length>0){this.val(this.savedText)}else{this.val(a.data(document.body,"jqxSelection"))}return false}var d=String.fromCharCode(r);var m=parseInt(d);if(r>=96&&r<=105){m=r-96;r=r-48}if(!isNaN(m)){var l=this;this.insertsimple(m);return false}if(r==46){this.Delete();return false}if(r==38){this.spinUp();return false}else{if(r==40){this.spinDown();return false}}var n=this._isSpecialKey(r);if(!a.jqx.browser.mozilla){return true}return n},_getEditRange:function(){var d=0;var b=0;for(var c=0;c<this.items.length;c++){if(this.items[c].canEdit){d=c;break}}for(c=this.items.length-1;c>=0;c--){if(this.items[c].canEdit){b=c;break}}return{start:d,end:b}},_getVisibleItems:function(){var b=new Array();var c=0;for(var d=0;d<this.items.length;d++){if(this.items[d].character.toString().length>0){b[c]=this.items[d];c++}}return b},_hasEmptyVisibleItems:function(){var b=this._getVisibleItems();for(var c=0;c<b.length;c++){if(b[c].canEdit&&b[c].character==this.promptChar){return true}}return false},_getFirstVisibleNonEmptyIndex:function(){var b=this._getVisibleItems();for(var c=0;c<b.length;c++){if(b[c].canEdit&&b[c].character!=this.promptChar){return c}}},_handleMouse:function(f,b){var d=this._selection();if(d.length<=1){var c=this._getFirstVisibleNonEmptyIndex();if(d.start<c){this._setSelectionStart(c)}}},_insertKey:function(k){this.numberInput[0].focus();var d=String.fromCharCode(k);var e=parseInt(d);if(isNaN(e)){return}var n=0;for(var f=0;f<this.items.length;f++){if(this.items[f].character.length==0){n++}}var j=this._selection();var b=this;if(j.start>=0&&j.start<=this.items.length){var g=false;var h=this._getFirstVisibleNonEmptyIndex();if(j.start<h&&j.length==0){if(!isNaN(d)||d==" "){this._setSelectionStart(h);j=this._selection()}}var c=this._getFirstEditableItemIndex();var m=this._getLastEditableItemIndex();if(this.value===null){c=m=0}var l=this._getVisibleItems();a.each(l,function(x,B){if(j.start>x&&x!=l.length-1){return}var E=l[x];if(x>m){E=l[m]}if(isNaN(d)||d==" "||d==""||!E){return}if(!E.canEdit){return}var A=b._getSeparatorPosition();if(b._match(d,E.regex)){if(!g&&j.length>0){for(var w=j.start+n;w<j.end+n;w++){if(b.items[w].canEdit){if(w>A){b.items[w].character="0"}else{b.items[w].character=b.promptChar}}}var D=b._getString();g=true}var A=b._getSeparatorPosition();var y=b._hasEmptyVisibleItems();if(b.decimal==null){j.start=A-1;if(j.start<0){j.start=0}j.end=j.start}if(j.start<=A&&y){var u=x;if(b.decimalSeparatorPosition==-1&&j.start==A){u=x+1}if(b.decimal==null){u=j.start}var t="";for(var r=0;r<u;r++){if(l[r].canEdit&&l[r].character!=b.promptChar){t+=l[r].character}}t+=d;var v=b.decimal<1?1:0;if(j.start==A&&b.decimalSeparatorPosition!=-1){t+=b.decimalSeparator;v=0}for(var r=u+v;r<l.length;r++){if(l[r].character==b.decimalSeparator&&l[r].isSeparator){t+=l[r].character}else{if(l[r].canEdit&&l[r].character!=b.promptChar){t+=l[r].character}}}if(b.decimalSeparator!="."){t=b._parseDecimalValue(t)}t=parseFloat(t).toString();t=new Number(t);t=t.toFixed(b.decimalDigits);if(b.decimalSeparator!="."){t=b._parseDecimalValueToEditorValue(t)}b.setvalue("decimal",t);var D=b._getString();if(j.end<A){b._setSelectionStart(j.end+v)}else{b._setSelectionStart(j.end)}if(j.length>=1){b._setSelectionStart(j.end)}if(j.length==b.numberInput.val().length){var o=b._moveCaretToDecimalSeparator();var C=b.decimalSeparatorPosition>=0?1:0;b._setSelectionStart(o-C)}}else{if(j.start<A||j.start>A){if(b.numberInput.val().length==j.start&&b.decimalSeparatorPosition!=-1){return false}else{if(b.numberInput.val().length==j.start&&b.decimalSeparatorPosition==-1&&!y){return false}}var t="";var q=false;for(var r=0;r<x;r++){if(l[r].canEdit&&l[r].character!=b.promptChar){t+=l[r].character}if(l[r].character==b.decimalSeparator&&l[r].isSeparator){t+=l[r].character;q=true}}t+=d;var v=b.decimal<1?1:0;if(!q&&j.start==A-1){t+=b.decimalSeparator;q=true}for(var r=x+1;r<l.length;r++){if(!q&&l[r].character==b.decimalSeparator&&l[r].isSeparator){t+=l[r].character}else{if(l[r].canEdit&&l[r].character!=b.promptChar){t+=l[r].character}}}b.setvalue("decimal",t);var D=b._getString();if(b.decimalSeparatorPosition<0&&E==l[m]){b._setSelectionStart(x);return false}var z=D.indexOf(b.symbol);var s=!b.getvalue("negative")?0:1;if(z<=s){z=D.length}if(j.start<z){b._setSelectionStart(x+1)}else{b._setSelectionStart(x)}if(j.length>=1){}if(j.length==b.numberInput.val().length){var o=b._moveCaretToDecimalSeparator();b._setSelectionStart(o-1)}}}return false}})}},_handleKeyPress:function(h,d){var f=this._selection();var b=this;var i=h.ctrlKey||h.metaKey;if((i&&d==97)||(i&&d==65)){return true}if(d==8){if(f.start>0){b._setSelectionStart(f.start)}return false}if(d==46){if(f.start<this.items.length){b._setSelectionStart(f.start)}return false}if(!a.jqx.browser.mozilla){if(d==45||d==173||d==109||d==189){var c=this.getvalue("negative");if(c==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(a.jqx.browser.msie){this._insertKey(d)}var g=this._isSpecialKey(d);return g},_deleteSelectedText:function(){var e=this._selection();var d="";var g=this._getSeparatorPosition();var b=this._getVisibleItems();var f=this._getHiddenPrefixCount();if(this.numberInput.val().length==e.start&&e.length==0){this._setSelection(e.start,e.start+1);e=this._selection()}for(var c=0;c<e.start;c++){if(b[c].canEdit&&b[c].character!=this.promptChar){d+=b[c].character}else{if(!b[c].canEdit&&this.decimalSeparatorPosition!=-1&&b[c]==b[this.decimalSeparatorPosition-f]){if(d.length==0){d="0"}d+=b[c].character}}}for(var c=e.start;c<e.end;c++){if(c>g&&this.decimalSeparatorPosition!=-1){if(b[c].canEdit&&b[c].character!=this.promptChar){d+="0"}}else{if(!b[c].canEdit&&this.decimalSeparatorPosition!=-1&&b[c]==b[this.decimalSeparatorPosition-f]){if(d.length==0){d="0"}d+=b[c].character}}}for(var c=e.end;c<b.length;c++){if(b[c].canEdit&&b[c].character!=this.promptChar){d+=b[c].character}else{if(!b[c].canEdit&&this.decimalSeparatorPosition!=-1&&b[c]==b[this.decimalSeparatorPosition-f]){if(d.length==0){d="0"}d+=b[c].character}}}this.setvalue("decimal",d);return e.length>0},_restoreInitialState:function(){var c=parseInt(this.decimalDigits);if(c>0){c+=2}for(var b=this.items.length-1;b>this.items.length-1-c;b--){if(!this.items[b]){break}if(this.items[b].canEdit&&this.items[b].character==this.promptChar){this.items[b].character=0}}},clear:function(){this.setDecimal(0)},clearDecimal:function(){if(this.inputMode=="textbox"){this.numberInput.val();return}for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit){this.items[b].character=this.promptChar}}this._restoreInitialState()},_saveSelectedText:function(){var d=this._selection();var e="";var b=this._getVisibleItems();if(d.start>0||d.length>0){for(var c=d.start;c<d.end;c++){if(b[c].canEdit&&b[c].character!=this.promptChar){e+=b[c].character}else{if(b[c].isSeparator){e+=b[c].character}}}}if(a.jqx.browser.msie){window.clipboardData.setData("Text",e)}return e},_pasteSelectedText:function(){var f=this._selection();var h="";var c=0;this.selectedText=a.data(document.body,"jqxSelection");if(window.clipboardData){var d=window.clipboardData.getData("Text");if(d!=this.selectedText&&d.length>0){this.selectedText=window.clipboardData.getData("Text");if(this.selectedText==null||this.selectedText==undefined){return}}}var e=f.start;var j=this._getVisibleItems();if(this.selectedText!=null){for(var i=0;i<this.selectedText.length;i++){var b=parseInt(this.selectedText[i]);if(!isNaN(b)){var g=48+b;this._insertKey(g)}}}},_getHiddenPrefixCount:function(){var c=0;if(!this.negative){c++}if(this.symbolPosition=="left"){for(var b=0;b<this.symbol.length;b++){if(this.symbol.substring(b,b+1)==""){c++}}}return c},_getEditableItem:function(){var c=this._selection();for(var b=0;b<this.items.length;b++){if(b<c.start){if(this.items[b].canEdit&&this.items[b].character!=this.promptChar){return this.items[b]}}}return null},_getEditableItems:function(){var d=new Array();var b=0;for(var c=0;c<this.items.length;c++){if(this.items[c].canEdit){d[b]=this.items[c];b++}}return d},_getValidSelectionStart:function(c){for(var b=this.items.length-1;b>=0;b--){if(this.items[b].canEdit&&this.items[b].character!=this.promptChar){return b}}return -1},_getEditableItemIndex:function(c){var f=this._selection();var g=this._getHiddenPrefixCount();var b=this._getVisibleItems();var d=f.start;var h=-1;for(var e=0;e<d;e++){if(e<b.length&&b[e].canEdit){h=e+g}}if(h==-1&&f.length>0){d=f.end;for(e=0;e<d;e++){if(e<b.length&&b[e].canEdit){h=e+g;break}}}return h},_getEditableItemByIndex:function(c){for(var b=0;b<this.items.length;b++){if(b>c){if(this.items[b].canEdit&&this.items[b].character!=this.promptChar){return b}}}return -1},_getFirstEditableItemIndex:function(){var c=this._getVisibleItems();for(var b=0;b<c.length;b++){if(c[b].character!=this.promptChar&&c[b].canEdit&&c[b].character!="0"){return b}}return -1},_getLastEditableItemIndex:function(){var c=this._getVisibleItems();for(var b=c.length-1;b>=0;b--){if(c[b].character!=this.promptChar&&c[b].canEdit){return b}}return -1},_moveCaretToDecimalSeparator:function(){for(var b=this.items.length-1;b>=0;b--){if(this.items[b].character==this.decimalSeparator&&this.items[b].isSeparator){if(!this.negative){this._setSelectionStart(b);return b}else{this._setSelectionStart(b+1);return b}break}}return this.numberInput.val().length},_handleBackspace:function(){var g=this._selection();var h=this._getHiddenPrefixCount();var b=this._getEditableItemIndex()-h;var f=this._getFirstVisibleNonEmptyIndex();var c=false;if(this.negative){c=true;if(f>=b+1||g.start==0){this.setvalue("negative",false);if(g.length==0){this._setSelectionStart(g.start-1);var g=this._selection()}}}if(b>=0){if(g.length==0&&b!=-1){this._setSelection(b,b+1)}var i=g.start>this._getSeparatorPosition()+1&&this.decimalSeparatorPosition>0;if(i){g=this._selection()}var e=this._deleteSelectedText();if(g.length<1||i){this._setSelectionStart(g.start)}else{if(g.length>=1){this._setSelectionStart(g.end)}}if(g.length==this.numberInput.val().length||c){var d=this._moveCaretToDecimalSeparator();this._setSelectionStart(d-1);if(c){this._setSelectionStart(g.start)}}}else{this._setSelectionStart(g.start)}},_handleKeyDown:function(j,p){var o=this._selection();var c=j.ctrlKey||j.metaKey;if((p==8||p==46)&&c){this.setDecimal(null);return false}if(this.rtl&&p==37){var d=j.shiftKey;var g=d?1:0;if(d){this._setSelection(o.start+1-g,o.start+o.length+1)}else{this._setSelection(o.start+1-g,o.start+1)}return false}else{if(this.rtl&&p==39){var d=j.shiftKey;var g=d?1:0;if(d){this._setSelection(o.start-1,o.length+g+o.start-1)}else{this._setSelection(o.start-1,o.start-1)}return false}}if((c&&p==97)||(c&&p==65)){return true}if((c&&p==120)||(c&&p==88)){this.selectedText=this._saveSelectedText(j);a.data(document.body,"jqxSelection",this.selectedText);this._handleBackspace();return false}if((c&&p==99)||(c&&p==67)){this.selectedText=this._saveSelectedText(j);a.data(document.body,"jqxSelection",this.selectedText);return false}if((c&&p==122)||(c&&p==90)){return false}if((c&&p==118)||(c&&p==86)||(j.shiftKey&&p==45)){this._pasteSelectedText();return false}if(o.start>=0&&o.start<this.items.length){var f=String.fromCharCode(p);var r=this.items[o.start]}if(p==8){this._handleBackspace();return false}if(p==190||p==110){this._moveCaretToDecimalSeparator();return false}if(p===188&&this.decimalSeparator===","){this._moveCaretToDecimalSeparator();return false}if(p==188&&this.groupSeparator===","){var n=this.numberInput.val();for(var h=o.start;h<n.length;h++){if(n[h]==this.groupSeparator){this._setSelectionStart(1+h);break}}return false}if(a.jqx.browser.msie==null){var f=String.fromCharCode(p);var l=parseInt(f);if(p>=96&&p<=105){l=p-96;p=p-48}if(!isNaN(l)){var k=this;k._insertKey(p);return false}}if(p==46){var q=this._getVisibleItems();if(o.start<q.length){var g=q[o.start].canEdit==false?2:1;if(o.start==0){if(this.negative){this.setvalue("negative",false);if(o.length==0){this._setSelectionStart(0)}var o=this._selection();if(o.length==0){return false}}}if(o.length==0){this._setSelection(o.start+g,o.start+g+o.length)}this._handleBackspace();if(new Number(this.decimal)<1||o.start>this._getSeparatorPosition()){this._setSelectionStart(o.end+g)}else{if(o.start+1<this.decimalSeparatorPosition){this._setSelectionStart(o.end+g)}}}return false}if(p==38){this.spinUp();return false}else{if(p==40){this.spinDown();return false}}if(p===27){this.setDecimal(this._savedValue);this._setSelectionStart(o.end);j.preventDefault()}var m=this._isSpecialKey(p);if(a.jqx.browser.mozilla){if(p==45||p==173||p==109||p==189){var b=this.getvalue("negative");if(b==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(!a.jqx.browser.mozilla){return true}return m},_isSpecialKey:function(b){if(b!=8&&b!=9&&b!=13&&b!=35&&b!=36&&b!=37&&b!=39&&b!=27&&b!=46){return false}return true},_selection:function(){try{if("selectionStart" in this.numberInput[0]){var g=this.numberInput[0];var h=g.selectionEnd-g.selectionStart;return{start:g.selectionStart,end:g.selectionEnd,length:h,text:g.value}}else{var d=document.selection.createRange();if(d==null){return{start:0,end:g.value.length,length:0}}var c=this.numberInput[0].createTextRange();var f=c.duplicate();c.moveToBookmark(d.getBookmark());f.setEndPoint("EndToStart",c);var h=d.text.length;return{start:f.text.length,end:f.text.length+d.text.length,length:h,text:d.text}}}catch(b){return{start:0,end:0,length:0}}},selectAll:function(){var b=this.numberInput;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(0,b[0].value.length)}else{var c=b[0].createTextRange();c.collapse(true);c.moveEnd("character",b[0].value.length);c.moveStart("character",0);c.select()}},10)},_setSelection:function(f,b){if(this._disableSetSelection==true){return}var e=a.jqx.mobile.isTouchDevice();if(e||this.touchMode==true){return}try{if("selectionStart" in this.numberInput[0]){this.numberInput[0].focus();this.numberInput[0].setSelectionRange(f,b)}else{var c=this.numberInput[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",f);c.select()}}catch(d){}},_setSelectionStart:function(b){this._setSelection(b,b);a.data(this.numberInput,"selectionstart",b)},resize:function(c,b){this.width=c;this.height=b;this._render(false)},_render:function(g){var c=parseInt(this.host.css("border-left-width"));var j=parseInt(this.host.css("border-left-width"));var i=parseInt(this.host.css("border-left-width"));var e=parseInt(this.host.css("border-left-width"));this.numberInput.css("padding-top","0px");this.numberInput.css("padding-bottom","0px");var k=window.getComputedStyle(this.element);var h=parseInt(k.borderLeftWidth)*2;var f=k.boxSizing;if(f==="border-box"||isNaN(h)){h=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-h+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-h+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-h+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-h+"px"}}var d=this.host.width();var n=this.host.height();this.numberInput.css({"border-left-width":0,"border-right-width":0,"border-bottom-width":0,"border-top-width":0});if(isNaN(i)){i=1}if(isNaN(j)){j=1}if(isNaN(e)){e=1}if(isNaN(c)){c=1}this.numberInput.css("text-align",this.textAlign);var o=this.numberInput.css("font-size");if(""==o){o=13}this.numberInput.css("height",parseInt(o)+4+"px");this.numberInput.css("width",d-2);var m=n-2*i-parseInt(o)-2;if(isNaN(m)){m=0}if(m<0){m=0}if(this.spinButtons&&this.spincontainer){d-=parseInt(this.spinButtonsWidth-2);var l=a.jqx.mobile.isTouchDevice();if(!l&&this.touchMode!==true){this.spincontainer.width(this.spinButtonsWidth);this.upbutton.width(this.spinButtonsWidth+2);this.downbutton.width(this.spinButtonsWidth+2);this.upbutton.height("50%");this.downbutton.height("50%");this.spincontainer.width(this.spinButtonsWidth)}else{this.spincontainer.width(2*(this.spinButtonsWidth));d-=this.spinButtonsWidth;this.upbutton.height("100%");this.downbutton.height("100%");this.downbutton.css("float","left");this.upbutton.css("float","right");this.upbutton.width(this.spinButtonsWidth);this.downbutton.width(1+this.spinButtonsWidth)}this._upArrow.height("100%");this._downArrow.height("100%");this.numberInput.css("width",d-6);this.numberInput.css("margin-right","2px")}var b=m/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){b=m/4}this.numberInput.css("padding-left","0px");this.numberInput.css("padding-right","0px");this.numberInput.css("padding-top",Math.round(b)+"px");this.numberInput.css("padding-bottom",Math.round(b)+"px");if(g==undefined||g==true){this.numberInput.val(this._getString());if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode()}}this._addBarAndLabel(this.numberInput);this._updateHint()},_addBarAndLabel:function(e){var d=this;if(d.bar!==null||d.label!==null){return}var b=a("<label></label");if(this.hint){b[0].innerHTML=this.placeHolder}b.addClass(d.toThemeProperty("jqx-input-label"));e.after(b);d.label=b;var c=a("<span></span>");e.after(c);c.addClass(d.toThemeProperty("jqx-input-bar"));if(d.spinButtons){c.css("top",d.host.height())}else{c.css("top","0px")}d.bar=c;if(d.template){d.bar.addClass(d.toThemeProperty("jqx-"+d.template));d.label.addClass(d.toThemeProperty("jqx-"+d.template))}},destroy:function(){this._removeHandlers();this.host.remove()},inputValue:function(b){if(b===undefined){return this._value()}this.propertyChangedHandler(this,"value",this._value,b);this._refreshValue();return this},_value:function(){var b=this.numberInput.val();return b},val:function(c){if(c!==undefined&&typeof c!="object"||c===null){if(c===null){this.setDecimal(null);return}else{var f=c;if(f<0){this.setDecimal(f);return}else{this.setvalue("negative",false)}f=f.toString();if(f.indexOf(this.symbol)>-1){f=f.replace(this.symbol,"")}var b=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=f.replace(this.decimalSeparator,".");f=b(f,this.groupSeparator,"");var g="";for(var d=0;d<f.length;d++){var e=f.substring(d,d+1);if(e==="-"){g+="-"}if(e==="."){g+="."}if(e.match(/^[0-9]+$/)!=null){g+=e}}f=g;f=f.replace(/ /g,"");f=f.replace(".",this.decimalSeparator);this._setDecimal(f)}}else{return this.getDecimal()}},getDecimal:function(){if(this.decimal==null){return null}if(this.inputMode=="simple"){this._parseDecimalInSimpleMode(false);this.decimal=this._getDecimalInSimpleMode(this.decimal)}if(this.decimal==""){return 0}var b=this.getvalue("negative");if(b&&this.decimal>0){return -parseFloat(this.decimal)}return parseFloat(this.decimal)},setDecimal:function(e){var b=e;if(this.decimalSeparator!="."){if(e===null){this._setDecimal(e)}else{var d=e;if(typeof(e)!="number"){e=e.toString();var g=e.indexOf(".");if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}else{var g=e.indexOf(this.decimalSeparator);if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}}}if(d<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}if(e===null){this._setDecimal(e)}else{this._setDecimal(Math.abs(e))}}}else{if(e<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}if(e===null){this._setDecimal(e)}else{this._setDecimal(Math.abs(e))}}if(b==null){this.numberInput.val("")}this._updateHint()},_setDecimal:function(o){if(!this.allowNull&&o==null){this.decimal=0;o=0}if(o==null){this.decimal=null;this.value=null;this.clearDecimal();this._refreshValue();this.decimal=null;this.value=null;this.ValueString="";return}if(o.toString().indexOf("e")!=-1){o=new Number(o).toFixed(this.decimalDigits).toString()}this.clearDecimal();var p=o.toString();var q="";var b="";var d=true;if(p.length==0){p="0"}for(var g=0;g<p.length;g++){if(typeof(o)=="number"){if(p.substring(g,g+1)=="."){d=false;continue}}else{if(p.substring(g,g+1)==this.decimalSeparator){d=false;continue}}if(d){q+=p.substring(g,g+1)}else{b+=p.substring(g,g+1)}}if(q.length>0){q=parseFloat(q).toString()}var m=this.digits;if(m<q.length){q=q.substr(0,m)}var f=0;var n=this._getSeparatorPosition();var l=this._getHiddenPrefixCount();n=n+l;for(var g=n;g>=0;g--){if(g<this.items.length&&this.items[g].canEdit){if(f<q.length){this.items[g].character=q.substring(q.length-f-1,q.length-f);f++}}}f=0;for(var g=n;g<this.items.length;g++){if(this.items[g].canEdit){if(f<b.length){this.items[g].character=b.substring(f,f+1);f++}}}this._refreshValue();if(this.decimalSeparator=="."){this.ValueString=new Number(o).toFixed(this.decimalDigits)}else{var j=o.toString().indexOf(this.decimalSeparator);if(j>0){var h=o.toString().substring(0,j);var e=h+"."+o.toString().substring(j+1);this.ValueString=new Number(e).toFixed(this.decimalDigits)}else{this.ValueString=new Number(o).toFixed(this.decimalDigits)}}if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode();this._raiseEvent(1,this.ValueString)}if(this.inputMode=="textbox"){this.decimal=this.ValueString;var c=this.getvalue("negative");if(c){this.decimal="-"+this.ValueString}}var o=this.val();if(o<this.min||o>this.max){this.host.addClass("jqx-input-invalid")}else{this.host.removeClass("jqx-input-invalid")}this._updateHint()},_getSeparatorPosition:function(){var b=this._getHiddenPrefixCount();if(this.decimalSeparatorPosition>0){return this.decimalSeparatorPosition-b}return this.items.length-b},_setTheme:function(){this.host.removeClass();this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this.downbutton.removeClass();this.upbutton.removeClass();this.downbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this._upArrow.removeClass();this._downArrow.removeClass();this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}this.numberInput.removeClass();this.numberInput.addClass(this.toThemeProperty("jqx-input-content"))},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._render()}},propertyChangedHandler:function(c,e,h,g){if(c.batchUpdate&&c.batchUpdate.width&&c.batchUpdate.height&&Object.keys(c.batchUpdate).length==2){return}if(e=="template"){c.upbutton.removeClass(c.toThemeProperty("jqx-"+c.template));c.downbutton.removeClass(c.toThemeProperty("jqx-"+c.template));c.upbutton.addClass(c.toThemeProperty("jqx-"+c.template));c.downbutton.addClass(c.toThemeProperty("jqx-"+c.template))}if(e=="digits"||e=="groupSize"||e=="decimalDigits"){if(g<0){throw new Exception(this.invalidArgumentExceptions[0])}}if(e=="placeHolder"){if(!c.isMaterialized()){c.numberInput.attr("placeholder",c.placeHolder)}else{if(c.hint){c.label[0].innerHTML=c.placeHolder}}}if(e==="theme"){a.jqx.utilities.setTheme(h,g,c.host)}if(e=="digits"){if(g!=h){c.digits=parseInt(g)}}if(e=="min"||e=="max"){a.jqx.aria(c,"aria-value"+e,g.toString());c._refreshValue()}if(e=="decimalDigits"){if(g!=h){c.decimalDigits=parseInt(g)}}if(e=="decimalSeparator"||e=="digits"||e=="symbol"||e=="symbolPosition"||e=="groupSize"||e=="groupSeparator"||e=="decimalDigits"||e=="negativeSymbol"){var b=c.decimal;if(e=="decimalSeparator"&&g==""){g=" "}if(h!=g){var f=c._selection();c.items=new Array();c._initializeLiterals();c.value=c._getString();c._refreshValue();c._setDecimal(b)}}if(e=="rtl"){if(c.rtl){if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","right")}else{if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","left")}}if(e=="spinButtons"){if(c.spincontainer){if(!g){c.spincontainer.css("display","none")}else{c.spincontainer.css("display","block")}c._render()}else{c._spinButtons()}}if(e==="touchMode"){c.inputMode="textbox";c.spinMode="simple";c.render()}if(e=="negative"&&c.inputMode=="advanced"){var f=c._selection();var j=0;if(g){c.items[0].character=c.negativeSymbol[0];j=1}else{c.items[0].character="";j=-1}c._refreshValue();if(c.isInitialized){c._setSelection(f.start+j,f.end+j)}}if(e=="decimal"){c.value=g;c.setDecimal(g)}if(e==="value"){c.value=g;c.setDecimal(g);c._raiseEvent(1,g)}if(e=="textAlign"){c.textAlign=g;c._render()}if(e=="disabled"){c.numberInput.attr("disabled",g);if(c.disabled){c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"))}a.jqx.aria(c,"aria-disabled",g.toString())}if(e=="readOnly"){c.readOnly=g}if(e=="promptChar"){for(var d=0;d<c.items.length;d++){if(c.items[d].character==c.promptChar){c.items[d].character=g}}c.promptChar=g}if(e=="width"){c.width=g;c._render()}else{if(e=="height"){c.height=g;c._render()}}},_value:function(){var b=this.value;return b},_refreshValue:function(){var g=this.value;var b=0;if(this.inputMode==="textbox"){return}this.value=this._getString();g=this.value;var f="";for(var c=0;c<this.items.length;c++){var e=this.items[c];if(e.canEdit&&e.character!=this.promptChar){f+=e.character}if(c==this.decimalSeparatorPosition){f+="."}}this.decimal=f;var d=false;if(this.oldValue!==g){this.oldValue=g;this._raiseEvent(0,g);d=true}if(this.inputMode!="simple"){this.numberInput.val(g);if(d){this._raiseEvent(1,g)}}if(g==null){this.numberInput.val("")}}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
package/jqwidgets/jqxpanel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxPanel","",{});a.extend(a.jqx._jqxPanel.prototype,{defineInstance:function(){var b={width:null,height:null,disabled:false,scrollBarSize:a.jqx.utilities.scrollBarSize,sizeMode:"fixed",autoUpdate:false,autoUpdateInterval:500,touchMode:"auto",horizontalScrollBarMax:null,verticalScrollBarMax:null,touchModeStyle:"auto",rtl:false,focused:false,events:["layout"]};if(this===a.jqx._jqxPanel.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){var b=this;if(a.jqx.utilities.scrollBarSize!=15){this.scrollBarSize=a.jqx.utilities.scrollBarSize}this.host.addClass(this.toThemeProperty("jqx-panel"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));var c="<div id='panelWrapper' style='overflow: hidden; width: 100%; height: 100%; background-color: transparent; -webkit-appearance: none; outline: none; align:left; border: 0px; padding: 0px; margin: 0px; left: 0px; top: 0px; valign:top; position: relative;'><div id='panelContent' style='-webkit-appearance: none; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; height: 100%; outline: none; border: none; padding: 0px; position: absolute; margin: 0px; align:left; valign:top; left: 0px; top: 0px;'></div><div id='verticalScrollBar' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='horizontalScrollBar' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='bottomRight' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div></div>";if(!this.host.jqxButton){throw new Error("jqxPanel: Missing reference to jqxbuttons.js.")}if(!this.host.jqxScrollBar){throw new Error("jqxPanel: Missing reference to jqxscrollbar.js.")}var d=this.host.children();this._rtl=false;if(d.length>0&&d.css("direction")=="rtl"){this.rtl=true;this._rtl=true}this.host.wrapInner(c);var g=this.host.find("#verticalScrollBar");g[0].id=this.element.id+"verticalScrollBar";this.vScrollBar=g.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme});var f=this.host.find("#horizontalScrollBar");f[0].id=this.element.id+"horizontalScrollBar";this.hScrollBar=f.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme});this.content=this.host.find("#panelContent");this.wrapper=this.host.find("#panelWrapper");this.content.addClass(this.toThemeProperty("jqx-widget-content"));this.wrapper[0].id=this.wrapper[0].id+this.element.id;this.content[0].id=this.content[0].id+this.element.id;this.bottomRight=this.host.find("#bottomRight").addClass(this.toThemeProperty("jqx-panel-bottomright")).addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));this.bottomRight[0].id="bottomRight"+this.element.id;this.vScrollBar.css("visibility","inherit");this.hScrollBar.css("visibility","inherit");this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance;var e=this;this.propertyChangeMap.disabled=function(h,j,i,k){e.vScrollBar.jqxScrollBar({disabled:e.disabled});e.hScrollBar.jqxScrollBar({disabled:e.disabled})};this.vScrollBar.jqxScrollBar({disabled:this.disabled});this.hScrollBar.jqxScrollBar({disabled:this.disabled});this._addHandlers();if(this.width==null){this.width=this.content.width()}if(this.height==null){this.height=this.content.height()}this._arrange();this.contentWidth=e.content[0].scrollWidth;this.contentHeight=e.content[0].scrollHeight;if(this.autoUpdate){e._autoUpdate()}this.propertyChangeMap.autoUpdate=function(h,j,i,k){if(e.autoUpdate){e._autoUpdate()}else{clearInterval(e.autoUpdateId);e.autoUpdateId=null}};this._updateTouchScrolling();this._render()},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updateTouchScrolling:function(){var b=this;if(this.touchMode==true){a.jqx.mobile.setMobileSimulator(this.element)}var c=this.isTouchDevice();if(c){a.jqx.mobile.touchScroll(this.element,b.vScrollInstance.max,function(f,e){if(b.vScrollBar.css("visibility")!="hidden"&&e!=null){var d=b.vScrollInstance.value;b.vScrollInstance.setPosition(e)}if(b.hScrollBar.css("visibility")!="hidden"&&f!=null){var d=b.hScrollInstance.value;b.hScrollInstance.setPosition(f)}},this.element.id,this.hScrollBar,this.vScrollBar);this._arrange()}this.vScrollBar.jqxScrollBar({touchMode:this.touchMode});this.hScrollBar.jqxScrollBar({touchMode:this.touchMode})},isTouchDevice:function(){var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b&&this.touchModeStyle!=false){this.scrollBarSize=a.jqx.utilities.touchScrollBarSize}return b},append:function(b){if(b!=null){this.content.append(b);this._arrange()}},setcontent:function(b){this.content[0].innerHTML=b;this._arrange();var c=this;setTimeout(function(){c._arrange()},100)},prepend:function(b){if(b!=null){this.content.prepend(b);this._arrange()}},clearcontent:function(){this.content.text("");this.content.children().remove();this._arrange()},remove:function(b){if(b!=null){a(b).remove();this._arrange()}},_autoUpdate:function(){var b=this;this.autoUpdateId=setInterval(function(){var d=b.content[0].scrollWidth;var c=b.content[0].scrollHeight;var e=false;if(b.contentWidth!=d){b.contentWidth=d;e=true}if(b.contentHeight!=c){b.contentHeight=c;e=true}if(e){b._arrange()}},this.autoUpdateInterval)},_addHandlers:function(){var b=this;this.addHandler(this.vScrollBar,"valueChanged",function(c){b._render(b)});this.addHandler(this.hScrollBar,"valueChanged",function(c){b._render(b)});this.addHandler(this.host,"mousewheel",function(c){b.wheel(c,b)});this.addHandler(this.wrapper,"scroll",function(c){if(b.wrapper[0].scrollTop!=0){b.wrapper[0].scrollTop=0}if(b.wrapper[0].scrollLeft!=0){b.wrapper[0].scrollLeft=0}});this.addHandler(this.host,"mouseleave",function(c){b.focused=false});this.addHandler(this.host,"focus",function(c){b.focused=true});this.addHandler(this.host,"blur",function(c){b.focused=false});this.addHandler(this.host,"mouseenter",function(c){b.focused=true});a.jqx.utilities.resize(this.host,function(){if(a.jqx.isHidden(b.host)){return}b._arrange(false)})},resize:function(c,b){this.width=c;this.height=b;this._arrange(false)},_removeHandlers:function(){var b=this;this.removeHandler(this.vScrollBar,"valueChanged");this.removeHandler(this.hScrollBar,"valueChanged");this.removeHandler(this.host,"mousewheel");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.wrapper,"scroll");this.removeHandler(a(window),"resize."+this.element.id)},wheel:function(d,c){var e=0;if(d.originalEvent&&a.jqx.browser.msie&&d.originalEvent.wheelDelta){e=d.originalEvent.wheelDelta/120}if(!d){d=window.event}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}}if(!b){return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},scrollDown:function(){if(this.vScrollBar.css("visibility")=="hidden"){return false}var b=this.vScrollInstance;if(b.value+b.largestep<=b.max){b.setPosition(b.value+b.largestep);return true}else{if(b.value+b.largestep!=b.max){b.setPosition(b.max);return true}}return false},scrollUp:function(){if(this.vScrollBar.css("visibility")=="hidden"){return false}var b=this.vScrollInstance;if(b.value-b.largestep>=b.min){b.setPosition(b.value-b.largestep);return true}else{if(b.value-b.largestep!=b.min){b.setPosition(b.min);return true}}return false},_handleDelta:function(d){if(this.focused){var c=this.vScrollInstance.value;if(d<0){this.scrollDown()}else{this.scrollUp()}var b=this.vScrollInstance.value;if(c!=b){return false}}return true},_render:function(c){if(c==undefined){c=this}var b=c.vScrollInstance.value;var d=c.hScrollInstance.value;if(this.rtl){if(this.hScrollBar[0].style.visibility!="hidden"){if(this._rtl==false){d=c.hScrollInstance.max-d}else{d=-c.hScrollInstance.value}}}c.content.css({left:-d+"px",top:-b+"px"})},scrollTo:function(c,b){if(c==undefined||b==undefined){return}this.vScrollInstance.setPosition(b);this.hScrollInstance.setPosition(c)},getScrollHeight:function(){return this.vScrollInstance.max},getVScrollPosition:function(){return this.vScrollInstance.value},getScrollWidth:function(){return this.hScrollInstance.max},getHScrollPosition:function(){return this.hScrollInstance.value},_getScrollSize:function(){var b=this.scrollBarSize;if(isNaN(b)){b=parseInt(b);if(isNaN(b)){b="17px"}else{b=b+"px"}}if(this.isTouchDevice()){b=a.jqx.utilities.touchScrollBarSize}b=parseInt(b);return b},_getScrollArea:function(){var c=0;this.content.css("margin-right","0px");this.content.css("max-width","9999999px");if(a.jqx.browser.msie&&a.jqx.browser.version<10){c=parseInt(this.content.css("left"));this.content.css("left",0)}this.content.css("overflow","auto");if(this.rtl){this.content.css("direction","rtl")}var b=parseInt(this.content[0].scrollWidth);a.each(this.content.children(),function(){b=Math.max(b,this.scrollWidth);b=Math.max(b,a(this).outerWidth())});if(a.jqx.browser.msie&&a.jqx.browser.version<10){this.content.css("left",c)}var d=parseInt(this.content[0].scrollHeight);this.content.css("overflow","visible");if(a.jqx.browser.msie&&a.jqx.browser.version<9){var d=parseInt(this.content[0].scrollHeight);switch(this.sizeMode){case"wrap":var d=parseInt(this.content[0].scrollHeight);var b=parseInt(this.content[0].scrollWidth);break;case"horizontalWrap":case"horizontalwrap":break;case"verticalWrap":case"verticalwrap":var d=parseInt(this.content[0].scrollHeight);break}}if(this.rtl){this.content.css("direction","ltr")}return{width:b,height:d}},_arrange:function(h){if(h!==false){if(this.width!=null){this.host.width(this.width)}if(this.height!=null){this.host.height(this.height)}}var b=this._getScrollSize();var d=this.host.width();var l=this.host.height();var e=this._getScrollArea();var c=e.width;var k=e.height;var i=k-parseInt(Math.round(this.host.height()));var g=c-parseInt(Math.round(this.host.width()));if(this.horizontalScrollBarMax!=undefined){g=this.horizontalScrollBarMax}if(this.verticalScrollBarMax!=undefined){i=this.verticalScrollBarMax}var j=function(o,p){var n=5;if(p>n){o.vScrollBar.jqxScrollBar({max:p});o.vScrollBar.css("visibility","inherit")}else{o.vScrollBar.jqxScrollBar("setPosition",0);o.vScrollBar.css("visibility","hidden")}};var m=function(o,n){if(n>0){if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(n-10<=b){o.hScrollBar.css("visibility","hidden");o.hScrollBar.jqxScrollBar("setPosition",0)}else{o.hScrollBar.jqxScrollBar({max:n+4});o.hScrollBar.css("visibility","inherit")}}else{o.hScrollBar.jqxScrollBar({max:n+4});o.hScrollBar.css("visibility","inherit")}}else{o.hScrollBar.css("visibility","hidden");o.hScrollBar.jqxScrollBar("setPosition",0)}};switch(this.sizeMode){case"wrap":this.host.width(c);this.host.height(k);this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");return;case"horizontalWrap":case"horizontalwrap":this.host.width(c);this.hScrollBar.css("visibility","hidden");j(this,i);this._arrangeScrollbars(b,c,l);return;case"verticalWrap":case"verticalwrap":this.host.height(k);this.vScrollBar.css("visibility","hidden");m(this,g);this._arrangeScrollbars(b,d,l);return}j(this,i);var f=2;if(this.vScrollBar.css("visibility")!="hidden"){if(this.horizontalScrollBarMax==undefined){if((!this.isTouchDevice()&&g>0)||(g>0)){g+=b+f}}}m(this,g);if(this.hScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar({max:i+b+f})}this._arrangeScrollbars(b,d,l)},_arrangeScrollbars:function(b,d,j){var i=this.vScrollBar[0].style.visibility!="hidden";var f=this.hScrollBar[0].style.visibility!="hidden";var h=2;var g=2;this.hScrollBar.height(b);this.hScrollBar.css({top:j-b-h-g+"px",left:"0px"});this.hScrollBar.width(d-h+"px");this.vScrollBar.width(b);this.vScrollBar.height(parseInt(j)-h+"px");this.vScrollBar.css({left:parseInt(d)-parseInt(b)-h-g+"px",top:"0px"});if(this.rtl){this.vScrollBar.css({left:"0px"});var c=i?parseInt(b)+"px":0;if(this.content.children().css("direction")!="rtl"){var e=false;if(a.jqx.browser.msie&&a.jqx.browser.version<8){e=true}if(!e){this.content.css("padding-left",c)}}}else{if(this.vScrollBar.css("visibility")!="hidden"){this.content.css("max-width",this.host.width()-this.vScrollBar.outerWidth())}}if((this.vScrollBar.css("visibility")!="hidden")&&(this.hScrollBar.css("visibility")!="hidden")){this.bottomRight.css("visibility","inherit");this.bottomRight.css({left:1+parseInt(this.vScrollBar.css("left")),top:1+parseInt(this.hScrollBar.css("top"))});this.bottomRight.width(parseInt(b)+3);this.bottomRight.height(parseInt(b)+3);if(this.rtl){this.bottomRight.css({left:"0px"});this.hScrollBar.css({left:b+g+"px"})}this.hScrollBar.width(d-(1*b)-h-g+"px");this.vScrollBar.height(parseInt(j)-h-b-g+"px")}else{this.bottomRight.css("visibility","hidden")}this.hScrollInstance.refresh();this.vScrollInstance.refresh()},destroy:function(){clearInterval(this.autoUpdateId);this.autoUpdateId=null;this.autoUpdate=false;a.jqx.utilities.resize(this.host,null,true);this._removeHandlers();this.vScrollBar.jqxScrollBar("destroy");this.hScrollBar.jqxScrollBar("destroy");this.host.remove()},_raiseevent:function(g,d,f){if(this.isInitialized!=undefined&&this.isInitialized==true){var c=this.events[g];var e=new a.Event(c);e.previousValue=d;e.currentValue=f;e.owner=this;var b=this.host.trigger(e);return b}},beginUpdateLayout:function(){this.updating=true},resumeUpdateLayout:function(){this.updating=false;this.vScrollInstance.value=0;this.hScrollInstance.value=0;this._arrange();this._render()},propertyChangedHandler:function(c,d,b,e){if(!c.isInitialized){return}if(d=="rtl"){this.vScrollBar.jqxScrollBar({rtl:e});this.hScrollBar.jqxScrollBar({rtl:e});c._arrange()}if(!c.updating){if(d=="scrollBarSize"||d=="width"||d=="height"){if(b!=e){c._arrange()}}}if(d=="touchMode"){if(e!="auto"){c._updateTouchScrolling()}}if(d=="theme"){c.host.removeClass();c.host.addClass(this.toThemeProperty("jqx-panel"));c.host.addClass(this.toThemeProperty("jqx-widget"));c.host.addClass(this.toThemeProperty("jqx-widget-content"));c.host.addClass(this.toThemeProperty("jqx-rc-all"));c.vScrollBar.jqxScrollBar({theme:this.theme});c.hScrollBar.jqxScrollBar({theme:this.theme});c.bottomRight.removeClass();c.bottomRight.addClass(this.toThemeProperty("jqx-panel-bottomright"));c.bottomRight.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));c.content.removeClass();c.content.addClass(this.toThemeProperty("jqx-widget-content"))}},invalidate:function(){if(a.jqx.isHidden(this.host)){return}this.refresh()},refresh:function(b){this._arrange()}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
jQWidgets
|
|
2
|
+
jQWidgets v23.0.0 (2025-May)
|
|
3
3
|
Copyright (c) 2011-2025 jQWidgets.
|
|
4
4
|
License: https://jqwidgets.com/license/
|
|
5
5
|
*/
|
|
@@ -7,3 +7,5 @@ License: https://jqwidgets.com/license/
|
|
|
7
7
|
|
|
8
8
|
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxPasswordInput","",{});a.extend(a.jqx._jqxPasswordInput.prototype,{defineInstance:function(){var b={width:null,height:null,disabled:false,rtl:false,placeHolder:null,showStrength:false,showStrengthPosition:"right",maxLength:null,minLength:null,showPasswordIcon:true,strengthTypeRenderer:null,passwordStrength:null,changeType:null,hint:true,value:"",localization:{passwordStrengthString:"Password strength",tooShort:"Too short",weak:"Weak",fair:"Fair",good:"Good",strong:"Strong",showPasswordString:"Show Password"},strengthColors:{tooShort:"rgb(170, 0, 51)",weak:"rgb(170, 0, 51)",fair:"rgb(255, 204, 51)",good:"rgb(45, 152, 243)",strong:"rgb(118, 194, 97)"}};if(this===a.jqx._jqxPasswordInput.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b._inDOM=document.body.contains(b.element);b.render()},render:function(){var e=this;var d=a.jqx.browser.browser;var g=a.jqx.browser.version;this._browserCheck=d!="msie"||(g!="7.0"&&g!="8.0");this.widgetID=e.element.id;var b="Invalid input type. Please set the type attribute of the input element to password.";if(this.element.getAttribute("type")!="password"){throw b}this.input=this.element;if(this.value!==""){this.input.value=this.value}if(e.isMaterialized()){var j=a("<div></div>");j.addClass(e.toThemeProperty("jqx-input-group"));this.host.after(j);var i=this.element;var c=this.host.data();j.append(i);var h=a("<label></label");if(this.hint){h[0].innerHTML=this.placeHolder}h.addClass(e.toThemeProperty("jqx-input-label"));j.append(h);var f=a("<span></span>");j.append(f);f.addClass(e.toThemeProperty("jqx-input-bar"));j[0].id=this.element.id;this.element.removeAttribute("id");j[0].style.cssText=this.element.style.cssText;e.input=e.element;this.element.style.cssText="";this.bar=f;this.label=h;this.host=j;this.element=j[0];this.host.data(c);var e=this;if(e.template){e.bar.addClass(e.toThemeProperty("jqx-"+e.template));e.label.addClass(e.toThemeProperty("jqx-"+e.template))}}e._hidden=true;e._setTheme();e._setAttributes();e._showPassword();e._showStrength();this.host.data().jqxWidget=this;a.jqx.utilities.resize(this.host,function(){if(!e._inDOM){var k=e.element.parentNode;if(e.element.nextSibling){k.insertBefore(e.icon,e.element.nextSibling)}else{k.appendChild(e.icon)}e._inDOM=true;return}if(e.element===document.activeElement||e.isMaterialized()){e._positionIcon();if(e.showStrength){e.host.jqxTooltip("close")}}})},refresh:function(c){var b=this;if(c){return}b.removeHandler(b.host,"change.passwordinput"+b.widgetID);b.removeHandler(b.host,"focus.passwordinput"+b.widgetID);b.removeHandler(b.host,"blur.passwordinput"+b.widgetID);b.removeHandler(b.host,"click.passwordinput"+b.widgetID);b.removeHandler(b.host,"keyup.passwordinput"+b.widgetID);b.removeHandler(b.icon,"mousedown.passwordinput"+b.widgetID);b.removeHandler(a(document),"mouseup.passwordinput"+b.widgetID);b.removeHandler(a(document),"mousedown.passwordinput"+b.widgetID);b._setAttributes();b._setTheme();b._showPassword();b._showStrength()},val:function(d){var c=this,e=c.input.value,b="placeholder" in c.input;if(a.isEmptyObject(d)&&d!==""){if(!b&&e===c.placeHolder){e=""}return e}else{if(b&&d===e){return}if(!b){if(d===""){if(e!==c.placeHolder){c.input.value=c.placeHolder;c.input.setAttribute("type","text")}return}else{c.input.setAttribute("type","password")}}c.input.value=d;this.value=d;if(b&&c.isMaterialized()){c._refreshPlaceHolder()}if(c.showStrength===true){c._evaluateStrength()}}},propertyChangedHandler:function(b,c,e,d){if(c==="theme"){a.jqx.utilities.setTheme(e,d,b.host);return}if(c==="value"){b.input.value=d}if(c=="disabled"){if(b.disabled){b.element.setAttribute("disabled","disabled");b.element.className+=" "+b.toThemeProperty("jqx-fill-state-disabled")}else{b.host.removeAttr("disabled");b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}return}if(c=="placeHolder"){if(this._browserCheck){if("placeholder" in this.element){b.element.setAttribute("placeholder",b.placeHolder)}else{if(b.input.value===""){b.input.setAttribute("type","text");b.input.value=d}else{if(b.input.value==e){b.input.value=d}}}}}else{this.refresh()}},resize:function(c,b){this.width=c;this.height=b;if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=this.width}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=this.width+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=this.height}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=this.height+"px"}}},_setAttributes:function(){var b=this;var c=b.element;if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=this.width}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=this.width+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=this.height}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=this.height+"px"}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.element.style.height=this.height}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.element.style.width=this.width}if(b.maxLength){c.setAttribute("maxlength",b.maxLength)}if(b.minLength){c.setAttribute("minLength",b.minLength)}if(b.placeHolder&&b._browserCheck){if("placeholder" in b.element){c.setAttribute("placeholder",b.placeHolder)}else{if(c.value===""){c.setAttribute("type","text");c.value=b.placeHolder}}}if(b.disabled){c.setAttribute("disabled","disabled");c.className+=" "+this.toThemeProperty("jqx-fill-state-disabled")}else{c.removeAttribute("disabled");b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}var d=false;b.addHandler(c,"change.passwordinput"+b.widgetID,function(e){if(!d){e.preventDefault();e.stopPropagation();d=true;b._raiseEvent();d=false}b._refreshPlaceHolder()});b.addHandler(c,"click.passwordinput"+b.widgetID,function(){if(b.showPasswordIcon&&b.icon){b.icon.style.display="inline";b._positionIcon()}});b.interval=null;b.addHandler(c,"keydown.passwordinput"+b.widgetID,function(){b.changeType="keyboard";if(b.showPasswordIcon&&b.icon){if(b.interval){clearInterval(b.interval)}var e=0;b.interval=setInterval(function(){if(b.icon.style.display!="none"){b._positionIcon();e++;if(e>5){clearInterval(b.interval)}}else{clearInterval(b.interval)}},100)}});b.addHandler(c,"focus.passwordinput"+b.widgetID,function(){b._focused=true;c.className+=" "+b.toThemeProperty("jqx-fill-state-focus");if(b.placeHolder&&b._browserCheck&&!("placeholder" in b.element)&&c.value==b.placeHolder){c.value="";if(b._hidden){c.setAttribute("type","password")}}if(b.val().length>0){if(b.showStrength){var e=b.host.jqxTooltip("content");if(e){b.host.jqxTooltip("open")}}}if(b.showPasswordIcon&&b.icon){b.icon.style.display="inline";b._positionIcon()}});b.addHandler(c,"blur.passwordinput"+b.widgetID,function(){b._focused=false;b.host.removeClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.placeHolder&&b._browserCheck&&!("placeholder" in b.input)&&c.value===""){b.input.value=b.placeHolder;b.input.setAttribute("type","text")}if(b.showPasswordIcon&&b._browserCheck){if(b.rtl===false){b.host.removeClass(b.toThemeProperty("jqx-passwordinput-password-icon-ltr"))}else{b.host.removeClass(b.toThemeProperty("jqx-passwordinput-password-icon-rtl"))}}if(b.showStrength){b.host.jqxTooltip("close")}if(b.showPasswordIcon&&b.icon){b.icon.style.display="none"}})},_refreshPlaceHolder:function(){var b=this;if(!b.isMaterialized()){if("placeholder" in this.input&&!(a.jqx.browser.msie&&a.jqx.browser.version<9)){b.input.setAttribute("placeHolder",b.placeHolder)}else{if(b.input.value===""){b.input.value=b.placeHolder}}}if(b.input.value!==""){b.element.setAttribute("hint",true)}else{b.element.removeAttribute("hint")}if(b.label){b.label.innerHTML=b.placeHolder}},destroy:function(){if(this.host.jqxTooltip){this.host.jqxTooltip("destroy")}this.host.remove()},_setTheme:function(){var c=this,b="jqx-widget jqx-widget-content jqx-input jqx-input-widget jqx-rc-all";if(c.rtl){b+=" jqx-rtl";c.element.style.direction="rtl"}else{c.host.removeClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="ltr"}c.element.className+=" "+c.toThemeProperty(b)},_showPassword:function(){if(this.showPasswordIcon&&this._browserCheck){var h=this,g=document.createElement("span"),d=".passwordinput"+h.widgetID;g.setAttribute("tabindex",-1);g.setAttribute("hasfocus",false);g.setAttribute("title",h.localization.showPasswordString);g.style.position="absolute";g.style.display="none";g.className=h.toThemeProperty("jqx-passwordinput-password-icon");var c=h.element.parentNode;if(c){if(h.element.nextSibling){c.insertBefore(g,h.element.nextSibling)}else{c.appendChild(g)}}h.icon=g;h._positionIcon();var f=function(){h.element.setAttribute("type","password");if(h.input){h.input.setAttribute("type","password")}h._hidden=true};var b=function(){if(h._hidden===false){f()}else{if(h._hidden){h.element.setAttribute("type","text");if(h.input){h.input.setAttribute("type","text")}h._hidden=false}}};var e=a.jqx.mobile.isTouchDevice();if(e){h.addHandler(h.icon,"mousedown"+d,function(){b();return false})}else{h.addHandler(h.icon,"mousedown"+d,function(){b();return false});h.addHandler(a(document),"mouseup"+d,function(){f();return false});h.addHandler(a(document),"mousedown"+d,function(){if(h._focused){f()}})}}},_positionIcon:function(){var c=this.host.offset(),b=this.element.offsetWidth,e=this.element.offsetHeight,d=a(this.icon);if(this.rtl){d.offset({top:parseInt(c.top+e/2-10/2,10),left:c.left+2})}else{d.offset({top:parseInt(c.top+e/2-10/2,10),left:c.left+b-18})}},_showStrength:function(){var e=this;if(e.showStrength){if(e.host.jqxTooltip){var d=e.widgetID+"Strength",c=d+"Value",j=d+"Indicator";var f;if(!e.strengthTypeRenderer){f='<div style="width: 220px;"><div><span style="font-weight: bold;">'+e.localization.passwordStrengthString+': </span><span id="'+c+'"></span></div><div id="'+j+'"></div></div>'}else{var i=e.input.value;if(!("placeholder" in e.input)&&e._browserCheck&&i==e.placeHolder){i=""}e._countCharacters();var g=e.localization.tooShort;var b=e.strengthTypeRenderer(i,{letters:e.letters,numbers:e.numbers,specialKeys:e.specials},g);f=b}e.host.jqxTooltip({theme:e.theme,position:e.showStrengthPosition,content:f,trigger:"none",autoHide:false,rtl:e.rtl});if(!e.strengthTypeRenderer){var h=document.getElementById(j);document.getElementById(c).innerHTML=e.localization.tooShort;h.className+=" jqx-passwordinput-password-strength-inicator";h.style.backgroundColor=e.strengthColors.tooShort;if(e.rtl===false){h.style["float"]="left"}else{h.style["float"]="right"}}e._checkStrength()}else{throw new Error("jqxPasswordInput: Missing reference to jqxtooltip.js")}}},_checkStrength:function(){var b=this;b.addHandler(b.host,"keyup.passwordinput"+b.widgetID,function(){b._evaluateStrength()})},_raiseEvent:function(){var c=new a.Event("change");c.args={type:this.changeType};this.changeType=null;c.owner=this;var b=this.host.trigger(c);return b},_evaluateStrength:function(){var g=this;var k=g.input.value;var d=k.length;g._countCharacters();if(d>0){if(g.showStrength){var e=!g.host.jqxTooltip("opened");if(e){g.host.jqxTooltip("open")}}}var i=g.letters+g.numbers+2*g.specials+g.letters*g.numbers/2+d;var h;if(d<8){h=g.localization.tooShort}else{if(i<20){h=g.localization.weak}else{if(i<30){h=g.localization.fair}else{if(i<40){h=g.localization.good}else{h=g.localization.strong}}}}var c;if(g.strengthTypeRenderer){c=g.strengthTypeRenderer(k,{letters:g.letters,numbers:g.numbers,specialKeys:g.specials},h);g.host.jqxTooltip({content:c})}else{if(g.passwordStrength){c=g.passwordStrength(k,{letters:g.letters,numbers:g.numbers,specialKeys:g.specials},h);a.each(g.localization,function(){var l=this;if(c==l){h=c;return false}})}document.getElementById(g.widgetID+"StrengthValue").innerHTML=h;var f=document.getElementById(g.widgetID+"StrengthIndicator"),b,j;switch(h){case g.localization.tooShort:b="20%";j=g.strengthColors.tooShort;break;case g.localization.weak:b="40%";j=g.strengthColors.weak;break;case g.localization.fair:b="60%";j=g.strengthColors.fair;break;case g.localization.good:b="80%";j=g.strengthColors.good;break;case g.localization.strong:b="100%";j=g.strengthColors.strong;break}f.style.width=b;f.style.backgroundColor=j}},_countCharacters:function(){var g=this;g.letters=0;g.numbers=0;g.specials=0;var d="<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";var b=g.input.value;var f=b.length;for(var c=0;c<f;c++){var h=b.charAt(c);var e=b.charCodeAt(c);if((e>64&&e<91)||(e>96&&e<123)||(e>127&&e<155)||(e>159&&e<166)){g.letters+=1;continue}if(isNaN(h)===false){g.numbers+=1;continue}if(d.indexOf(h)!=-1){g.specials+=1;continue}}},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|