From bd785f99f556f731fbe0e2cbc738f3ce1b2c81ad Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 12 Mar 2012 15:58:13 +0000 Subject: [PATCH] required field rating --- assets/js/woocommerce.js | 9 +++++++++ assets/js/woocommerce.min.js | 2 +- woocommerce.php | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/js/woocommerce.js b/assets/js/woocommerce.js index f5211f10845..5c489ae41da 100755 --- a/assets/js/woocommerce.js +++ b/assets/js/woocommerce.js @@ -125,6 +125,15 @@ jQuery(document).ready(function($) { return false; }); + $('#review_form #submit').live('click', function(){ + var rating = $('#rating').val(); + + if (!rating) { + alert(woocommerce_params.required_rating_text); + return false; + } + }); + // Quantity buttons $("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass('buttons_added').append('').prepend(''); diff --git a/assets/js/woocommerce.min.js b/assets/js/woocommerce.min.js index c33f4883135..ee8837f1cf7 100644 --- a/assets/js/woocommerce.min.js +++ b/assets/js/woocommerce.min.js @@ -10,4 +10,4 @@ * http://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! - */(function(a){function h(c,h){var j=c==window,l=h&&h.message!==undefined?h.message:undefined;h=a.extend({},a.blockUI.defaults,h||{});h.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,h.overlayCSS||{});var p=a.extend({},a.blockUI.defaults.css,h.css||{}),q=a.extend({},a.blockUI.defaults.themedCSS,h.themedCSS||{});l=l===undefined?h.message:l;j&&f&&i(window,{fadeOut:0});if(l&&typeof l!="string"&&(l.parentNode||l.jquery)){var r=l.jquery?l[0]:l,s={};a(c).data("blockUI.history",s);s.el=r;s.parent=r.parentNode;s.display=r.style.display;s.position=r.style.position;s.parent&&s.parent.removeChild(r)}a(c).data("blockUI.onUnblock",h.onUnblock);var t=h.baseZ,u=a.browser.msie||h.forceIframe?a(''):a(''),v=h.theme?a(''):a(''),w,x;h.theme&&j?x='":h.theme?x='":j?x='':x='';w=a(x);if(l)if(h.theme){w.css(q);w.addClass("ui-widget-content")}else w.css(p);!h.theme&&(!h.applyPlatformOpacityRules||!a.browser.mozilla||!/Linux/.test(navigator.platform))&&v.css(h.overlayCSS);v.css("position",j?"fixed":"absolute");(a.browser.msie||h.forceIframe)&&u.css("opacity",0);var y=[u,v,w],z=j?a("body"):a(c);a.each(y,function(){this.appendTo(z)});h.theme&&h.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var A=d&&(!a.boxModel||a("object,embed",j?null:c).length>0);if(e||A){j&&h.allowBodyStretch&&a.boxModel&&a("html,body").css("height","100%");if((e||!a.boxModel)&&!j)var B=o(c,"borderTopWidth"),C=o(c,"borderLeftWidth"),D=B?"(0 - "+B+")":0,E=C?"(0 - "+C+")":0;a.each([u,v,w],function(a,b){var c=b[0].style;c.position="absolute";if(a<2){j?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"');j?c.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"');E&&c.setExpression("left",E);D&&c.setExpression("top",D)}else if(h.centerY){j&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');c.marginTop=0}else if(!h.centerY&&j){var d=h.css&&h.css.top?parseInt(h.css.top):0,e="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+d+') + "px"';c.setExpression("top",e)}})}if(l){h.theme?w.find(".ui-widget-content").append(l):w.append(l);(l.jquery||l.nodeType)&&a(l).show()}(a.browser.msie||h.forceIframe)&&h.showOverlay&&u.show();if(h.fadeIn){var F=h.onBlock?h.onBlock:b,G=h.showOverlay&&!l?F:b,H=l?F:b;h.showOverlay&&v._fadeIn(h.fadeIn,G);l&&w._fadeIn(h.fadeIn,H)}else{h.showOverlay&&v.show();l&&w.show();h.onBlock&&h.onBlock()}k(1,c,h);if(j){f=w[0];g=a(":input:enabled:visible",f);h.focusInput&&setTimeout(m,20)}else n(w[0],h.centerX,h.centerY);if(h.timeout){var I=setTimeout(function(){j?a.unblockUI(h):a(c).unblock(h)},h.timeout);a(c).data("blockUI.timeout",I)}}function i(b,c){var d=b==window,e=a(b),h=e.data("blockUI.history"),i=e.data("blockUI.timeout");if(i){clearTimeout(i);e.removeData("blockUI.timeout")}c=a.extend({},a.blockUI.defaults,c||{});k(0,b,c);if(c.onUnblock===null){c.onUnblock=e.data("blockUI.onUnblock");e.removeData("blockUI.onUnblock")}var l;d?l=a("body").children().filter(".blockUI").add("body > .blockUI"):l=a(".blockUI",b);d&&(f=g=null);if(c.fadeOut){l.fadeOut(c.fadeOut);setTimeout(function(){j(l,h,c,b)},c.fadeOut)}else j(l,h,c,b)}function j(b,c,d,e){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)});if(c&&c.el){c.el.style.display=c.display;c.el.style.position=c.position;c.parent&&c.parent.appendChild(c.el);a(e).removeData("blockUI.history")}typeof d.onUnblock=="function"&&d.onUnblock(e,d)}function k(b,c,d){var e=c==window,g=a(c);if(!b&&(e&&!f||!e&&!g.data("blockUI.isBlocked")))return;e||g.data("blockUI.isBlocked",b);if(!d.bindEvents||b&&!d.showOverlay)return;var h="mousedown mouseup keydown keypress";b?a(document).bind(h,d,l):a(document).unbind(h,l)}function l(b){if(b.keyCode&&b.keyCode==9&&f&&b.data.constrainTabKey){var c=g,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e){setTimeout(function(){m(e)},10);return!1}}var h=b.data;return a(b.target).parents("div."+h.blockMsgClass).length>0?!0:a(b.target).parents().children().filter("div.blockUI").length==0}function m(a){if(!g)return;var b=g[a===!0?g.length-1:0];b&&b.focus()}function n(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-o(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-o(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0");c&&(e.top=g>0?g+"px":"0")}function o(b,c){return parseInt(a.css(b,c))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery)||/^1.1/.test(a.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+a.fn.jquery);return}a.fn._fadeIn=a.fn.fadeIn;var b=function(){},c=document.documentMode||0,d=a.browser.msie&&(a.browser.version<8&&!c||c<8),e=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!c;a.blockUI=function(a){h(window,a)};a.unblockUI=function(a){i(window,a)};a.growlUI=function(b,c,d,e){var f=a('
');b&&f.append("

