%PDF- %PDF-
Direktori : /var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/assets/js/admin/ |
Current File : //var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/assets/js/admin/network-orders.min.js |
!function(o,e){if("undefined"!=typeof kkart_network_orders){var t=[],n=[],s=[],r=o(document.getElementById("network-orders-tbody")),a=e.template(o(document.getElementById("network-orders-row-template")).text()),c=o(document.getElementById("kkart-network-order-table-loading")),d=o(document.getElementById("kkart-network-order-table")),i=o(document.getElementById("kkart-network-orders-no-orders"));if(!kkart_network_orders.sites.length)return c.removeClass("is-active"),d.removeClass("is-active"),i.addClass("is-active");o.each(kkart_network_orders.sites,function(r,e){n[r]=o.Deferred(),s.push(o.ajax({url:kkart_network_orders.order_endpoint,data:{_wpnonce:kkart_network_orders.nonce,network_orders:!0,blog_id:e},type:"GET"}).success(function(e){for(var o in e)t.push(e[o]);n[r].resolve()}).fail(function(){n[r].resolve()}))}),0<n.length&&o.when.apply(o,n).done(function(){var e,o;if(t.sort(function(e,o){e=Date.parse(e.date_created_gmt),o=Date.parse(o.date_created_gmt);return e===o?0:e<o?1:-1}),0<t.length){for(e in t)o=t[e],r.append(a(o));i.removeClass("is-active"),c.removeClass("is-active"),d.addClass("is-active")}else i.addClass("is-active"),c.removeClass("is-active"),d.removeClass("is-active")})}}(jQuery,_);