mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 01:57:53 +01:00
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:
parent
10eada54dc
commit
e3d01cddd0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user