!function(h){h.jqx.jqxWidget("jqxFileUpload","",{}),h.extend(h.jqx._jqxFileUpload.prototype,{defineInstance:function(){var e={width:null,height:"auto",uploadUrl:"",fileInputName:"",autoUpload:!1,multipleFilesUpload:!0,accept:null,browseTemplate:"",uploadTemplate:"",cancelTemplate:"",localization:null,renderFiles:null,disabled:!1,rtl:!1,events:["select","remove","uploadStart","uploadEnd"]};return this===h.jqx._jqxFileUpload.prototype||h.extend(!0,this,e),e},createInstance:function(){var e=this;if(void 0===e.host.jqxButton)throw new Error("jqxFileUpload: Missing reference to jqxbuttons.js");e._createFromInput("jqxFileUpload"),h.jqx.browser.msie?h.jqx.browser.version<11&&(e._ieOldWebkit=!0,h.jqx.browser.version<8&&(e._ie7=!0)):h.jqx.browser.webkit&&(e._ieOldWebkit=!0),e._fluidWidth="string"==typeof e.width&&"%"===e.width.charAt(e.width.length-1),e._fluidHeight="string"==typeof e.height&&"%"===e.height.charAt(e.height.length-1),e._render(!0)},_createFromInput:function(e){var t,o,l,i,a=this;"input"==a.element.nodeName.toLowerCase()&&(a.field=a.element,a.field.className&&(a._className=a.field.className),t={title:a.field.title},a.field.id.length?t.id=a.field.id.replace(/[^\w]/g,"_")+"_"+e:t.id=h.jqx.utilities.createId()+"_"+e,(o=h("
",t))[0].style.cssText=a.field.style.cssText,a.width||(a.width=h(a.field).width()),a.height||(a.height=h(a.field).outerHeight()),h(a.field).hide().after(o),l=a.host.data(),a.host=o,a.host.data(l),a.element=o[0],a.element.id=a.field.id,a.field.id=t.id,a._className&&(a.host.addClass(a._className),h(a.field).removeClass(a._className)),a.field.tabIndex&&(i=a.field.tabIndex,a.field.tabIndex=-1,a.element.tabIndex=i))},_render:function(e){var a=this;a._setSize(),a._addClasses(),!0===e?a._appendElements():a._removeHandlers(),a._addHandlers(),a._ie7&&(a._borderAndPadding("width",a.host),"auto"!==a.height&&a._borderAndPadding("height",a.host)),h.jqx.utilities.resize(a.host,null,!0),h.jqx.utilities.resize(a.host,function(){if(a._fluidWidth){a._ie7&&(a.host.css("width",a.width),a._borderAndPadding("width",a.host));for(var e=0;e'+t+""),e.host.append(e._browseButton),e._browseButton.jqxButton({theme:e.theme,width:o,template:e.browseTemplate,disabled:e.disabled}),e._browseButton.after(''),e._bottomButtonsContainer=h(''),e.host.append(e._bottomButtonsContainer),e._uploadButton=h('"),e._bottomButtonsContainer.append(e._uploadButton),e._uploadButton.jqxButton({theme:e.theme,width:i,template:e.uploadTemplate,disabled:e.disabled}),e._cancelButton=h('"),e._bottomButtonsContainer.append(e._cancelButton),e._cancelButton.jqxButton({theme:e.theme,width:d,template:e.cancelTemplate,disabled:e.disabled}),e._bottomButtonsContainer.after(''),e.rtl&&(e._browseButton.addClass(e.toThemeProperty("jqx-file-upload-button-browse-rtl")),e._cancelButton.addClass(e.toThemeProperty("jqx-file-upload-button-cancel-rtl")),e._uploadButton.addClass(e.toThemeProperty("jqx-file-upload-button-upload-rtl")),h.jqx.browser.msie&&8'),e.host.append(e._uploadIframe),e._iframeInitialized=!1,e._uploadQueue=[],e._forms=[],e._addFormAndFileInput(),e._fileRows=[]},_addFormAndFileInput:function(){var l=this,i=l.element.id,a=h('');l.host.append(a);var e,t,o,d,n=h('');l.accept&&n.attr("accept",l.accept),a.append(n),l._ieOldWebkit&&(e=l._browseButton.position(),t=l._browseButton.outerWidth(),o=l._browseButton.outerHeight(),d=l.rtl&&l._ie7?12:0,a.css({left:e.left-d,top:e.top,width:t,height:o}),a.addClass(l.toThemeProperty("jqx-file-upload-form-ie9")),n.addClass(l.toThemeProperty("jqx-file-upload-file-input-ie9")),l.addHandler(a,"mouseenter.jqxFileUpload"+i,function(){l._browseButton.addClass(l.toThemeProperty("jqx-fill-state-hover"))}),l.addHandler(a,"mouseleave.jqxFileUpload"+i,function(){l._browseButton.removeClass(l.toThemeProperty("jqx-fill-state-hover"))}),l.addHandler(a,"mousedown.jqxFileUpload"+i,function(){l._browseButton.addClass(l.toThemeProperty("jqx-fill-state-pressed"))}),l.addHandler(h(document),"mouseup.jqxFileUpload"+i,function(){l._browseButton.hasClass("jqx-fill-state-pressed")&&l._browseButton.removeClass(l.toThemeProperty("jqx-fill-state-pressed"))})),l.addHandler(n,"change.jqxFileUpload"+i,function(){var e=-1!==(e=this.value).indexOf("fakepath")?e.slice(12):e.slice(e.lastIndexOf("\\")+1),t=h.jqx.browser.msie&&h.jqx.browser.version<10?"IE9 and earlier do not support getting the file size.":this.files[0].size,o=l._addFileRow(e,a,n,t);1===l._fileRows.length&&(l._browseButton.css("margin-bottom","10px"),l._hideButtons(!1)),l._ieOldWebkit&&(l.removeHandler(a,"mouseenter.jqxFileUpload"+i),l.removeHandler(a,"mouseleave.jqxFileUpload"+i),l.removeHandler(a,"mousedown.jqxFileUpload"+i)),l._addFormAndFileInput(),l.removeHandler(n,"change.jqxFileUpload"+i),!0===l.autoUpload&&l._uploadFile(o)}),!0===l._ieOldWebkit&&l.addHandler(n,"click.jqxFileUpload"+i,function(e){!1===l.multipleFilesUpload&&0');0===r._fileRows.length?r._browseButton.after(p):r._fileRows[r._fileRows.length-1].fileRow.after(p),r.renderFiles?p.html(r.renderFiles(e)):(i=h('