Making WordPress.org

Changeset 2949


Ignore:
Timestamp:
04/13/2016 05:02:55 PM (8 years ago)
Author:
ocean90
Message:

Translate, JS Warnings: Fix submitting new translations.

$gp.editor.hooks.ok() doesn't expect a parameter and uses $(this) instead. But the original this (the button) is lost during the custom callback.

See #1667.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-js-warnings/wporg-gp-js-warnings.js

    r2123 r2949  
    1818                translation: $el.val(),
    1919                original: // Singular original, or plural original, or.. the single-original plural view..
    20                     $el.parent('div.textareas').prev('p.original').text() || 
     20                    $el.parent('div.textareas').prev('p.original').text() ||
    2121                    $el.parent('div.textareas').prev('p').find('span.original').text() ||
    22                     jQuery( $el.parents('div.strings').find('span.original').get(prop) ).text() 
     22                    jQuery( $el.parents('div.strings').find('span.original').get(prop) ).text()
    2323            }
    2424        }).get();
     
    5151
    5252        // No warnings, or warnings skipped
    53         $gp.editor.hooks.ok( button );
     53        $gp.editor.save( button );
     54        return false;
    5455    },
    5556    check_entry: function( entry ) {
Note: See TracChangeset for help on using the changeset viewer.