芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/woocommerce/assets/js/admin/api-keys.min.js
!function(r){new(Backbone.View.extend({el:r("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){r(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){r(this.el).unblock()},initTipTip:function(i){r(document.body).on("click",i,function(e){e.preventDefault(),document.queryCommandSupported("copy")?(r("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(r(this).prev("input").val().trim(),r(i))):(r(i).parent().find("input").trigger("focus").trigger("select"),r("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){r("#copy-error").text(""),r(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")}).on("aftercopyerror",i,function(){r(i).parent().find("input").trigger("focus").trigger("select"),r("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(e,i){r("#keys-qrcode").qrcode({text:e+"|"+i,width:120,height:120})},saveKey:function(e){e.preventDefault();var o=this;o.block(),Backbone.ajax({method:"POST",dataType:"json",url:woocommerce_admin_api_keys.ajax_url,data:{action:"woocommerce_update_api_key",security:woocommerce_admin_api_keys.update_api_nonce,key_id:r("#key_id",o.el).val(),description:r("#key_description",o.el).val(),user:r("#key_user",o.el).val(),permissions:r("#key_permissions",o.el).val()},success:function(e){var i,t;r(".wc-api-message",o.el).remove(),e.success?(i=e.data,r("h2, h3",o.el).first().append('
'+i.message+"
"),0
'+e.data.message+"
"),o.unblock()}})}}))}(jQuery);