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

Props afercia.
Fixes #18590.


git-svn-id: https://develop.svn.wordpress.org/trunk@35014 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-10 15:49:56 +00:00
parent c123726ba0
commit 5e85a8b55a

View File

@ -722,7 +722,7 @@ jQuery(document).ready( function($) {
// permalink // permalink
function editPermalink() { function editPermalink() {
var i, slug_value, var i, slug_value,
e, revert_e, $el, revert_e,
c = 0, c = 0,
real_slug = $('#post_name'), real_slug = $('#post_name'),
revert_slug = real_slug.val(), revert_slug = real_slug.val(),
@ -738,12 +738,12 @@ jQuery(document).ready( function($) {
full = full.html(); full = full.html();
permalink.html( permalinkInner ); permalink.html( permalinkInner );
e = $('#editable-post-name'); $el = $( '#editable-post-name' );
revert_e = e.html(); revert_e = $el.html();
buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>'); buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>');
buttons.children('.save').click( function( e ) { buttons.children('.save').click( function( e ) {
var new_slug = e.children('input').val(); var new_slug = $el.children( 'input' ).val();
e.preventDefault(); e.preventDefault();
if ( new_slug == $('#editable-post-name-full').text() ) { if ( new_slug == $('#editable-post-name-full').text() ) {
buttons.children('.cancel').click(); buttons.children('.cancel').click();
@ -774,7 +774,7 @@ jQuery(document).ready( function($) {
buttons.children('.cancel').click( function( e ) { buttons.children('.cancel').click( function( e ) {
e.preventDefault(); e.preventDefault();
$('#view-post-btn').show(); $('#view-post-btn').show();
e.html(revert_e); $el.html(revert_e);
buttons.html(buttonsOrig); buttons.html(buttonsOrig);
permalink.html(permalinkOrig); permalink.html(permalinkOrig);
real_slug.val(revert_slug); real_slug.val(revert_slug);
@ -787,7 +787,7 @@ jQuery(document).ready( function($) {
} }
slug_value = ( c > full.length / 4 ) ? '' : full; slug_value = ( c > full.length / 4 ) ? '' : full;
e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" autocomplete="off" />').children('input').keypress(function(e) { $el.html( '<input type="text" id="new-post-slug" value="'+slug_value+'" autocomplete="off" />').children('input').keypress(function(e) {
var key = e.keyCode || 0; var key = e.keyCode || 0;
// on enter, just save the new slug, don't save the post // on enter, just save the new slug, don't save the post
if ( 13 == key ) { if ( 13 == key ) {