TinyMCE: update to the latest dev. version, 4.1.6+. Fixes #30411.

git-svn-id: https://develop.svn.wordpress.org/trunk@30397 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-11-20 00:49:38 +00:00
parent b670f503e5
commit 7137f26a5b
6 changed files with 75 additions and 41 deletions

File diff suppressed because one or more lines are too long

View File

@ -249,18 +249,21 @@ var tinyMCEPopup = {
* @param {string} element_id Element id to be filled with the color value from the picker.
*/
pickColor : function(e, element_id) {
this.execCommand('mceColorPicker', true, {
color : document.getElementById(element_id).value,
func : function(c) {
document.getElementById(element_id).value = c;
try {
document.getElementById(element_id).onchange();
} catch (ex) {
// Try fire event, ignore errors
}
}
});
var el = document.getElementById(element_id), colorPickerCallback = this.editor.settings.color_picker_callback;
if (colorPickerCallback) {
colorPickerCallback.call(
this.editor,
function (value) {
el.value = value;
try {
el.onchange();
} catch (ex) {
// Try fire event, ignore errors
}
},
el.value
);
}
},
/**

View File

@ -1,4 +1,4 @@
// 4.1.6 (2014-10-22)
// 4.1.6 (2014-11-19)
/**
* Compiled inline version. (Library mode)
@ -3400,6 +3400,10 @@ define("tinymce/dom/DomQuery", [
return typeof obj === 'string';
}
function isWindow(obj) {
return obj && obj == obj.window;
}
function createFragment(html, fragDoc) {
var frag, node, container;
@ -3690,10 +3694,6 @@ define("tinymce/dom/DomQuery", [
return self.add(DomQuery(items));
}
if (items.nodeType) {
return self.add([items]);
}
if (sort !== false) {
nodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));
self.length = nodes.length;
@ -4474,7 +4474,13 @@ define("tinymce/dom/DomQuery", [
* @param {Object} object Object to convert to array.
* @return {Arrau} Array produced from object.
*/
makeArray: Tools.toArray,
makeArray: function(array) {
if (isWindow(array) || array.nodeType) {
return [array];
}
return Tools.toArray(array);
},
/**
* Returns the index of the specified item inside the array.
@ -10301,7 +10307,7 @@ define("tinymce/html/Schema", [
add("a", "href target rel media hreflang type", phrasingContent);
add("q", "cite", phrasingContent);
add("ins del", "cite datetime", flowContent);
add("img", "src alt usemap ismap width height");
add("img", "src srcset alt usemap ismap width height");
add("iframe", "src name width height", flowContent);
add("embed", "src type width height");
add("object", "data type typemustmatch name usemap form width height", flowContent, "param");
@ -10340,7 +10346,8 @@ define("tinymce/html/Schema", [
add("video", "src crossorigin poster preload autoplay mediagroup loop " +
"muted controls width height buffered", flowContent, "track source");
add("audio", "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", flowContent, "track source");
add("source", "src type media");
add("picture", "", "img source");
add("source", "src srcset type media sizes");
add("track", "kind src srclang label default");
add("datalist", "", phrasingContent, "option");
add("article section nav aside header footer", "", flowContent);
@ -20942,11 +20949,11 @@ define("tinymce/util/EventDispatcher", [
handlers = bindings[name];
if (handlers) {
for (i = 0, l = handlers.length; i < l; i++) {
handlers[i] = callback = handlers[i];
callback = handlers[i];
// Unbind handlers marked with "once"
if (callback.once) {
off(name, callback);
off(name, callback.func);
}
// Stop immediate propagation if needed
@ -20956,7 +20963,7 @@ define("tinymce/util/EventDispatcher", [
}
// If callback returns false then prevent default and stop all propagation
if (callback.call(scope, args) === false) {
if (callback.func.call(scope, args) === false) {
args.preventDefault();
return args;
}
@ -20979,7 +20986,7 @@ define("tinymce/util/EventDispatcher", [
* // Callback logic
* });
*/
function on(name, callback, prepend) {
function on(name, callback, prepend, extra) {
var handlers, names, i;
if (callback === false) {
@ -20987,6 +20994,14 @@ define("tinymce/util/EventDispatcher", [
}
if (callback) {
callback = {
func: callback
};
if (extra) {
Tools.extend(callback, extra);
}
names = name.toLowerCase().split(' ');
i = names.length;
while (i--) {
@ -21053,7 +21068,7 @@ define("tinymce/util/EventDispatcher", [
// Unbind specific ones
hi = handlers.length;
while (hi--) {
if (handlers[hi] === callback) {
if (handlers[hi].func === callback) {
handlers = handlers.slice(0, hi).concat(handlers.slice(hi + 1));
bindings[name] = handlers;
}
@ -21092,8 +21107,7 @@ define("tinymce/util/EventDispatcher", [
* });
*/
function once(name, callback, prepend) {
callback.once = true;
return on(name, callback, prepend);
return on(name, callback, prepend, {once: true});
}
/**
@ -30744,7 +30758,7 @@ define("tinymce/EditorManager", [
* @property releaseDate
* @type String
*/
releaseDate: '2014-10-22',
releaseDate: '2014-11-19',
/**
* Collection of editor instances.
@ -37621,4 +37635,4 @@ define("tinymce/ui/Throbber", [
});
expose(["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/Env","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/dom/TridentSelection","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/dom/ElementUtils","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/util/Quirks","tinymce/util/Observable","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","tinymce/LegacyInput","tinymce/util/XHR","tinymce/util/JSON","tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/Label","tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/ListBox","tinymce/ui/MenuItem","tinymce/ui/Menu","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox","tinymce/ui/Throbber"]);
})(this);
})(this);

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ $wp_db_version = 30133;
*
* @global string $tinymce_version
*/
$tinymce_version = '4106-20141113';
$tinymce_version = '4106-20141119';
/**
* Holds the required PHP version

View File

@ -103,6 +103,22 @@
equal($clone[0].tagName, 'DIV');
});
test(prefix + 'Constructor window', function() {
var $win;
$win = $(window);
equal($win.length, 1);
strictEqual($win[0], window);
});
test(prefix + 'Constructor window', function() {
var $elm;
$elm = $(document.body);
equal($elm.length, 1);
strictEqual($elm[0], document.body);
});
test(prefix + 'static extend()', function() {
var data;
@ -114,6 +130,7 @@
});
test(prefix + 'static makeArray()', function() {
strictEqual($.makeArray(window)[0], window);
deepEqual($.makeArray({'0': 'a', '1': 'b', length: 2}), ['a', 'b']);
});