Properly uncheck the "new tab" box when editing a non-new-tab link.

Previously, if you had just edited a new-tab link, a subsequent edit of a non-new-tab link would mistakenly keep the checkbox checked.

props sc0ttkclark. fixes #24520.

git-svn-id: http://core.svn.wordpress.org/trunk@24419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-06-06 16:49:25 +00:00
parent 99c0762fca
commit cb3afeb56b

View File

@ -113,8 +113,7 @@ var wpLink;
inputs.url.val( ed.dom.getAttrib(e, 'href') );
inputs.title.val( ed.dom.getAttrib(e, 'title') );
// Set open in new tab.
if ( "_blank" == ed.dom.getAttrib(e, 'target') )
inputs.openInNewTab.prop('checked', true);
inputs.openInNewTab.prop('checked', ( "_blank" == ed.dom.getAttrib( e, 'target' ) ) );
// Update save prompt.
inputs.submit.val( wpLinkL10n.update );