Set minimum z-index for the TinyMCE modals and adjust the z-index in DFW, see #26952

Built from https://develop.svn.wordpress.org/trunk@27460


git-svn-id: http://core.svn.wordpress.org/trunk@27305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2014-03-08 00:41:16 +00:00
parent c353fa41a2
commit a8a20f4bb7
15 changed files with 49 additions and 68 deletions

View File

@@ -1,4 +1,8 @@
/* global tinymce, getUserSetting, setUserSetting, switchEditors */
/* global tinymce, getUserSetting, setUserSetting */
// Set the minimum value for the modals z-index higher than #wpadminbar (100000)
tinymce.ui.FloatPanel.zIndex = 100100;
tinymce.PluginManager.add( 'wordpress', function( editor ) {
var DOM = tinymce.DOM, wpAdvButton, modKey, style,
last = 0;
@@ -279,7 +283,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
var env = tinymce.Env, topx, reset,
deltax = 0,
bodyClass = ['mceContentBody'], // back-compat for themes that use this in editor-style.css...
doc = editor.getDoc();
doc = editor.getDoc(),
dom = editor.dom;
if ( editor.getParam( 'directionality' ) === 'rtl' ) {
bodyClass.push('rtl');
@@ -299,7 +304,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
tinymce.each( bodyClass, function( cls ) {
if ( cls ) {
editor.dom.addClass( doc.body, cls );
dom.addClass( doc.body, cls );
}
});
@@ -318,7 +323,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
if ( ! ( 'ontouchstart' in window ) ) {
// When scrolling with mouse wheel or trackpad inside the editor, don't scroll the parent window
editor.dom.bind( doc, 'onwheel' in doc ? 'wheel' : 'mousewheel', function( event ) {
dom.bind( doc, 'onwheel' in doc ? 'wheel' : 'mousewheel', function( event ) {
var delta, top,
docElement = doc.documentElement;
@@ -370,6 +375,13 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
event.preventDefault();
});
}
dom.bind( doc, 'dragover', function( event ) {
if ( typeof window.jQuery !== 'undefined' ) {
// Propagate the event to its container for the parent window to catch.
window.jQuery( editor.getContainer() ).trigger( event );
}
});
});
// Word count
@@ -399,8 +411,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
// Keep empty paragraphs :(
e.content = e.content.replace( /<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>' );
if ( editor.getParam( 'wpautop', true ) && typeof switchEditors !== 'undefined' ) {
e.content = switchEditors.pre_wpautop( e.content );
if ( editor.getParam( 'wpautop', true ) && typeof window.switchEditors !== 'undefined' ) {
e.content = window.switchEditors.pre_wpautop( e.content );
}
});
@@ -442,13 +454,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
editor.dom.bind( editor.getBody(), 'dragstart', function() {
_hideButtons();
});
editor.dom.bind( editor.getWin(), 'dragover', function(e) {
if ( typeof window.jQuery !== 'undefined' ) {
// Propagate the event to its container for the parent window to catch.
jQuery( editor.getContainer() ).trigger(e);
}
});
});
editor.on( 'BeforeExecCommand', function() {

File diff suppressed because one or more lines are too long