');
- $('#source').val('');
-
- $.ajax({
- type: 'POST',
- async: true,
- url: '../../../../base/EmbedMediaService/Embed/',
- data: { url: url, width: width, height: height },
- dataType: 'json',
- success: function (result) {
- switch (result.Status) {
- case 0:
- //not supported
- $('#preview').html('Not Supported');
- break;
- case 1:
- //error
- $('#preview').html('Error');
- break;
- case 2:
- $('#preview').html(result.Markup);
- $('#source').val(result.Markup);
- if (result.SupportsDimensions) {
- $('#dimensions').show();
- } else {
- $('#dimensions').hide();
- }
- $('#insert').removeAttr('disabled');
- break;
- }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#preview').html("Error");
- }
- });
- },
- beforeResize: function () {
- this.width = parseInt($('#width').val(), 10);
- this.height = parseInt($('#height').val(), 10);
- },
- changeSize: function (type) {
- var width, height, scale, size;
-
- if ($('#constrain').is(':checked')) {
- width = parseInt($('#width').val(), 10);
- height = parseInt($('#height').val(), 10);
- if (type == 'width') {
- this.height = Math.round((width / this.width) * height);
- $('#height').val(this.height);
- } else {
- this.width = Math.round((height / this.height) * width);
- $('#width').val(this.width);
- }
- }
- if ($('#url').val() != '') {
- UmbracoEmbedDialog.showPreview();
- }
- },
- changeSource: function (type) {
- if ($('#source').val() != '') {
- $('#insert').removeAttr('disabled');
- }
- else {
- $('#insert').attr('disabled', 'disabled');
- }
- },
- updatePreviewFromSource: function (type) {
- var sourceVal = $('#source').val();
-
- if (sourceVal != '') {
- $('#preview').html(sourceVal);
- }
- }
-};
-
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da.js
deleted file mode 100644
index a93d2e36f2..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da.js
+++ /dev/null
@@ -1,3 +0,0 @@
-tinyMCE.addI18n('da.umbracoembed', {
- desc: 'Inds\u00E6t ekstern mediefil'
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da_dlg.js
deleted file mode 100644
index 3082589539..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/da_dlg.js
+++ /dev/null
@@ -1,9 +0,0 @@
-tinyMCE.addI18n('da.embed_dlg', {
- title: 'Inds\u00E6t ekstern mediefil',
- general: 'Generelt',
- url: 'Url:',
- size: 'Dimensioner:',
- constrain_proportions: 'Bevar proportioner',
- preview: 'Vis',
- source: 'Vis kilde'
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de.js
deleted file mode 100644
index ad0b940580..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('de.embed_dlg', {
- title: 'Medien von Drittanbietern einbetten',
- general: 'Allgemein',
- url: 'Url:',
- size: 'Abmessungen:',
- constrain_proportions: 'Proportionen beibehalten',
- preview: 'Vorschau',
- source: 'Quellcode'
-
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de_dlg.js
deleted file mode 100644
index ad0b940580..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/de_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('de.embed_dlg', {
- title: 'Medien von Drittanbietern einbetten',
- general: 'Allgemein',
- url: 'Url:',
- size: 'Abmessungen:',
- constrain_proportions: 'Proportionen beibehalten',
- preview: 'Vorschau',
- source: 'Quellcode'
-
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en.js
deleted file mode 100644
index 2b086df34e..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en.js
+++ /dev/null
@@ -1,3 +0,0 @@
-tinyMCE.addI18n('en.umbracoembed', {
- desc: 'Embed third party media'
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_dlg.js
deleted file mode 100644
index e131d87533..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('en.embed_dlg', {
- title: 'Embed third party media',
- general: 'General',
- url: 'Url:',
- size: 'Size:',
- constrain_proportions: 'Constrain',
- preview: 'Preview',
- source: 'Source'
-
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us.js
deleted file mode 100644
index 4698979aab..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us.js
+++ /dev/null
@@ -1,3 +0,0 @@
-tinyMCE.addI18n('en_us.umbracoembed', {
- desc: 'Embed third party media'
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us_dlg.js
deleted file mode 100644
index 8c6a070226..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/en_us_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('en_us.embed_dlg', {
- title: 'Embed third party media',
- general: 'General',
- url: 'Url:',
- size: 'Size:',
- constrain_proportions: 'Constrain',
- preview: 'Preview',
- source: 'Source'
-
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it.js
deleted file mode 100644
index a8ff6693ab..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it.js
+++ /dev/null
@@ -1,9 +0,0 @@
-tinyMCE.addI18n('en.embed_dlg', {
-title: 'Integra media di terze parti',
-general: 'Generale',
-url: 'Url:',
-size: 'Dimensione:',
-constrain_proportions: 'Vincolo',
-preview: 'Anteprima',
-source: 'Sorgente'
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it_dlg.js
deleted file mode 100644
index 87766ce2da..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/it_dlg.js
+++ /dev/null
@@ -1,9 +0,0 @@
-tinyMCE.addI18n('it.embed_dlg', {
-title: 'Integra media di terze parti',
-general: 'Generale',
-url: 'Url:',
-size: 'Dimensione:',
-constrain_proportions: 'Vincolo',
-preview: 'Anteprima',
-source: 'Sorgente'
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja.js
deleted file mode 100644
index c525d3a37e..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('ja.embed_dlg', {
- title: 'サードパーティメディアの埋め込み',
- general: '一般',
- url: 'Url:',
- size: 'サイズ:',
- constrain_proportions: '制約',
- preview: 'プレビュー',
- source: 'ソース'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja_dlg.js
deleted file mode 100644
index db01d093c9..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ja_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('ja.embed_dlg', {
- title: サードパーティメディアの埋め込み',
- general: '一般',
- url: 'Url:',
- size: 'サイズ:',
- constrain_proportions: '制約',
- preview: 'プレビュー',
- source: 'ソース'
-
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru.js
deleted file mode 100644
index a1b566597b..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('ru.embed_dlg', {
- title: 'Вставить внеший элемент медиа',
- general: 'Общее',
- url: 'Ссылка:',
- size: 'Размер:',
- constrain_proportions: 'Сохранять пропорции',
- preview: 'Просмотр',
- source: 'Источник'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru_dlg.js
deleted file mode 100644
index a1b566597b..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/ru_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('ru.embed_dlg', {
- title: 'Вставить внеший элемент медиа',
- general: 'Общее',
- url: 'Ссылка:',
- size: 'Размер:',
- constrain_proportions: 'Сохранять пропорции',
- preview: 'Просмотр',
- source: 'Источник'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv.js
deleted file mode 100644
index 36bcaf8758..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('sv.embed_dlg', {
- title: 'Bädda in tredjeparts media',
- general: 'Generell',
- url: 'Url:',
- size: 'Storlek:',
- constrain_proportions: 'Bibehåll proportioner',
- preview: 'Förhandsgranska',
- source: 'Källa'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv_dlg.js
deleted file mode 100644
index 36bcaf8758..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/sv_dlg.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('sv.embed_dlg', {
- title: 'Bädda in tredjeparts media',
- general: 'Generell',
- url: 'Url:',
- size: 'Storlek:',
- constrain_proportions: 'Bibehåll proportioner',
- preview: 'Förhandsgranska',
- source: 'Källa'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh.js
deleted file mode 100644
index ee41077410..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh.js
+++ /dev/null
@@ -1,10 +0,0 @@
-tinyMCE.addI18n('zh.embed_dlg', {
- title: '嵌入第三方媒体',
- general: '普通',
- url: '链接:',
- size: '尺寸:',
- constrain_proportions: '约束比例',
- preview: '预览',
- source: '源'
-
-});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh_dlg.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh_dlg.js
deleted file mode 100644
index 2e59f0be58..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoembed/langs/zh_dlg.js
+++ /dev/null
@@ -1,9 +0,0 @@
-tinyMCE.addI18n('zh.embed_dlg', {
- title: '嵌入第三方媒体',
- general: '普通',
- url: '链接:',
- size: '尺寸:',
- constrain_proportions: '约束比例',
- preview: '预览',
- source: '源'
-});
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/editor_plugin_src.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/editor_plugin_src.js
deleted file mode 100644
index accb078909..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/editor_plugin_src.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $
- *
- * @author Moxiecode
- * @copyright Copyright 2004-2008, Moxiecode Systems AB, All rights reserved.
- */
-
-(function() {
-// tinymce.PluginManager.requireLangPack('umbraco');
-
- tinymce.create('tinymce.plugins.UmbracoImagePlugin', {
- init: function(ed, url) {
- // Register commands
- ed.addCommand('mceUmbimage', function() {
- // Internal image object like a flash placeholder
- if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
- return;
-
- ed.windowManager.open({
- /* UMBRACO SPECIFIC: Load Umbraco modal window */
- file: tinyMCE.activeEditor.getParam('umbraco_path') + '/plugins/tinymce3/insertImage.aspx',
- width: 575 + ed.getLang('umbracoimg.delta_width', 0),
- height: 505 + ed.getLang('umbracoimg.delta_height', 0),
- inline: 1
- }, {
- plugin_url: url
- });
- });
-
- // Register buttons
- ed.addButton('image', {
- title: 'advimage.image_desc',
- cmd: 'mceUmbimage'
- });
-
- },
-
- getInfo: function() {
- return {
- longname: 'Umbraco image dialog',
- author: 'Umbraco',
- authorurl: 'http://umbraco.org',
- infourl: 'http://umbraco.org',
- version: "1.0"
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('umbracoimg', tinymce.plugins.UmbracoImagePlugin);
-
-})();
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/js/image.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/js/image.js
deleted file mode 100644
index 25d0028fe8..0000000000
--- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoimg/js/image.js
+++ /dev/null
@@ -1,332 +0,0 @@
-var ImageDialog = {
- preInit: function() {
- var url;
-
- tinyMCEPopup.requireLangPack();
-
- if (url = tinyMCEPopup.getParam("external_image_list_url"))
- document.write('');
- },
-
- init: function(ed) {
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
-
- tinyMCEPopup.resizeToInnerSize();
-
- if (n.nodeName == 'IMG') {
- nl.src.value = dom.getAttrib(n, 'src');
- nl.width.value = dom.getAttrib(n, 'width');
- nl.height.value = dom.getAttrib(n, 'height');
- nl.alt.value = dom.getAttrib(n, 'alt');
- nl.orgHeight.value = dom.getAttrib(n, 'rel').split(",")[1];
- nl.orgWidth.value = dom.getAttrib(n, 'rel').split(",")[0];
-
- }
-
- // If option enabled default contrain proportions to checked
- if ((ed.getParam("advimage_constrain_proportions", true)) && f.constrain)
- f.constrain.checked = true;
-
- this.changeAppearance();
- this.showPreviewImage(nl.src.value, 1);
- },
-
- insert: function(file, title) {
- var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
-
- if (f.src.value === '') {
- if (ed.selection.getNode().nodeName == 'IMG') {
- ed.dom.remove(ed.selection.getNode());
- ed.execCommand('mceRepaint');
- }
-
- tinyMCEPopup.close();
- return;
- }
-
- if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
- if (!f.alt.value) {
- tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
- if (s)
- t.insertAndClose();
- });
-
- return;
- }
- }
-
- t.insertAndClose();
- },
-
- insertAndClose: function() {
- var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
-
- tinyMCEPopup.restoreSelection();
-
- // Fixes crash in Safari
- if (tinymce.isWebKit)
- ed.getWin().focus();
-
- if (!ed.settings.inline_styles) {
- args = {
- vspace: nl.vspace.value,
- hspace: nl.hspace.value,
- border: nl.border.value,
- align: getSelectValue(f, 'align')
- };
- } else {
- // Remove deprecated values
- args = {
- vspace: '',
- hspace: '',
- border: '',
- align: ''
- };
- }
-
- tinymce.extend(args, {
- src: nl.src.value,
- width: nl.width.value,
- height: nl.height.value,
- alt: nl.alt.value,
- title: nl.alt.value,
- rel: nl.orgWidth.value + ',' + nl.orgHeight.value
- });
-
- args.onmouseover = args.onmouseout = '';
-
- el = ed.selection.getNode();
-
- if (el && el.nodeName == 'IMG') {
- ed.dom.setAttribs(el, args);
- } else {
- ed.execCommand('mceInsertContent', false, '', 'gi'), '
'); - } - } - - o.content = h; - - }); - - } - - }); - - // Register plugin - tinymce.PluginManager.add('umbracopaste', tinymce.plugins.UmbracoPaste); -})(); diff --git a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoshortcut/editor_plugin_src.js b/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoshortcut/editor_plugin_src.js deleted file mode 100644 index 15d669b4e1..0000000000 --- a/src/Umbraco.Web.UI.Client/lib/tinymce/plugins/umbracoshortcut/editor_plugin_src.js +++ /dev/null @@ -1,43 +0,0 @@ - -(function () { - tinymce.create('tinymce.plugins.Umbracoshortcut', { - init: function (ed, url) { - var t = this; - var ctrlPressed = false; - - t.editor = ed; - - ed.onKeyDown.add(function (ed, e) { - if (e.keyCode == 17) - ctrlPressed = true; - - if (ctrlPressed && e.keyCode == 83) { - jQuery(document).trigger("UMBRACO_TINYMCE_SAVE", e); - ctrlPressed = false; - tinymce.dom.Event.cancel(e); - return false; - } - }); - - ed.onKeyUp.add(function (ed, e) { - if (e.keyCode == 17) - ctrlPressed = false; - }); - }, - - getInfo: function () { - return { - longname: 'Umbraco Save short cut key', - author: 'Umbraco HQ', - authorurl: 'http://umbraco.com', - infourl: 'http://our.umbraco.org', - version: "1.0" - }; - } - - // Private methods - }); - - // Register plugin - tinymce.PluginManager.add('umbracoshortcut', tinymce.plugins.Umbracoshortcut); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index 60bb4957ae..e3a50b482c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -358,7 +358,7 @@ angular.module("umbraco.directives") var unsubscribe = scope.$on("formSubmitting", function () { //TODO: Here we should parse out the macro rendered content so we can save on a lot of bytes in data xfer // we do parse it out on the server side but would be nice to do that on the client side before as well. - scope.value = tinyMceEditor.getContent(); + scope.value = tinyMceEditor ? tinyMceEditor.getContent() : null; }); //when the element is disposed we need to unsubscribe! diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index 9966e94b70..e935557ce9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -82,8 +82,10 @@ @param {boolean} sortable (binding): Will add a move cursor on the node preview. Can used in combination with ui-sortable.
@param {boolean} allowRemove (binding): Show/Hide the remove button.
@param {boolean} allowOpen (binding): Show/Hide the open button.
+@param {boolean} allowEdit (binding): Show/Hide the edit button (Added in version 7.7.0).
@param {function} onRemove (expression): Callback function when the remove button is clicked.
@param {function} onOpen (expression): Callback function when the open button is clicked.
+@param {function} onEdit (expression): Callback function when the edit button is clicked (Added in version 7.7.0).
**/
(function () {
@@ -108,8 +110,10 @@
sortable: "=?",
allowOpen: "=?",
allowRemove: "=?",
+ allowEdit: "=?",
onOpen: "&?",
- onRemove: "&?"
+ onRemove: "&?",
+ onEdit: "&?"
},
link: link
};
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less
index 667754faaa..ed3bd04f8d 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less
@@ -1,8 +1,6 @@
.umb-node-preview {
padding: 7px 0;
- border-radius: 3px;
display: flex;
- align-items: center;
max-width: 66.6%;
box-sizing: border-box;
border-bottom: 1px solid @gray-9;
@@ -37,10 +35,12 @@
.umb-node-preview__content {
flex: 1 1 auto;
+ margin-right: 25px;
}
.umb-node-preview__name {
color: @black;
+ margin-top: 2px;
}
.umb-node-preview__description {
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
index 9c5a2b888c..d58234b493 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
@@ -91,7 +91,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
userService.getCurrentUser().then(function (userData) {
$scope.mediaPickerOverlay = {
view: "mediapicker",
- startNodeId: userData.startMediaIds.length == 0 ? -1 : userData.startMediaIds[0],
+ startNodeId: userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0],
show: true,
submit: function(model) {
var media = model.selectedImages[0];
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js
index fb38581eac..a6a2ddcbab 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js
@@ -16,6 +16,7 @@ angular.module("umbraco")
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
$scope.cropSize = dialogOptions.cropSize;
$scope.lastOpenedNode = localStorageService.get("umbLastOpenedMediaNodeId");
+ $scope.lockedFolder = true;
var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings;
var allowedUploadFiles = mediaHelper.formatFileTypes(umbracoSettings.allowedUploadFiles);
@@ -121,6 +122,8 @@ angular.module("umbraco")
$scope.path = [];
}
+ $scope.lockedFolder = folder.id === -1 && $scope.model.startNodeIsVirtual;
+
$scope.currentFolder = folder;
localStorageService.set("umbLastOpenedMediaNodeId", folder.id);
return getChildren(folder.id);
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html
index ab745f0f75..8c726f4a17 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html
@@ -30,7 +30,7 @@
type="button"
label-key="general_upload"
action="upload()"
- disabled="disabled">
+ disabled="lockedFolder">
@@ -48,7 +48,7 @@
-
- Password has been reset to
-
- <%# ChangingPasswordModel.GeneratedPassword %>
-
- Login Name:
-
-
- E-mail:
-
-
| Documents in index | -- |
|---|---|
| Fields in index | -- |
| Has deletions? / Optimized? | -- - ()/ - - | -
| Include node types | -- |
|---|---|
| Exclude node types | -- |
| Parent node id | -- |
| Name | -Enable sorting | -Type | -
|---|---|---|
| - | - | - |
| Name | -Enable sorting | -Type | -
|---|---|---|
| - | - | - |
| - | - |
|---|
| Score | -Id | -Values | -
|---|---|---|
| - | - | - - - | -
| - | - |
|---|
- <%= umbraco.ui.Text("defaultdialogs", "closeThisWindow")%> -
-- <%= umbraco.ui.Text("defaultdialogs", "regexSearchHelp")%> -
-
-
-
- -
<%=umbraco.ui.Text("editContentSendToPublishText")%>
-
-
- Umbraco v
-
- Copyright 2001 -
-
- Developed by the Umbraco Core
- Team
-
-
- Umbraco is licensed under the open source license MIT
-
- Visit umbraco.org
- for more information.
-
- Dedicated to Gry, August, Villum and Oliver!
-
<%= umbraco.ui.Text("defaultdialogs", "recycleBinWarning")%>
- -- " onclick="updateMacro()" /> - or - <%=umbraco.ui.Text("general", "cancel", UmbracoUser)%> -
- <%} else {%> - -- " /> - or - <%=umbraco.ui.Text("general", "cancel", UmbracoUser)%> -
- - <%}%> -- <%= umbraco.ui.Text("defaultdialogs", "templateContentPlaceHolderHelp")%> -
-- <%= umbraco.ui.Text("defaultdialogs", "templateContentAreaHelp")%> -
-| - <%=umbraco.ui.Text("general", "justify", this.getUser())%> - | -- | -- <%=umbraco.ui.Text("general", "width", this.getUser())%> - | -- - | -
| - <%=umbraco.ui.Text("general", "innerMargin", this.getUser())%> - | -- | -- <%=umbraco.ui.Text("general", "height", this.getUser())%> - | -- - | -
| - <%=umbraco.ui.Text("general", "cellMargin", this.getUser())%> - | -- | -- - | -- - | -
| - <%=umbraco.ui.Text("general", "border", this.getUser())%> - | -- - | -- <%=umbraco.ui.Text("buttons", "styleChoose", this.getUser())%> - | -
- |
-
- " style="width: 60px; - color: gray" disabled="disabled" id="submitbutton" /> - - <%# umbraco.ui.Text("or") %> - <%#umbraco.ui.Text("cancel") %> -
-- <%= umbraco.ui.Text("moveOrCopy","noNodeSelected") %>
-
-
| - - | -
-
|
- ||||
-
|
-
- " + dt.Text + "
Id: " + dt.Id.ToString() + ", Alias: " + dt.Alias + ")
"; - if (dt.PropertyTypes.Count > 0) - LabelDoc.Text += "Property Types:
"; - foreach (var pt in dt.PropertyTypes) - LabelDoc.Text += - "" + pt.Id.ToString() + ", " + pt.Alias + ", " + pt.Name + "
"; - if (dt.getVirtualTabs.Length > 0) - LabelDoc.Text += "Tabs:
"; - foreach (var t in dt.getVirtualTabs.ToList()) - LabelDoc.Text += - "" + t.Id.ToString() + ", " + t.Caption + "
"; - if (dt.AllowedChildContentTypeIDs.Length > 0) - LabelDoc.Text += "Allowed children:
"; - foreach (var child in dt.AllowedChildContentTypeIDs.ToList()) - { - var contentType = new cms.businesslogic.ContentType(child); - LabelDoc.Text += - "" + contentType.Id.ToString() + ", " + contentType.Text + "
"; - } - - LabelDoc.Text += "| " + name + " | (" + d.Language.CultureAlias + ") | " + ui.Text("edit") + " | " + ui.Text("delete") + " |
- <%= umbraco.ui.Text("defaultdialogs", "regexSearchHelp")%> -
-
-
-
- -
" + ui.Text("defaultdialogs", "regexSearchError") + "
-
-
- Umbraco v
-
- Copyright 2001 -
-
- Developed by the Umbraco Core
- Team
-
-
- Umbraco is licensed under the open source license MIT
-
- Visit umbraco.org
- for more information.
-
- Dedicated to Gry, August, Villum and Oliver!
-
- " onclick="updateMacro()" /> - or - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -
- <%} else {%> - -- " /> - or - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -
- - <%}%> -| - <%=umbraco.ui.Text("general", "justify", this.getUser())%> - | -- | -- <%=umbraco.ui.Text("general", "width", this.getUser())%> - | -- - | -
| - <%=umbraco.ui.Text("general", "innerMargin", this.getUser())%> - | -- | -- <%=umbraco.ui.Text("general", "height", this.getUser())%> - | -- - | -
| - <%=umbraco.ui.Text("general", "cellMargin", this.getUser())%> - | -- | -- - | -- - | -
| - <%=umbraco.ui.Text("general", "border", this.getUser())%> - | -- - | -- <%=umbraco.ui.Text("buttons", "styleChoose", this.getUser())%> - | -
- |
-
- " style="width: 60px; - color: gray" disabled="disabled" id="submitbutton" /> - - <%# umbraco.ui.Text("or") %> - <%#umbraco.ui.Text("cancel") %> -
-" + ui.Text("closeThisWindow") + ""; - - return; - } - - // add control prefix to variable for support with masterpages - var prefix = PublishUnpublishedItems.ClientID.Replace(PublishUnpublishedItems.ID, ""); - masterPagePrefix.Text = prefix; - - // by default we only count the published ones - var totalNodesToPublish = cms.businesslogic.web.Document.CountSubs(_nodeId, true); - try - { - Application.Lock(); - // We add both all nodes and only published nodes to the application variables so we can ajax query depending on checkboxes - Application["publishTotalAll" + _nodeId.ToString()] = cms.businesslogic.CMSNode.CountSubs(_nodeId).ToString(); - Application["publishTotal" + _nodeId.ToString()] = totalNodesToPublish.ToString(); - Application["publishDone" + _nodeId.ToString()] = "0"; - } - finally - { - Application.UnLock(); - } - total.Text = totalNodesToPublish.ToString(); - - // Put user code to initialize the page here - if (!IsPostBack) - { - // Add caption to checkbox - PublishAll.Text = ui.Text("publish", "publishAll", d.Text, getUser()); - ok.Text = ui.Text("content", "publish", getUser()); - ok.Attributes.Add("style", "width: 60px"); - ok.Attributes.Add("onClick", "startPublication();"); - - // Add checkbox event, so the publish unpublished childs gets enabled - PublishUnpublishedItems.LabelAttributes.Add("disabled", "true"); - PublishUnpublishedItems.LabelAttributes.Add("id", "publishUnpublishedItemsLabel"); - PublishUnpublishedItems.InputAttributes.Add("disabled", "true"); - PublishAll.InputAttributes.Add("onclick", "togglePublishingModes(this)"); - } - else - { - - if (PublishAll.Checked) - { - _nodesPublished = 0; - - DoPublishSubs(d); - - Application.Lock(); - Application["publishTotal" + _nodeId.ToString()] = 0; - Application.UnLock(); - - feedbackMsg.type = uicontrols.Feedback.feedbacktype.success; - - feedbackMsg.Text = ui.Text("publish", "nodePublishAll", d.Text, getUser()) + "
" + ui.Text("closeThisWindow") + ""; - - ClientTools.ReloadActionNode(true, true); - - Application.Lock(); - - Application["publishTotal" + _nodeId.ToString()] = null; - Application["publishDone" + _nodeId.ToString()] = null; - Application.UnLock(); - } - else - { - if (d.PublishWithResult(getUser())) - { - feedbackMsg.type = uicontrols.Feedback.feedbacktype.success; - feedbackMsg.Text = ui.Text("publish", "nodePublish", d.Text, getUser()) + "
" + ui.Text("closeThisWindow") + ""; - } - else { - feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice; - feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByEvent", d.Text, getUser()) + "
" + ui.Text("closeThisWindow") + "";
- }
- ClientTools.ReloadActionNode(true, false);
- }
-
- TheForm.Visible = false;
- theEnd.Visible = true;
- }
- }
-
- private void DoPublishSubs(cms.businesslogic.web.Document d)
- {
- if (d.Published || PublishUnpublishedItems.Checked)
- {
- if (d.PublishWithResult(UmbracoUser))
- {
-
-
- _nodesPublished++;
- Application.Lock();
- Application["publishDone" + _nodeId.ToString()] = _nodesPublished.ToString();
- Application.UnLock();
- foreach (var dc in d.Children)
- {
- DoPublishSubs(dc);
- }
- }
- else
- {
- LogHelper.Warn " + ui.Text("macroDoesNotHaveProperties") + " " + ui.Text("closeThisWindow") + "";
- macroProperties.Controls.Add(fb);
- edit_buttons.Visible = false;
- }
-
- }
- else
- {
- foreach (var mp in m.Properties)
- {
-
- var macroAssembly = mp.Type.Assembly;
- var macroType = mp.Type.Type;
- try
- {
- var assembly = Assembly.LoadFrom(IOHelper.MapPath(SystemDirectories.Bin + "/" + macroAssembly + ".dll"));
-
- var type = assembly.GetType(macroAssembly + "." + macroType);
- var typeInstance = Activator.CreateInstance(type) as IMacroGuiRendering;
- if (typeInstance != null)
- {
- var control = Activator.CreateInstance(type) as Control;
- control.ID = mp.Alias;
-
- if (!IsPostBack)
- {
- string propertyValue = Request["umb_" + mp.Alias];
- if (propertyValue != null)
- {
- // replace linebreaks and quotes
- propertyValue =
- propertyValue.Replace("\\r", "\r").Replace("\\n", "\n").Replace("\\\"", "\"");
-
- // check encoding
- propertyValue = HttpUtility.UrlDecode(propertyValue);
-
- if (propertyValue != "")
- {
- type.GetProperty("Value").SetValue(control,
- Convert.ChangeType(
- propertyValue,
- type.GetProperty("Value").PropertyType),
- null);
- }
- }
- }
-
-
- var pp = new uicontrols.PropertyPanel();
- pp.Text = mp.Name;
- pp.Controls.Add(control);
- _scriptOnLoad += "\t\tregisterAlias('" + control.ID + "');\n";
- macroProperties.Controls.Add(pp);
-
- _dataFields.Add(control);
-
-
- }
- else
- {
- Trace.Warn("umbEditContent",
- "Type doesn't exist or is not umbraco.interfaces.DataFieldI ('" + macroAssembly +
- "." + macroType + "')");
- }
- }
- catch (Exception fieldException)
- {
- Trace.Warn("umbEditContent", "Error creating type '" + macroAssembly + "." + macroType + "'",
- fieldException);
- }
- }
- }
- }
- else
- {
- IRecordsReader macroRenderings;
- if (Request["editor"] != "")
- {
- const string query = "select macroAlias, macroName from cmsMacro where macroUseInEditor = 1 order by macroName";
- using (var sqlHelper = BusinessLogic.Application.SqlHelper)
- using (var renderings = sqlHelper.ExecuteReader(query))
- macroRenderings = renderings;
- }
- else
- {
- const string query = "select macroAlias, macroName from cmsMacro order by macroName";
- using (var sqlHelper = BusinessLogic.Application.SqlHelper)
- using (var renderings = sqlHelper.ExecuteReader(query))
- macroRenderings = renderings;
- }
-
- umb_macroAlias.DataSource = macroRenderings;
- umb_macroAlias.DataValueField = "macroAlias";
- umb_macroAlias.DataTextField = "macroName";
- umb_macroAlias.DataBind();
- macroRenderings.Close();
- }
- }
-
-
- protected void renderMacro_Click(object sender, EventArgs e)
- {
- var pageId = int.Parse(Request["umbPageId"]);
-
- var macroAttributes = string.Format("macroAlias=\"{0}\"", m.Alias);
-
- var pageVersion = new Guid(Request["umbVersionId"]);
-
- var attributes = new Hashtable { { "macroAlias", m.Alias } };
-
- foreach (Control c in _dataFields)
- {
- try
- {
- var ic = (IMacroGuiRendering)c;
- attributes.Add(c.ID.ToLower(), ic.Value);
- macroAttributes += string.Format(" {0}=\"{1}\"", c.ID, ic.Value.Replace("\"", "\\\"").Replace("\n", "\\n").Replace("\r", "\\r"));
- }
- catch
- {
- }
- }
-
- HttpContext.Current.Items["macrosAdded"] = 0;
- HttpContext.Current.Items["pageID"] = pageId.ToString();
-
- var div = macro.renderMacroStartTag(attributes, pageId, pageVersion).Replace("\\", "\\\\").Replace("'", "\\'");
-
- var macroContent = macro.MacroContentByHttp(pageId, pageVersion, attributes).Replace("\\", "\\\\").Replace("'", "\\'").Replace("/", "\\/").Replace("\n", "\\n");
-
- if (macroContent.Length > 0 && macroContent.ToLower().IndexOf("
-
-
-
-
-
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs
deleted file mode 100644
index 6b81b2c129..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using umbraco.BusinessLogic;
-using umbraco.businesslogic.Exceptions;
-
-namespace umbraco.presentation.umbraco.plugins.tinymce3
-{
- public partial class insertChar : BasePages.UmbracoEnsuredPage
- {
- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
-
- //this could be used for media or content so we need to at least validate that the user has access to one or the other
- if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString()))
- throw new UserAuthorizationException("The current user doesn't have access to the section/app");
- }
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- ClientLoader.DataBind();
- }
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs
deleted file mode 100644
index fc3cc23f13..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HTML-Code
-
-
-
-
-
-
-
-
- NUM-Code
-
-
-
-