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/jqxeditor.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(b){b.jqx.jqxWidget("jqxEditor","",{});b.extend(b.jqx._jqxEditor.prototype,{defineInstance:function(){var d={width:null,height:null,disabled:false,pasteMode:"html",editable:true,lineBreak:"default",changeType:null,toolbarPosition:"top",fontFamily:"sans-serif",commands:{bold:{tooltip:"Bold",command:"bold",type:"toggleButton"},italic:{tooltip:"Italic",command:"italic",type:"toggleButton"},underline:{tooltip:"Underline",command:"underline",type:"toggleButton"},format:{placeHolder:"Format Block",tooltip:"Format Block",command:"formatblock",value:[{value:"p",label:"Paragraph"},{value:"h1",label:"Header 1"},{value:"h2",label:"Header 2"},{value:"h3",label:"Header 3"},{value:"h4",label:"Header 4"}],type:"list",width:120,dropDownWidth:190,height:25},font:{placeHolder:"Font",tooltip:"Font Name",command:"fontname",value:[{label:"Arial",value:"Arial, Helvetica, sans-serif"},{label:"Comic Sans MS",value:'"Comic Sans MS", cursive, sans-serif'},{label:"Courier New",value:'"Courier New", Courier, monospace'},{label:"Georgia",value:"Georgia,serif"},{label:"Impact",value:"Impact,Charcoal,sans-serif"},{label:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{label:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{label:"Times New Roman",value:"'Times New Roman',Times,serif"},{label:"Trebuchet MS",value:'"Trebuchet MS",Helvetica,sans-serif'},{label:"Verdana",value:"Verdana,Geneva,sans-serif"}],type:"list",width:160,height:25,dropDownWidth:160},size:{placeHolder:"Size",tooltip:"Font Size",command:"fontsize",value:[{label:"1 (8pt)",value:"xx-small"},{label:"2 (10pt)",value:"x-small"},{label:"3 (12pt)",value:"small"},{label:"4 (14pt)",value:"medium"},{label:"5 (18pt)",value:"large"},{label:"6 (24pt)",value:"x-large"},{label:"7 (36pt)",value:"xx-large"}],type:"list",width:45,height:25,dropDownWidth:160},color:{tooltip:"Text Color",command:"forecolor",value:"#000",type:"colorPicker"},background:{tooltip:"Fill Color",command:"backcolor",value:"#fff",type:"colorPicker"},left:{tooltip:"Align Left",command:"justifyleft",type:"toggleButton"},center:{tooltip:"Align Center",command:"justifycenter",type:"toggleButton"},right:{tooltip:"Align Right",command:"justifyright",type:"toggleButton"},outdent:{tooltip:"Indent Less",command:"outdent",type:"button"},indent:{tooltip:"Indent More",command:"indent",type:"button"},ul:{tooltip:"Insert unordered list",command:"insertunorderedlist",type:"toggleButton"},ol:{tooltip:"Insert ordered list",command:"insertorderedlist",type:"toggleButton"},image:{tooltip:"Insert image",command:"insertimage",type:"button"},link:{tooltip:"Insert link",command:"createlink",type:"toggleButton"},html:{tooltip:"View source",command:"viewsource",type:"toggleButton"},clean:{tooltip:"Remove Formatting",command:"removeformat",type:"button"}},createCommand:null,defaultLocalization:{bold:"Bold",italic:"Italic",underline:"Underline",format:"Format Block",font:"Font Name",size:"Font Size",color:"Text Color",background:"Fill Color",left:"Align Left",center:"Align Center",right:"Align Right",outdent:"Indent Less",indent:"Indent More",ul:"Insert unordered list",ol:"Insert ordered list",image:"Insert image",link:"Insert link",html:"View source",clean:"Remove Formatting",Remove:"Remove",Ok:"Ok",Cancel:"Cancel",Change:"Change","Go to link":"Go to link","Open in a new window/tab":"Open in a new window/tab",Align:"Align",VSpace:"VSpace",HSpace:"HSpace",Width:"Width",Height:"Height",Title:"Title",URL:"URL","Insert Image":"Insert Image","Insert Link":"Insert Link","Alt Text":"Alt Text","not set":"<not set>",Left:"Left",Right:"Right",Paragraph:"Paragraph",Header:"Header",Arial:"Arial","Comic Sans MS":"Comic Sans MS","Courier New":"Courier New",Georgia:"Georgia",Impact:"Impact","Lucida Console":"Lucida Console",Tahoma:"Tahoma","Times New Roman":"Times New Roman","Trebuchet MS":"Trebuchet MS",Verdana:"Verdana"},localization:null,tools:"bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html",readOnly:false,stylesheets:new Array(),rtl:false,colorPickerTemplate:'<div class="jqx-editor-color-picker"><div role="grid"><table class="jqx-editor-color-picker-table" cellspacing="0" cellpadding="0"><tbody><tr><td aria-label="RGB (0, 0, 0)"><div title="RGB (0, 0, 0)" style="background-color: rgb(0, 0, 0);"></div></td><td aria-label="RGB (68, 68, 68)"><div title="RGB (68, 68, 68)" style="background-color: rgb(68, 68, 68);"></div></td><td aria-label="RGB (102, 102, 102)"><div title="RGB (102, 102, 102)" style="background-color: rgb(102, 102, 102);"></div></td><td aria-label="RGB (153, 153, 153)"><div title="RGB (153, 153, 153)" style="background-color: rgb(153, 153, 153);"></div></td><td aria-label="RGB (204, 204, 204)"><div title="RGB (204, 204, 204)" style="background-color: rgb(204, 204, 204);"></div></td><td aria-label="RGB (238, 238, 238)"><div title="RGB (238, 238, 238)" style="background-color: rgb(238, 238, 238);"></div></td><td aria-label="RGB (243, 243, 243)"><div title="RGB (243, 243, 243)" style="background-color: rgb(243, 243, 243);"></div></td><td aria-label="RGB (255, 255, 255)"><div title="RGB (255, 255, 255)" style="background-color: rgb(255, 255, 255);"></div></td></tr></tbody></table></div><div role="grid"><table class="jqx-editor-color-picker-table" cellspacing="0" cellpadding="0"><tbody><tr><td aria-label="RGB (255, 0, 0)"><div title="RGB (255, 0, 0)" style="background-color: rgb(255, 0, 0);"></div></td><td aria-label="RGB (255, 153, 0)"><div title="RGB (255, 153, 0)" style="background-color: rgb(255, 153, 0);"></div></td><td aria-label="RGB (255, 255, 0)"><div title="RGB (255, 255, 0)" style="background-color: rgb(255, 255, 0);"></div></td><td aria-label="RGB (0, 255, 0)"><div title="RGB (0, 255, 0)" style="background-color: rgb(0, 255, 0);"></div></td><td aria-label="RGB (0, 255, 255)"><div title="RGB (0, 255, 255)" style="background-color: rgb(0, 255, 255);"></div></td><td aria-label="RGB (0, 0, 255)"><div title="RGB (0, 0, 255)" style="background-color: rgb(0, 0, 255);"></div></td><td aria-label="RGB (153, 0, 255)"><div title="RGB (153, 0, 255)" style="background-color: rgb(153, 0, 255);"></div></td><td aria-label="RGB (255, 0, 255)"><div title="RGB (255, 0, 255)" style="background-color: rgb(255, 0, 255);"></div></td></tr></tbody></table></div><div role="grid"><table class="jqx-editor-color-picker-table" cellspacing="0" cellpadding="0"><tbody><tr><td aria-label="RGB (244, 204, 204)"><div title="RGB (244, 204, 204)" style="background-color: rgb(244, 204, 204);"></div></td><td aria-label="RGB (252, 229, 205)"><div title="RGB (252, 229, 205)" style="background-color: rgb(252, 229, 205);"></div></td><td aria-label="RGB (255, 242, 204)"><div title="RGB (255, 242, 204)" style="background-color: rgb(255, 242, 204);"></div></td><td aria-label="RGB (217, 234, 211)"><div title="RGB (217, 234, 211)" style="background-color: rgb(217, 234, 211);"></div></td><td aria-label="RGB (208, 224, 227)"><div title="RGB (208, 224, 227)" style="background-color: rgb(208, 224, 227);"></div></td><td aria-label="RGB (207, 226, 243)"><div title="RGB (207, 226, 243)" style="background-color: rgb(207, 226, 243);"></div></td><td aria-label="RGB (217, 210, 233)"><div title="RGB (217, 210, 233)" style="background-color: rgb(217, 210, 233);"></div></td><td aria-label="RGB (234, 209, 220)"><div title="RGB (234, 209, 220)" style="background-color: rgb(234, 209, 220);"></div></td></tr><tr><td id="T-Kw-Jn88" aria-label="RGB (234, 153, 153)"><div title="RGB (234, 153, 153)" style="background-color: rgb(234, 153, 153);"></div></td><td aria-label="RGB (249, 203, 156)"><div title="RGB (249, 203, 156)" style="background-color: rgb(249, 203, 156);"></div></td><td aria-label="RGB (255, 229, 153)"><div title="RGB (255, 229, 153)" style="background-color: rgb(255, 229, 153);"></div></td><td aria-label="RGB (182, 215, 168)"><div title="RGB (182, 215, 168)" style="background-color: rgb(182, 215, 168);"></div></td><td aria-label="RGB (162, 196, 201)"><div title="RGB (162, 196, 201)" style="background-color: rgb(162, 196, 201);"></div></td><td aria-label="RGB (159, 197, 232)"><div title="RGB (159, 197, 232)" style="background-color: rgb(159, 197, 232);"></div></td><td aria-label="RGB (180, 167, 214)"><div title="RGB (180, 167, 214)" style="background-color: rgb(180, 167, 214);"></div></td><td aria-label="RGB (213, 166, 189)"><div title="RGB (213, 166, 189)" style="background-color: rgb(213, 166, 189);"></div></td></tr><tr><td aria-label="RGB (224, 102, 102)"><div title="RGB (224, 102, 102)" style="background-color: rgb(224, 102, 102);"></div></td><td aria-label="RGB (246, 178, 107)"><div title="RGB (246, 178, 107)" style="background-color: rgb(246, 178, 107);"></div></td><td aria-label="RGB (255, 217, 102)"><div title="RGB (255, 217, 102)" style="background-color: rgb(255, 217, 102);"></div></td><td aria-label="RGB (147, 196, 125)"><div title="RGB (147, 196, 125)" style="background-color: rgb(147, 196, 125);"></div></td><td aria-label="RGB (118, 165, 175)"><div title="RGB (118, 165, 175)" style="background-color: rgb(118, 165, 175);"></div></td><td aria-label="RGB (111, 168, 220)"><div title="RGB (111, 168, 220)" style="background-color: rgb(111, 168, 220);"></div></td><td aria-label="RGB (142, 124, 195)"><div title="RGB (142, 124, 195)" style="background-color: rgb(142, 124, 195);"></div></td><td aria-label="RGB (194, 123, 160)"><div title="RGB (194, 123, 160)" style="background-color: rgb(194, 123, 160);"></div></td></tr><tr><td id="T-Kw-Jn104" aria-label="RGB (204, 0, 0)"><div title="RGB (204, 0, 0)" style="background-color: rgb(204, 0, 0);"></div></td><td aria-label="RGB (230, 145, 56)"><div title="RGB (230, 145, 56)" style="background-color: rgb(230, 145, 56);"></div></td><td aria-label="RGB (241, 194, 50)"><div title="RGB (241, 194, 50)" style="background-color: rgb(241, 194, 50);"></div></td><td aria-label="RGB (106, 168, 79)"><div title="RGB (106, 168, 79)" style="background-color: rgb(106, 168, 79);"></div></td><td aria-label="RGB (69, 129, 142)"><div title="RGB (69, 129, 142)" style="background-color: rgb(69, 129, 142);"></div></td><td aria-label="RGB (61, 133, 198)"><div title="RGB (61, 133, 198)" style="background-color: rgb(61, 133, 198);"></div></td><td aria-label="RGB (103, 78, 167)"><div title="RGB (103, 78, 167)" style="background-color: rgb(103, 78, 167);"></div></td><td aria-label="RGB (166, 77, 121)"><div title="RGB (166, 77, 121)" style="background-color: rgb(166, 77, 121);"></div></td></tr><tr><td aria-label="RGB (153, 0, 0)"><div title="RGB (153, 0, 0)" style="background-color: rgb(153, 0, 0);"></div></td><td aria-label="RGB (180, 95, 6)"><div title="RGB (180, 95, 6)" style="background-color: rgb(180, 95, 6);"></div></td><td aria-label="RGB (191, 144, 0)"><div title="RGB (191, 144, 0)" style="background-color: rgb(191, 144, 0);"></div></td><td aria-label="RGB (56, 118, 29)"><div title="RGB (56, 118, 29)" style="background-color: rgb(56, 118, 29);"></div></td><td aria-label="RGB (19, 79, 92)"><div title="RGB (19, 79, 92)" style="background-color: rgb(19, 79, 92);"></div></td><td aria-label="RGB (11, 83, 148)"><div title="RGB (11, 83, 148)" style="background-color: rgb(11, 83, 148);"></div></td><td aria-label="RGB (53, 28, 117)"><div title="RGB (53, 28, 117)" style="background-color: rgb(53, 28, 117);"></div></td><td aria-label="RGB (116, 27, 71)"><div title="RGB (116, 27, 71)" style="background-color: rgb(116, 27, 71);"></div></td></tr><tr><td aria-label="RGB (102, 0, 0)"><div title="RGB (102, 0, 0)" style="background-color: rgb(102, 0, 0);"></div></td><td aria-label="RGB (120, 63, 4)"><div title="RGB (120, 63, 4)" style="background-color: rgb(120, 63, 4);"></div></td><td aria-label="RGB (127, 96, 0)"><div title="RGB (127, 96, 0)" style="background-color: rgb(127, 96, 0);"></div></td><td aria-label="RGB (39, 78, 19)"><div title="RGB (39, 78, 19)" style="background-color: rgb(39, 78, 19);"></div></td><td aria-label="RGB (12, 52, 61)"><div title="RGB (12, 52, 61)" style="background-color: rgb(12, 52, 61);"></div></td><td aria-label="RGB (7, 55, 99)"><div title="RGB (7, 55, 99)" style="background-color: rgb(7, 55, 99);"></div></td><td aria-label="RGB (32, 18, 77)"><div title="RGB (32, 18, 77)" style="background-color: rgb(32, 18, 77);"></div></td><td aria-label="RGB (76, 17, 48)"><div title="RGB (76, 17, 48)" style="background-color: rgb(76, 17, 48);"></div></td></tr></tbody></table></div></div>',touchMode:false,keyPressed:null,events:["change"]};if(this===b.jqx._jqxEditor.prototype){return d}b.extend(true,this,d);this.localization=this.defaultLocalization;return d},createInstance:function(f){var j=this;j.textArea=j.host;var d=j.host.attr("contenteditable");j.host.addClass(j.toThemeProperty("jqx-widget"));if(d==true||d=="true"){j.inline=true;j.widget=j.host;j.editorDocument=document;j.selection=new a(j.editorDocument);var i=b("<div class='jqx-editor-toolbar-container' unselectable='on' aria-label='Formatting options' role='toolbar'><div class='jqx-editor-toolbar'></div>");i.insertBefore(j.host);j.toolbarContainer=i;j.toolbar=i.find(".jqx-editor-toolbar");j.editor=j.host;j.contentEditableElement=j.element}else{var g=b("<div class='jqx-editor'><div class='jqx-editor-container'><div class='jqx-editor-toolbar-container' aria-label='Formatting options' role='toolbar'><div class='jqx-editor-toolbar'></div></div><div class='jqx-editor-content'><iframe aria-label='Editor Element' src='javascript:\"<html></html>\"' allowtransparency='true' frameborder='0'></iframe></div></div></div>");j.widget=g;j.widget[0].className=j.widget[0].className+" "+j.element.className;try{j.widget[0].style=j.element.style}catch(e){}var h=b.trim(j.host.html())+"​";if(j.lineBreak=="default"||j.lineBreak=="div"){h="<div>"+h+"</div>"}else{if(j.lineBreak=="p"){h="<p>"+h+"</p>"}}h=h.replace(/</ig,"<");h=h.replace(/>/ig,">");j.host.css("display","none");j.host.after(g);g.find("iframe").after(j.host);j.container=g.find(".jqx-editor-container");j.toolbarContainer=g.find(".jqx-editor-toolbar-container");j.toolbar=g.find(".jqx-editor-toolbar");j.iframe=g.find("iframe");j.content=g.find(".jqx-editor-content");j.iframe.attr("aria-label","Editor Element");var k=function(){j.editorDocument=j.iframe[0].contentWindow.document;j.selection=new a(j.editorDocument);var o=0;j.addHandler(j.iframe,"load",function(){o++;if(o>1){j.iframe.off("load");j.content.find("iframe").remove();var q=b("<iframe aria-label='Editor Element' src='javascript:\"<html></html>\"' allowtransparency='true' frameborder='0'></iframe>").appendTo(j.content);j.iframe=g.find("iframe");k()}});if(!b.jqx.browser.mozilla){j.editorDocument.designMode="On"}j.editorDocument.open();var m=j.rtl?"direction:rtl;":"";var l=b.jqx.browser.msie?"::selection{color: #fff; background: #328EFD;};::-moz-selection{color: #fff; background: #328eD;};::selection:window-inactive {background: #c7c7c7; color: #000;}::-moz-selection:window-inactive {background: #c7c7c7; color: #000;}html{font-size:13px; height:100%;}body{padding-top:1px;margin-top:-1px; padding-right: 1px; overflow-x: hidden;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;":"";j.editorDocument.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0; margin:0; font-size: 13px; font-family: "+j.fontFamily+"; background:#fff; min-height:100%; "+m+"}"+l+"}h1{font-size:2em;margin:.67em 0}h2{font-size: 1.5em; margin: .75em 0}h3{font-size: 1.17em; margin: .83em 0}h4{font-size:1em; margin: 1.12em 0 }h5{font-size: .83em; margin: 1.5em 0}h6{font-size: .75em; margin: 1.67em 0}p{margin: 0px;padding:0 .2em}ul,ol{padding-left:2.5em}a{color:#00a}code{font-size:1.23em}.jqx-editor-paste-element {position: absolute; left: -1000px; height: 1px; overflow: hidden; top: -1000px;}.jqx-editor-focus {border: 1px solid #aaa !important;}</style>"+b.map(j.stylesheets,function(q){return"<link rel='stylesheet' href='"+q+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>");j.contentEditableElement=j.editorDocument.body;if(j.host.is("textarea")){j._textArea=j.element;var n=j.host.data();n.jqxEditor.host=g;n.jqxEditor.element=g[0];j.element=g[0];g[0].id=j._textArea.id;j._textArea.id=j._textArea.id+"TextArea";b(j.element).addClass(j.toThemeProperty("jqx-widget"));j.host=b(j.element);j.host.data(n)}else{var n=j.host.data();n.jqxEditor.host=g;n.jqxEditor.element=g[0];j.element=g[0];j.host=b(j.element);j.host.data(n)}try{j.editorDocument.execCommand("useCSS",false,false);j.editorDocument.execCommand("enableInlineTableEditing",null,false)}catch(p){}try{j.editorDocument.execCommand("styleWithCSS",0,true)}catch(p){}j.editorDocument.close();j.editor=b(j.editorDocument.body);j.editor.html(h).attr("spellcheck",false).attr("autocorrect","off")};k();b.jqx.utilities.resize(j.host,function(){j.widget.css("width",j.width);j.widget.css("height",j.height);j._arrange()})}},focus:function(){var e=this;if(b.jqx.browser.mozilla){if(!e.focused){if(e.iframe){e.iframe.focus()}e.selection.selectNode(e.editor[0].firstChild,true);e.selection.getRange().collapse(true)}}e.editor.focus();var d=e.range!=null?e.range:e.getRange();e.selectRange(d)},print:function(){var d=window.open("","_blank","width=450,height=470,left=400,top=100,menubar=yes,toolbar=no,location=no,scrollbars=yes");d.document.open();d.document.write('<!doctype html><html><head><title>Print</title></head><body onload="print();">'+this.val()+"</body></html>");d.document.close()},refresh:function(d){var m=this;b.each(this.defaultLocalization,function(i,r){if(!m.localization[i]){m.localization[i]=r}});m._removeHandlers();m.toolbar.addClass(m.toThemeProperty("jqx-widget-header"));if(m.content){m.widget.css("width",m.width);m.widget.css("height",m.height);m.widget.addClass(m.toThemeProperty("jqx-editor"));m.widget.addClass(m.toThemeProperty("jqx-widget"));m.widget.addClass(m.toThemeProperty("jqx-rc-all"));m.widget.addClass(m.toThemeProperty("jqx-widget-header"));m.content.addClass(m.toThemeProperty("jqx-widget-content"));m.container.addClass(m.toThemeProperty("jqx-editor-container"))}else{m.toolbarContainer.addClass(m.toThemeProperty("jqx-widget-header"));m.toolbarContainer.addClass(m.toThemeProperty("jqx-editor-toolbar-inline"));m.toolbarContainer.addClass(m.toThemeProperty("jqx-widget"));m.toolbarContainer.addClass(m.toThemeProperty("jqx-rc-all"));m.toolbarContainer.hide();m.toolbarContainer.css("position","absolute");m.editor.addClass(m.toThemeProperty("jqx-editor-inline"));m.toolbarContainer.css("width",m.host.outerWidth()+"px")}var n=m.toolbarContainer.index();if(m.toolbarPosition=="top"&&n!=0||m.toolbarPosition=="bottom"&&n!=1){switch(m.toolbarPosition){case"bottom":m.toolbarContainer.insertAfter(m.content);break;case"top":default:m.toolbarContainer.insertBefore(m.content);break}}var h=m.tools;if(h!==false){var l=h.split(" ");var p=h.split(" | ");var q=function(i,r){b.each(r,function(y,F){var u=m.commands[this];if(!u){if(m.createCommand){u=m.createCommand(this.toString());if(!u){return true}if(!m.commands[this]){m.commands[this]=u}}else{return true}}else{if(m.createCommand){var x=m.createCommand(this.toString());u=b.extend(u,x)}}if(m.localization[this]){u.tooltip=m.localization[this]}switch(u.type){case"list":if(u.widget){u.widget.jqxDropDownList("destroy")}var A=function(R,Q,S){if(u.command=="formatblock"){return"<"+S+' unselectable="on" style="padding: 0px; margin: 0px;">'+Q+"</"+S+">"}else{if(u.command=="fontname"){return'<span unselectable="on" style="font-family: '+S+';">'+Q+"<span>"}else{if(u.command=="fontsize"){return'<span unselectable="on" style="font-size: '+S+';">'+Q+"<span>"}}}};var t=function(){var Q=m.toThemeProperty("jqx-editor-toolbar-icon")+" "+m.toThemeProperty("jqx-editor-toolbar-icon-"+u.command);var R="<div unselectable='on' style='margin-top: 0px; padding:0px;' class='"+Q+"'></div>";return R};var C=u.command=="formatblock"||u.command=="fontname"||u.command=="fontsize";var z=u.value||[];var N=new Array();var J=u.placeHolder||"Please Choose:";if(u.command=="fontname"){b.each(z,function(){var Q=m.localization[this.label];N.push({label:Q,value:this.value})})}else{if(u.command=="formatblock"){J=m.localization.format;b.each(z,function(){if(this.label.indexOf("Header")>=0){var Q=this.label.replace("Header",m.localization.Header)}else{var Q=m.localization[this.label]}N.push({label:Q,value:this.value})})}else{N=z}}var P={enableBrowserBoundsDetection:true,touchMode:m.touchMode,width:u.width||100,height:u.height||25,dropDownWidth:u.dropDownWidth||"auto",autoDropDownHeight:(u.value&&u.value.length)<12?true:false,placeHolder:J,source:N,theme:m.theme,hint:false,keyboardSelection:false,focusable:false,disabled:m.disabled,rtl:m.rtl,selectionRenderer:u.command=="fontsize"?t:null,renderer:C?A:null};var D="jqx-disableselect "+m.toThemeProperty("jqx-editor-dropdownlist")+" "+m.toThemeProperty("jqx-editor-toolbar-item");var w=b("<div unselectable='on' class='"+D+"'></div>");w.appendTo(i);w.jqxDropDownList(P);if(u.init){u.init(w)}var F=null;var E=null;var K="";m.addHandler(w,"mousedown",function(R){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){var Q=b(".jqx-editor-dropdownlist");b.each(Q,function(S,T){if(T!=w[0]){b(T).jqxDropDownList("close")}})}});m.addHandler(w,"open",function(Q){if(!m.focused){m.focus()}m.updating=true;m.activeElement=w;F=w.val();K=""});m.addHandler(w,"change",function(Q){m.updating=false;m.activeElement=null;E=w.val();K=Q.args.type;if(b.jqx.browser.msie&&b.jqx.browser.version<9){m.focus()}});m.addHandler(w,"close",function(Q){m.updating=false;m.activeElement=null;if(F!=E){if(K=="mouse"||K=="keyboard"){m._refreshTools()}}});m._addCommandHandler(w,"change",u.command,null,u);break;case"colorPicker":if(u.widget){b(u.colorPicker).remove();u.widget.jqxDropDownButton("destroy")}var B=b('<div unselectable="on" style="padding-top: 4px;"></div>').attr("id","picker-"+u.command);var D="jqx-disableselect "+m.toThemeProperty("jqx-editor-dropdownpicker")+" "+m.toThemeProperty("jqx-editor-toolbar-item");var w=b("<div unselectable='on' class='"+D+"'></div>");w.appendTo(i);w.append(B);w.jqxDropDownButton({hint:false,touchMode:m.touchMode,disabled:m.disabled,enableBrowserBoundsDetection:true,width:u.width||45,height:u.height||25,rtl:m.rtl,focusable:false,popupZIndex:9999,theme:m.theme});var I=b('<div unselectable="on" style="z-index: 55;">');var s=m.toThemeProperty("jqx-editor-toolbar-icon")+" "+m.toThemeProperty("jqx-editor-toolbar-icon-"+u.command);var O=b("<div unselectable='on' class='"+s+"'></div>");I.append(O);var L=b('<div unselectable="on" class="jqx-editor-color-bar">').attr("id","bar-"+u.command).css("background-color",u.value);I.append(L);w.jqxDropDownButton("setContent",I);B.append(b(m.colorPickerTemplate));u.colorPicker=B;if(u.init){u.init(w)}B.find("tr").attr("role","row").attr("unselectable","on");B.find("td").attr("role","gridcell").attr("unselectable","on").css("-webkit-user-select","none");B.find("div").attr("unselectable","on");m.addHandler(w,"mousedown",function(R){if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}if(b(".jqx-editor-dropdownpicker").length>0){var Q=b(".jqx-editor-dropdownpicker");b.each(Q,function(S,T){if(T!=w[0]){b(T).jqxDropDownButton("close")}})}});m.addHandler(w,"open",function(){if(!m.focused){m.focus()}m.updating=true;m.activeElement=B});m.addHandler(w,"close",function(Q){m.updating=false;m.activeElement=null;if(F!=E){if(K=="mouse"||K=="keyboard"){m._refreshTools()}}});m.addHandler(B,"keydown",function(Q){var Y=Q.keyCode;var V=b(B).find(".jqx-editor-color-picker-selected-cell");var aa=B.find("tr");var T=aa.length;var S=V.parent().children().length;var U=V.index();var W=-999;var Z=V.parent();b.each(aa,function(ab,ac){if(this==Z[0]){W=ab;return false}});switch(Y){case 27:w.jqxDropDownButton("close");break;case 13:b(V).trigger("mousedown");break;case 38:W--;break;case 40:W++;break;case 39:U++;break;case 37:U--;break}if(W>=0&&W<=T){if(U>=0&&U<=S){var Z=B.find("tr")[W];var X=b(Z).children()[U];var R=b(X).children().css("background-color");u.val(R)}}});var M=b(B).find("td");u.val=function(Q){var R=m._rgbToHex(Q);b.each(M,function(){var S=b(this).children().css("background-color");var T=m._rgbToHex(S);if(T==R){M.removeClass("jqx-editor-color-picker-selected-cell");b(this).addClass("jqx-editor-color-picker-selected-cell");b("#bar-"+u.command).css("background",S);return false}})};u.val(u.value);m._addCommandHandler(M,"mousedown",u.command,null,u);break;case"button":case"toggleButton":default:if(u.widget){if(u.type=="button"){u.widget.jqxButton("destroy")}else{u.widget.jqxToggleButton("destroy")}}var v=u.command;var H=u.action;var s=m.toThemeProperty("jqx-editor-toolbar-icon")+" "+m.toThemeProperty("jqx-editor-toolbar-icon-"+v);var O=b("<div unselectable='on' class='"+s+"'></div>");var w=b("<div unselectable='on'></div>").addClass("jqx-disableselect").addClass(m.toThemeProperty("jqx-editor-toolbar-button"));if(!u.init){w.append(O)}else{if(v){w.append(O)}}w.appendTo(i);if(u.type=="button"){w.jqxButton({disabled:m.disabled,rtl:m.rtl,theme:m.theme})}else{if(u.type=="toggleButton"){w.jqxToggleButton({disabled:m.disabled,rtl:m.rtl,uiToggle:false,theme:m.theme})}}if(u.init){u.init(w)}u.toggled=false;u.toggle=function(){u.toggled=!u.toggled};m.addHandler(w,"mousedown",function(Q){if(Q.preventDefault){Q.preventDefault()}if(Q.stopPropagation){Q.stopPropagation()}return false});if(!b.jqx.mobile.isTouchDevice()){m._addCommandHandler(w,"click",v,H,u)}else{m._addCommandHandler(w,"mousedown",v,H,u)}break}u.widget=w;if(w){try{if(u.tooltip!=""){u.widget.attr("title",u.tooltip);u.widget.attr("data-tooltip",u.tooltip)}if(u.command){u.widget.attr("data-command",u.command)}u.widget.attr("aria-label",u.tooltip)}catch(G){}if(u.type=="button"||u.type=="toggleButton"){if(r.length>2){if(y==0){w.css("border-right-radius","0px");w.addClass(m.toThemeProperty("jqx-rc-l"))}else{if(y==r.length-1){w.css("border-left-radius","0px");w.addClass(m.toThemeProperty("jqx-rc-r"))}}w.removeClass(m.toThemeProperty("jqx-rc-all"))}if(y!=0&&y!=r.length-1&&r.length>2){w.css("border-left-radius","0px");w.css("border-right-radius","0px");w.removeClass(m.toThemeProperty("jqx-rc-all"))}else{if(r.length==2){if(y==0){w.css("border-right-radius","0px");w.addClass(m.toThemeProperty("jqx-rc-l"))}else{w.css("border-left-radius","0px");w.addClass(m.toThemeProperty("jqx-rc-r"))}w.removeClass(m.toThemeProperty("jqx-rc-all"))}else{if(r.length==1){w.css("margin-right","0px")}}}}}})};m.toolbar.css("direction",!this.rtl?"ltr":"rtl");if(p.length==0){q(m.toolbar,l)}else{for(var j=0;j<p.length;j++){var f=p[j];var l=f.split(" ");var o=m.toThemeProperty("jqx-editor-toolbar-group")+" "+m.toThemeProperty("jqx-fill-state-normal");var k=b("<div class='"+o+"'></div>");k.addClass(m.toThemeProperty("jqx-rc-all"));m.toolbar.append(k);q(k,l)}var g=m.toolbar.find(".jqx-editor-toolbar-group");var e=g.length;for(var j=0;j<e;j++){if(b(g[j]).children().length==0){b(g[j]).remove()}}}if(b.jqx.browser.msie&&b.jqx.browser.version<8){b(".jqx-editor-toolbar-group").css("float","left");b(".jqx-editor-toolbar-group").children().css("float","left");b(".jqx-editor-toolbar-group").css("zoom","1");b(".jqx-editor-toolbar-group").children().css("zoom","1")}}m._arrange();m._addHandlers()},_arrange:function(){var d=this;if(d.content){if(d.tools==""||d.tools==false){d.content.height(d.container.outerHeight()-parseInt(d.container.css("padding-top"))-parseInt(d.container.css("padding-bottom"))-6);d.content.css("margin-top","4px");d.toolbar.hide()}else{d.toolbar.show();d.content.css("margin-top","0px");d.content.height(d.container.outerHeight()-d.toolbar.outerHeight()-parseInt(d.container.css("padding-top"))-parseInt(d.container.css("padding-bottom"))-2);if(d.toolbarPosition!="top"){d.content.css("margin-top","4px");d.content.css("margin-bottom","0px")}}if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.content.css("margin-top","4px");d.content.height(d.container.height()-d.toolbar.outerHeight()-2*parseInt(d.container.css("padding-bottom"))-10);d.content.width(d.container.width()-2*parseInt(d.container.css("padding-left"))-2)}if(d.editor.height()<d.content.height()){d.editor.height(d.content.height())}}},propertyChangedHandler:function(d,e,h,g){var f=d;if(f.isInitialized==undefined||f.isInitialized==false){return}if(e=="pasteMode"||e=="lineBreak"||e=="editable"){return}if(e=="disabled"){d._refreshTools()}if(e=="width"||e=="height"||e=="toolbarPosition"){d._arrange();return}if(e=="theme"){b.jqx.utilities.setTheme(h,g,d.host)}d.refresh()},selectRange:function(d){var e=this;if(!d){d=e.getRange()}e.selection.selectRange(d)},getRange:function(){var d=this;return d.selection.getRange()},getSelectedElement:function(){var h,k,d,g;var i=this;try{if(i.editorDocument.getSelection){var l=i.editorDocument.getSelection();h=l.getRangeAt(l.rangeCount-1);d=h.startContainer;g=h.endContainer;k=h.commonAncestorContainer;if(d.nodeName=="#text"){k=k.parentNode}if(d.nodeName=="#text"){d=d.parentNode}if(d.nodeName.toLowerCase()=="body"){d=d.firstChild}if(g.nodeName=="#text"){g=g.parentNode}if(g.nodeName.toLowerCase()=="body"){g=g.lastChild}if(d==g){k=d}return g}else{if(i.editorDocument.selection){h=i.editorDocument.selection.createRange();if(!h.duplicate){return null}k=h.parentElement();var f=h.duplicate();var e=h.duplicate();f.collapse(true);e.moveToElementText(f.parentElement());e.setEndPoint("EndToStart",f);d=f.parentElement();f=h.duplicate();e=h.duplicate();e.collapse(false);f.moveToElementText(e.parentElement());f.setEndPoint("StartToEnd",e);g=e.parentElement();if(d.nodeName.toLowerCase()=="body"){d=d.firstChild}if(g.nodeName.toLowerCase()=="body"){g=g.lastChild}if(d==g){k=d}return g}}}catch(j){return null}return null},_addHandlers:function(){var e=this;e.addHandler(e.toolbar,"mousedown.editor"+e.element.id,function(g){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false});var f=function(){if(e._textArea){if(!e.updating){e._textArea.value=e.val()}}if(e.changed){e._raiseEvent("change");e.changed=false}e.focused=false;if(e.inline){e.host.removeClass(e.toThemeProperty("jqx-fill-state-focus"));e.host.removeClass(e.toThemeProperty("jqx-editor-inline-focus"));if(e.tools==""||e.tools==null){return}e.toolbarContainer.fadeOut("fast")}};var d=function(){e.focused=true;if(e.inline){e.host.addClass(e.toThemeProperty("jqx-fill-state-focus"));e.host.addClass(e.toThemeProperty("jqx-editor-inline-focus"));e.host.addClass(e.toThemeProperty("jqx-rc-all"));if(e.tools==""||e.tools==null){return}e.toolbarContainer.fadeIn("fast");var g=e.host.coord();if(e.toolbarPosition!="bottom"){e.toolbarContainer.offset({left:g.left,top:g.top-e.toolbarContainer.outerHeight()-5})}else{e.toolbarContainer.offset({left:g.left,top:g.top+5+e.host.height()})}}};if(b.jqx.browser.mozilla){this.addHandler(b(document),"mousedown.editor"+e.element.id,function(g){f()})}e.addHandler(e.editor,"blur.editor"+e.element.id,function(g){f()});e.addHandler(e.editor,"focus.editor"+e.element.id,function(g){d()});e.addHandler(e.editor,"beforedeactivate.editor"+e.element.id,function(g){e.range=e.getRange()});e.addHandler(e.editor,"mousedown.editor"+e.element.id,function(g){if(!g.target.href){if(e.linkPopup){e.linkPopup.remove()}}e.range=e.getRange();if(b.jqx.browser.mozilla){d();g.stopPropagation()}if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}if(e.inline){e.editor.focus()}});if(b.jqx.mobile.isTouchDevice()){e.addHandler(b(e.editorDocument),"selectionchange.editor"+e.element.id,function(){if(e.editorDocument.activeElement!=e.editor[0]){setTimeout(function(){if(e.iframe){e.iframe[0].contentWindow.focus()}},500)}});e.addHandler(b(e.editorDocument),"touchstart.editor"+e.element.id,function(){setTimeout(function(){if(e.iframe){e.iframe[0].contentWindow.focus()}},500)})}e.addHandler(e.editor,"mouseup.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}e.range=e.getRange();e._refreshTools(null,true)});e.addHandler(e.editor,"keydown.editor"+e.element.id,function(g){if(e.keyPressed){e.keyPressed(g)}if(e._documentMode=="source"){return true}if(b.jqx.browser.mozilla){if(!e.focused){d()}}e.changeType="keyboard";if(e.disabled){if(g.preventDefault){g.preventDefault()}return false}if(e.updating){if(e.activeElement){var m=b.Event("keydown");b.extend(m,g);e.activeElement.trigger(m)}if(g.preventDefault){g.preventDefault()}return false}var n=g||window.event;var q=n.keyCode;var r=String.fromCharCode(q).toLowerCase();if(!e.editable){var l=[9,33,34,35,36,37,38,39,40,40,45];if(b.inArray(n.keyCode,l)==-1&&!(n.ctrlKey&&r=="c")&&!(n.ctrlKey&&r=="a")){g.preventDefault()}}if(e.selection.getText().length>0||e.linkPopup){var l=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(!b.inArray(n.keyCode,l)!=-1||(n.keyCode==65&&n.ctrlKey&&!n.altKey&&!n.shiftKey)){if(e._refreshToolsTimer){clearTimeout(e._refreshToolsTimer)}e._refreshToolsTimer=setTimeout(function(){e._refreshTools(null,true,n.keyCode)},10)}}if(q==13&&e.lineBreak!="default"){var k=e.getSelectedElement();if(k){var o=k.nodeName.toLowerCase();switch(o){case"pre":case"li":case"ul":case"ol":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return true}var p=k;while(p!=null){if(p.nodeName=="#document"){p=e.editorDocument.body;break}if(p.parentNode==e.editorDocument.body||p==e.editorDocument.body){break}p=p.parentNode}}if(p){var j=e.getRange();if(e.editorDocument.body.innerHTML=="<div></div>"&&e.lineBreak!="br"){e.selection.insertContent("​")}if(e.lineBreak=="div"){if(p==e.editorDocument.body){b(p).append("<div>​</div><span id='INSERTION_MARKER'> </span>")}else{b("<div>​</div><span id='INSERTION_MARKER'> </span>").insertAfter(p)}}else{if(e.lineBreak=="p"){if(p==e.editorDocument.body){b(p).append("<p>​</p><span id='INSERTION_MARKER'> </span>")}else{b("<p>​</p><span id='INSERTION_MARKER'> </span>").insertAfter(p)}}else{e.execute("insertHTML","<br/>​<span id='INSERTION_MARKER'> </span>")}}e.selectRange(j);var i=b(e.editorDocument).find("#INSERTION_MARKER");if(e.lineBreak!="br"){e.selection.selectNode(b(i).prev()[0],true)}else{e.selection.selectNode(i[0],true);if(e.getRange().setStartAfter){e.getRange().setStartAfter(i[0])}}i.remove();e.selection.collapse(false);if(p&&p.nodeName&&e.lineBreak=="br"){if(p.nodeName.toLowerCase()!="#text"){e.selection.selectNode(p,true);if(e.getRange().setStartAfter){e.getRange().setStartAfter(p)}e.selection.collapse(false)}}if(e.lineBreak!="br"){j=e.getRange();if(j.select){j.select()}}if(g.preventDefault){g.preventDefault()}return false}}if(n.ctrlKey&&(r=="k"||r=="u"||r=="b"||r=="i")){if(g.preventDefault){g.preventDefault()}var h=null;switch(r){case"k":h="link";break;case"u":h="underline";break;case"b":h="bold";break;case"i":h="italic";break}if(e.commands[h].widget){e.commands[h].widget.trigger("click")}return false}});e.addHandler(e.editor,"paste.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}if(e.readOnly){return true}e.updating=true;e.readOnly=true;var k=g;try{var h=function(r,q){if(q){if(!e.paragraphise){r=r.replace(/\n/g,"<br />")}else{r="<p>"+r+"</p>";r=r.replace(/\n/g,"</p><p>");r=r.replace(/<p>\s<\/p>/gi,"")}}else{r=r.replace(/<html[^>]*?>(.*)/gim,"$1");r=r.replace(/<\/html>/gi,"");r=r.replace(/<body[^>]*?>(.*)/gi,"$1");r=r.replace(/<\/body>/gi,"");r=r.replace(/<style[^>]*?>[\s\S]*?<\/style[^>]*>/gi,"");r=r.replace(/<(?:meta|link)[^>]*>\s*/gi,"");r=r.replace(/<\\?\?xml[^>]*>/gi,"");r=r.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,"");r=r.replace(/<o:p>\s*<\/o:p>/g,"");r=r.replace(/<o:p>[\s\S]*?<\/o:p>/g," ");r=r.replace(/<\/?\w+:[^>]*>/gi,"");r=r.replace(/<\!--[\s\S]*?-->/g,"");r=r.replace(/<\!\[[\s\S]*?\]>/g,"");r=r.replace(/\s*mso-[^:]+:[^;"']+;?/gi,"");r=r.replace(/<(\w[^>]*) style='([^\']*)'([^>]*)/gim,"<$1$3");r=r.replace(/<(\w[^>]*) style="([^\"]*)"([^>]*)/gim,"<$1$3");r=r.replace(/\s*margin: 0cm 0cm 0pt\s*;/gi,"");r=r.replace(/\s*margin: 0cm 0cm 0pt\s*"/gi,'"');r=r.replace(/\s*text-indent: 0cm\s*;/gi,"");r=r.replace(/\s*text-indent: 0cm\s*"/gi,'"');r=r.replace(/\s*text-align: [^\s;]+;?"/gi,'"');r=r.replace(/\s*page-break-before: [^\s;]+;?"/gi,'"');r=r.replace(/\s*font-variant: [^\s;]+;?"/gi,'"');r=r.replace(/\s*tab-stops:[^;"']*;?/gi,"");r=r.replace(/\s*tab-stops:[^"']*/gi,"");r=r.replace(/\s*face="[^"']*"/gi,"");r=r.replace(/\s*face=[^ >]*/gi,"");r=r.replace(/\s*font-family:[^;"']*;?/gi,"");r=r.replace(/\s*font-size:[^;"']*;?/gi,"");r=r.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");r=r.replace(/<(\w+)[^>]*\sstyle="[^"']*display\s?:\s?none[\s \S]*?<\/\1>/ig,"");r=r.replace(/\s*style='\s*'/gi,"");r=r.replace(/\s*style="\s*"/gi,"");r=r.replace(/<span\s*[^>]*>\s* \s*<\/span>/gi," ");r=r.replace(/<span\s*[^>]*><\/span>/gi,"");r=r.replace(/<(\w[^>]*) align=([^ |>]*)([^>]*)/gi,"<$1$3");r=r.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");r=r.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,"$2");r=r.replace(/<font\s*>([\s\S]*?)<\/font>/gi,"$1");r=r.replace(/<(u|i|strike)> <\/\1>/gi," ");r=r.replace(/<h\d>\s*<\/h\d>/gi,"");r=r.replace(/<(\w[^>]*) language=([^ |>]*)([^>]*)/gi,"<$1$3");r=r.replace(/<(\w[^>]*) onmouseover="([^\"']*)"([^>]*)/gi,"<$1$3");r=r.replace(/<(\w[^>]*) onmouseout="([^\"']*)"([^>]*)/gi,"<$1$3");r=r.replace(/<h(\d)([^>]*)>/gi,"<h$1>");r=r.replace(/<(h\d)><font[^>]*>([\s\S]*?)<\/font><\/\1>/gi,"<$1>$2</$1>");r=r.replace(/<(h\d)><em>([\s\S]*?)<\/em><\/\1>/gi,"<$1>$2</$1>");r=r.replace(/<b\b[^>]*>(.*?)<\/b[^>]*>/gi,"<strong>$1</strong>");r=r.replace(/<i\b[^>]*>(.*?)<\/i[^>]*>/gi,"<em>$1</em>");r=r.replace(/<\s+[^>]*>/gi,"");r=r.replace(/<span>([\s\S]*?)<\/span>/gi,"$1");r=r.replace(/<span>([\s\S]*?)<\/span>/gi,"$1");r=r.replace(/<div>([\s\S]*?)<\/div>/gi,"$1");r=r.replace(/<div>([\s\S]*?)<\/div>/gi,"$1");r=r.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g,"");r=r.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g,"");r=r.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g,"");if(r.trim){r=r.trim()}if(!e.paragraphise){r.replace(/<p>/gi,"<br />");r.replace(/<\/p>/gi,"")}else{var p=r.substr(0,2);if("<p"!==p){r="<p>"+r+"</p>";r=r.replace(/\n/g,"</p><p>");r=r.replace(/<br[^>]*>/gi,"</p><p>")}}r=r.replace(/<br>/gi,"<br />");r=r.replace(/<br[^>]*><\/p>/gim,"</p>");r=r.replace(/<p> <\/p>/gi,"");r=r.replace(/<p>\s<\/p>/gi,"");r=r.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g,"");r=r.replace(/MsoNormal/gi,"");r=r.replace(/<\/?meta[^>]*>/gi,"");r=r.replace(/<\/?xml[^>]*>/gi,"");r=r.replace(/<\?xml[^>]*\/>/gi,"");r=r.replace(/<!--(.*)-->/gi,"");r=r.replace(/<!--(.*)>/gi,"");r=r.replace(/<!(.*)-->/gi,"");r=r.replace(/<w:[^>]*>(.*)<\/w:[^>]*>/gi,"");r=r.replace(/<w:[^>]*\/>/gi,"");r=r.replace(/<\/?w:[^>]*>/gi,"");r=r.replace(/<m:[^>]*\/>/gi,"");r=r.replace(/<m:[^>]>(.*)<\/m:[^>]*>/gi,"");r=r.replace(/<o:[^>]*>(.*)<\/o:[^>]*>/gi,"");r=r.replace(/<o:[^>]*\/>/gi,"");r=r.replace(/<\/?m:[^>]*>/gi,"");r=r.replace(/style=\"([^>]*)\"/gi,"");r=r.replace(/style=\'([^>]*)\'/gi,"");r=r.replace(/class=\"(.*)\"/gi,"");r=r.replace(/class=\'(.*)\'/gi,"");r=r.replace(/<b>/gi,"<strong>");r=r.replace(/<\/b>/gi,"</strong>");r=r.replace(/<p[^>]*>/gi,"<p>");r=r.replace(/<\/p[^>]*>/gi,"</p>");r=r.replace(/<span[^>]*>/gi,"");r=r.replace(/<\/span[^>]*>/gi,"");r=r.replace(/<st1:[^>]*>/gi,"");r=r.replace(/<\/st1:[^>]*>/gi,"");r=r.replace(/<font[^>]*>/gi,"");r=r.replace(/<\/font[^>]*>/gi,"");r=r.replace(" ","");r=r.replace(/<strong><\/strong>/gi,"");r=r.replace(/<p><\/p>/gi,"");r=r.replace(/\/\*(.*)\*\//gi,"");r=r.replace(/<!--/gi,"");r=r.replace(/-->/gi,"");r=r.replace(/<style[^>]*>[^<]*<\/style[^>]*>/gi,"");r=r.trim()}return r};var m=e.getRange();if(e.pasteMode=="text"&&!b.jqx.browser.mozilla){e.selection.insertContent('<textarea cols="50" contenteditable="false" class="jqx-editor-paste-element"></textarea>')}else{e.selection.insertContent('<div class="jqx-editor-paste-element"> </div>')}var n=b(window).scrollTop();var i=b(e.editorDocument).find(".jqx-editor-paste-element");i.css("top",n+"px");if(e.editor[0].createTextRange){g.preventDefault();var o=e.editor[0].createTextRange();o.moveToElementText(i[0]);o.execCommand("Paste")}else{var j=e.editorDocument.createRange();j.selectNodeContents(i[0]);e.selectRange(j)}if(e.pasteMode=="text"&&!b.jqx.browser.mozilla){i.select()}e.marker=i;setTimeout(function(){e.selectRange(m);var s=function(B){var z=e.editorDocument.createElement("div");var A=e.editorDocument.createDocumentFragment();z.innerHTML=B;while(z.firstChild){A.appendChild(z.firstChild)}return A};if(e.pasteMode!="text"){var y=s(e.marker.html());if(y.firstChild&&y.firstChild.className==="jqx-editor-paste-element"){var q=[];for(var v=0,t=y.childNodes.length;v<t;v++){q.push(y.childNodes[v].innerHTML)}y=s(q.join("<br />"))}var p=document.createElement("div");p.appendChild(y.cloneNode(true));var x=p.innerHTML}else{var x=e.marker.val();if(e.marker.html()!=""&&e.marker.val().indexOf("\n")==-1){var x=e.marker.html();x=x.replace(/ /gm,"");x=x.replace(/\n\n/gm,"\n");x=x.replace(/<br[^>]*>/gi,"\n");x=x.replace(/<li[^>]*>/gi,"\n");x=x.replace(/<p[^>]*>/gi,"\n");e.marker.html(x);var x=e.marker.text()}}var r=h(x,e.pasteMode=="text");var w=e.getRange();e.selection.insertContent(r+"<span id='INSERTION_MARKER'> </span>");e.marker.remove();var u=b(e.editorDocument).find("#INSERTION_MARKER");e.selection.selectNode(u[0],true);if(e.getRange().setStartAfter){e.getRange().setStartAfter(u[0])}u.remove();e.selection.collapse(false);u.removeAttr("id");e._refreshTools();e.changed=true},100);e.updating=false;e.readOnly=false}catch(l){if(console){console.log(l)}}});e.addHandler(e.editor,"keyup.editor"+e.element.id,function(i){if(e._documentMode=="source"){return true}if(e.updating||e.disabled||!e.editable){if(i.preventDefault){i.preventDefault()}if(i.stopPropagation){i.stopPropagation()}return false}e.range=e.getRange();e.changed=true;var h=i||window.event;var g=h.keyCode;var j=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(b.inArray(h.keyCode,j)!=-1||(h.keyCode==65&&h.ctrlKey&&!h.altKey&&!h.shiftKey)){e._refreshTools(null,true,h.keyCode)}});e.addHandler(e.editor,"click.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}if(e.editImage){b(e.editImage).removeClass("jqx-editor-focus");e.editImage=null}if(g.target.tagName.toLowerCase()=="img"){var h=g.target;e.editImage=h;b(e.editImage).addClass("jqx-editor-focus")}});e.addHandler(e.editor,"dblclick.editor"+e.element.id,function(g){if(e._documentMode=="source"){return true}if(g.target.tagName.toLowerCase()=="img"){var h=g.target;if(b("#imageWindow"+this.element.id).length>0){e.editImage=h;e._updateImageWindow()}}})},_updateLinkWindow:function(){var g=this;var i=b("#linkWindow"+this.element.id);i.jqxWindow({position:{center:g.widget}});i.jqxWindow("open");var e=i.find("input");var h=i.find(".jqx-editor-link-checkbox");var f=i.find("button:first");var d=b(i.find("button")[1]);if(g.editLink&&g.editLink.href){e[0].value=g.editLink.href||"";e[1].value=b(g.editLink).text()||g.editLink.href;h.val(b(g.editLink).attr("target")=="_blank");d.show()}else{e[0].value="";e[1].value="";if(!g.selection.isCollapsed()){var j=g.selection.getText();if(j.match(/^(?!:\/\/)([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/i)){e[0].value=j}else{e[1].value=j}}h.val(false);d.hide()}if(e[0].value.length>0){f.jqxButton({disabled:false})}else{f.jqxButton({disabled:true})}},_updateImageWindow:function(){var g=this;var i=g.editImage;if(!i){i=b("<img>")[0]}var h=b("#imageWindow"+this.element.id);h.jqxWindow({position:{center:g.widget}});h.jqxWindow("open");var e=h.find("input");var d=b(h.find("button")[1]);if(g.editImage){d.show()}else{d.hide()}e[0].value=i.src;if(e[0].value==""){e[0].value=""}e[1].value=i.alt;if(i.style.width!="auto"){e[2].value=i.style.width}else{e[2].value=""}if(i.style.height!="auto"){e[3].value=i.style.height}else{e[3].value=""}if(i.style.marginLeft&&i.style.marginLeft!="0px"){e[4].value=i.style.marginLeft}else{e[4].value=""}if(i.style.marginTop&&i.style.marginTop!="0px"){e[5].value=i.style.marginTop}else{e[5].value=""}var j=h.find(".jqx-editor-align");var f=b(i).css("float");if(f=="left"){j.jqxDropDownList({selectedIndex:1})}else{if(f=="right"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}},_removeHandlers:function(){var d=this;if(d.editor){d.removeHandler(d.editor,"paste.editor"+d.element.id);d.removeHandler(d.editor,"blur.editor"+d.element.id);d.removeHandler(d.editor,"focus.editor"+d.element.id);d.removeHandler(d.editor,"click.editor"+d.element.id);d.removeHandler(d.editor,"mousedown.editor"+d.element.id);d.removeHandler(d.editor,"mouseup.editor"+d.element.id);d.removeHandler(d.editor,"keyup.editor"+d.element.id);d.removeHandler(d.editor,"keydown.editor"+d.element.id);d.removeHandler(d.editor,"beforedeactivate.editor"+d.element.id);d.removeHandler(d.editor,"dblclick.editor"+d.element.id)}if(d.toolbar){d.removeHandler(d.toolbar,"mousedown.editor"+d.element.id)}},getParentByTag:function(e,d){var d=d.toLowerCase(),f=e;do{if(d==""||f.nodeName.toLowerCase()==d){return f}}while(f=f.parentNode);return e},isStyleProperty:function(g,f,j,i){var f=f.toLowerCase(),h=g;do{if(h.nodeName.toLowerCase()==f&&h.style[j]==i){return !0}}while(h=h.parentNode);return !1},setStyleProperty:function(e,d){this.style[d]=!1;var f=this.getParentByTag(e,d);f&&f.tagName.toLowerCase()==d&&(this.style[d]=!0);if(d=="del"&&this.getParentByTag(e,"strike")&&this.getParentByTag(e,"strike").tagName.toLowerCase()=="strike"){this.style.del=!0}},updateStyle:function(f){var g=this;var f=g.getSelectedElement()?g.getSelectedElement():f;if(!f||!g.setStyleProperty){return}try{if(window.getComputedStyle){if(f.nodeName.toLowerCase()=="#text"){f=g.editor[0]}var d=window.getComputedStyle(f,null);var i=((d.getPropertyValue("font-weight")==401)?700:d.getPropertyValue("font-weight"));g.style={fontStyle:d.getPropertyValue("font-style"),fontSize:d.getPropertyValue("font-size"),textDecoration:d.getPropertyValue("text-decoration"),fontWeight:i,fontFamily:d.getPropertyValue("font-family"),textAlign:d.getPropertyValue("text-align"),color:g._rgbToHex(d.color),backColor:g._rgbToHex(d.backgroundColor)};g.style.fontStyle=d.getPropertyValue("font-style");g.style.vAlign=d.getPropertyValue("vertical-align");g.style.del=g.isStyleProperty(f,"span","textDecoration","line-through");g.style.u=g.isStyleProperty(f,"span","textDecoration","underline");var h=function(l){var k="transparent";var e="rgba(0, 0, 0, 0)";while(l&&(window.getComputedStyle(l).backgroundColor==k||window.getComputedStyle(l).backgroundColor==e)){l=l.parentNode}return l?window.getComputedStyle(l).backgroundColor:k};if(!g.style.backColor){g.style.backColor=g._rgbToHex(h(f))}}else{var d=f.currentStyle;g.style={fontStyle:d.fontStyle,fontSize:d.fontSize,textDecoration:d.textDecoration,fontWeight:d.fontWeight,fontFamily:d.fontFamily,textAlign:d.textAlign,color:g._rgbToHex(d.color),backColor:g._rgbToHex(d.backgroundColor)}}g.setStyleProperty(f,"h1");g.setStyleProperty(f,"h2");g.setStyleProperty(f,"h3");g.setStyleProperty(f,"h4");g.setStyleProperty(f,"h5");g.setStyleProperty(f,"h6");g.setStyleProperty(f,"del");g.setStyleProperty(f,"sub");g.setStyleProperty(f,"sup");g.setStyleProperty(f,"u");if(f.nodeName.toLowerCase()=="a"){if(g.style.textDecoration=="underline"){g.style.u=true}}if(g.style.h1||g.style.h2||g.style.h3||g.style.h4||g.style.h5||g.style.h6){g.style.heading=true}}catch(j){return null}},_refreshTools:function(e,f,n){var k=this;if(k.updating){return}var e=k.getSelectedElement()?k.getSelectedElement():e;if(!e||!k.setStyleProperty){return}k.updateStyle(e);var o=k.readOnly;k.readOnly=true;if(k.tools!==false){var j=k.tools.split(" ");var l=k.tools.split(" | ");var m=function(i){b.each(i,function(q,r){var p=k.commands[this];if(!p){return true}switch(p.type){case"list":p.widget.jqxDropDownList("clearSelection");p.widget.jqxDropDownList({disabled:k.disabled});break;case"colorPicker":p.val(p.value);p.widget.jqxDropDownButton({disabled:k.disabled});break;case"toggleButton":p.widget.jqxToggleButton("unCheck");p.widget.jqxToggleButton({disabled:k.disabled});break;case"button":default:p.widget.jqxButton({disabled:k.disabled});break}})};if(l.length==0){m(j)}else{for(var h=0;h<l.length;h++){var d=l[h];var j=d.split(" ");m(j)}}if(k.style){var g=function(i){b.each(i,function(x,E){var t=k.commands[this];if(!t){return true}if(t.refresh){t.refresh(t.widget,k.style);return true}switch(t.type){case"list":if(t.command=="fontname"){var B=-1;var D=999;for(var H=0;H<t.value.length;H++){var E=t.value[H].label.toLowerCase();var w=k.style.fontFamily.toLowerCase().indexOf(E);if(w>=0){if(w<D){B=H}D=Math.min(D,w)}}t.widget.jqxDropDownList("selectIndex",B)}else{if(t.command=="formatblock"){var E=null;if(k.style.h1){E="h1"}else{if(k.style.h2){E="h2"}else{if(k.style.h3){E="h3"}else{if(k.style.h4){E="h4"}else{if(k.style.h5){E="h5"}else{if(k.style.h6){E="h6"}}}}}}t.widget.jqxDropDownList("selectItem",E)}else{if(t.command=="fontsize"){var A="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");var C=-1;try{var C=e.getAttribute("size")-1;if(C==-1){C=k.editorDocument.queryCommandValue(t.command)-1}}catch(I){}var s=A[C];t.widget.val(s)}}}break;case"colorPicker":var r=function(J){if(typeof J!="number"){return J}return"rgb("+(J&255)+", "+((J&65280)>>8)+", "+((J&16711680)>>16)+")"};var F=r(k.editorDocument.queryCommandValue(t.command));if(t.command=="backcolor"){if(k.style.backColor==null){F="#FFFFFF"}}var z=k._rgbToHex(F);if(z){t.val(z)}else{if(t.command=="forecolor"){t.val(k.style.color)}else{if(t.command=="backcolor"){t.val(k.style.backColor)}}}break;case"toggleButton":if(t.command=="viewsource"){return}if(!t.command){return}var q=false;var p=k.editorDocument.queryCommandState(t.command)&&k.editorDocument.queryCommandEnabled(t.command);if(t.command=="createlink"&&e.nodeName.toLowerCase()=="a"){var y=true;if(b(e).text().indexOf(k.selection.getText())==-1&&k.selection.getText()!=""){y=false}if(y){if(k.linkPopup){k.linkPopup.remove()}p=true;k.linkPopup=b("<div class='jqx-editor-link-popup' contentEditable='false' style='overflow: hidden; white-space: nowrap; padding: 5px; height: 17px; font-size: 12px; color: #222222; background: #F5F5F5; position: absolute; z-index: 9999;'>"+k.localization["Go to link"]+": <a target='_blank' style='color:#222222;' href='"+e.href+"'>"+e.href+"</a> - <a style='color:#222222;' href='#change'>"+k.localization.Change+"</a> - <a style='color:#222222;' href='#remove'>"+k.localization.Remove+"</a></div>").appendTo(k.editor);var u=b(e).coord();var v=u.left;if(u.left+k.linkPopup.width()>k.editor.width()){v=k.editor.width()-k.linkPopup.width()-15}k.linkPopup.offset({top:b(e).height()+u.top+5,left:v});k.addHandler(k.linkPopup,"mousedown",function(K){if(K.target&&K.target.href){var J=b(K.target).index();switch(J){case 1:k.editor.focus();k.selection.selectNode(e,true);k.commands.link.widget.trigger("click");break;case 2:try{k.editor.focus();k.selection.selectNode(e);k.execute("unlink");k.commands.underline.toggled=false;k.selection.collapse(false);k._refreshTools()}catch(L){}break;default:window.open(K.target.href,"_blank");break}}if(K.preventDefault){K.preventDefault()}if(K.stopPropagation){K.stopPropagation()}return false})}}if(t.command=="bold"){if(k.style.fontWeight&&(k.style.fontWeight>=600||k.style.fontWeight=="bold")){q=true}if(k.selection.isCollapsed()){t.toggled=p}else{t.toggled=p||q}p=t.toggled}else{if(t.command=="italic"){if(k.style.fontStyle&&k.style.fontStyle=="italic"){q=true}if(!f){p=t.toggled}else{t.toggled=p}}else{if(t.command=="underline"){if(k.style.u){q=true}if(!f){p=t.toggled}else{t.toggled=p}}else{if(t.command=="justifyleft"){if(k.style.textAlign=="left"){q=true}}else{if(t.command=="justifyright"){if(k.style.textAlign=="right"){q=true}}else{if(t.command=="justifycenter"){if(k.style.textAlign=="center"){q=true}}else{if(t.command=="justifyfull"){if(k.style.textAlign=="justify"){q=true}}else{b.each(k.style,function(J,K){if(t.command==J.toLowerCase()){q=true}})}}}}}}}var G=p;if(q&&t.command.indexOf("justify")!=-1){t.widget.jqxToggleButton("check")}else{if(G){t.widget.jqxToggleButton("check")}else{if(q&&k.range.collapsed===false){t.widget.jqxToggleButton("check")}else{if(b.jqx.browser.msie&&b.jqx.browser.version<9&&q&&!k.selection.isCollapsed()){t.widget.jqxToggleButton("check")}}}}break;case"button":default:if(t.refresh){t.refresh(t.widget,k.style)}break}})};if(l.length==0){g(j)}else{for(var h=0;h<l.length;h++){var d=l[h];var j=d.split(" ");g(j)}}}}k.readOnly=o},_rgbToHex:function(e){if(e){if(e.substr(0,1)==="#"){if(e.length==4){var h=e.substr(1,1);var f=e.substr(2,1);var d=e.substr(3,1);return"#"+h+h+f+f+d+d}return e}var i=/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/i.exec(e);if(!i){return null}var h=parseInt(i[2],10).toString(16);var f=parseInt(i[3],10).toString(16);var d=parseInt(i[4],10).toString(16);return"#"+((h.length==1?"0"+h:h)+(f.length==1?"0"+f:f)+(d.length==1?"0"+d:d))}return null},_preventDefault:function(d,e){if(e!==false){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}}if(d.preventDefault){d.preventDefault()}if(d.stopPropagation){d.stopPropagation()}d.cancelBubble=true;d.returnValue=false},_addCommandHandler:function(g,f,j,i,d){var e=this;var h;if(!j&&d.init){j="custom"}switch(j){case"custom":switch(d.type){case"list":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){d.value=b(this).val();e.execute("custom",d);if(!e.readOnly){e._refreshTools()}}}e._preventDefault(k,false)};break;case"colorPicker":h=function(m){if(e._documentMode!="source"){var k=b(d.colorPicker).find("td").removeClass("jqx-editor-color-picker-selected-cell");if(m.target.nodeName.toLowerCase()=="div"){var l=b(m.target).css("background-color");b(m.target).parent().addClass("jqx-editor-color-picker-selected-cell")}else{var l=b(m.target).find("div").css("background-color");b(m.target).addClass("jqx-editor-color-picker-selected-cell")}b("#bar-"+j).css("background",l);d.widget.val=function(){var o=function(q){if(typeof q!="number"){return q}return"rgb("+(q&255)+", "+((q&65280)>>8)+", "+((q&16711680)>>16)+")"};var p=o(l);var n=e._rgbToHex(p);return n};d.widget.jqxDropDownButton("close");e.execute("custom",d)}e._preventDefault(m);return false};break;case"button":case"toggleButton":default:h=function(k){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);var m=b(this).attr("data-command");var l=this;if(e._documentMode!="source"){if(d.toggle){d.toggle()}e.execute("custom",d);e._refreshTools()}return false};break}break;case"formatblock":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){e.execute(b(this).attr("data-command"),"<"+b(this).val()+">",d);if(!e.readOnly){e.commands.bold.toggled=false;e._refreshTools()}}}e._preventDefault(k,false)};break;case"fontsize":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){var m=b(this).val();var n="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");var l=b(this).jqxDropDownList("getSelectedIndex")+1;var l=1+n.indexOf(m);e.execute(b(this).attr("data-command"),l,d)}}e._preventDefault(k,false)};break;case"fontname":h=function(k){if(e._documentMode!="source"){if(k.args.type!="none"){var l=b(this).val();e.execute(b(this).attr("data-command"),l,d)}}e._preventDefault(k,false)};break;case"forecolor":case"backcolor":h=function(m){if(e._documentMode!="source"){var k=b(d.colorPicker).find("td").removeClass("jqx-editor-color-picker-selected-cell");if(m.target.nodeName.toLowerCase()=="div"){var l=b(m.target).css("background-color");b(m.target).parent().addClass("jqx-editor-color-picker-selected-cell")}else{var l=b(m.target).find("div").css("background-color");b(m.target).addClass("jqx-editor-color-picker-selected-cell")}b("#bar-"+j).css("background",l);d.widget.jqxDropDownButton("close");e.execute(j,l,d)}e._preventDefault(m);return false};break;case"viewsource":h=function(k){if(e.linkPopup){e.linkPopup.remove()}d.toggle();e.setMode(d.toggled);if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);return false};break;case"insertimage":h=function(k){e._insertImageAction(k,e,d)};break;case"createlink":h=function(k){e._createLinkAction(k,e,d)};break;default:h=function(k){if(b(".jqx-editor-dropdownpicker").length>0){b(".jqx-editor-dropdownpicker").jqxDropDownButton("close")}if(b(".jqx-editor-dropdownlist").length>0){b(".jqx-editor-dropdownlist").jqxDropDownList("close")}e._preventDefault(k);var n=b(this).attr("data-command");var l=this;if(e._documentMode!="source"){if(n=="underline"){if(e.getSelectedElement()){var m=e.getSelectedElement();if(m&&m.nodeName.toLowerCase()=="a"){if(d.toggled){b(m).css("text-decoration","none")}else{b(m).css("text-decoration","underline")}d.toggle();e._refreshTools();return false}}}if(d.toggle){d.toggle()}e.execute(n,b(this).val(),d);e._refreshTools()}return false};break}e.addHandler(g,f,h);return false},_createLinkAction:function(d,k,l){var k=this;if(k._documentMode=="source"){k._preventDefault(d);return}if(!k.focused){k.editor.focus()}k.range=k.getRange();var e=k.getSelectedElement();if(e.nodeName.toLowerCase()=="a"){k.editLink=e}else{k.editLink=null}if(b("#linkWindow"+this.element.id).length>0){if(k.editLink){k.selection.selectNode(e,true)}k._updateLinkWindow();k._preventDefault(d);return false}var m=b("<div class='jqx-editor-window jqx-editor-link-window'><div>"+k.localization["Insert Link"]+"</div><div><table style='border-collapse: separate; border-spacing: 2px;'><tr><td align='right'>"+k.localization.URL+":</td><td><input style='width: 200px; height: 23px;' value=''/></td><tr/><tr><td align='right'>"+k.localization.Title+":</td><td><input style='width: 200px; height: 23px;' value=''/></td><tr/><tr><td align='right'></td><td><div class='jqx-editor-link-checkbox'>"+k.localization["Open in a new window/tab"]+"</div></td><tr/><tr><td align='right'></td><td align='right'><button>Ok</button><button style='margin-left: 5px;'>Remove</button><button style='margin-left: 5px;'>Cancel</button></td><tr/></table></div></div>");m[0].id="linkWindow"+this.element.id;var j=m.find("input");j.addClass(k.toThemeProperty("jqx-widget"));j.addClass(k.toThemeProperty("jqx-widget-content"));j.addClass(k.toThemeProperty("jqx-input"));var i=m.find(".jqx-editor-link-checkbox").jqxCheckBox({theme:k.theme,height:23,width:180});var g=m.find("button:first").jqxButton({theme:k.theme,disabled:true});var o=b(m.find("button")[1]).jqxButton({theme:k.theme});var h=m.find("button:last").jqxButton({theme:k.theme});g.val(k.localization.Ok);h.val(k.localization.Cancel);o.val(k.localization.Remove);k.addHandler(h,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(p){k.editor.focus();k.selectRange(k.range);k._refreshTools();k._preventDefault(p)});if(!k.editLink||(k.editLink&&!k.editLink.href)){o.hide()}var f=false;k.addHandler(b(j[0]),"focus",function(){if(j[1].value==""||j[1].value==j[0].value){f=true}else{f=false}});k.addHandler(b(j[1]),"keyup",function(p){if(p.keyCode){if(p.keyCode==13){g.trigger("click")}if(p.keyCode==27){h.trigger("click")}}});k.addHandler(b(j[0]),"keyup change",function(p){if(j[0].value.length>0){g.jqxButton({disabled:false})}else{g.jqxButton({disabled:true})}if(f){j[1].value=j[0].value}if(p.keyCode){if(p.keyCode==13){g.trigger("click")}if(p.keyCode==27){h.trigger("click")}}});k.addHandler(o,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(p){m.jqxWindow("close");try{k.editor.focus();k.selection.selectNode(k.editLink);k.execute("unlink");k.selection.collapse(false);k.commands.underline.toggled=false;k._refreshTools()}catch(q){}k._preventDefault(p)});k.addHandler(g,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(s){var q=m.find("input");var r=b("<a>"+(q[1].value||q[0].value)+"</a>");if(i.val()){r.attr("target","_blank")}r[0].href=b.trim(q[0].value);if(q[0].value.indexOf("http")==-1&&q[0].value.indexOf("mailto")==-1){r[0].href="https://"+b.trim(q[0].value)}if(!k.focused){k.editor.focus()}if(k.range){k.selectRange(k.range)}if(k.editLink){b(k.editLink).remove()}k.execute("insertHTML",""+r[0].outerHTML+"<span id='INSERTION_MARKER'> </span>",l);k.editor.focus();var p=b(k.editorDocument).find("#INSERTION_MARKER");k.selection.selectNode(p[0],true);if(k.getRange().setStartAfter){k.getRange().setStartAfter(p[0])}p.remove();k.selection.collapse(false);k._refreshTools();k._preventDefault(s)});k.updating=true;m.appendTo(document.body);k.addHandler(m,"open",function(){k.updating=true;setTimeout(function(){k.range=k.getRange();b(j[0]).focus()},25)});m.jqxWindow({resizable:false,width:280,okButton:g,cancelButton:h,theme:k.theme,isModal:true,position:{center:k.widget}});k.addHandler(m,"close",function(){k.updating=false});if(!k.focused){k.editor.focus();k.selectRange(k.range)}if(k.editLink){j[0].value=k.editLink.href||"";j[1].value=b(k.editLink).text();i.val(b(k.editLink).attr("target")=="_blank")}else{if(!k.selection.isCollapsed()){var n=k.selection.getText();if(n.match(/^(?!:\/\/)([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/i)){j[0].value=n}else{j[1].value=n}}}if(j[0].value.length>0){g.jqxButton({disabled:false})}else{g.jqxButton({disabled:true})}k._preventDefault(d);return false},_insertImageAction:function(j,i,g){if(i._documentMode=="source"){i._preventDefault(j);return}if(!i.focused){i.editor.focus()}i.range=i.getRange();if(b("#imageWindow"+this.element.id).length>0){i._updateImageWindow();i._preventDefault(j);return false}var h=b("<div class='jqx-editor-window jqx-editor-image-window'><div>"+i.localization["Insert Image"]+"</div><div><table style='border-collapse: separate; border-spacing: 2px;'><tr><td align='right'>"+i.localization.URL+":</td><td><input style='width: 180px; height: 23px;' value=''/></td><tr/><tr><td align='right'>"+i.localization["Alt Text"]+":</td><td><input style='width: 180px; height: 23px;' value=''/></td><tr/><tr><td align='right'>"+i.localization.Width+":</td><td><input style='width: 180px; height: 23px;' value=''/></td><tr/><tr><td align='right'>"+i.localization.Height+":</td><td><input style='width: 180px; height: 23px;' value=''/></td><tr/><tr><td align='right'>"+i.localization.HSpace+":</td><td><input style='width: 180px; height: 23px;' class='jqx-editor-hspace'/></td><tr/><tr><td align='right'>"+i.localization.VSpace+":</td><td><input style='width: 180px; height: 23px;' class='jqx-editor-vspace'/></td><tr/><tr><td align='right'>"+i.localization.Align+":</td><td><div class='jqx-editor-align'></div></td><tr/><tr><td align='right'></td><td align='right'><button>Ok</button><button style='margin-left: 5px;'>Remove</button><button style='margin-left: 5px;'>Cancel</button></td><tr/></table></div></div>");h[0].id="imageWindow"+this.element.id;var e=h.find("input");e.addClass(i.toThemeProperty("jqx-widget"));e.addClass(i.toThemeProperty("jqx-widget-content"));e.addClass(i.toThemeProperty("jqx-input"));h.find(".jqx-editor-align").jqxDropDownList({hint:false,autoDropDownHeight:true,selectedIndex:0,theme:i.theme,height:23,width:180,source:[i.localization["not set"],i.localization.Left,i.localization.Right]});var f=h.find("button:first").jqxButton({theme:i.theme});var k=h.find("button:last").jqxButton({theme:i.theme});var d=b(h.find("button")[1]).jqxButton({theme:i.theme});f.val(i.localization.Ok);k.val(i.localization.Cancel);d.val(i.localization.Remove);d.hide();i.addHandler(d,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(l){b(i.editImage).removeClass("jqx-editor-focus");b(i.editImage).remove();i.editImage=null;i._preventDefault(l);h.jqxWindow("close");i._raiseEvent("change")});i.addHandler(k,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(l){b(i.editImage).removeClass("jqx-editor-focus");i.editImage=null;i._preventDefault(l)});i.addHandler(f,!b.jqx.mobile.isTouchDevice()?"click":b.jqx.mobile.getTouchEventName("touchstart"),function(o){b(i.editImage).removeClass("jqx-editor-focus");var m=h.find("input");var p=i.editImage?b(i.editImage):b('<img style="border: 1px solid transparent;">');var n=p.attr("src",m[0].value).attr("unselectable","on");if(m[1].value){n.attr("alt",m[1].value).attr("title",m[1].value)}if(m[2].value&&!isNaN(parseInt(m[2].value))){n.width(m[2].value)}else{n.css("width","auto")}if(m[3].value&&!isNaN(parseInt(m[3].value))){n.height(m[3].value)}else{n.css("height","auto")}if(m[4].value){if(m[4].value.toString()=="auto"){n.css("margin-left","auto");n.css("margin-right","auto")}else{if(m[4].value.toString().indexOf("%")!=-1){n.css("margin-left",parseInt(m[4].value)+"%");n.css("margin-right",parseInt(m[4].value)+"%")}else{n.css("margin-left",parseInt(m[4].value)+"px");n.css("margin-right",parseInt(m[4].value)+"px")}}}else{n.css("margin-left","0px");n.css("margin-right","0px")}if(m[5].value){if(m[5].value.toString()=="auto"){n.css("margin-top","auto");n.css("margin-bottom","auto")}else{if(m[5].value.toString().indexOf("%")!=-1){n.css("margin-top",parseInt(m[5].value)+"%");n.css("margin-bottom",parseInt(m[5].value)+"%")}else{n.css("margin-top",parseInt(m[5].value)+"px");n.css("margin-bottom",parseInt(m[5].value)+"px")}}}else{n.css("margin-top","0px");n.css("margin-bottom","0px")}var q=h.find(".jqx-editor-align").jqxDropDownList("selectedIndex");if(q==1){n.css("float","left")}else{if(q==2){n.css("float","right")}else{if(q==0){n.css("float","none")}}}n.css("resize",false);n[0].oncontrolselect=function(){return false};n[0].selectstart=function(){return false};if(!i.editImage){if(!i.focused){i.editor.focus()}if(i.range){i.selectRange(i.range)}i.execute("insertHTML",n[0].outerHTML+"<span id='INSERTION_MARKER'> </span>",g);i.editor.focus();var l=b(i.editorDocument).find("#INSERTION_MARKER");i.selection.selectNode(l[0],true);if(i.getRange().setStartAfter){i.getRange().setStartAfter(l[0])}l.remove();i.selection.collapse(false);i._refreshTools();i._preventDefault(o)}i.editImage=null;i._preventDefault(o)});h.appendTo(document.body);i.updating=true;i.addHandler(h,"open",function(){i.updating=true;setTimeout(function(){i.range=i.getRange();b(e[0]).focus()},25)});h.jqxWindow({resizable:false,width:280,okButton:f,cancelButton:k,theme:i.theme,isModal:true,position:{center:i.widget}});i.addHandler(h,"close",function(){i.updating=false});if(!i.focused){i.editor.focus();i.selectRange(i.range)}i._preventDefault(j);return false},editmode:function(f){var e=this;if(!f&&!e.readOnly){e._removeHandlers();e.editor.attr("contentEditable",false);var d=document.createTextNode(e.editor.html());var g=b("<pre>");g.html(d).attr({id:"sourceText",contentEditable:true}).css("height","100%");e.editor.html(g);if(e.buttons.hasOwnProperty("html")){e.buttons.html.addClass("active")}g.focus()}else{if(f&&e.readOnly){var d=e.editor.find("#sourceText").text();e.editor.html(d);if(e.buttons.hasOwnProperty("html")){e.buttons.html.removeClass("active")}e.editor.attr("contentEditable",true);e._addHandlers()}}e.readOnly=!f},setMode:function(f){var i=this;if(!i.range){i.editor.focus();i.range=i.getRange()}var h;var e=i.editor[0];if(f){i._documentMode="source";var k=new c();var j=k.HTMLtoXML(e.innerHTML);j=k.FormatHTML(j);h=document.createTextNode(j);e.innerHTML="";var d=document.createElement("pre");e.contentEditable=false;d.style.height="100%";d.style.margin="0px";d.style.outline="none";d.style.display="block";d.id="sourceText";d.contentEditable=true;d.appendChild(h);e.appendChild(d);this.readOnly=true}else{this._documentMode="html";if(document.all){e.innerHTML=e.innerText}else{if(e.textContent){e.innerHTML=e.textContent}else{h=document.createRange();h.selectNodeContents(e.firstChild);e.innerHTML=h.toString()}}e.contentEditable=true;i.readOnly=false;i._refreshTools();i.editor.focus();i.selection.selectNode(i.editor[0]);i.editor.scrollTop(0);i.selection.collapse(true)}b.each(this.commands,function(){if(this.widget){if(this.command!="viewsource"){switch(this.type){case"list":this.widget.jqxDropDownList({disabled:f});break;case"colorPicker":this.widget.jqxDropDownButton({disabled:f});break;case"button":this.widget.jqxButton({disabled:f});break;case"toggleButton":this.widget.jqxToggleButton({toggled:false,disabled:f});break}}}});i.editor.focus();if(b.jqx.browser.mozilla){var g=b("<a href='#'>anchor</a>");i.editor.prepend(g);g.focus();g.remove();i.selection.collapse(true)}if(i.commands.html.widget){i.commands.html.widget.jqxToggleButton({toggled:f=="source"||f==true});i.commands.html.toggled=f=="source"||f==true}},execute:function(i,f,e){var g=this;if(!g.readOnly){var j=g.editorDocument;if(g._documentMode=="source"){return}g.changeType="mouse";if(g.linkPopup){g.linkPopup.remove()}g.editor.focus();if(b.jqx.browser.mozilla){}if(b.jqx.mobile.isTouchDevice()){setTimeout(function(){},25)}var d=function(m){try{if(m.command&&m.command.toLowerCase()=="inserthtml"){var l=g.getRange();var n=m.value;if(n.toString().indexOf("<")==-1){n="<span>"+m.value+"</span>"}g.selection.insertContent(""+n+"<span id='INSERTION_MARKER'> </span>");g.selectRange(l);setTimeout(function(){var p=b(g.editorDocument).find("#INSERTION_MARKER");g.selection.selectNode(b(p).prev()[0],true);p.remove();g.selection.collapse(false)},10)}else{if(m.command){if(j.queryCommandEnabled(m.command)){j.execCommand(m.command,false,m.value)}else{return false}}else{if(j.queryCommandEnabled(m)){j.execCommand(m,false,m)}else{return false}}}}catch(o){}};if(i=="custom"){var h=f.action(f.widget,g.editor);if(h){d(h)}}else{try{if(e&&e.action){var h=e.action(e.widget,g.editor);d(h)}else{if(j.queryCommandEnabled(i)){j.execCommand(i,false,f)}else{if(i=="insertHTML"){g.selection.insertContent(f)}else{return false}}}}catch(k){if(i=="insertHTML"){g.selection.insertContent(f)}else{return false}}}if(b.jqx.mobile.isTouchDevice()){setTimeout(function(){if(g.iframe){g.iframe[0].contentWindow.focus()}},500)}g._raiseEvent("change",{command:i,args:f});g.changed=true;g.range=g.getRange()}},destroy:function(){var h=this;h._removeHandlers();var l=h.tools.split(" ");var g=h.tools.split(" | ");b.jqx.utilities.resize(this.host,null,true);var f=function(i){b.each(i,function(n,o){var m=h.commands[this];if(!m){return true}switch(m.type){case"list":m.widget.jqxDropDownList("destroy");break;case"colorPicker":m.colorPicker.remove();m.widget.jqxDropDownButton("destroy");break;case"toggleButton":m.widget.jqxToggleButton("destroy");break;case"custom":if(h.destroyTool){h.destroyTool(this)}break;case"button":default:m.widget.jqxToggleButton("destroy");if(m.command==="insertimage"){if(b("#imageWindow"+h.element.id).length>0){b("#imageWindow"+h.element.id).find(".jqx-editor-align").jqxDropDownList("destroy");b("#imageWindow"+h.element.id).find("button").jqxButton("destroy")}}else{if(m.command==="createlink"){if(b("#linkWindow"+h.element.id).length>0){b("#linkWindow"+h.element.id).find(".jqx-editor-align").jqxDropDownList("destroy");b("#linkWindow"+h.element.id).find("button").jqxButton("destroy");b("#linkWindow"+h.element.id).find(".jqx-editor-link-checkbox").jqxCheckBox("destroy")}}}break}})};if(g.length==0){f(l)}else{for(var e=0;e<g.length;e++){var d=g[e];var l=d.split(" ");f(l)}}var j=b("#linkWindow"+this.element.id);var k=b("#imageWindow"+this.element.id);if(j&&j.length>0){j.jqxWindow("destroy")}if(k&&k.length>0){k.jqxWindow("destroy")}if(h.inline){h.toolbar.remove()}else{h.widget.remove();h.host.remove()}h.iframe.remove();h.iframe=null;h.selection=null;h.editorDocument=null;h.contentEditableElement=null},val:function(e){if(e!==undefined&&e==="source"){var d=this.editor[0];if(this._documentMode==="source"){d=this.editor.find("pre:first")[0]}var g=new c();var f=g.HTMLtoXML(d.innerHTML);f=g.FormatHTML(f);return f}if(e!=undefined&&typeof e!="object"){this.editor.html(e)}if(this._documentMode==="source"){return this.editor.find("pre:first").html()}return this.editor.html()},_raiseEvent:function(i,e){if(e==undefined){e={owner:null}}if(this._documentMode=="source"){return true}var f=i;e.type=this.changeType;this.changeType=null;var g=e;g.owner=this;var h=new b.Event(f);h.owner=this;h.args=g;if(this._textArea){var d=b(this._textArea).trigger(h)}else{var d=this.host.trigger(h)}e=h.args;return d}});var a=function(d){var e={initialize:function(f){this.document=f},getSelection:function(){return(this.document.getSelection)?this.document.getSelection():this.document.selection},getRange:function(){var f=this.getSelection();if(!f){return null}try{return f.rangeCount>0?f.getRangeAt(0):(this.document.createRange?this.document.createRange():this.document.selection.createRange())}catch(g){return this.document.body.createTextRange()}},selectRange:function(f){if(f.select){f.select()}else{var g=this.getSelection();if(g.addRange){g.removeAllRanges();g.addRange(f)}}},selectNode:function(i,j){var h=this.getRange();var g=this.getSelection();if(h.moveToElementText){h.moveToElementText(i);h.select()}else{if(g.addRange){try{j?h.selectNodeContents(i):h.selectNode(i);g.removeAllRanges();g.addRange(h)}catch(f){var k=f}}else{g.setBaseAndExtent(i,0,i,1)}}return i},isCollapsed:function(){var f=this.getRange();if(f.item){return false}return f.boundingWidth==0||this.getSelection().isCollapsed},collapse:function(f){var h=this.getRange();var g=this.getSelection();if(h.select){h.collapse(f);h.select()}else{f?g.collapseToStart():g.collapseToEnd()}},getContent:function(){var h=this.getRange();var f=b("<div>")[0];if(this.isCollapsed()){return""}if(h.cloneContents){f.appendChild(h.cloneContents())}else{if(h.item!=undefined||h.htmlText!=undefined){b(f).html(h.item?h.item(0).outerHTML:h.htmlText)}else{b(f).html(h.toString())}}var g=b(f).html();return g},getText:function(){var g=this.getRange();var f=this.getSelection();return this.isCollapsed()?"":g.text||(f.toString?f.toString():"")},getNode:function(){var g=this.getRange();if(!b.jqx.browser.msie||b.jqx.browser.version>=9){var f=null;if(g){f=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.startOffset-g.endOffset<2){if(g.startContainer.hasChildNodes()){f=g.startContainer.childNodes[g.startOffset]}}}}while(typeof(f)!="element"){f=f.parentNode}}return d.id(f)}return d.id(g.item?g.item(0):g.parentElement())},insertContent:function(i){var h=this.getRange();if(h.pasteHTML){h.pasteHTML(i);h.collapse(false);h.select()}else{if(h.insertNode){h.deleteContents();if(h.createContextualFragment){h.insertNode(h.createContextualFragment(i))}else{var j=this.document;var g=j.createDocumentFragment();var f=j.createElement("div");g.appendChild(f);f.outerHTML=i;h.insertNode(g)}}}}};e.initialize(d);return e};var c=function(){var n=/^<([-A-Za-z0-9_]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,f=/^<\/([-A-Za-z0-9_]+)[^>]*>/,j=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;var i=e("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");var d=e("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var l=e("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");var g=e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");var m=e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");var k=e("script,style");var h=this.HTMLParser=function(p,x){var s,t,q,u=[],v=p;u.last=function(){return this[this.length-1]};while(p){t=true;if(!u.last()||!k[u.last()]){if(p.indexOf("<!--")==0){s=p.indexOf("-->");if(s>=0){if(x.comment){x.comment(p.substring(4,s))}p=p.substring(s+3);t=false}}else{if(p.indexOf("</")==0){q=p.match(f);if(q){p=p.substring(q[0].length);q[0].replace(f,r);t=false}}else{if(p.indexOf("<")==0){q=p.match(n);if(q){p=p.substring(q[0].length);q[0].replace(n,o);t=false}}}}if(t){s=p.indexOf("<");var w=s<0?p:p.substring(0,s);p=s<0?"":p.substring(s);if(x.chars){x.chars(w)}}}else{p=p.replace(new RegExp("(.*)</"+u.last()+"[^>]*>"),function(y,z){z=z.replace(/<!--(.*?)-->/g,"$1").replace(/<!\[CDATA\[(.*?)]]>/g,"$1");if(x.chars){x.chars(z)}return""});r("",u.last())}v=p}r();function o(y,B,C,z){B=B.toLowerCase();if(d[B]){while(u.last()&&l[u.last()]){r("",u.last())}}if(g[B]&&u.last()==B){r("",B)}z=i[B]||!!z;if(!z){u.push(B)}if(x.start){var A=[];C.replace(j,function(E,D){var F=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:m[D]?D:"";A.push({name:D,value:F,escaped:F.replace(/(^|[^\\])"/g,'$1\\"')})});if(x.start){x.start(B,A,z)}}}function r(y,A){if(!A){var B=0}else{for(var B=u.length-1;B>=0;B--){if(u[B].toLowerCase()==A.toLowerCase()){break}}}if(B>=0){for(var z=u.length-1;z>=B;z--){if(x.end){x.end(u[z])}}u.length=B}}};this.HTMLtoXML=function(p){var o="";p=p.replace(/\r/ig,"");p=p.replace(/\n/ig,"");h(p,{start:function(q,s,r){o+="<"+q;for(var t=0;t<s.length;t++){o+=" "+s[t].name+'="'+s[t].escaped+'"'}o+=(r?"/":"")+">"},end:function(q){o+="</"+q+">\r\n"},chars:function(q){o+=q},comment:function(q){o+="<!--"+q+"-->"}});return o};this.FormatHTML=function(D,r){var H,C,A,u,v,G;r=r||{};C=r.indent_size||4;A=r.indent_char||" ";v=r.brace_style||"collapse";u=Infinity;G=r.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];function q(){this.pos=0;this.token="";this.current_mode="CONTENT";this.tags={parent:"parent1",parentcount:1,parent1:""};this.tag_type="";this.token_text=this.last_token=this.last_text=this.token_type="";this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(J,t){for(var I=0;I<t.length;I++){if(J===t[I]){return true}}return false}};this.get_content=function(){var t="",J=[],K=false;while(this.input.charAt(this.pos)!=="<"){if(this.pos>=this.input.length){return J.length?J.join(""):["","TK_EOF"]}t=this.input.charAt(this.pos);this.pos++;this.line_char_count++;if(this.Utils.in_array(t,this.Utils.whitespace)){if(J.length){K=true}this.line_char_count--;continue}else{if(K){if(this.line_char_count>=this.max_char){J.push("\n");for(var I=0;I<this.indent_level;I++){J.push(this.indent_string)}this.line_char_count=0}else{J.push(" ");this.line_char_count++}K=false}}J.push(t)}return J.length?J.join(""):""};this.get_contents_to=function(J){if(this.pos==this.input.length){return["","TK_EOF"]}var t="";var K="";var L=new RegExp("</"+J+"\\s*>","igm");L.lastIndex=this.pos;var I=L.exec(this.input);var M=I?I.index:this.input.length;if(this.pos<M){K=this.input.substring(this.pos,M);this.pos=M}return K};this.record_tag=function(t){if(this.tags[t+"count"]){this.tags[t+"count"]++;this.tags[t+this.tags[t+"count"]]=this.indent_level}else{this.tags[t+"count"]=1;this.tags[t+this.tags[t+"count"]]=this.indent_level}this.tags[t+this.tags[t+"count"]+"parent"]=this.tags.parent;this.tags.parent=t+this.tags[t+"count"]};this.retrieve_tag=function(t){if(this.tags[t+"count"]){var I=this.tags.parent;while(I){if(t+this.tags[t+"count"]===I){break}I=this.tags[I+"parent"]}if(I){this.indent_level=this.tags[t+this.tags[t+"count"]];this.tags.parent=this.tags[I+"parent"]}delete this.tags[t+this.tags[t+"count"]+"parent"];delete this.tags[t+this.tags[t+"count"]];if(this.tags[t+"count"]==1){delete this.tags[t+"count"]}else{this.tags[t+"count"]--}}};this.get_tag=function(){var K="",M=[],t=false,O,J;do{if(this.pos>=this.input.length){return M.length?M.join(""):["","TK_EOF"]}K=this.input.charAt(this.pos);this.pos++;this.line_char_count++;if(this.Utils.in_array(K,this.Utils.whitespace)){t=true;this.line_char_count--;continue}if(K==="'"||K==='"'){if(!M[1]||M[1]!=="!"){K+=this.get_unformatted(K);t=true}}if(K==="="){t=false}if(M.length&&M[M.length-1]!=="="&&K!==">"&&t){if(this.line_char_count>=this.max_char){this.print_newline(false,M);this.line_char_count=0}else{M.push(" ");this.line_char_count++}t=false}if(K==="<"){O=this.pos-1}M.push(K)}while(K!==">");var P=M.join("");var I;if(P.indexOf(" ")!=-1){I=P.indexOf(" ")}else{I=P.indexOf(">")}var N=P.substring(1,I).toLowerCase();if(P.charAt(P.length-2)==="/"||this.Utils.in_array(N,this.Utils.single_token)){this.tag_type="SINGLE"}else{if(N==="script"){this.record_tag(N);this.tag_type="SCRIPT"}else{if(N==="style"){this.record_tag(N);this.tag_type="STYLE"}else{if(this.Utils.in_array(N,G)){var L=this.get_unformatted("</"+N+">",P);M.push(L);if(O>0&&this.Utils.in_array(this.input.charAt(O-1),this.Utils.whitespace)){M.splice(0,0,this.input.charAt(O-1))}J=this.pos-1;if(this.Utils.in_array(this.input.charAt(J+1),this.Utils.whitespace)){M.push(this.input.charAt(J+1))}this.tag_type="SINGLE"}else{if(N.charAt(0)==="!"){if(N.indexOf("[if")!=-1){if(P.indexOf("!IE")!=-1){var L=this.get_unformatted("-->",P);M.push(L)}this.tag_type="START"}else{if(N.indexOf("[endif")!=-1){this.tag_type="END";this.unindent()}else{if(N.indexOf("[cdata[")!=-1){var L=this.get_unformatted("]]>",P);M.push(L);this.tag_type="SINGLE"}else{var L=this.get_unformatted("-->",P);M.push(L);this.tag_type="SINGLE"}}}}else{if(N.charAt(0)==="/"){this.retrieve_tag(N.substring(1));this.tag_type="END"}else{this.record_tag(N);this.tag_type="START"}if(this.Utils.in_array(N,this.Utils.extra_liners)){this.print_newline(true,this.output)}}}}}}return M.join("")};this.get_unformatted=function(I,J){if(J&&J.indexOf(I)!=-1){return""}var t="";var K="";var L=true;do{if(this.pos>=this.input.length){return K}t=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(t,this.Utils.whitespace)){if(!L){this.line_char_count--;continue}if(t==="\n"||t==="\r"){K+="\n";this.line_char_count=0;continue}}K+=t;this.line_char_count++;L=true}while(K.indexOf(I)==-1);return K};this.get_token=function(){var t;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var I=this.last_token.substr(7);t=this.get_contents_to(I);if(typeof t!=="string"){return t}return[t,"TK_"+I]}if(this.current_mode==="CONTENT"){t=this.get_content();if(typeof t!=="string"){return t}else{return[t,"TK_CONTENT"]}}if(this.current_mode==="TAG"){t=this.get_tag();if(typeof t!=="string"){return t}else{var J="TK_TAG_"+this.tag_type;return[t,J]}}};this.get_full_indent=function(t){t=this.indent_level+t||0;if(t<1){return""}return Array(t+1).join(this.indent_string)};this.printer=function(K,J,t,M,L){this.input=K||"";this.output=[];this.indent_character=J;this.indent_string="";this.indent_size=t;this.brace_style=L;this.indent_level=0;this.max_char=M;this.line_char_count=0;for(var I=0;I<this.indent_size;I++){this.indent_string+=this.indent_character}this.print_newline=function(P,N){this.line_char_count=0;if(!N||!N.length){return}if(!P){while(this.Utils.in_array(N[N.length-1],this.Utils.whitespace)){N.pop()}}N.push("\n");for(var O=0;O<this.indent_level;O++){N.push(this.indent_string)}};this.print_token=function(N){this.output.push(N)};this.indent=function(){this.indent_level++};this.unindent=function(){if(this.indent_level>0){this.indent_level--}}};return this}H=new q();H.printer(D,A,C,u,v);while(true){var w=H.get_token();H.token_text=w[0];H.token_type=w[1];if(H.token_type==="TK_EOF"){break}switch(H.token_type){case"TK_TAG_START":H.print_newline(false,H.output);H.print_token(H.token_text);H.indent();H.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":H.print_newline(false,H.output);H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_TAG_END":if(H.last_token==="TK_CONTENT"&&H.last_text===""){var F=H.token_text.match(/\w+/)[0];var y=H.output[H.output.length-1].match(/<\s*(\w+)/);if(y===null||y[1]!==F){H.print_newline(true,H.output)}}H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var o=H.token_text.match(/^\s*<([a-z]+)/i);if(!o||!H.Utils.in_array(o[1],G)){H.print_newline(false,H.output)}H.print_token(H.token_text);H.current_mode="CONTENT";break;case"TK_CONTENT":if(H.token_text!==""){H.print_token(H.token_text)}H.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(H.token_text!==""){H.output.push("\n");var x=H.token_text;if(r.indent_scripts=="keep"){var z=0}else{if(r.indent_scripts=="separate"){var z=-H.indent_level}else{var z=1}}var p=H.get_full_indent(z);var s=x.match(/^\s*/)[0];var B=s.match(/[^\n\r]*$/)[0].split(H.indent_string).length-1;var E=H.get_full_indent(z-B);x=x.replace(/^\s*/,p).replace(/\r\n|\r|\n/g,"\n"+E).replace(/\s*$/,"");if(x){H.print_token(x);H.print_newline(true,H.output)}}H.current_mode="TAG";break}H.last_token=H.token_type;H.last_text=H.token_text}return H.output.join("")};function e(r){var q={},o=r.split(",");for(var p=0;p<o.length;p++){q[o[p]]=true}return q}}})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
package/jqwidgets/jqxexpander.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("jqxExpander","",{});a.extend(a.jqx._jqxExpander.prototype,{defineInstance:function(){var b={width:"auto",height:"auto",expanded:true,expandAnimationDuration:259,collapseAnimationDuration:250,animationType:"slide",toggleMode:"click",showArrow:true,arrowPosition:"right",headerPosition:"top",disabled:false,initContent:null,rtl:false,easing:"easeInOutSine",aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["expanding","expanded","collapsing","collapsed","resize"]};if(this===a.jqx._jqxExpander.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);this._cachedHTMLStructure=this.host.html();this._rendered=false;this.render();this._rendered=true},expand:function(){if(this.disabled===false&&this.expanded===false&&this._expandChecker==1){var b=this;this._expandChecker=0;this._raiseEvent("0");this._header.removeClass(this.toThemeProperty("jqx-fill-state-normal"));this._header.addClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));if(this.headerPosition=="top"){this._arrow.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"));this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"))}else{if(this.headerPosition=="bottom"){this._arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-icon-arrow-down-hover jqx-icon-arrow-up-hover jqx-expander-arrow-bottom"));this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top jqx-expander-arrow-expanded-top"))}}switch(this.animationType){case"slide":if(this.headerPosition=="top"){this._content.slideDown({duration:this.expandAnimationDuration,easing:this.easing,complete:function(){b.expanded=true;a.jqx.aria(b._header,"aria-expanded",true);a.jqx.aria(b._content,"aria-hidden",false);b._raiseEvent("1");if(b.initContent&&b._initialized===false){b.initContent();b._initialized=true}}})}else{if(this.headerPosition=="bottom"){this._contentElement.style.display="";this._contentElement.style.height="0px";if(a.jqx.browser.msie&&a.jqx.browser.version<8){this._contentElement.style.display="block"}if(this._cntntEmpty===true){this._content.animate({height:0},{duration:this.expandAnimationDuration,easing:this.easing,complete:function(){b.expanded=true;a.jqx.aria(b._header,"aria-expanded",true);a.jqx.aria(b._content,"aria-hidden",false);b._raiseEvent("1");if(b.initContent&&b._initialized===false){b.initContent();b._initialized=true}}})}else{this._content.animate({height:this._contentHeight},{duration:this.expandAnimationDuration,easing:this.easing,complete:function(){b.expanded=true;a.jqx.aria(b._header,"aria-expanded",true);a.jqx.aria(b._content,"aria-hidden",false);b._raiseEvent("1");if(b.initContent&&b._initialized===false){b.initContent();b._initialized=true}}})}}}break;case"fade":this._content.fadeIn({duration:this.expandAnimationDuration,easing:this.easing,complete:function(){b.expanded=true;a.jqx.aria(b._header,"aria-expanded",true);a.jqx.aria(b._content,"aria-hidden",false);b._raiseEvent("1");if(b.initContent&&b._initialized===false){b.initContent();b._initialized=true}}});break;case"none":this._contentElement.style.display="";this.expanded=true;a.jqx.aria(b._header,"aria-expanded",true);a.jqx.aria(b._content,"aria-hidden",false);this._raiseEvent("1");if(this.initContent&&this._initialized===false){this.initContent();this._initialized=true}break}}},collapse:function(){if(this.disabled===false&&this.expanded===true&&this._expandChecker===0){var b=this;this._expandChecker=1;this._raiseEvent("2");this._header.removeClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));this._header.addClass(this.toThemeProperty("jqx-fill-state-normal"));if(this.headerPosition=="top"){this._arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));if(b._hovered){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down-hover"))}}else{if(this.headerPosition=="bottom"){this._arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down jqx-icon-arrow-down-selected jqx-expander-arrow-top jqx-expander-arrow-expanded-top"));this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-expander-arrow-bottom"));if(b._hovered){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-up-hover"))}}}switch(this.animationType){case"slide":if(this.headerPosition=="top"){this._content.slideUp({duration:this.collapseAnimationDuration,easing:this.easing,complete:function(){b.expanded=false;a.jqx.aria(b._header,"aria-expanded",false);a.jqx.aria(b._content,"aria-hidden",true);b._raiseEvent("3")}})}else{if(this.headerPosition=="bottom"){this._content.animate({height:0},{duration:this.expandAnimationDuration,easing:this.easing,complete:function(){b._contentElement.style.display="none";b.expanded=false;a.jqx.aria(b._header,"aria-expanded",false);a.jqx.aria(b._content,"aria-hidden",true);b._raiseEvent("3")}})}}break;case"fade":this._content.fadeOut({duration:this.collapseAnimationDuration,easing:this.easing,complete:function(){b.expanded=false;a.jqx.aria(b._header,"aria-expanded",false);a.jqx.aria(b._content,"aria-hidden",true);b._raiseEvent("3")}});break;case"none":b._contentElement.style.display="none";this.expanded=false;a.jqx.aria(b._header,"aria-expanded",false);a.jqx.aria(b._content,"aria-hidden",true);this._raiseEvent("3");break}}},setHeaderContent:function(b){this._headerText.innerHTML=b;this.invalidate()},getHeaderContent:function(){return this._headerText.innerHTML},setContent:function(b){this._content.html(b);this._checkContent();this.invalidate()},getContent:function(){return this._content.html()},enable:function(){this.disabled=false;this.refresh();a.jqx.aria(this,"aria-disabled",false)},disable:function(){this.disabled=true;this.refresh();a.jqx.aria(this,"aria-disabled",true)},invalidate:function(){if(a.jqx.isHidden(this.host)){return}this._setSize()},refresh:function(b){if(b===true){return}this._removeHandlers();if(this.showArrow===true){this._arrowElement.style.display=""}else{this._arrowElement.style.display="none"}this._setTheme();this._setSize();if(this.disabled===false){this._toggle()}this._keyBoard()},render:function(){var f=this;if(f._rendered){f.refresh();return}this.widgetID=this.element.id;var e=this.host.children();this._headerText=e[0];this._headerElement=document.createElement("div");this._header=a(this._headerElement);this._contentElement=e[1];this._content=a(this._contentElement);if(this._content.initAnimate){this._content.initAnimate()}if(this.headerPosition==="top"){f.element.insertBefore(f._headerElement,f._headerText)}else{f.element.appendChild(f._headerElement)}f._headerElement.appendChild(f._headerText);var d=this._headerText.className;this._headerElement.className=d;this._headerText.className="";if(!this.rtl){this._headerText.className+=" "+f.toThemeProperty("jqx-expander-header-content")}else{this._headerText.className+=" "+f.toThemeProperty("jqx-expander-header-content-rtl")}f._arrowElement=document.createElement("div");f._headerElement.appendChild(f._arrowElement);this._arrow=a(f._arrowElement);if(this.showArrow===true){f._arrowElement.style.display=""}else{f._arrowElement.style.display="none"}if(this._headerElement.getAttribute("tabindex")===null&&this._contentElement.getAttribute("tabindex")===null){if(f.headerPosition==="top"){this._headerElement.setAttribute("tabindex",1);this._contentElement.setAttribute("tabindex",2)}else{this._headerElement.setAttribute("tabindex",2);this._contentElement.setAttribute("tabindex",1)}}this._setTheme();var b="Invalid jqxExpander structure. Please add only two child div elements to your jqxExpander div that will represent the expander's header and content.";try{if(this._header.length===0||this._content.length===0||e.length<2||e.length>2){throw b}}catch(c){throw new Error(c)}this._setSize();if(this.expanded===true){if(this.headerPosition=="top"){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"))}else{if(this.headerPosition=="bottom"){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-icon-arrow-down-selected jqx-expander-arrow-top jqx-expander-arrow-expanded-top"))}}if(this.initContent){this.initContent()}this._initialized=true;this._expandChecker=0}else{if(this.expanded===false){this._arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down-selected jqx-icon-arrow-up-selected"));if(this.headerPosition=="top"){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"))}else{if(this.headerPosition=="bottom"){this._arrow.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-expander-arrow-bottom"))}}this._initialized=false;this._expandChecker=1;this._contentElement.style.display="none"}}this._checkContent();if(this.disabled===false){this._toggle()}this._keyBoard();a.jqx.utilities.resize(this.host,function(){f.invalidate()})},destroy:function(){this.removeHandler(a(window),"resize.expander"+this.widgetID);this.host.remove();a(this.element).removeData("jqxExpander")},focus:function(){try{if(this.disabled===false){this._headerElement.focus()}}catch(b){}},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=="expanded"){if(d===true&&e===false){this.expanded=false;this.expand()}else{if(d===false&&e===true){this.expanded=true;this.collapse()}}}else{this.refresh()}},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;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(){this.element.style.width=this._toPx(this.width);this.element.style.height=this._toPx(this.height);this._headerElement.style.height="auto";this._headerElement.style.minHeight=this._arrowElement.offsetHeight;var d=this.arrowPosition;if(this.rtl){switch(d){case"left":d="right";break;case"right":d="left";break}}if(d=="right"){this._headerText.style["float"]="left";this._headerText.style.marginLeft="0px";this._arrowElement.style["float"]="right";this._arrowElement.style.position="relative"}else{if(d=="left"){if(this.width=="auto"){this._headerText.style["float"]="left";this._headerText.style.marginLeft="17px";this._arrowElement.style["float"]="left";this._arrowElement.style.position="absolute"}else{this._headerText.style["float"]="right";this._headerText.style.marginLeft="0px";this._arrowElement.style["float"]="left";this._arrowElement.style.position="relative"}}}this._arrowElement.style.marginTop=(this._headerText.offsetHeight/2-this._arrowElement.offsetHeight/2)+"px";this._contentElement.style.height="auto";var c=Math.max(0,this._content.height());if(this.height=="auto"){this._contentHeight=c}else{var b=Math.round(this.element.offsetHeight)-Math.round(this._header.outerHeight())-1;if(b<0){b=0}if(!this._contentHeight){this._contentHeight=c}if(b!=this._contentHeight){this._contentElement.style.height=this._toPx(b);this._contentHeight=Math.round(this._content.outerHeight())}else{this._contentElement.style.height=this._toPx(this._contentHeight)}}},_toggle:function(){var b=this;if(this._isTouchDevice===false){this._header.removeClass(this.toThemeProperty("jqx-expander-header-disabled"));switch(this.toggleMode){case"click":this.addHandler(this._header,"click.expander"+this.widgetID,function(){b._animate()});break;case"dblclick":this.addHandler(this._header,"dblclick.expander"+this.widgetID,function(){b._animate()});break;case"none":this._header.addClass(this.toThemeProperty("jqx-expander-header-disabled"));break}}else{if(this.toggleMode!="none"){this.addHandler(this._header,a.jqx.mobile.getTouchEventName("touchstart")+"."+this.widgetID,function(){b._animate()})}else{return}}},_animate:function(){if(this.expanded===true){this.collapse();this._header.addClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));if(this.headerPosition=="top"){this._arrow.addClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{if(this.headerPosition=="bottom"){this._arrow.addClass(this.toThemeProperty("jqx-expander-arrow-bottom-hover jqx-expander-arrow-up-hover"))}}}else{this.expand();this._header.removeClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));if(this.headerPosition=="top"){this._arrow.removeClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{if(this.headerPosition=="bottom"){this._arrow.removeClass(this.toThemeProperty("jqx-expander-arrow-bottom-hover jqx-expander-arrow-up-hover"))}}}},_removeHandlers:function(){this.removeHandler(this._header,"click.expander"+this.widgetID);this.removeHandler(this._header,"dblclick.expander"+this.widgetID);this.removeHandler(this._header,"mouseenter.expander"+this.widgetID);this.removeHandler(this._header,"mouseleave.expander"+this.widgetID)},_setTheme:function(){var e=this,b="jqx-widget jqx-expander",d="jqx-widget-header jqx-expander-header",c="jqx-widget-content jqx-expander-content";if(this.rtl===true){b+=" jqx-rtl"}if(this.disabled===false){this._header.removeClass(this.toThemeProperty("jqx-expander-header-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));if(this.expanded===true){d+=" jqx-fill-state-pressed jqx-expander-header-expanded"}else{d+=" jqx-fill-state-normal";this._header.removeClass(this.toThemeProperty("jqx-expander-header-expanded"))}this._hovered=false;if(!e._isTouchDevice){this.addHandler(this._header,"mouseenter.expander"+this.widgetID,function(){e._hovered=true;if(e._expandChecker==1){e._header.removeClass(e.toThemeProperty("jqx-fill-state-normal jqx-fill-state-pressed"));e._header.addClass(e.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));if(e.headerPosition=="top"){if(e.expanded){e._arrow.addClass(e.toThemeProperty("jqx-icon-arrow-up-hover"))}else{e._arrow.addClass(e.toThemeProperty("jqx-icon-arrow-down-hover"))}e._arrow.addClass(e.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{if(e.headerPosition=="bottom"){if(e.expanded){e._arrow.addClass(e.toThemeProperty("jqx-icon-arrow-down-hover"))}e._arrow.addClass(e.toThemeProperty("jqx-expander-arrow-bottom-hover jqx-expander-arrow-up-hover"))}}}});this.addHandler(this._header,"mouseleave.expander"+this.widgetID,function(){e._hovered=false;e._header.removeClass(e.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrow.removeClass(e.toThemeProperty("jqx-icon-arrow-up-hover jqx-icon-arrow-down-hover"));if(e.headerPosition=="top"){e._arrow.removeClass(e.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{if(e.headerPosition=="bottom"){e._arrow.removeClass(e.toThemeProperty("jqx-expander-arrow-bottom-hover jqx-expander-arrow-up-hover"))}}if(e._expandChecker==1){e._header.addClass(e.toThemeProperty("jqx-fill-state-normal"))}else{e._header.addClass(e.toThemeProperty("jqx-fill-state-pressed"))}})}}else{b+=" jqx-fill-state-disabled";d+=" jqx-expander-header-disabled"}if(this.headerPosition=="top"){c+=" jqx-expander-content-bottom"}else{if(this.headerPosition=="bottom"){c+=" jqx-expander-content-top"}}this.host.addClass(this.toThemeProperty(b));this._header.addClass(this.toThemeProperty(d));this._content.addClass(this.toThemeProperty(c));this._arrow.addClass(this.toThemeProperty("jqx-expander-arrow"))},_checkContent:function(){this._cntntEmpty=/^\s*$/.test(this._contentElement.innerHTML);if(this._cntntEmpty===true){this._contentElement.style.height="0px";this._content.addClass(this.toThemeProperty("jqx-expander-content-empty"))}else{if(this.height==="auto"){this._contentElement.style.height="auto"}else{this._contentElement.style.height=this._contentHeight+"px"}this._content.removeClass(this.toThemeProperty("jqx-expander-content-empty"))}},_keyBoard:function(){var b=this;this._focus();this.addHandler(this.host,"keydown.expander"+this.widgetID,function(c){var d=false;if((b.focusedH===true||b.focusedC===true)&&b.disabled===false){switch(c.keyCode){case 13:case 32:if(b.toggleMode!="none"){if(b.focusedH===true){b._animate()}d=true}break;case 38:if(c.ctrlKey===true&&b.focusedC===true){b._headerElement.focus()}d=true;break;case 40:if(c.ctrlKey===true&&b.focusedH===true){b._contentElement.focus()}d=true;break}return true}if(d&&c.preventDefault){c.preventDefault()}return !d})},_focus:function(){var b=this;this.addHandler(this._header,"focus.expander"+this.widgetID,function(){b.focusedH=true;a.jqx.aria(b._header,"aria-selected",true);b._header.addClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this._header,"blur.expander"+this.widgetID,function(){b.focusedH=false;a.jqx.aria(b._header,"aria-selected",false);b._header.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this._headerText,"focus.expander"+this.widgetID,function(){b._headerElement.focus()});this.addHandler(this._arrow,"focus.expander"+this.widgetID,function(){b._headerElement.focus()});this.addHandler(this._content,"focus.expander"+this.widgetID,function(){b.focusedC=true;b._content.addClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this._content,"blur.expander"+this.widgetID,function(){b.focusedC=false;b._content.removeClass(b.toThemeProperty("jqx-fill-state-focus"))})},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}}})})(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("jqxFileUpload","",{});a.extend(a.jqx._jqxFileUpload.prototype,{defineInstance:function(){var b={width:null,height:"auto",uploadUrl:"",fileInputName:"",autoUpload:false,multipleFilesUpload:true,accept:null,browseTemplate:"",uploadTemplate:"",cancelTemplate:"",localization:null,renderFiles:null,disabled:false,rtl:false,events:["select","remove","uploadStart","uploadEnd"]};if(this===a.jqx._jqxFileUpload.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;if(b.host.jqxButton===undefined){throw new Error("jqxFileUpload: Missing reference to jqxbuttons.js")}b._createFromInput("jqxFileUpload");if(a.jqx.browser.msie){if(a.jqx.browser.version<11){b._ieOldWebkit=true;if(a.jqx.browser.version<8){b._ie7=true}}}else{if(a.jqx.browser.webkit){b._ieOldWebkit=true}}b._fluidWidth=typeof b.width==="string"&&b.width.charAt(b.width.length-1)==="%";b._fluidHeight=typeof b.height==="string"&&b.height.charAt(b.height.length-1)==="%";b._render(true)},_createFromInput:function(c){var e=this;if(e.element.nodeName.toLowerCase()=="input"){e.field=e.element;if(e.field.className){e._className=e.field.className}var d={title:e.field.title};if(e.field.id.length){d.id=e.field.id.replace(/[^\w]/g,"_")+"_"+c}else{d.id=a.jqx.utilities.createId()+"_"+c}var g=a("<div></div>",d);g[0].style.cssText=e.field.style.cssText;if(!e.width){e.width=a(e.field).width()}if(!e.height){e.height=a(e.field).outerHeight()}a(e.field).hide().after(g);var f=e.host.data();e.host=g;e.host.data(f);e.element=g[0];e.element.id=e.field.id;e.field.id=d.id;if(e._className){e.host.addClass(e._className);a(e.field).removeClass(e._className)}if(e.field.tabIndex){var b=e.field.tabIndex;e.field.tabIndex=-1;e.element.tabIndex=b}}},_render:function(b){var c=this;c._setSize();c._addClasses();if(b===true){c._appendElements()}else{c._removeHandlers()}c._addHandlers();if(c._ie7){c._borderAndPadding("width",c.host);if(c.height!=="auto"){c._borderAndPadding("height",c.host)}}a.jqx.utilities.resize(c.host,null,true);a.jqx.utilities.resize(c.host,function(){if(c._fluidWidth){if(c._ie7){c.host.css("width",c.width);c._borderAndPadding("width",c.host)}for(var f=0;f<c._fileRows.length;f++){var d=c._fileRows[f];var h=d.fileRow;if(c._ie7){h.css("width","100%");c._borderAndPadding("width",h)}if(!c.renderFiles){c._setMaxWidth(d)}}if(c.rtl&&c._ieOldWebkit){for(var e=0;e<c._forms.length;e++){var g=c._browseButton.position();c._forms[e].form.css({left:g.left,top:g.top})}}}if(c._ie7&&c._fluidHeight){c.host.css("height",c.height);c._borderAndPadding("height",c.host)}})},render:function(){this._render(false)},refresh:function(b){if(b!==true){this._render(false)}},destroy:function(){var b=this;b.cancelAll();b._removeHandlers(true);b.host.remove()},browse:function(){if(a.jqx.browser.msie&&a.jqx.browser.version<10){return}var b=this;if(b.multipleFilesUpload===true||(b.multipleFilesUpload===false&&b._fileRows.length===0)){b._forms[b._forms.length-1].fileInput.click()}},_uploadFile:function(b){var c=this;if(c._uploadQueue.length===0){c._uploadQueue.push(b)}if(!c.renderFiles){b.uploadFile.add(b.cancelFile).hide();b.loadingElement.show()}b.fileInput.attr("name",c.fileInputName);c._raiseEvent("2",{file:b.fileName});b.form[0].submit();c._fileObjectToRemove=b},uploadFile:function(b){var c=this,d=c._fileRows[b];if(d!==undefined){c._uploadFile(d)}},uploadAll:function(){var c=this;if(c._fileRows.length>0){for(var b=c._fileRows.length-1;b>=0;b--){c._uploadQueue.push(c._fileRows[b])}c._uploadFile(c._fileRows[0])}},cancelFile:function(b){var c=this;c._removeSingleFileRow(c._fileRows[b])},cancelAll:function(){var c=this;if(c._fileRows.length>0){for(var b=0;b<c._fileRows.length;b++){c._removeFileRow(c._fileRows[b])}setTimeout(function(){c._browseButton.css("margin-bottom",0)},400);c._fileRows.length=0;c._hideButtons(true)}},propertyChangedHandler:function(e,m,c,k){var b=e.element.id;if(m==="localization"){if(k.browseButton&&(!c||k.browseButton!==c.browseButton)){e._browseButton.text(k.browseButton);e._browseButton.jqxButton({width:"auto"})}if(k.uploadButton&&(!c||k.uploadButton!==c.uploadButton)){e._uploadButton.text(k.uploadButton);e._uploadButton.jqxButton({width:"auto"})}if(k.cancelButton&&(!c||k.cancelButton!==c.cancelButton)){e._cancelButton.text(k.cancelButton);e._cancelButton.jqxButton({width:"auto"})}if(!e.renderFiles){if(k.uploadFileTooltip&&(!c||k.uploadFileTooltip!==c.uploadFileTooltip)){a("#"+b+" .jqx-file-upload-file-upload").attr("title",k.uploadFileTooltip)}if(k.uploadFileTooltip&&(!c||k.cancelFileTooltip!==c.cancelFileTooltip)){a("#"+b+" .jqx-file-upload-file-cancel").attr("title",k.cancelFileTooltip)}}return}if(k!==c){switch(m){case"width":e.host.css("width",k);if(e._ie7){e._borderAndPadding("width",e.host);for(var d=0;d<e._fileRows.length;d++){var n=e._fileRows[d].fileRow;n.css("width","100%");e._borderAndPadding("width",n)}}e._fluidWidth=typeof k==="string"&&k.charAt(k.length-1)==="%";return;case"height":e.host.css("height",k);if(e._ie7){e._borderAndPadding("height",e.host)}e._fluidHeight=typeof k==="string"&&k.charAt(k-1)==="%";return;case"uploadUrl":for(var g=0;g<e._forms.length;g++){e._forms[g].form.attr("action",k)}return;case"accept":for(var f=0;f<e._forms.length;f++){e._forms[f].fileInput.attr("accept",k)}return;case"theme":a.jqx.utilities.setTheme(c,k,e.host);e._browseButton.jqxButton({theme:k});e._uploadButton.jqxButton({theme:k});e._cancelButton.jqxButton({theme:k});return;case"browseTemplate":e._browseButton.jqxButton({template:k});return;case"uploadTemplate":e._uploadButton.jqxButton({template:k});return;case"cancelTemplate":e._cancelButton.jqxButton({template:k});return;case"disabled":e._browseButton.jqxButton({disabled:k});e._uploadButton.jqxButton({disabled:k});e._cancelButton.jqxButton({disabled:k});if(k===true){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}return;case"rtl":var h=function(l){var o=l?"addClass":"removeClass";e._browseButton[o](e.toThemeProperty("jqx-file-upload-button-browse-rtl"));e._cancelButton[o](e.toThemeProperty("jqx-file-upload-button-cancel-rtl"));e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}for(var i=0;i<e._fileRows.length;i++){var j=e._fileRows[i];j.fileNameContainer[o](e.toThemeProperty("jqx-file-upload-file-name-rtl"));j.cancelFile[o](e.toThemeProperty("jqx-file-upload-file-cancel-rtl"));j.uploadFile[o](e.toThemeProperty("jqx-file-upload-file-upload-rtl"));j.loadingElement[o](e.toThemeProperty("jqx-file-upload-loading-element-rtl"))}};h(k);return}}},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b=this.host.trigger(e);return b},_setSize:function(){var b=this;b.host.css("width",b.width);b.host.css("height",b.height)},_borderAndPadding:function(d,c){var b;if(d==="width"){b=parseInt(c.css("border-left-width"),10)+parseInt(c.css("border-right-width"),10)+parseInt(c.css("padding-left"),10)+parseInt(c.css("padding-right"),10)}else{b=parseInt(c.css("border-top-width"),10)+parseInt(c.css("border-bottom-width"),10)+parseInt(c.css("padding-top"),10)+parseInt(c.css("padding-bottom"),10)}c.css(d,c[d]()-b)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-widget jqx-widget-content jqx-rc-all jqx-file-upload"));if(b.disabled===true){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}},_appendElements:function(){var g=this,c="Browse",b=90,h="Upload All",e=90,d="Cancel All",f=90;var i=g.element.id;if(g.localization){if(g.localization.browseButton){c=g.localization.browseButton;b="auto"}if(g.localization.uploadButton){h=g.localization.uploadButton;e="auto"}if(g.localization.cancelButton){d=g.localization.cancelButton;f="auto"}}g._browseButton=a('<button id="'+i+'BrowseButton" class="'+g.toThemeProperty("jqx-file-upload-button-browse")+'">'+c+"</button>");g.host.append(g._browseButton);g._browseButton.jqxButton({theme:g.theme,width:b,template:g.browseTemplate,disabled:g.disabled});g._browseButton.after('<div style="clear: both;"></div>');g._bottomButtonsContainer=a('<div class="'+g.toThemeProperty("jqx-file-upload-buttons-container")+'"></div>');g.host.append(g._bottomButtonsContainer);g._uploadButton=a('<button id="'+i+'UploadButton" class="'+g.toThemeProperty("jqx-file-upload-button-upload")+'">'+h+"</button>");g._bottomButtonsContainer.append(g._uploadButton);g._uploadButton.jqxButton({theme:g.theme,width:e,template:g.uploadTemplate,disabled:g.disabled});g._cancelButton=a('<button id="'+i+'CancelButton" class="'+g.toThemeProperty("jqx-file-upload-button-cancel")+'">'+d+"</button>");g._bottomButtonsContainer.append(g._cancelButton);g._cancelButton.jqxButton({theme:g.theme,width:f,template:g.cancelTemplate,disabled:g.disabled});g._bottomButtonsContainer.after('<div style="clear: both;"></div>');if(g.rtl){g._browseButton.addClass(g.toThemeProperty("jqx-file-upload-button-browse-rtl"));g._cancelButton.addClass(g.toThemeProperty("jqx-file-upload-button-cancel-rtl"));g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}}g._uploadIframe=a('<iframe name="'+i+'Iframe" class="'+g.toThemeProperty("jqx-file-upload-iframe")+'" src=""></iframe>');g.host.append(g._uploadIframe);g._iframeInitialized=false;g._uploadQueue=[];g._forms=[];g._addFormAndFileInput();g._fileRows=[]},_addFormAndFileInput:function(){var f=this;var i=f.element.id;var e=a('<form class="'+f.toThemeProperty("jqx-file-upload-form")+'" action="'+f.uploadUrl+'" target="'+i+'Iframe" method="post" enctype="multipart/form-data"></form>');f.host.append(e);var d=a('<input type="file" class="'+f.toThemeProperty("jqx-file-upload-file-input")+'" />');if(f.accept){d.attr("accept",f.accept)}e.append(d);if(f._ieOldWebkit){var c=f._browseButton.position();var g=f._browseButton.outerWidth();var h=f._browseButton.outerHeight();var b=f.rtl&&f._ie7?12:0;e.css({left:c.left-b,top:c.top,width:g,height:h});e.addClass(f.toThemeProperty("jqx-file-upload-form-ie9"));d.addClass(f.toThemeProperty("jqx-file-upload-file-input-ie9"));f.addHandler(e,"mouseenter.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mouseleave.jqxFileUpload"+i,function(){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mousedown.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-pressed"))});f.addHandler(a(document),"mouseup.jqxFileUpload"+i,function(){if(f._browseButton.hasClass("jqx-fill-state-pressed")){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-pressed"))}})}f.addHandler(d,"change.jqxFileUpload"+i,function(){var l=this.value,j;if(l.indexOf("fakepath")!==-1){l=l.slice(12)}else{l=l.slice(l.lastIndexOf("\\")+1)}if(a.jqx.browser.msie&&a.jqx.browser.version<10){j="IE9 and earlier do not support getting the file size."}else{j=this.files[0].size}var k=f._addFileRow(l,e,d,j);if(f._fileRows.length===1){f._browseButton.css("margin-bottom","10px");f._hideButtons(false)}if(f._ieOldWebkit){f.removeHandler(e,"mouseenter.jqxFileUpload"+i);f.removeHandler(e,"mouseleave.jqxFileUpload"+i);f.removeHandler(e,"mousedown.jqxFileUpload"+i)}f._addFormAndFileInput();f.removeHandler(d,"change.jqxFileUpload"+i);if(f.autoUpload===true){f._uploadFile(k)}});if(f._ieOldWebkit===true){f.addHandler(d,"click.jqxFileUpload"+i,function(j){if(f.multipleFilesUpload===false&&f._fileRows.length>0){j.preventDefault()}})}f._forms.push({form:e,fileInput:d})},_addFileRow:function(f,b,e,d){var h=this,l,g,m,j,n,i="Cancel",k="Upload File";l=a('<div class="'+h.toThemeProperty("jqx-widget-content jqx-rc-all jqx-file-upload-file-row")+'"></div>');if(h._fileRows.length===0){h._browseButton.after(l)}else{h._fileRows[h._fileRows.length-1].fileRow.after(l)}if(!h.renderFiles){g=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-name")+'">'+f+"</div>");l.append(g);if(h.localization){if(h.localization.cancelFileTooltip){i=h.localization.cancelFileTooltip}if(h.localization.uploadFileTooltip){k=h.localization.uploadFileTooltip}}j=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-cancel")+'" title="'+i+'"><div class="'+h.toThemeProperty("jqx-icon-close jqx-file-upload-icon")+'"></div></div>');l.append(j);n=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-upload")+'" title="'+k+'"><div class="'+h.toThemeProperty("jqx-icon-arrow-up jqx-file-upload-icon jqx-file-upload-icon-upload")+'"></div></div>');l.append(n);m=a('<div class="'+h.toThemeProperty("jqx-file-upload-loading-element")+'"></div>');l.append(m);if(h.rtl){g.addClass(h.toThemeProperty("jqx-file-upload-file-name-rtl"));j.addClass(h.toThemeProperty("jqx-file-upload-file-cancel-rtl"));n.addClass(h.toThemeProperty("jqx-file-upload-file-upload-rtl"));m.addClass(h.toThemeProperty("jqx-file-upload-loading-element-rtl"))}h._setMaxWidth({fileNameContainer:g,uploadFile:n,cancelFile:j})}else{l.html(h.renderFiles(f))}if(h._ie7){h._borderAndPadding("width",l);h._borderAndPadding("height",l);if(!h.renderFiles){h._borderAndPadding("height",g);h._borderAndPadding("height",n);h._borderAndPadding("height",j)}}var c={fileRow:l,fileNameContainer:g,fileName:f,uploadFile:n,cancelFile:j,loadingElement:m,form:b,fileInput:e,index:h._fileRows.length};h._addFileHandlers(c);h._fileRows.push(c);h._raiseEvent("0",{file:f,size:d});return c},_setMaxWidth:function(c){var e=this;var f=c.cancelFile.outerWidth(true)+c.uploadFile.outerWidth(true);var b=e._ie7?6:0;var d=e.host.width()-parseInt(e.host.css("padding-left"),10)-parseInt(e.host.css("padding-right"),10)-f-b-7;c.fileNameContainer.css("max-width",d)},_addFileHandlers:function(b){var c=this;if(!c.renderFiles){var d=c.element.id;c.addHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._uploadFile(b)}});c.addHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._removeSingleFileRow(b)}})}},_removeSingleFileRow:function(c){var d=this;d._removeFileRow(c);d._fileRows.splice(c.index,1);if(d._fileRows.length===0){setTimeout(function(){d._browseButton.css("margin-bottom",0)},400);d._hideButtons(true)}else{for(var b=0;b<d._fileRows.length;b++){d._fileRows[b].index=b}}},_removeFileRow:function(b){var c=this;var d=c.element.id;if(!c.renderFiles){c.removeHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"click.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"click.jqxFileUpload"+d)}b.fileRow.fadeOut(function(){b.fileRow.remove();b.form.remove()});c._raiseEvent("1",{file:b.fileName})},_hideButtons:function(b){var c=this;if(b===true){c._bottomButtonsContainer.fadeOut()}else{c._bottomButtonsContainer.fadeIn()}},_addHandlers:function(){var b=this;var c=b.element.id;if(!b._ieOldWebkit){b.addHandler(b._browseButton,"click.jqxFileUpload"+c,function(){b.browse()})}b.addHandler(b._uploadButton,"click.jqxFileUpload"+c,function(){b.uploadAll()});b.addHandler(b._cancelButton,"click.jqxFileUpload"+c,function(){b.cancelAll()});b.addHandler(b._uploadIframe,"load.jqxFileUpload"+c,function(){if(a.jqx.browser.chrome||a.jqx.browser.webkit){b._iframeInitialized=true}if(b._iframeInitialized===false){b._iframeInitialized=true}else{var d=b._uploadIframe.contents().find("body").html();if(b._uploadQueue.length>0){b._raiseEvent("3",{file:b._uploadQueue[b._uploadQueue.length-1].fileName,response:d})}if(b._fileObjectToRemove){b._removeSingleFileRow(b._fileObjectToRemove);b._fileObjectToRemove=null}b._uploadQueue.pop();if(b._uploadQueue.length>0){b._uploadFile(b._uploadQueue[b._uploadQueue.length-1])}}})},_removeHandlers:function(b){var d=this;var e=d.element.id;d.removeHandler(d._browseButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadButton,"click.jqxFileUpload"+e);d.removeHandler(d._cancelButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadIframe,"load.jqxFileUpload"+e);if(b===true){var c=d._forms[d._forms.length-1];d.removeHandler(c.fileInput,"change.jqxFileUpload"+e);if(d._ieOldWebkit){d.removeHandler(c.form,"mouseenter.jqxFileUpload"+e);d.removeHandler(c.form,"mouseleave.jqxFileUpload"+e);d.removeHandler(c.form,"mousedown.jqxFileUpload"+e);d.removeHandler(a("body"),"mouseup.jqxFileUpload"+e)}}}})})(jqxBaseFramework)})();
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
package/jqwidgets/jqxform.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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
|
*/
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
8
|
-
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxForm","",{});a.extend(a.jqx._jqxForm.prototype,{defineInstance:function(){var b={padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#F5F5F5",borderColor:"#E5E5E5",value:{},template:[{type:"text",label:"TextBox 1"},{type:"text",label:"TextBox 2"},]};a.extend(true,this,b)},createInstance:function(c){var b=this;b._isInitialized=false;var d=b.host;d.addClass(b.toThemeProperty("jqx-widget"));d.addClass(b.toThemeProperty("jqx-form"));b._renderAndInit();this._setValue(this.value);this._prevValue=this._getValue();b._isInitialized=true},destroy:function(){this._destroyElements();this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_destroyElements:function(){for(var c=0;c<this.template.length;c++){if(a.isArray(this.template[c].columns)){for(var b=0;b<this.template[c].columns.length;b++){var d=c+"_"+b;this._getComponentById(d).off();this.host.find("#rowWrap_el_"+d).remove()}}this._getComponentById(c).off();this._getComponentLabelById(c).off();this._getComponentLabelById(c).removeData();this.host.find("#rowWrap_el_"+c).remove()}this.host.find("#formWrap").remove()},val:function(b){if(undefined==b){return this._getValue()}else{this._setValue(b)}},_onChangeHandler:function(f){if(!this.isInitialized||this._suppressEvents){return}var c=this._getValue();if(this._prevValue&&JSON.stringify(c)==JSON.stringify(this._prevValue)){return}var d=new a.Event("formDataChange");d.args={value:c,previousValue:this._prevValue};d.owner=this;var b=this.host.trigger(d);if(d.cancel){this._setValue(this._prevValue)}else{this._prevValue=c}return b},_onButtonClick:function(c,d){if(!this.isInitialized){return}var e=new a.Event("buttonClick");e.args={name:d.name,text:c.val()};e.owner=this;var b=this.host.trigger(e);return b},submit:function(f,k,b){var l=this;var d=l._getValue(true);var h="<form id='jqx_fromToSubmit'";if(f){h+=' action="'+f+'"'}if(k){h+=' target="'+k+'"'}if(b&&b.toString().toLowerCase()==="get"){h+=' method="GET"'}else{h+=' method="POST"'}h+=">";for(var g=0;g<d.length;g++){var e=d[g].value;var j=d[g].tool;var c=j.name;if(c==undefined){c=j.id}if(c==undefined){c=j.bind}if(j.type=="button"||j.type=="label"){if(!j.submit||j.submit==false){continue}}if(j.submit==false){continue}if(c!==undefined){h+='<input type="hidden" ';h+=' name="'+c+'"';h+=' value="'+e+'"';h+=">"}}h+="</form>";l.host.find("#formSubmit").html(h);l.host.find("#jqx_fromToSubmit").submit()},_getValue:function(c){var e={};var d=[];for(var h=0;h<this.template.length;h++){var k=this.template[h];var l="el_"+this.element.id+h;if(a.isArray(k.columns)){for(var g=0;g<k.columns.length;g++){var f=k.columns[g];var p=l+"."+g;if(f.type=="option"&&f.component!="jqxDropDownList"){var o=this._radioGroupGetValue(f,p);if(f.bind==undefined){}else{this._setObjectProperty(e,f.bind,o)}if(c){d.push({tool:f,value:o})}continue}var b=this._getComponentById(h+"_"+g);var n=b.val();if(n===undefined){n=null}if(f.bind==undefined){}else{this._setObjectProperty(e,f.bind,n)}if(c){d.push({tool:f,value:n})}}continue}if(k.type=="option"&&k.component!="jqxDropDownList"){var o=this._radioGroupGetValue(k,l);if(k.bind==undefined){}else{this._setObjectProperty(e,k.bind,o)}if(c){d.push({tool:k,value:o})}continue}var m=this._getComponentById(h);var n=m.val();if(n===undefined){n=null}if(k.bind==undefined){}else{this._setObjectProperty(e,k.bind,n)}if(c){d.push({tool:k,value:n})}}if(c){return d}return a.extend({},this._prevValue,e)},_getObjectProperty:function(f,d){if(typeof(f)!=="object"||f===undefined||d===undefined||d==""){return f}var e=d.split(".");var g=f;for(var c=0;c<e.length;c++){g=g[e[c]]}return g},_setObjectProperty:function(g,d,e){if(undefined===g){return}if(undefined==d||d==""){g=e;return}var f=d.split(".");var c=0;while(c<f.length-1){if(undefined==g[f[c]]){g[f[c]]={}}c++}g[f[c]]=e},_setValue:function(c){this._suppressEvents=true;for(var g=0;g<this.template.length;g++){var h=this.template[g];var k="el_"+this.element.id+g;var d=undefined;if(a.isArray(h.columns)){for(var f=0;f<h.columns.length;f++){var e=h.columns[f];var m=k+"."+f;if(!e.bind){continue}d=this._getObjectProperty(c,e.bind);if(e.type=="option"&&e.component!="jqxDropDownList"){this._radioGroupSetValue(e,m,d);continue}var b=this._getComponentById(g+"_"+f);if(c!==undefined){b.val(d)}}continue}if(!h.bind){continue}d=this._getObjectProperty(c,h.bind);if(h.type=="option"&&h.component!="jqxDropDownList"){this._radioGroupSetValue(h,k,d);continue}var l=this._getComponentById(g);if(h.type=="label"){l.html(d);continue}if(c!==undefined){l.val(d)}}this._prevValue=c;this._suppressEvents=false},_radioGroupGetValue:function(b,f){for(var c=0;c<b.options.length;c++){var e=f+"_option_"+c;var d=this.host.find("#"+e);if(d.length>0){var g=d.jqxRadioButton("val");if(g==true){if(b.options[c].value!==undefined){return b.options[c].value}return b.options[c].label}}}return undefined},_radioGroupSetValue:function(b,f,g){for(var c=0;c<b.options.length;c++){if(b.options[c].value!==undefined){if(g!==b.options[c].value){continue}}else{if(g!==b.options[c].label){continue}}var e=f+"_option_"+c;var d=this.host.find("#"+e);if(d.length>0){d.jqxRadioButton("val",true)}}},_getToolStyle:function(b){var c="display: block;";var d=["left","right","top","bottom"];if(b.height){c+="height: "+b.height+";"}if(b.valign!==undefined){c+="vertical-align: "+b.valign+";"}else{c+="vertical-align: middle;"}return c},_getAlignMargin:function(b,f){if(!b||!b[f]){return""}var g=["left","right","top","bottom"];var e={};var d="";if(b[f]){e={};if(b[f]=="left"){e.left="0px";e.right="auto"}else{if(b[f]=="right"){e.left="auto";e.right="0px"}else{e.left="auto";e.right="auto"}}}if(e){for(var c in g){if(e[g[c]]){d+="margin-"+g[c]+": "+e[g[c]]+";"}}}return d},_getPaddingAndMarginStyle:function(f,g){var b="";var h=["left","right","top","bottom"];var k=g?"labelpadding":"padding";var e=g?"labelmargin":"margin";var j=a.extend({left:5,top:5,right:5,bottom:5},f[k]);for(var d in j){j[d]=!isNaN(j[d])?j[d]:parseFloat(j[d].toString())}var c=f[e];if(j){for(var d in h){if(j[h[d]]){b+="padding-"+h[d]+": "+j[h[d]]+"px;"}}}if(c){for(var d in h){if(c[h[d]]){b+="margin-"+h[d]+": "+c[h[d]]+";"}}}return b},_getToolLabelStyle:function(b){var c="display:block;";var d=["left","right","top","bottom"];if(b.labelheight!==undefined){c+="height: "+b.labelheight+";"}else{c+="height: 100%;"}if(b.labelvalign!==undefined){c+="vertical-align: "+b.labelvalign+";"}else{if(b.valign!==undefined){c+="vertical-align: "+b.valign+";"}else{c+="vertical-align: middle;"}}return c},_renderAndInit:function(){var b=this._createTemplateHtml();this.host.append(b);this._initTools()},refresh:function(c){var b=this;if(!b._isInitialized||c===true){return}var d=b.val();b._destroyElements();b._renderAndInit();b._prevValue=d;b.val(d)},_createTemplateHtml:function(){var c=this.groups;var b="padding-left: "+parseFloat(this.padding.left)+"px;padding-right: "+parseFloat(this.padding.right)+"px;padding-top: "+parseFloat(this.padding.top)+"px;padding-bottom: "+parseFloat(this.padding.bottom)+"px;";var f="<table id='formWrap' style='background-color: "+this.backgroundColor+"; width: 100%; white-space: nowrap; border: 1px solid "+this.borderColor+";"+b+"' cellpadding='0' cellspacing='0'><div id='formSubmit' style='display:hidden;'><div>";var j=this.template;for(var e=0;e<j.length;e++){var h="el_"+this.element.id+e;var d=this.template[e];var g=this._getToolTemplate(d,h);f+=g}f+="</table>";return f},_beginRow:function(e,b,c){if(undefined===b){b="auto"}if(c){c="valign='"+c+"'"}else{c=""}var d="<tr style='width: 100%; height: "+b+";' id='rowWrap_"+e+"' "+c+">";d+="<td style='width: 100%;'><table style='width: 100%; white-space: nowrap; border: 0px;' cellspacing='0' cellpadding='0'><tr style='width: 100%'>";return d},_endRow:function(){return"<td style='width: auto; background: transparent;'> </tr></table></td></tr>"},_beginColumn:function(d,c){if(!c){c=""}if(undefined===d){d="auto"}var b="<td style='width:"+d+"; background: transparent;'>";b+="<div style='display:block; overflow: visible; width: 100%; background: transparent;'>";return b},_endColumn:function(){return"</div></td>"},_splitLabelToolWidth:function(e,c){var h=c?"auto":e.columnwidth;var b=e.labelwidth;var d=a.extend({left:5,top:5,right:5,bottom:5},e.padding);var g=a.extend({left:5,top:5,right:5,bottom:5},e.labelpadding);for(var f in d){d[f]=!isNaN(d[f])?d[f]:parseFloat(d[f].toString())}for(var f in g){g[f]=!isNaN(g[f])?g[f]:parseFloat(g[f].toString())}if(e.label==""||e.label==undefined){b=0;g={left:0,right:0,top:0,bottom:0}}if(e.labelposition=="top"||e.labelposition=="bottom"){if(undefined===b){b=h}if(undefined===h){h=b}if(h&&h.toString().indexOf("%")!=-1&&b&&b.toString().indexOf("%")!=-1){h=b=Math.max(parseFloat(h),parseFloat(b))+"%"}if(h&&h.toString().indexOf("%")==-1&&b&&b.toString().indexOf("%")==-1){h=b=Math.max(parseFloat(h),parseFloat(b))+"px"}return[b,h]}if(b===undefined){if(h!==undefined&&h!=="auto"){return["auto",h]}else{if(e.labelposition=="right"){if(e.align=="right"||e.align=="center"||e.align=="middle"){return["auto","100%"]}return["100%","auto"]}return["auto","100%"]}}else{if(b.toString().indexOf("%")!==-1){b=parseFloat(b);if(h!==undefined){if(h.toString().indexOf("%")!==-1){h=parseFloat(h);return[Math.min(100,b)+"%",Math.min(h,100-b)+"%"]}else{h=parseFloat(h);return[Math.min(100,b)+"%",h]}}return[Math.min(100,b)+"%",Math.max(0,100-b)+"%"]}else{b=parseFloat(b)+g.left+g.right;if(h==undefined){return[b+"px","calc(100% - "+b+"px)"]}return[b+"px",h]}}},_getToolTemplate:function(h,t,j,q){var g={};for(var s in h){g[s.toLowerCase()]=h[s]}if(a.isArray(g.columns)&&isNaN(j)){var w=this._beginRow(t,g.rowheight||"auto");for(var B=0;B<g.columns.length;B++){var z=this._getToolTemplate(g.columns[B],(t+"_"+B),undefined,true);var u="auto";if(g.columns[B].columnWidth!==undefined){u=g.columns[B].columnWidth}else{if(g.columns[B].width!==undefined){u=g.columns[B].width}}w+=this._beginColumn(u);w+="<table cellspacing='0' cellpadding='0' style='width: 100%; white-space: nowrap; border: 0px;'>"+z+"</table>";w+=this._endColumn()}w+=this._endRow();return w}if(g.type=="option"&&g.component!="jqxDropDownList"){if(isNaN(j)){var C=this._beginRow(t,g.rowheight||"auto",g.valign);for(var B=0;B<g.options.length;B++){var z=this._getToolTemplate(g,(t+"_option_"+B),B,true);if(g.optionslayout=="horizontal"){var u=100/Math.max(1,g.options.length)+"%";if(g.columnwidth){u=g.columnwidth}C+=this._beginColumn(u);C+="<table cellspacing='0' cellpadding='0' style='width: 100%; white-space: nowrap; border: 0px;'>"+z+"</table>";C+=this._endColumn()}else{C+=z}}C+=this._endRow();return C}}var d=g.labelposition;var m=g.label;var k="";if(g.type=="option"&&g.component!="jqxDropDownList"&&!isNaN(j)){var k=g.options[j].label;m=k}if(m===undefined){m=""}var C="";var b=this._getToolLabelStyle(g)+this._getPaddingAndMarginStyle(g,true);var r=this._getToolStyle(g)+this._getPaddingAndMarginStyle(g,false);var e="";var y=this._getAlignMargin(g,"align");var D="text-align: left;";if(g.labelalign=="center"||g.labelalign=="middle"){D="text-align: center"}else{if(g.labelalign=="right"){D="text-align: right"}}var E="text-align: left;";if(g.align=="center"||g.align=="middle"){E="text-align: center"}else{if(g.align=="right"){E="text-align: right"}}var o=this._splitLabelToolWidth(g,q);var f=m;if(g.required){var n="<span class='"+e+"' style='color:red;'>*</span>";if(g.requiredposition){if(g.requiredposition.toLowerCase()=="left"){f=n+" "+m}else{f=m+" "+n}}else{f=m+" "+n}}var x="";if(g.type=="boolean"||(g.type=="option"&&!isNaN(j))){x+="; cursor: pointer;"}var l="<div class='"+e+"' style='"+b+"'><div style='"+D+x+";' id='label_"+t+"'>"+f+"</div></div>";var A=(g.info!==undefined&&g.infoposition!="left")?"margin-left: -3px;":"margin-right: -3px;";var c="<div style='"+A+"' class='"+this.toThemeProperty("jqx-info-icon")+"' title='"+g.info+"'></div>";var v="<div style='background: transparent;"+r+"'><div style='width: auto; height: auto; "+y+"' id='"+t+"'></div></div>";if(g.type=="text"||g.type=="button"){v="<div style='background: transparent;"+r+E+"'><input style='width: auto; height: auto; "+y+"' id='"+t+"' type='"+g.type+"'/></div>"}else{if(g.type=="password"){v="<div style='background: transparent;"+r+E+"'><input type='password' style='width: auto; height: auto; "+y+"' id='"+t+"'/></div>"}}if(g.type=="option"&&g.component!="jqxDropDownList"&&!isNaN(j)){var u=g.width;if(u===undefined){u="15px"}o=[g.labelwidth||"auto",u];if(g.labelposition&&(g.labelposition=="top"||g.labelposition=="bottom")){o=["100%","100%"]}v="<div style='background: transparent;"+r+y+E+"'><div style='width: "+u+"; height: 100%; "+y+E+";' id='"+t+"'></div></div>"}if(g.info!==undefined&&g.info!==""){if(g.infoposition=="left"){v="<table cellspacing='0' cellpadding='0' style='border: 0px; white-space: nowrap;"+y+"'><tr><td>"+c+"</td><td>"+v+"</td></tr></table>"}else{v="<table cellspacing='0' cellpadding='0' style='border: 0px; white-space: nowrap;"+y+"'><tr><td>"+v+"</td><td>"+c+"</td></tr></table>"}}if(d=="right"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(o[1]);C+=v;if(m!=""){C+=this._endColumn();C+=this._beginColumn(o[0]);C+=l}C+=this._endColumn();C+=this._endRow()}else{if(d=="top"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(g.columnwidth);if(m!=""){C+=l}C+=v;C+=this._endColumn();C+=this._endRow()}else{if(d=="bottom"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(g.columnwidth);C+=v;if(m!=""){C+=l}C+=this._endColumn();C+=this._endRow()}else{C+=this._beginRow(t,g.rowheight||"auto",g.valign);if(m!=""){C+=this._beginColumn(o[0]);C+=l;C+=this._endColumn()}C+=this._beginColumn(o[1]);C+=v;C+=this._endColumn();C+=this._endRow()}}}return C},_initTools:function(f,e){var d=f||this.template;if(undefined==e){e=""}for(var c=0;c<d.length;c++){var b=d[c];if(a.isArray(b.columns)){this._initTools(b.columns,c+"_");continue}var g=e+c;switch(b.type){case"color":this._initColorTool(g);break;case"option":if(b.component=="jqxDropDownList"){this._initOptionToolDropDownList(g)}else{this._initOptionTool(g)}break;case"dropdownlist":this._initOptionToolDropDownList(g);break;case"number":this._initNumberTool(g);break;case"boolean":case"checkbox":this._initBooleanTool(g);break;case"text":this._initTextTool(g);break;case"password":this._initPasswordTool(g);break;case"label":this._initLabelTool(g);break;case"date":case"time":case"datetime":this._initDateTimeTool(g);break;case"button":this._initButtonTool(g);break;case"custom":this._initCustomTool(g);break}if(b.visible===false){this._showhideComponent(undefined,g,false)}if(b.theme){this._setToolTheme(b,g)}}},_setToolTheme:function(c,e){var b=this._getComponentById(e);var d=c.theme||this.theme;switch(c.type){case"option":if(c.component=="jqxDropDownList"){b.jqxDropDownList("theme",d)}break;case"number":b.jqxNumberInput("theme",d);break;case"text":b.jqxInput("theme",d);break;case"password":b.jqxPasswordInput("theme",d);break}},_initOptionTool:function(h){var b=this;var j="el_"+this.element.id+h;var c=b._getTool(h);for(var d=0;d<c.options.length;d++){var g=j+"_option_"+d;var e=b.host.find("#"+g);if(e.length>0){e.jqxRadioButton({width:25,theme:b.theme,groupName:"group_"+h}).on("change",function(i){b._onChangeHandler(i)})}var f=b.host.find("#label_"+g);f.data("el",e);f.on("mousedown",function(k){var i=a(this).data("el");i.jqxRadioButton("toggle")})}},_initOptionToolDropDownList:function(j){var l=this;var d="el_"+this.element.id+j;var f=l._getTool(j);var g=this.host.find("#"+d);var h='<div style="height: 20px;"></div>';var b=[];if(f.source){b=f.source}else{if(f.options&&a.isArray(f.options)){for(var e=0;e<f.options.length;e++){b.push(f.options[e])}}}if(f.init){f.init(g)}else{var c=isNaN(parseFloat(f.width))?"auto":f.width;if(f.width&&f.width.toString().indexOf("%")!=-1&&f.columnwidth===undefined){c="100%"}var k=isNaN(parseFloat(f.height))?"30px":f.height;g.jqxDropDownList({theme:l.theme,width:c||"auto",autoDropDownHeight:true,height:k,enableBrowserBoundsDetection:true,source:b,selectedIndex:0})}g.on("change",function(i){l._onChangeHandler(i)})},_initNumberTool:function(g){var c=this;var h="el_"+this.element.id+g;var d=c._getTool(g);var e=this.host.find("#"+h);if(d.init){d.init(e)}else{var f=isNaN(parseFloat(d.width))?"auto":d.width;var b=isNaN(parseFloat(d.height))?"30px":d.height;e.jqxNumberInput({theme:c.theme,width:f,height:b,inputMode:"simple"})}e.on("change",function(i){c._onChangeHandler(i)})},_initBooleanTool:function(f){var j=this;var b="el_"+this.element.id+f;var e=j._getTool(f);var g=this.host.find("#"+b);if(e.init){e.init(g)}else{var c=isNaN(parseFloat(e.width))?"auto":e.width;var i=isNaN(parseFloat(e.height))?"30px":e.height;var d=e.isThreeState==true;if(e.component===undefined||e.component=="jqxCheckBox"){g.jqxCheckBox({theme:j.theme,width:c,height:i,hasThreeStates:d})}else{return}}g.on("change",function(k){j._onChangeHandler(k)});var h=j.host.find("#label_"+b);h.on("mousedown",function(k){var l=j.host.find("#"+b).val();j.host.find("#"+b).val(!l)})},_initTextTool:function(g){var d=this;var h="el_"+this.element.id+g;var e=d._getTool(g);var c=this.host.find("#"+h);if(e.init){e.init(c)}else{var f=isNaN(parseFloat(e.width))?"auto":e.width;var b=isNaN(parseFloat(e.height))?"30px":e.height;c.jqxInput({theme:d.theme,width:f,height:b})}c.on("change",function(i){d._onChangeHandler(i)})},_initLabelTool:function(f){var b=this;var g="el_"+this.element.id+f;var c=b._getTool(f);var e=this.host.find("#"+g);if(c.render&&a.isFunction(c.render)){var d=c.render();e.html(d||"")}},_getTool:function(e){var b=this;var d=e.split("_");var c=b.template[d[0]];if(d[1]){if(a.isArray(c.columns)&&c.columns.length>d[1]){return c.columns[d[1]]}return undefined}return c},_initCustomTool:function(d){var b=this;var f="el_"+this.element.id+d;var c=b._getTool(d);var e=this.host.find("#"+f);if(c.init){c.init(e)}},_initButtonTool:function(g){var c=this;var h="el_"+this.element.id+g;var d=c._getTool(g);var e=this.host.find("#"+h);if(d.init){d.init(e)}else{var f=isNaN(parseFloat(d.width))?"auto":d.width;var b=isNaN(parseFloat(d.height))?"30px":d.height;e.jqxButton({theme:c.theme,width:f,height:b});e.val(d.text===undefined?"Button":d.text)}this.host.find("#"+h).on("click",function(i){c._onButtonClick(e,d)})},_initPasswordTool:function(g){var d=this;var h="el_"+this.element.id+g;var e=d._getTool(g);var c=this.host.find("#"+h);if(e.init){e.init(c)}else{var f=isNaN(parseFloat(e.width))?"auto":e.width;var b=isNaN(parseFloat(e.height))?"25px":e.height;c.jqxPasswordInput({theme:d.theme,width:f,height:b})}c.on("change",function(i){d._onChangeHandler(i)})},_initDateTimeTool:function(h){var e=this;var i="el_"+this.element.id+h;var f=e._getTool(h);var d=this.host.find("#"+i);if(f.init){f.init(d)}else{var g=isNaN(parseFloat(f.width))?"auto":f.width;var c=isNaN(parseFloat(f.height))?"30px":f.height;var b=f.formatString;if(!b){if(f.type=="time"){b="hh mm ss tt"}else{if(f.type=="date"){b="MM/dd/yyyy"}else{b="MM/dd/yyyy hh:mm:ss tt"}}}d.jqxDateTimeInput({theme:e.theme,width:g,height:c,formatString:b,showTimeButton:f.type!="date",showCalendarButton:f.type!="time"})}d.on("valueChanged",function(j){e._onChangeHandler(j)})},getComponentByName:function(c){if(!a.isArray(this.template)){return undefined}for(var d=0;d<this.template.length;d++){if(this.template[d].name==c){return this._getComponentById(d)}if(a.isArray(this.template[d].columns)){for(var b=0;b<this.template[d].columns.length;b++){if(this.template[d].columns[b].name==c){return this._getComponentById(d+"_"+b)}}}}return undefined},_getComponentById:function(c){var b=this.host.find("#el_"+this.element.id+c);return b},_getComponentLabelById:function(c){var b=this.host.find("#label_el_"+c);return b},hideComponent:function(b){this._showhideComponent(b,undefined,false)},showComponent:function(b){this._showhideComponent(b,undefined,true)},_showhideComponent:function(e,h,b){if(!a.isArray(this.template)){return}var d="";if(h===undefined){for(var f=0;f<this.template.length;f++){if(this.template[f].name==e){d=f;break}if(this.template[f].bind==e){d=f;break}if(a.isArray(this.template[f].columns)){for(var c=0;c<this.template[f].length;c++){if(this.template[f].columns[c].name==e){d=f+"_"+c;break}if(this.template[f].columns[c].bind==e){d=f+"_"+c;break}}}}}else{d=h}if(d!=""){var g=this.host.find("#rowWrap_el_"+this.element.id+d);if(g&&g.length!=0){if(b){g.show()}else{g.hide()}}}}})})(jqxBaseFramework)})();
|
|
8
|
+
(function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxForm","",{});a.extend(a.jqx._jqxForm.prototype,{defineInstance:function(){var b={padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#F5F5F5",borderColor:"#E5E5E5",value:{},enableSmartPaste:false,aiUrl:"",aiKey:"",aiModel:"gpt-35-turbo",pasteSuccess:"✅ Auto-filled {{value}} fields",pasteError:"❌ No fields updated.",pasteProgress:"Smart Paste in progress...",template:[{type:"text",label:"TextBox 1"},{type:"text",label:"TextBox 2"},]};a.extend(true,this,b)},createInstance:function(c){var b=this;b._isInitialized=false;var d=b.host;d.addClass(b.toThemeProperty("jqx-widget"));d.addClass(b.toThemeProperty("jqx-form"));b._renderAndInit();this._setValue(this.value);this._prevValue=this._getValue();b._isInitialized=true},destroy:function(){this._destroyElements();this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_destroyElements:function(){for(var c=0;c<this.template.length;c++){if(a.isArray(this.template[c].columns)){for(var b=0;b<this.template[c].columns.length;b++){var d=c+"_"+b;this._getComponentById(d).off();this.host.find("#rowWrap_el_"+d).remove()}}this._getComponentById(c).off();this._getComponentLabelById(c).off();this._getComponentLabelById(c).removeData();this.host.find("#rowWrap_el_"+c).remove()}this.host.find("#formWrap").remove()},val:function(b){if(undefined==b){return this._getValue()}else{this._setValue(b)}},_onChangeHandler:function(f){if(!this.isInitialized||this._suppressEvents){return}var c=this._getValue();if(this._prevValue&&JSON.stringify(c)==JSON.stringify(this._prevValue)){return}var d=new a.Event("formDataChange");d.args={value:c,previousValue:this._prevValue};d.owner=this;var b=this.host.trigger(d);if(d.cancel){this._setValue(this._prevValue)}else{this._prevValue=c}return b},_onButtonClick:function(c,d){if(!this.isInitialized){return}var e=new a.Event("buttonClick");e.args={name:d.name,text:c.val()};e.owner=this;var b=this.host.trigger(e);return b},submit:function(f,k,b){var l=this;var d=l._getValue(true);var h="<form id='jqx_fromToSubmit'";if(f){h+=' action="'+f+'"'}if(k){h+=' target="'+k+'"'}if(b&&b.toString().toLowerCase()==="get"){h+=' method="GET"'}else{h+=' method="POST"'}h+=">";for(var g=0;g<d.length;g++){var e=d[g].value;var j=d[g].tool;var c=j.name;if(c==undefined){c=j.id}if(c==undefined){c=j.bind}if(j.type=="button"||j.type=="label"){if(!j.submit||j.submit==false){continue}}if(j.submit==false){continue}if(c!==undefined){h+='<input type="hidden" ';h+=' name="'+c+'"';h+=' value="'+e+'"';h+=">"}}h+="</form>";l.host.find("#formSubmit").html(h);l.host.find("#jqx_fromToSubmit").submit()},_getValue:function(c){var e={};var d=[];for(var h=0;h<this.template.length;h++){var k=this.template[h];var l="el_"+this.element.id+h;if(a.isArray(k.columns)){for(var g=0;g<k.columns.length;g++){var f=k.columns[g];var p=l+"."+g;if(f.type=="option"&&f.component!="jqxDropDownList"){var o=this._radioGroupGetValue(f,p);if(f.bind==undefined){}else{this._setObjectProperty(e,f.bind,o)}if(c){d.push({tool:f,value:o})}continue}var b=this._getComponentById(h+"_"+g);var n=b.val();if(n===undefined){n=null}if(f.bind==undefined){}else{this._setObjectProperty(e,f.bind,n)}if(c){d.push({tool:f,value:n})}}continue}if(k.type=="option"&&k.component!="jqxDropDownList"){var o=this._radioGroupGetValue(k,l);if(k.bind==undefined){}else{this._setObjectProperty(e,k.bind,o)}if(c){d.push({tool:k,value:o})}continue}var m=this._getComponentById(h);var n=m.val();if(n===undefined){n=null}if(k.bind==undefined){}else{this._setObjectProperty(e,k.bind,n)}if(c){d.push({tool:k,value:n})}}if(c){return d}return a.extend({},this._prevValue,e)},_getObjectProperty:function(f,d){if(typeof(f)!=="object"||f===undefined||d===undefined||d==""){return f}var e=d.split(".");var g=f;for(var c=0;c<e.length;c++){g=g[e[c]]}return g},_setObjectProperty:function(g,d,e){if(undefined===g){return}if(undefined==d||d==""){g=e;return}var f=d.split(".");var c=0;while(c<f.length-1){if(undefined==g[f[c]]){g[f[c]]={}}c++}g[f[c]]=e},_setValue:function(c){this._suppressEvents=true;for(var g=0;g<this.template.length;g++){var h=this.template[g];var k="el_"+this.element.id+g;var d=undefined;if(a.isArray(h.columns)){for(var f=0;f<h.columns.length;f++){var e=h.columns[f];var m=k+"."+f;if(!e.bind){continue}d=this._getObjectProperty(c,e.bind);if(e.type=="option"&&e.component!="jqxDropDownList"){this._radioGroupSetValue(e,m,d);continue}var b=this._getComponentById(g+"_"+f);if(c!==undefined){b.val(d)}}continue}if(!h.bind){continue}d=this._getObjectProperty(c,h.bind);if(h.type=="option"&&h.component!="jqxDropDownList"){this._radioGroupSetValue(h,k,d);continue}var l=this._getComponentById(g);if(h.type=="label"){l.html(d);continue}if(c!==undefined){l.val(d)}}this._prevValue=c;this._suppressEvents=false},_radioGroupGetValue:function(b,f){for(var c=0;c<b.options.length;c++){var e=f+"_option_"+c;var d=this.host.find("#"+e);if(d.length>0){var g=d.jqxRadioButton("val");if(g==true){if(b.options[c].value!==undefined){return b.options[c].value}return b.options[c].label}}}return undefined},_radioGroupSetValue:function(b,f,g){for(var c=0;c<b.options.length;c++){if(b.options[c].value!==undefined){if(g!==b.options[c].value){continue}}else{if(g!==b.options[c].label){continue}}var e=f+"_option_"+c;var d=this.host.find("#"+e);if(d.length>0){d.jqxRadioButton("val",true)}}},_getToolStyle:function(b){var c="display: block;";var d=["left","right","top","bottom"];if(b.height){c+="height: "+b.height+";"}if(b.valign!==undefined){c+="vertical-align: "+b.valign+";"}else{c+="vertical-align: middle;"}return c},_getAlignMargin:function(b,f){if(!b||!b[f]){return""}var g=["left","right","top","bottom"];var e={};var d="";if(b[f]){e={};if(b[f]=="left"){e.left="0px";e.right="auto"}else{if(b[f]=="right"){e.left="auto";e.right="0px"}else{e.left="auto";e.right="auto"}}}if(e){for(var c in g){if(e[g[c]]){d+="margin-"+g[c]+": "+e[g[c]]+";"}}}return d},_getPaddingAndMarginStyle:function(f,g){var b="";var h=["left","right","top","bottom"];var k=g?"labelpadding":"padding";var e=g?"labelmargin":"margin";var j=a.extend({left:5,top:5,right:5,bottom:5},f[k]);for(var d in j){j[d]=!isNaN(j[d])?j[d]:parseFloat(j[d].toString())}var c=f[e];if(j){for(var d in h){if(j[h[d]]){b+="padding-"+h[d]+": "+j[h[d]]+"px;"}}}if(c){for(var d in h){if(c[h[d]]){b+="margin-"+h[d]+": "+c[h[d]]+";"}}}return b},_getToolLabelStyle:function(b){var c="display:block;";var d=["left","right","top","bottom"];if(b.labelheight!==undefined){c+="height: "+b.labelheight+";"}else{c+="height: 100%;"}if(b.labelvalign!==undefined){c+="vertical-align: "+b.labelvalign+";"}else{if(b.valign!==undefined){c+="vertical-align: "+b.valign+";"}else{c+="vertical-align: middle;"}}return c},_renderAndInit:function(){var b=this._createTemplateHtml();this.host.append(b);this._initTools();this._smartPaste()},refresh:function(c){var b=this;if(!b._isInitialized||c===true){return}var d=b.val();b._destroyElements();b._renderAndInit();b._prevValue=d;b.val(d)},_createTemplateHtml:function(){var c=this.groups;var b="padding-left: "+parseFloat(this.padding.left)+"px;padding-right: "+parseFloat(this.padding.right)+"px;padding-top: "+parseFloat(this.padding.top)+"px;padding-bottom: "+parseFloat(this.padding.bottom)+"px;";var f="<table id='formWrap' style='background-color: "+this.backgroundColor+"; width: 100%; white-space: nowrap; border: 1px solid "+this.borderColor+";"+b+"' cellpadding='0' cellspacing='0'><div id='formSubmit' style='display:hidden;'><div>";var j=this.template;for(var e=0;e<j.length;e++){var h="el_"+this.element.id+e;var d=this.template[e];var g=this._getToolTemplate(d,h);f+=g}f+="</table>";return f},_beginRow:function(e,b,c){if(undefined===b){b="auto"}if(c){c="valign='"+c+"'"}else{c=""}var d="<tr style='width: 100%; height: "+b+";' id='rowWrap_"+e+"' "+c+">";d+="<td style='width: 100%;'><table style='width: 100%; white-space: nowrap; border: 0px;' cellspacing='0' cellpadding='0'><tr style='width: 100%'>";return d},_endRow:function(){return"<td style='width: auto; background: transparent;'> </tr></table></td></tr>"},_beginColumn:function(d,c){if(!c){c=""}if(undefined===d){d="auto"}var b="<td style='width:"+d+"; background: transparent;'>";b+="<div style='display:block; overflow: visible; width: 100%; background: transparent;'>";return b},_endColumn:function(){return"</div></td>"},_splitLabelToolWidth:function(e,c){var h=c?"auto":e.columnwidth;var b=e.labelwidth;var d=a.extend({left:5,top:5,right:5,bottom:5},e.padding);var g=a.extend({left:5,top:5,right:5,bottom:5},e.labelpadding);for(var f in d){d[f]=!isNaN(d[f])?d[f]:parseFloat(d[f].toString())}for(var f in g){g[f]=!isNaN(g[f])?g[f]:parseFloat(g[f].toString())}if(e.label==""||e.label==undefined){b=0;g={left:0,right:0,top:0,bottom:0}}if(e.labelposition=="top"||e.labelposition=="bottom"){if(undefined===b){b=h}if(undefined===h){h=b}if(h&&h.toString().indexOf("%")!=-1&&b&&b.toString().indexOf("%")!=-1){h=b=Math.max(parseFloat(h),parseFloat(b))+"%"}if(h&&h.toString().indexOf("%")==-1&&b&&b.toString().indexOf("%")==-1){h=b=Math.max(parseFloat(h),parseFloat(b))+"px"}return[b,h]}if(b===undefined){if(h!==undefined&&h!=="auto"){return["auto",h]}else{if(e.labelposition=="right"){if(e.align=="right"||e.align=="center"||e.align=="middle"){return["auto","100%"]}return["100%","auto"]}return["auto","100%"]}}else{if(b.toString().indexOf("%")!==-1){b=parseFloat(b);if(h!==undefined){if(h.toString().indexOf("%")!==-1){h=parseFloat(h);return[Math.min(100,b)+"%",Math.min(h,100-b)+"%"]}else{h=parseFloat(h);return[Math.min(100,b)+"%",h]}}return[Math.min(100,b)+"%",Math.max(0,100-b)+"%"]}else{b=parseFloat(b)+g.left+g.right;if(h==undefined){return[b+"px","calc(100% - "+b+"px)"]}return[b+"px",h]}}},_getToolTemplate:function(h,t,j,q){var g={};for(var s in h){g[s.toLowerCase()]=h[s]}if(a.isArray(g.columns)&&isNaN(j)){var w=this._beginRow(t,g.rowheight||"auto");for(var B=0;B<g.columns.length;B++){var z=this._getToolTemplate(g.columns[B],(t+"_"+B),undefined,true);var u="auto";if(g.columns[B].columnWidth!==undefined){u=g.columns[B].columnWidth}else{if(g.columns[B].width!==undefined){u=g.columns[B].width}}w+=this._beginColumn(u);w+="<table cellspacing='0' cellpadding='0' style='width: 100%; white-space: nowrap; border: 0px;'>"+z+"</table>";w+=this._endColumn()}w+=this._endRow();return w}if(g.type=="option"&&g.component!="jqxDropDownList"){if(isNaN(j)){var C=this._beginRow(t,g.rowheight||"auto",g.valign);for(var B=0;B<g.options.length;B++){var z=this._getToolTemplate(g,(t+"_option_"+B),B,true);if(g.optionslayout=="horizontal"){var u=100/Math.max(1,g.options.length)+"%";if(g.columnwidth){u=g.columnwidth}C+=this._beginColumn(u);C+="<table cellspacing='0' cellpadding='0' style='width: 100%; white-space: nowrap; border: 0px;'>"+z+"</table>";C+=this._endColumn()}else{C+=z}}C+=this._endRow();return C}}var d=g.labelposition;var m=g.label;var k="";if(g.type=="option"&&g.component!="jqxDropDownList"&&!isNaN(j)){var k=g.options[j].label;m=k}if(m===undefined){m=""}var C="";var b=this._getToolLabelStyle(g)+this._getPaddingAndMarginStyle(g,true);var r=this._getToolStyle(g)+this._getPaddingAndMarginStyle(g,false);var e="";var y=this._getAlignMargin(g,"align");var D="text-align: left;";if(g.labelalign=="center"||g.labelalign=="middle"){D="text-align: center"}else{if(g.labelalign=="right"){D="text-align: right"}}var E="text-align: left;";if(g.align=="center"||g.align=="middle"){E="text-align: center"}else{if(g.align=="right"){E="text-align: right"}}var o=this._splitLabelToolWidth(g,q);var f=m;if(g.required){var n="<span class='"+e+"' style='color:red;'>*</span>";if(g.requiredposition){if(g.requiredposition.toLowerCase()=="left"){f=n+" "+m}else{f=m+" "+n}}else{f=m+" "+n}}var x="";if(g.type=="boolean"||(g.type=="option"&&!isNaN(j))){x+="; cursor: pointer;"}var l="<div class='"+e+"' style='"+b+"'><div style='"+D+x+";' id='label_"+t+"'>"+f+"</div></div>";var A=(g.info!==undefined&&g.infoposition!="left")?"margin-left: -3px;":"margin-right: -3px;";var c="<div style='"+A+"' class='"+this.toThemeProperty("jqx-info-icon")+"' title='"+g.info+"'></div>";var v="<div style='background: transparent;"+r+"'><div style='width: auto; height: auto; "+y+"' id='"+t+"'></div></div>";if(g.type=="text"||g.type=="button"){v="<div style='background: transparent;"+r+E+"'><input style='width: auto; height: auto; "+y+"' id='"+t+"' type='"+g.type+"'/></div>"}else{if(g.type=="password"){v="<div style='background: transparent;"+r+E+"'><input type='password' style='width: auto; height: auto; "+y+"' id='"+t+"'/></div>"}}if(g.type=="option"&&g.component!="jqxDropDownList"&&!isNaN(j)){var u=g.width;if(u===undefined){u="15px"}o=[g.labelwidth||"auto",u];if(g.labelposition&&(g.labelposition=="top"||g.labelposition=="bottom")){o=["100%","100%"]}v="<div style='background: transparent;"+r+y+E+"'><div style='width: "+u+"; height: 100%; "+y+E+";' id='"+t+"'></div></div>"}if(g.info!==undefined&&g.info!==""){if(g.infoposition=="left"){v="<table cellspacing='0' cellpadding='0' style='border: 0px; white-space: nowrap;"+y+"'><tr><td>"+c+"</td><td>"+v+"</td></tr></table>"}else{v="<table cellspacing='0' cellpadding='0' style='border: 0px; white-space: nowrap;"+y+"'><tr><td>"+v+"</td><td>"+c+"</td></tr></table>"}}if(d=="right"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(o[1]);C+=v;if(m!=""){C+=this._endColumn();C+=this._beginColumn(o[0]);C+=l}C+=this._endColumn();C+=this._endRow()}else{if(d=="top"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(g.columnwidth);if(m!=""){C+=l}C+=v;C+=this._endColumn();C+=this._endRow()}else{if(d=="bottom"){C+=this._beginRow(t,g.rowheight||"auto",g.valign);C+=this._beginColumn(g.columnwidth);C+=v;if(m!=""){C+=l}C+=this._endColumn();C+=this._endRow()}else{C+=this._beginRow(t,g.rowheight||"auto",g.valign);if(m!=""){C+=this._beginColumn(o[0]);C+=l;C+=this._endColumn()}C+=this._beginColumn(o[1]);C+=v;C+=this._endColumn();C+=this._endRow()}}}return C},_initTools:function(f,e){var d=f||this.template;if(undefined==e){e=""}for(var c=0;c<d.length;c++){var b=d[c];if(a.isArray(b.columns)){this._initTools(b.columns,c+"_");continue}var g=e+c;switch(b.type){case"color":this._initColorTool(g);break;case"option":if(b.component=="jqxDropDownList"){this._initOptionToolDropDownList(g)}else{this._initOptionTool(g)}break;case"dropdownlist":this._initOptionToolDropDownList(g);break;case"number":this._initNumberTool(g);break;case"boolean":case"checkbox":this._initBooleanTool(g);break;case"text":this._initTextTool(g);break;case"password":this._initPasswordTool(g);break;case"label":this._initLabelTool(g);break;case"date":case"time":case"datetime":this._initDateTimeTool(g);break;case"button":this._initButtonTool(g);break;case"custom":this._initCustomTool(g);break}if(b.visible===false){this._showhideComponent(undefined,g,false)}if(b.theme){this._setToolTheme(b,g)}}},_smartPaste:function(){var d=this.element;var c=this;var b="";if(this.enableSmartPaste){d.addEventListener("paste",function(x){var t=c.aiKey;var u=(x.clipboardData||window.clipboardData).getData("text");if(!u||!t){return}var l=document.createElement("span");l.classList.add("jqx-form-spinner");l.innerHTML="";var k=document.createElement("div");k.classList.add("jqx-widget","jqx-form-tooltip");document.body.appendChild(k);k.innerHTML=l.outerHTML+"<span>"+c.pasteProgress+"</span>";var m=c.host.offset();k.style.top=m.top+d.offsetHeight-30+"px";k.style.left=m.left+"px";x.preventDefault();var p=[];var g=[];for(var w=0;w<c.template.length;w++){var f=c.template[w];if(f.type==="text"||f.type==="boolean"||f.type==="number"||f.type==="password"||f.type==="password"||f.type==="dropdownlist"||f.type==="option"||f.type==="date"||f.type==="time"||f.type==="datetime"){if(f.bind){p.push(f.bind);var v=b+w;var s="el_"+c.element.id+v;var j=c.host.find("#"+s);j.name=f.bind;g.push(j)}}}var q=p;var r="You are an AI assistant. Here's a list of form field names: "+JSON.stringify(q)+'.\n\nGiven this pasted text:\n"""'+u+'"""\n\nReturn a JSON object mapping field names to appropriate values.';var n=new XMLHttpRequest();n.open("POST",c.aiUrl||"https://api.openai.com/v1/chat/completions",true);n.setRequestHeader("Authorization","Bearer "+t);n.setRequestHeader("Content-Type","application/json");n.onreadystatechange=function(){if(n.readyState===4){if(n.status>=200&&n.status<300){var B;try{B=JSON.parse(n.responseText)}catch(E){console.error("Error parsing response JSON:",E);h();return}var F=B.choices&&B.choices[0]&&B.choices[0].message&&B.choices[0].message.content;var H={};try{H=JSON.parse(F||"{}")}catch(z){console.error("Error parsing JSON from AI response:",z)}var G=0;for(var C=0;C<g.length;C++){var I=g[C];if(H[I.name]){if(I[0].classList.contains("jqx-dropdownlist")){var y=I.jqxDropDownList("source");var D=-1;for(var A=0;A<y.length;A++){var J=y[A];if(typeof J==="string"){if(J===H[I.name]){D=A;break}}else{if(typeof J==="object"&&J){if(J.label===H[I.name]||J.value===H[I.name]){D=A;break}}}}if(D!==-1){I.jqxDropDownList("selectIndex",D);I.val(H[I.name]);G++}}else{I.val(H[I.name]);G++}}}if(G>0){k.innerHTML="<span>"+c.pasteSuccess.replace("{{value}}",G)+"</span>"}else{k.innerHTML="<span>"+c.pasteError+"</span>"}setTimeout(function(){if(k&&k.parentNode){k.parentNode.removeChild(k)}},4000)}else{console.error("Smart Paste error: status "+n.status);h()}}};function h(){if(k){k.innerHTML="<span>"+c.pasteError+"</span>";if(k.parentNode){k.parentNode.removeChild(k)}}}var o=JSON.stringify({model:c.aiModel||"gpt-3.5-turbo",messages:[{role:"user",content:r}],temperature:0.3});n.send(o)})}},_setToolTheme:function(c,e){var b=this._getComponentById(e);var d=c.theme||this.theme;switch(c.type){case"option":if(c.component=="jqxDropDownList"){b.jqxDropDownList("theme",d)}break;case"number":b.jqxNumberInput("theme",d);break;case"text":b.jqxInput("theme",d);break;case"password":b.jqxPasswordInput("theme",d);break}},_initOptionTool:function(h){var b=this;var j="el_"+this.element.id+h;var c=b._getTool(h);for(var d=0;d<c.options.length;d++){var g=j+"_option_"+d;var e=b.host.find("#"+g);if(e.length>0){e.jqxRadioButton({width:25,theme:b.theme,groupName:"group_"+h}).on("change",function(i){b._onChangeHandler(i)})}var f=b.host.find("#label_"+g);f.data("el",e);f.on("mousedown",function(k){var i=a(this).data("el");i.jqxRadioButton("toggle")})}},_initOptionToolDropDownList:function(j){var l=this;var d="el_"+this.element.id+j;var f=l._getTool(j);var g=this.host.find("#"+d);var h='<div style="height: 20px;"></div>';var b=[];if(f.source){b=f.source}else{if(f.options&&a.isArray(f.options)){for(var e=0;e<f.options.length;e++){b.push(f.options[e])}}}if(f.init){f.init(g)}else{var c=isNaN(parseFloat(f.width))?"auto":f.width;if(f.width&&f.width.toString().indexOf("%")!=-1&&f.columnwidth===undefined){c="100%"}var k=isNaN(parseFloat(f.height))?"30px":f.height;g.jqxDropDownList({theme:l.theme,width:c||"auto",autoDropDownHeight:true,height:k,enableBrowserBoundsDetection:true,source:b,selectedIndex:0})}g.on("change",function(i){l._onChangeHandler(i)})},_initNumberTool:function(g){var c=this;var h="el_"+this.element.id+g;var d=c._getTool(g);var e=this.host.find("#"+h);if(d.init){d.init(e)}else{var f=isNaN(parseFloat(d.width))?"auto":d.width;var b=isNaN(parseFloat(d.height))?"30px":d.height;e.jqxNumberInput({theme:c.theme,width:f,height:b,inputMode:"simple"})}e.on("change",function(i){c._onChangeHandler(i)})},_initBooleanTool:function(f){var j=this;var b="el_"+this.element.id+f;var e=j._getTool(f);var g=this.host.find("#"+b);if(e.init){e.init(g)}else{var c=isNaN(parseFloat(e.width))?"auto":e.width;var i=isNaN(parseFloat(e.height))?"30px":e.height;var d=e.isThreeState==true;if(e.component===undefined||e.component=="jqxCheckBox"){g.jqxCheckBox({theme:j.theme,width:c,height:i,hasThreeStates:d})}else{return}}g.on("change",function(k){j._onChangeHandler(k)});var h=j.host.find("#label_"+b);h.on("mousedown",function(k){var l=j.host.find("#"+b).val();j.host.find("#"+b).val(!l)})},_initTextTool:function(g){var d=this;var h="el_"+this.element.id+g;var e=d._getTool(g);var c=this.host.find("#"+h);if(e.init){e.init(c)}else{var f=isNaN(parseFloat(e.width))?"auto":e.width;var b=isNaN(parseFloat(e.height))?"30px":e.height;c.jqxInput({theme:d.theme,width:f,height:b})}c.on("change",function(i){d._onChangeHandler(i)})},_initLabelTool:function(f){var b=this;var g="el_"+this.element.id+f;var c=b._getTool(f);var e=this.host.find("#"+g);if(c.render&&a.isFunction(c.render)){var d=c.render();e.html(d||"")}},_getTool:function(e){var b=this;var d=e.split("_");var c=b.template[d[0]];if(d[1]){if(a.isArray(c.columns)&&c.columns.length>d[1]){return c.columns[d[1]]}return undefined}return c},_initCustomTool:function(d){var b=this;var f="el_"+this.element.id+d;var c=b._getTool(d);var e=this.host.find("#"+f);if(c.init){c.init(e)}},_initButtonTool:function(g){var c=this;var h="el_"+this.element.id+g;var d=c._getTool(g);var e=this.host.find("#"+h);if(d.init){d.init(e)}else{var f=isNaN(parseFloat(d.width))?"auto":d.width;var b=isNaN(parseFloat(d.height))?"30px":d.height;e.jqxButton({theme:c.theme,width:f,height:b});e.val(d.text===undefined?"Button":d.text)}this.host.find("#"+h).on("click",function(i){c._onButtonClick(e,d)})},_initPasswordTool:function(g){var d=this;var h="el_"+this.element.id+g;var e=d._getTool(g);var c=this.host.find("#"+h);if(e.init){e.init(c)}else{var f=isNaN(parseFloat(e.width))?"auto":e.width;var b=isNaN(parseFloat(e.height))?"25px":e.height;c.jqxPasswordInput({theme:d.theme,width:f,height:b})}c.on("change",function(i){d._onChangeHandler(i)})},_initDateTimeTool:function(h){var e=this;var i="el_"+this.element.id+h;var f=e._getTool(h);var d=this.host.find("#"+i);if(f.init){f.init(d)}else{var g=isNaN(parseFloat(f.width))?"auto":f.width;var c=isNaN(parseFloat(f.height))?"30px":f.height;var b=f.formatString;if(!b){if(f.type=="time"){b="hh mm ss tt"}else{if(f.type=="date"){b="MM/dd/yyyy"}else{b="MM/dd/yyyy hh:mm:ss tt"}}}d.jqxDateTimeInput({theme:e.theme,width:g,height:c,formatString:b,showTimeButton:f.type!="date",showCalendarButton:f.type!="time"})}d.on("valueChanged",function(j){e._onChangeHandler(j)})},getComponentByName:function(c){if(!a.isArray(this.template)){return undefined}for(var d=0;d<this.template.length;d++){if(this.template[d].name==c){return this._getComponentById(d)}if(a.isArray(this.template[d].columns)){for(var b=0;b<this.template[d].columns.length;b++){if(this.template[d].columns[b].name==c){return this._getComponentById(d+"_"+b)}}}}return undefined},_getComponentById:function(c){var b=this.host.find("#el_"+this.element.id+c);return b},_getComponentLabelById:function(c){var b=this.host.find("#label_el_"+c);return b},hideComponent:function(b){this._showhideComponent(b,undefined,false)},showComponent:function(b){this._showhideComponent(b,undefined,true)},_showhideComponent:function(e,h,b){if(!a.isArray(this.template)){return}var d="";if(h===undefined){for(var f=0;f<this.template.length;f++){if(this.template[f].name==e){d=f;break}if(this.template[f].bind==e){d=f;break}if(a.isArray(this.template[f].columns)){for(var c=0;c<this.template[f].length;c++){if(this.template[f].columns[c].name==e){d=f+"_"+c;break}if(this.template[f].columns[c].bind==e){d=f+"_"+c;break}}}}}else{d=h}if(d!=""){var g=this.host.find("#rowWrap_el_"+this.element.id+d);if(g&&g.length!=0){if(b){g.show()}else{g.hide()}}}}})})(jqxBaseFramework)})();
|
|
9
|
+
|
|
10
|
+
|
|
9
11
|
|