summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js')
-rwxr-xr-xplugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js b/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js
index a5b56d9d..929016d4 100755
--- a/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js
+++ b/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Theming/WMP_EDIT_THEME.min.js
@@ -1 +1 @@
-function WMP_EDIT_THEME(){var JSObject=this;this.type="wmp_edittheme",this.form,this.DOMDoc,this.send_btn,this.enableCustomSelects=0,this.init=function(){WMPJSInterface=window.parent.WMPJSInterface,this.send_btn=jQuery("#"+this.type+"_send_btn",this.DOMDoc).get(0),this.form=this.DOMDoc.getElementById(this.type+"_form"),this.addButtonsActions(),null!=this.form&&(this.initCustomColors(),this.initCustomSelects())},this.initCustomColors=function(){jQuery('input[name^="'+JSObject.type+'_customcolor"]').wpColorPicker(),jQuery('input[name="'+JSObject.type+'_colorscheme"]').click(function(){0==jQuery(this).val()?jQuery(".color-schemes-custom").show():jQuery(".color-schemes-custom").hide()})},this.initCustomSelects=function(){1==this.enableCustomSelects&&(jQuery("#"+JSObject.type+"_fontheadlines").selectBoxIt(),jQuery("#"+JSObject.type+"_fontsubtitles").selectBoxIt(),jQuery("#"+JSObject.type+"_fontparagraphs").selectBoxIt())},this.addButtonsActions=function(){jQuery(this.send_btn).unbind("click"),jQuery(this.send_btn).bind("click",function(){JSObject.disableButton(this),JSObject.sendData()}),JSObject.enableButton(this.send_btn)},this.enableButton=function(e){jQuery(e).css("cursor","pointer"),jQuery(e).animate({opacity:1},100)},this.disableButton=function(e){jQuery(e).unbind("click"),jQuery(e).animate({opacity:.4},100),jQuery(e).css("cursor","default")},this.submitForm=function(){return WMPJSInterface.AjaxUpload.dosubmit(JSObject.form,{onStart:JSObject.startUploadingData,onComplete:JSObject.completeUploadingData})},this.sendData=function(){jQuery("#"+this.form.id,this.DOMDoc).unbind("submit"),jQuery("#"+this.form.id,this.DOMDoc).bind("submit",function(){JSObject.submitForm()}),jQuery("#"+this.form.id,this.DOMDoc).submit(),JSObject.disableButton(JSObject.send_btn)},this.startUploadingData=function(){return WMPJSInterface.Preloader.start(),setTimeout(function(){var e=JSObject.form.elements;for(nElems=e.length,j=0;j<nElems;j++)e[j].disabled=!0},300),!0},this.completeUploadingData=function(responseJSON){jQuery("#"+JSObject.form.id,JSObject.DOMDoc).unbind("submit"),jQuery("#"+JSObject.form.id,JSObject.DOMDoc).bind("submit",function(){return!1}),WMPJSInterface.Preloader.remove(100);var JSON=eval("("+responseJSON+")"),response=Boolean(Number(String(JSON.status)));if(1==response&&0==JSON.messages.length){var message="Your app has been successfully modified!";WMPJSInterface.Loader.display({message:message})}else if(0==JSON.messages.length){var message="There was an error. Please reload the page and try again.";WMPJSInterface.Loader.display({message:message})}else for(var i=0;i<JSON.messages.length;i++)WMPJSInterface.Loader.display({message:JSON.messages[i]});setTimeout(function(){var e=JSObject.form.elements;for(nElems=e.length,j=0;j<nElems;j++)e[j].disabled=!1},300),JSObject.addButtonsActions()}} \ No newline at end of file
+function WMP_EDIT_THEME(){var a=this;this.type="wmp_edittheme",this.form,this.DOMDoc,this.send_btn,this.init=function(){WMPJSInterface=window.parent.WMPJSInterface,this.send_btn=jQuery("#"+this.type+"_send_btn",this.DOMDoc).get(0),this.form=this.DOMDoc.getElementById(this.type+"_form"),this.addButtonsActions(),null!=this.form&&(this.initCustomColors(),this.initCustomSelects())},this.initCustomColors=function(){jQuery('input[name^="'+a.type+'_customcolor"]').wpColorPicker(),jQuery('input[name="'+a.type+'_colorscheme"]').click(function(){0==jQuery(this).val()?jQuery(".color-schemes-custom").show():jQuery(".color-schemes-custom").hide()})},this.initCustomSelects=function(){jQuery("#"+a.type+"_fontheadlines").selectBoxIt(),jQuery("#"+a.type+"_fontsubtitles").selectBoxIt(),jQuery("#"+a.type+"_fontparagraphs").selectBoxIt()},this.addButtonsActions=function(){jQuery(this.send_btn).unbind("click"),jQuery(this.send_btn).bind("click",function(){a.disableButton(this),a.sendData()}),a.enableButton(this.send_btn)},this.enableButton=function(a){jQuery(a).css("cursor","pointer"),jQuery(a).animate({opacity:1},100)},this.disableButton=function(a){jQuery(a).unbind("click"),jQuery(a).animate({opacity:.4},100),jQuery(a).css("cursor","default")},this.submitForm=function(){return WMPJSInterface.AjaxUpload.dosubmit(a.form,{onStart:a.startUploadingData,onComplete:a.completeUploadingData})},this.sendData=function(){jQuery("#"+this.form.id,this.DOMDoc).unbind("submit"),jQuery("#"+this.form.id,this.DOMDoc).bind("submit",function(){a.submitForm()}),jQuery("#"+this.form.id,this.DOMDoc).submit(),a.disableButton(a.send_btn)},this.startUploadingData=function(){return WMPJSInterface.Preloader.start(),setTimeout(function(){var b=a.form.elements;for(nElems=b.length,j=0;j<nElems;j++)b[j].disabled=!0},300),!0},this.completeUploadingData=function(b){jQuery("#"+a.form.id,a.DOMDoc).unbind("submit"),jQuery("#"+a.form.id,a.DOMDoc).bind("submit",function(){return!1}),WMPJSInterface.Preloader.remove(100);var c=JSON.parse(b),d=Boolean(Number(String(c.status)));if(1==d&&0==c.messages.length){var e="Your app has been successfully modified!";WMPJSInterface.Loader.display({message:e})}else if(0==c.messages.length){var e="There was an error. Please reload the page and try again.";WMPJSInterface.Loader.display({message:e})}else for(var f=0;f<c.messages.length;f++)WMPJSInterface.Loader.display({message:c.messages[f]});setTimeout(function(){var b=a.form.elements;for(nElems=b.length,j=0;j<nElems;j++)b[j].disabled=!1},300),a.addButtonsActions()}}