From 3266509f1e5b2a6c4c1ff82c97c7a0a89e9cf937 Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 28 Apr 2015 17:28:51 +0100 Subject: [PATCH] [2.3] remove placeholder. closes #8043 --- assets/js/admin/users.js | 3 +-- assets/js/admin/users.min.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/js/admin/users.js b/assets/js/admin/users.js index 116721430c1..d9a222ad73f 100644 --- a/assets/js/admin/users.js +++ b/assets/js/admin/users.js @@ -34,8 +34,7 @@ jQuery( function ( $ ) { $parent = $state.parent(), input_name = $state.attr( 'name' ), input_id = $state.attr( 'id' ), - value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), - placeholder = $state.attr( 'placeholder' ); + value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(); if ( stickValue ){ $this.data( 'woocommerce.stickState-' + country, value ); diff --git a/assets/js/admin/users.min.js b/assets/js/admin/users.min.js index 10e79541036..dc1fe2e63ef 100644 --- a/assets/js/admin/users.min.js +++ b/assets/js/admin/users.min.js @@ -1 +1 @@ -jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val(),l=g.attr("placeholder");if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('');else{var m=a(''),n=b.states[f];m.append(a('")),a.each(n,function(b){m.append(a('"))}),m.val(k),g.replaceWith(m),m.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}};b.init()}); \ No newline at end of file +jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val();if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('');else{var l=a(''),m=b.states[f];l.append(a('")),a.each(m,function(b){l.append(a('"))}),l.val(k),g.replaceWith(l),l.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}};b.init()}); \ No newline at end of file