View/Edit icon hiding on edit

This commit is contained in:
Mike Jolley 2016-01-04 14:34:10 +00:00
parent 901db7b0f8
commit 61f8a92202
4 changed files with 9 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -2325,6 +2325,11 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods {
height: 29px;
}
}
.editing {
.wc-shipping-zone-view, .wc-shipping-zone-edit {
display: none;
}
}
}
img.help_tip {

View File

@ -63,7 +63,7 @@
$tbody.on( 'sortupdate', { view: this }, this.updateModelOnSort );
$( window ).on( 'beforeunload', { view: this }, this.unloadConfirmation );
$save_button.on( 'click', { view: this }, this.onSubmit );
$( '.wc-shipping-zone-add' ).on( 'click', { view: this }, this.onAddNewRow );
$( document.body ).on( 'click', '.wc-shipping-zone-add', { view: this }, this.onAddNewRow );
},
block: function() {
$( this.el ).block({
@ -194,7 +194,7 @@
onEditRow: function( event ) {
event.preventDefault();
$( this ).closest('tr').addClass('editing');
$( this ).closest('tr').find('.view, .wc-shipping-zone-edit').hide();
$( this ).closest('tr').find('.view').hide();
$( this ).closest('tr').find('.edit').show();
$( '.wc-shipping-zone-region-select:not(.enhanced)' ).select2( select2_args );
$( '.wc-shipping-zone-region-select:not(.enhanced)' ).addClass('enhanced');

File diff suppressed because one or more lines are too long