summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js')
-rw-r--r--[-rwxr-xr-x]plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js b/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js
index 3140b777..2cd2e536 100755..100644
--- a/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js
+++ b/plugins/wordpress-mobile-pack/admin/js/UI.Modules/Content/WMP_EDIT_PAGES.min.js
@@ -1 +1 @@
-function WMP_EDIT_PAGES(){var t=this;this.type="wmp_editpages",this.form,this.DOMDoc,this.changingStatus=!1,this.init=function(){WMPJSInterface=window.parent.WMPJSInterface,this.form=this.DOMDoc.getElementById(this.type+"_form"),null!=this.form&&(this.initPages(),this.initListActions())},this.initListActions=function(){jQuery("ul.pages li div.row",this.DOMDoc).on("click",t.changeStatus)},this.initPages=function(){jQuery("#"+t.type+"_warning a.close-x",this.form).on("click",function(){jQuery("#"+t.type+"_warning",t.DOMDoc).hide()})},this.changeStatus=function(){var e=jQuery(this).closest("li").attr("data-page-id"),a=jQuery(this).closest("li"),i=confirm("Are you sure you want to change the status for this page?");if(i){var s,n=jQuery(".status",a);s=0==n.hasClass("active")?"active":"inactive",0==t.changingStatus&&(WMPJSInterface.Preloader.start(),jQuery.post(ajaxurl,{action:"wmp_content_status",id:e,status:s,type:"page"},function(e){t.changingStatus=!1,WMPJSInterface.Preloader.remove(100);var e=Boolean(Number(String(e)));if(1==e){n.addClass(s),n.removeClass("active"==s?"inactive":"active"),n.text(s);var a="The status of this page has been changed.";WMPJSInterface.Loader.display({message:a});var i=jQuery("li span.active.main-page",t.form).length;i>0?jQuery("#"+t.type+"_warning",t.DOMDoc).hide():jQuery("#"+t.type+"_warning",t.DOMDoc).show()}else{var a="There was an error. Please reload the page and try again in few seconds or contact the plugin administrator if the problem persists.";WMPJSInterface.Loader.display({message:a})}}))}}} \ No newline at end of file
+function WMP_EDIT_PAGES(){var t=this;this.type="wmp_editpages",this.form,this.DOMDoc,this.changingStatus=!1,this.init=function(){WMPJSInterface=window.parent.WMPJSInterface,this.form=this.DOMDoc.getElementById(this.type+"_form"),null!=this.form&&(this.initPages(),this.initListActions())},this.initListActions=function(){jQuery("ul.pages li div.row",this.DOMDoc).on("click",t.changeStatus)},this.initPages=function(){jQuery("#"+t.type+"_warning a.close-x",this.form).on("click",function(){jQuery("#"+t.type+"_warning",t.DOMDoc).hide()})},this.changeStatus=function(){var e=jQuery(this).closest("li").attr("data-page-id"),i=jQuery(this).closest("li");if(confirm("Are you sure you want to change the status for this page?")){var a,s=jQuery(".status",i);a=0==s.hasClass("active")?"active":"inactive",0==t.changingStatus&&(WMPJSInterface.Preloader.start(),jQuery.post(ajaxurl,{action:"wmp_content_status",id:e,status:a,type:"page"},function(e){if(t.changingStatus=!1,WMPJSInterface.Preloader.remove(100),1==(e=Boolean(Number(String(e))))){s.addClass(a),s.removeClass("active"==a?"inactive":"active"),s.text(a);var i="The status of this page has been changed.";WMPJSInterface.Loader.display({message:i}),jQuery("li span.active.main-page",t.form).length>0?jQuery("#"+t.type+"_warning",t.DOMDoc).hide():jQuery("#"+t.type+"_warning",t.DOMDoc).show()}else{i="There was an error. Please reload the page and try again in few seconds or contact the plugin administrator if the problem persists.";WMPJSInterface.Loader.display({message:i})}}))}}} \ No newline at end of file