Make WordPress Core

Changeset 26890


Ignore:
Timestamp:
01/02/2014 01:06:58 AM (13 years ago)
Author:
azaozz
Message:

TinyMCE: add stubs for the missing tinymce.util.Cookie, windowManager.onOpen and windowManager.onClose to the compat3x plugin. See #24067, fixes #26750.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js

    r26876 r26890  
    3232                target = target || this;
    3333
     34                if ( ! newEventName ) {
     35                        this.add = this.addToTop = this.remove = this.dispatch = function(){};
     36                        return;
     37                }
     38               
    3439                this.add = function(callback, scope) {
    3540                        log('<target>.on' + newEventName + ".add(..)");
    … …  
    8691        }
    8792
     93        tinymce.util.Dispatcher = Dispatcher;
    8894        tinymce.onBeforeUnload = new Dispatcher(tinymce, "BeforeUnload");
    8995        tinymce.onAddEditor = new Dispatcher(tinymce, "AddEditor", "editor");
    9096        tinymce.onRemoveEditor = new Dispatcher(tinymce, "RemoveEditor", "editor");
     97
     98        function noop(){}
     99
     100        tinymce.util.Cookie = {
     101                get: noop, getHash: noop, remove: noop, set: noop, setHash: noop
     102        };
    91103
    92104        function patchEditor(editor) {
    … …  
    133145                                        this.buttons[name].active(state);
    134146                                }
    135                         },
     147                        }
    136148                };
    137149
    … …  
    194206                        selection.onBeforeSetContent = new Dispatcher(editor, "BeforeSetContent", filterSelectionEvents(true), selection);
    195207                        selection.onSetContent = new Dispatcher(editor, "SetContent", filterSelectionEvents(true), selection);
    196 
    197                         editor.windowManager.createInstance = function(className, a, b, c, d, e) {
     208                });
     209
     210                editor.on('BeforeRenderUI', function() {
     211                        var windowManager = editor.windowManager;
     212
     213                        windowManager.onOpen = new Dispatcher();
     214                        windowManager.onClose = new Dispatcher();
     215                        windowManager.createInstance = function(className, a, b, c, d, e) {
    198216                                log("windowManager.createInstance(..)");
    199217
  • trunk/src/wp-includes/version.php

    r26877 r26890  
    1919 * @global string $tinymce_version
    2020 */
    21 $tinymce_version = '4012-20131228';
     21$tinymce_version = '4012-20140101';
    2222
    2323/**
Note: See TracChangeset for help on using the changeset viewer.