%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/shaban/laviva/wp-content/plugins/envato-market/js/
Upload File :
Create Path :
Current File : /var/www/html/shaban/laviva/wp-content/plugins/envato-market/js/envato-market.min.js

!function(e){"use strict";var t,a={cache:{},init:function(){this.cacheElements(),this.bindEvents()},cacheElements:function(){this.cache={$window:e(window),$document:e(document)}},bindEvents:function(){var t=this;t.cache.$window.on("resize",e.proxy(t.tbPosition,t)),t.cache.$document.on("ready",function(){t.addItem(),t.removeItem(),t.tabbedNav(),e(".envato-card").on("click","a.thickbox",function(){return tb_click.call(this),e("#TB_title").css({"background-color":"#23282d",color:"#cfcfcf"}),t.cache.$window.trigger("resize"),!1})})},addItem:function(){e(".add-envato-market-item").on("click",function(n){var i="envato-market-dialog-form";n.preventDefault(),0===e("#"+i).length&&e("body").append(wp.template(i)),t=e("#"+i).dialog({autoOpen:!0,modal:!0,width:350,buttons:{Save:{text:_envatoMarket.i18n.save,click:function(){var n,i,o,r=e(this);r.on("submit",function(e){e.preventDefault()}),i=r.find('input[name="token"]').val(),o=r.find('input[name="id"]').val(),(n=wp.ajax.post(_envatoMarket.action+"_add_item",{nonce:_envatoMarket.nonce,token:i,id:o})).done(function(n){var i=wp.template("envato-market-item"),o=wp.template("envato-market-card"),r=wp.template("envato-market-auth-check-button");e(".nav-tab-wrapper").find('[data-id="'+n.type+'"]').removeClass("hidden"),n.item.type=n.type,e("#"+n.type+"s").append(o(n.item)).removeClass("hidden"),e("#envato-market-items").append(i({name:n.name,token:n.token,id:n.id,key:n.key,type:n.type,authorized:n.authorized})),0===e(".auth-check-button").length&&e("p.submit").append(r),t.dialog("close"),a.addReadmore()}),n.fail(function(e){var a=wp.template("envato-market-dialog-error"),n={message:e.message?e.message:_envatoMarket.i18n.error};t.find(".notice").remove(),t.find("form").prepend(a(n)),t.find(".notice").fadeIn("fast")})}},Cancel:{text:_envatoMarket.i18n.cancel,click:function(){t.dialog("close")}}},close:function(){t.find(".notice").remove(),t.find("form")[0].reset()}})})},removeItem:function(){e("#envato-market-items").on("click",".item-delete",function(a){var n=this,i="envato-market-dialog-remove";a.preventDefault(),0===e("#"+i).length&&e("body").append(wp.template(i)),t=e("#"+i).dialog({autoOpen:!0,modal:!0,width:350,buttons:{Save:{text:_envatoMarket.i18n.remove,click:function(){var a,i;e(this).on("submit",function(e){e.preventDefault()}),i=e(n).parents("li").data("id"),(a=wp.ajax.post(_envatoMarket.action+"_remove_item",{nonce:_envatoMarket.nonce,id:i})).done(function(){var a=e('.col[data-id="'+i+'"]'),o=a.find(".envato-card").hasClass("theme")?"theme":"plugin";a.remove(),0===e("#"+o+"s").find(".col").length&&(e(".nav-tab-wrapper").find('[data-id="'+o+'"]').addClass("hidden"),e("#"+o+"s").addClass("hidden")),e(n).parents("li").remove(),e("#envato-market-items li").each(function(t){e(this).find("input").each(function(){e(this).attr("name",e(this).attr("name").replace(/\[\d\]/g,"["+t+"]"))})}),0!==e(".auth-check-button").length&&0===e("#envato-market-items li").length&&e("p.submit .auth-check-button").remove(),t.dialog("close")}),a.fail(function(e){var a=wp.template("envato-market-dialog-error"),n={message:e.message?e.message:_envatoMarket.i18n.error};t.find(".notice").remove(),t.find("form").prepend(a(n)),t.find(".notice").fadeIn("fast")})}},Cancel:{text:_envatoMarket.i18n.cancel,click:function(){t.dialog("close")}}}})})},tabbedNav:function(){var t=this,a=e(".about-wrap");e("div.panel",a).hide(),this.cache.$window.on("load",function(){var n=t.getParameterByName("tab"),i=window.location.hash.substr(1);n?e('.nav-tab-wrapper a[href="#'+n+'"]',a).click():i?e('.nav-tab-wrapper a[href="#'+i+'"]',a).click():e("div.panel:not(.hidden)",a).first().show()}),e(".nav-tab-wrapper a",a).on("click",function(){return e(".nav-tab-wrapper a",a).removeClass("nav-tab-active"),e("div.panel",a).hide(),e(this).addClass("nav-tab-active"),e("div"+e(this).attr("href"),a).show(),!1})},getParameterByName:function(e){var t;return e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),null===(t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search))?"":decodeURIComponent(t[1].replace(/\+/g," "))},tbPosition:function(){var t=e("#TB_window"),a=e("#TB_iframeContent"),n=this.cache.$window.width(),i=this.cache.$window.height()-(792<n?90:50),o=792<n?772:n-20;return t.size()&&(t.width(o).height(i).css({"margin-left":"-"+parseInt(o/2,10)+"px"}),a.width(o).height(i),void 0!==document.body.style.maxWidth&&t.css({top:(792<n?30:10)+"px","margin-top":"0"})),e("a.thickbox").each(function(){var t=e(this).attr("href");t&&(t=(t=(t=t.replace(/&width=[0-9]+/g,"")).replace(/&height=[0-9]+/g,""))+"&width="+o+"&height="+i,e(this).attr("href",t))})}};a.init()}(jQuery);

Zerion Mini Shell 1.0