rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions
@@ -8,4 +8,4 @@
* Full details and documentation:
* http://openexchangerates.github.io/accounting.js/
*/
!function(n){var f={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},i=Array.prototype.map,r=Array.isArray,e=Object.prototype.toString;function p(n){return""===n||n&&n.charCodeAt&&n.substr}function l(n){return r?r(n):"[object Array]"===e.call(n)}function m(n){return n&&"[object Object]"===e.call(n)}function d(n,r){for(var e in n=n||{},r=r||{})r.hasOwnProperty(e)&&null==n[e]&&(n[e]=r[e]);return n}function g(n,r,e){var t,o,a=[];if(n){if(i&&n.map===i)return n.map(r,e);for(t=0,o=n.length;t<o;t++)a[t]=r.call(e,n[t],t,n)}return a}function h(n,r){return n=Math.round(Math.abs(n)),isNaN(n)?r:n}function y(n){var r=f.settings.currency.format;return p(n="function"==typeof n?n():n)&&n.match("%v")?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:n&&n.pos&&n.pos.match("%v")?n:p(r)?f.settings.currency.format={pos:r,neg:r.replace("%v","-%v"),zero:r}:r}var t,b=f.unformat=f.parse=function(n,r){if(l(n))return g(n,function(n){return b(n,r)});if("number"==typeof(n=n||0))return n;r=r||f.settings.number.decimal;var e=new RegExp("[^0-9-"+r+"]",["g"]),n=parseFloat((""+n).replace(/\((.*)\)/,"-$1").replace(e,"").replace(r,"."));return isNaN(n)?0:n},s=f.toFixed=function(n,r){r=h(r,f.settings.number.precision);var e=Math.pow(10,r);return(Math.round(f.unformat(n)*e)/e).toFixed(r)},v=f.formatNumber=f.format=function(n,r,e,t){if(l(n))return g(n,function(n){return v(n,r,e,t)});n=b(n);var o=d(m(r)?r:{precision:r,thousand:e,decimal:t},f.settings.number),a=h(o.precision),i=n<0?"-":"",u=parseInt(s(Math.abs(n||0),a),10)+"",c=3<u.length?u.length%3:0;return i+(c?u.substr(0,c)+o.thousand:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+o.thousand)+(a?o.decimal+s(Math.abs(n),a).split(".")[1]:"")},c=f.formatMoney=function(n,r,e,t,o,a){if(l(n))return g(n,function(n){return c(n,r,e,t,o,a)});n=b(n);var i=d(m(r)?r:{symbol:r,precision:e,thousand:t,decimal:o,format:a},f.settings.currency),u=y(i.format);return(0<n?u.pos:n<0?u.neg:u.zero).replace("%s",i.symbol).replace("%v",v(Math.abs(n),h(i.precision),i.thousand,i.decimal))};f.formatColumn=function(n,r,e,t,o,a){var i,u,c,s;return n?(i=d(m(r)?r:{symbol:r,precision:e,thousand:t,decimal:o,format:a},f.settings.currency),u=y(i.format),c=u.pos.indexOf("%s")<u.pos.indexOf("%v"),s=0,r=g(n,function(n,r){return l(n)?f.formatColumn(n,i):((n=(0<(n=b(n))?u.pos:n<0?u.neg:u.zero).replace("%s",i.symbol).replace("%v",v(Math.abs(n),h(i.precision),i.thousand,i.decimal))).length>s&&(s=n.length),n)}),g(r,function(n,r){return p(n)&&n.length<s?c?n.replace(i.symbol,i.symbol+new Array(s-n.length+1).join(" ")):new Array(s-n.length+1).join(" ")+n:n})):[]},"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=f:exports).accounting=f:"function"==typeof define&&define.amd?define([],function(){return f}):(f.noConflict=(t=n.accounting,function(){return n.accounting=t,f.noConflict=void 0,f}),n.accounting=f)}(this);
!function(n,r){var e={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},t=Array.prototype.map,o=Array.isArray,a=Object.prototype.toString;function i(n){return!!(""===n||n&&n.charCodeAt&&n.substr)}function u(n){return o?o(n):"[object Array]"===a.call(n)}function c(n){return n&&"[object Object]"===a.call(n)}function s(n,r){var e;for(e in n=n||{},r=r||{})r.hasOwnProperty(e)&&null==n[e]&&(n[e]=r[e]);return n}function f(n,r,e){var o,a,i=[];if(!n)return i;if(t&&n.map===t)return n.map(r,e);for(o=0,a=n.length;o<a;o++)i[o]=r.call(e,n[o],o,n);return i}function p(n,r){return n=Math.round(Math.abs(n)),isNaN(n)?r:n}function l(n){var r=e.settings.currency.format;return"function"==typeof n&&(n=n()),i(n)&&n.match("%v")?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:n&&n.pos&&n.pos.match("%v")?n:i(r)?e.settings.currency.format={pos:r,neg:r.replace("%v","-%v"),zero:r}:r}var m,d=e.unformat=e.parse=function(n,r){if(u(n))return f(n,function(n){return d(n,r)});if("number"==typeof(n=n||0))return n;r=r||e.settings.number.decimal;var t=new RegExp("[^0-9-"+r+"]",["g"]),o=parseFloat((""+n).replace(/\((.*)\)/,"-$1").replace(t,"").replace(r,"."));return isNaN(o)?0:o},g=e.toFixed=function(n,r){r=p(r,e.settings.number.precision);var t=Math.pow(10,r);return(Math.round(e.unformat(n)*t)/t).toFixed(r)},h=e.formatNumber=e.format=function(n,r,t,o){if(u(n))return f(n,function(n){return h(n,r,t,o)});n=d(n);var a=s(c(r)?r:{precision:r,thousand:t,decimal:o},e.settings.number),i=p(a.precision),l=n<0?"-":"",m=parseInt(g(Math.abs(n||0),i),10)+"",y=m.length>3?m.length%3:0;return l+(y?m.substr(0,y)+a.thousand:"")+m.substr(y).replace(/(\d{3})(?=\d)/g,"$1"+a.thousand)+(i?a.decimal+g(Math.abs(n),i).split(".")[1]:"")},y=e.formatMoney=function(n,r,t,o,a,i){if(u(n))return f(n,function(n){return y(n,r,t,o,a,i)});n=d(n);var m=s(c(r)?r:{symbol:r,precision:t,thousand:o,decimal:a,format:i},e.settings.currency),g=l(m.format);return(n>0?g.pos:n<0?g.neg:g.zero).replace("%s",m.symbol).replace("%v",h(Math.abs(n),p(m.precision),m.thousand,m.decimal))};e.formatColumn=function(n,r,t,o,a,m){if(!n)return[];var g=s(c(r)?r:{symbol:r,precision:t,thousand:o,decimal:a,format:m},e.settings.currency),y=l(g.format),b=y.pos.indexOf("%s")<y.pos.indexOf("%v"),v=0;return f(f(n,function(n,r){if(u(n))return e.formatColumn(n,g);var t=((n=d(n))>0?y.pos:n<0?y.neg:y.zero).replace("%s",g.symbol).replace("%v",h(Math.abs(n),p(g.precision),g.thousand,g.decimal));return t.length>v&&(v=t.length),t}),function(n,r){return i(n)&&n.length<v?b?n.replace(g.symbol,g.symbol+new Array(v-n.length+1).join(" ")):new Array(v-n.length+1).join(" ")+n:n})},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=e),exports.accounting=e):"function"==typeof define&&define.amd?define([],function(){return e}):(e.noConflict=(m=n.accounting,function(){return n.accounting=m,e.noConflict=void 0,e}),n.accounting=e)}(this);
@@ -1 +1 @@
!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('<div class="wc-api-message updated"><p>'+i.message+"</p></div>"),0<i.consumer_key.length&&0<i.consumer_secret.length?(r("#api-keys-options",o.el).remove(),r("p.submit",o.el).empty().append(i.revoke_url),t=wp.template("api-keys-template"),r("p.submit",o.el).before(t({consumer_key:i.consumer_key,consumer_secret:i.consumer_secret})),o.createQRCode(i.consumer_key,i.consumer_secret),o.initTipTip(".copy-key"),o.initTipTip(".copy-secret")):(r("#key_description",o.el).val(i.description),r("#key_user",o.el).val(i.user_id),r("#key_permissions",o.el).val(i.permissions))):r("h2, h3",o.el).first().append('<div class="wc-api-message error"><p>'+e.data.message+"</p></div>"),o.unblock()}})}}))}(jQuery);
!function(e){new(Backbone.View.extend({el:e("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},initTipTip:function(i){e(document.body).on("click",i,function(t){t.preventDefault(),document.queryCommandSupported("copy")?(e("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(e(this).prev("input").val().trim(),e(i))):(e(i).parent().find("input").trigger("focus").trigger("select"),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){e("#copy-error").text(""),e(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")}).on("aftercopyerror",i,function(){e(i).parent().find("input").trigger("focus").trigger("select"),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(i,t){e("#keys-qrcode").qrcode({text:i+"|"+t,width:120,height:120})},saveKey:function(i){i.preventDefault();var t=this;t.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:e("#key_id",t.el).val(),description:e("#key_description",t.el).val(),user:e("#key_user",t.el).val(),permissions:e("#key_permissions",t.el).val()},success:function(i){if(e(".wc-api-message",t.el).remove(),i.success){var o=i.data;if(e("h2, h3",t.el).first().append('<div class="wc-api-message updated"><p>'+o.message+"</p></div>"),0<o.consumer_key.length&&0<o.consumer_secret.length){e("#api-keys-options",t.el).remove(),e("p.submit",t.el).empty().append(o.revoke_url);var r=wp.template("api-keys-template");e("p.submit",t.el).before(r({consumer_key:o.consumer_key,consumer_secret:o.consumer_secret})),t.createQRCode(o.consumer_key,o.consumer_secret),t.initTipTip(".copy-key"),t.initTipTip(".copy-secret")}else e("#key_description",t.el).val(o.description),e("#key_user",t.el).val(o.user_id),e("#key_permissions",t.el).val(o.permissions)}else e("h2, h3",t.el).first().append('<div class="wc-api-message error"><p>'+i.data.message+"</p></div>");t.unblock()}})}}))}(jQuery);
@@ -1 +1 @@
!function(o,e,n){"use strict";o.fn.WCBackboneModal=function(e){return this.each(function(){new o.WCBackboneModal(o(this),e)})},o.WCBackboneModal=function(e,t){t=o.extend({},o.WCBackboneModal.defaultOptions,t);t.template&&new o.WCBackboneModal.View({target:t.template,string:t.variable})},o.WCBackboneModal.defaultOptions={template:"",variable:{}},o.WCBackboneModal.View=e.View.extend({tagName:"div",id:"wc-backbone-modal-dialog",_target:undefined,_string:undefined,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton","touchstart #btn-ok":"addButton",keydown:"keyboardActions"},resizeContent:function(){var e=o(".wc-backbone-modal-content").find("article"),t=.75*o(window).height();e.css({"max-height":t+"px"})},initialize:function(e){var t=this;this._target=e.target,this._string=e.string,n.bindAll(this,"render"),this.render(),o(window).on("resize",function(){t.resizeContent()})},render:function(){var e=wp.template(this._target);this.$el.append(e(this._string)),o(document.body).css({overflow:"hidden"}).append(this.$el),this.resizeContent(),this.$(".wc-backbone-modal-content").attr("tabindex","0").trigger("focus"),o(document.body).trigger("init_tooltips"),o(document.body).trigger("wc_backbone_modal_loaded",this._target)},closeButton:function(e){e.preventDefault(),o(document.body).trigger("wc_backbone_modal_before_remove",this._target),this.undelegateEvents(),o(document).off("focusin"),o(document.body).css({overflow:"auto"}),this.remove(),o(document.body).trigger("wc_backbone_modal_removed",this._target)},addButton:function(e){o(document.body).trigger("wc_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(e)},getFormData:function(){var n={};return o(document.body).trigger("wc_backbone_modal_before_update",this._target),o.each(o("form",this.$el).serializeArray(),function(e,t){-1!==t.name.indexOf("[]")?(t.name=t.name.replace("[]",""),n[t.name]=o.makeArray(n[t.name]),n[t.name].push(t.value)):n[t.name]=t.value}),n},keyboardActions:function(e){var t=e.keyCode||e.which;13!==t||e.target.tagName&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())||this.addButton(e),27===t&&this.closeButton(e)}})}(jQuery,Backbone,_);
!function(e,t,n){"use strict";e.fn.WCBackboneModal=function(t){return this.each(function(){new e.WCBackboneModal(e(this),t)})},e.WCBackboneModal=function(t,n){var o=e.extend({},e.WCBackboneModal.defaultOptions,n);o.template&&new e.WCBackboneModal.View({target:o.template,string:o.variable})},e.WCBackboneModal.defaultOptions={template:"",variable:{}},e.WCBackboneModal.View=t.View.extend({tagName:"div",id:"wc-backbone-modal-dialog",_target:undefined,_string:undefined,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton","touchstart #btn-ok":"addButton",keydown:"keyboardActions"},resizeContent:function(){var t=e(".wc-backbone-modal-content").find("article"),n=.75*e(window).height();t.css({"max-height":n+"px"})},initialize:function(t){var o=this;this._target=t.target,this._string=t.string,n.bindAll(this,"render"),this.render(),e(window).on("resize",function(){o.resizeContent()})},render:function(){var t=wp.template(this._target);this.$el.append(t(this._string)),e(document.body).css({overflow:"hidden"}).append(this.$el),this.resizeContent(),this.$(".wc-backbone-modal-content").attr("tabindex","0").trigger("focus"),e(document.body).trigger("init_tooltips"),e(document.body).trigger("wc_backbone_modal_loaded",this._target)},closeButton:function(t){t.preventDefault(),e(document.body).trigger("wc_backbone_modal_before_remove",this._target),this.undelegateEvents(),e(document).off("focusin"),e(document.body).css({overflow:"auto"}),this.remove(),e(document.body).trigger("wc_backbone_modal_removed",this._target)},addButton:function(t){e(document.body).trigger("wc_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(t)},getFormData:function(){var t={};return e(document.body).trigger("wc_backbone_modal_before_update",this._target),e.each(e("form",this.$el).serializeArray(),function(n,o){-1!==o.name.indexOf("[]")?(o.name=o.name.replace("[]",""),t[o.name]=e.makeArray(t[o.name]),t[o.name].push(o.value)):t[o.name]=o.value}),t},keyboardActions:function(e){var t=e.keyCode||e.which;13!==t||e.target.tagName&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())||this.addButton(e),27===t&&this.closeButton(e)}})}(jQuery,Backbone,_);
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(_){({init:function(){_("select#discount_type").on("change",this.type_options).trigger("change"),this.insert_generate_coupon_code_button(),_(".button.generate-coupon-code").on("click",this.generate_coupon_code)},type_options:function(){var e=_(this).val();"percent"===e?_("#coupon_amount").removeClass("wc_input_price").addClass("wc_input_decimal"):_("#coupon_amount").removeClass("wc_input_decimal").addClass("wc_input_price"),"fixed_cart"!==e?_(".limit_usage_to_x_items_field").show():_(".limit_usage_to_x_items_field").hide()},insert_generate_coupon_code_button:function(){_(".post-type-shop_coupon").find("#title").after('<a href="#" class="button generate-coupon-code">'+woocommerce_admin_meta_boxes_coupon.generate_button_text+"</a>")},generate_coupon_code:function(e){e.preventDefault();for(var e=_("#title"),o=_("#title-prompt-text"),t="",n=0;n<woocommerce_admin_meta_boxes_coupon.char_length;n++)t+=woocommerce_admin_meta_boxes_coupon.characters.charAt(Math.floor(Math.random()*woocommerce_admin_meta_boxes_coupon.characters.length));t=woocommerce_admin_meta_boxes_coupon.prefix+t+woocommerce_admin_meta_boxes_coupon.suffix,e.trigger("focus").val(t),o.addClass("screen-reader-text")}}).init()});
jQuery(function(e){({init:function(){e("select#discount_type").on("change",this.type_options).trigger("change"),this.insert_generate_coupon_code_button(),e(".button.generate-coupon-code").on("click",this.generate_coupon_code)},type_options:function(){var o=e(this).val();"percent"===o?e("#coupon_amount").removeClass("wc_input_price").addClass("wc_input_decimal"):e("#coupon_amount").removeClass("wc_input_decimal").addClass("wc_input_price"),"fixed_cart"!==o?e(".limit_usage_to_x_items_field").show():e(".limit_usage_to_x_items_field").hide()},insert_generate_coupon_code_button:function(){e(".post-type-shop_coupon").find("#title").after('<a href="#" class="button generate-coupon-code">'+woocommerce_admin_meta_boxes_coupon.generate_button_text+"</a>")},generate_coupon_code:function(o){o.preventDefault();for(var t=e("#title"),n=e("#title-prompt-text"),_="",c=0;c<woocommerce_admin_meta_boxes_coupon.char_length;c++)_+=woocommerce_admin_meta_boxes_coupon.characters.charAt(Math.floor(Math.random()*woocommerce_admin_meta_boxes_coupon.characters.length));_=woocommerce_admin_meta_boxes_coupon.prefix+_+woocommerce_admin_meta_boxes_coupon.suffix,t.trigger("focus").val(_),n.addClass("screen-reader-text")}}).init()});
File diff suppressed because one or more lines are too long
@@ -47,13 +47,11 @@ jQuery( function ( $ ) {
'woocommerce_variations_loaded',
this.variations_loaded
);
$( document.body )
.on( 'woocommerce_variations_added', this.variation_added )
.on(
'keyup',
'.wc_input_variations_price',
this.maybe_enable_button_to_add_price_to_variations
);
$( document.body ).on(
'keyup',
'.wc_input_variations_price',
this.maybe_enable_button_to_add_price_to_variations
);
},
create_variations: function ( event ) {
@@ -328,21 +326,6 @@ jQuery( function ( $ ) {
$( document.body ).trigger( 'wc-enhanced-select-init' );
},
/**
* Run actions when added a variation
*
* @param {Object} event
* @param {Int} qty
*/
variation_added: function ( event, qty ) {
if ( 1 === qty ) {
wc_meta_boxes_product_variations_actions.variations_loaded(
null,
true
);
}
},
/**
* Sets a price for every variation
*/
@@ -997,11 +980,17 @@ jQuery( function ( $ ) {
$(
'button.cancel-variation-changes, button.save-variation-changes'
).prop( 'disabled', false );
$( '#variable_product_options' ).trigger(
'woocommerce_variations_added',
1
wc_meta_boxes_product_variations_pagenav.update_single_quantity();
wc_meta_boxes_product_variations_actions.variations_loaded(
null,
true
);
wc_meta_boxes_product_variations_ajax.show_hide_variation_empty_state();
$( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 );
wc_meta_boxes_product_variations_ajax.unblock();
}
);
@@ -1074,6 +1063,12 @@ jQuery( function ( $ ) {
page = total_pages;
}
if ( total_pages === 0 ) {
$( '.generate_variations' ).text(
'Generate variations'
);
}
wc_meta_boxes_product_variations_pagenav.go_to_page(
page,
-1
@@ -1118,25 +1113,20 @@ jQuery( function ( $ ) {
woocommerce_admin_meta_boxes_variations.ajax_url,
data,
function ( response ) {
var count = parseInt( response, 10 );
const count = parseInt( response, 10 ) || 0;
if ( 1 === count ) {
window.alert(
count +
' ' +
woocommerce_admin_meta_boxes_variations.i18n_variation_added
);
} else if ( 0 === count || count > 1 ) {
window.alert(
count +
' ' +
woocommerce_admin_meta_boxes_variations.i18n_variations_added
);
} else {
window.alert(
woocommerce_admin_meta_boxes_variations.i18n_no_variations_added
);
}
const message =
count === 1
? woocommerce_admin_meta_boxes_variations.i18n_variation_added
: woocommerce_admin_meta_boxes_variations.i18n_variations_added.replace(
'%qty%',
count
);
window.wp.data.dispatch( 'core/notices' ).createSuccessNotice(
message,
{ icon: '🎉' }
);
wc_meta_boxes_product_variations_ajax.show_hide_variation_empty_state();
@@ -1145,9 +1135,8 @@ jQuery( function ( $ ) {
1,
count
);
$( '#variable_product_options' ).trigger(
'woocommerce_variations_added',
count
$( '.generate_variations' ).text(
'Regenerate variations'
);
} else {
wc_meta_boxes_product_variations_ajax.unblock();
@@ -1319,6 +1308,7 @@ jQuery( function ( $ ) {
$( '#variable_product_options' )
.find( '.variation-needs-update' )
.removeClass( 'variation-needs-update' );
$( '.generate_variations' ).text( 'Generate variations' );
} else {
wc_meta_boxes_product_variations_ajax.check_for_changes();
}
@@ -1354,10 +1344,14 @@ jQuery( function ( $ ) {
'.woocommerce_variations'
);
if ( parseInt( wrapper.attr( 'data-total' ) ) > 0 ) {
$( '.add-variation-container' ).addClass( 'hidden' );
$( '#variable_product_options_inner' ).removeClass(
'no-variations'
);
$( '#field_to_edit' ).removeClass( 'hidden' );
} else {
$( '.add-variation-container' ).removeClass( 'hidden' );
$( '#variable_product_options_inner' ).addClass(
'no-variations'
);
$( '#field_to_edit' ).addClass( 'hidden' );
}
},
@@ -1386,10 +1380,6 @@ jQuery( function ( $ ) {
*/
init: function () {
$( document.body )
.on(
'woocommerce_variations_added',
this.update_single_quantity
)
.on(
'change',
'.variations-pagenav .page-selector',
@@ -1426,46 +1416,35 @@ jQuery( function ( $ ) {
// Set the new total of variations
wrapper.attr( 'data-total', total );
if ( 1 === total ) {
displaying_num.text(
woocommerce_admin_meta_boxes_variations.i18n_variation_count_single.replace(
'%qty%',
total
)
);
} else {
displaying_num.text(
woocommerce_admin_meta_boxes_variations.i18n_variation_count_plural.replace(
'%qty%',
total
)
);
}
const message =
total === 1
? woocommerce_admin_meta_boxes_variations.i18n_variation_count_single
: woocommerce_admin_meta_boxes_variations.i18n_variation_count_plural.replace(
'%qty%',
total
);
displaying_num.text( message );
return total;
},
/**
* Update variations quantity when add a new variation
*
* @param {Object} event
* @param {Int} qty
*/
update_single_quantity: function ( event, qty ) {
if ( 1 === qty ) {
var page_nav = $( '.variations-pagenav' );
update_single_quantity: function () {
wc_meta_boxes_product_variations_pagenav.update_variations_count(
1
);
wc_meta_boxes_product_variations_pagenav.update_variations_count(
qty
);
const page_nav = $( '.variations-pagenav' );
if ( page_nav.is( ':hidden' ) ) {
$( 'option, optgroup', '.variation_actions' ).show();
$( '.variation_actions' ).val( 'bulk_actions' );
$( '#variable_product_options' ).find( '.toolbar' ).show();
page_nav.show();
$( '.pagination-links', page_nav ).hide();
}
if ( page_nav.is( ':hidden' ) ) {
$( 'option, optgroup', '.variation_actions' ).show();
$( '.variation_actions' ).val( 'bulk_actions' );
$( '#variable_product_options' ).find( '.toolbar' ).show();
page_nav.show();
$( '.pagination-links', page_nav ).hide();
}
},
File diff suppressed because one or more lines are too long
@@ -1,5 +1,11 @@
/*global woocommerce_admin_meta_boxes */
jQuery( function ( $ ) {
let isPageUnloading = false;
$( window ).on( 'beforeunload', function () {
isPageUnloading = true;
} );
// Scroll to first checked category
// https://github.com/scribu/wp-category-checklist-tree/blob/d1c3c1f449e1144542efa17dde84a9f52ade1739/category-checklist-tree.php
$( function () {
@@ -57,12 +63,6 @@ jQuery( function ( $ ) {
} );
} );
$( function () {
if ( ! woocommerce_admin_meta_boxes.has_local_attributes ) {
$( 'button.add_attribute' ).trigger( 'click' );
}
} );
// Catalog Visibility.
$( '#catalog-visibility' )
.find( '.edit-catalog-visibility' )
@@ -157,10 +157,22 @@ jQuery( function ( $ ) {
} )
.trigger( 'change' );
$( 'input#_downloadable, input#_virtual' ).on( 'change', function () {
$( 'input#_downloadable' ).on( 'change', function () {
show_and_hide_panels();
} );
$( 'input#_virtual' ).on( 'change', function () {
show_and_hide_panels();
// If user enables virtual while on shipping tab, switch to general tab.
if (
$( this ).is( ':checked' ) &&
$( '.shipping_options.shipping_tab' ).hasClass( 'active' )
) {
$( '.general_options.general_tab > a' ).trigger( 'click' );
}
} );
function change_product_type_tip( content ) {
$( '#tiptip_holder' ).removeAttr( 'style' );
$( '#tiptip_arrow' ).removeAttr( 'style' );
@@ -189,7 +201,7 @@ jQuery( function ( $ ) {
}
}
function show_and_hide_panels() {
function show_and_hide_controls( context ) {
var product_type = $( 'select#product-type' ).val();
var is_virtual = $( 'input#_virtual:checked' ).length;
var is_downloadable = $( 'input#_downloadable:checked' ).length;
@@ -198,41 +210,40 @@ jQuery( function ( $ ) {
var hide_classes = '.hide_if_downloadable, .hide_if_virtual';
var show_classes = '.show_if_downloadable, .show_if_virtual';
$.each( woocommerce_admin_meta_boxes.product_types, function (
index,
value
) {
hide_classes = hide_classes + ', .hide_if_' + value;
show_classes = show_classes + ', .show_if_' + value;
} );
$.each(
woocommerce_admin_meta_boxes.product_types,
function ( index, value ) {
hide_classes = hide_classes + ', .hide_if_' + value;
show_classes = show_classes + ', .show_if_' + value;
}
);
$( hide_classes ).show();
$( show_classes ).hide();
$( hide_classes, context ).show();
$( show_classes, context ).hide();
// Shows rules.
if ( is_downloadable ) {
$( '.show_if_downloadable' ).show();
$( '.show_if_downloadable', context ).show();
}
if ( is_virtual ) {
$( '.show_if_virtual' ).show();
// If user enables virtual while on shipping tab, switch to general tab.
if ( $( '.shipping_options.shipping_tab' ).hasClass( 'active' ) ) {
$( '.general_options.general_tab > a' ).trigger( 'click' );
}
$( '.show_if_virtual', context ).show();
}
$( '.show_if_' + product_type ).show();
$( '.show_if_' + product_type, context ).show();
// Hide rules.
if ( is_downloadable ) {
$( '.hide_if_downloadable' ).hide();
$( '.hide_if_downloadable', context ).hide();
}
if ( is_virtual ) {
$( '.hide_if_virtual' ).hide();
$( '.hide_if_virtual', context ).hide();
}
$( '.hide_if_' + product_type ).hide();
$( '.hide_if_' + product_type, context ).hide();
}
function show_and_hide_panels() {
show_and_hide_controls();
$( 'input#_manage_stock' ).trigger( 'change' );
@@ -244,12 +255,12 @@ jQuery( function ( $ ) {
return;
}
var $invisble = $children.filter( function () {
var $invisible = $children.filter( function () {
return 'none' === $( this ).css( 'display' );
} );
// Hide panel.
if ( $invisble.length === $children.length ) {
if ( $invisible.length === $children.length ) {
var $id = $( this ).prop( 'id' );
$( '.product_data_tabs' )
.find( 'li a[href="#' + $id + '"]' )
@@ -393,23 +404,36 @@ jQuery( function ( $ ) {
} );
} );
// Attribute Tables.
// Set up attributes, if current page has the attributes list.
const $product_attributes = $( '.product_attributes' );
if ( $product_attributes.length === 1 ) {
// When the attributes tab is shown, add an empty attribute to be filled out by the user.
$( '#product_attributes' ).on( 'woocommerce_tab_shown', function() {
remove_blank_custom_attribute_if_no_other_attributes();
// Initial order.
var woocommerce_attribute_items = $( '.product_attributes' )
.find( '.woocommerce_attribute' )
.get();
const woocommerce_attribute_items = $product_attributes.find( '.woocommerce_attribute' ).get();
woocommerce_attribute_items.sort( function ( a, b ) {
var compA = parseInt( $( a ).attr( 'rel' ), 10 );
var compB = parseInt( $( b ).attr( 'rel' ), 10 );
return compA < compB ? -1 : compA > compB ? 1 : 0;
} );
$( woocommerce_attribute_items ).each( function ( index, el ) {
$( '.product_attributes' ).append( el );
} );
// If the product has no attributes, add an empty attribute to be filled out by the user.
if ( woocommerce_attribute_items.length === 0 ) {
add_custom_attribute_to_list();
}
} );
function attribute_row_indexes() {
const woocommerce_attribute_items = $product_attributes.find( '.woocommerce_attribute' ).get();
// Sort the attributes by their position.
woocommerce_attribute_items.sort( function ( a, b ) {
var compA = parseInt( $( a ).attr( 'rel' ), 10 );
var compB = parseInt( $( b ).attr( 'rel' ), 10 );
return compA < compB ? -1 : compA > compB ? 1 : 0;
} );
$( woocommerce_attribute_items ).each( function ( index, el ) {
$product_attributes.append( el );
} );
}
function update_attribute_row_indexes() {
$( '.product_attributes .woocommerce_attribute' ).each( function (
index,
el
@@ -445,123 +469,165 @@ jQuery( function ( $ ) {
selectedAttributes
);
function toggle_add_global_attribute_layout() {
$( 'div.add-attribute-container' ).toggle();
$( 'div.add-global-attribute-container' ).toggle();
$( '#product_attributes > .toolbar-buttons' ).toggle();
function get_new_attribute_list_item_html(
indexInList,
globalAttributeId
) {
return new Promise( function ( resolve, reject ) {
$.post( {
url: woocommerce_admin_meta_boxes.ajax_url,
data: {
action: 'woocommerce_add_attribute',
product_type: $( '#product-type' ).val(),
taxonomy: globalAttributeId ? globalAttributeId : '',
i: indexInList,
security: woocommerce_admin_meta_boxes.add_attribute_nonce,
},
success: function ( newAttributeListItemHtml ) {
resolve( newAttributeListItemHtml );
},
error: function ( jqXHR, textStatus, errorThrown ) {
reject( { jqXHR, textStatus, errorThrown } );
},
} );
} );
}
function add_attribute( element, attribute ) {
var size = $( '.product_attributes .woocommerce_attribute' ).length;
var $wrapper = $( element ).closest( '#product_attributes' );
var $attributes = $wrapper.find( '.product_attributes' );
var product_type = $( 'select#product-type' ).val();
var data = {
action: 'woocommerce_add_attribute',
taxonomy: attribute,
i: size,
security: woocommerce_admin_meta_boxes.add_attribute_nonce,
};
function block_attributes_tab_container() {
const $attributesTabContainer = $( '#product_attributes' );
$wrapper.block( {
$attributesTabContainer.block( {
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6,
},
} );
}
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function (
response
) {
$attributes.append( response );
function unblock_attributes_tab_container() {
const $attributesTabContainer = $( '#product_attributes' );
$attributesTabContainer.unblock();
}
if ( 'variable' !== product_type ) {
$attributes.find( '.enable_variation' ).hide();
}
function toggle_expansion_of_attribute_list_item( $attributeListItem ) {
$attributeListItem.find( 'h3' ).trigger( 'click' );
}
$( document.body ).trigger( 'wc-enhanced-select-init' );
function init_select_controls() {
$( document.body ).trigger( 'wc-enhanced-select-init' );
}
attribute_row_indexes();
async function add_attribute_to_list( globalAttributeId ) {
try {
block_attributes_tab_container();
$attributes
.find( '.woocommerce_attribute' )
.last()
.find( 'h3' )
.trigger( 'click' );
const numberOfAttributesInList = $(
'.product_attributes .woocommerce_attribute'
).length;
const newAttributeListItemHtml =
await get_new_attribute_list_item_html(
numberOfAttributesInList,
globalAttributeId
);
$wrapper.unblock();
const $attributesListContainer = $(
'#product_attributes .product_attributes'
);
const $attributeListItem = $( newAttributeListItemHtml ).appendTo(
$attributesListContainer
);
show_and_hide_controls( $attributeListItem );
init_select_controls(); // make sure any new select controls in the new list item are initialized
update_attribute_row_indexes();
toggle_expansion_of_attribute_list_item( $attributeListItem );
$( document.body ).trigger( 'woocommerce_added_attribute' );
jQuery.maybe_disable_save_button();
} );
if ( attribute ) {
$( 'select.attribute_taxonomy' )
.find( 'option[value="' + attribute + '"]' )
.attr( 'disabled', 'disabled' );
$( 'select.attribute_taxonomy' ).val( '' );
jQuery.maybe_disable_save_button();
} catch ( error ) {
if ( isPageUnloading ) {
// If the page is unloading, the outstanding ajax fetch may fail in Firefox (and possible other browsers, too).
// We don't want to show an error message in this case, because it was caused by the user leaving the page.
return;
}
alert( woocommerce_admin_meta_boxes.i18n_add_attribute_error_notice );
throw error;
} finally {
unblock_attributes_tab_container();
}
}
function add_global_attribute_to_list( globalAttributeId ) {
add_attribute_to_list( globalAttributeId );
}
function add_custom_attribute_to_list() {
add_attribute_to_list();
}
function add_if_not_exists( arr, item ) {
return arr.includes( item ) ? attr : [ ...arr, item ];
}
function disable_in_attribute_search( selectedAttributes ) {
$( 'select.wc-attribute-search' ).data(
'disabled-items',
selectedAttributes
);
}
function remove_blank_custom_attribute_if_no_other_attributes() {
const $attributes = $( '.product_attributes .woocommerce_attribute' );
if ( $attributes.length === 1 ) {
const $attribute = $attributes.first();
const $attributeName = $attribute.find(
'input[name="attribute_names[0]"]'
);
const $attributeValue = $attribute.find(
'input[name="attribute_values[0]"]'
);
if ( ! $attributeName.val() && ! $attributeValue.val() ) {
$attribute.remove();
}
}
}
$( 'select.wc-attribute-search' ).on( 'select2:select', function ( e ) {
if ( e.params && e.params.data && e.params.data.id ) {
add_attribute( this, e.params.data.id );
if ( ! selectedAttributes.includes( e.params.data.id ) ) {
selectedAttributes.push( e.params.data.id );
$( 'select.wc-attribute-search' ).data(
'disabled-items',
selectedAttributes
);
}
window.wcTracks.recordEvent( 'product_attributes_buttons', {
action: 'add_existing',
} );
const attributeId = e && e.params && e.params.data && e.params.data.id;
if ( attributeId ) {
remove_blank_custom_attribute_if_no_other_attributes();
add_global_attribute_to_list( attributeId );
selectedAttributes = add_if_not_exists(
selectedAttributes,
attributeId
);
disable_in_attribute_search( selectedAttributes );
}
$( this ).val( null );
$( this ).trigger( 'change' );
if (
$( 'div.add-attribute-container' ).hasClass( 'hidden' ) &&
! $( 'div.add-global-attribute-container' ).hasClass( 'hidden' )
) {
toggle_add_global_attribute_layout();
}
return false;
} );
// Add rows.
$( 'button.add_attribute' ).on( 'click', function () {
var attribute = $( 'select.attribute_taxonomy' ).val();
if (
! attribute &&
$( 'select.attribute_taxonomy' ).hasClass( 'wc-attribute-search' )
) {
return;
}
add_attribute( this, attribute );
$( 'select.attribute_taxonomy' ).val( null );
$( 'select.attribute_taxonomy' ).trigger( 'change' );
// We record the event only when an existing attribute is added.
if ( attribute !== '' ) {
window.wcTracks.recordEvent( 'product_attributes_buttons', {
action: 'add_existing',
} );
}
return false;
} );
$( 'button.add_custom_attribute' ).on( 'click', function () {
add_attribute( this, '' );
add_custom_attribute_to_list();
if (
$( 'div.add-attribute-container' ).hasClass( 'hidden' ) &&
! $( 'div.add-global-attribute-container' ).hasClass( 'hidden' )
) {
toggle_add_global_attribute_layout();
}
return false;
} );
@@ -603,41 +669,43 @@ jQuery( function ( $ ) {
security: wc_enhanced_select_params.search_taxonomy_terms_nonce,
};
$.get( woocommerce_admin_meta_boxes.ajax_url, data, function (
response
) {
if ( response.errors ) {
// Error.
window.alert( response.errors );
} else if ( response && response.length > 0 ) {
// Success.
response.forEach( function ( term ) {
const currentItem = $wrapper.find(
'select.attribute_values option[value="' +
term.term_id +
'"]'
);
if ( currentItem && currentItem.length > 0 ) {
currentItem.prop( 'selected', 'selected' );
} else {
$wrapper
.find( 'select.attribute_values' )
.append(
'<option value="' +
term.term_id +
'" selected="selected">' +
term.name +
'</option>'
);
}
} );
$wrapper
.find( 'select.attribute_values' )
.trigger( 'change' );
}
$.get(
woocommerce_admin_meta_boxes.ajax_url,
data,
function ( response ) {
if ( response.errors ) {
// Error.
window.alert( response.errors );
} else if ( response && response.length > 0 ) {
// Success.
response.forEach( function ( term ) {
const currentItem = $wrapper.find(
'select.attribute_values option[value="' +
term.term_id +
'"]'
);
if ( currentItem && currentItem.length > 0 ) {
currentItem.prop( 'selected', 'selected' );
} else {
$wrapper
.find( 'select.attribute_values' )
.append(
'<option value="' +
term.term_id +
'" selected="selected">' +
term.name +
'</option>'
);
}
} );
$wrapper
.find( 'select.attribute_values' )
.trigger( 'change' );
}
$( '.product_attributes' ).unblock();
} );
$( '.product_attributes' ).unblock();
}
);
return false;
}
);
@@ -660,13 +728,16 @@ jQuery( function ( $ ) {
'.product_attributes .remove_row',
function () {
var $parent = $( this ).parent().parent();
var confirmMessage = $parent
var isUsedForVariations = $parent
.find( 'input[name^="attribute_variation"]' )
.is( ':checked' )
? woocommerce_admin_meta_boxes.i18n_remove_used_attribute_confirmation_message
: woocommerce_admin_meta_boxes.remove_attribute;
.is( ':visible:checked' );
if ( window.confirm( confirmMessage ) ) {
if (
! isUsedForVariations ||
window.confirm(
woocommerce_admin_meta_boxes.i18n_remove_used_attribute_confirmation_message
)
) {
if ( $parent.is( '.taxonomy' ) ) {
$parent.find( 'select, input[type=text]' ).val( '' );
$parent.hide();
@@ -685,7 +756,7 @@ jQuery( function ( $ ) {
} else {
$parent.find( 'select, input[type=text]' ).val( '' );
$parent.hide();
attribute_row_indexes();
update_attribute_row_indexes();
}
$parent.remove();
@@ -694,16 +765,6 @@ jQuery( function ( $ ) {
action: 'remove_attribute',
} );
if (
! $( '.woocommerce_attribute_data' ).is( ':visible' ) &&
! $( 'div.add-global-attribute-container' ).hasClass(
'hidden'
) &&
$( '.product_attributes' ).find( 'input, select, textarea' )
.length === 0
) {
toggle_add_global_attribute_layout();
}
jQuery.maybe_disable_save_button();
}
return false;
@@ -726,7 +787,7 @@ jQuery( function ( $ ) {
},
stop: function ( event, ui ) {
ui.item.removeAttr( 'style' );
attribute_row_indexes();
update_attribute_row_indexes();
},
} );
@@ -734,7 +795,10 @@ jQuery( function ( $ ) {
$( '.product_attributes' ).on(
'click',
'button.add_new_attribute',
function () {
function ( event ) {
// prevent form submission but allow event propagation
event.preventDefault();
$( '.product_attributes' ).block( {
message: null,
overlayCSS: {
@@ -757,35 +821,35 @@ jQuery( function ( $ ) {
security: woocommerce_admin_meta_boxes.add_attribute_nonce,
};
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function (
response
) {
if ( response.error ) {
// Error.
window.alert( response.error );
} else if ( response.slug ) {
// Success.
$wrapper
.find( 'select.attribute_values' )
.append(
'<option value="' +
response.term_id +
'" selected="selected">' +
response.name +
'</option>'
);
$wrapper
.find( 'select.attribute_values' )
.trigger( 'change' );
}
$.post(
woocommerce_admin_meta_boxes.ajax_url,
data,
function ( response ) {
if ( response.error ) {
// Error.
window.alert( response.error );
} else if ( response.slug ) {
// Success.
$wrapper
.find( 'select.attribute_values' )
.append(
'<option value="' +
response.term_id +
'" selected="selected">' +
response.name +
'</option>'
);
$wrapper
.find( 'select.attribute_values' )
.trigger( 'change' );
}
$( '.product_attributes' ).unblock();
} );
$( '.product_attributes' ).unblock();
}
);
} else {
$( '.product_attributes' ).unblock();
}
return false;
}
);
@@ -814,70 +878,76 @@ jQuery( function ( $ ) {
security: woocommerce_admin_meta_boxes.save_attributes_nonce,
};
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function (
response
) {
if ( response.error ) {
// Error.
window.alert( response.error );
} else if ( response.data ) {
// Success.
$( '.product_attributes' ).html( response.data.html );
$( '.product_attributes' ).unblock();
$.post(
woocommerce_admin_meta_boxes.ajax_url,
data,
function ( response ) {
if ( response.error ) {
// Error.
window.alert( response.error );
} else if ( response.data ) {
// Success.
$( '.product_attributes' ).html( response.data.html );
$( '.product_attributes' ).unblock();
// Hide the 'Used for variations' checkbox if not viewing a variable product
show_and_hide_panels();
// Hide the 'Used for variations' checkbox if not viewing a variable product
show_and_hide_panels();
// Make sure the dropdown is not disabled for empty value attributes.
$( 'select.attribute_taxonomy' )
.find( 'option' )
.prop( 'disabled', false );
// Make sure the dropdown is not disabled for empty value attributes.
$( 'select.attribute_taxonomy' )
.find( 'option' )
.prop( 'disabled', false );
var newSelectedAttributes = [];
$( '.product_attributes .woocommerce_attribute' ).each(
function ( index, el ) {
if (
$( el ).css( 'display' ) !== 'none' &&
$( el ).is( '.taxonomy' )
) {
newSelectedAttributes.push(
$( el ).data( 'taxonomy' )
);
$( 'select.attribute_taxonomy' )
.find(
'option[value="' +
$( el ).data( 'taxonomy' ) +
'"]'
)
.prop( 'disabled', true );
var newSelectedAttributes = [];
$( '.product_attributes .woocommerce_attribute' ).each(
function ( index, el ) {
if (
$( el ).css( 'display' ) !== 'none' &&
$( el ).is( '.taxonomy' )
) {
newSelectedAttributes.push(
$( el ).data( 'taxonomy' )
);
$( 'select.attribute_taxonomy' )
.find(
'option[value="' +
$( el ).data( 'taxonomy' ) +
'"]'
)
.prop( 'disabled', true );
}
}
}
);
selectedAttributes = newSelectedAttributes;
$( 'select.wc-attribute-search' ).data(
'disabled-items',
newSelectedAttributes
);
);
selectedAttributes = newSelectedAttributes;
$( 'select.wc-attribute-search' ).data(
'disabled-items',
newSelectedAttributes
);
// Reload variations panel.
var this_page = window.location.toString();
this_page = this_page.replace(
'post-new.php?',
'post.php?post=' +
woocommerce_admin_meta_boxes.post_id +
'&action=edit&'
);
// Reload variations panel.
var this_page = window.location.toString();
this_page = this_page.replace(
'post-new.php?',
'post.php?post=' +
woocommerce_admin_meta_boxes.post_id +
'&action=edit&'
);
$( '#variable_product_options' ).load(
this_page + ' #variable_product_options_inner',
function () {
$( '#variable_product_options' ).trigger( 'reload' );
}
);
$( '#variable_product_options' ).load(
this_page + ' #variable_product_options_inner',
function () {
$( '#variable_product_options' ).trigger(
'reload'
);
}
);
$( document.body ).trigger( 'woocommerce_attributes_saved' );
$( document.body ).trigger(
'woocommerce_attributes_saved'
);
}
}
} );
);
} );
// Go to attributes tab when clicking on link in variations message
@@ -1102,7 +1172,7 @@ jQuery( function ( $ ) {
// Add a descriptive tooltip to the product description editor
$( '#wp-content-media-buttons' )
.append( '<span class="woocommerce-help-tip" tabindex="-1"></span>' )
.append( '<span class="woocommerce-help-tip" tabindex="0"></span>' )
.find( '.woocommerce-help-tip' )
.attr( 'tabindex', '0' )
.attr( 'for', 'content' )
File diff suppressed because one or more lines are too long
@@ -126,7 +126,9 @@ jQuery( function ( $ ) {
$( 'ul.wc-tabs li', panel_wrap ).removeClass( 'active' );
$( this ).parent().addClass( 'active' );
$( 'div.panel', panel_wrap ).hide();
$( $( this ).attr( 'href' ) ).show();
$( $( this ).attr( 'href' ) ).show( 0, function () {
$( this ).trigger( 'woocommerce_tab_shown' );
} );
} );
$( 'div.panel-wrap' ).each( function () {
$( this )
@@ -1 +1 @@
jQuery(function(a){jQuery.is_attribute_or_variation_empty=function(e){var t=!1;return e.each(function(){var e=a(this);e.hasClass("checkbox")||e.filter("[class*=search__field]").length||(e.is("select")?0!==e.find(":selected").length:e.val())||(t=!0)}),t},jQuery.maybe_disable_save_button=function(){e=a(".woocommerce_variation_new_attribute_data").is(":visible")?(t=a(".woocommerce_variation_new_attribute_data"),a("button.create-variations")):(t=a(".product_attributes"),a("button.save_attributes"));var e,t=t.find("input, select, textarea");jQuery.is_attribute_or_variation_empty(t)?e.hasClass("disabled")||(e.addClass("disabled"),e.attr("aria-disabled",!0)):(e.removeClass("disabled"),e.removeAttr("aria-disabled"))},a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),a(".save_attributes").tipTip({content:function(){return a(".save_attributes").hasClass("disabled")?woocommerce_admin_meta_boxes.i18n_save_attribute_variation_tip:""},fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),a(".create-variations").tipTip({content:function(){return a(".create-variations").hasClass("disabled")?woocommerce_admin_meta_boxes.i18n_save_attribute_variation_tip:""},fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),a(".wc-metaboxes-wrapper").on("click",".wc-metabox > h3",function(){var e=a(this).parent(".wc-metabox");e.hasClass("closed")?e.removeClass("closed"):e.addClass("closed"),e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),a(document.body).on("wc-init-tabbed-panels",function(){a("ul.wc-tabs").show(),a("ul.wc-tabs a").on("click",function(e){e.preventDefault();e=a(this).closest("div.panel-wrap");a("ul.wc-tabs li",e).removeClass("active"),a(this).parent().addClass("active"),a("div.panel",e).hide(),a(a(this).attr("href")).show()}),a("div.panel-wrap").each(function(){a(this).find("ul.wc-tabs li").eq(0).find("a").trigger("click")})}).trigger("wc-init-tabbed-panels"),a(document.body).on("wc-init-datepickers",function(){a(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),a(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(e){a(e.target).filter(":input, option, .sort").length||a(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return a(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),a(".wc-metabox.closed").each(function(){a(this).find(".wc-metabox-content").hide()}),a("#product_attributes").on("change","select.attribute_values",jQuery.maybe_disable_save_button),a("#product_attributes, #variable_product_options").on("keyup","input, textarea",jQuery.maybe_disable_save_button),jQuery.maybe_disable_save_button()});
jQuery(function(e){jQuery.is_attribute_or_variation_empty=function(t){var a=!1;return t.each(function(){var t=e(this);t.hasClass("checkbox")||t.filter("[class*=search__field]").length||(t.is("select")?0===t.find(":selected").length:!t.val())&&(a=!0)}),a},jQuery.maybe_disable_save_button=function(){if(e(".woocommerce_variation_new_attribute_data").is(":visible"))t=e(".woocommerce_variation_new_attribute_data"),a=e("button.create-variations");else var t=e(".product_attributes"),a=e("button.save_attributes");var i=t.find("input, select, textarea");jQuery.is_attribute_or_variation_empty(i)?a.hasClass("disabled")||(a.addClass("disabled"),a.attr("aria-disabled",!0)):(a.removeClass("disabled"),a.removeAttr("aria-disabled"))},e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),e(".save_attributes").tipTip({content:function(){return e(".save_attributes").hasClass("disabled")?woocommerce_admin_meta_boxes.i18n_save_attribute_variation_tip:""},fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),e(".create-variations").tipTip({content:function(){return e(".create-variations").hasClass("disabled")?woocommerce_admin_meta_boxes.i18n_save_attribute_variation_tip:""},fadeIn:50,fadeOut:50,delay:200,keepAlive:!0}),e(".wc-metaboxes-wrapper").on("click",".wc-metabox > h3",function(){var t=e(this).parent(".wc-metabox");t.hasClass("closed")?t.removeClass("closed"):t.addClass("closed"),t.hasClass("open")?t.removeClass("open"):t.addClass("open")}),e(document.body).on("wc-init-tabbed-panels",function(){e("ul.wc-tabs").show(),e("ul.wc-tabs a").on("click",function(t){t.preventDefault();var a=e(this).closest("div.panel-wrap");e("ul.wc-tabs li",a).removeClass("active"),e(this).parent().addClass("active"),e("div.panel",a).hide(),e(e(this).attr("href")).show(0,function(){e(this).trigger("woocommerce_tab_shown")})}),e("div.panel-wrap").each(function(){e(this).find("ul.wc-tabs li").eq(0).find("a").trigger("click")})}).trigger("wc-init-tabbed-panels"),e(document.body).on("wc-init-datepickers",function(){e(".date-picker-field, .date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})}).trigger("wc-init-datepickers"),e(".wc-metaboxes-wrapper").on("click",".wc-metabox h3",function(t){e(t.target).filter(":input, option, .sort").length||e(this).next(".wc-metabox-content").stop().slideToggle()}).on("click",".expand_all",function(){return e(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").show(),!1}).on("click",".close_all",function(){return e(this).closest(".wc-metaboxes-wrapper").find(".wc-metabox > .wc-metabox-content").hide(),!1}),e(".wc-metabox.closed").each(function(){e(this).find(".wc-metabox-content").hide()}),e("#product_attributes").on("change","select.attribute_values",jQuery.maybe_disable_save_button),e("#product_attributes, #variable_product_options").on("keyup","input, textarea",jQuery.maybe_disable_save_button),jQuery.maybe_disable_save_button()});
@@ -1 +1 @@
!function(o,e){var t,n,s,r,a,c,d,m;"undefined"!=typeof woocommerce_network_orders&&(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("woocommerce-network-order-table-loading")),d=o(document.getElementById("woocommerce-network-order-table")),m=o(document.getElementById("woocommerce-network-orders-no-orders")),woocommerce_network_orders.sites.length?(o.each(woocommerce_network_orders.sites,function(r,e){n[r]=o.Deferred(),s.push(o.ajax({url:woocommerce_network_orders.order_endpoint,data:{_wpnonce:woocommerce_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));m.removeClass("is-active"),c.removeClass("is-active"),d.addClass("is-active")}else m.addClass("is-active"),c.removeClass("is-active"),d.removeClass("is-active")})):(c.removeClass("is-active"),d.removeClass("is-active"),m.addClass("is-active")))}(jQuery,_);
!function(e,o,r){if("undefined"!=typeof woocommerce_network_orders){var t=[],n=[],s=[],a=e(document.getElementById("network-orders-tbody")),d=o.template(e(document.getElementById("network-orders-row-template")).text()),c=e(document.getElementById("woocommerce-network-order-table-loading")),i=e(document.getElementById("woocommerce-network-order-table")),m=e(document.getElementById("woocommerce-network-orders-no-orders"));if(!woocommerce_network_orders.sites.length)return c.removeClass("is-active"),i.removeClass("is-active"),void m.addClass("is-active");e.each(woocommerce_network_orders.sites,function(o,r){n[o]=e.Deferred(),s.push(e.ajax({url:woocommerce_network_orders.order_endpoint,data:{_wpnonce:woocommerce_network_orders.nonce,network_orders:!0,blog_id:r},type:"GET"}).success(function(e){var r;for(r in e)t.push(e[r]);n[o].resolve()}).fail(function(){n[o].resolve()}))}),n.length>0&&e.when.apply(e,n).done(function(){var e,o;if(t.sort(function(e,o){var r,t;return(r=Date.parse(e.date_created_gmt))===(t=Date.parse(o.date_created_gmt))?0:r<t?1:-1}),t.length>0){for(e in t)o=t[e],a.append(d(o));m.removeClass("is-active"),c.removeClass("is-active"),i.addClass("is-active")}else m.addClass("is-active"),c.removeClass("is-active"),i.removeClass("is-active")})}}(jQuery,_);
@@ -1 +1 @@
jQuery(function(e){e(function(){var o=e("#postdivrich");o.length&&(o.addClass("postbox woocommerce-product-description"),o.prepend('<h2 class="postbox-header"><label>'+woocommerce_admin_product_editor.i18n_description+"</label></h2>"))})});
jQuery(function(o){o(function(){var e=o("#postdivrich");e.length&&(e.addClass("postbox woocommerce-product-description"),e.prepend('<h2 class="postbox-header"><label>'+woocommerce_admin_product_editor.i18n_description+"</label></h2>"))})});
@@ -1 +1 @@
jQuery(function(d){d("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),d("table.widefat tbody").sortable({items:"tr:not(.inline-edit-row)",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,helper:function(t,e){return e.each(function(){d(this).width(d(this).width())}),e},start:function(t,e){e.item.css("background-color","#ffffff"),e.item.children("td, th").css("border-bottom-width","0"),e.item.css("outline","1px solid #dfdfdf")},stop:function(t,e){e.item.removeAttr("style"),e.item.children("td,th").css("border-bottom-width","1px")},update:function(t,e){d("table.widefat tbody th, table.widefat tbody td").css("cursor","default"),d("table.widefat tbody").sortable("disable");var i=e.item.find(".check-column input").val(),o=e.item.prev().find(".check-column input").val(),n=e.item.next().find(".check-column input").val();e.item.find(".check-column input").hide().after('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),d.post(ajaxurl,{action:"woocommerce_product_ordering",id:i,previd:o,nextid:n},function(t){d.each(t,function(t,e){d("#inline_"+t+" .menu_order").html(e)}),e.item.find(".check-column input").show().siblings("img").remove(),d("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),d("table.widefat tbody").sortable("enable")}),d("table.widefat tbody tr").each(function(){d("table.widefat tbody tr").index(this)%2==0?d(this).addClass("alternate"):d(this).removeClass("alternate")})},sort:function(t,i){i.placeholder.find("td").each(function(t,e){i.helper.find("td").eq(t).is(":visible")?d(this).show():d(this).hide()})}})});
jQuery(function(t){t("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),t("table.widefat tbody").sortable({items:"tr:not(.inline-edit-row)",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,helper:function(e,i){return i.each(function(){t(this).width(t(this).width())}),i},start:function(t,e){e.item.css("background-color","#ffffff"),e.item.children("td, th").css("border-bottom-width","0"),e.item.css("outline","1px solid #dfdfdf")},stop:function(t,e){e.item.removeAttr("style"),e.item.children("td,th").css("border-bottom-width","1px")},update:function(e,i){t("table.widefat tbody th, table.widefat tbody td").css("cursor","default"),t("table.widefat tbody").sortable("disable");var o=i.item.find(".check-column input").val(),n=i.item.prev().find(".check-column input").val(),d=i.item.next().find(".check-column input").val();i.item.find(".check-column input").hide().after('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),t.post(ajaxurl,{action:"woocommerce_product_ordering",id:o,previd:n,nextid:d},function(e){t.each(e,function(e,i){t("#inline_"+e+" .menu_order").html(i)}),i.item.find(".check-column input").show().siblings("img").remove(),t("table.widefat tbody th, table.widefat tbody td").css("cursor","move"),t("table.widefat tbody").sortable("enable")}),t("table.widefat tbody tr").each(function(){t("table.widefat tbody tr").index(this)%2==0?t(this).addClass("alternate"):t(this).removeClass("alternate")})},sort:function(e,i){i.placeholder.find("td").each(function(e,o){i.helper.find("td").eq(e).is(":visible")?t(this).show():t(this).hide()})}})});
@@ -1 +1 @@
jQuery(function(g){g("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var e=(e=g(this).closest("tr").attr("id")).replace("post-",""),e=g("#woocommerce_inline_"+e),t=e.find(".sku").text(),i=e.find(".regular_price").text(),n=e.find(".sale_price ").text(),o=e.find(".weight").text(),d=e.find(".length").text(),s=e.find(".width").text(),l=e.find(".height").text(),c=e.find(".shipping_class").text(),a=e.find(".visibility").text(),r=e.find(".stock_status").text(),_=e.find(".stock").text(),p=e.find(".featured").text(),m=e.find(".manage_stock").text(),u=e.find(".menu_order").text(),f=e.find(".tax_status").text(),w=e.find(".tax_class").text(),h=e.find(".backorders").text(),k=e.find(".product_type").text(),i=i.replace(".",woocommerce_admin.mon_decimal_point),n=n.replace(".",woocommerce_admin.mon_decimal_point),t=(g('input[name="_sku"]',".inline-edit-row").val(t),g('input[name="_regular_price"]',".inline-edit-row").val(i),g('input[name="_sale_price"]',".inline-edit-row").val(n),g('input[name="_weight"]',".inline-edit-row").val(o),g('input[name="_length"]',".inline-edit-row").val(d),g('input[name="_width"]',".inline-edit-row").val(s),g('input[name="_height"]',".inline-edit-row").val(l),g('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).trigger("change"),g('select[name="_shipping_class"] option[value="'+c+'"]').attr("selected","selected").trigger("change"),g('input[name="_stock"]',".inline-edit-row").val(_),g('input[name="menu_order"]',".inline-edit-row").val(u),g('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').prop("selected",!1).removeAttr("selected"),"variable"===k),i=(g('select[name="_stock_status"] ~ .wc-quick-edit-warning',".inline-edit-row").toggle(t),g('select[name="_stock_status"] option[value="'+(t?"":r)+'"]',".inline-edit-row").attr("selected","selected"),g('select[name="_tax_status"] option[value="'+f+'"]',".inline-edit-row").attr("selected","selected"),g('select[name="_tax_class"] option[value="'+w+'"]',".inline-edit-row").attr("selected","selected"),g('select[name="_visibility"] option[value="'+a+'"]',".inline-edit-row").attr("selected","selected"),g('select[name="_backorders"] option[value="'+h+'"]',".inline-edit-row").attr("selected","selected"),"yes"===p?g('input[name="_featured"]',".inline-edit-row").prop("checked",!0):g('input[name="_featured"]',".inline-edit-row").prop("checked",!1),e.find(".product_is_virtual").text()),n="external"!==k,o="external"!==k&&"grouped"!==k;g(".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").show(),o?"yes"===m?(g(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),g(".stock_status_field").hide(),g(".manage_stock_field input").prop("checked",!0)):(g(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),g(".stock_status_field").show().removeAttr("style"),g(".manage_stock_field input").prop("checked",!1)):g(n?".stock_fields, .manage_stock_field, .backorder_field":".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").hide(),"simple"===k||"external"===k?g(".price_fields",".inline-edit-row").show().removeAttr("style"):g(".price_fields",".inline-edit-row").hide(),"yes"===i?g(".dimension_fields",".inline-edit-row").hide():g(".dimension_fields",".inline-edit-row").show().removeAttr("style"),g('input[name="comment_status"]').parent().find(".checkbox-title").text(woocommerce_quick_edit.strings.allow_reviews)}),g("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){g(this).is(":checked")?(g(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),g(".stock_status_field").hide()):(g(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),g(".stock_status_field").show().removeAttr("style"))}),g("#wpbody").on("click","#doaction, #doaction2",function(){g("input.text",".inline-edit-row").val(""),g("#woocommerce-fields").find("select").prop("selectedIndex",0),g("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide()}),g("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<g(this).val()?g(this).closest("div").find(".change-input").show():g(this).closest("div").find(".change-input").hide()}),g("#wpbody").on("click",".trash-product",function(){return window.confirm(woocommerce_admin.i18n_delete_product_notice)})});
jQuery(function(e){e("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var i=e("#woocommerce_inline_"+t),n=i.find(".sku").text(),o=i.find(".regular_price").text(),d=i.find(".sale_price ").text(),s=i.find(".weight").text(),l=i.find(".length").text(),c=i.find(".width").text(),a=i.find(".height").text(),r=i.find(".shipping_class").text(),_=i.find(".visibility").text(),p=i.find(".stock_status").text(),m=i.find(".stock").text(),u=i.find(".featured").text(),f=i.find(".manage_stock").text(),w=i.find(".menu_order").text(),h=i.find(".tax_status").text(),k=i.find(".tax_class").text(),g=i.find(".backorders").text(),v=i.find(".product_type").text(),x=o.replace(".",woocommerce_admin.mon_decimal_point),y=d.replace(".",woocommerce_admin.mon_decimal_point);e('input[name="_sku"]',".inline-edit-row").val(n),e('input[name="_regular_price"]',".inline-edit-row").val(x),e('input[name="_sale_price"]',".inline-edit-row").val(y),e('input[name="_weight"]',".inline-edit-row").val(s),e('input[name="_length"]',".inline-edit-row").val(l),e('input[name="_width"]',".inline-edit-row").val(c),e('input[name="_height"]',".inline-edit-row").val(a),e('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).trigger("change"),e('select[name="_shipping_class"] option[value="'+r+'"]').attr("selected","selected").trigger("change"),e('input[name="_stock"]',".inline-edit-row").val(m),e('input[name="menu_order"]',".inline-edit-row").val(w),e('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').prop("selected",!1).removeAttr("selected");var b="variable"===v;e('select[name="_stock_status"] ~ .wc-quick-edit-warning',".inline-edit-row").toggle(b),e('select[name="_stock_status"] option[value="'+(b?"":p)+'"]',".inline-edit-row").attr("selected","selected"),e('select[name="_tax_status"] option[value="'+h+'"]',".inline-edit-row").attr("selected","selected"),e('select[name="_tax_class"] option[value="'+k+'"]',".inline-edit-row").attr("selected","selected"),e('select[name="_visibility"] option[value="'+_+'"]',".inline-edit-row").attr("selected","selected"),e('select[name="_backorders"] option[value="'+g+'"]',".inline-edit-row").attr("selected","selected"),"yes"===u?e('input[name="_featured"]',".inline-edit-row").prop("checked",!0):e('input[name="_featured"]',".inline-edit-row").prop("checked",!1);var A=i.find(".product_is_virtual").text(),q="external"!==v,j="external"!==v&&"grouped"!==v;e(".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").show(),j?"yes"===f?(e(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),e(".stock_status_field").hide(),e(".manage_stock_field input").prop("checked",!0)):(e(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),e(".stock_status_field").show().removeAttr("style"),e(".manage_stock_field input").prop("checked",!1)):q?e(".stock_fields, .manage_stock_field, .backorder_field").hide():e(".stock_fields, .manage_stock_field, .stock_status_field, .backorder_field").hide(),"simple"===v||"external"===v?e(".price_fields",".inline-edit-row").show().removeAttr("style"):e(".price_fields",".inline-edit-row").hide(),"yes"===A?e(".dimension_fields",".inline-edit-row").hide():e(".dimension_fields",".inline-edit-row").show().removeAttr("style"),e('input[name="comment_status"]').parent().find(".checkbox-title").text(woocommerce_quick_edit.strings.allow_reviews)}),e("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){e(this).is(":checked")?(e(".stock_qty_field, .backorder_field",".inline-edit-row").show().removeAttr("style"),e(".stock_status_field").hide()):(e(".stock_qty_field, .backorder_field",".inline-edit-row").hide(),e(".stock_status_field").show().removeAttr("style"))}),e("#wpbody").on("click","#doaction, #doaction2",function(){e("input.text",".inline-edit-row").val(""),e("#woocommerce-fields").find("select").prop("selectedIndex",0),e("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide()}),e("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<e(this).val()?e(this).closest("div").find(".change-input").show():e(this).closest("div").find(".change-input").hide()}),e("#wpbody").on("click",".trash-product",function(){return window.confirm(woocommerce_admin.i18n_delete_product_notice)})});
@@ -1 +1 @@
jQuery(function(p){function r(t,e,a){p('<div class="chart-tooltip">'+a+"</div>").css({top:e-16,left:t+20}).appendTo("body").fadeIn(200)}var o=null,s=null,a=(p(".chart-placeholder").on("plothover",function(t,e,a){var n,i;a?o===a.dataIndex&&s===a.seriesIndex||(o=a.dataIndex,s=a.seriesIndex,p(".chart-tooltip").remove(),(a.series.points.show||a.series.enable_tooltip)&&(n=a.series.data[a.dataIndex][1],i="",a.series.prepend_label&&(i=i+a.series.label+": "),a.series.prepend_tooltip&&(i+=a.series.prepend_tooltip),i+=n,a.series.append_tooltip&&(i+=a.series.append_tooltip),a.series.pie.show?r(e.pageX,e.pageY,i):r(a.pageX,a.pageY,i))):(p(".chart-tooltip").remove(),o=null)}),p(".wc_sparkline.bars").each(function(){var t=[{data:p(this).data("sparkline"),color:p(this).data("color"),bars:{fillColor:p(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:p(this).data("barwidth"),align:"center"},shadowSize:0}];p.plot(p(this),t,{grid:{show:!1}})}),p(".wc_sparkline.lines").each(function(){var t=[{data:p(this).data("sparkline"),color:p(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];p.plot(p(this),t,{grid:{show:!1}})}),p(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-20Y",maxDate:"+1D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(){var t=p(this).is(".from")?"minDate":"maxDate",e=p(this).datepicker("getDate");a.not(this).datepicker("option",t,e)}}));"undefined"==typeof document.createElement("a").download&&p(".export_csv").hide(),p(".export_csv").on("click",function(){var t,e,a=p(this).data("exclude_series")||"",n=(a=(a=a.toString()).split(","),p(this).data("xaxes")),r=p(this).data("groupby"),o=p(this).data("index_type"),i=p(this).data("export"),s="";if("table"===i)p(this).offsetParent().find("thead tr,tbody tr").each(function(){p(this).find("th, td").each(function(){var t=(t=p(this).text()).replace("[?]","").replace("#","");s+='"'+t+'",'}),s=s.substring(0,s.length-1),s+="\n"}),p(this).offsetParent().find("tfoot tr").each(function(){p(this).find("th, td").each(function(){var t=(t=p(this).text()).replace("[?]","").replace("#","");if(s+='"'+t+'",',0<p(this).attr("colspan"))for(c=1;c<p(this).attr("colspan");c++)s+='"",'}),s=s.substring(0,s.length-1),s+="\n"});else{if(!window.main_chart)return!1;var i=window.main_chart.getData(),l=[];for(s+='"'+n+'",',p.each(i,function(t,e){a&&-1!==p.inArray(t.toString(),a)||l.push(e)}),d=0;d<l.length;++d)s+='"'+l[d].label+'",';s=s.substring(0,s.length-1),s+="\n";for(var h={},d=0;d<l.length;++d)for(t=l[d].data,e=0;e<t.length;++e){h[t[e][0]]=[];for(var c=0;c<l.length;++c)h[t[e][0]].push(0)}for(d=0;d<l.length;++d)for(t=l[d].data,e=0;e<t.length;++e)h[t[e][0]][d]=t[e][1];p.each(h,function(t,e){var a=new Date(parseInt(t,10));s+="none"===o?'"'+t+'",':"day"===r?'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+"-"+a.getUTCDate()+'",':'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+'",';for(var n=0;n<e.length;++n){var i=e[n];Math.round(i)!==i&&(i=(i=parseFloat(i)).toFixed(2)),s+='"'+i+'",'}s=s.substring(0,s.length-1),s+="\n"})}return s="data:text/csv;charset=utf-8,\ufeff"+encodeURIComponent(s),p(this).attr("href",s),!0})});
jQuery(function(t){function e(e,a,n){t('<div class="chart-tooltip">'+n+"</div>").css({top:a-16,left:e+20}).appendTo("body").fadeIn(200)}var a=null,n=null;t(".chart-placeholder").on("plothover",function(i,r,o){if(o){if((a!==o.dataIndex||n!==o.seriesIndex)&&(a=o.dataIndex,n=o.seriesIndex,t(".chart-tooltip").remove(),o.series.points.show||o.series.enable_tooltip)){var s=o.series.data[o.dataIndex][1],l="";o.series.prepend_label&&(l=l+o.series.label+": "),o.series.prepend_tooltip&&(l+=o.series.prepend_tooltip),l+=s,o.series.append_tooltip&&(l+=o.series.append_tooltip),o.series.pie.show?e(r.pageX,r.pageY,l):e(o.pageX,o.pageY,l)}}else t(".chart-tooltip").remove(),a=null}),t(".wc_sparkline.bars").each(function(){var e=[{data:t(this).data("sparkline"),color:t(this).data("color"),bars:{fillColor:t(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:t(this).data("barwidth"),align:"center"},shadowSize:0}];t.plot(t(this),e,{grid:{show:!1}})}),t(".wc_sparkline.lines").each(function(){var e=[{data:t(this).data("sparkline"),color:t(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];t.plot(t(this),e,{grid:{show:!1}})});var i=t(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-20Y",maxDate:"+1D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(){var e=t(this).is(".from")?"minDate":"maxDate",a=t(this).datepicker("getDate");i.not(this).datepicker("option",e,a)}});"undefined"==typeof document.createElement("a").download&&t(".export_csv").hide(),t(".export_csv").on("click",function(){var e=t(this).data("exclude_series")||"";e=(e=e.toString()).split(",");var a,n,i,r=t(this).data("xaxes"),o=t(this).data("groupby"),s=t(this).data("index_type"),l="";if("table"===t(this).data("export"))t(this).offsetParent().find("thead tr,tbody tr").each(function(){t(this).find("th, td").each(function(){var e=t(this).text();e=e.replace("[?]","").replace("#",""),l+='"'+e+'",'}),l=l.substring(0,l.length-1),l+="\n"}),t(this).offsetParent().find("tfoot tr").each(function(){t(this).find("th, td").each(function(){var e=t(this).text();if(e=e.replace("[?]","").replace("#",""),l+='"'+e+'",',t(this).attr("colspan")>0)for(p=1;p<t(this).attr("colspan");p++)l+='"",'}),l=l.substring(0,l.length-1),l+="\n"});else{if(!window.main_chart)return!1;var h=window.main_chart.getData(),d=[];for(l+='"'+r+'",',t.each(h,function(a,n){e&&-1!==t.inArray(a.toString(),e)||d.push(n)}),a=0;a<d.length;++a)l+='"'+d[a].label+'",';l=l.substring(0,l.length-1),l+="\n";var c={};for(a=0;a<d.length;++a)for(n=d[a].data,i=0;i<n.length;++i){c[n[i][0]]=[];for(var p=0;p<d.length;++p)c[n[i][0]].push(0)}for(a=0;a<d.length;++a)for(n=d[a].data,i=0;i<n.length;++i)c[n[i][0]][a]=n[i][1];t.each(c,function(t,e){var a=new Date(parseInt(t,10));l+="none"===s?'"'+t+'",':"day"===o?'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+"-"+a.getUTCDate()+'",':'"'+a.getUTCFullYear()+"-"+parseInt(a.getUTCMonth()+1,10)+'",';for(var n=0;n<e.length;++n){var i=e[n];Math.round(i)!==i&&(i=(i=parseFloat(i)).toFixed(2)),l+='"'+i+'",'}l=l.substring(0,l.length-1),l+="\n"})}return l="data:text/csv;charset=utf-8,\ufeff"+encodeURIComponent(l),t(this).attr("href",l),!0})});
@@ -18,7 +18,7 @@
$table = $( '.wc_tax_rates' ),
$tbody = $( '#rates' ),
$save_button = $( ':input[name="save"]' ),
$pagination = $( '#rates-pagination' ),
$pagination = $( '#rates-pagination, #rates-bottom-pagination' ),
$search_field = $( '#rates-search .wc-tax-rates-search-field' ),
$submit = $( '.submit .button-primary[type=submit]' ),
WCTaxTableModelConstructor = Backbone.Model.extend({
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(n,c,s){n(function(){n("select#woocommerce_allowed_countries").on("change",function(){"specific"===n(this).val()?(n(this).closest("tr").next("tr").hide(),n(this).closest("tr").next().next("tr").show()):("all_except"===n(this).val()?n(this).closest("tr").next("tr").show():n(this).closest("tr").next("tr").hide(),n(this).closest("tr").next().next("tr").hide())}).trigger("change"),n("select#woocommerce_ship_to_countries").on("change",function(){"specific"===n(this).val()?n(this).closest("tr").next("tr").show():n(this).closest("tr").next("tr").hide()}).trigger("change"),n("input#woocommerce_manage_stock").on("change",function(){n(this).is(":checked")?n(this).closest("tbody").find(".manage_stock_field").closest("tr").show():n(this).closest("tbody").find(".manage_stock_field").closest("tr").hide()}).trigger("change"),n(".colorpick").iris({change:function(t,e){n(this).parent().find(".colorpickpreview").css({backgroundColor:e.color.toString()})},hide:!0,border:!0}).on("click focus",function(t){t.stopPropagation(),n(".iris-picker").hide(),n(this).closest("td").find(".iris-picker").show(),n(this).data("originalValue",n(this).val())}).on("change",function(){n(this).is(".iris-error")&&(n(this).data("originalValue").match(/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)?n(this).val(n(this).data("originalValue")):n(this).val("")).trigger("change")}),n("body").on("click",function(){n(".iris-picker").hide()}),n(function(){var e=!1;let o=n(".wp-list-table .check-column");n("input, textarea, select, checkbox").on("change",function(t){o.length&&o.has(t.target)||e||(window.onbeforeunload=function(){return c.i18n_nav_warning},e=!0)}),n(".submit :input, input#search-submit").on("click",function(){window.onbeforeunload=""})}),n("table.wc_gateways tbody, table.wc_shipping tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(t,e){return e.children().each(function(){n(this).width(n(this).width())}),e.css("left","0"),e},start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style"),e.item.trigger("updateMoveButtons")}}),n(".woocommerce").on("click",".select_all",function(){return n(this).closest("td").find("select option").prop("selected",!0),n(this).closest("td").find("select").trigger("change"),!1}),n(".woocommerce").on("click",".select_none",function(){return n(this).closest("td").find("select option").prop("selected",!1),n(this).closest("td").find("select").trigger("change"),!1}),n(".wc-item-reorder-nav").find(".wc-move-up, .wc-move-down").on("click",function(){var t=n(this),e=t.closest("tr"),o=(t.trigger("focus"),t.is(".wc-move-up")),i=t.is(".wc-move-down");o?(o=e.prev("tr"))&&o.length&&(o.before(e),s.a11y.speak(c.i18n_moved_up)):i&&(o=e.next("tr"))&&o.length&&(o.after(e),s.a11y.speak(c.i18n_moved_down)),t.trigger("focus"),t.closest("table").trigger("updateMoveButtons")}),n(".wc-item-reorder-nav").closest("table").on("updateMoveButtons",function(){var t=n(this),e=n(this).find("tbody tr:last"),o=n(this).find("tbody tr:first");t.find(".wc-item-reorder-nav .wc-move-disabled").removeClass("wc-move-disabled").attr({tabindex:"0","aria-hidden":"false"}),o.find(".wc-item-reorder-nav .wc-move-up").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"}),e.find(".wc-item-reorder-nav .wc-move-down").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"})}),n(".wc-item-reorder-nav").closest("table").trigger("updateMoveButtons"),n(".submit button").on("click",function(){if("specific"===n("select#woocommerce_allowed_countries").val()&&!n('[name="woocommerce_specific_allowed_countries[]"]').val())return!!window.confirm(woocommerce_settings_params.i18n_no_specific_countries_selected)}),n("#settings-other-payment-methods").on("click",function(t){"undefined"==typeof window.wcTracks.recordEvent&&"undefined"==typeof window.wc.tracks.recordEvent||(window.wc.tracks.recordEvent||window.wcTracks.recordEvent)("settings_payments_recommendations_other_options",{available_payment_methods:n.map(n("td.wc_payment_gateways_wrapper tbody tr[data-gateway_id] "),function(t){return n(t).attr("data-gateway_id")})})})})}(jQuery,woocommerce_settings_params,wp);
!function(t,e,i){t(function(){t("select#woocommerce_allowed_countries").on("change",function(){"specific"===t(this).val()?(t(this).closest("tr").next("tr").hide(),t(this).closest("tr").next().next("tr").show()):"all_except"===t(this).val()?(t(this).closest("tr").next("tr").show(),t(this).closest("tr").next().next("tr").hide()):(t(this).closest("tr").next("tr").hide(),t(this).closest("tr").next().next("tr").hide())}).trigger("change"),t("select#woocommerce_ship_to_countries").on("change",function(){"specific"===t(this).val()?t(this).closest("tr").next("tr").show():t(this).closest("tr").next("tr").hide()}).trigger("change"),t("input#woocommerce_manage_stock").on("change",function(){t(this).is(":checked")?t(this).closest("tbody").find(".manage_stock_field").closest("tr").show():t(this).closest("tbody").find(".manage_stock_field").closest("tr").hide()}).trigger("change"),t(".colorpick").iris({change:function(e,i){t(this).parent().find(".colorpickpreview").css({backgroundColor:i.color.toString()})},hide:!0,border:!0}).on("click focus",function(e){e.stopPropagation(),t(".iris-picker").hide(),t(this).closest("td").find(".iris-picker").show(),t(this).data("originalValue",t(this).val())}).on("change",function(){t(this).is(".iris-error")&&(t(this).data("originalValue").match(/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)?t(this).val(t(this).data("originalValue")).trigger("change"):t(this).val("").trigger("change"))}),t("body").on("click",function(){t(".iris-picker").hide()}),t(function(){var i=!1;let o=t(".wp-list-table .check-column");t("input, textarea, select, checkbox").on("change",function(t){o.length&&o.has(t.target)||i||(window.onbeforeunload=function(){return e.i18n_nav_warning},i=!0)}),t(".submit :input, input#search-submit").on("click",function(){window.onbeforeunload=""})}),t("table.wc_gateways tbody, table.wc_shipping tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(e,i){return i.children().each(function(){t(this).width(t(this).width())}),i.css("left","0"),i},start:function(t,e){e.item.css("background-color","#f6f6f6")},stop:function(t,e){e.item.removeAttr("style"),e.item.trigger("updateMoveButtons")}}),t(".woocommerce").on("click",".select_all",function(){return t(this).closest("td").find("select option").prop("selected",!0),t(this).closest("td").find("select").trigger("change"),!1}),t(".woocommerce").on("click",".select_none",function(){return t(this).closest("td").find("select option").prop("selected",!1),t(this).closest("td").find("select").trigger("change"),!1}),t(".wc-item-reorder-nav").find(".wc-move-up, .wc-move-down").on("click",function(){var o=t(this),n=o.closest("tr");o.trigger("focus");var c=o.is(".wc-move-up"),s=o.is(".wc-move-down");if(c){var r=n.prev("tr");r&&r.length&&(r.before(n),i.a11y.speak(e.i18n_moved_up))}else if(s){var a=n.next("tr");a&&a.length&&(a.after(n),i.a11y.speak(e.i18n_moved_down))}o.trigger("focus"),o.closest("table").trigger("updateMoveButtons")}),t(".wc-item-reorder-nav").closest("table").on("updateMoveButtons",function(){var e=t(this),i=t(this).find("tbody tr:last"),o=t(this).find("tbody tr:first");e.find(".wc-item-reorder-nav .wc-move-disabled").removeClass("wc-move-disabled").attr({tabindex:"0","aria-hidden":"false"}),o.find(".wc-item-reorder-nav .wc-move-up").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"}),i.find(".wc-item-reorder-nav .wc-move-down").addClass("wc-move-disabled").attr({tabindex:"-1","aria-hidden":"true"})}),t(".wc-item-reorder-nav").closest("table").trigger("updateMoveButtons"),t(".submit button").on("click",function(){if("specific"===t("select#woocommerce_allowed_countries").val()&&!t('[name="woocommerce_specific_allowed_countries[]"]').val())return!!window.confirm(woocommerce_settings_params.i18n_no_specific_countries_selected)}),t("#settings-other-payment-methods").on("click",function(e){"undefined"==typeof window.wcTracks.recordEvent&&"undefined"==typeof window.wc.tracks.recordEvent||(window.wc.tracks.recordEvent||window.wcTracks.recordEvent)("settings_payments_recommendations_other_options",{available_payment_methods:t.map(t("td.wc_payment_gateways_wrapper tbody tr[data-gateway_id] "),function(e){return t(e).attr("data-gateway_id")})})})})}(jQuery,woocommerce_settings_params,wp);
@@ -1 +1 @@
jQuery(function(r){({init:function(){r(document.body).on("click","a.help_tip, a.woocommerce-help-tip, woocommerce-product-type-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("click","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.copySuccess).on("aftercopyfailure","#copy-for-support",this.copyFail).on("click","#download-for-support",this.downloadReport)},preventTipTipClick:function(){return!1},generateReport:function(){var n="";r(".wc_status_table thead, .wc_status_table tbody").each(function(){var t;r(this).is("thead")?(t=r(this).find("th:eq(0)").data("exportLabel")||r(this).text(),n=n+"\n### "+t.trim()+" ###\n\n"):r("tr",r(this)).each(function(){var o,t=(r(this).find("td:eq(0)").data("exportLabel")||r(this).find("td:eq(0)").text()).trim().replace(/(<([^>]+)>)/gi,""),e=r(this).find("td:eq(2)").clone(),e=(e.find(".private").remove(),e.find(".dashicons-yes").replaceWith("&#10004;"),e.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;"),e.text().trim()),i=e.split(", ");1<i.length&&(o="",r.each(i,function(t,e){o=o+e+"\n"}),e=o),n=n+""+t+": "+e+"\n"})});try{r("#debug-report").slideDown(),r("#debug-report").find("textarea").val("`"+n+"`").trigger("focus").trigger("select"),r(this).fadeOut()}catch(t){console.log(t)}return!1},copyReport:function(t){wcClearClipboard(),wcSetClipboard(r("#debug-report").find("textarea").val(),r(this)),t.preventDefault()},copySuccess:function(){r("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")},copyFail:function(){r(".copy-error").removeClass("hidden"),r("#debug-report").find("textarea").trigger("focus").trigger("select")},downloadReport:function(){var t=new Blob([r("#debug-report").find("textarea").val()],{type:"text/plain"}),e=window.location.hostname,o=(new Date).toISOString().slice(0,19).replace(/:/g,"-"),i=document.createElement("a");i.download="SystemStatusReport_"+e+"_"+o+".txt",i.href=window.URL.createObjectURL(t),i.textContent="Download ready",i.style="display:none",i.click(),i.remove()}}).init(),r(".wc_status_table").on("click",".run-tool .button",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.run_tool_confirmation)}),r("#log-viewer-select").on("click","h2 a.page-title-action",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});
jQuery(function(t){({init:function(){t(document.body).on("click","a.help_tip, a.woocommerce-help-tip, woocommerce-product-type-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("click","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.copySuccess).on("aftercopyfailure","#copy-for-support",this.copyFail).on("click","#download-for-support",this.downloadReport)},preventTipTipClick:function(){return!1},generateReport:function(){var e="";t(".wc_status_table thead, .wc_status_table tbody").each(function(){if(t(this).is("thead")){var o=t(this).find("th:eq(0)").data("exportLabel")||t(this).text();e=e+"\n### "+o.trim()+" ###\n\n"}else t("tr",t(this)).each(function(){var o=(t(this).find("td:eq(0)").data("exportLabel")||t(this).find("td:eq(0)").text()).trim().replace(/(<([^>]+)>)/gi,""),i=t(this).find("td:eq(2)").clone();i.find(".private").remove(),i.find(".dashicons-yes").replaceWith("&#10004;"),i.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;");var n=i.text().trim(),r=n.split(", ");if(r.length>1){var a="";t.each(r,function(t,e){a=a+e+"\n"}),n=a}e=e+""+o+": "+n+"\n"})});try{return t("#debug-report").slideDown(),t("#debug-report").find("textarea").val("`"+e+"`").trigger("focus").trigger("select"),t(this).fadeOut(),!1}catch(o){console.log(o)}return!1},copyReport:function(e){wcClearClipboard(),wcSetClipboard(t("#debug-report").find("textarea").val(),t(this)),e.preventDefault()},copySuccess:function(){t("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")},copyFail:function(){t(".copy-error").removeClass("hidden"),t("#debug-report").find("textarea").trigger("focus").trigger("select")},downloadReport:function(){var e=new Blob([t("#debug-report").find("textarea").val()],{type:"text/plain"}),o=window.location.hostname,i=(new Date).toISOString().slice(0,19).replace(/:/g,"-"),n=document.createElement("a");n.download="SystemStatusReport_"+o+"_"+i+".txt",n.href=window.URL.createObjectURL(e),n.textContent="Download ready",n.style="display:none",n.click(),n.remove()}}).init(),t(".wc_status_table").on("click",".run-tool .button",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.run_tool_confirmation)}),t("#log-viewer-select").on("click","h2 a.page-title-action",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});
@@ -1 +1 @@
jQuery(function(c){var l="table.wp-list-table",s='.column-handle input[name="term_id"]',i='<td class="column-handle"></td>';0===c(l).find(".column-handle").length&&(c(l).find("tr:not(.inline-edit-row)").append(i),s=".check-column input"),window.wcTracks=window.wcTracks||{},window.wcTracks.recordEvent=window.wcTracks.recordEvent||function(){},c(l).find(".column-handle").show(),c.wc_add_missing_sort_handles=function(){var e=c(l).find("tbody > tr"),n=c(l).find("tbody > tr > td.column-handle").parent();e.length!==n.length&&e.each(function(e,t){n.is(t)||c(t).append(i)}),c(l).find(".column-handle").show()},c(document).ajaxComplete(function(e,t,n){t&&4===t.readyState&&200===t.status&&n.data&&(0<=n.data.indexOf("_inline_edit")||0<=n.data.indexOf("add-tag"))&&(c.wc_add_missing_sort_handles(),c(document.body).trigger("init_tooltips"))}),c(l).sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",handle:".column-handle",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(e,t){t.item.hasClass("alternate")||t.item.css("background-color","#ffffff"),t.item.children("td, th").css("border-bottom-width","0"),t.item.css("outline","1px solid #aaa")},stop:function(e,t){t.item.removeAttr("style"),t.item.children("td, th").css("border-bottom-width","1px")},update:function(e,t){var n,i,d=t.item.find(s).val(),o=t.item.find(".parent").html(),a=t.item.prev().find(s).val(),r=t.item.next().find(s).val();a!==undefined&&(n=t.item.prev().find(".parent").html())!==o&&(a=undefined),r!==undefined&&(i=t.item.next().find(".parent").html())!==o&&(r=undefined),a===undefined&&r===undefined||r===undefined&&i===a||r!==undefined&&n===d?c(l).sortable("cancel"):(window.wcTracks.recordEvent("product_attributes_ordering_term",{is_category:"product_cat"===woocommerce_term_ordering_params.taxonomy?"yes":"no"}),t.item.find(".check-column input").hide(),t.item.find(".check-column").append('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),c.post(ajaxurl,{action:"woocommerce_term_ordering",id:d,nextid:r,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(e){"children"===e?window.location.reload():(t.item.find(".check-column input").show(),t.item.find(".check-column").find("img").remove())}),c("table.widefat tbody tr").each(function(){jQuery("table.widefat tbody tr").index(this)%2==0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});
jQuery(function(e){var t="table.wp-list-table",n='.column-handle input[name="term_id"]';0===e(t).find(".column-handle").length&&(e(t).find("tr:not(.inline-edit-row)").append('<td class="column-handle"></td>'),n=".check-column input"),window.wcTracks=window.wcTracks||{},window.wcTracks.recordEvent=window.wcTracks.recordEvent||function(){},e(t).find(".column-handle").show(),e.wc_add_missing_sort_handles=function(){var n=e(t).find("tbody > tr"),i=e(t).find("tbody > tr > td.column-handle").parent();n.length!==i.length&&n.each(function(t,n){i.is(n)||e(n).append('<td class="column-handle"></td>')}),e(t).find(".column-handle").show()},e(document).ajaxComplete(function(t,n,i){n&&4===n.readyState&&200===n.status&&i.data&&(0<=i.data.indexOf("_inline_edit")||0<=i.data.indexOf("add-tag"))&&(e.wc_add_missing_sort_handles(),e(document.body).trigger("init_tooltips"))}),e(t).sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",handle:".column-handle",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(e,t){t.item.hasClass("alternate")||t.item.css("background-color","#ffffff"),t.item.children("td, th").css("border-bottom-width","0"),t.item.css("outline","1px solid #aaa")},stop:function(e,t){t.item.removeAttr("style"),t.item.children("td, th").css("border-bottom-width","1px")},update:function(i,d){var o,a,r=d.item.find(n).val(),c=d.item.find(".parent").html(),l=d.item.prev().find(n).val(),s=d.item.next().find(n).val();l!==undefined&&(o=d.item.prev().find(".parent").html())!==c&&(l=undefined),s!==undefined&&(a=d.item.next().find(".parent").html())!==c&&(s=undefined),l===undefined&&s===undefined||s===undefined&&a===l||s!==undefined&&o===r?e(t).sortable("cancel"):(window.wcTracks.recordEvent("product_attributes_ordering_term",{is_category:"product_cat"===woocommerce_term_ordering_params.taxonomy?"yes":"no"}),d.item.find(".check-column input").hide(),d.item.find(".check-column").append('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),e.post(ajaxurl,{action:"woocommerce_term_ordering",id:r,nextid:s,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(e){"children"===e?window.location.reload():(d.item.find(".check-column input").show(),d.item.find(".check-column").find("img").remove())}),e("table.widefat tbody tr").each(function(){jQuery("table.widefat tbody tr").index(this)%2==0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});
@@ -1 +1 @@
jQuery(function(u){var h={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=JSON.parse(wc_users_params.countries.replace(/&quot;/g,'"'))),u(".js_field-country").selectWoo().on("change",this.change_country),u(".js_field-country").trigger("change",[!0]),u(document.body).on("change","select.js_field-state",this.change_state),u(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(e,t){var a,n,o,i,c,s,l,r,p,d;void 0===t&&(t=!1),null!==h.states&&(n=(a=u(this)).val(),i=(o=a.parents(".form-table").find(":input.js_field-state")).parent(),c=o.attr("name"),s=o.attr("id"),l=a.data(l="woocommerce.stickState-"+n)?a.data(l):o.val(),r=o.attr("placeholder"),t&&a.data("woocommerce.stickState-"+n,l),i.show().find(".select2-container").remove(),u.isEmptyObject(h.states[n])?(d=u('<input type="text" />').prop("id",s).prop("name",c).prop("placeholder",r).addClass("js_field-state regular-text").val(l),o.replaceWith(d)):(p=h.states[n],t=u('<option value=""></option>').text(h.i18n_select_state_text),d=u('<select style="width: 25em;"></select>').prop("id",s).prop("name",c).prop("placeholder",r).addClass("js_field-state").append(t),u.each(p,function(e){e=u("<option></option>").prop("value",e).text(p[e]);d.append(e)}),d.val(l),o.replaceWith(d),d.show().selectWoo().hide().trigger("change")),u(document.body).trigger("contry-change.woocommerce",[n,u(this).closest("div")]),u(document.body).trigger("country-change.woocommerce",[n,u(this).closest("div")]))},change_state:function(){var e=u(this),t=e.val(),e=e.parents(".form-table").find(":input.js_field-country"),a=e.val();e.data("woocommerce.stickState-"+a,t)},copy_billing:function(e){e.preventDefault(),u("#fieldset-billing").find("input, select").each(function(e,t){var a=t.name.replace(/^billing_/,"shipping_"),a=u('[name="'+a+'"]');a.length&&a.val(t.value).trigger("change")})}};h.init()});
jQuery(function(e){var t={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=JSON.parse(wc_users_params.countries.replace(/&quot;/g,'"'))),e(".js_field-country").selectWoo().on("change",this.change_country),e(".js_field-country").trigger("change",[!0]),e(document.body).on("change","select.js_field-state",this.change_state),e(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(a,n){if(void 0===n&&(n=!1),null!==t.states){var o,i=e(this),c=i.val(),s=i.parents(".form-table").find(":input.js_field-state"),r=s.parent(),l=s.attr("name"),p=s.attr("id"),d="woocommerce.stickState-"+c,u=i.data(d)?i.data(d):s.val(),h=s.attr("placeholder");if(n&&i.data("woocommerce.stickState-"+c,u),r.show().find(".select2-container").remove(),e.isEmptyObject(t.states[c]))o=e('<input type="text" />').prop("id",p).prop("name",l).prop("placeholder",h).addClass("js_field-state regular-text").val(u),s.replaceWith(o);else{var g=t.states[c],f=e('<option value=""></option>').text(t.i18n_select_state_text);o=e('<select style="width: 25em;"></select>').prop("id",p).prop("name",l).prop("placeholder",h).addClass("js_field-state").append(f),e.each(g,function(t){var a=e("<option></option>").prop("value",t).text(g[t]);o.append(a)}),o.val(u),s.replaceWith(o),o.show().selectWoo().hide().trigger("change")}e(document.body).trigger("contry-change.woocommerce",[c,e(this).closest("div")]),e(document.body).trigger("country-change.woocommerce",[c,e(this).closest("div")])}},change_state:function(){var t=e(this),a=t.val(),n=t.parents(".form-table").find(":input.js_field-country"),o=n.val();n.data("woocommerce.stickState-"+o,a)},copy_billing:function(t){t.preventDefault(),e("#fieldset-billing").find("input, select").each(function(t,a){var n=a.name.replace(/^billing_/,"shipping_"),o=e('[name="'+n+'"]');o.length&&o.val(a.value).trigger("change")})}};t.init()});
@@ -312,7 +312,7 @@ jQuery( function( $ ) {
var select2_args = $.extend( {
allowClear : $( this ).data( 'allow_clear' ) ? true : false,
placeholder : $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ?? '3',
minimumInputLength: $( this ).data( 'minimum_input_length' ) !== null && $( this ).data( 'minimum_input_length' ) !== undefined ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup : function( m ) {
return m;
},
@@ -356,7 +356,7 @@ jQuery( function( $ ) {
var select2_args = $.extend( {
allowClear : $( this ).data( 'allow_clear' ) ? true : false,
placeholder : $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ?? '3',
minimumInputLength: $( this ).data( 'minimum_input_length' ) !== null && $( this ).data( 'minimum_input_length' ) !== undefined ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup : function( m ) {
return m;
},
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(o){if("undefined"==typeof wc_orders_params)return!1;var e=function(){o(document).on("click",".post-type-shop_order .wp-list-table tbody td, .woocommerce_page_wc-orders .wp-list-table.orders tbody td",this.onRowClick).on("click",".order-preview:not(.disabled)",this.onPreview)};e.prototype.onRowClick=function(e){var t;return!!o(e.target).filter("a, a *, .no-link, .no-link *, button, button *").length||(!(!window.getSelection||!window.getSelection().toString().length)||void((t=o(this).closest("tr").find("a.order-view").attr("href"))&&t.length&&(e.preventDefault(),e.metaKey||e.ctrlKey?window.open(t,"_blank"):window.location=t)))},e.prototype.onPreview=function(){var t=o(this),e=t.data("orderId");return t.data("order-data")?o(this).WCBackboneModal({template:"wc-modal-view-order",variable:t.data("orderData")}):(t.addClass("disabled"),o.ajax({url:wc_orders_params.ajax_url,data:{order_id:e,action:"woocommerce_get_order_details",security:wc_orders_params.preview_nonce},type:"GET",success:function(e){o(".order-preview").removeClass("disabled"),e.success&&(t.data("orderData",e.data),o(this).WCBackboneModal({template:"wc-modal-view-order",variable:e.data}))}})),!1},new e});
jQuery(function(e){if("undefined"==typeof wc_orders_params)return!1;var t=function(){e(document).on("click",".post-type-shop_order .wp-list-table tbody td, .woocommerce_page_wc-orders .wp-list-table.orders tbody td",this.onRowClick).on("click",".order-preview:not(.disabled)",this.onPreview)};t.prototype.onRowClick=function(t){if(e(t.target).filter("a, a *, .no-link, .no-link *, button, button *").length)return!0;if(window.getSelection&&window.getSelection().toString().length)return!0;var r=e(this).closest("tr").find("a.order-view").attr("href");r&&r.length&&(t.preventDefault(),t.metaKey||t.ctrlKey?window.open(r,"_blank"):window.location=r)},t.prototype.onPreview=function(){var t=e(this),r=t.data("orderId");return t.data("order-data")?e(this).WCBackboneModal({template:"wc-modal-view-order",variable:t.data("orderData")}):(t.addClass("disabled"),e.ajax({url:wc_orders_params.ajax_url,data:{order_id:r,action:"woocommerce_get_order_details",security:wc_orders_params.preview_nonce},type:"GET",success:function(r){e(".order-preview").removeClass("disabled"),r.success&&(t.data("orderData",r.data),e(this).WCBackboneModal({template:"wc-modal-view-order",variable:r.data}))}})),!1},new t});
@@ -1 +1 @@
!function(n,i){var o=function(o){this.$form=o,this.xhr=!1,this.$form.find(".woocommerce-exporter-progress").val(0),this.processStep=this.processStep.bind(this),o.on("submit",{productExportForm:this},this.onSubmit),o.find(".woocommerce-exporter-types").on("change",{productExportForm:this},this.exportTypeFields)};o.prototype.onSubmit=function(o){o.preventDefault();var e=new Date,e="wc-product-export-"+e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getFullYear()+"-"+e.getTime()+".csv";o.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),o.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),o.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),o.data.productExportForm.processStep(1,n(this).serialize(),"",e)},o.prototype.processStep=function(o,e,r,t){var c=this,p=n(".woocommerce-exporter-columns").val(),a=n("#woocommerce-exporter-meta:checked").length?1:0,s=n(".woocommerce-exporter-types").val(),m=n(".woocommerce-exporter-category").val();n.ajax({type:"POST",url:ajaxurl,data:{form:e,action:"woocommerce_do_ajax_product_export",step:o,columns:r,selected_columns:p,export_meta:a,export_types:s,export_category:m,filename:t,security:wc_product_export_params.export_nonce},dataType:"json",success:function(o){o.success&&("done"===o.data.step?(c.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),i.location=o.data.url,setTimeout(function(){c.$form.removeClass("woocommerce-exporter__exporting"),c.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(c.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),c.processStep(parseInt(o.data.step,10),e,o.data.columns,t)))}}).fail(function(o){i.console.log(o)})},o.prototype.exportTypeFields=function(){var o=n(".woocommerce-exporter-category");-1!==n.inArray("variation",n(this).val())?(o.closest("tr").hide(),o.val("").trigger("change")):o.closest("tr").show()},n.fn.wc_product_export_form=function(){return new o(this),this},n(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);
!function(o,e){var r=function(o){this.$form=o,this.xhr=!1,this.$form.find(".woocommerce-exporter-progress").val(0),this.processStep=this.processStep.bind(this),o.on("submit",{productExportForm:this},this.onSubmit),o.find(".woocommerce-exporter-types").on("change",{productExportForm:this},this.exportTypeFields)};r.prototype.onSubmit=function(e){e.preventDefault();var r=new Date,t="wc-product-export-"+r.getDate()+"-"+(r.getMonth()+1)+"-"+r.getFullYear()+"-"+r.getTime()+".csv";e.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),e.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),e.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),e.data.productExportForm.processStep(1,o(this).serialize(),"",t)},r.prototype.processStep=function(r,t,c,p){var a=this,s=o(".woocommerce-exporter-columns").val(),m=o("#woocommerce-exporter-meta:checked").length?1:0,n=o(".woocommerce-exporter-types").val(),i=o(".woocommerce-exporter-category").val();o.ajax({type:"POST",url:ajaxurl,data:{form:t,action:"woocommerce_do_ajax_product_export",step:r,columns:c,selected_columns:s,export_meta:m,export_types:n,export_category:i,filename:p,security:wc_product_export_params.export_nonce},dataType:"json",success:function(o){o.success&&("done"===o.data.step?(a.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),e.location=o.data.url,setTimeout(function(){a.$form.removeClass("woocommerce-exporter__exporting"),a.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(a.$form.find(".woocommerce-exporter-progress").val(o.data.percentage),a.processStep(parseInt(o.data.step,10),t,o.data.columns,p)))}}).fail(function(o){e.console.log(o)})},r.prototype.exportTypeFields=function(){var e=o(".woocommerce-exporter-category");-1!==o.inArray("variation",o(this).val())?(e.closest("tr").hide(),e.val("").trigger("change")):e.closest("tr").show()},o.fn.wc_product_export_form=function(){return new r(this),this},o(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);
@@ -17,6 +17,7 @@
// Number of import successes/failures.
this.imported = 0;
this.imported_variations = 0;
this.failed = 0;
this.updated = 0;
this.skipped = 0;
@@ -54,6 +55,7 @@
if ( response.success ) {
$this.position = response.data.position;
$this.imported += response.data.imported;
$this.imported_variations += response.data.imported_variations;
$this.failed += response.data.failed;
$this.updated += response.data.updated;
$this.skipped += response.data.skipped;
@@ -64,6 +66,8 @@
window.location = response.data.url +
'&products-imported=' +
parseInt( $this.imported, 10 ) +
'&products-imported-variations=' +
parseInt( $this.imported_variations, 10 ) +
'&products-failed=' +
parseInt( $this.failed, 10 ) +
'&products-updated=' +
@@ -1 +1 @@
!function(t,p){var i=function(t){this.$form=t,this.xhr=!1,this.mapping=wc_product_import_params.mapping,this.position=0,this.file=wc_product_import_params.file,this.update_existing=wc_product_import_params.update_existing,this.delimiter=wc_product_import_params.delimiter,this.security=wc_product_import_params.import_nonce,this.character_encoding=wc_product_import_params.character_encoding,this.imported=0,this.failed=0,this.updated=0,this.skipped=0,this.$form.find(".woocommerce-importer-progress").val(0),this.run_import=this.run_import.bind(this),this.run_import()};i.prototype.run_import=function(){var r=this;t.ajax({type:"POST",url:ajaxurl,data:{action:"woocommerce_do_ajax_product_import",position:r.position,mapping:r.mapping,file:r.file,update_existing:r.update_existing,delimiter:r.delimiter,security:r.security,character_encoding:r.character_encoding},dataType:"json",success:function(t){var i;t.success&&(r.position=t.data.position,r.imported+=t.data.imported,r.failed+=t.data.failed,r.updated+=t.data.updated,r.skipped+=t.data.skipped,r.$form.find(".woocommerce-importer-progress").val(t.data.percentage),"done"===t.data.position?(i=wc_product_import_params.file.split("/").pop(),p.location=t.data.url+"&products-imported="+parseInt(r.imported,10)+"&products-failed="+parseInt(r.failed,10)+"&products-updated="+parseInt(r.updated,10)+"&products-skipped="+parseInt(r.skipped,10)+"&file-name="+i):r.run_import())}}).fail(function(t){p.console.log(t)})},t.fn.wc_product_importer=function(){return new i(this),this},t(".woocommerce-importer").wc_product_importer()}(jQuery,window);
!function(i,t){var r=function(i){this.$form=i,this.xhr=!1,this.mapping=wc_product_import_params.mapping,this.position=0,this.file=wc_product_import_params.file,this.update_existing=wc_product_import_params.update_existing,this.delimiter=wc_product_import_params.delimiter,this.security=wc_product_import_params.import_nonce,this.character_encoding=wc_product_import_params.character_encoding,this.imported=0,this.imported_variations=0,this.failed=0,this.updated=0,this.skipped=0,this.$form.find(".woocommerce-importer-progress").val(0),this.run_import=this.run_import.bind(this),this.run_import()};r.prototype.run_import=function(){var r=this;i.ajax({type:"POST",url:ajaxurl,data:{action:"woocommerce_do_ajax_product_import",position:r.position,mapping:r.mapping,file:r.file,update_existing:r.update_existing,delimiter:r.delimiter,security:r.security,character_encoding:r.character_encoding},dataType:"json",success:function(i){if(i.success)if(r.position=i.data.position,r.imported+=i.data.imported,r.imported_variations+=i.data.imported_variations,r.failed+=i.data.failed,r.updated+=i.data.updated,r.skipped+=i.data.skipped,r.$form.find(".woocommerce-importer-progress").val(i.data.percentage),"done"===i.data.position){var o=wc_product_import_params.file.split("/").pop();t.location=i.data.url+"&products-imported="+parseInt(r.imported,10)+"&products-imported-variations="+parseInt(r.imported_variations,10)+"&products-failed="+parseInt(r.failed,10)+"&products-updated="+parseInt(r.updated,10)+"&products-skipped="+parseInt(r.skipped,10)+"&file-name="+o}else r.run_import()}}).fail(function(i){t.console.log(i)})},i.fn.wc_product_importer=function(){return new r(this),this},i(".woocommerce-importer").wc_product_importer()}(jQuery,window);
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(d,c,l,r){d(function(){var e=d(".wc-shipping-class-rows"),i=d(".wc-shipping-class-save"),s=l.template("wc-shipping-class-row"),n=l.template("wc-shipping-class-row-blank"),t=Backbone.Model.extend({changes:{},logChanges:function(e){var s=this.changes||{};_.each(e,function(e,i){s[i]=_.extend(s[i]||{term_id:i},e)}),this.changes=s,this.trigger("change:classes")},save:function(){_.size(this.changes)?d.post(r+(0<r.indexOf("?")?"&":"?")+"action=woocommerce_shipping_classes_save_changes",{wc_shipping_classes_nonce:c.wc_shipping_classes_nonce,changes:this.changes},this.onSaveResponse,"json"):a.trigger("saved:classes")},discardChanges:function(e){delete(this.changes||{})[e],0===_.size(this.changes)&&o.clearUnloadConfirmation()},onSaveResponse:function(e,i){"success"===i&&(e.success?(a.set("classes",e.data.shipping_classes),a.trigger("change:classes"),a.changes={},a.trigger("saved:classes")):e.data?window.alert(e.data):window.alert(c.strings.save_failed)),o.unblock()}}),s=Backbone.View.extend({rowTemplate:s,initialize:function(){this.listenTo(this.model,"change:classes",this.setUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.render),e.on("change",{view:this},this.updateModelOnChange),d(window).on("beforeunload",{view:this},this.unloadConfirmation),i.on("click",{view:this},this.onSubmit),d(document.body).on("click",".wc-shipping-class-add",{view:this},this.onAddNewRow),d(document.body).on("click",".wc-shipping-class-save-changes",{view:this},this.onSubmit)},block:function(){d(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){d(this.el).unblock()},render:function(){var e=_.indexBy(this.model.get("classes"),"term_id"),s=this;this.$el.empty(),this.unblock(),_.size(e)?(e=_.sortBy(e,function(e){return e.name}),d.each(e,function(e,i){s.renderRow(i)})):s.$el.append(n)},renderRow:function(e){var i=this;i.$el.append(i.rowTemplate(e)),i.initRow(e)},initRow:function(i){var e=this.$el.find('tr[data-id="'+i.term_id+'"]');e.find("select").each(function(){var e=d(this).data("attribute");d(this).find('option[value="'+i[e]+'"]').prop("selected",!0)}),e.find(".view").show(),e.find(".edit").hide(),e.find(".wc-shipping-class-edit").on("click",{view:this},this.onEditRow),e.find(".wc-shipping-class-delete").on("click",{view:this},this.onDeleteRow),e.find(".editing .wc-shipping-class-edit").trigger("click"),e.find(".wc-shipping-class-cancel-edit").on("click",{view:this},this.onCancelEditRow),!0===i.editing&&(e.addClass("editing"),e.find(".wc-shipping-class-edit").trigger("click"))},onSubmit:function(e){e.data.view.block(),e.data.view.model.save(),e.preventDefault()},onAddNewRow:function(e){e.preventDefault();var e=e.data.view,i=e.model,s=_.indexBy(i.get("classes"),"term_id"),n={},s=_.size(s),s=_.extend({},c.default_shipping_class,{term_id:"new-"+s+"-"+Date.now(),editing:!0,newRow:!0});n[s.term_id]=s,i.logChanges(n),e.renderRow(s),d(".wc-shipping-classes-blank-state").remove()},onEditRow:function(e){e.preventDefault(),d(this).closest("tr").addClass("editing"),d(this).closest("tr").find(".view").hide(),d(this).closest("tr").find(".edit").show(),e.data.view.model.trigger("change:classes")},onDeleteRow:function(e){var i=e.data.view,s=i.model,n=_.indexBy(s.get("classes"),"term_id"),t={},a=d(this).closest("tr").data("id");e.preventDefault(),n[a]&&(delete n[a],t[a]=_.extend(t[a]||{},{deleted:"deleted"}),s.set("classes",n),s.logChanges(t)),i.render()},onCancelEditRow:function(e){var i=e.data.view,s=i.model,n=d(this).closest("tr"),t=d(this).closest("tr").data("id"),a=_.indexBy(s.get("classes"),"term_id");e.preventDefault(),s.discardChanges(t),a[t]&&(a[t].editing=!1,n.after(i.rowTemplate(a[t])),i.initRow(a[t])),n.remove()},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,i.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,i.attr("disabled","disabled")},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=c.strings.unload_confirmation_msg,window.event.returnValue=c.strings.unload_confirmation_msg,c.strings.unload_confirmation_msg},updateModelOnChange:function(e){var i=e.data.view.model,e=d(e.target),s=e.closest("tr").data("id"),n=e.data("attribute"),e=e.val(),t=_.indexBy(i.get("classes"),"term_id"),a={};t[s]&&t[s][n]===e||(a[s]={},a[s][n]=e),i.logChanges(a)}}),a=new t({classes:c.classes}),o=new s({model:a,el:e});o.render()})}(jQuery,shippingClassesLocalizeScript,wp,ajaxurl);
!function(e,i,s,n){e(function(){var t=e(".wc-shipping-class-rows"),a=e(".wc-shipping-class-save"),o=s.template("wc-shipping-class-row"),d=s.template("wc-shipping-class-row-blank"),c=Backbone.Model.extend({changes:{},logChanges:function(e){var i=this.changes||{};_.each(e,function(e,s){i[s]=_.extend(i[s]||{term_id:s},e)}),this.changes=i,this.trigger("change:classes")},save:function(){_.size(this.changes)?e.post(n+(n.indexOf("?")>0?"&":"?")+"action=woocommerce_shipping_classes_save_changes",{wc_shipping_classes_nonce:i.wc_shipping_classes_nonce,changes:this.changes},this.onSaveResponse,"json"):r.trigger("saved:classes")},discardChanges:function(e){delete(this.changes||{})[e],0===_.size(this.changes)&&h.clearUnloadConfirmation()},onSaveResponse:function(e,s){"success"===s&&(e.success?(r.set("classes",e.data.shipping_classes),r.trigger("change:classes"),r.changes={},r.trigger("saved:classes")):e.data?window.alert(e.data):window.alert(i.strings.save_failed)),h.unblock()}}),l=Backbone.View.extend({rowTemplate:o,initialize:function(){this.listenTo(this.model,"change:classes",this.setUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:classes",this.render),t.on("change",{view:this},this.updateModelOnChange),e(window).on("beforeunload",{view:this},this.unloadConfirmation),a.on("click",{view:this},this.onSubmit),e(document.body).on("click",".wc-shipping-class-add",{view:this},this.onAddNewRow),e(document.body).on("click",".wc-shipping-class-save-changes",{view:this},this.onSubmit)},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},render:function(){var i=_.indexBy(this.model.get("classes"),"term_id"),s=this;this.$el.empty(),this.unblock(),_.size(i)?(i=_.sortBy(i,function(e){return e.name}),e.each(i,function(e,i){s.renderRow(i)})):s.$el.append(d)},renderRow:function(e){this.$el.append(this.rowTemplate(e)),this.initRow(e)},initRow:function(i){var s=this.$el.find('tr[data-id="'+i.term_id+'"]');s.find("select").each(function(){var s=e(this).data("attribute");e(this).find('option[value="'+i[s]+'"]').prop("selected",!0)}),s.find(".view").show(),s.find(".edit").hide(),s.find(".wc-shipping-class-edit").on("click",{view:this},this.onEditRow),s.find(".wc-shipping-class-delete").on("click",{view:this},this.onDeleteRow),s.find(".editing .wc-shipping-class-edit").trigger("click"),s.find(".wc-shipping-class-cancel-edit").on("click",{view:this},this.onCancelEditRow),!0===i.editing&&(s.addClass("editing"),s.find(".wc-shipping-class-edit").trigger("click"))},onSubmit:function(e){e.data.view.block(),e.data.view.model.save(),e.preventDefault()},onAddNewRow:function(s){s.preventDefault();var n=s.data.view,t=n.model,a=_.indexBy(t.get("classes"),"term_id"),o={},d=_.size(a),c=_.extend({},i.default_shipping_class,{term_id:"new-"+d+"-"+Date.now(),editing:!0,newRow:!0});o[c.term_id]=c,t.logChanges(o),n.renderRow(c),e(".wc-shipping-classes-blank-state").remove()},onEditRow:function(i){i.preventDefault(),e(this).closest("tr").addClass("editing"),e(this).closest("tr").find(".view").hide(),e(this).closest("tr").find(".edit").show(),i.data.view.model.trigger("change:classes")},onDeleteRow:function(i){var s=i.data.view,n=s.model,t=_.indexBy(n.get("classes"),"term_id"),a={},o=e(this).closest("tr").data("id");i.preventDefault(),t[o]&&(delete t[o],a[o]=_.extend(a[o]||{},{deleted:"deleted"}),n.set("classes",t),n.logChanges(a)),s.render()},onCancelEditRow:function(i){var s=i.data.view,n=s.model,t=e(this).closest("tr"),a=e(this).closest("tr").data("id"),o=_.indexBy(n.get("classes"),"term_id");i.preventDefault(),n.discardChanges(a),o[a]&&(o[a].editing=!1,t.after(s.rowTemplate(o[a])),s.initRow(o[a])),t.remove()},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,a.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,a.attr("disabled","disabled")},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=i.strings.unload_confirmation_msg,window.event.returnValue=i.strings.unload_confirmation_msg,i.strings.unload_confirmation_msg},updateModelOnChange:function(i){var s=i.data.view.model,n=e(i.target),t=n.closest("tr").data("id"),a=n.data("attribute"),o=n.val(),d=_.indexBy(s.get("classes"),"term_id"),c={};d[t]&&d[t][a]===o||(c[t]={},c[t][a]=o),s.logChanges(c)}}),r=new c({classes:i.classes}),h=new l({model:r,el:t});h.render()})}(jQuery,shippingClassesLocalizeScript,wp,ajaxurl);
@@ -85,6 +85,7 @@
this.listenTo( this.model, 'change:methods', this.setUnloadConfirmation );
this.listenTo( this.model, 'saved:methods', this.clearUnloadConfirmation );
this.listenTo( this.model, 'saved:methods', this.render );
this.listenTo( this.model, 'rerender', this.render );
$tbody.on( 'change', { view: this }, this.updateModelOnChange );
$tbody.on( 'sortupdate', { view: this }, this.updateModelOnSort );
$( window ).on( 'beforeunload', { view: this }, this.unloadConfirmation );
@@ -197,16 +198,37 @@
model = view.model,
methods = _.indexBy( model.get( 'methods' ), 'instance_id' ),
changes = {},
instance_id = $( this ).closest('tr').data('id');
instance_id = $( this ).closest( 'tr' ).data( 'id' );
event.preventDefault();
delete methods[ instance_id ];
changes.methods = changes.methods || { methods : {} };
changes.methods[ instance_id ] = _.extend( changes.methods[ instance_id ] || {}, { deleted : 'deleted' } );
model.set( 'methods', methods );
model.logChanges( changes );
view.render();
if ( window.confirm( data.strings.delete_shipping_method_confirmation ) ) {
shippingMethodView.block();
// Add method to zone via ajax call
$.post( {
url: ajaxurl + ( ajaxurl.indexOf( '?' ) > 0 ? '&' : '?') + 'action=woocommerce_shipping_zone_remove_method',
data: {
wc_shipping_zones_nonce: data.wc_shipping_zones_nonce,
instance_id: instance_id,
zone_id: data.zone_id,
},
success: function( { data } ) {
delete methods[instance_id];
changes.methods = changes.methods || data.methods;
model.set('methods', methods);
model.logChanges( changes );
view.clearUnloadConfirmation();
view.render();
shippingMethodView.unblock();
},
error: function( jqXHR, textStatus, errorThrown ) {
window.alert( data.strings.remove_method_failed );
shippingMethodView.unblock();
},
dataType: 'json'
});
}
},
onToggleEnabled: function( event ) {
var view = event.data.view,
@@ -388,11 +410,12 @@
}
// Trigger save if there are changes, or just re-render
if ( _.size( shippingMethodView.model.changes ) ) {
shippingMethodView.model.save();
shippingMethodView.model.set( 'methods', response.data.methods );
shippingMethodView.model.trigger( 'change:methods' );
shippingMethodView.model.trigger( 'rerender' );
} else {
shippingMethodView.model.set( 'methods', response.data.methods );
shippingMethodView.model.trigger( 'change:methods' );
shippingMethodView.model.changes = {};
shippingMethodView.model.trigger( 'saved:methods' );
}
}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(r,l,c,h){r(function(){var e=r(".wc-shipping-zones"),n=r(".wc-shipping-zone-rows"),i=r(".wc-shipping-zone-save"),o=c.template("wc-shipping-zone-row"),t=c.template("wc-shipping-zone-row-blank"),s=Backbone.Model.extend({changes:{},logChanges:function(e){var i=this.changes||{};_.each(e,function(e,n){i[n]=_.extend(i[n]||{zone_id:n},e)}),this.changes=i,this.trigger("change:zones")},discardChanges:function(e){var n=this.changes||{},i=null,o=_.indexBy(this.get("zones"),"zone_id");n[e]&&n[e].zone_order!==undefined&&(i=n[e].zone_order),delete n[e],null!==i&&o[e]&&o[e].zone_order!==i&&(n[e]=_.extend(n[e]||{},{zone_id:e,zone_order:i})),this.changes=n,0===_.size(this.changes)&&a.clearUnloadConfirmation()},save:function(){_.size(this.changes)?r.post(h+(0<h.indexOf("?")?"&":"?")+"action=woocommerce_shipping_zones_save_changes",{wc_shipping_zones_nonce:l.wc_shipping_zones_nonce,changes:this.changes},this.onSaveResponse,"json"):d.trigger("saved:zones")},onSaveResponse:function(e,n){"success"===n&&(e.success?(d.set("zones",e.data.zones),d.trigger("change:zones"),d.changes={},d.trigger("saved:zones")):window.alert(l.strings.save_failed))}}),o=Backbone.View.extend({rowTemplate:o,initialize:function(){this.listenTo(this.model,"change:zones",this.setUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.render),n.on("change",{view:this},this.updateModelOnChange),n.on("sortupdate",{view:this},this.updateModelOnSort),r(window).on("beforeunload",{view:this},this.unloadConfirmation),r(document.body).on("click",".wc-shipping-zone-add",{view:this},this.onAddNewRow)},onAddNewRow:function(){var e=r(this);window.location.href=e.attr("href")},block:function(){r(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){r(this.el).unblock()},render:function(){var e=_.indexBy(this.model.get("zones"),"zone_id"),i=this;i.$el.empty(),i.unblock(),_.size(e)?(e=_(e).chain().sortBy(function(e){return parseInt(e.zone_id,10)}).sortBy(function(e){return parseInt(e.zone_order,10)}).value(),r.each(e,function(e,n){i.renderRow(n)})):i.$el.append(t),i.initRows()},renderRow:function(e){var n=this;n.$el.append(n.rowTemplate(e)),n.initRow(e)},initRow:function(e){var n=this.$el.find('tr[data-id="'+e.zone_id+'"]');this.renderShippingMethods(e.zone_id,e.shipping_methods),n.find(".wc-shipping-zone-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){0==r("tbody.wc-shipping-zone-rows tr").length%2?e.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").addClass("odd"):e.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").removeClass("odd"),r("#tiptip_holder").removeAttr("style"),r("#tiptip_arrow").removeAttr("style"),r(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},renderShippingMethods:function(e,n){var i=r('.wc-shipping-zones tr[data-id="'+e+'"]').find(".wc-shipping-zone-methods ul");i.find(".wc-shipping-zone-method").remove(),_.size(n)?(n=_.sortBy(n,function(e){return parseInt(e.method_order,10)}),_.each(n,function(e){var n="method_disabled";"yes"===e.enabled&&(n="method_enabled"),i.append('<li class="wc-shipping-zone-method '+n+'">'+e.title+"</li>")})):i.append('<li class="wc-shipping-zone-method">'+l.strings.no_shipping_methods_offered+"</li>")},onDeleteRow:function(e){var n=e.data.view.model,i=_.indexBy(n.get("zones"),"zone_id"),o={},t=r(this).closest("tr").data("id");e.preventDefault(),window.confirm(l.strings.delete_confirmation_msg)&&i[t]&&(delete i[t],o[t]=_.extend(o[t]||{},{deleted:"deleted"}),n.set("zones",i),n.logChanges(o),e.data.view.block(),e.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,i.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,i.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=l.strings.unload_confirmation_msg,window.event.returnValue=l.strings.unload_confirmation_msg,l.strings.unload_confirmation_msg},updateModelOnChange:function(e){var n=e.data.view.model,e=r(e.target),i=e.closest("tr").data("id"),o=e.data("attribute"),e=e.val(),t=_.indexBy(n.get("zones"),"zone_id"),s={};t[i]&&t[i][o]===e||(s[i]={},s[i][o]=e),n.logChanges(s)},updateModelOnSort:function(e){var n=e.data.view.model,o=_.indexBy(n.get("zones"),"zone_id"),i=r("tbody.wc-shipping-zone-rows tr"),t={};_.each(i,function(e){var n=r(e).data("id"),i=null,e=parseInt(r(e).index(),10);(i=o[n]?parseInt(o[n].zone_order,10):i)!==e&&(t[n]=_.extend(t[n]||{},{zone_order:e}))}),_.size(t)&&(n.logChanges(t),e.data.view.block(),e.data.view.model.save())}}),d=new s({zones:l.zones}),a=new o({model:d,el:n});a.render(),n.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-shipping-zone-sort",scrollSensitivity:40})})}(jQuery,shippingZonesLocalizeScript,wp,ajaxurl);
!function(e,n,i,o){e(function(){var t=e(".wc-shipping-zones"),s=e(".wc-shipping-zone-rows"),d=e(".wc-shipping-zone-save"),a=i.template("wc-shipping-zone-row"),r=i.template("wc-shipping-zone-row-blank"),l=Backbone.Model.extend({changes:{},logChanges:function(e){var n=this.changes||{};_.each(e,function(e,i){n[i]=_.extend(n[i]||{zone_id:i},e)}),this.changes=n,this.trigger("change:zones")},discardChanges:function(e){var n=this.changes||{},i=null,o=_.indexBy(this.get("zones"),"zone_id");n[e]&&n[e].zone_order!==undefined&&(i=n[e].zone_order),delete n[e],null!==i&&o[e]&&o[e].zone_order!==i&&(n[e]=_.extend(n[e]||{},{zone_id:e,zone_order:i})),this.changes=n,0===_.size(this.changes)&&p.clearUnloadConfirmation()},save:function(){_.size(this.changes)?e.post(o+(o.indexOf("?")>0?"&":"?")+"action=woocommerce_shipping_zones_save_changes",{wc_shipping_zones_nonce:n.wc_shipping_zones_nonce,changes:this.changes},this.onSaveResponse,"json"):h.trigger("saved:zones")},onSaveResponse:function(e,i){"success"===i&&(e.success?(h.set("zones",e.data.zones),h.trigger("change:zones"),h.changes={},h.trigger("saved:zones")):window.alert(n.strings.save_failed))}}),c=Backbone.View.extend({rowTemplate:a,initialize:function(){this.listenTo(this.model,"change:zones",this.setUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:zones",this.render),s.on("change",{view:this},this.updateModelOnChange),s.on("sortupdate",{view:this},this.updateModelOnSort),e(window).on("beforeunload",{view:this},this.unloadConfirmation),e(document.body).on("click",".wc-shipping-zone-add",{view:this},this.onAddNewRow)},onAddNewRow:function(){var n=e(this);window.location.href=n.attr("href")},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},render:function(){var n=_.indexBy(this.model.get("zones"),"zone_id"),i=this;i.$el.empty(),i.unblock(),_.size(n)?(n=_(n).chain().sortBy(function(e){return parseInt(e.zone_id,10)}).sortBy(function(e){return parseInt(e.zone_order,10)}).value(),e.each(n,function(e,n){i.renderRow(n)})):i.$el.append(r),i.initRows()},renderRow:function(e){this.$el.append(this.rowTemplate(e)),this.initRow(e)},initRow:function(e){var n=this.$el.find('tr[data-id="'+e.zone_id+'"]');this.renderShippingMethods(e.zone_id,e.shipping_methods),n.find(".wc-shipping-zone-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){0==e("tbody.wc-shipping-zone-rows tr").length%2?t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").addClass("odd"):t.find("tbody.wc-shipping-zone-rows").next("tbody").find("tr").removeClass("odd"),e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},renderShippingMethods:function(i,o){var t=e('.wc-shipping-zones tr[data-id="'+i+'"]').find(".wc-shipping-zone-methods ul");t.find(".wc-shipping-zone-method").remove(),_.size(o)?(o=_.sortBy(o,function(e){return parseInt(e.method_order,10)}),_.each(o,function(e){var n="method_disabled";"yes"===e.enabled&&(n="method_enabled"),t.append('<li class="wc-shipping-zone-method '+n+'">'+e.title+"</li>")})):t.append('<li class="wc-shipping-zone-method">'+n.strings.no_shipping_methods_offered+"</li>")},onDeleteRow:function(i){var o=i.data.view.model,t=_.indexBy(o.get("zones"),"zone_id"),s={},d=e(this).closest("tr").data("id");i.preventDefault(),window.confirm(n.strings.delete_confirmation_msg)&&t[d]&&(delete t[d],s[d]=_.extend(s[d]||{},{deleted:"deleted"}),o.set("zones",t),o.logChanges(s),i.data.view.block(),i.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,d.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,d.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=n.strings.unload_confirmation_msg,window.event.returnValue=n.strings.unload_confirmation_msg,n.strings.unload_confirmation_msg},updateModelOnChange:function(n){var i=n.data.view.model,o=e(n.target),t=o.closest("tr").data("id"),s=o.data("attribute"),d=o.val(),a=_.indexBy(i.get("zones"),"zone_id"),r={};a[t]&&a[t][s]===d||(r[t]={},r[t][s]=d),i.logChanges(r)},updateModelOnSort:function(n){var i=n.data.view.model,o=_.indexBy(i.get("zones"),"zone_id"),t=e("tbody.wc-shipping-zone-rows tr"),s={};_.each(t,function(n){var i=e(n).data("id"),t=null,d=parseInt(e(n).index(),10);o[i]&&(t=parseInt(o[i].zone_order,10)),t!==d&&(s[i]=_.extend(s[i]||{},{zone_order:d}))}),_.size(s)&&(i.logChanges(s),n.data.view.block(),n.data.view.model.save())}}),h=new l({zones:n.zones}),p=new c({model:h,el:s});p.render(),s.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-shipping-zone-sort",scrollSensitivity:40})})}(jQuery,shippingZonesLocalizeScript,wp,ajaxurl);
@@ -1,6 +1,6 @@
/*global jQuery */
(function( $ ) {
$( document ).on( 'ready', function() {
$( function() {
window.wcTracks.recordEvent( 'wcadmin_status_widget_view' );
});
@@ -1 +1 @@
!function(o){o(document).on("ready",function(){window.wcTracks.recordEvent("wcadmin_status_widget_view")});var n=function(o){window.wcTracks.recordEvent("status_widget_click",{link:o})};o(".sales-this-month a").on("click",function(){n("net-sales")}),o(".best-seller-this-month a").on("click",function(){n("best-seller-this-month")}),o(".processing-orders a").on("click",function(){n("orders-processing")}),o(".on-hold-orders a").on("click",function(){n("orders-on-hold")}),o(".low-in-stock a").on("click",function(){n("low-stock")}),o(".out-of-stock a").on("click",function(){n("out-of-stock")})}(jQuery);
!function(o){o(function(){window.wcTracks.recordEvent("wcadmin_status_widget_view")});var n=function(o){window.wcTracks.recordEvent("status_widget_click",{link:o})};o(".sales-this-month a").on("click",function(){n("net-sales")}),o(".best-seller-this-month a").on("click",function(){n("best-seller-this-month")}),o(".processing-orders a").on("click",function(){n("orders-processing")}),o(".on-hold-orders a").on("click",function(){n("orders-on-hold")}),o(".low-in-stock a").on("click",function(){n("low-stock")}),o(".out-of-stock a").on("click",function(){n("out-of-stock")})}(jQuery);
@@ -665,4 +665,91 @@
);
}
} );
$( function() {
/**
* Handles heartbeat integration of order locking when HPOS is enabled.
*/
var wc_order_lock = {
init: function() {
// Order screen.
this.$lock_dialog = $( '.woocommerce_page_wc-orders #post-lock-dialog.order-lock-dialog' );
if ( 0 !== this.$lock_dialog.length && 'undefined' !== typeof woocommerce_admin_meta_boxes ) {
$( document ).on( 'heartbeat-send', this.refresh_order_lock );
$( document ).on( 'heartbeat-tick', this.check_order_lock );
}
// Orders list table.
this.$list_table = $( '.woocommerce_page_wc-orders table.wc-orders-list-table' );
if ( 0 !== this.$list_table.length ) {
$( document ).on( 'heartbeat-send', this.send_orders_in_list );
$( document ).on( 'heartbeat-tick', this.check_orders_in_list );
}
},
refresh_order_lock: function( e, data ) {
data['wc-refresh-order-lock'] = woocommerce_admin_meta_boxes.post_id;
},
check_order_lock: function( e, data ) {
var lock_data = data['wc-refresh-order-lock'];
if ( ! lock_data || ! lock_data.error ) {
// No lock request in heartbeat or lock refreshed ok.
return;
}
if ( wc_order_lock.$lock_dialog.is( ':visible' ) ) {
return;
}
if ( lock_data.error.user_avatar_src ) {
wc_order_lock.$lock_dialog.find( '.post-locked-avatar' ).empty().append(
$(
'<img />',
{
'class': 'avatar avatar-64 photo',
width: 64,
height: 64,
alt: '',
src: lock_data.error.user_avatar_src,
srcset: lock_data.error.user_avatar_src_2x ? lock_data.error.user_avatar_src_2x + ' 2x' : undefined
}
)
);
}
wc_order_lock.$lock_dialog.find( '.currently-editing' ).text( lock_data.error.message );
wc_order_lock.$lock_dialog.show();
wc_order_lock.$lock_dialog.find( '.wp-tab-first' ).trigger( 'focus' );
},
send_orders_in_list: function( e, data ) {
data['wc-check-locked-orders'] = wc_order_lock.$list_table.find( 'tr input[name="order"]' ).map(
function() { return this.value; }
).get();
},
check_orders_in_list: function( e, data ) {
var locked_orders = data['wc-check-locked-orders'] || {};
wc_order_lock.$list_table.find( 'tr' ).each( function( i, tr ) {
var $tr = $( tr );
var order_id = $tr.find( 'input[name="order"]' ).val();
if ( locked_orders[ order_id ] ) {
if ( ! $tr.hasClass( 'wp-locked' ) ) {
$tr.find( '.check-column checkbox' ).prop( 'checked', false );
$tr.addClass( 'wp-locked' );
}
} else {
$tr.removeClass( 'wp-locked' ).find( '.locked-info span' ).empty();
}
} );
}
};
wc_order_lock.init();
} );
} )( jQuery, woocommerce_admin );
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(t){if("undefined"==typeof woocommerce_params)return!1;t("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){var e;1<t(".payment_methods input.input-radio").length?(e=t("div.payment_box."+t(this).attr("ID")),t(this).is(":checked")&&!e.is(":visible")&&(t("div.payment_box").filter(":visible").slideUp(250),t(this).is(":checked")&&t("div.payment_box."+t(this).attr("ID")).slideDown(250))):t("div.payment_box").show()}).find("input[name=payment_method]:checked").trigger("click"),t("#add_payment_method").on("submit",function(){t("#add_payment_method").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}),t(document.body).trigger("init_add_payment_method"),t(" .woocommerce .payment-method-actions .button.delete").on("click",function(e){t(this).hasClass("disabled")&&e.preventDefault(),t(this).addClass("disabled")})});
jQuery(function(e){if("undefined"==typeof woocommerce_params)return!1;e("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(e(".payment_methods input.input-radio").length>1){var t=e("div.payment_box."+e(this).attr("ID"));e(this).is(":checked")&&!t.is(":visible")&&(e("div.payment_box").filter(":visible").slideUp(250),e(this).is(":checked")&&e("div.payment_box."+e(this).attr("ID")).slideDown(250))}else e("div.payment_box").show()}).find("input[name=payment_method]:checked").trigger("click"),e("#add_payment_method").on("submit",function(){e("#add_payment_method").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}),e(document.body).trigger("init_add_payment_method"),e(" .woocommerce .payment-method-actions .button.delete").on("click",function(t){e(this).hasClass("disabled")&&t.preventDefault(),e(this).addClass("disabled")})});
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(d){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),d(document.body).on("click",".add_to_cart_button",{addToCartHandler:this},this.onAddToCart).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("ajax_request_not_sent.adding_to_cart",this.updateButton).on("added_to_cart removed_from_cart",{addToCartHandler:this},this.updateFragments)};t.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},t.prototype.run=function(){var t=this,a=t.requests[0].complete;t.requests[0].complete=function(){"function"==typeof a&&a(),t.requests.shift(),0<t.requests.length&&t.run()},d.ajax(this.requests[0])},t.prototype.onAddToCart=function(t){var e,a=d(this);if(a.is(".ajax_add_to_cart"))return!a.attr("data-product_id")||(t.preventDefault(),a.removeClass("added"),a.addClass("loading"),!1===d(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[a])?(d(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,a]),!0):(e={},d.each(a.data(),function(t,a){e[t]=a}),d.each(a[0].dataset,function(t,a){e[t]=a}),d(document.body).trigger("adding_to_cart",[a,e]),void t.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:e,success:function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"===wc_add_to_cart_params.cart_redirect_after_add?window.location=wc_add_to_cart_params.cart_url:d(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]))},dataType:"json"})))},t.prototype.onRemoveFromCart=function(t){var a=d(this),e=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),e.block({message:null,overlayCSS:{opacity:.6}}),t.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),data:{cart_item_key:a.data("cart_item_key")},success:function(t){t&&t.fragments?d(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")},error:function(){window.location=a.attr("href")},dataType:"json"})},t.prototype.updateButton=function(t,a,e,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),a&&r.addClass("added"),a&&!wc_add_to_cart_params.is_cart&&0===r.parent().find(".added_to_cart").length&&r.after('<a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),d(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateFragments=function(t,a){a&&(d.each(a,function(t){d(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),d.each(a,function(t,a){d(t).replaceWith(a),d(t).stop(!0).css("opacity","1").unblock()}),d(document.body).trigger("wc_fragments_loaded"))},new t});
jQuery(function(t){if("undefined"==typeof wc_add_to_cart_params)return!1;var a=function(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),t(document.body).on("click",".add_to_cart_button",{addToCartHandler:this},this.onAddToCart).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("ajax_request_not_sent.adding_to_cart",this.updateButton).on("added_to_cart removed_from_cart",{addToCartHandler:this},this.updateFragments)};a.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},a.prototype.run=function(){var a=this,e=a.requests[0].complete;a.requests[0].complete=function(){"function"==typeof e&&e(),a.requests.shift(),a.requests.length>0&&a.run()},t.ajax(this.requests[0])},a.prototype.onAddToCart=function(a){var e=t(this);if(e.is(".ajax_add_to_cart")){if(!e.attr("data-product_id"))return!0;if(a.preventDefault(),e.removeClass("added"),e.addClass("loading"),!1===t(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[e]))return t(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,e]),!0;var r={};t.each(e.data(),function(t,a){r[t]=a}),t.each(e[0].dataset,function(t,a){r[t]=a}),t(document.body).trigger("adding_to_cart",[e,r]),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:r,success:function(a){a&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?t(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,e]):window.location=wc_add_to_cart_params.cart_url)},dataType:"json"})}},a.prototype.onRemoveFromCart=function(a){var e=t(this),r=e.closest(".woocommerce-mini-cart-item");a.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),data:{cart_item_key:e.data("cart_item_key")},success:function(a){a&&a.fragments?t(document.body).trigger("removed_from_cart",[a.fragments,a.cart_hash,e]):window.location=e.attr("href")},error:function(){window.location=e.attr("href")},dataType:"json"})},a.prototype.updateButton=function(a,e,r,d){(d=void 0!==d&&d)&&(d.removeClass("loading"),e&&d.addClass("added"),e&&!wc_add_to_cart_params.is_cart&&0===d.parent().find(".added_to_cart").length&&d.after('<a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),t(document.body).trigger("wc_cart_button_updated",[d]))},a.prototype.updateFragments=function(a,e){e&&(t.each(e,function(a){t(a).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),t.each(e,function(a,e){t(a).replaceWith(e),t(a).stop(!0).css("opacity","1").unblock()}),t(document.body).trigger("wc_fragments_loaded"))},new a});
@@ -1 +1 @@
jQuery(function(l){if("undefined"==typeof wc_address_i18n_params)return!1;var e=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),n=JSON.parse(e);function o(e,a){a?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append('&nbsp;<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append('&nbsp;<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}l(document.body).on("country_to_state_changing",function(e,a,i){var d=i,r="undefined"!=typeof n[a]?n[a]:n["default"],i=d.find("#billing_postcode_field, #shipping_postcode_field"),a=d.find("#billing_city_field, #shipping_city_field"),t=d.find("#billing_state_field, #shipping_state_field"),i=(i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),a.attr("data-o_class",a.attr("class")),t.attr("data-o_class",t.attr("class"))),JSON.parse(wc_address_i18n_params.locale_fields));l.each(i,function(e,a){var a=d.find(a),i=l.extend(!0,{},n["default"][e],r[e]);"undefined"!=typeof i.label&&a.find("label").html(i.label),"undefined"!=typeof i.placeholder&&(a.find(":input").attr("placeholder",i.placeholder),a.find(":input").attr("data-placeholder",i.placeholder),a.find(".select2-selection__placeholder").text(i.placeholder)),"undefined"!=typeof i.placeholder||"undefined"==typeof i.label||a.find("label").length||(a.find(":input").attr("placeholder",i.label),a.find(":input").attr("data-placeholder",i.label),a.find(".select2-selection__placeholder").text(i.label)),"undefined"!=typeof i.required?o(a,i.required):o(a,!1),"undefined"!=typeof i.priority&&a.data("priority",i.priority),"state"!==e&&("undefined"!=typeof i.hidden&&!0===i.hidden?a.hide().find(":input").val(""):a.show()),Array.isArray(i["class"])&&(a.removeClass("form-row-first form-row-last form-row-wide"),a.addClass(i["class"].join(" ")))}),l(".woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper,.woocommerce-address-fields__field-wrapper,.woocommerce-additional-fields__field-wrapper .woocommerce-account-fields").each(function(e,a){var a=l(a).find(".form-row"),i=a.first().parent(),d=0;a.each(function(){l(this).data("priority")||l(this).data("priority",d+1),d=l(this).data("priority")}),a.sort(function(e,a){e=parseInt(l(e).data("priority"),10),a=parseInt(l(a).data("priority"),10);return a<e?1:e<a?-1:0}),a.detach().appendTo(i)})}).trigger("wc_address_i18n_ready")});
jQuery(function(e){if("undefined"==typeof wc_address_i18n_params)return!1;var a=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),i=JSON.parse(a);function d(e,a){a?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append('&nbsp;<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append('&nbsp;<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}e(document.body).on("country_to_state_changing",function(a,r,t){var l,n=t;l="undefined"!=typeof i[r]?i[r]:i["default"];var o=n.find("#billing_postcode_field, #shipping_postcode_field"),s=n.find("#billing_city_field, #shipping_city_field"),p=n.find("#billing_state_field, #shipping_state_field");o.attr("data-o_class")||(o.attr("data-o_class",o.attr("class")),s.attr("data-o_class",s.attr("class")),p.attr("data-o_class",p.attr("class")));var f=JSON.parse(wc_address_i18n_params.locale_fields);e.each(f,function(a,r){var t=n.find(r),o=e.extend(!0,{},i["default"][a],l[a]);"undefined"!=typeof o.label&&t.find("label").html(o.label),"undefined"!=typeof o.placeholder&&(t.find(":input").attr("placeholder",o.placeholder),t.find(":input").attr("data-placeholder",o.placeholder),t.find(".select2-selection__placeholder").text(o.placeholder)),"undefined"!=typeof o.placeholder||"undefined"==typeof o.label||t.find("label").length||(t.find(":input").attr("placeholder",o.label),t.find(":input").attr("data-placeholder",o.label),t.find(".select2-selection__placeholder").text(o.label)),"undefined"!=typeof o.required?d(t,o.required):d(t,!1),"undefined"!=typeof o.priority&&t.data("priority",o.priority),"state"!==a&&("undefined"!=typeof o.hidden&&!0===o.hidden?t.hide().find(":input").val(""):t.show()),Array.isArray(o["class"])&&(t.removeClass("form-row-first form-row-last form-row-wide"),t.addClass(o["class"].join(" ")))}),e(".woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper,.woocommerce-address-fields__field-wrapper,.woocommerce-additional-fields__field-wrapper .woocommerce-account-fields").each(function(a,i){var d=e(i).find(".form-row"),r=d.first().parent(),t=0;d.each(function(){e(this).data("priority")||e(this).data("priority",t+1),t=e(this).data("priority")}),d.sort(function(a,i){var d=parseInt(e(a).data("priority"),10),r=parseInt(e(i).data("priority"),10);return d>r?1:d<r?-1:0}),d.detach().appendTo(r)})}).trigger("wc_address_i18n_ready")});
@@ -1 +1 @@
jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=+m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(n,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";r.each(c,function(e,t){r(e).replaceWith(t)}),r(document.body).trigger("wc_fragments_loaded")}catch(f){n()}}else n();0<Cookies.get("woocommerce_items_in_cart")?r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),r(document.body).on("adding_to_cart",function(){r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){n()})});
jQuery(function(e){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,r=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function n(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function o(e){t&&(localStorage.setItem(r,e),sessionStorage.setItem(r,e))}var a={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(r){r&&r.fragments&&(e.each(r.fragments,function(t,r){e(t).replaceWith(r)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(r.fragments)),o(r.cart_hash),r.cart_hash&&n()),e(document.body).trigger("wc_fragments_refreshed"))},error:function(){e(document.body).trigger("wc_fragments_ajax_error")}};function s(){e.ajax(a)}if(t){var i=null;e(document.body).on("wc_fragment_refresh updated_wc_div",function(){s()}),e(document.body).on("added_to_cart removed_from_cart",function(e,t,a){var s=sessionStorage.getItem(r);null!==s&&s!==undefined&&""!==s||n(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),o(a)}),e(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(s,864e5)}),e(window).on("storage onstorage",function(e){r===e.originalEvent.key&&localStorage.getItem(r)!==sessionStorage.getItem(r)&&s()}),e(window).on("pageshow",function(t){t.originalEvent.persisted&&(e(".widget_shopping_cart_content").empty(),e(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(r),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(s,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";e.each(c,function(t,r){e(t).replaceWith(r)}),e(document.body).trigger("wc_fragments_loaded")}catch(f){s()}}else s();Cookies.get("woocommerce_items_in_cart")>0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})});
@@ -110,7 +110,7 @@ jQuery( function( $ ) {
}
// No items to display now! Replace all cart content.
var $cart_html = $( '.cart-empty', $html ).closest( '.woocommerce' );
var $cart_html = $( '.wc-empty-cart-message', $html ).closest( '.woocommerce' );
$( '.woocommerce-cart-form__contents' ).closest( '.woocommerce' ).replaceWith( $cart_html );
// Display errors
@@ -127,7 +127,7 @@ jQuery( function( $ ) {
}
$( '.woocommerce-cart-form' ).replaceWith( $new_form );
$( '.woocommerce-cart-form' ).find( ':input[name="update_cart"]' ).prop( 'disabled', true ).attr( 'aria-disabled', true );
$( '.woocommerce-cart-form' ).find( ':input[name="update_cart"]' ).prop( 'disabled', true );
if ( $notices.length > 0 ) {
show_notice( $notices );
@@ -157,7 +157,7 @@ jQuery( function( $ ) {
var show_notice = function( html_element, $target ) {
if ( ! $target ) {
$target = $( '.woocommerce-notices-wrapper:first' ) ||
$( '.cart-empty' ).closest( '.woocommerce' ) ||
$( '.wc-empty-cart-message' ).closest( '.woocommerce' ) ||
$( '.woocommerce-cart-form' );
}
$target.prepend( html_element );
@@ -327,14 +327,14 @@ jQuery( function( $ ) {
'.woocommerce-cart-form .cart_item :input',
this.input_changed );
$( '.woocommerce-cart-form :input[name="update_cart"]' ).prop( 'disabled', true ).attr( 'aria-disabled', true );
$( '.woocommerce-cart-form :input[name="update_cart"]' ).prop( 'disabled', true );
},
/**
* After an input is changed, enable the update cart button.
*/
input_changed: function() {
$( '.woocommerce-cart-form :input[name="update_cart"]' ).prop( 'disabled', false ).attr( 'aria-disabled', false );
$( '.woocommerce-cart-form :input[name="update_cart"]' ).prop( 'disabled', false );
},
/**
File diff suppressed because one or more lines are too long
@@ -477,7 +477,7 @@ jQuery( function( $ ) {
// Trigger a handler to let gateways manipulate the checkout if needed
// eslint-disable-next-line max-len
if ( $form.triggerHandler( 'checkout_place_order' ) !== false && $form.triggerHandler( 'checkout_place_order_' + wc_checkout_form.get_payment_method() ) !== false ) {
if ( $form.triggerHandler( 'checkout_place_order', [ wc_checkout_form ] ) !== false && $form.triggerHandler( 'checkout_place_order_' + wc_checkout_form.get_payment_method(), [ wc_checkout_form ] ) !== false ) {
$form.addClass( 'processing' );
@@ -525,7 +525,7 @@ jQuery( function( $ ) {
wc_checkout_form.detachUnloadEventsOnSubmit();
try {
if ( 'success' === result.result && $form.triggerHandler( 'checkout_place_order_success', result ) !== false ) {
if ( 'success' === result.result && $form.triggerHandler( 'checkout_place_order_success', [ result, wc_checkout_form ] ) !== false ) {
if ( -1 === result.redirect.indexOf( 'https://' ) || -1 === result.redirect.indexOf( 'http://' ) ) {
window.location = result.redirect;
} else {
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(u){if("undefined"==typeof wc_country_select_params)return!1;u().selectWoo&&((t=function(){u("select.country_select:visible, select.state_select:visible").each(function(){var t=u(this),t=u.extend({placeholder:t.attr("data-placeholder")||t.attr("placeholder")||"",label:t.attr("data-label")||null,width:"100%"},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){t=t.input.length-t.maximum;return 1==t?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(t){t=t.minimum-t.input.length;return 1==t?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});u(this).on("select2:select",function(){u(this).trigger("focus")}).selectWoo(t)})})(),u(document.body).on("country_to_state_changed",function(){t()}));var t,e=wc_country_select_params.countries.replace(/&quot;/g,'"'),d=JSON.parse(e),h=".woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-address-fields,.woocommerce-shipping-calculator";u(document.body).on("change refresh","select.country_to_state, input.country_to_state",function(){var t,e,n,o=u(this).closest(h),c=(o.length||(o=u(this).closest(".form-row").parent()),u(this).val()),a=o.find("#billing_state, #shipping_state, #calc_shipping_state"),r=a.closest(".form-row"),i=a.attr("name"),s=a.attr("id"),_=a.attr("data-input-classes"),l=a.val(),p=a.attr("placeholder")||a.attr("data-placeholder")||"";d[c]?(u.isEmptyObject(d[c])?(t=u('<input type="hidden" />').prop("id",s).prop("name",i).prop("placeholder",p).attr("data-input-classes",_).addClass("hidden "+_),r.hide().find(".select2-container").remove(),a.replaceWith(t)):(e=d[c],n=u('<option value=""></option>').text(wc_country_select_params.i18n_select_state_text),p=p||wc_country_select_params.i18n_select_state_text,r.show(),a.is("input")&&(t=u("<select></select>").prop("id",s).prop("name",i).data("placeholder",p).attr("data-input-classes",_).addClass("state_select "+_),a.replaceWith(t),a=o.find("#billing_state, #shipping_state, #calc_shipping_state")),a.empty().append(n),u.each(e,function(t){t=u("<option></option>").prop("value",t).text(e[t]);a.append(t)}),a.val(l).trigger("change")),u(document.body).trigger("country_to_state_changed",[c,o])):a.is('select, input[type="hidden"]')&&(t=u('<input type="text" />').prop("id",s).prop("name",i).prop("placeholder",p).attr("data-input-classes",_).addClass("input-text "+_),r.show().find(".select2-container").remove(),a.replaceWith(t),u(document.body).trigger("country_to_state_changed",[c,o])),u(document.body).trigger("country_to_state_changing",[c,o])}),u(document.body).on("wc_address_i18n_ready",function(){u(h).each(function(){var t=u(this).find("#billing_country, #shipping_country, #calc_shipping_country");0!==t.length&&0!==t.val().length&&t.trigger("refresh")})})});
jQuery(function(t){if("undefined"==typeof wc_country_select_params)return!1;if(t().selectWoo){var e=function(){t("select.country_select:visible, select.state_select:visible").each(function(){var e=t(this),n=t.extend({placeholder:e.attr("data-placeholder")||e.attr("placeholder")||"",label:e.attr("data-label")||null,width:"100%"},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){var e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){var e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});t(this).on("select2:select",function(){t(this).trigger("focus")}).selectWoo(n)})};e(),t(document.body).on("country_to_state_changed",function(){e()})}var n=wc_country_select_params.countries.replace(/&quot;/g,'"'),o=JSON.parse(n),a=".woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-address-fields,.woocommerce-shipping-calculator";t(document.body).on("change refresh","select.country_to_state, input.country_to_state",function(){var e=t(this).closest(a);e.length||(e=t(this).closest(".form-row").parent());var n,c=t(this).val(),r=e.find("#billing_state, #shipping_state, #calc_shipping_state"),i=r.closest(".form-row"),s=r.attr("name"),_=r.attr("id"),l=r.attr("data-input-classes"),p=r.val(),u=r.attr("placeholder")||r.attr("data-placeholder")||"";if(o[c])if(t.isEmptyObject(o[c]))n=t('<input type="hidden" />').prop("id",_).prop("name",s).prop("placeholder",u).attr("data-input-classes",l).addClass("hidden "+l),i.hide().find(".select2-container").remove(),r.replaceWith(n),t(document.body).trigger("country_to_state_changed",[c,e]);else{var d=o[c],h=t('<option value=""></option>').text(wc_country_select_params.i18n_select_state_text);u||(u=wc_country_select_params.i18n_select_state_text),i.show(),r.is("input")&&(n=t("<select></select>").prop("id",_).prop("name",s).data("placeholder",u).attr("data-input-classes",l).addClass("state_select "+l),r.replaceWith(n),r=e.find("#billing_state, #shipping_state, #calc_shipping_state")),r.empty().append(h),t.each(d,function(e){var n=t("<option></option>").prop("value",e).text(d[e]);r.append(n)}),r.val(p).trigger("change"),t(document.body).trigger("country_to_state_changed",[c,e])}else r.is('select, input[type="hidden"]')&&(n=t('<input type="text" />').prop("id",_).prop("name",s).prop("placeholder",u).attr("data-input-classes",l).addClass("input-text "+l),i.show().find(".select2-container").remove(),r.replaceWith(n),t(document.body).trigger("country_to_state_changed",[c,e]));t(document.body).trigger("country_to_state_changing",[c,e])}),t(document.body).on("wc_address_i18n_ready",function(){t(a).each(function(){var e=t(this).find("#billing_country, #shipping_country, #calc_shipping_country");0!==e.length&&0!==e.val().length&&e.trigger("refresh")})})});
@@ -1 +1 @@
jQuery(function(a){var n=!1;var e,o=function(){n&&a('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var e=a(this),o=e.attr("href"),t=o.split("#");o=0<(o=t[0]).indexOf("?")?o+"&v="+n:o+"?v="+n,"undefined"!=typeof t[1]&&null!==t[1]&&(o=o+"#"+t[1]),e.attr("href",o)})},t={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(e){e.success&&e.data.hash&&e.data.hash!==n&&c(e.data.hash)}},c=function(e){Cookies.set("woocommerce_geo_hash",e,{expires:1/24});var o=0<(o=window.location.toString()).indexOf("?v=")||0<o.indexOf("&v=")?o.replace(/v=[^&]+/,"v="+e):0<o.indexOf("?")?o+"&v="+e:o+"?v="+e;window.location=o};("string"!=typeof(e=Cookies.get("woocommerce_geo_hash"))||!e.length||(n=e,0)||n&&new URLSearchParams(window.location.search).get("v")!==n)&&a.ajax(t),n&&a("form").each(function(){var e=a(this),o=e.attr("method"),t=0<e.find('input[name="v"]').length;o&&"get"===o.toLowerCase()&&!t?e.append('<input type="hidden" name="v" value="'+n+'" />'):(o=e.attr("action"))&&(0<o.indexOf("?")?e.attr("action",o+"&v="+n):e.attr("action",o+"?v="+n))}),o(),a(document.body).on("added_to_cart",function(){o()}),a(document.body).on("woocommerce_append_geo_hashes",function(){o()})});
jQuery(function(e){var o=!1;var t,a=function(){o&&e('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var t=e(this),a=t.attr("href"),n=a.split("#");a=(a=n[0]).indexOf("?")>0?a+"&v="+o:a+"?v="+o,"undefined"!=typeof n[1]&&null!==n[1]&&(a=a+"#"+n[1]),t.attr("href",a)})},n={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(e){e.success&&e.data.hash&&e.data.hash!==o&&i(e.data.hash)}},i=function(e){Cookies.set("woocommerce_geo_hash",e,{expires:1/24});var o=window.location.toString();o=o.indexOf("?v=")>0||o.indexOf("&v=")>0?o.replace(/v=[^&]+/,"v="+e):o.indexOf("?")>0?o+"&v="+e:o+"?v="+e,window.location=o};("string"!=typeof(t=Cookies.get("woocommerce_geo_hash"))||!t.length||(o=t,0)||o&&new URLSearchParams(window.location.search).get("v")!==o)&&e.ajax(n),o&&e("form").each(function(){var t=e(this),a=t.attr("method"),n=t.find('input[name="v"]').length>0;if(a&&"get"===a.toLowerCase()&&!n)t.append('<input type="hidden" name="v" value="'+o+'" />');else{var i=t.attr("action");i&&(i.indexOf("?")>0?t.attr("action",i+"&v="+o):t.attr("action",i+"?v="+o))}}),a(),e(document.body).on("added_to_cart",function(){a()}),e(document.body).on("woocommerce_append_geo_hashes",function(){a()})});
@@ -1 +1 @@
!function(a){"use strict";var d={init:function(){a(document.body).on("keyup change","form.register #reg_password, form.checkout #account_password, form.edit-account #password_1, form.lost_reset_password #password_1",this.strengthMeter),a("form.checkout #createaccount").trigger("change")},strengthMeter:function(){var s=a("form.register, form.checkout, form.edit-account, form.lost_reset_password"),r=a('button[type="submit"]',s),e=a("#reg_password, #account_password, #password_1",s),t=e.val(),o=!s.is("form.checkout");d.includeMeter(s,e),s=d.checkPasswordStrength(s,e),wc_password_strength_meter_params.stop_checkout&&(o=!0),0<t.length&&s<wc_password_strength_meter_params.min_password_strength&&-1!==s&&o?r.attr("disabled","disabled").addClass("disabled"):r.prop("disabled",!1).removeClass("disabled")},includeMeter:function(s,r){s=s.find(".woocommerce-password-strength");""===r.val()?(s.hide(),a(document.body).trigger("wc-password-strength-hide")):0===s.length?(r.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'),a(document.body).trigger("wc-password-strength-added")):(s.show(),a(document.body).trigger("wc-password-strength-show"))},checkPasswordStrength:function(s,r){var e=s.find(".woocommerce-password-strength"),s=s.find(".woocommerce-password-hint"),t='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",r=wp.passwordStrength.meter(r.val(),wp.passwordStrength.userInputDisallowedList()),o="";if(e.removeClass("short bad good strong"),s.remove(),!e.is(":hidden"))switch(r<wc_password_strength_meter_params.min_password_strength&&(o=" - "+wc_password_strength_meter_params.i18n_password_error),r){case 0:e.addClass("short").html(pwsL10n["short"]+o),e.after(t);break;case 1:case 2:e.addClass("bad").html(pwsL10n.bad+o),e.after(t);break;case 3:e.addClass("good").html(pwsL10n.good+o);break;case 4:e.addClass("strong").html(pwsL10n.strong+o);break;case 5:e.addClass("short").html(pwsL10n.mismatch)}return r}};d.init()}(jQuery);
!function(s){"use strict";var r={init:function(){s(document.body).on("keyup change","form.register #reg_password, form.checkout #account_password, form.edit-account #password_1, form.lost_reset_password #password_1",this.strengthMeter),s("form.checkout #createaccount").trigger("change")},strengthMeter:function(){var e,t=s("form.register, form.checkout, form.edit-account, form.lost_reset_password"),o=s('button[type="submit"]',t),a=s("#reg_password, #account_password, #password_1",t),d=a.val(),n=!t.is("form.checkout");r.includeMeter(t,a),e=r.checkPasswordStrength(t,a),wc_password_strength_meter_params.stop_checkout&&(n=!0),d.length>0&&e<wc_password_strength_meter_params.min_password_strength&&-1!==e&&n?o.attr("disabled","disabled").addClass("disabled"):o.prop("disabled",!1).removeClass("disabled")},includeMeter:function(r,e){var t=r.find(".woocommerce-password-strength");""===e.val()?(t.hide(),s(document.body).trigger("wc-password-strength-hide")):0===t.length?(e.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'),s(document.body).trigger("wc-password-strength-added")):(t.show(),s(document.body).trigger("wc-password-strength-show"))},checkPasswordStrength:function(s,r){var e=s.find(".woocommerce-password-strength"),t=s.find(".woocommerce-password-hint"),o='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",a=wp.passwordStrength.meter(r.val(),wp.passwordStrength.userInputDisallowedList()),d="";if(e.removeClass("short bad good strong"),t.remove(),e.is(":hidden"))return a;switch(a<wc_password_strength_meter_params.min_password_strength&&(d=" - "+wc_password_strength_meter_params.i18n_password_error),a){case 0:e.addClass("short").html(pwsL10n.short+d),e.after(o);break;case 1:case 2:e.addClass("bad").html(pwsL10n.bad+d),e.after(o);break;case 3:e.addClass("good").html(pwsL10n.good+d);break;case 4:e.addClass("strong").html(pwsL10n.strong+d);break;case 5:e.addClass("short").html(pwsL10n.mismatch)}return a}};r.init()}(jQuery);
@@ -1 +1 @@
jQuery(function(_){if("undefined"==typeof woocommerce_price_slider_params)return!1;function e(){_("input#min_price, input#max_price").hide(),_(".price_slider, .price_label").show();var e=_(".price_slider_amount #min_price").data("min"),r=_(".price_slider_amount #max_price").data("max"),i=_(".price_slider_amount").data("step")||1,c=_(".price_slider_amount #min_price").val(),o=_(".price_slider_amount #max_price").val();_(".price_slider:not(.ui-slider)").slider({range:!0,animate:!0,min:e,max:r,step:i,values:[c,o],create:function(){_(".price_slider_amount #min_price").val(c),_(".price_slider_amount #max_price").val(o),_(document.body).trigger("price_slider_create",[c,o])},slide:function(e,r){_("input#min_price").val(r.values[0]),_("input#max_price").val(r.values[1]),_(document.body).trigger("price_slider_slide",[r.values[0],r.values[1]])},change:function(e,r){_(document.body).trigger("price_slider_change",[r.values[0],r.values[1]])}})}_(document.body).on("price_slider_create price_slider_slide",function(e,r,i){_(".price_slider_amount span.from").html(accounting.formatMoney(r,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),_(".price_slider_amount span.to").html(accounting.formatMoney(i,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),_(document.body).trigger("price_slider_updated",[r,i])}),e(),_(document.body).on("init_price_filter",e),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){e()})});
jQuery(function(e){if("undefined"==typeof woocommerce_price_slider_params)return!1;function r(){e("input#min_price, input#max_price").hide(),e(".price_slider, .price_label").show();var r=e(".price_slider_amount #min_price").data("min"),i=e(".price_slider_amount #max_price").data("max"),c=e(".price_slider_amount").data("step")||1,o=e(".price_slider_amount #min_price").val(),_=e(".price_slider_amount #max_price").val();e(".price_slider:not(.ui-slider)").slider({range:!0,animate:!0,min:r,max:i,step:c,values:[o,_],create:function(){e(".price_slider_amount #min_price").val(o),e(".price_slider_amount #max_price").val(_),e(document.body).trigger("price_slider_create",[o,_])},slide:function(r,i){e("input#min_price").val(i.values[0]),e("input#max_price").val(i.values[1]),e(document.body).trigger("price_slider_slide",[i.values[0],i.values[1]])},change:function(r,i){e(document.body).trigger("price_slider_change",[i.values[0],i.values[1]])}})}e(document.body).on("price_slider_create price_slider_slide",function(r,i,c){e(".price_slider_amount span.from").html(accounting.formatMoney(i,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(".price_slider_amount span.to").html(accounting.formatMoney(c,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format})),e(document.body).trigger("price_slider_updated",[i,c])}),r(),e(document.body).on("init_price_filter",r),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){r()})});
@@ -35,7 +35,7 @@ jQuery( function( $ ) {
$tabs_wrapper.find( '.wc-tab, .panel:not(.panel .panel)' ).hide();
$tab.closest( 'li' ).addClass( 'active' );
$tabs_wrapper.find( $tab.attr( 'href' ) ).show();
$tabs_wrapper.find( '#' + $tab.attr( 'href' ).split( '#' )[1] ).show();
} )
// Review link
.on( 'click', 'a.woocommerce-review-link', function() {
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
jQuery(function(t){var o=function(e){this.$target=e,this.$formWrap=e.closest(".payment_box"),this.params=t.extend({},{is_registration_required:!1,is_logged_in:!1},wc_tokenization_form_params),this.onDisplay=this.onDisplay.bind(this),this.hideForm=this.hideForm.bind(this),this.showForm=this.showForm.bind(this),this.showSaveNewCheckbox=this.showSaveNewCheckbox.bind(this),this.hideSaveNewCheckbox=this.hideSaveNewCheckbox.bind(this),this.$target.on("click change",":input.woocommerce-SavedPaymentMethods-tokenInput",{tokenizationForm:this},this.onTokenChange),t("input#createaccount").on("change",{tokenizationForm:this},this.onCreateAccountChange),this.onDisplay()};o.prototype.onDisplay=function(){0===t(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).length&&t(":input.woocommerce-SavedPaymentMethods-tokenInput:last",this.$target).prop("checked",!0),0===this.$target.data("count")&&t(".woocommerce-SavedPaymentMethods-new",this.$target).remove(),0<t("input#createaccount").length&&t("input#createaccount").is(":checked")||this.params.is_logged_in||this.params.is_registration_required?this.showSaveNewCheckbox():this.hideSaveNewCheckbox(),t(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).trigger("change")},o.prototype.onTokenChange=function(e){"new"===t(this).val()?(e.data.tokenizationForm.showForm(),e.data.tokenizationForm.showSaveNewCheckbox()):(e.data.tokenizationForm.hideForm(),e.data.tokenizationForm.hideSaveNewCheckbox())},o.prototype.onCreateAccountChange=function(e){t(this).is(":checked")?e.data.tokenizationForm.showSaveNewCheckbox():e.data.tokenizationForm.hideSaveNewCheckbox()},o.prototype.hideForm=function(){t(".wc-payment-form",this.$formWrap).hide()},o.prototype.showForm=function(){t(".wc-payment-form",this.$formWrap).show()},o.prototype.showSaveNewCheckbox=function(){t(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).show()},o.prototype.hideSaveNewCheckbox=function(){t(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).hide()},t.fn.wc_tokenization_form=function(e){return new o(this),this},t(document.body).on("updated_checkout wc-credit-card-form-init",function(){t("ul.woocommerce-SavedPaymentMethods").each(function(){t(this).wc_tokenization_form()})})});
jQuery(function(e){var t=function(t){this.$target=t,this.$formWrap=t.closest(".payment_box"),this.params=e.extend({},{is_registration_required:!1,is_logged_in:!1},wc_tokenization_form_params),this.onDisplay=this.onDisplay.bind(this),this.hideForm=this.hideForm.bind(this),this.showForm=this.showForm.bind(this),this.showSaveNewCheckbox=this.showSaveNewCheckbox.bind(this),this.hideSaveNewCheckbox=this.hideSaveNewCheckbox.bind(this),this.$target.on("click change",":input.woocommerce-SavedPaymentMethods-tokenInput",{tokenizationForm:this},this.onTokenChange),e("input#createaccount").on("change",{tokenizationForm:this},this.onCreateAccountChange),this.onDisplay()};t.prototype.onDisplay=function(){0===e(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).length&&e(":input.woocommerce-SavedPaymentMethods-tokenInput:last",this.$target).prop("checked",!0),0===this.$target.data("count")&&e(".woocommerce-SavedPaymentMethods-new",this.$target).remove(),0<e("input#createaccount").length&&e("input#createaccount").is(":checked")||this.params.is_logged_in||this.params.is_registration_required?this.showSaveNewCheckbox():this.hideSaveNewCheckbox(),e(":input.woocommerce-SavedPaymentMethods-tokenInput:checked",this.$target).trigger("change")},t.prototype.onTokenChange=function(t){"new"===e(this).val()?(t.data.tokenizationForm.showForm(),t.data.tokenizationForm.showSaveNewCheckbox()):(t.data.tokenizationForm.hideForm(),t.data.tokenizationForm.hideSaveNewCheckbox())},t.prototype.onCreateAccountChange=function(t){e(this).is(":checked")?t.data.tokenizationForm.showSaveNewCheckbox():t.data.tokenizationForm.hideSaveNewCheckbox()},t.prototype.hideForm=function(){e(".wc-payment-form",this.$formWrap).hide()},t.prototype.showForm=function(){e(".wc-payment-form",this.$formWrap).show()},t.prototype.showSaveNewCheckbox=function(){e(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).show()},t.prototype.hideSaveNewCheckbox=function(){e(".woocommerce-SavedPaymentMethods-saveNew",this.$formWrap).hide()},e.fn.wc_tokenization_form=function(e){return new t(this,e),this},e(document.body).on("updated_checkout wc-credit-card-form-init",function(){e("ul.woocommerce-SavedPaymentMethods").each(function(){e(this).wc_tokenization_form()})})});
@@ -79,7 +79,7 @@ jQuery( function( $ ) {
}
};
// Show password visiblity hover icon on woocommerce forms
// Show password visibility hover icon on woocommerce forms
$( '.woocommerce form .woocommerce-Input[type="password"]' ).wrap( '<span class="password-input"></span>' );
// Add 'password-input' class to the password wrapper in checkout page.
$( '.woocommerce form input' ).filter(':password').parent('span').addClass('password-input');
@@ -1 +1 @@
jQuery(function(s){s(".woocommerce-ordering").on("change","select.orderby",function(){s(this).closest("form").trigger("submit")}),s("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(s(this).attr("min"));0<=o&&parseFloat(s(this).val())<o&&s(this).val(o)});var e="store_notice"+(s(".woocommerce-store-notice").data("noticeId")||"");"hidden"===Cookies.get(e)?s(".woocommerce-store-notice").hide():s(".woocommerce-store-notice").show(),s(".woocommerce-store-notice__dismiss-link").on("click",function(o){Cookies.set(e,"hidden",{path:"/"}),s(".woocommerce-store-notice").hide(),o.preventDefault()}),s(".woocommerce-input-wrapper span.description").length&&s(document.body).on("click",function(){s(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),s(".woocommerce-input-wrapper").on("click",function(o){o.stopPropagation()}),s(".woocommerce-input-wrapper :input").on("keydown",function(o){var e=s(this).parent().find("span.description");if(27===o.which&&e.length&&e.is(":visible"))return e.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=s(this).parent(),e=o.find("span.description");o.addClass("currentTarget"),s(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),e.length&&e.is(":hidden")&&e.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),s.scroll_to_notices=function(o){o.length&&s("html, body").animate({scrollTop:o.offset().top-100},1e3)},s('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),s(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),s(".password-input").append('<span class="show-password-input"></span>'),s(".show-password-input").on("click",function(){s(this).hasClass("display-password")?s(this).removeClass("display-password"):s(this).addClass("display-password"),s(this).hasClass("display-password")?s(this).siblings(['input[type="password"]']).prop("type","text"):s(this).siblings('input[type="text"]').prop("type","password")})});
jQuery(function(o){o(".woocommerce-ordering").on("change","select.orderby",function(){o(this).closest("form").trigger("submit")}),o("input.qty:not(.product-quantity input.qty)").each(function(){var e=parseFloat(o(this).attr("min"));e>=0&&parseFloat(o(this).val())<e&&o(this).val(e)});var e="store_notice"+(o(".woocommerce-store-notice").data("noticeId")||"");"hidden"===Cookies.get(e)?o(".woocommerce-store-notice").hide():o(".woocommerce-store-notice").show(),o(".woocommerce-store-notice__dismiss-link").on("click",function(s){Cookies.set(e,"hidden",{path:"/"}),o(".woocommerce-store-notice").hide(),s.preventDefault()}),o(".woocommerce-input-wrapper span.description").length&&o(document.body).on("click",function(){o(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),o(".woocommerce-input-wrapper").on("click",function(o){o.stopPropagation()}),o(".woocommerce-input-wrapper :input").on("keydown",function(e){var s=o(this).parent().find("span.description");if(27===e.which&&s.length&&s.is(":visible"))return s.prop("aria-hidden",!0).slideUp(250),e.preventDefault(),!1}).on("click focus",function(){var e=o(this).parent(),s=e.find("span.description");e.addClass("currentTarget"),o(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),s.length&&s.is(":hidden")&&s.prop("aria-hidden",!1).slideDown(250),e.removeClass("currentTarget")}),o.scroll_to_notices=function(e){e.length&&o("html, body").animate({scrollTop:e.offset().top-100},1e3)},o('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),o(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),o(".password-input").append('<span class="show-password-input"></span>'),o(".show-password-input").on("click",function(){o(this).hasClass("display-password")?o(this).removeClass("display-password"):o(this).addClass("display-password"),o(this).hasClass("display-password")?o(this).siblings(['input[type="password"]']).prop("type","text"):o(this).siblings('input[type="text"]').prop("type","password")})});
File diff suppressed because one or more lines are too long
@@ -5,4 +5,4 @@
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(a){var o=/\+/g;function s(e){return x.raw?e:encodeURIComponent(e)}function m(e,n){e=x.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(o," ")),x.json?JSON.parse(e):e}catch(n){}}(e);return"function"==typeof n?n(e):e}var x=a.cookie=function(e,n,o){var i,t;if(n!==undefined&&"function"!=typeof n)return"number"==typeof(o=a.extend({},x.defaults,o)).expires&&(i=o.expires,(t=o.expires=new Date).setTime(+t+864e5*i)),document.cookie=[s(e),"=",(t=n,s(x.json?JSON.stringify(t):String(t))),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("");for(var r=e?undefined:{},c=document.cookie?document.cookie.split("; "):[],u=0,f=c.length;u<f;u++){var d=c[u].split("="),p=(p=d.shift(),x.raw?p:decodeURIComponent(p)),d=d.join("=");if(e&&e===p){r=m(d,n);break}e||(d=m(d))===undefined||(r[p]=d)}return r};x.defaults={},a.removeCookie=function(e,n){return a.cookie(e)!==undefined&&(a.cookie(e,"",a.extend({},n,{expires:-1})),!a.cookie(e))}});
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var n=/\+/g;function o(e){return r.raw?e:encodeURIComponent(e)}function i(e,o){var i=r.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(n," ")),r.json?JSON.parse(e):e}catch(o){}}(e);return"function"==typeof o?o(i):i}var r=e.cookie=function(n,t,u){if(t!==undefined&&"function"!=typeof t){if("number"==typeof(u=e.extend({},r.defaults,u)).expires){var c=u.expires,f=u.expires=new Date;f.setTime(+f+864e5*c)}return document.cookie=[o(n),"=",function(e){return o(r.json?JSON.stringify(e):String(e))}(t),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var d,a=n?undefined:{},p=document.cookie?document.cookie.split("; "):[],s=0,m=p.length;s<m;s++){var x=p[s].split("="),y=(d=x.shift(),r.raw?d:decodeURIComponent(d)),k=x.join("=");if(n&&n===y){a=i(k,t);break}n||(k=i(k))===undefined||(a[y]=k)}return a};r.defaults={},e.removeCookie=function(n,o){return e.cookie(n)!==undefined&&(e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n))}});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(r,i,s){var n,h=r([]),a=r.resize=r.extend(r.resize,{}),u="setTimeout",o="resize",d=o+"-special-event",c="delay",f="throttleWindow";a[c]=250,a[f]=!0,r.event.special[o]={setup:function(){if(!a[f]&&this[u])return!1;var t=r(this);h=h.add(t),r.data(this,d,{w:t.width(),h:t.height()}),1===h.length&&function e(){n=i[u](function(){h.each(function(){var t=r(this),e=t.width(),i=t.height(),n=r.data(this,d);e===n.w&&i===n.h||t.trigger(o,[n.w=e,n.h=i])}),e()},a[c])}()},teardown:function(){if(!a[f]&&this[u])return!1;var t=r(this);h=h.not(t),t.removeData(d),h.length||clearTimeout(n)},add:function(t){var o;return!(!a[f]&&this[u])&&("function"==typeof t?(o=t,e):(o=t.handler,void(t.handler=e)));function e(t,e,i){var n=r(this),h=r.data(this,d);h.w=e!==s?e:n.width(),h.h=i!==s?i:n.height(),o.apply(this,arguments)}}}}(jQuery,this),jQuery.plot.plugins.push({init:function(e){function i(){var t=e.getPlaceholder();0!=t.width()&&0!=t.height()&&(e.resize(),e.setupGrid(),e.draw())}e.hooks.bindEvents.push(function(t,e){t.getPlaceholder().on("resize",i)}),e.hooks.shutdown.push(function(t,e){t.getPlaceholder().off("resize",i)})},options:{},name:"resize",version:"1.0"});
!function(t,e,i){var n,h=t([]),r=t.resize=t.extend(t.resize,{}),o="setTimeout",s="resize",a=s+"-special-event",u="delay",d="throttleWindow";r[u]=250,r[d]=!0,t.event.special[s]={setup:function(){if(!r[d]&&this[o])return!1;var i=t(this);h=h.add(i),t.data(this,a,{w:i.width(),h:i.height()}),1===h.length&&function c(){n=e[o](function(){h.each(function(){var e=t(this),i=e.width(),n=e.height(),h=t.data(this,a);i===h.w&&n===h.h||e.trigger(s,[h.w=i,h.h=n])}),c()},r[u])}()},teardown:function(){if(!r[d]&&this[o])return!1;var e=t(this);h=h.not(e),e.removeData(a),h.length||clearTimeout(n)},add:function(e){if(!r[d]&&this[o])return!1;var n;function h(e,h,r){var o=t(this),s=t.data(this,a);s.w=h!==i?h:o.width(),s.h=r!==i?r:o.height(),n.apply(this,arguments)}if("function"==typeof e)return n=e,h;n=e.handler,e.handler=h}}}(jQuery,this),function(t){jQuery.plot.plugins.push({init:function(t){function e(){var e=t.getPlaceholder();0!=e.width()&&0!=e.height()&&(t.resize(),t.setupGrid(),t.draw())}t.hooks.bindEvents.push(function(t,i){t.getPlaceholder().on("resize",e)}),t.hooks.shutdown.push(function(t,i){t.getPlaceholder().off("resize",e)})},options:{},name:"resize",version:"1.0"})}();
@@ -1 +1 @@
jQuery.plot.plugins.push({init:function(s){s.hooks.processDatapoints.push(function(s,n,t){if(null!=n.stack&&!1!==n.stack){s=function(s,n){for(var t=null,i=0;i<n.length&&s!=n[i];++i)n[i].stack==s.stack&&(t=n[i]);return t}(n,s.getData());if(s){for(var i,l,o,e,f,u,p,a=t.pointsize,r=t.points,h=s.datapoints.pointsize,c=s.datapoints.points,g=[],k=n.lines.show,s=n.bars.horizontal,m=2<a&&(s?t.format[2].x:t.format[2].y),v=k&&n.lines.steps,z=!0,b=s?1:0,d=s?0:1,y=0,D=0;;){if(y>=r.length)break;if(u=g.length,null==r[y]){for(p=0;p<a;++p)g.push(r[y+p]);y+=a}else if(D>=c.length){if(!k)for(p=0;p<a;++p)g.push(r[y+p]);y+=a}else if(null==c[D]){for(p=0;p<a;++p)g.push(null);z=!0,D+=h}else{if(i=r[y+b],l=r[y+d],o=c[D+b],e=c[D+d],f=0,i==o){for(p=0;p<a;++p)g.push(r[y+p]);g[u+d]+=e,f=e,y+=a,D+=h}else if(o<i){if(k&&0<y&&null!=r[y-a]){for(l=l+(r[y-a+d]-l)*(o-i)/(r[y-a+b]-i),g.push(o),g.push(l+e),p=2;p<a;++p)g.push(r[y+p]);f=e}D+=h}else{if(z&&k){y+=a;continue}for(p=0;p<a;++p)g.push(r[y+p]);k&&0<D&&null!=c[D-h]&&(f=e+(c[D-h+d]-e)*(i-o)/(c[D-h+b]-o)),g[u+d]+=f,y+=a}z=!1,u!=g.length&&m&&(g[u+2]+=f)}if(v&&u!=g.length&&0<u&&null!=g[u]&&g[u]!=g[u-a]&&g[u+1]!=g[u-a+1]){for(p=0;p<a;++p)g[u+a+p]=g[u+p];g[u+1]=g[u-a+1]}}t.points=g}}})},options:{series:{stack:null}},name:"stack",version:"1.2"});
!function(s){jQuery.plot.plugins.push({init:function(s){s.hooks.processDatapoints.push(function(s,n,t){if(null!=n.stack&&!1!==n.stack){var i=function(s,n){for(var t=null,i=0;i<n.length&&s!=n[i];++i)n[i].stack==s.stack&&(t=n[i]);return t}(n,s.getData());if(i){for(var l,o,e,u,f,p,a,r,h=t.pointsize,c=t.points,g=i.datapoints.pointsize,k=i.datapoints.points,v=[],m=n.lines.show,z=n.bars.horizontal,d=h>2&&(z?t.format[2].x:t.format[2].y),y=m&&n.lines.steps,D=!0,b=z?1:0,j=z?0:1,w=0,x=0;!(w>=c.length);){if(a=v.length,null==c[w]){for(r=0;r<h;++r)v.push(c[w+r]);w+=h}else if(x>=k.length){if(!m)for(r=0;r<h;++r)v.push(c[w+r]);w+=h}else if(null==k[x]){for(r=0;r<h;++r)v.push(null);D=!0,x+=g}else{if(l=c[w+b],o=c[w+j],u=k[x+b],f=k[x+j],p=0,l==u){for(r=0;r<h;++r)v.push(c[w+r]);v[a+j]+=f,p=f,w+=h,x+=g}else if(l>u){if(m&&w>0&&null!=c[w-h]){for(e=o+(c[w-h+j]-o)*(u-l)/(c[w-h+b]-l),v.push(u),v.push(e+f),r=2;r<h;++r)v.push(c[w+r]);p=f}x+=g}else{if(D&&m){w+=h;continue}for(r=0;r<h;++r)v.push(c[w+r]);m&&x>0&&null!=k[x-g]&&(p=f+(k[x-g+j]-f)*(l-u)/(k[x-g+b]-u)),v[a+j]+=p,w+=h}D=!1,a!=v.length&&d&&(v[a+2]+=p)}if(y&&a!=v.length&&a>0&&null!=v[a]&&v[a]!=v[a-h]&&v[a+1]!=v[a-h+1]){for(r=0;r<h;++r)v[a+h+r]=v[a+r];v[a+1]=v[a-h+1]}}t.points=v}}})},options:{series:{stack:null}},name:"stack",version:"1.2"})}();
@@ -1 +1 @@
!function(n){function y(e,t){return t*Math.floor(e/t)}function a(e,t,n,o){if("function"==typeof e.strftime)return e.strftime(t);var r=function(e,t){return t=""+(null==t?"0":t),1==(e=""+e).length?t+e:e},i=[],a=!1,s=e.getHours(),u=s<12;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==o&&(o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);for(var c=12<s?s-12:0==s?12:s,m=0;m<t.length;++m){var h=t.charAt(m);if(a){switch(h){case"a":h=""+o[e.getDay()];break;case"b":h=""+n[e.getMonth()];break;case"d":h=r(e.getDate());break;case"e":h=r(e.getDate()," ");break;case"h":case"H":h=r(s);break;case"I":h=r(c);break;case"l":h=r(c," ");break;case"m":h=r(e.getMonth()+1);break;case"M":h=r(e.getMinutes());break;case"q":h=""+(Math.floor(e.getMonth()/3)+1);break;case"S":h=r(e.getSeconds());break;case"y":h=r(e.getFullYear()%100);break;case"Y":h=""+e.getFullYear();break;case"p":h=u?"am":"pm";break;case"P":h=u?"AM":"PM";break;case"w":h=""+e.getDay()}i.push(h),a=!1}else"%"==h?a=!0:i.push(h)}return i.join("")}function o(e){function t(e,t,n,o){e[t]=function(){return n[o].apply(n,arguments)}}for(var n={date:e},o=(e.strftime!=undefined&&t(n,"strftime",e,"strftime"),t(n,"getTime",e,"getTime"),t(n,"setTime",e,"setTime"),["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"]),r=0;r<o.length;r++)t(n,"get"+o[r],e,"getUTC"+o[r]),t(n,"set"+o[r],e,"setUTC"+o[r]);return n}function S(e,t){var n;return"browser"==t.timezone?new Date(e):t.timezone&&"utc"!=t.timezone&&"undefined"!=typeof timezoneJS&&"undefined"!=typeof timezoneJS.Date?((n=new timezoneJS.Date).setTimezone(t.timezone),n.setTime(e),n):o(new Date(e))}var z={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},e=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],p=e.concat([[3,"month"],[6,"month"],[1,"year"]]),T=e.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);n.plot.plugins.push({init:function(e){e.hooks.processOptions.push(function(e,t){n.each(e.getAxes(),function(e,t){var g=t.options;"time"==g.mode&&(t.tickGenerator=function(e){var t=[],n=S(e.min,g),o=0,r=g.tickSize&&"quarter"===g.tickSize[1]||g.minTickSize&&"quarter"===g.minTickSize[1]?T:p;null!=g.minTickSize&&(o="number"==typeof g.tickSize?g.tickSize:g.minTickSize[0]*z[g.minTickSize[1]]);for(var i=0;i<r.length-1&&!(e.delta<(r[i][0]*z[r[i][1]]+r[i+1][0]*z[r[i+1][1]])/2&&r[i][0]*z[r[i][1]]>=o);++i);var a,s,u=r[i][0],c=("year"==(m=r[i][1])&&(null!=g.minTickSize&&"year"==g.minTickSize[1]?u=Math.floor(g.minTickSize[0]):(a=Math.pow(10,Math.floor(Math.log(e.delta/z.year)/Math.LN10)),u=(s=e.delta/z.year/a)<1.5?1:s<3?2:s<7.5?5:10,u*=a),u<1&&(u=1)),e.tickSize=g.tickSize||[u,m],e.tickSize[0]),m=e.tickSize[1],h=c*z[m],l=("second"==m?n.setSeconds(y(n.getSeconds(),c)):"minute"==m?n.setMinutes(y(n.getMinutes(),c)):"hour"==m?n.setHours(y(n.getHours(),c)):"month"==m?n.setMonth(y(n.getMonth(),c)):"quarter"==m?n.setMonth(3*y(n.getMonth()/3,c)):"year"==m&&n.setFullYear(y(n.getFullYear(),c)),n.setMilliseconds(0),z.minute<=h&&n.setSeconds(0),z.hour<=h&&n.setMinutes(0),z.day<=h&&n.setHours(0),4*z.day<=h&&n.setDate(1),2*z.month<=h&&n.setMonth(y(n.getMonth(),3)),2*z.quarter<=h&&n.setMonth(y(n.getMonth(),6)),z.year<=h&&n.setMonth(0),0),k=Number.NaN;do{var d,M,f=k,k=n.getTime()}while(t.push(k),"month"==m||"quarter"==m?c<1?(n.setDate(1),d=n.getTime(),n.setMonth(n.getMonth()+("quarter"==m?3:1)),M=n.getTime(),n.setTime(k+l*z.hour+(M-d)*c),l=n.getHours(),n.setHours(0)):n.setMonth(n.getMonth()+c*("quarter"==m?3:1)):"year"==m?n.setFullYear(n.getFullYear()+c):n.setTime(k+h),k<e.max&&k!=f);return t},t.tickFormatter=function(e,t){var n,o,r,i,e=S(e,t.options);return null!=g.timeformat?a(e,g.timeformat,g.monthNames,g.dayNames):(n=t.options.tickSize&&"quarter"==t.options.tickSize[1]||t.options.minTickSize&&"quarter"==t.options.minTickSize[1],o=t.tickSize[0]*z[t.tickSize[1]],t=t.max-t.min,r=g.twelveHourClock?" %p":"",i=g.twelveHourClock?"%I":"%H",a(e,o<z.minute?i+":%M:%S"+r:o<z.day?t<2*z.day?i+":%M"+r:"%b %d "+i+":%M"+r:o<z.month?"%b %d":n&&o<z.quarter||!n&&o<z.year?t<z.year?"%b":"%b %Y":n&&o<z.year?t<z.year?"Q%q":"Q%q %Y":"%Y",g.monthNames,g.dayNames))})})})},options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},name:"time",version:"1.0"}),n.plot.formatDate=a}(jQuery);
!function(e){function t(e,t){return t*Math.floor(e/t)}function n(e,t,n,r){if("function"==typeof e.strftime)return e.strftime(t);var i,a=function(e,t){return e=""+e,t=""+(null==t?"0":t),1==e.length?t+e:e},o=[],s=!1,u=e.getHours(),c=u<12;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==r&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),i=u>12?u-12:0==u?12:u;for(var m=0;m<t.length;++m){var l=t.charAt(m);if(s){switch(l){case"a":l=""+r[e.getDay()];break;case"b":l=""+n[e.getMonth()];break;case"d":l=a(e.getDate());break;case"e":l=a(e.getDate()," ");break;case"h":case"H":l=a(u);break;case"I":l=a(i);break;case"l":l=a(i," ");break;case"m":l=a(e.getMonth()+1);break;case"M":l=a(e.getMinutes());break;case"q":l=""+(Math.floor(e.getMonth()/3)+1);break;case"S":l=a(e.getSeconds());break;case"y":l=a(e.getFullYear()%100);break;case"Y":l=""+e.getFullYear();break;case"p":l=c?"am":"pm";break;case"P":l=c?"AM":"PM";break;case"w":l=""+e.getDay()}o.push(l),s=!1}else"%"==l?s=!0:o.push(l)}return o.join("")}function r(e){function t(e,t,n,r){e[t]=function(){return n[r].apply(n,arguments)}}var n={date:e};e.strftime!=undefined&&t(n,"strftime",e,"strftime"),t(n,"getTime",e,"getTime"),t(n,"setTime",e,"setTime");for(var r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],i=0;i<r.length;i++)t(n,"get"+r[i],e,"getUTC"+r[i]),t(n,"set"+r[i],e,"setUTC"+r[i]);return n}function i(e,t){if("browser"==t.timezone)return new Date(e);if(t.timezone&&"utc"!=t.timezone){if("undefined"!=typeof timezoneJS&&"undefined"!=typeof timezoneJS.Date){var n=new timezoneJS.Date;return n.setTimezone(t.timezone),n.setTime(e),n}return r(new Date(e))}return r(new Date(e))}var a={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},o=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],s=o.concat([[3,"month"],[6,"month"],[1,"year"]]),u=o.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);e.plot.plugins.push({init:function(r){r.hooks.processOptions.push(function(r,o){e.each(r.getAxes(),function(e,r){var o=r.options;"time"==o.mode&&(r.tickGenerator=function(e){var n=[],r=i(e.min,o),c=0,m=o.tickSize&&"quarter"===o.tickSize[1]||o.minTickSize&&"quarter"===o.minTickSize[1]?u:s;null!=o.minTickSize&&(c="number"==typeof o.tickSize?o.tickSize:o.minTickSize[0]*a[o.minTickSize[1]]);for(var l=0;l<m.length-1&&!(e.delta<(m[l][0]*a[m[l][1]]+m[l+1][0]*a[m[l+1][1]])/2&&m[l][0]*a[m[l][1]]>=c);++l);var h=m[l][0],f=m[l][1];if("year"==f){if(null!=o.minTickSize&&"year"==o.minTickSize[1])h=Math.floor(o.minTickSize[0]);else{var k=Math.pow(10,Math.floor(Math.log(e.delta/a.year)/Math.LN10)),d=e.delta/a.year/k;h=d<1.5?1:d<3?2:d<7.5?5:10,h*=k}h<1&&(h=1)}e.tickSize=o.tickSize||[h,f];var M=e.tickSize[0];f=e.tickSize[1];var g=M*a[f];"second"==f?r.setSeconds(t(r.getSeconds(),M)):"minute"==f?r.setMinutes(t(r.getMinutes(),M)):"hour"==f?r.setHours(t(r.getHours(),M)):"month"==f?r.setMonth(t(r.getMonth(),M)):"quarter"==f?r.setMonth(3*t(r.getMonth()/3,M)):"year"==f&&r.setFullYear(t(r.getFullYear(),M)),r.setMilliseconds(0),g>=a.minute&&r.setSeconds(0),g>=a.hour&&r.setMinutes(0),g>=a.day&&r.setHours(0),g>=4*a.day&&r.setDate(1),g>=2*a.month&&r.setMonth(t(r.getMonth(),3)),g>=2*a.quarter&&r.setMonth(t(r.getMonth(),6)),g>=a.year&&r.setMonth(0);var y,S=0,z=Number.NaN;do{if(y=z,z=r.getTime(),n.push(z),"month"==f||"quarter"==f)if(M<1){r.setDate(1);var p=r.getTime();r.setMonth(r.getMonth()+("quarter"==f?3:1));var T=r.getTime();r.setTime(z+S*a.hour+(T-p)*M),S=r.getHours(),r.setHours(0)}else r.setMonth(r.getMonth()+M*("quarter"==f?3:1));else"year"==f?r.setFullYear(r.getFullYear()+M):r.setTime(z+g)}while(z<e.max&&z!=y);return n},r.tickFormatter=function(e,t){var r=i(e,t.options);if(null!=o.timeformat)return n(r,o.timeformat,o.monthNames,o.dayNames);var s=t.options.tickSize&&"quarter"==t.options.tickSize[1]||t.options.minTickSize&&"quarter"==t.options.minTickSize[1],u=t.tickSize[0]*a[t.tickSize[1]],c=t.max-t.min,m=o.twelveHourClock?" %p":"",l=o.twelveHourClock?"%I":"%H";return n(r,u<a.minute?l+":%M:%S"+m:u<a.day?c<2*a.day?l+":%M"+m:"%b %d "+l+":%M"+m:u<a.month?"%b %d":s&&u<a.quarter||!s&&u<a.year?c<a.year?"%b":"%b %Y":s&&u<a.year?c<a.year?"Q%q":"Q%q %Y":"%Y",o.monthNames,o.dayNames)})})})},options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},name:"time",version:"1.0"}),e.plot.formatDate=n}(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(O){O.fn.tipTip=function(t){var g,b,M,w=O.extend({activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},t);return O("#tiptip_holder").length<=0?(g=O('<div id="tiptip_holder" style="max-width:'+w.maxWidth+';"></div>'),b=O('<div id="tiptip_content"></div>'),M=O('<div id="tiptip_arrow"></div>'),O("body").append(g.html(b).prepend(M.html('<div id="tiptip_arrow_inner"></div>')))):(g=O("#tiptip_holder"),b=O("#tiptip_content"),M=O("#tiptip_arrow")),this.each(function(){var _,m,v=O(this);function t(){var t,e,o,n,i,r,a,f,d,u,p,s,l,c,h="function"==typeof w.content?w.content():_;h&&(w.enter.call(this),b.html(h),g.hide().css("margin","0"),g.removeAttr("class"),M.removeAttr("style"),h=parseInt(v.offset().top),t=parseInt(v.offset().left),l=parseInt(v.outerWidth()),e=parseInt(v.outerHeight()),o=g.outerWidth(),n=g.outerHeight(),i=Math.round((l-o)/2),r=Math.round((e-n)/2),a=Math.round(t+i),f=Math.round(h+e+w.edgeOffset),u=d="",p=Math.round(o-12)/2,"bottom"==w.defaultPosition?d="_bottom":"top"==w.defaultPosition?d="_top":"left"==w.defaultPosition?d="_left":"right"==w.defaultPosition&&(d="_right"),s=i+t<parseInt(O(window).scrollLeft()),c=o+t>parseInt(O(window).width()),s&&i<0||"_right"==d&&!c||"_left"==d&&t<o+w.edgeOffset+5?(d="_right",u=Math.round(n-13)/2,p=-12,a=Math.round(t+l+w.edgeOffset),f=Math.round(h+r)):(c&&i<0||"_left"==d&&!s)&&(d="_left",u=Math.round(n-13)/2,p=Math.round(o),a=Math.round(t-(o+w.edgeOffset+5)),f=Math.round(h+r)),l=h+e+w.edgeOffset+n+8>parseInt(O(window).height()+O(window).scrollTop()),c=h+e-(w.edgeOffset+n+8)<0,l||"_bottom"==d&&l||"_top"==d&&!c?("_top"==d||"_bottom"==d?d="_top":d+="_top",u=n,f=Math.round(h-(n+5+w.edgeOffset))):(c|("_top"==d&&c)||"_bottom"==d&&!l)&&("_top"==d||"_bottom"==d?d="_bottom":d+="_bottom",u=-12,f=Math.round(h+e+w.edgeOffset)),"_right_top"==d||"_left_top"==d?f+=5:"_right_bottom"!=d&&"_left_bottom"!=d||(f-=5),"_left_top"!=d&&"_left_bottom"!=d||(a+=5),M.css({"margin-left":p+"px","margin-top":u+"px"}),g.css({"margin-left":a+"px","margin-top":f+"px"}).attr("class","tip"+d),m&&clearTimeout(m),m=setTimeout(function(){g.stop(!0,!0).fadeIn(w.fadeIn)},w.delay))}function e(){w.exit.call(this),m&&clearTimeout(m),g.fadeOut(w.fadeOut)}""!=(_=w.content||v.attr(w.attribute))&&(w.content||v.removeAttr(w.attribute),m=!1,"hover"==w.activation?(v.on("mouseenter",function(){t()}).on("mouseleave",function(){w.keepAlive&&g.is(":hover")||e()}),w.keepAlive&&g.on("mouseenter",function(){}).on("mouseleave",function(){e()})):"focus"==w.activation?v.on("focus",function(){t()}).on("blur",function(){e()}):"click"==w.activation&&(v.on("click",function(){return t(),!1}).on("mouseenter",function(){}).on("mouseleave",function(){w.keepAlive||e()}),w.keepAlive&&g.on("mouseenter",function(){}).on("mouseleave",function(){e()})))})}}(jQuery);
!function(t){t.fn.tipTip=function(e){var o=t.extend({activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},e);if(t("#tiptip_holder").length<=0){var n=t('<div id="tiptip_holder" style="max-width:'+o.maxWidth+';"></div>'),i=t('<div id="tiptip_content"></div>'),r=t('<div id="tiptip_arrow"></div>');t("body").append(n.html(i).prepend(r.html('<div id="tiptip_arrow_inner"></div>')))}else n=t("#tiptip_holder"),i=t("#tiptip_content"),r=t("#tiptip_arrow");return this.each(function(){var e=t(this);if(o.content)var a=o.content;else a=e.attr(o.attribute);if(""!=a){o.content||e.removeAttr(o.attribute);var f=!1;function d(){var d="function"==typeof o.content?o.content():a;if(d){o.enter.call(this),i.html(d),n.hide().css("margin","0"),n.removeAttr("class"),r.removeAttr("style");var u=parseInt(e.offset().top),p=parseInt(e.offset().left),s=parseInt(e.outerWidth()),l=parseInt(e.outerHeight()),c=n.outerWidth(),h=n.outerHeight(),_=Math.round((s-c)/2),m=Math.round((l-h)/2),v=Math.round(p+_),g=Math.round(u+l+o.edgeOffset),b="",M="",w=Math.round(c-12)/2;"bottom"==o.defaultPosition?b="_bottom":"top"==o.defaultPosition?b="_top":"left"==o.defaultPosition?b="_left":"right"==o.defaultPosition&&(b="_right");var O=_+p<parseInt(t(window).scrollLeft()),x=c+p>parseInt(t(window).width());O&&_<0||"_right"==b&&!x||"_left"==b&&p<c+o.edgeOffset+5?(b="_right",M=Math.round(h-13)/2,w=-12,v=Math.round(p+s+o.edgeOffset),g=Math.round(u+m)):(x&&_<0||"_left"==b&&!O)&&(b="_left",M=Math.round(h-13)/2,w=Math.round(c),v=Math.round(p-(c+o.edgeOffset+5)),g=Math.round(u+m));var I=u+l+o.edgeOffset+h+8>parseInt(t(window).height()+t(window).scrollTop()),A=u+l-(o.edgeOffset+h+8)<0;I||"_bottom"==b&&I||"_top"==b&&!A?("_top"==b||"_bottom"==b?b="_top":b+="_top",M=h,g=Math.round(u-(h+5+o.edgeOffset))):(A|("_top"==b&&A)||"_bottom"==b&&!I)&&("_top"==b||"_bottom"==b?b="_bottom":b+="_bottom",M=-12,g=Math.round(u+l+o.edgeOffset)),"_right_top"==b||"_left_top"==b?g+=5:"_right_bottom"!=b&&"_left_bottom"!=b||(g-=5),"_left_top"!=b&&"_left_bottom"!=b||(v+=5),r.css({"margin-left":w+"px","margin-top":M+"px"}),n.css({"margin-left":v+"px","margin-top":g+"px"}).attr("class","tip"+b),f&&clearTimeout(f),f=setTimeout(function(){n.stop(!0,!0).fadeIn(o.fadeIn)},o.delay)}}function u(){o.exit.call(this),f&&clearTimeout(f),n.fadeOut(o.fadeOut)}"hover"==o.activation?(e.on("mouseenter",function(){d()}).on("mouseleave",function(){o.keepAlive&&n.is(":hover")||u()}),o.keepAlive&&n.on("mouseenter",function(){}).on("mouseleave",function(){u()})):"focus"==o.activation?e.on("focus",function(){d()}).on("blur",function(){u()}):"click"==o.activation&&(e.on("click",function(){return d(),!1}).on("mouseenter",function(){}).on("mouseleave",function(){o.keepAlive||u()}),o.keepAlive&&n.on("mouseenter",function(){}).on("mouseleave",function(){u()}))}})}}(jQuery);
@@ -8,4 +8,4 @@
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
!function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.on({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.off({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery);
!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var o,e=t.ui.mouse.prototype,u=e._mouseInit,n=e._mouseDestroy;e._touchStart=function(t){!o&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(o=!0,this._touchMoved=!1,c(t,"mouseover"),c(t,"mousemove"),c(t,"mousedown"))},e._touchMove=function(t){o&&(this._touchMoved=!0,c(t,"mousemove"))},e._touchEnd=function(t){o&&(c(t,"mouseup"),c(t,"mouseout"),this._touchMoved||c(t,"click"),o=!1)},e._mouseInit=function(){this.element.on({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),u.call(this)},e._mouseDestroy=function(){this.element.off({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),n.call(this)}}function c(t,o){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var e=t.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(o,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(u)}}}(jQuery);
@@ -5,4 +5,4 @@
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
!function(e){var n,o,t=!1;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),t||(n=window.Cookies,(o=window.Cookies=e()).noConflict=function(){return window.Cookies=n,o})}(function(){function m(){for(var e=0,n={};e<arguments.length;e++){var o,t=arguments[e];for(o in t)n[o]=t[o]}return n}return function e(C){function g(e,n,o){var t,r;if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(o=m({path:"/"},g.defaults,o)).expires&&((r=new Date).setMilliseconds(r.getMilliseconds()+864e5*o.expires),o.expires=r),o.expires=o.expires?o.expires.toUTCString():"";try{t=JSON.stringify(n),/^[\{\[]/.test(t)&&(n=t)}catch(l){}n=C.write?C.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var i,c="";for(i in o)o[i]&&(c+="; "+i,!0!==o[i]&&(c+="="+o[i]));return document.cookie=e+"="+n+c}e||(t={});for(var s=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,p=0;p<s.length;p++){var a=s[p].split("=");'"'===(u=a.slice(1).join("=")).charAt(0)&&(u=u.slice(1,-1));try{var d=a[0].replace(f,decodeURIComponent),u=C.read?C.read(u,d):C(u,d)||u.replace(f,decodeURIComponent);if(this.json)try{u=JSON.parse(u)}catch(l){}if(e===d){t=u;break}e||(t[d]=u)}catch(l){}}return t}}return(g.set=g).get=function(e){return g.call(g,e)},g.getJSON=function(){return g.apply({json:!0},[].slice.call(arguments))},g.defaults={},g.remove=function(e,n){g(e,"",m(n,{expires:-1}))},g.withConverter=e,g}(function(){})});
!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}return function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");'"'===C.charAt(0)&&(C=C.slice(1,-1));try{var g=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,g):o(C,g)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(m){}if(n===g){c=C;break}n||(c[g]=C)}catch(m){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}(function(){})});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
function round(a,e,r){var _,c,s;if(e|=0,c=(a*=e=Math.pow(10,e))%1==.5*(s=0<a|-(a<0)),_=Math.floor(a),c)switch(r){case"2":case"PHP_ROUND_HALF_DOWN":a=_+(s<0);break;case"3":case"PHP_ROUND_HALF_EVEN":a=_+_%2*s;break;case"4":case"PHP_ROUND_HALF_ODD":a=_+!(_%2);break;default:a=_+(0<s)}return(c?a:Math.round(a))/e}
function round(a,e,r){var _,c,s,t;if(e|=0,s=(a*=_=Math.pow(10,e))%1==.5*(t=a>0|-(a<0)),c=Math.floor(a),s)switch(r){case"2":case"PHP_ROUND_HALF_DOWN":a=c+(t<0);break;case"3":case"PHP_ROUND_HALF_EVEN":a=c+c%2*t;break;case"4":case"PHP_ROUND_HALF_ODD":a=c+!(c%2);break;default:a=c+(t>0)}return(s?a:Math.round(a))/_}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
!function(c){c.fn.stupidtable=function(a){return this.each(function(){var r=c(this);a=a||{},a=c.extend({},c.fn.stupidtable.default_sort_fns,a),r.on("click.stupidtable","thead th",function(){var t=c(this),i=0,s=c.fn.stupidtable.dir,o=(t.parents("tr").find("th").slice(0,t.index()+1).each(function(){var t=c(this).attr("colspan")||1;i+=parseInt(t,10)}),i-=1,t.data("sortDefault")||s.ASC),n=(t.data("sortDir")&&(o=t.data("sortDir")===s.ASC?s.DESC:s.ASC),t.data("sort")||null);null!==n&&(r.trigger("beforetablesort",{column:t.index(),direction:o}),r.css("display"),setTimeout(function(){var e=a[n];r.children("tbody").each(function(t,n){var a=[],n=c(n),r=n.children("tr").not("[data-sort-ignore]");r.each(function(t,n){var r=c(n).children().eq(i),e=r.data("sortValue"),e=void 0!==e?e:r.text();a.push([e,n])}),a.sort(function(t,n){return e(t[0],n[0])}),o!=s.ASC&&a.reverse(),r=c.map(a,function(t){return t[1]}),n.append(r)}),r.find("th").data("sortDir",null).removeClass("sorting-desc sorting-asc"),t.data("sortDir",o).addClass("sorting-"+o),r.trigger("aftertablesort",{column:t.index(),direction:o}),r.css("display")},10))})})},c.fn.stupidtable.dir={ASC:"asc",DESC:"desc"},c.fn.stupidtable.default_sort_fns={"int":function(t,n){return parseInt(t,10)-parseInt(n,10)},"float":function(t,n){return parseFloat(t)-parseFloat(n)},string:function(t,n){return t.localeCompare(n)},"string-ins":function(t,n){return t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase(),t.localeCompare(n)}}}(jQuery);
!function(t){t.fn.stupidtable=function(r){return this.each(function(){var n=t(this);r=r||{},r=t.extend({},t.fn.stupidtable.default_sort_fns,r),n.on("click.stupidtable","thead th",function(){var a=t(this),e=0,i=t.fn.stupidtable.dir;a.parents("tr").find("th").slice(0,a.index()+1).each(function(){var r=t(this).attr("colspan")||1;e+=parseInt(r,10)}),e-=1;var s=a.data("sortDefault")||i.ASC;a.data("sortDir")&&(s=a.data("sortDir")===i.ASC?i.DESC:i.ASC);var o=a.data("sort")||null;null!==o&&(n.trigger("beforetablesort",{column:a.index(),direction:s}),n.css("display"),setTimeout(function(){var c=r[o];n.children("tbody").each(function(r,n){var a=[],o=t(n),d=o.children("tr").not("[data-sort-ignore]");d.each(function(r,n){var i=t(n).children().eq(e),s=i.data("sortValue"),o=void 0!==s?s:i.text();a.push([o,n])}),a.sort(function(t,r){return c(t[0],r[0])}),s!=i.ASC&&a.reverse(),d=t.map(a,function(t){return t[1]}),o.append(d)}),n.find("th").data("sortDir",null).removeClass("sorting-desc sorting-asc"),a.data("sortDir",s).addClass("sorting-"+s),n.trigger("aftertablesort",{column:a.index(),direction:s}),n.css("display")},10))})})},t.fn.stupidtable.dir={ASC:"asc",DESC:"desc"},t.fn.stupidtable.default_sort_fns={int:function(t,r){return parseInt(t,10)-parseInt(r,10)},float:function(t,r){return parseFloat(t)-parseFloat(r)},string:function(t,r){return t.localeCompare(r)},"string-ins":function(t,r){return t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase(),t.localeCompare(r)}}}(jQuery);
@@ -3,4 +3,4 @@
license: MIT
http://www.jacklmoore.com/zoom
*/
!function(d){var n={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};d.zoom=function(o,t,e,n){var i,u,a,c,r,l,m,f=d(o),s=f.css("position"),h=d(t);return o.style.position=/(absolute|fixed)/.test(s)?s:"relative",o.style.overflow="hidden",e.style.width=e.style.height="",d(e).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*n,height:e.height*n,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(o),{init:function(){u=f.outerWidth(),i=f.outerHeight(),a=t===o?(c=u,i):(c=h.outerWidth(),h.outerHeight()),r=(e.width-u)/c,l=(e.height-i)/a,m=h.offset()},move:function(o){var t=o.pageX-m.left,o=o.pageY-m.top,o=Math.max(Math.min(o,a),0),t=Math.max(Math.min(t,c),0);e.style.left=t*-r+"px",e.style.top=o*-l+"px"}}},d.fn.zoom=function(e){return this.each(function(){var i=d.extend({},n,e||{}),u=i.target&&d(i.target)[0]||this,o=this,a=d(o),c=document.createElement("img"),r=d(c),l="mousemove.zoom",m=!1,f=!1;if(!i.url){var t=o.querySelector("img");if(t&&(i.url=t.getAttribute("data-src")||t.currentSrc||t.src,i.alt=t.getAttribute("data-alt")||t.alt),!i.url)return}a.one("zoom.destroy",function(o,t){a.off(".zoom"),u.style.position=o,u.style.overflow=t,c.onload=null,r.remove()}.bind(this,u.style.position,u.style.overflow)),c.onload=function(){var t=d.zoom(u,o,c,i.magnify);function e(o){t.init(),t.move(o),r.stop().fadeTo(d.support.opacity?i.duration:0,1,"function"==typeof i.onZoomIn&&i.onZoomIn.call(c))}function n(){r.stop().fadeTo(i.duration,0,"function"==typeof i.onZoomOut&&i.onZoomOut.call(c))}"grab"===i.on?a.on("mousedown.zoom",function(o){1===o.which&&(d(document).one("mouseup.zoom",function(){n(),d(document).off(l,t.move)}),e(o),d(document).on(l,t.move),o.preventDefault())}):"click"===i.on?a.on("click.zoom",function(o){if(!m)return m=!0,e(o),d(document).on(l,t.move),d(document).one("click.zoom",function(){n(),m=!1,d(document).off(l,t.move)}),!1}):"toggle"===i.on?a.on("click.zoom",function(o){m?n():e(o),m=!m}):"mouseover"===i.on&&(t.init(),a.on("mouseenter.zoom",e).on("mouseleave.zoom",n).on(l,t.move)),i.touch&&a.on("touchstart.zoom",function(o){o.preventDefault(),f?(f=!1,n()):(f=!0,e(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),t.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),f&&(f=!1,n())}),"function"==typeof i.callback&&i.callback.call(c)},c.setAttribute("role","presentation"),c.alt=i.alt||"",c.src=i.url})},d.fn.zoom.defaults=n}(window.jQuery);
!function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,e,n,i){var u,a,c,r,l,m,f,s=o(t),h=s.css("position"),d=o(e);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",n.style.width=n.style.height="",o(n).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:n.width*i,height:n.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){a=s.outerWidth(),u=s.outerHeight(),e===t?(r=a,c=u):(r=d.outerWidth(),c=d.outerHeight()),l=(n.width-a)/r,m=(n.height-u)/c,f=d.offset()},move:function(o){var t=o.pageX-f.left,e=o.pageY-f.top;e=Math.max(Math.min(e,c),0),t=Math.max(Math.min(t,r),0),n.style.left=t*-l+"px",n.style.top=e*-m+"px"}}},o.fn.zoom=function(e){return this.each(function(){var n=o.extend({},t,e||{}),i=n.target&&o(n.target)[0]||this,u=this,a=o(u),c=document.createElement("img"),r=o(c),l="mousemove.zoom",m=!1,f=!1;if(!n.url){var s=u.querySelector("img");if(s&&(n.url=s.getAttribute("data-src")||s.currentSrc||s.src,n.alt=s.getAttribute("data-alt")||s.alt),!n.url)return}a.one("zoom.destroy",function(o,t){a.off(".zoom"),i.style.position=o,i.style.overflow=t,c.onload=null,r.remove()}.bind(this,i.style.position,i.style.overflow)),c.onload=function(){var t=o.zoom(i,u,c,n.magnify);function e(e){t.init(),t.move(e),r.stop().fadeTo(o.support.opacity?n.duration:0,1,"function"==typeof n.onZoomIn&&n.onZoomIn.call(c))}function s(){r.stop().fadeTo(n.duration,0,"function"==typeof n.onZoomOut&&n.onZoomOut.call(c))}"grab"===n.on?a.on("mousedown.zoom",function(n){1===n.which&&(o(document).one("mouseup.zoom",function(){s(),o(document).off(l,t.move)}),e(n),o(document).on(l,t.move),n.preventDefault())}):"click"===n.on?a.on("click.zoom",function(n){return m?void 0:(m=!0,e(n),o(document).on(l,t.move),o(document).one("click.zoom",function(){s(),m=!1,o(document).off(l,t.move)}),!1)}):"toggle"===n.on?a.on("click.zoom",function(o){m?s():e(o),m=!m}):"mouseover"===n.on&&(t.init(),a.on("mouseenter.zoom",e).on("mouseleave.zoom",s).on(l,t.move)),n.touch&&a.on("touchstart.zoom",function(o){o.preventDefault(),f?(f=!1,s()):(f=!0,e(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),t.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),f&&(f=!1,s())}),"function"==typeof n.callback&&n.callback.call(c)},c.setAttribute("role","presentation"),c.alt=n.alt||"",c.src=n.url})},o.fn.zoom.defaults=t}(window.jQuery);