Media: Make TinyMCE attachment and gallery controls always show when the corresponding view is selected. props SergeyBiryukov. fixes #22463, see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-19 01:23:45 +00:00
parent 10eada54dc
commit e3d01cddd0
1 changed files with 4 additions and 8 deletions

View File

@ -6,7 +6,7 @@
var DOM = tinymce.DOM;
tinymce.create('tinymce.plugins.WordPress', {
mceTout : 0,
showButtons : 0,
init : function(ed, url) {
var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key;
@ -375,14 +375,11 @@
'display' : 'block'
});
if ( this.mceTout )
clearTimeout(this.mceTout);
this.mceTout = setTimeout( function(){ed.plugins.wordpress._hideButtons();}, 5000 );
this.showButtons = true;
},
_hideButtons : function() {
if ( !this.mceTout )
if ( ! this.showButtons )
return;
if ( document.getElementById('wp_editbtns') )
@ -391,8 +388,7 @@
if ( document.getElementById('wp_gallerybtns') )
tinymce.DOM.hide('wp_gallerybtns');
clearTimeout(this.mceTout);
this.mceTout = 0;
this.showButtons = false;
},
// Resizes the iframe by a relative height value