Update Umbraco to 7.12.2

This commit is contained in:
2018-09-16 15:08:47 -04:00
parent 7ed7776432
commit 616ab81bad
764 changed files with 142787 additions and 66790 deletions
@@ -0,0 +1,7 @@
// Exports the "anchor" plugin for usage with module loaders
// Usage:
// CommonJS:
// require('tinymce/plugins/anchor')
// ES2015:
// import 'tinymce/plugins/anchor'
require('./plugin.js');
@@ -1,45 +1,118 @@
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
(function () {
var anchor = (function () {
'use strict';
/*global tinymce:true */
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
tinymce.PluginManager.add('anchor', function(editor) {
function showDialog() {
var selectedNode = editor.selection.getNode(), name = '';
var isValidId = function (id) {
return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
};
var getId = function (editor) {
var selectedNode = editor.selection.getNode();
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
return isAnchor ? selectedNode.id || selectedNode.name : '';
};
var insert = function (editor, id) {
var selectedNode = editor.selection.getNode();
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
if (isAnchor) {
selectedNode.removeAttribute('name');
selectedNode.id = id;
editor.undoManager.add();
} else {
editor.focus();
editor.selection.collapse(true);
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id }));
}
};
var $_8muarh8bjh8lpucu = {
isValidId: isValidId,
getId: getId,
insert: insert
};
if (selectedNode.tagName == 'A') {
name = selectedNode.name || selectedNode.id || '';
}
var insertAnchor = function (editor, newId) {
if (!$_8muarh8bjh8lpucu.isValidId(newId)) {
editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
return true;
} else {
$_8muarh8bjh8lpucu.insert(editor, newId);
return false;
}
};
var open = function (editor) {
var currentId = $_8muarh8bjh8lpucu.getId(editor);
editor.windowManager.open({
title: 'Anchor',
body: {
type: 'textbox',
name: 'id',
size: 40,
label: 'Id',
value: currentId
},
onsubmit: function (e) {
var newId = e.data.id;
if (insertAnchor(editor, newId)) {
e.preventDefault();
}
}
});
};
var $_ghc7qg8ajh8lpucs = { open: open };
editor.windowManager.open({
title: 'Anchor',
body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: name},
onsubmit: function(e) {
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', {
id: e.data.name
}));
}
});
}
var register = function (editor) {
editor.addCommand('mceAnchor', function () {
$_ghc7qg8ajh8lpucs.open(editor);
});
};
var $_60epor89jh8lpucr = { register: register };
editor.addButton('anchor', {
icon: 'anchor',
tooltip: 'Anchor',
onclick: showDialog,
stateSelector: 'a:not([href])'
});
var isAnchorNode = function (node) {
return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
};
var setContentEditable = function (state) {
return function (nodes) {
for (var i = 0; i < nodes.length; i++) {
if (isAnchorNode(nodes[i])) {
nodes[i].attr('contenteditable', state);
}
}
};
};
var setup = function (editor) {
editor.on('PreInit', function () {
editor.parser.addNodeFilter('a', setContentEditable('false'));
editor.serializer.addNodeFilter('a', setContentEditable(null));
});
};
var $_etc1gj8cjh8lpucv = { setup: setup };
editor.addMenuItem('anchor', {
icon: 'anchor',
text: 'Anchor',
context: 'insert',
onclick: showDialog
});
});
var register$1 = function (editor) {
editor.addButton('anchor', {
icon: 'anchor',
tooltip: 'Anchor',
cmd: 'mceAnchor',
stateSelector: 'a:not([href])'
});
editor.addMenuItem('anchor', {
icon: 'anchor',
text: 'Anchor',
context: 'insert',
cmd: 'mceAnchor'
});
};
var $_6ikf18djh8lpucw = { register: register$1 };
global.add('anchor', function (editor) {
$_etc1gj8cjh8lpucv.setup(editor);
$_60epor89jh8lpucr.register(editor);
$_6ikf18djh8lpucw.register(editor);
});
function Plugin () {
}
return Plugin;
}());
})();
+1 -1
View File
@@ -1 +1 @@
tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},i=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},n=function(r){var t=e(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:t},onsubmit:function(t){var e,n,o=t.data.id;e=r,(a(n=o)?(i(e,n),0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&t.preventDefault()}})},o=function(t){t.addCommand("mceAnchor",function(){n(t)})},r=function(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",r("false")),t.serializer.addNodeFilter("a",r(null))})},d=function(t){t.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),t.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};t.add("anchor",function(t){c(t),o(t),d(t)})}();