Skip to content

Commit

Permalink
Merge pull request #717 from GlotPress/699-discarding-warning-duplica…
Browse files Browse the repository at this point in the history
…te-entry

699: Fix issue with dismissing warnings would create a "duplicate" entry
  • Loading branch information
ocean90 committed Jun 6, 2017
2 parents 596bdc6 + c5883e1 commit ad132d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions assets/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ $gp.editor = (
$gp.editor.current.after( html );
old_current = $gp.editor.current;
old_current.attr( 'id', old_current.attr( 'id' ) + '-old' );
old_current.preview.attr( 'id', old_current.preview.attr( 'id' ) + '-old' );
$gp.editor.next();
old_current.preview.remove();
old_current.remove();
$gp.editor.current.preview.fadeIn( 800 );
},
save: function( button ) {
var editor, textareaName, data = [], translations;
Expand Down Expand Up @@ -217,8 +217,6 @@ $gp.editor = (

if ( $gp.editor.current.hasClass( 'no-warnings' ) ) {
$gp.editor.next();
} else {
$gp.editor.current.preview.hide();
}
},
error: function( xhr, msg ) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/editor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gp-includes/assets-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function gp_register_default_scripts() {
// Register our standard scripts.
wp_register_script( 'tablesorter', $url . '/vendor/jquery.tablesorter' . $suffix, array( 'jquery' ), '2.17.8' );
wp_register_script( 'gp-common', $url . '/common' . $suffix, array( 'jquery' ), '20150430' );
wp_register_script( 'gp-editor', $url . '/editor' . $suffix, array( 'gp-common', 'jquery-ui-tooltip' ), '20170530' );
wp_register_script( 'gp-editor', $url . '/editor' . $suffix, array( 'gp-common', 'jquery-ui-tooltip' ), '20170606' );
wp_register_script( 'gp-glossary', $url . '/glossary' . $suffix, array( 'gp-editor' ), '20160329' );
wp_register_script( 'gp-translations-page', $url . '/translations-page' . $suffix, array( 'gp-editor' ), '20150430' );
wp_register_script( 'gp-mass-create-sets-page', $url . '/mass-create-sets-page' . $suffix, array( 'gp-editor' ), '20150430' );
Expand Down

0 comments on commit ad132d8

Please sign in to comment.