"+b+"

");c&&f.append("

"+c+"

");d==undefined&&(d=3e3);a.blockUI({message:f,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:d,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};a.fn.block=function(b){return this.unblock({fadeOut:0}).each(function(){a.css(this,"position")=="static"&&(this.style.position="relative");a.browser.msie&&(this.style.zoom=1);h(this,b)})};a.fn.unblock=function(a){return this.each(function(){i(this,a)})};a.blockUI.version=2.39;a.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var f=null,g=[]})(jQuery);(function(a){function b(b){this.input=b;b.attr("type")=="password"&&this.handlePassword();a(b[0].form).submit(function(){b.hasClass("placeholder")&&b[0].value==b.attr("placeholder")&&(b[0].value="")})}b.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var b=this.input;b.attr("realType","password");this.isPassword=!0;if(a.browser.msie&&b[0].outerHTML){var c=a(b[0].outerHTML.replace(/type=(['"])?password\1/gi,"type=$1text$1"));this.fakePassword=c.val(b.attr("placeholder")).addClass("placeholder").focus(function(){b.trigger("focus");a(this).hide()});a(b[0].form).submit(function(){c.remove();b.show()})}}};var c="placeholder"in document.createElement("input");a.fn.placeholder=function(){return c?this:this.each(function(){var c=a(this),e=new b(c);e.show(!0);c.focus(function(){e.hide()});c.blur(function(){e.show(!1)});a.browser.msie&&(a(window).load(function(){c.val()&&c.removeClass("placeholder");e.show(!0)}),c.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery);jQuery(document).ready(function(a){function d(a,b){var c=!0;for(name in a){var d=a[name],e=b[name];d.length!=0&&e.length!=0&&d!=e&&(c=!1)}return c}function e(a){var b=[];for(var c=0;c").html(g).text();g=g.replace(/'/g,"\\'");g=g.replace(/"/g,'\\"');current_attr_select.find('option[value="'+g+'"]').removeAttr("disabled")}else current_attr_select.find("option").removeAttr("disabled")}}})}function g(b){var c=a("div.images img:eq(0)"),d=a("div.images a.zoom:eq(0)"),e=a(c).attr("original-src"),f=a(d).attr("original-href"),g=b.image_src,h=b.image_link;a(".variations_button").show();a(".single_variation").html(b.price_html+b.availability_html);e||a(c).attr("original-src",a(c).attr("src"));f||a(d).attr("original-href",a(d).attr("href"));if(g&&g.length>1){a(c).attr("src",g);a(d).attr("href",h)}else{a(c).attr("src",e);a(d).attr("href",f)}b.sku?a(".product_meta").find(".sku").text(b.sku):a(".product_meta").find(".sku").text("");b.min_qty?a(".single_variation_wrap").find("input[name=quantity]").attr("data-min",b.min_qty).val(b.min_qty):a(".single_variation_wrap").find("input[name=quantity]").removeAttr("data-min");b.max_qty?a(".single_variation_wrap").find("input[name=quantity]").attr("data-max",b.max_qty):a(".single_variation_wrap").find("input[name=quantity]").removeAttr("data-max");b.is_virtual=="yes"&&b.is_downloadable=="yes"&&woocommerce_params.option_limit_download_qty=="yes"&&a(".single_variation_wrap").find("input[name=quantity]").attr("data-max",1);a(".single_variation_wrap").slideDown("200").trigger("variationWrapShown").trigger("show_variation")}function h(b){var c=!0,d=!1,h={};a(".variations select").each(function(){if(b&&a(this).attr("name")==b){c=!1;h[a(this).attr("name")]=""}else{a(this).val().length==0?c=!1:d=!0;value=a(this).val().replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">");h[a(this).attr("name")]=value}});var i=e(h);if(c){var j=i.pop();if(j){a("form input[name=variation_id]").val(j.variation_id).change();g(j)}else a(".variations select").val("")}else f(i);d?a(".reset_variations").css("visibility")=="hidden"&&a(".reset_variations").css("visibility","visible").hide().fadeIn():a(".reset_variations").css("visibility","hidden")}woocommerce_params.option_ajax_add_to_cart=="yes"&&a(".add_to_cart_button").live("click",function(){var b=a(this);if(b.is(".product_type_simple, .product_type_downloadable, .product_type_virtual")){if(!b.attr("data-product_id"))return!0;b.removeClass("added");b.addClass("loading");var c={action:"woocommerce_add_to_cart",product_id:b.attr("data-product_id"),security:woocommerce_params.add_to_cart_nonce};a("body").trigger("adding_to_cart");a.post(woocommerce_params.ajax_url,c,function(d){b.removeClass("loading");c=a.parseJSON(d);if(c.error&&c.product_url){window.location=c.product_url;return}fragments=c;fragments&&a.each(fragments,function(b,c){a(b).addClass("updating")});a(".widget_shopping_cart, .shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});b.addClass("added");if(a(".widget_shopping_cart").size()>0)a(".widget_shopping_cart:eq(0)").load(window.location+" .widget_shopping_cart:eq(0) > *",function(){fragments&&a.each(fragments,function(b,c){a(b).replaceWith(c)});a(".widget_shopping_cart, .updating").css("opacity","1").unblock();a("body").trigger("cart_widget_refreshed")});else{fragments&&a.each(fragments,function(b,c){a(b).replaceWith(c)});a(".widget_shopping_cart, .updating").css("opacity","1").unblock()}a(".shop_table.cart").load(window.location+" .shop_table.cart:eq(0) > *",function(){a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');a(".shop_table.cart").css("opacity","1").unblock();a("body").trigger("cart_page_refreshed")});a(".cart_totals").load(window.location+" .cart_totals:eq(0) > *",function(){a(".cart_totals").css("opacity","1").unblock()});a("body").trigger("added_to_cart")});return!1}return!0});a("select.orderby").change(function(){a(this).closest("form").submit()});a("#rating").hide().before('

12345

');a("p.stars a").click(function(){var b=a(this);a("#rating").val(b.text());a("p.stars a").removeClass("active");b.addClass("active");return!1});a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');a("div.quantity:not(.cart div.quantity), td.quantity").find(".qty").each(function(){var b=parseInt(a(this).attr("data-min"));b&&b>1&&parseInt(a(this).val())c)?$qty.val(c):$qty.val(b+1)});a(".minus").live("click",function(){var b=parseInt(a(this).next(".qty").val());if(!b||b==""||b=="NaN")b=0;$qty=a(this).next(".qty");var c=parseInt($qty.attr("data-min"));if(c==""||c=="NaN")c=0;c&&(c==b||b0&&$qty.val(b-1)});var b=woocommerce_params.countries.replace(/"/g,'"'),c=a.parseJSON(b);a("select.country_to_state").change(function(){var b=a(this).val(),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state"),e=d.parent(),f=d.attr("name"),g=d.attr("id"),h=d.val();if(c[b])c[b].length==0?e.fadeOut(200,function(){d.parent().find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])}):e.fadeOut(200,function(){var i="",j=c[b];for(var k in j)i=i+'";if(d.is("input")){d.replaceWith('');d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state")}d.html('"+i);d.val(h);a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.fadeIn(500)});else if(d.is("select"))e.fadeOut(200,function(){e.find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.fadeIn(500)});else if(d.is(".hidden")){e.find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.delay(200).fadeIn(500)}a("body").delay(200).trigger("country_to_state_changing",[b,a(this).closest("div")])}).change();a("div.woocommerce_tabs .panel").hide();a("div.woocommerce_tabs ul.tabs li a").click(function(){var b=a(this),c=b.closest("div.woocommerce_tabs");a("ul.tabs li",c).removeClass("active");a("div.panel",c).hide();a("div"+b.attr("href")).show();b.parent().addClass("active");return!1});a("div.woocommerce_tabs").each(function(){var b=window.location.hash;b.toLowerCase().indexOf("comment-")>=0?a("ul.tabs li.reviews_tab a",a(this)).click():a("ul.tabs li:first a",a(this)).click()});a(".shipping-calculator-form").hide();a(".shipping-calculator-button").click(function(){a(".shipping-calculator-form").slideToggle("slow");return!1});a(".reset_variations").click(function(){a(".variations select").val("").change();return!1}).css("visibility","hidden");a(".variations select").change(function(){a("form input[name=variation_id]").val("").change();a(".single_variation_wrap").hide();a(".single_variation").text("");h();a(this).blur();a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update()}).focus(function(){h(a(this).attr("name"))}).change();woocommerce_params.is_cart==1&&a("select#shipping_method").live("change",function(){var b=a("#shipping_method").val();a("div.cart_totals").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_update_shipping_method",security:woocommerce_params.update_shipping_method_nonce,shipping_method:b};a.post(woocommerce_params.ajax_url,c,function(b){a("div.cart_totals").replaceWith(b);a("body").trigger("updated_shipping_method")})});if(woocommerce_params.is_checkout==1||woocommerce_params.is_pay_page==1){var i,j;function k(){j&&j.abort();var b=a("#shipping_method").val(),c=a("#order_review input[name=payment_method]:checked").val(),d=a("#billing_country").val(),e=a("#billing_state").val(),f=a("input#billing_postcode").val();if(a("#shiptobilling input").is(":checked")||a("#shiptobilling input").size()==0)var g=d,h=e,i=f;else var g=a("#shipping_country").val(),h=a("#shipping_state").val(),i=a("input#shipping_postcode").val();a("#order_methods, #order_review").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var k={action:"woocommerce_update_order_review",security:woocommerce_params.update_order_review_nonce,shipping_method:b,payment_method:c,country:d,state:e,postcode:f,s_country:g,s_state:h,s_postcode:i,post_data:a("form.checkout").serialize()};j=a.ajax({type:"POST",url:woocommerce_params.ajax_url,data:k,success:function(b){a("#order_review").after(b).remove();a("#order_review input[name=payment_method]:checked").click();a("body").trigger("updated_checkout")}})}a("body").bind("update_checkout",function(){clearTimeout(i);k()});a("p.password, form.login, form.checkout_coupon, div.shipping_address").hide();a("input.show_password").change(function(){a("p.password").slideToggle()});a("a.showlogin").click(function(){a("form.login").slideToggle();return!1});a("a.showcoupon").click(function(){a("form.checkout_coupon").slideToggle();return!1});a("#shiptobilling input").change(function(){a("div.shipping_address").hide();a(this).is(":checked")||a("div.shipping_address").slideDown()}).change();if(woocommerce_params.option_guest_checkout=="yes"){a("div.create-account").hide();a("input#createaccount").change(function(){a("div.create-account").hide();a(this).is(":checked")&&a("div.create-account").slideDown()}).change()}a(".payment_methods input.input-radio").live("click",function(){a("div.payment_box").hide();a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown()});a("#order_review input[name=payment_method]:checked").click();a("#shipping_method").live("change",function(){a("body").trigger("update_checkout")});a("input#billing_country, input#billing_state, #billing_postcode, input#shipping_country, input#shipping_state, #shipping_postcode").live("keydown",function(){clearTimeout(i);i=setTimeout(k,"1000")});a("select#billing_country, select#billing_state, select#shipping_country, select#shipping_state, #shiptobilling input, .update_totals_on_change").live("change",function(){a("body").trigger("update_checkout")});woocommerce_params.is_checkout==1&&a("body").trigger("update_checkout");a("form.checkout").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});a.ajax({type:"POST",url:woocommerce_params.checkout_url,data:b.serialize(),success:function(c){a(".woocommerce_error, .woocommerce_message").remove();try{success=a.parseJSON(c);window.location=decodeURI(success.redirect)}catch(d){b.prepend(c);b.removeClass("processing").unblock();a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3)}},dataType:"html"});return!1});var l=woocommerce_params.locale.replace(/"/g,'"'),m=a.parseJSON(l),n=' *';a("body").bind("country_to_state_changing",function(a,b,c){var d=c;if(m[b])var e=m[b];else var e=m["default"];if(e.state){var f=d.find("#billing_state_field, #shipping_state_field");e.state.label&&f.find("label").html(e.state.label);f.find("label abbr").remove();(typeof e["state"]["required"]=="undefined"||e["state"]["required"]==1)&&f.find("label").append(n)}else f.find("label abbr").size()==0&&f.find("label").append(n);var g=d.find("#billing_postcode_field, #shipping_postcode_field"),h=d.find("#billing_city_field, #shipping_city_field");if(e.city){e.city.label&&h.find("label").html(e.city.label);h.find("label abbr").remove();(typeof e["city"]["required"]=="undefined"||e["city"]["required"]==1)&&h.find("label").append(n)}else h.find("label abbr").size()==0&&h.find("label").append(n);if(e.postcode){e.postcode.label&&g.find("label").html(e.postcode.label);g.find("label abbr").remove();(typeof e["postcode"]["required"]=="undefined"||e["postcode"]["required"]==1)&&g.find("label").append(n)}else g.find("label abbr").size()==0&&g.find("label").append(n);if(e.postcode_before_city){if(h.is(".form-row-first")){h.fadeOut(200,function(){h.removeClass("form-row-first").addClass("form-row-last").insertAfter(g).fadeIn(500)});g.fadeOut(200,function(){g.removeClass("form-row-last").addClass("form-row-first").fadeIn(500)})}}else if(h.is(".form-row-last")){h.fadeOut(200,function(){h.removeClass("form-row-last").addClass("form-row-first").insertBefore(g).fadeIn(500)});g.fadeOut(200,function(){g.removeClass("form-row-first").addClass("form-row-last").fadeIn(500)})}})}}); \ No newline at end of file + */(function(a){function h(c,h){var j=c==window,l=h&&h.message!==undefined?h.message:undefined;h=a.extend({},a.blockUI.defaults,h||{});h.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,h.overlayCSS||{});var p=a.extend({},a.blockUI.defaults.css,h.css||{}),q=a.extend({},a.blockUI.defaults.themedCSS,h.themedCSS||{});l=l===undefined?h.message:l;j&&f&&i(window,{fadeOut:0});if(l&&typeof l!="string"&&(l.parentNode||l.jquery)){var r=l.jquery?l[0]:l,s={};a(c).data("blockUI.history",s);s.el=r;s.parent=r.parentNode;s.display=r.style.display;s.position=r.style.position;s.parent&&s.parent.removeChild(r)}a(c).data("blockUI.onUnblock",h.onUnblock);var t=h.baseZ,u=a.browser.msie||h.forceIframe?a(''):a(''),v=h.theme?a(''):a(''),w,x;h.theme&&j?x='":h.theme?x='":j?x='':x='';w=a(x);if(l)if(h.theme){w.css(q);w.addClass("ui-widget-content")}else w.css(p);!h.theme&&(!h.applyPlatformOpacityRules||!a.browser.mozilla||!/Linux/.test(navigator.platform))&&v.css(h.overlayCSS);v.css("position",j?"fixed":"absolute");(a.browser.msie||h.forceIframe)&&u.css("opacity",0);var y=[u,v,w],z=j?a("body"):a(c);a.each(y,function(){this.appendTo(z)});h.theme&&h.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var A=d&&(!a.boxModel||a("object,embed",j?null:c).length>0);if(e||A){j&&h.allowBodyStretch&&a.boxModel&&a("html,body").css("height","100%");if((e||!a.boxModel)&&!j)var B=o(c,"borderTopWidth"),C=o(c,"borderLeftWidth"),D=B?"(0 - "+B+")":0,E=C?"(0 - "+C+")":0;a.each([u,v,w],function(a,b){var c=b[0].style;c.position="absolute";if(a<2){j?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"');j?c.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"');E&&c.setExpression("left",E);D&&c.setExpression("top",D)}else if(h.centerY){j&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');c.marginTop=0}else if(!h.centerY&&j){var d=h.css&&h.css.top?parseInt(h.css.top):0,e="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+d+') + "px"';c.setExpression("top",e)}})}if(l){h.theme?w.find(".ui-widget-content").append(l):w.append(l);(l.jquery||l.nodeType)&&a(l).show()}(a.browser.msie||h.forceIframe)&&h.showOverlay&&u.show();if(h.fadeIn){var F=h.onBlock?h.onBlock:b,G=h.showOverlay&&!l?F:b,H=l?F:b;h.showOverlay&&v._fadeIn(h.fadeIn,G);l&&w._fadeIn(h.fadeIn,H)}else{h.showOverlay&&v.show();l&&w.show();h.onBlock&&h.onBlock()}k(1,c,h);if(j){f=w[0];g=a(":input:enabled:visible",f);h.focusInput&&setTimeout(m,20)}else n(w[0],h.centerX,h.centerY);if(h.timeout){var I=setTimeout(function(){j?a.unblockUI(h):a(c).unblock(h)},h.timeout);a(c).data("blockUI.timeout",I)}}function i(b,c){var d=b==window,e=a(b),h=e.data("blockUI.history"),i=e.data("blockUI.timeout");if(i){clearTimeout(i);e.removeData("blockUI.timeout")}c=a.extend({},a.blockUI.defaults,c||{});k(0,b,c);if(c.onUnblock===null){c.onUnblock=e.data("blockUI.onUnblock");e.removeData("blockUI.onUnblock")}var l;d?l=a("body").children().filter(".blockUI").add("body > .blockUI"):l=a(".blockUI",b);d&&(f=g=null);if(c.fadeOut){l.fadeOut(c.fadeOut);setTimeout(function(){j(l,h,c,b)},c.fadeOut)}else j(l,h,c,b)}function j(b,c,d,e){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)});if(c&&c.el){c.el.style.display=c.display;c.el.style.position=c.position;c.parent&&c.parent.appendChild(c.el);a(e).removeData("blockUI.history")}typeof d.onUnblock=="function"&&d.onUnblock(e,d)}function k(b,c,d){var e=c==window,g=a(c);if(!b&&(e&&!f||!e&&!g.data("blockUI.isBlocked")))return;e||g.data("blockUI.isBlocked",b);if(!d.bindEvents||b&&!d.showOverlay)return;var h="mousedown mouseup keydown keypress";b?a(document).bind(h,d,l):a(document).unbind(h,l)}function l(b){if(b.keyCode&&b.keyCode==9&&f&&b.data.constrainTabKey){var c=g,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e){setTimeout(function(){m(e)},10);return!1}}var h=b.data;return a(b.target).parents("div."+h.blockMsgClass).length>0?!0:a(b.target).parents().children().filter("div.blockUI").length==0}function m(a){if(!g)return;var b=g[a===!0?g.length-1:0];b&&b.focus()}function n(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-o(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-o(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0");c&&(e.top=g>0?g+"px":"0")}function o(b,c){return parseInt(a.css(b,c))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery)||/^1.1/.test(a.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+a.fn.jquery);return}a.fn._fadeIn=a.fn.fadeIn;var b=function(){},c=document.documentMode||0,d=a.browser.msie&&(a.browser.version<8&&!c||c<8),e=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!c;a.blockUI=function(a){h(window,a)};a.unblockUI=function(a){i(window,a)};a.growlUI=function(b,c,d,e){var f=a('
');b&&f.append("

"+b+"

");c&&f.append("

"+c+"

");d==undefined&&(d=3e3);a.blockUI({message:f,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:d,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};a.fn.block=function(b){return this.unblock({fadeOut:0}).each(function(){a.css(this,"position")=="static"&&(this.style.position="relative");a.browser.msie&&(this.style.zoom=1);h(this,b)})};a.fn.unblock=function(a){return this.each(function(){i(this,a)})};a.blockUI.version=2.39;a.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var f=null,g=[]})(jQuery);(function(a){function b(b){this.input=b;b.attr("type")=="password"&&this.handlePassword();a(b[0].form).submit(function(){b.hasClass("placeholder")&&b[0].value==b.attr("placeholder")&&(b[0].value="")})}b.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var b=this.input;b.attr("realType","password");this.isPassword=!0;if(a.browser.msie&&b[0].outerHTML){var c=a(b[0].outerHTML.replace(/type=(['"])?password\1/gi,"type=$1text$1"));this.fakePassword=c.val(b.attr("placeholder")).addClass("placeholder").focus(function(){b.trigger("focus");a(this).hide()});a(b[0].form).submit(function(){c.remove();b.show()})}}};var c="placeholder"in document.createElement("input");a.fn.placeholder=function(){return c?this:this.each(function(){var c=a(this),e=new b(c);e.show(!0);c.focus(function(){e.hide()});c.blur(function(){e.show(!1)});a.browser.msie&&(a(window).load(function(){c.val()&&c.removeClass("placeholder");e.show(!0)}),c.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery);jQuery(document).ready(function(a){function d(a,b){var c=!0;for(name in a){var d=a[name],e=b[name];d.length!=0&&e.length!=0&&d!=e&&(c=!1)}return c}function e(a){var b=[];for(var c=0;c").html(g).text();g=g.replace(/'/g,"\\'");g=g.replace(/"/g,'\\"');current_attr_select.find('option[value="'+g+'"]').removeAttr("disabled")}else current_attr_select.find("option").removeAttr("disabled")}}})}function g(b){var c=a("div.images img:eq(0)"),d=a("div.images a.zoom:eq(0)"),e=a(c).attr("original-src"),f=a(d).attr("original-href"),g=b.image_src,h=b.image_link;a(".variations_button").show();a(".single_variation").html(b.price_html+b.availability_html);e||a(c).attr("original-src",a(c).attr("src"));f||a(d).attr("original-href",a(d).attr("href"));if(g&&g.length>1){a(c).attr("src",g);a(d).attr("href",h)}else{a(c).attr("src",e);a(d).attr("href",f)}b.sku?a(".product_meta").find(".sku").text(b.sku):a(".product_meta").find(".sku").text("");b.min_qty?a(".single_variation_wrap").find("input[name=quantity]").attr("data-min",b.min_qty).val(b.min_qty):a(".single_variation_wrap").find("input[name=quantity]").removeAttr("data-min");b.max_qty?a(".single_variation_wrap").find("input[name=quantity]").attr("data-max",b.max_qty):a(".single_variation_wrap").find("input[name=quantity]").removeAttr("data-max");b.is_virtual=="yes"&&b.is_downloadable=="yes"&&woocommerce_params.option_limit_download_qty=="yes"&&a(".single_variation_wrap").find("input[name=quantity]").attr("data-max",1);a(".single_variation_wrap").slideDown("200").trigger("variationWrapShown").trigger("show_variation")}function h(b){var c=!0,d=!1,h={};a(".variations select").each(function(){if(b&&a(this).attr("name")==b){c=!1;h[a(this).attr("name")]=""}else{a(this).val().length==0?c=!1:d=!0;value=a(this).val().replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">");h[a(this).attr("name")]=value}});var i=e(h);if(c){var j=i.pop();if(j){a("form input[name=variation_id]").val(j.variation_id).change();g(j)}else a(".variations select").val("")}else f(i);d?a(".reset_variations").css("visibility")=="hidden"&&a(".reset_variations").css("visibility","visible").hide().fadeIn():a(".reset_variations").css("visibility","hidden")}woocommerce_params.option_ajax_add_to_cart=="yes"&&a(".add_to_cart_button").live("click",function(){var b=a(this);if(b.is(".product_type_simple, .product_type_downloadable, .product_type_virtual")){if(!b.attr("data-product_id"))return!0;b.removeClass("added");b.addClass("loading");var c={action:"woocommerce_add_to_cart",product_id:b.attr("data-product_id"),security:woocommerce_params.add_to_cart_nonce};a("body").trigger("adding_to_cart");a.post(woocommerce_params.ajax_url,c,function(d){b.removeClass("loading");c=a.parseJSON(d);if(c.error&&c.product_url){window.location=c.product_url;return}fragments=c;fragments&&a.each(fragments,function(b,c){a(b).addClass("updating")});a(".widget_shopping_cart, .shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});b.addClass("added");if(a(".widget_shopping_cart").size()>0)a(".widget_shopping_cart:eq(0)").load(window.location+" .widget_shopping_cart:eq(0) > *",function(){fragments&&a.each(fragments,function(b,c){a(b).replaceWith(c)});a(".widget_shopping_cart, .updating").css("opacity","1").unblock();a("body").trigger("cart_widget_refreshed")});else{fragments&&a.each(fragments,function(b,c){a(b).replaceWith(c)});a(".widget_shopping_cart, .updating").css("opacity","1").unblock()}a(".shop_table.cart").load(window.location+" .shop_table.cart:eq(0) > *",function(){a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');a(".shop_table.cart").css("opacity","1").unblock();a("body").trigger("cart_page_refreshed")});a(".cart_totals").load(window.location+" .cart_totals:eq(0) > *",function(){a(".cart_totals").css("opacity","1").unblock()});a("body").trigger("added_to_cart")});return!1}return!0});a("select.orderby").change(function(){a(this).closest("form").submit()});a("#rating").hide().before('

12345

');a("p.stars a").click(function(){var b=a(this);a("#rating").val(b.text());a("p.stars a").removeClass("active");b.addClass("active");return!1});a("#review_form #submit").live("click",function(){var b=a("#rating").val();if(!b){alert(woocommerce_params.required_rating_text);return!1}});a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');a("div.quantity:not(.cart div.quantity), td.quantity").find(".qty").each(function(){var b=parseInt(a(this).attr("data-min"));b&&b>1&&parseInt(a(this).val())c)?$qty.val(c):$qty.val(b+1)});a(".minus").live("click",function(){var b=parseInt(a(this).next(".qty").val());if(!b||b==""||b=="NaN")b=0;$qty=a(this).next(".qty");var c=parseInt($qty.attr("data-min"));if(c==""||c=="NaN")c=0;c&&(c==b||b0&&$qty.val(b-1)});var b=woocommerce_params.countries.replace(/"/g,'"'),c=a.parseJSON(b);a("select.country_to_state").change(function(){var b=a(this).val(),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state"),e=d.parent(),f=d.attr("name"),g=d.attr("id"),h=d.val();if(c[b])c[b].length==0?e.fadeOut(200,function(){d.parent().find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])}):e.fadeOut(200,function(){var i="",j=c[b];for(var k in j)i=i+'";if(d.is("input")){d.replaceWith('');d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state")}d.html('"+i);d.val(h);a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.fadeIn(500)});else if(d.is("select"))e.fadeOut(200,function(){e.find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.fadeIn(500)});else if(d.is(".hidden")){e.find(".chzn-container").remove();d.replaceWith('');a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);e.delay(200).fadeIn(500)}a("body").delay(200).trigger("country_to_state_changing",[b,a(this).closest("div")])}).change();a("div.woocommerce_tabs .panel").hide();a("div.woocommerce_tabs ul.tabs li a").click(function(){var b=a(this),c=b.closest("div.woocommerce_tabs");a("ul.tabs li",c).removeClass("active");a("div.panel",c).hide();a("div"+b.attr("href")).show();b.parent().addClass("active");return!1});a("div.woocommerce_tabs").each(function(){var b=window.location.hash;b.toLowerCase().indexOf("comment-")>=0?a("ul.tabs li.reviews_tab a",a(this)).click():a("ul.tabs li:first a",a(this)).click()});a(".shipping-calculator-form").hide();a(".shipping-calculator-button").click(function(){a(".shipping-calculator-form").slideToggle("slow");return!1});a(".reset_variations").click(function(){a(".variations select").val("").change();return!1}).css("visibility","hidden");a(".variations select").change(function(){a("form input[name=variation_id]").val("").change();a(".single_variation_wrap").hide();a(".single_variation").text("");h();a(this).blur();a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update()}).focus(function(){h(a(this).attr("name"))}).change();woocommerce_params.is_cart==1&&a("select#shipping_method").live("change",function(){var b=a("#shipping_method").val();a("div.cart_totals").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_update_shipping_method",security:woocommerce_params.update_shipping_method_nonce,shipping_method:b};a.post(woocommerce_params.ajax_url,c,function(b){a("div.cart_totals").replaceWith(b);a("body").trigger("updated_shipping_method")})});if(woocommerce_params.is_checkout==1||woocommerce_params.is_pay_page==1){var i,j;function k(){j&&j.abort();var b=a("#shipping_method").val(),c=a("#order_review input[name=payment_method]:checked").val(),d=a("#billing_country").val(),e=a("#billing_state").val(),f=a("input#billing_postcode").val();if(a("#shiptobilling input").is(":checked")||a("#shiptobilling input").size()==0)var g=d,h=e,i=f;else var g=a("#shipping_country").val(),h=a("#shipping_state").val(),i=a("input#shipping_postcode").val();a("#order_methods, #order_review").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var k={action:"woocommerce_update_order_review",security:woocommerce_params.update_order_review_nonce,shipping_method:b,payment_method:c,country:d,state:e,postcode:f,s_country:g,s_state:h,s_postcode:i,post_data:a("form.checkout").serialize()};j=a.ajax({type:"POST",url:woocommerce_params.ajax_url,data:k,success:function(b){a("#order_review").after(b).remove();a("#order_review input[name=payment_method]:checked").click();a("body").trigger("updated_checkout")}})}a("body").bind("update_checkout",function(){clearTimeout(i);k()});a("p.password, form.login, form.checkout_coupon, div.shipping_address").hide();a("input.show_password").change(function(){a("p.password").slideToggle()});a("a.showlogin").click(function(){a("form.login").slideToggle();return!1});a("a.showcoupon").click(function(){a("form.checkout_coupon").slideToggle();return!1});a("#shiptobilling input").change(function(){a("div.shipping_address").hide();a(this).is(":checked")||a("div.shipping_address").slideDown()}).change();if(woocommerce_params.option_guest_checkout=="yes"){a("div.create-account").hide();a("input#createaccount").change(function(){a("div.create-account").hide();a(this).is(":checked")&&a("div.create-account").slideDown()}).change()}a(".payment_methods input.input-radio").live("click",function(){a("div.payment_box").hide();a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown()});a("#order_review input[name=payment_method]:checked").click();a("#shipping_method").live("change",function(){a("body").trigger("update_checkout")});a("input#billing_country, input#billing_state, #billing_postcode, input#shipping_country, input#shipping_state, #shipping_postcode").live("keydown",function(){clearTimeout(i);i=setTimeout(k,"1000")});a("select#billing_country, select#billing_state, select#shipping_country, select#shipping_state, #shiptobilling input, .update_totals_on_change").live("change",function(){a("body").trigger("update_checkout")});woocommerce_params.is_checkout==1&&a("body").trigger("update_checkout");a("form.checkout").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});a.ajax({type:"POST",url:woocommerce_params.checkout_url,data:b.serialize(),success:function(c){a(".woocommerce_error, .woocommerce_message").remove();try{success=a.parseJSON(c);window.location=decodeURI(success.redirect)}catch(d){b.prepend(c);b.removeClass("processing").unblock();a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3)}},dataType:"html"});return!1});var l=woocommerce_params.locale.replace(/"/g,'"'),m=a.parseJSON(l),n=' *';a("body").bind("country_to_state_changing",function(a,b,c){var d=c;if(m[b])var e=m[b];else var e=m["default"];if(e.state){var f=d.find("#billing_state_field, #shipping_state_field");e.state.label&&f.find("label").html(e.state.label);f.find("label abbr").remove();(typeof e["state"]["required"]=="undefined"||e["state"]["required"]==1)&&f.find("label").append(n)}else f.find("label abbr").size()==0&&f.find("label").append(n);var g=d.find("#billing_postcode_field, #shipping_postcode_field"),h=d.find("#billing_city_field, #shipping_city_field");if(e.city){e.city.label&&h.find("label").html(e.city.label);h.find("label abbr").remove();(typeof e["city"]["required"]=="undefined"||e["city"]["required"]==1)&&h.find("label").append(n)}else h.find("label abbr").size()==0&&h.find("label").append(n);if(e.postcode){e.postcode.label&&g.find("label").html(e.postcode.label);g.find("label abbr").remove();(typeof e["postcode"]["required"]=="undefined"||e["postcode"]["required"]==1)&&g.find("label").append(n)}else g.find("label abbr").size()==0&&g.find("label").append(n);if(e.postcode_before_city){if(h.is(".form-row-first")){h.fadeOut(200,function(){h.removeClass("form-row-first").addClass("form-row-last").insertAfter(g).fadeIn(500)});g.fadeOut(200,function(){g.removeClass("form-row-last").addClass("form-row-first").fadeIn(500)})}}else if(h.is(".form-row-last")){h.fadeOut(200,function(){h.removeClass("form-row-last").addClass("form-row-first").insertBefore(g).fadeIn(500)});g.fadeOut(200,function(){g.removeClass("form-row-first").addClass("form-row-last").fadeIn(500)})}})}}); \ No newline at end of file diff --git a/woocommerce.php b/woocommerce.php index 87f167d9fdb..de32ceeda3b 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -924,6 +924,7 @@ class Woocommerce { 'countries' => $states, 'select_state_text' => __('Select an option…', 'woocommerce'), 'required_text' => esc_attr__( 'required', 'woocommerce' ), + 'required_rating_text' => esc_attr__( 'Please select a rating', 'woocommerce' ), 'plugin_url' => $this->plugin_url(), 'ajax_url' => (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php'), 'get_variation_nonce' => wp_create_nonce("get-variation"),