Make WordPress Core

Changeset 35014


Ignore:
Timestamp:
10/10/2015 03:49:56 PM (10 years ago)
Author:
wonderboymusic
Message:

Admin JS: after [34977], avoid variable names conflicts with e.

Props afercia.
Fixes #18590.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/post.js

    r34977 r35014  
    723723    function editPermalink() {
    724724        var i, slug_value,
    725             e, revert_e,
     725            $el, revert_e,
    726726            c = 0,
    727727            real_slug = $('#post_name'),
     
    739739
    740740        permalink.html( permalinkInner );
    741         e = $('#editable-post-name');
    742         revert_e = e.html();
     741        $el = $( '#editable-post-name' );
     742        revert_e = $el.html();
    743743
    744744        buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>');
    745745        buttons.children('.save').click( function( e ) {
    746             var new_slug = e.children('input').val();
     746            var new_slug = $el.children( 'input' ).val();
    747747            e.preventDefault();
    748748            if ( new_slug == $('#editable-post-name-full').text() ) {
     
    775775            e.preventDefault();
    776776            $('#view-post-btn').show();
    777             e.html(revert_e);
     777            $el.html(revert_e);
    778778            buttons.html(buttonsOrig);
    779779            permalink.html(permalinkOrig);
     
    788788
    789789        slug_value = ( c > full.length / 4 ) ? '' : full;
    790         e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" autocomplete="off" />').children('input').keypress(function(e) {
     790        $el.html( '<input type="text" id="new-post-slug" value="'+slug_value+'" autocomplete="off" />').children('input').keypress(function(e) {
    791791            var key = e.keyCode || 0;
    792792            // on enter, just save the new slug, don't save the post
Note: See TracChangeset for help on using the changeset viewer.