" + error + "
"); + } +} + + + +function initButtonHover() { + if (typeof document.body.style.maxHeight == 'undefined') ie6 = true; + else ie6 = false; + var inputs = document.getElementsByTagName("input"); + for (var i = 0; i < inputs.length; i++) { + if (inputs[i].type == "image") { + if (ie6) { + if (inputs[i].src.indexOf(".png") != -1) { + var src = inputs[i].src; + inputs[i].path = inputs[i].src; + inputs[i].src = "images/none.gif"; + inputs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')"; + } + } + inputs[i].onmouseover = function () { + if (this.path && ie6) this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.path.replace(this.path, this.path.substr(0, this.path.lastIndexOf(".")) + "-hover" + this.path.substr(this.path.lastIndexOf("."))) + "',sizingMethod='scale')"; + else this.src = this.src.replace(this.src, this.src.substr(0, this.src.lastIndexOf(".")) + "-hover" + this.src.substr(this.src.lastIndexOf("."))); + } + inputs[i].onmouseout = function () { + if (this.path && ie6) this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.path + "',sizingMethod='scale')"; + this.src = this.src.replace("-hover", ""); + } + } + } +} +function ieHover(_selector, _class) { + if (_class == null) _class = 'hover'; + if (jQuery.browser.msie && jQuery.browser.version < 7) { + jQuery(_selector).each(function() { + jQuery(this).mouseenter(function() { + jQuery(this).addClass(_class); + }).mouseleave(function() { + jQuery(this).removeClass(_class); + }); + }); + } +} +function clearInputs() { + jQuery('input:text, input:password, textarea').each(function () { + var _el = jQuery(this); + _el.data('val', _el.val()); + _el.bind('focus', function () { + if (_el.val() == _el.data('val')) _el.val(''); + }).bind('blur', function () { + if (_el.val() == '') _el.val(_el.data('val')); + }); + }); +} +function initStep() { + jQuery('.tabset').each(function() { + var set = jQuery(this); + var link = set.find('ul > li'); + var ind = link.index(link.filter('.active:eq(0)')); + link.each(function(i, el) { + if (i < ind) link.eq(i).addClass('disable'); + else link.eq(i).removeClass('disable'); + }); + link.bind('click', function() { + return false; + }); + }); +} +function initTabs() { + jQuery('.database-hold').each(function () { + var _list = $(this); + var _links = _list.find('a.database-tab'); + var _select = _list.find('.sel'); + var _currentDatabase; + var selectVal; + var selectValNew; + + _select.each(function() { + var select = $(this); + selectVal = select.val(); + + jQuery('#database-step1').hide(); + jQuery('#database-step1-2').hide(); + jQuery('#database-step2').hide(); + + select.change(function() { + selectValNew = jQuery(this).val(); + + toggleDatabaseOption(selectValNew); + }); + }); + _links.each(function () { + var _link = $(this); + var _href = _link.attr('href'); + var _tab = jQuery(_href); + + if (_link.hasClass('active')) _tab.show(); + else _tab.hide(); + + _link.click(function () { + _links.filter('.active').each(function () { + jQuery(jQuery(this).removeClass('active').attr('href')).hide(); + }); + _link.addClass('active'); + _tab.show(); + + return false; + }); + }); + + toggleDatabaseOption(jQuery(".sel").val()); + }); +} + +//add by pph, updated by tg for db step refactor +function toggleDatabaseOption(selectValNew) { + + + + var step1 = '#database-options'; + + //Defensive if else to prevent this being executed on non database pages + if (jQuery(step1).length) { + + + + var instructionText = jQuery(step1 + ' .instructionText'); + var buttonBox = jQuery('.installbtn'); + + + //hide instructions + jQuery('#database-blank-inputs').hide(); + //instructionText.hide(); + buttonBox.hide(); + + //hide all db options + //jQuery(step1 + ' .row').hide(); + + if (selectValNew != '') { + if (selectValNew == 'SqlServer' || selectValNew == 'SqlAzure' || selectValNew == 'MySql') { + jQuery('#database-blank-inputs').show(); + //instructionText.show(); + buttonBox.show(); + } +// else if (selectValNew == 'Custom') { +// jQuery(step1 + ' .custom').show(); +// instructionText.show(); +// buttonBox.show(); +// } +// else if (selectValNew.indexOf('SQLCE4Umbraco') > -1 && !hasEmbeddedDlls) { +// jQuery(step1 + ' .embeddedError').show(); +// } +// else if (selectValNew.indexOf('SQLCE4Umbraco') > -1) { +// jQuery(step1 + ' .embedded').show(); +// instructionText.show(); +// buttonBox.show(); +// } + } + } +} + +//add by pph +function showDatabaseSettings() { + var link = jQuery('.btn-yes > a'); + link.addClass('active'); + jQuery(link.attr('href')).show(); +} + + +function initSingleTab() { + jQuery('a.single-tab').each(function() { + var _links = jQuery(this); + _links.each(function() { + var _link = $(this); + var _href = _link.attr('href'); + if (_href == "#") return; + var _tab = $(_href); + _tab.hide(); + _link.click(function() { + _links.filter('.active').each(function() { + $($(this).removeClass('active').attr('href')).hide(); + }); + _link.addClass('active'); + _tab.show(); + jQuery(this).parents('div.main-tabinfo').hide(); + jQuery(this).parents('div.install-tab').hide(); + setTimeout(function() { + jQuery('html').scrollTop(0); + }, 1); + }); + }); + if (_links.parents('.lightbox').length) { + jQuery('.lightbox').each(function() { + jQuery(this).find('.single-tab').bind('click', function() { + jQuery('#single-tab2').hide(); + }); + }); + } + }); + jQuery('.bg-main').each(function () { + var set = jQuery(this); + var _nav = jQuery('.add-nav > ul'); + var link = _nav.find('> li'); + var itemBg = set.find('>div'); + var itemHeight; + var waitAnimation = true; + if (jQuery(window).height() < jQuery('#wrapper').outerHeight(true)) itemHeight = jQuery('#wrapper').outerHeight(true); + else itemHeight = jQuery('#wrapper').outerHeight(true); + itemBg.css({ height: itemHeight }) + var ind = 0; + var prevInd = ind; + var _timer; + var _speedAnim = 5000; + itemBg.hide(); + itemBg.filter(':last').show(); + link.bind('click', function () { + prevInd = ind; + ind = link.index(this); + itemBg.eq(ind).css({ zIndex: 10 }); + itemBg.eq(ind).fadeIn(_speedAnim); + if (prevInd != ind) itemBg.eq(prevInd).fadeOut(_speedAnim).css({ zIndex: 1 }); + }) + }) +} +function initZoomList() { + var _speed = 250; + jQuery('.zoom-list').each(function() { + var set = jQuery(this); + var link = set.find('ul > li'); + var zoomImg = link.find('.zoom-img'); + var imgWidth = zoomImg.width(); + var imgHeight = zoomImg.height(); + var stepZoom = 60; + var dropBox = set.find('.drop-hold'); + if (jQuery.browser.msie && jQuery.browser.version < 7) { + return; + } else { + link.hover( + function() { + zoomImg = jQuery(this).find('.zoom-img'); + zoomImg.animate({ + width: 202, + height: 275, + top: -stepZoom / 2, + left: -stepZoom / 2 + }, { queue: false, duration: _speed }); + }, + function() { + zoomImg.animate({ + width: imgWidth, + height: imgHeight, + top: 0, + left: 0 + }, { queue: false, duration: _speed, complete: function() { zoomImg.removeAttr('style') } }); + } + ); + dropBox.bind('mouseout', function() { + zoomImg.animate({ + width: imgWidth, + height: imgHeight, + top: 0, + left: 0 + }, { queue: false, duration: _speed, complete: function() { zoomImg.removeAttr('style') } }); + }); + } + }); +} +function initZoomList2() { + var _speed = 250; + jQuery('.zoom-list2').each(function() { + var set = jQuery(this); + var link = set.find('.image-hold'); + var faikMask = link.find('.faik-mask'); + var faikMaskIE6 = link.find('.faik-mask-ie6'); + var zoomImg = link.find('.zoom-img'); + var maskWidth = faikMask.width(); + var maskHeight = faikMask.height(); + var imgWidth = zoomImg.width(); + var imgHeight = zoomImg.height(); + var stepZoom = 44; + var dropBox = link.find('.gal-drop'); + dropBox.css({ top: 12, left: 12 }).hide(); + var timer; + if (jQuery.browser.msie && jQuery.browser.version < 7) { + link.hover( + function() { + dropBox.removeAttr('style').hide(); + faikMask = jQuery(this).find('.faik-mask'); + faikMaskIE6 = jQuery(this).find('.faik-mask-ie6'); + zoomImg = jQuery(this).find('.zoom-img'); + dropBox = jQuery(this).find('.gal-drop'); + dropBox.css({ + top: 12, + left: 12 + }).show(); + faikMask.hide(); + jQuery(this).css({ + marginTop: -stepZoom / 4, + marginLeft: -stepZoom / 4 + }); + faikMaskIE6.css({ + top: 0, + left: 0 + }) + zoomImg.css({ + width: imgWidth + stepZoom, + height: imgHeight + stepZoom - 10, + marginTop: 10, + marginLeft: 3, + marginBottom: -stepZoom + }); + }, + function() { + dropBox.removeAttr('style').hide(); + faikMask.show(); + jQuery(this).css({ + marginTop: 0, + marginLeft: 0 + }); + faikMaskIE6.css({ + top: -9999, + left: -9999, + marginBottom: 0 + }) + zoomImg.css({ + width: imgWidth, + height: imgHeight, + top: 0, + left: 0, + marginTop: 0, + marginLeft: 0, + marginBottom: 0 + }); + } + ); + set.bind('mouseleave', function() { + if (timer) clearTimeout(timer); + dropBox.removeAttr('style').hide(); + }); + dropBox.hover( + function() { + if (timer) clearTimeout(timer); + jQuery(this).show(); + }, + function() { + if (timer) clearTimeout(timer); + dropBox.removeAttr('style').hide(); + } + ); + } else { + link.hover( + function() { + if (timer) clearTimeout(timer); + dropBox.stop().hide(); + faikMask = jQuery(this).find('.faik-mask').removeAttr('style'); + zoomImg = jQuery(this).find('.zoom-img').removeAttr('style'); + dropBox = jQuery(this).find('.gal-drop').hide(); + //Image holder animate + jQuery(this).animate({ + marginTop: -stepZoom / 4, + marginLeft: -stepZoom / 4 + }, { queue: false, duration: _speed }); + //Zoom mask + timer = setTimeout(function() { + dropBox.fadeIn(_speed); + }, _speed) + faikMask.animate({ + width: maskWidth + stepZoom + 5, + height: maskHeight + stepZoom + 5, + top: -stepZoom / 2, + left: -stepZoom / 2, + marginBottom: -stepZoom + }, { queue: false, duration: _speed }); + //Zoom image + zoomImg.animate({ + width: imgWidth + stepZoom, + height: imgHeight + stepZoom - 10, + marginTop: 5, + marginLeft: 3, + marginBottom: -stepZoom + }, { queue: false, duration: _speed }); + if (jQuery.browser.msie && jQuery.browser.version == 7) { + zoomImg.animate({ + width: imgWidth + stepZoom, + height: imgHeight + stepZoom - 10, + marginTop: 11, + marginLeft: 3, + marginBottom: -stepZoom + }, { queue: false, duration: _speed }); + } + }, + function() { + if (timer) clearTimeout(timer); + dropBox.hide(); + jQuery(this).animate({ + marginTop: 0, + marginLeft: 0 + }, { queue: false, duration: _speed }); + faikMask.animate({ + width: maskWidth, + height: maskHeight, + top: 0, + left: 0, + marginTop: 0, + marginLeft: 0, + marginBottom: 0 + }, { queue: false, duration: _speed, complete: function() { faikMask.removeAttr('style') } }); + + zoomImg.animate({ + width: imgWidth, + height: imgHeight, + top: 0, + left: 0, + marginTop: 0, + marginLeft: 0, + marginBottom: 0 + }, { queue: false, duration: _speed, complete: function() { zoomImg.removeAttr('style') } }); + } + ); + set.bind('mouseleave', function() { + if (timer) clearTimeout(timer); + dropBox.hide(); + link.animate({ + marginTop: 0, + marginLeft: 0 + }, { queue: false, duration: _speed }); + faikMask.animate({ + width: maskWidth, + height: maskHeight, + top: 0, + left: 0, + marginTop: 0, + marginLeft: 0, + marginBottom: 0 + }, { queue: false, duration: _speed, complete: function() { faikMask.removeAttr('style') } }); + zoomImg.animate({ + width: imgWidth, + height: imgHeight, + top: 0, + left: 0, + marginTop: 0, + marginLeft: 0, + marginBottom: 0 + }, { queue: false, duration: _speed, complete: function() { zoomImg.removeAttr('style') } }); + }); + } + }); +} +function initSlide() { + jQuery('.gallery').each(function() { + var set = jQuery(this); + var btnPrev = set.find('.btn-prev'); + var btnNext = set.find('.btn-next'); + var slider = set.find('.gal-box'); + var swicher = set.find('.swicher'); + swicher.empty(); + + //numberOfSkins is a global varibale injected into the page by the loadStarterkitDesigns usercontrol + if (numberOfSkins < 5) { + btnPrev.hide(); + btnNext.hide(); + } + + slider.cycle({ + fx: 'scrollHorz', + timeout: 5000, + prev: btnPrev, + next: btnNext, + autostopCount: 1, + autostop: 1, + manualTrump: false, + pager: swicher, + activePagerClass: 'active', + pagerAnchorBuilder: function(index) { + return ']*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
/gi,"\n");b(/
/gi,"\n");b(/
/gi,"\n");b(//gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/bbcode/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/bbcode/editor_plugin_src.js new file mode 100644 index 0000000000..4e7eb3377f --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,120 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/
(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/ (.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(/ /gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/ ]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(//gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ |\u00a0/gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
"); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin.js new file mode 100644 index 0000000000..2ed042c3ae --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin_src.js new file mode 100644 index 0000000000..48b0fff99f --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/contextmenu/editor_plugin_src.js @@ -0,0 +1,163 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ + tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed) { + var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey, hideMenu; + + t.editor = ed; + + contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ + t.onContextMenu = new tinymce.util.Dispatcher(this); + + hideMenu = function(e) { + hide(ed, e); + }; + + showMenu = ed.onContextMenu.add(function(ed, e) { + // Block TinyMCE menu on ctrlKey and work around Safari issue + if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative) + return; + + Event.cancel(e); + + // Select the image if it's clicked. WebKit would other wise expand the selection + if (e.target.nodeName == 'IMG') + ed.selection.select(e.target); + + t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY); + Event.add(ed.getDoc(), 'click', hideMenu); + + ed.nodeChanged(); + }); + + ed.onRemove.add(function() { + if (t._menu) + t._menu.removeAll(); + }); + + function hide(ed, e) { + realCtrlKey = 0; + + // Since the contextmenu event moves + // the selection we need to store it away + if (e && e.button == 2) { + realCtrlKey = e.ctrlKey; + return; + } + + if (t._menu) { + t._menu.removeAll(); + t._menu.destroy(); + Event.remove(ed.getDoc(), 'click', hideMenu); + t._menu = null; + } + }; + + ed.onMouseDown.add(hide); + ed.onKeyDown.add(hide); + ed.onKeyDown.add(function(ed, e) { + if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) { + Event.cancel(e); + showMenu(ed, e); + } + }); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Contextmenu', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _getMenu : function(ed) { + var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p; + + if (m) { + m.removeAll(); + m.destroy(); + } + + p = DOM.getPos(ed.getContentAreaContainer()); + + m = ed.controlManager.createDropMenu('contextmenu', { + offset_x : p.x + ed.getParam('contextmenu_offset_x', 0), + offset_y : p.y + ed.getParam('contextmenu_offset_y', 0), + constrain : 1, + keyboard_focus: true + }); + + t._menu = m; + + m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); + m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); + m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); + + if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { + m.addSeparator(); + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + } + + m.addSeparator(); + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + + m.addSeparator(); + am = m.addMenu({title : 'contextmenu.align'}); + am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); + am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); + am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); + am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); + + t.onContextMenu.dispatch(t, m, el, col); + + return m; + } + }); + + // Register plugin + tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); +})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin.js new file mode 100644 index 0000000000..90847e78e3 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){var d=this;d.editor=b;function a(e){var h=b.dom,g,f=b.selection.getSelectedBlocks();if(f.length){g=h.getAttrib(f[0],"dir");tinymce.each(f,function(i){if(!h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())){if(g!=e){h.setAttrib(i,"dir",e)}else{h.setAttrib(i,"dir",null)}}});b.nodeChanged()}}b.addCommand("mceDirectionLTR",function(){a("ltr")});b.addCommand("mceDirectionRTL",function(){a("rtl")});b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});b.onNodeChange.add(d._nodeChange,d)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin_src.js new file mode 100644 index 0000000000..b134014127 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/directionality/editor_plugin_src.js @@ -0,0 +1,85 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Directionality', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + function setDir(dir) { + var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks(); + + if (blocks.length) { + curDir = dom.getAttrib(blocks[0], "dir"); + + tinymce.each(blocks, function(block) { + // Add dir to block if the parent block doesn't already have that dir + if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) { + if (curDir != dir) { + dom.setAttrib(block, "dir", dir); + } else { + dom.setAttrib(block, "dir", null); + } + } + }); + + ed.nodeChanged(); + } + } + + ed.addCommand('mceDirectionLTR', function() { + setDir("ltr"); + }); + + ed.addCommand('mceDirectionRTL', function() { + setDir("rtl"); + }); + + ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); + ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); + + ed.onNodeChange.add(t._nodeChange, t); + }, + + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var dom = ed.dom, dir; + + n = dom.getParent(n, dom.isBlock); + if (!n) { + cm.setDisabled('ltr', 1); + cm.setDisabled('rtl', 1); + return; + } + + dir = dom.getAttrib(n, 'dir'); + cm.setActive('ltr', dir == "ltr"); + cm.setDisabled('ltr', 0); + cm.setActive('rtl', dir == "rtl"); + cm.setDisabled('rtl', 0); + } + }); + + // Register plugin + tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin.js new file mode 100644 index 0000000000..dbdd8ffb58 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin_src.js new file mode 100644 index 0000000000..71d5416972 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/editor_plugin_src.js @@ -0,0 +1,43 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/emotions.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/emotions.htm new file mode 100644 index 0000000000..1013556549 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/emotions.htm @@ -0,0 +1,42 @@ + + + +
{#emotions_dlg.title} + + + + + +++ + diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cool.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cool.gif new file mode 100644 index 0000000000..ba90cc36fb Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cool.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cry.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cry.gif new file mode 100644 index 0000000000..74d897a4f6 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-cry.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-embarassed.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-embarassed.gif new file mode 100644 index 0000000000..963a96b8a7 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-foot-in-mouth.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100644 index 0000000000..c7cf1011da Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-frown.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-frown.gif new file mode 100644 index 0000000000..716f55e161 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-frown.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-innocent.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-innocent.gif new file mode 100644 index 0000000000..334d49e0e6 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-innocent.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-kiss.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-kiss.gif new file mode 100644 index 0000000000..4efd549ed3 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-kiss.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-laughing.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-laughing.gif new file mode 100644 index 0000000000..82c5b182e6 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-laughing.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-money-mouth.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-money-mouth.gif new file mode 100644 index 0000000000..ca2451e102 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-sealed.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-sealed.gif new file mode 100644 index 0000000000..fe66220c24 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-sealed.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-smile.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-smile.gif new file mode 100644 index 0000000000..fd27edfaaa Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-smile.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-surprised.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-surprised.gif new file mode 100644 index 0000000000..0cc9bb71cc Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-surprised.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-tongue-out.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-tongue-out.gif new file mode 100644 index 0000000000..2075dc1605 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-undecided.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-undecided.gif new file mode 100644 index 0000000000..bef7e25730 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-undecided.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-wink.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-wink.gif new file mode 100644 index 0000000000..0631c7616e Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-wink.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-yell.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-yell.gif new file mode 100644 index 0000000000..648e6e8791 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/img/smiley-yell.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/js/emotions.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/js/emotions.js new file mode 100644 index 0000000000..b360f20b68 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/js/emotions.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + addKeyboardNavigation: function(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table"); + + settings ={ + root: "emoticon_table", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); + }, + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + this.addKeyboardNavigation(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/da_dlg.js new file mode 100644 index 0000000000..165137e7b0 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.emotions_dlg',{cry:"Gr\u00e6de",cool:"Cool",desc:"Hum\u00f8rikoner",title:"Inds\u00e6t hum\u00f8rikon",yell:"R\u00e5be",wink:"Vink",undecided:"Ubeslutsom","tongue_out":"Tunge ud",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Pengemund",laughing:"Grine",kiss:"Kys",innocent:"Uskyldig",frown:"Forskr\u00e6kket","foot_in_mouth":"Fod i munden",embarassed:"Flov",usage:"Brug venstre og h\u00f8jre piletaster til at navigere"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/de_dlg.js new file mode 100644 index 0000000000..9ef427cbbc --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.emotions_dlg',{cry:"Weinend",cool:"Cool",desc:"Smilies",title:"Smiley einf\u00fcgen",yell:"Br\u00fcllend",wink:"Zwinkernd",undecided:"Unentschlossen","tongue_out":"Zunge raus",surprised:"\u00dcberrascht",smile:"L\u00e4chelnd",sealed:"Verschlossen","money_mouth":"Geld",laughing:"Lachend",kiss:"K\u00fcssend",innocent:"Unschuldig",frown:"Stirnrunzelnd","foot_in_mouth":"Reingefallen",embarassed:"Verlegen",usage:"Navigation mit linken und rechten Pfeilen."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_dlg.js new file mode 100644 index 0000000000..c765af67ef --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_us_dlg.js new file mode 100644 index 0000000000..c6267b416a --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/en_us_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en_us.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fi_dlg.js new file mode 100644 index 0000000000..7e620dd5f3 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.emotions_dlg',{cry:"Itku",cool:"Cool",desc:"Hymi\u00f6t",title:"Lis\u00e4\u00e4 hymi\u00f6",yell:"Huuto",wink:"Silm\u00e4nisku",undecided:"P\u00e4\u00e4tt\u00e4m\u00e4t\u00f6n","tongue_out":"Kieli ulkona",surprised:"Yll\u00e4ttynyt",smile:"Hymy",sealed:"Tukittu","money_mouth":"Klink Klink (raha)",laughing:"Nauru",kiss:"Pusu",innocent:"Viaton",frown:"Otsan rypistys","foot_in_mouth":"Jalka suussa",embarassed:"Nolostunut",usage:"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fr_dlg.js new file mode 100644 index 0000000000..971cf0966d --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.emotions_dlg',{cry:"En pleurs",cool:"Cool",desc:"\u00c9motic\u00f4nes",title:"Ins\u00e9rer une \u00e9motic\u00f4ne",yell:"Criant",wink:"Clin d\'\u0153il",undecided:"Incertain","tongue_out":"Langue tir\u00e9e",surprised:"Surpris",smile:"Sourire",sealed:"Bouche cousue","money_mouth":"Avare",laughing:"Rigolant",kiss:"Bisou",innocent:"Innocent",frown:"D\u00e9\u00e7u","foot_in_mouth":"Pied de nez",embarassed:"Embarrass\u00e9",usage:"Utilisez les fl\u00e8ches gauche et droite pour naviguer."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/he_dlg.js new file mode 100644 index 0000000000..2664cd224e --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.emotions_dlg',{cry:"\u05d1\u05d5\u05db\u05d4",cool:"\u05de\u05d2\u05e0\u05d9\u05d1",desc:"\u05e1\u05de\u05d9\u05d9\u05dc\u05d9\u05dd",title:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05de\u05d9\u05d9\u05dc\u05d9",yell:"\u05e6\u05e2\u05e7\u05d4",wink:"\u05e7\u05e8\u05d9\u05e6\u05d4",undecided:"\u05d4\u05e1\u05e0\u05e0\u05d9","tongue_out":"\u05dc\u05e9\u05d5\u05df \u05d1\u05d7\u05d5\u05e5",surprised:"\u05de\u05d5\u05e4\u05ea\u05e2",smile:"\u05d7\u05d9\u05d5\u05da",sealed:"\u05d0\u05d8\u05d5\u05dd","money_mouth":"\u05db\u05e1\u05e3",laughing:"\u05e6\u05d5\u05d7\u05e7",kiss:"\u05e0\u05e9\u05d9\u05e7\u05d4",innocent:"\u05ea\u05de\u05d9\u05dd",frown:"\u05de\u05d6\u05e2\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e4\u05d4","foot_in_mouth":"\u05e8\u05d2\u05dc \u05d1\u05e4\u05d4",embarassed:"\u05e0\u05d1\u05d5\u05da",usage:"\u05d4\u05e9\u05ea\u05de\u05e9\u05d5 \u05d1\u05d7\u05e5 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4 \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/it_dlg.js new file mode 100644 index 0000000000..06998660a4 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.emotions_dlg',{cry:"Piango",cool:"Fico",desc:"Faccina",title:"Inserisci faccina",yell:"Arrabbiato",wink:"Occhiolino",undecided:"Indeciso","tongue_out":"Linguaccia",surprised:"Sorpreso",smile:"Sorridente",sealed:"Bocca sigillata","money_mouth":"Bocca danarosa",laughing:"Risatona",kiss:"Bacio",innocent:"Santarellino",frown:"Triste","foot_in_mouth":"Piede in bocca",embarassed:"Imbarazzato",usage:"Utilizza le freccie sinistra e destra per navigare."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ja_dlg.js new file mode 100644 index 0000000000..7ff287f390 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.emotions_dlg',{cry:"\u6ce3\u304d\u9854",cool:"\u30af\u30fc\u30eb",desc:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3",title:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3\u306e\u633f\u5165",yell:"\u30a8\u30fc\u30eb",wink:"\u30a6\u30a3\u30f3\u30af",undecided:"\u672a\u6c7a\u5b9a","tongue_out":"\u30a2\u30c3\u30ab\u30f3\u30d9\u30fc",surprised:"\u9a5a\u304d",smile:"\u7b11\u9854",sealed:"\u5c01\u5370","money_mouth":"\u53e3\u306b\u304a\u91d1",laughing:"\u7b11\u3044",kiss:"\u30ad\u30b9",innocent:"\u7d14\u771f\u7121\u57a2",frown:"\u6e0b\u9762","foot_in_mouth":"\u53e3\u306b\u8db3",embarassed:"\u56f0\u60d1",usage:"\u5de6\u3068\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3067\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/nl_dlg.js new file mode 100644 index 0000000000..0e7d7babbf --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.emotions_dlg',{cry:"Huilen",cool:"Stoer",desc:"Emoties",title:"Emotie invoegen",yell:"Roepen",wink:"Knipogen",undecided:"Onbeslist","tongue_out":"Tong uitsteken",surprised:"Verrast",smile:"Lachen",sealed:"Afgesloten","money_mouth":"Hebberig",laughing:"Lachen",kiss:"Zoenen",innocent:"Onschuldig",frown:"Wenkbrauw ophalen","foot_in_mouth":"Verstomd",embarassed:"Schamen",usage:"Gebruik linker en rechter pijltjestoetsen om te navigeren."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/no_dlg.js new file mode 100644 index 0000000000..66973a807a --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.emotions_dlg',{cry:"Griner",cool:"Cool",desc:"Hum\u00f8rfjes",title:"Sett inn hum\u00f8rfjes",yell:"Skrik",wink:"Blunke",undecided:"Skeptisk","tongue_out":"Rekke tunge",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Penger i munnen",laughing:"Ler",kiss:"Kyss",innocent:"Uskyldig",frown:"Skummer","foot_in_mouth":"Fot i munnen",embarassed:"Flau",usage:"Bruk h\u00f8yre og venstre piler for \u00e5 velge."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pl_dlg.js new file mode 100644 index 0000000000..4e676926b3 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.emotions_dlg',{cry:"P\u0142acz",cool:"Wyluzowany",desc:"Emotikony",title:"Wstaw emotikon\u0119",yell:"Krzyk",wink:"Mrugni\u0119cie",undecided:"Niezdecydowany","tongue_out":"Wystawiony j\u0119zyk",surprised:"Zaskoczony",smile:"U\u015bmiech",sealed:"Zaklepany","money_mouth":"Zaanga\u017cowany",laughing:"\u015amiech",kiss:"Poca\u0142unek",innocent:"Niewinny",frown:"Dezaprobata","foot_in_mouth":"Niewyparzona g\u0119ba",embarassed:"Zmieszany",usage:"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pt_dlg.js new file mode 100644 index 0000000000..220959478b --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.emotions_dlg',{cry:"Chor\u00e3o",cool:"Fixe",desc:"Emoticons",title:"Inserir emoticon",yell:"Irado",wink:"Piscadela",undecided:"Indeciso","tongue_out":"L\u00edngua de fora",surprised:"Surpresa",smile:"Sorriso",sealed:"Boca Fechada","money_mouth":"Avarez",laughing:"Riso",kiss:"Beijo",innocent:"Inocente",frown:"Decep\u00e7\u00e3o","foot_in_mouth":"Disse asneira",embarassed:"Embara\u00e7ado",usage:"Use as setas esquerda e direita para navegar."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ru_dlg.js new file mode 100644 index 0000000000..21d0300a77 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447\u0443",cool:"\u041a\u0440\u0443\u0442\u043e\u0439",desc:"\u0421\u043c\u0430\u0439\u043b\u044b",title:"\u0412\u044b\u0431\u043e\u0440 \u0441\u043c\u0430\u0439\u043b\u0430",yell:"\u041a\u0440\u0438\u0447\u0443",wink:"\u041f\u043e\u0434\u043c\u0438\u0433\u0438\u0432\u0430\u044e",undecided:"\u0412 \u043d\u0435\u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438","tongue_out":"\u0414\u0440\u0430\u0437\u043d\u044e\u0441\u044c",surprised:"\u0423\u0434\u0438\u0432\u043b\u044f\u044e\u0441\u044c",smile:"\u0423\u043b\u044b\u0431\u0430\u044e\u0441\u044c",sealed:"\u041d\u0435\u043c \u043a\u0430\u043a \u0440\u044b\u0431\u0430","money_mouth":"\u0414\u0435\u043d\u044c\u0433\u0438",laughing:"\u0421\u043c\u0435\u044e\u0441\u044c",kiss:"\u041f\u043e\u0446\u0435\u043b\u0443\u0439",innocent:"\u0410\u043d\u0433\u0435\u043b",frown:"\u0425\u043c\u0443\u0440\u044e\u0441\u044c","foot_in_mouth":"\u0412 \u0440\u043e\u0442 \u043c\u043d\u0435 \u043d\u043e\u0433\u0438",embarassed:"\u041a\u0440\u0430\u0441\u043d\u0435\u044e",usage:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438."}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/sv_dlg.js new file mode 100644 index 0000000000..c36ebee3db --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.emotions_dlg',{cry:"Gr\u00e5ter",cool:"Cool",desc:"Smileys",title:"Infoga smiley",yell:"Skrikandes",wink:"Fl\u00f6rt",undecided:"Obest\u00e4md","tongue_out":"Tungan ute",surprised:"F\u00f6rv\u00e5nad",smile:"Glad",sealed:"Tyst","money_mouth":"Guld i mun",laughing:"Skrattande",kiss:"Kyss",innocent:"Oskyldig",frown:"Rynkar p\u00e5 n\u00e4san","foot_in_mouth":"Foten i munnen",embarassed:"Sk\u00e4ms",usage:"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/zh_dlg.js new file mode 100644 index 0000000000..1dece2ce29 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/emotions/langs/zh_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.emotions_dlg',{cry:"\u54ed",cool:"\u9177",desc:"\u8868\u60c5",title:"\u63d2\u5165\u8868\u60c5",yell:"\u53eb\u558a",wink:"\u7728\u773c",undecided:"\u72b9\u8c6b","tongue_out":"\u5410\u820c\u5934",surprised:"\u60ca\u8bb6",smile:"\u5fae\u7b11",sealed:"\u4fdd\u5bc6","money_mouth":"\u53d1\u8d22",laughing:"\u5927\u7b11",kiss:"\u543b",innocent:"\u5929\u771f",frown:"\u76b1\u7709","foot_in_mouth":"\u8822\u8bdd",embarassed:"\u5c34\u5c2c"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/dialog.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/dialog.htm new file mode 100644 index 0000000000..50b2b34451 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/dialog.htm @@ -0,0 +1,22 @@ + + + +{#emotions_dlg.title}:+ ++
++ ++ + + + + ++ + + + + ++ + + + + ++ + + + {#emotions_dlg.usage}+{#example_dlg.title} + + + + + + + + + diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin.js new file mode 100644 index 0000000000..ec1f81ea40 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin_src.js new file mode 100644 index 0000000000..0a259471d2 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/editor_plugin_src.js @@ -0,0 +1,84 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + // Load plugin specific language pack + tinymce.PluginManager.requireLangPack('example'); + + tinymce.create('tinymce.plugins.ExamplePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceExample', function() { + ed.windowManager.open({ + file : url + '/dialog.htm', + width : 320 + parseInt(ed.getLang('example.delta_width', 0)), + height : 120 + parseInt(ed.getLang('example.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, // Plugin absolute URL + some_custom_arg : 'custom arg' // Custom argument + }); + }); + + // Register example button + ed.addButton('example', { + title : 'example.desc', + cmd : 'mceExample', + image : url + '/img/example.gif' + }); + + // Add a node change handler, selects the button in the UI when a image is selected + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('example', n.nodeName == 'IMG'); + }); + }, + + /** + * Creates control instances based in the incoming name. This method is normally not + * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons + * but you sometimes need to create more complex controls like listboxes, split buttons etc then this + * method can be used to create those. + * + * @param {String} n Name of the control to create. + * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. + * @return {tinymce.ui.Control} New control instance or null if no control was created. + */ + createControl : function(n, cm) { + return null; + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', + version : "1.0" + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/img/example.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/img/example.gif new file mode 100644 index 0000000000..1ab5da4461 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/img/example.gif differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/js/dialog.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/js/dialog.js new file mode 100644 index 0000000000..fa8341132f --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en.js new file mode 100644 index 0000000000..e0784f80f4 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example',{ + desc : 'This is just a template button' +}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en_dlg.js new file mode 100644 index 0000000000..ebcf948dac --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example/langs/en_dlg.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example_dlg',{ + title : 'This is just a example title' +}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin.js new file mode 100644 index 0000000000..0a4551d380 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.ExampleDependencyPlugin",{init:function(a,b){},getInfo:function(){return{longname:"Example Dependency plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency",version:"1.0"}}});tinymce.PluginManager.add("example_dependency",tinymce.plugins.ExampleDependencyPlugin,["example"])})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin_src.js new file mode 100644 index 0000000000..f761441ead --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/example_dependency/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + + tinymce.create('tinymce.plugins.ExampleDependencyPlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + }, + + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example Dependency plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency', + version : "1.0" + }; + } + }); + + /** + * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order. + * plugins in this list will be initialised when this plugin is initialized. (before the init method is called). + * plugins in a depends list should typically be specified using the short name). If neccesary this can be done + * with an object which has the url to the plugin and the shortname. + */ + tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']); +})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/css/fullpage.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/css/fullpage.css new file mode 100644 index 0000000000..2675cec155 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/css/fullpage.css @@ -0,0 +1,143 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +#doctypes { + width: 200px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/editor_plugin.js new file mode 100644 index 0000000000..dcf76024dd --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n