jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brus...@apache.org
Subject svn commit: r1696096 [5/8] - in /jspwiki/trunk: ./ jspwiki-war/src/main/config/wro/ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/resources/ini/ jspwiki-war/src/main/resources/templates/ jspwiki-war/src/main/scripts/moo-extend/ jspwik...
Date Sat, 15 Aug 2015 20:45:48 GMT
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/Locale.zh_CN.MooEditable.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/Locale.zh_CN.MooEditable.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/Locale.zh_CN.MooEditable.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/Locale.zh_CN.MooEditable.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,103 @@
+Locale.define('zh-CN', 'MooEditable', {
+	
+	// MooEditable
+	ok: '确定',
+	cancel: '取消',
+	bold: '粗体',
+	italic: '斜体',
+	underline: '下划线',
+	strikethrough: '删除线',
+	unorderedList: '项目符号',
+	orderedList: '编号',
+	indent: '增加缩进量',
+	outdent: '减少缩进量',
+	undo: '撤销',
+	redo: '重做',
+	removeHyperlink: '删除链接',
+	addHyperlink: '添加链接',
+	selectTextHyperlink: '请选择要添加链接的文字',
+	enterURL: '输入链接',
+	enterImageURL: '输入图片链接',
+	addImage: '添加图片',
+	toggleView: '切换视图',
+	
+	// MooEditable.Charmap
+	insertCustomCharacter: '插入自定义字符',
+	insertCharacter: '插入字符',
+	
+	// MooEditable.Extras
+	blockFormatting: '格式',
+	paragraph: '正文',
+	heading1: '标题1',
+	heading2: '标题2',
+	heading3: '标题3',
+	alignLeft: '左对齐',
+	alignRight: '右对齐',
+	alignCenter: '居中',
+	alignJustify: '两端对齐',
+	removeFormatting: '删除格式',
+	insertHorizontalRule: '插入分割线', 
+	
+	// MooEditable.Flash
+	embed: '输入嵌入代码',
+	flashEmbed: '嵌入Flash',
+	
+	// MooEditable.Forecolor
+	changeColor: '更改颜色',
+	
+	// MooEditable.Image
+	imageAlt: 'alt',
+	imageClass: 'class',
+	imageAlign: 'align',
+	imageAlignNone: 'none',
+	imageAlignLeft: 'left',
+	imageAlignCenter: 'center',
+	imageAlignRight: 'right',
+	addEditImage: '添加/编辑图片',
+	
+	// MooEditable.Pagebreak
+	pageBreak: '分页符',
+	
+	// MooEditable.Smiley
+	insertSmiley: '插入表情',
+	
+	// MooEditable.Table
+	tableColumns: 'columns',
+	tableRows: 'rows',
+	tableWidth: 'width',
+	tableClass: 'class',
+	tableType: 'type',
+	tableHeader: 'Header',
+	tableCell: 'Cell',
+	tableAlign: 'align',
+	tableAlignNone: 'none',
+	tableAlignCenter: 'center',
+	tableAlignRight: 'right',
+	tableValign: 'vertical align',
+	tableValignNone: 'none',
+	tableValignTop: 'top',
+	tableValignMiddle: 'middle',
+	tableValignBottom: 'bottom',
+	addTable: '新建表格',
+	editTable: '编辑表格',
+	addTableRow: '添加行',
+	editTableRow: '编辑行',
+	mergeTableRow: '合并行',
+	splitTableRow: '拆分行',
+	deleteTableRow: '增加行',
+	addTableCol: '增加列',
+	editTableCol: '编辑列',
+	mergeTableCell: '合并单元格',
+	splitTableCell: '拆分单元格',
+	deleteTableCol: '删除列',
+    
+    // MooEditable.UI.ExtendedLinksDialog
+    protocol: 'protocol',
+    link: 'link',
+    email: 'e-Mail',
+    urlWithoutHttp: 'URL (without http://)',
+    window: '窗口',
+    sameWindow: '当前窗口',
+    newWindow: '新窗口'
+    
+});

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/Locale.zh_CN.MooEditable.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/README.md
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/README.md?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/README.md (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/README.md Sat Aug 15 20:45:46 2015
@@ -0,0 +1,6 @@
+MooEditable Localization
+========================
+
+The file Locale.en-US.MooEditable.example.js is an example locale file as reference for non US English translators. Do not use this file.
+
+By default, MooEditable is localized to US English, without dependency on [Locale](http://mootools.net/docs/more/Locale/Locale). Locale is only required when using the localization files to add additional languages.
\ No newline at end of file

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/Locale/README.md
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Charmap.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Charmap.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Charmap.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Charmap.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,345 @@
+/*
+---
+
+name: MooEditable.Charmap
+
+description: Extends MooEditable with a characters map
+
+license: MIT-style license
+
+authors:
+- Ryan Mitchell
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides: [MooEditable.UI.CharacterDialog, MooEditable.Actions.charmap]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Charmap.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.Charmap.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | charmap | toggleview',
+      externalCSS: '../../Assets/MooEditable/Editable.css'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Actions.Settings.charmap = {
+	chars: [
+		['&nbsp;', '&#160;'],
+		['&amp;', '&#38;'],
+		['&quot;', '&#34;'],
+		['&cent;', '&#162;'],
+		['&euro;', '&#8364;'],
+		['&pound;', '&#163;'],
+		['&yen;', '&#165;'],
+		['&copy;', '&#169;'],
+		['&reg;', '&#174;'],
+		['&trade;', '&#8482;'],
+		['&permil;', '&#8240;'],
+		['&micro;', '&#181;'],
+		['&middot;', '&#183;'],
+		['&bull;', '&#8226;'],
+		['&hellip;', '&#8230;'],
+		['&prime;', '&#8242;'],
+		['&Prime;', '&#8243;'],
+		['&sect;', '&#167;'],
+		['&para;', '&#182;'],
+		['&szlig;', '&#223;'],
+		['&lsaquo;', '&#8249;'],
+		['&rsaquo;', '&#8250;'],
+		['&laquo;', '&#171;'],
+		['&raquo;', '&#187;'],
+		['&lsquo;', '&#8216;'],
+		['&rsquo;', '&#8217;'],
+		['&ldquo;', '&#8220;'],
+		['&rdquo;', '&#8221;'],
+		['&sbquo;', '&#8218;'],
+		['&bdquo;', '&#8222;'],
+		['&lt;', '&#60;'],
+		['&gt;', '&#62;'],
+		['&le;', '&#8804;'],
+		['&ge;', '&#8805;'],
+		['&ndash;', '&#8211;'],
+		['&mdash;', '&#8212;'],
+		['&macr;', '&#175;'],
+		['&oline;', '&#8254;'],
+		['&curren;', '&#164;'],
+		['&brvbar;', '&#166;'],
+		['&uml;', '&#168;'],
+		['&iexcl;', '&#161;'],
+		['&iquest;', '&#191;'],
+		['&circ;', '&#710;'],
+		['&tilde;', '&#732;'],
+		['&deg;', '&#176;'],
+		['&minus;', '&#8722;'],
+		['&plusmn;', '&#177;'],
+		['&divide;', '&#247;'],
+		['&frasl;', '&#8260;'],
+		['&times;', '&#215;'],
+		['&sup1;', '&#185;'],
+		['&sup2;', '&#178;'],
+		['&sup3;', '&#179;'],
+		['&frac14;', '&#188;'],
+		['&frac12;', '&#189;'],
+		['&frac34;', '&#190;'],
+		['&fnof;', '&#402;'],
+		['&int;', '&#8747;'],
+		['&sum;', '&#8721;'],
+		['&infin;', '&#8734;'],
+		['&radic;', '&#8730;'],
+		['&sim;', '&#8764;'],
+		['&cong;', '&#8773;'],
+		['&asymp;', '&#8776;'],
+		['&ne;', '&#8800;'],
+		['&equiv;', '&#8801;'],
+		['&isin;', '&#8712;'],
+		['&notin;', '&#8713;'],
+		['&ni;', '&#8715;'],
+		['&prod;', '&#8719;'],
+		['&and;', '&#8743;'],
+		['&or;', '&#8744;'],
+		['&not;', '&#172;'],
+		['&cap;', '&#8745;'],
+		['&cup;', '&#8746;'],
+		['&part;', '&#8706;'],
+		['&forall;', '&#8704;'],
+		['&exist;', '&#8707;'],
+		['&empty;', '&#8709;'],
+		['&nabla;', '&#8711;'],
+		['&lowast;', '&#8727;'],
+		['&prop;', '&#8733;'],
+		['&ang;', '&#8736;'],
+		['&acute;', '&#180;'],
+		['&cedil;', '&#184;'],
+		['&ordf;', '&#170;'],
+		['&ordm;', '&#186;'],
+		['&dagger;', '&#8224;'],
+		['&Dagger;', '&#8225;'],
+		['&Agrave;', '&#192;'],
+		['&Aacute;', '&#193;'],
+		['&Acirc;', '&#194;'],
+		['&Atilde;', '&#195;'],
+		['&Auml;', '&#196;'],
+		['&Aring;', '&#197;'],
+		['&AElig;', '&#198;'],
+		['&Ccedil;', '&#199;'],
+		['&Egrave;', '&#200;'],
+		['&Eacute;', '&#201;'],
+		['&Ecirc;', '&#202;'],
+		['&Euml;', '&#203;'],
+		['&Igrave;', '&#204;'],
+		['&Iacute;', '&#205;'],
+		['&Icirc;', '&#206;'],
+		['&Iuml;', '&#207;'],
+		['&ETH;', '&#208;'],
+		['&Ntilde;', '&#209;'],
+		['&Ograve;', '&#210;'],
+		['&Oacute;', '&#211;'],
+		['&Ocirc;', '&#212;'],
+		['&Otilde;', '&#213;'],
+		['&Ouml;', '&#214;'],
+		['&Oslash;', '&#216;'],
+		['&OElig;', '&#338;'],
+		['&Scaron;', '&#352;'],
+		['&Ugrave;', '&#217;'],
+		['&Uacute;', '&#218;'],
+		['&Ucirc;', '&#219;'],
+		['&Uuml;', '&#220;'],
+		['&Yacute;', '&#221;'],
+		['&Yuml;', '&#376;'],
+		['&THORN;', '&#222;'],
+		['&agrave;', '&#224;'],
+		['&aacute;', '&#225;'],
+		['&acirc;', '&#226;'],
+		['&atilde;', '&#227;'],
+		['&auml;', '&#228;'],
+		['&aring;', '&#229;'],
+		['&aelig;', '&#230;'],
+		['&ccedil;', '&#231;'],
+		['&egrave;', '&#232;'],
+		['&eacute;', '&#233;'],
+		['&ecirc;', '&#234;'],
+		['&euml;', '&#235;'],
+		['&igrave;', '&#236;'],
+		['&iacute;', '&#237;'],
+		['&icirc;', '&#238;'],
+		['&iuml;', '&#239;'],
+		['&eth;', '&#240;'],
+		['&ntilde;', '&#241;'],
+		['&ograve;', '&#242;'],
+		['&oacute;', '&#243;'],
+		['&ocirc;', '&#244;'],
+		['&otilde;', '&#245;'],
+		['&ouml;', '&#246;'],
+		['&oslash;', '&#248;'],
+		['&oelig;', '&#339;'],
+		['&scaron;', '&#353;'],
+		['&ugrave;', '&#249;'],
+		['&uacute;', '&#250;'],
+		['&ucirc;', '&#251;'],
+		['&uuml;', '&#252;'],
+		['&yacute;', '&#253;'],
+		['&thorn;', '&#254;'],
+		['&yuml;', '&#255;'],
+		['&Alpha;', '&#913;'],
+		['&Beta;', '&#914;'],
+		['&Gamma;', '&#915;'],
+		['&Delta;', '&#916;'],
+		['&Epsilon;', '&#917;'],
+		['&Zeta;', '&#918;'],
+		['&Eta;', '&#919;'],
+		['&Theta;', '&#920;'],
+		['&Iota;', '&#921;'],
+		['&Kappa;', '&#922;'],
+		['&Lambda;', '&#923;'],
+		['&Mu;', '&#924;'],
+		['&Nu;', '&#925;'],
+		['&Xi;', '&#926;'],
+		['&Omicron;', '&#927;'],
+		['&Pi;', '&#928;'],
+		['&Rho;', '&#929;'],
+		['&Sigma;', '&#931;'],
+		['&Tau;', '&#932;'],
+		['&Upsilon;', '&#933;'],
+		['&Phi;', '&#934;'],
+		['&Chi;', '&#935;'],
+		['&Psi;', '&#936;'],
+		['&Omega;', '&#937;'],
+		['&alpha;', '&#945;'],
+		['&beta;', '&#946;'],
+		['&gamma;', '&#947;'],
+		['&delta;', '&#948;'],
+		['&epsilon;', '&#949;'],
+		['&zeta;', '&#950;'],
+		['&eta;', '&#951;'],
+		['&theta;', '&#952;'],
+		['&iota;', '&#953;'],
+		['&kappa;', '&#954;'],
+		['&lambda;', '&#955;'],
+		['&mu;', '&#956;'],
+		['&nu;', '&#957;'],
+		['&xi;', '&#958;'],
+		['&omicron;', '&#959;'],
+		['&pi;', '&#960;'],
+		['&rho;', '&#961;'],
+		['&sigmaf;', '&#962;'],
+		['&sigma;', '&#963;'],
+		['&tau;', '&#964;'],
+		['&upsilon;', '&#965;'],
+		['&phi;', '&#966;'],
+		['&chi;', '&#967;'],
+		['&psi;', '&#968;'],
+		['&omega;', '&#969;'],
+		['&alefsym;', '&#8501;'],
+		['&piv;', '&#982;'],
+		['&real;', '&#8476;'],
+		['&thetasym;', '&#977;'],
+		['&upsih;', '&#978;'],
+		['&weierp;', '&#8472;'],
+		['&image;', '&#8465;'],
+		['&larr;', '&#8592;'],
+		['&uarr;', '&#8593;'],
+		['&rarr;', '&#8594;'],
+		['&darr;', '&#8595;'],
+		['&harr;', '&#8596;'],
+		['&crarr;', '&#8629;'],
+		['&lArr;', '&#8656;'],
+		['&uArr;', '&#8657;'],
+		['&rArr;', '&#8658;'],
+		['&dArr;', '&#8659;'],
+		['&hArr;', '&#8660;'],
+		['&there4;', '&#8756;'],
+		['&sub;', '&#8834;'],
+		['&sup;', '&#8835;'],
+		['&nsub;', '&#8836;'],
+		['&sube;', '&#8838;'],
+		['&supe;', '&#8839;'],
+		['&oplus;', '&#8853;'],
+		['&otimes;', '&#8855;'],
+		['&perp;', '&#8869;'],
+		['&sdot;', '&#8901;'],
+		['&lceil;', '&#8968;'],
+		['&rceil;', '&#8969;'],
+		['&lfloor;', '&#8970;'],
+		['&rfloor;', '&#8971;'],
+		['&lang;', '&#9001;'],
+		['&rang;', '&#9002;'],
+		['&loz;', '&#9674;'],
+		['&spades;', '&#9824;'],
+		['&clubs;', '&#9827;'],
+		['&hearts;', '&#9829;'],
+		['&diams;', '&#9830;']
+	]
+};
+
+MooEditable.Locale.define({
+	insertCustomCharacter: 'Insert custom character',
+	insertCharacter: 'Insert character'
+});
+
+MooEditable.UI.CharacterDialog = function(editor){
+	var html = MooEditable.Locale.get('insertCharacter') + ' <select class="char">';
+	var chars = MooEditable.Actions.Settings.charmap.chars;
+	for (var i=0, len=chars.length; i<len; i++) {
+		html += '<option data-code="' + chars[i][0] + '">' + chars[i][1] + '</option>';
+	}
+	html += '</select>'
+		+ '<button class="dialog-button dialog-ok-button">' + MooEditable.Locale.get('ok') + '</button>'
+		+ '<button class="dialog-button dialog-cancel-button">' + MooEditable.Locale.get('cancel') + '</button>';
+	return new MooEditable.UI.Dialog(html, {
+		'class': 'mooeditable-charmap-dialog',
+		onClick: function(e){
+			if (e.target.tagName.toLowerCase() == 'button') e.preventDefault();
+			var button = document.id(e.target);
+			if (button.hasClass('dialog-cancel-button')){
+				this.close();
+			} else if (button.hasClass('dialog-ok-button')){
+				this.close();
+				var sel = button.getPrevious('select.char');
+				var div = new Element('div').set('html', $(sel.options[sel.selectedIndex]).getProperty('data-code').trim());
+				editor.selection.insertContent(div.get('html'));
+			}
+		}
+	});
+};
+
+MooEditable.Actions.charmap = {
+	title: MooEditable.Locale.get('insertCustomCharacter'),
+	dialogs: {
+		prompt: function(editor){
+			return MooEditable.UI.CharacterDialog(editor);
+		}
+	},
+	command: function() {
+		this.dialogs.charmap.prompt.open();
+	},
+	events: {
+		toggleView: function(){
+			if (this.mode == 'textarea'){
+				var s = this.textarea.get('value');
+				// when switching from iframe to textarea, we need to convert special symbols to html entities
+				MooEditable.Actions.Settings.charmap.chars.each(function(e){
+					if (!['&amp;', '&gt;', '&lt;', '&quot;', '&nbsp;'].contains(e[0])){
+						var r = new RegExp(String.fromCharCode(parseInt(e[1].replace('&#', '').replace(';', ''))), 'g');
+						s = s.replace(r, e[0]);
+					}
+				}, this);
+				this.textarea.set('value', s);
+			}
+		}
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Charmap.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.CleanPaste.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.CleanPaste.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.CleanPaste.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.CleanPaste.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,265 @@
+/*
+---
+
+name: MooEditable.CleanPaste
+
+description: Extends MooEditable to insert text copied from other editors like word without all that messy style-information.
+
+updates in previous version: Improved Internet Explorer handling to break text on to new lines. Improved handling of some styles from newer versions of MS Word to remove extra style tags that were remaining. (David)
+
+updates in this version: Fixed CleanPaste in Safari (Jo)
+
+license: MIT-style license
+
+authors:
+- AndrŽ Fiedler <kontakt@visualdrugs.net>
+- David Bennett <david@fuzzylime.co.uk>
+- Jo Carter <jocarter@holler.co.uk>
+
+requires:
+- MooEditable
+- MooEditable.Selection
+- More/Class.Refactor
+
+usage:
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.CleanPaste.js"></script>
+
+  <script>
+  window.addEvent('domready', function (){
+    var mooeditable = $('textarea-1').mooEditable();
+  });
+  </script>
+
+provides: [MooEditable.CleanPaste]
+
+...
+*/
+
+(function () {
+    
+    MooEditable = Class.refactor(MooEditable, {
+      
+        // @FIXED: Removed because inferred by above and breaks MooEditable completely with MooTools 1.3.
+        // Extends: MooEditable,
+        
+        attach: function () {
+            var ret = this.previous();
+            this.doc.body.addListener('paste', this.cleanPaste.bind(this));
+            return ret;
+        },
+        
+        cleanPaste: function (e) {
+            var txtPastet = e.clipboardData && e.clipboardData.getData ?
+                e.clipboardData.getData('text/html') : // Standard
+                window.clipboardData && window.clipboardData.getData ?
+                window.clipboardData.getData('Text') : // MS
+                false;
+            
+            // @FIXED: If !MS and data is not html - try this (ie. pasting plain text)
+            if ((!txtPastet || '' === txtPastet.trim()) && e.clipboardData && e.clipboardData.getData) {
+              txtPastet = e.clipboardData.getData('Text');
+            }
+            
+            if (!!txtPastet) { // IE and Safari
+              if (window.clipboardData) {
+                this.selection.insertContent(this.cleanHtml(txtPastet, 1)); // IE
+              }
+              else {
+                this.selection.insertContent(this.cleanHtml(txtPastet)); // Safari
+              }
+              
+              new Event(e).stop();
+            }
+            else { // no clipboard data available
+                this.selection.insertContent('<span id="INSERTION_MARKER">&nbsp;</span>');
+                this.txtMarked = this.doc.body.get('html');
+                this.doc.body.set('html', '');
+                this.replaceMarkerWithPastedText.delay(5, this);
+            }
+            return this;
+        },
+        
+        replaceMarkerWithPastedText: function () {
+            var txtPastetClean = this.cleanHtml(this.doc.body.get('html'));
+            this.doc.body.set('html', this.txtMarked);
+            this.selection.selectNode(this.doc.body.getElementById('INSERTION_MARKER'));
+            this.selection.insertContent(txtPastetClean);
+            return this;
+        },
+        
+        cleanHtml: function (html, isie) {
+          if (isie) {
+            if (!this.options.paragraphise) {
+              html = html.replace(/\n/g, "<br />");
+            }
+            else {
+              html = "<p>" + html + "<\/p>";
+              html = html.replace(/\n/g, "<\/p><p>");
+              html = html.replace(/<p>\s<\/p>/gi, '');
+            }
+          }
+          else {
+            // @FIXED: Safari pastes in styles with ' not " - fixed to not be broken in safari
+            // @FIXED: Word pastes in Safari
+          
+            // remove body and html tag
+            html = html.replace(/<html[^>]*?>(.*)/gim, "$1");
+            html = html.replace(/<\/html>/gi, '');
+            html = html.replace(/<body[^>]*?>(.*)/gi, "$1");
+            html = html.replace(/<\/body>/gi, '');
+          
+            // remove style, meta and link tags
+            html = html.replace(/<style[^>]*?>[\s\S]*?<\/style[^>]*>/gi, '');
+            html = html.replace(/<(?:meta|link)[^>]*>\s*/gi, '');
+            
+            // remove XML elements and declarations
+            html = html.replace(/<\\?\?xml[^>]*>/gi, '');
+            
+            // remove w: tags with contents.
+            html = html.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '');
+            
+            // remove tags with XML namespace declarations: <o:p><\/o:p>
+            html = html.replace(/<o:p>\s*<\/o:p>/g, '');
+            html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, '&nbsp;');
+            html = html.replace(/<\/?\w+:[^>]*>/gi, '');
+            
+            // remove comments [SF BUG-1481861].
+            html = html.replace(/<\!--[\s\S]*?-->/g, '');
+            html = html.replace(/<\!\[[\s\S]*?\]>/g, '');
+            
+            // remove mso-xxx styles.
+            html = html.replace(/\s*mso-[^:]+:[^;"']+;?/gi, '');
+            
+            // remove styles.
+            html = html.replace(/<(\w[^>]*) style='([^\']*)'([^>]*)/gim, "<$1$3");
+            html = html.replace(/<(\w[^>]*) style="([^\"]*)"([^>]*)/gim, "<$1$3");
+            
+            // remove margin styles.
+            html = html.replace(/\s*margin: 0cm 0cm 0pt\s*;/gi, '');
+            html = html.replace(/\s*margin: 0cm 0cm 0pt\s*"/gi, "\"");
+            
+            html = html.replace(/\s*text-indent: 0cm\s*;/gi, '');
+            html = html.replace(/\s*text-indent: 0cm\s*"/gi, "\"");
+            
+            html = html.replace(/\s*text-align: [^\s;]+;?"/gi, "\"");
+            
+            html = html.replace(/\s*page-break-before: [^\s;]+;?"/gi, "\"");
+            
+            html = html.replace(/\s*font-variant: [^\s;]+;?"/gi, "\"");
+            
+            html = html.replace(/\s*tab-stops:[^;"']*;?/gi, '');
+            html = html.replace(/\s*tab-stops:[^"']*/gi, '');
+            
+            // remove font face attributes.
+            html = html.replace(/\s*face="[^"']*"/gi, '');
+            html = html.replace(/\s*face=[^ >]*/gi, '');
+            
+            html = html.replace(/\s*font-family:[^;"']*;?/gi, '');
+            html = html.replace(/\s*font-size:[^;"']*;?/gi, '');
+            
+            // remove class attributes
+            html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
+            
+            // remove "display:none" attributes.
+            html = html.replace(/<(\w+)[^>]*\sstyle="[^"']*display\s?:\s?none[\s \S]*?<\/\1>/ig, '');
+            
+            // remove empty styles.
+            html = html.replace(/\s*style='\s*'/gi, '');
+            html = html.replace(/\s*style="\s*"/gi, '');
+            
+            html = html.replace(/<span\s*[^>]*>\s*&nbsp;\s*<\/span>/gi, '&nbsp;');
+            
+            html = html.replace(/<span\s*[^>]*><\/span>/gi, '');
+            
+            // remove align attributes
+            html = html.replace(/<(\w[^>]*) align=([^ |>]*)([^>]*)/gi, "<$1$3");
+            
+            // remove lang attributes
+            html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
+            
+            html = html.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi, '$2');
+            
+            html = html.replace(/<font\s*>([\s\S]*?)<\/font>/gi, '$1');
+            
+            html = html.replace(/<(u|i|strike)>&nbsp;<\/\1>/gi, '&nbsp;');
+            
+            html = html.replace(/<h\d>\s*<\/h\d>/gi, '');
+            
+            // remove language attributes
+            html = html.replace(/<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3");
+            
+            // remove onmouseover and onmouseout events (from MS word comments effect)
+            html = html.replace(/<(\w[^>]*) onmouseover="([^\"']*)"([^>]*)/gi, "<$1$3");
+            html = html.replace(/<(\w[^>]*) onmouseout="([^\"']*)"([^>]*)/gi, "<$1$3");
+            
+            // the original <Hn> tag sent from word is something like this: <Hn style="margin-top:0px;margin-bottom:0px">
+            html = html.replace(/<h(\d)([^>]*)>/gi, '<h$1>');
+            
+            // word likes to insert extra <font> tags, when using IE. (Weird).
+            html = html.replace(/<(h\d)><font[^>]*>([\s\S]*?)<\/font><\/\1>/gi, '<$1>$2<\/$1>');
+            html = html.replace(/<(h\d)><em>([\s\S]*?)<\/em><\/\1>/gi, '<$1>$2<\/$1>');
+            
+            // i -> em, b -> strong - doesn't match nested tags e.g <b><i>some text</i></b> - not possible in regexp 
+            // @see - http://stackoverflow.com/questions/1721223/php-regexp-for-nested-div-tags etc.
+            html = html.replace(/<b\b[^>]*>(.*?)<\/b[^>]*>/gi, '<strong>$1</strong>');
+            html = html.replace(/<i\b[^>]*>(.*?)<\/i[^>]*>/gi, '<em>$1</em>');
+            
+            // remove "bad" tags
+            html = html.replace(/<\s+[^>]*>/gi, '');
+            
+            // remove empty <span>s (ie. no attributes, no reason for span in pasted text)
+            // done twice for nested spans
+            html = html.replace(/<span>([\s\S]*?)<\/span>/gi, '$1');
+            html = html.replace(/<span>([\s\S]*?)<\/span>/gi, '$1');
+            
+            // remove empty <div>s (see span)
+            html = html.replace(/<div>([\s\S]*?)<\/div>/gi, '$1');
+            html = html.replace(/<div>([\s\S]*?)<\/div>/gi, '$1');
+            
+            // remove empty tags (three times, just to be sure - for nested empty tags).
+            // This also removes any empty anchors
+            html = html.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '');
+            html = html.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '');
+            html = html.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '');
+            
+            html = html.trim();
+            
+            // Convert <p> to <br />
+            if (!this.options.paragraphise) {
+                html.replace(/<p>/gi, '<br />');
+                html.replace(/<\/p>/gi, '');
+            }
+            // Check if in paragraph - this fixes FF3.6 and it's <br id=""> issue
+            else {
+              var check = html.substr(0,2);
+              if ('<p' !== check) {
+                html = '<p>' + html + '</p>';
+                // Replace breaks with paragraphs
+                html = html.replace(/\n/g, "<\/p><p>");
+                html = html.replace(/<br[^>]*>/gi, '<\/p><p>');
+              }
+            }
+            
+            // Make it valid xhtml
+            html = html.replace(/<br>/gi, '<br />');
+            
+            // remove <br>'s that end a paragraph here.
+            html = html.replace(/<br[^>]*><\/p>/gim, '</p>');
+            
+            // remove empty paragraphs - with just a &nbsp; (or whitespace) in (and tags again for good measure)
+            html = html.replace(/<p>&nbsp;<\/p>/gi,'');
+            html = html.replace(/<p>\s<\/p>/gi, '');
+            html = html.replace(/<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '');
+            
+            html = html.trim();
+          }
+          
+          return html;
+        }
+    });
+    
+}());
\ No newline at end of file

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.CleanPaste.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Extras.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Extras.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Extras.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Extras.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,113 @@
+/*
+---
+
+name: MooEditable.Extras
+
+description: Extends MooEditable to include more (simple) toolbar buttons.
+
+license: MIT-style license
+
+authors:
+- Lim Chee Aun
+- Ryan Mitchell
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.UI.MenuList
+
+provides:
+- MooEditable.Actions.formatBlock
+- MooEditable.Actions.justifyleft
+- MooEditable.Actions.justifyright
+- MooEditable.Actions.justifycenter
+- MooEditable.Actions.justifyfull
+- MooEditable.Actions.removeformat
+- MooEditable.Actions.insertHorizontalRule
+
+...
+*/
+
+MooEditable.Locale.define({
+	blockFormatting: 'Block Formatting',
+	paragraph: 'Paragraph',
+	heading1: 'Heading 1',
+	heading2: 'Heading 2',
+	heading3: 'Heading 3',
+	heading4: 'Heading 4',
+	alignLeft: 'Align Left',
+	alignRight: 'Align Right',
+	alignCenter: 'Align Center',
+	alignJustify: 'Align Justify',
+	removeFormatting: 'Remove Formatting',
+	insertHorizontalRule: 'Insert Horizontal Rule'
+});
+
+Object.append(MooEditable.Actions, {
+
+	formatBlock: {
+		title: MooEditable.Locale.get('blockFormatting'),
+		type: 'menu-list',
+		options: {
+			list: [
+				{text: MooEditable.Locale.get('paragraph'), value: 'p'},
+				//{text: MooEditable.Locale.get('heading1'), value: 'h1', style: 'font-size:24px; font-weight:bold;'},
+				{text: MooEditable.Locale.get('heading2'), value: 'h2', style: 'font-size:18px; font-weight:bold;'},
+				{text: MooEditable.Locale.get('heading3'), value: 'h3', style: 'font-size:14px; font-weight:bold;'},
+				{text: MooEditable.Locale.get('heading4'), value: 'h4', style: 'font-size:12px; font-weight:bold;'}
+			]
+		},
+		states: {
+			tags: ['p', 'h1', 'h2', 'h3']
+		},
+		command: function(menulist, name){
+			var argument = '<' + name + '>';
+			this.focus();
+			this.execute('formatBlock', false, argument);
+		}
+	},
+
+	justifyleft:{
+		title: MooEditable.Locale.get('alignLeft'),
+		states: {
+			css: {'text-align': 'left'}
+		}
+	},
+
+	justifyright:{
+		title: MooEditable.Locale.get('alignRight'),
+		states: {
+			css: {'text-align': 'right'}
+		}
+	},
+
+	justifycenter:{
+		title: MooEditable.Locale.get('alignCenter'),
+		states: {
+			tags: ['center'],
+			css: {'text-align': 'center'}
+		}
+	},
+
+	justifyfull:{
+		title: MooEditable.Locale.get('alignJustify'),
+		states: {
+			css: {'text-align': 'justify'}
+		}
+	},
+
+	removeformat: {
+		title: MooEditable.Locale.get('removeFormatting')
+	},
+
+	insertHorizontalRule: {
+		title: MooEditable.Locale.get('insertHorizontalRule'),
+		states: {
+			tags: ['hr']
+		},
+		command: function(){
+			this.selection.insertContent('<hr>');
+		}
+	}
+
+});

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Extras.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Flash.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Flash.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Flash.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Flash.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,82 @@
+/*
+---
+
+name: MooEditable.Flash
+
+description: Extends MooEditable to embed Flash.
+
+license: MIT-style license
+
+authors:
+- Radovan Lozej
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides: [MooEditable.UI.FlashDialog, MooEditable.Actions.flash]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Flash.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.Flash.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | flash | toggleview',
+      externalCSS: '../../Assets/MooEditable/Editable.css'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Locale.define({
+	embed: 'Enter embed code',
+	flashEmbed: 'Flash Embed'
+});
+
+MooEditable.UI.FlashDialog = function(editor){
+	var html = MooEditable.Locale.get('embed') + ' <textarea class="dialog-f" value="" rows="2" cols="40"></textarea> '
+		+ '<button class="dialog-button dialog-ok-button">' + MooEditable.Locale.get('ok') + '</button> '
+		+ '<button class="dialog-button dialog-cancel-button">' + MooEditable.Locale.get('cancel') + '</button>';
+	return new MooEditable.UI.Dialog(html, {
+		'class': 'mooeditable-flash-dialog',
+		onOpen: function(){
+			var input = this.el.getElement('.dialog-f');
+			(function(){
+				input.focus();
+				input.select();
+			}).delay(10);
+		},
+		onClick: function(e){
+			if (e.target.tagName.toLowerCase() == 'button') e.preventDefault();
+			var button = document.id(e.target);
+			if (button.hasClass('dialog-cancel-button')){
+				this.close();
+			} else if (button.hasClass('dialog-ok-button')){
+				this.close();
+				var div = new Element('div').set('html', this.el.getElement('.dialog-f').get('value').trim());
+				editor.selection.insertContent(div.get('html'));
+			}
+		}
+	});
+};
+
+MooEditable.Actions.flash = {
+	title: MooEditable.Locale.get('flashEmbed'),
+	dialogs: {
+		prompt: function(editor){
+			return MooEditable.UI.FlashDialog(editor);
+		}
+	},
+	command: function(){
+		this.dialogs.flash.prompt.open();
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Flash.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Forecolor.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Forecolor.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Forecolor.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Forecolor.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,76 @@
+/*
+---
+
+name: MooEditable.Forecolor
+
+description: Extends MooEditable to change the color of the text from a list a predefined colors.
+
+license: MIT-style license
+
+authors:
+- Olivier Refalo
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.UI.ButtonOverlay
+# - MooEditable.Actions
+
+provides: [MooEditable.Actions.forecolor]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Forecolor.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.UI.ButtonOverlay.js"></script>
+  <script src="MooEditable.Forecolor.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | forecolor | toggleview'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Actions.Settings.forecolor = {
+	colors: [
+		['000000', '993300', '333300', '003300', '003366', '000077', '333399', '333333'],
+		['770000', 'ff6600', '777700', '007700', '007777', '0000ff', '666699', '777777'],
+		['ff0000', 'ff9900', '99cc00', '339966', '33cccc', '3366f0', '770077', '999999'],
+		['ff00ff', 'ffcc00', 'ffff00', '00ff00', '00ffff', '00ccff', '993366', 'cccccc'],
+		['ff99cc', 'ffcc99', 'ffff99', 'ccffcc', 'ccffff', '99ccff', 'cc9977', 'ffffff']
+	]
+};
+
+MooEditable.Locale.define('changeColor', 'Change Color');
+
+MooEditable.Actions.forecolor = {
+	type: 'button-overlay',
+	title: MooEditable.Locale.get('changeColor'),
+	options: {
+		overlaySize: {x: 'auto'},
+		overlayHTML: (function(){
+			var html = '';
+			MooEditable.Actions.Settings.forecolor.colors.each(function(row){
+				row.each(function(c){
+					html += '<a href="#" class="forecolor-colorpicker-color" style="background-color: #' + c + '" title="#' + c.toUpperCase() + '"></a>'; 
+				});
+				html += '<span class="forecolor-colorpicker-br"></span>';
+			});
+			return html;
+		})()
+	},
+	command: function(buttonOverlay, e){
+		var el = e.target;
+		if (el.tagName.toLowerCase() != 'a') return;
+		var color = $(el).getStyle('background-color');
+		this.execute('forecolor', false, color);
+		this.focus();
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Forecolor.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Group.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Group.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Group.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Group.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,72 @@
+/*
+---
+
+name: MooEditable.Group
+
+description: Extends MooEditable to have multiple instances on a page controlled by one toolbar.
+
+license: MIT-style license
+
+authors:
+- Ryan Mitchell
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides: [MooEditable.Group]
+
+...
+*/
+
+MooEditable.Group = new Class({
+
+	Implements: [Options],
+	
+	options: {
+		actions: 'bold italic underline strikethrough | insertunorderedlist insertorderedlist indent outdent | undo redo | createlink unlink | urlimage | toggleview'
+	},
+    
+	initialize: function(toolbarEl, options){
+		this.setOptions(options);
+		this.actions = this.options.actions.clean().split(' ');
+		var self = this;
+		this.toolbar = new MooEditable.UI.Toolbar({
+			onItemAction: function(){
+				var args = Array.from(arguments);
+				var item = args[0];
+				if (!self.activeEditor) return;
+				self.activeEditor.focus();
+				self.activeEditor.action(item.name, args);
+				if (self.activeEditor.mode == 'iframe') self.activeEditor.checkStates();
+			}
+		}).render(this.actions);
+		document.id(toolbarEl).adopt(this.toolbar);
+	},
+
+	add: function(textarea, options){
+		return this.activeEditor = new MooEditable.Group.Item(textarea, this, Object.merge({toolbar: false}, this.options, options));
+	}
+	
+});
+
+
+MooEditable.Group.Item = new Class({
+
+	Extends: MooEditable,
+
+	initialize: function(textarea, group, options){
+		var self = this;
+		this.group = group;
+		this.parent(textarea, options);
+		this.addEvent('attach', function(){
+			var focus = function(){
+				if (this == self.win) self.group.activeEditor = self;
+			};
+			self.textarea.addEvent('focus', focus);
+			self.win.addEvent('focus', focus);
+		});
+	}
+
+});
\ No newline at end of file

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Group.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Image.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Image.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Image.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Image.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,121 @@
+/*
+---
+
+name: MooEditable.Image
+
+description: Extends MooEditable to insert image with manipulation options.
+
+license: MIT-style license
+
+authors:
+- Radovan Lozej
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides: [MooEditable.UI.ImageDialog, MooEditable.Actions.image]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Image.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.Image.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | image | toggleview'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Locale.define({
+	imageAlt: 'alt',
+	imageClass: 'class',
+	imageAlign: 'align',
+	imageAlignNone: 'none',
+	imageAlignLeft: 'left',
+	imageAlignCenter: 'center',
+	imageAlignRight: 'right',
+	addEditImage: 'Add/Edit Image'
+});
+
+MooEditable.UI.ImageDialog = function(editor){
+	var html = MooEditable.Locale.get('enterImageURL') + ' <input type="text" class="dialog-url" value="" size="15"> '
+		+ MooEditable.Locale.get('imageAlt') + ' <input type="text" class="dialog-alt" value="" size="8"> '
+		+ MooEditable.Locale.get('imageClass') + ' <input type="text" class="dialog-class" value="" size="8"> '
+		+ MooEditable.Locale.get('imageAlign') + ' <select class="dialog-align">'
+			+ '<option>' + MooEditable.Locale.get('imageAlignNone') + '</option>'
+			+ '<option>' + MooEditable.Locale.get('imageAlignLeft') + '</option>'
+			+ '<option>' + MooEditable.Locale.get('imageAlignCenter') + '</option>'
+			+ '<option>' + MooEditable.Locale.get('imageAlignRight') + '</option>'
+		+ '</select> '
+		+ '<button class="dialog-button dialog-ok-button">' + MooEditable.Locale.get('ok') + '</button> '
+		+ '<button class="dialog-button dialog-cancel-button">' + MooEditable.Locale.get('cancel') + '</button>';
+		
+	return new MooEditable.UI.Dialog(html, {
+		'class': 'mooeditable-image-dialog',
+		onOpen: function(){
+			var input = this.el.getElement('.dialog-url');
+			var node = editor.selection.getNode();
+			if (node.get('tag') == 'img'){
+				this.el.getElement('.dialog-url').set('value', node.get('src'));
+				this.el.getElement('.dialog-alt').set('value', node.get('alt'));
+				this.el.getElement('.dialog-class').set('value', node.className);
+				this.el.getElement('.dialog-align').set('align', node.get('align'));
+			}
+			(function(){
+				input.focus();
+				input.select();
+			}).delay(10);
+		},
+		onClick: function(e){
+			if (e.target.tagName.toLowerCase() == 'button') e.preventDefault();
+			var button = document.id(e.target);
+			if (button.hasClass('dialog-cancel-button')){
+				this.close();
+			} else if (button.hasClass('dialog-ok-button')){
+				this.close();
+				var dialogAlignSelect = this.el.getElement('.dialog-align');
+				var node = editor.selection.getNode();
+				if (node.get('tag') == 'img'){
+					node.set('src', this.el.getElement('.dialog-url').get('value').trim());
+					node.set('alt', this.el.getElement('.dialog-alt').get('value').trim());
+					node.className = this.el.getElement('.dialog-class').get('value').trim();
+					node.set('align', $(dialogAlignSelect.options[dialogAlignSelect.selectedIndex]).get('value'));
+				} else {
+					var div = new Element('div');
+					new Element('img', {
+						src: this.el.getElement('.dialog-url').get('value').trim(),
+						alt: this.el.getElement('.dialog-alt').get('value').trim(),
+						'class': this.el.getElement('.dialog-class').get('value').trim(),
+						align: $(dialogAlignSelect.options[dialogAlignSelect.selectedIndex]).get('value')
+					}).inject(div);
+					editor.selection.insertContent(div.get('html'));
+				}
+			}
+		}
+	});
+};
+
+MooEditable.Actions.image = {
+	title: MooEditable.Locale.get('addEditImage'),
+	options: {
+		shortcut: 'm'
+	},
+	dialogs: {
+		prompt: function(editor){
+			return MooEditable.UI.ImageDialog(editor);
+		}
+	},
+	command: function(){
+		this.dialogs.image.prompt.open();
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Image.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Pagebreak.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Pagebreak.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Pagebreak.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Pagebreak.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,89 @@
+/*
+---
+
+name: MooEditable.Pagebreak
+
+description: Extends MooEditable with pagebreak plugin
+
+license: MIT-style license
+
+authors:
+- Ryan Mitchell
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides: [MooEditable.Actions.pagebreak]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Pagebreak.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.Pagebreak.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | pagebreak | toggleview',
+      externalCSS: '../../Assets/MooEditable/Editable.css'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Actions.Settings.pagebreak = {
+	imageFile: '../../Assets/MooEditable/Other/pagebreak.gif'
+};
+
+MooEditable.Locale.define('pageBreak', 'Page break');
+
+MooEditable.Actions.pagebreak = {
+	title: MooEditable.Locale.get('pageBreak'),
+	command: function(){
+		this.selection.insertContent('<img class="mooeditable-visual-aid mooeditable-pagebreak">');
+	},
+	events: {
+		attach: function(editor){
+			if (Browser.ie){
+				// addListener instead of addEvent, because controlselect is a native event in IE
+				editor.doc.addListener('controlselect', function(e){
+					var el = e.target || e.srcElement;
+					if (el.tagName.toLowerCase() != 'img') return;
+					if (!document.id(el).hasClass('mooeditable-pagebreak')) return;
+					if (e.preventDefault){
+						e.preventDefault();
+					} else {
+						e.returnValue = false;
+					}
+				});
+			}
+		},
+		editorMouseDown: function(e, editor){
+			var el = e.target;
+			var isSmiley = (el.tagName.toLowerCase() == 'img') && $(el).hasClass('mooeditable-pagebreak');
+			Function.attempt(function(){
+				editor.doc.execCommand('enableObjectResizing', false, !isSmiley);
+			});
+		},
+		beforeToggleView: function(){ // code to run when switching from iframe to textarea
+			if (this.mode == 'iframe'){
+				var s = this.getContent().replace(/<img([^>]*)class="mooeditable-visual-aid mooeditable-pagebreak"([^>]*)>/gi, '<!-- page break -->');
+				this.setContent(s);
+			} else {
+				var s = this.textarea.get('value').replace(/<!-- page break -->/gi, '<img class="mooeditable-visual-aid mooeditable-pagebreak">');
+				this.textarea.set('value', s);
+			}
+		},
+		render: function(){
+			this.options.extraCSS = 'img.mooeditable-pagebreak { display:block; width:100%; height:16px; background: url('
+				+ MooEditable.Actions.Settings.pagebreak.imageFile + ') repeat-x; }'
+				+ this.options.extraCSS;
+		}
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Pagebreak.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Smiley.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Smiley.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Smiley.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Smiley.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,95 @@
+/*
+---
+
+name: MooEditable.Smiley
+
+description: Extends MooEditable to insert smiley/emoticons.
+
+license: MIT-style license
+
+authors:
+- Olivier Refalo
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.UI.ButtonOverlay
+# - MooEditable.Actions
+
+provides: [MooEditable.Actions.smiley]
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Smiley.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.UI.ButtonOverlay.js"></script>
+  <script src="MooEditable.Smiley.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | smiley | toggleview'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Actions.Settings.smiley = {
+	imagesPath: '../../Assets/MooEditable/Smiley/',
+	smileys: ['angryface', 'blush', 'gasp', 'grin', 'halo', 'lipsaresealed', 'smile', 'undecided', 'wink'],
+	fileExt: '.png'
+};
+
+MooEditable.Locale.define('insertSmiley', 'Insert Smiley');
+
+MooEditable.Actions.smiley = {
+	type: 'button-overlay',
+	title: MooEditable.Locale.get('insertSmiley'),
+	options: {
+		overlaySize: {x: 'auto'},
+		overlayHTML: (function(){
+			var settings = MooEditable.Actions.Settings.smiley;
+			var html = '';
+			settings.smileys.each(function(s){
+				html += '<img src="'+ settings.imagesPath + s + settings.fileExt + '" alt="" class="smiley-image">'; 
+			});
+			return html;
+		})()
+	},
+	command: function(buttonOverlay, e){
+		var el = e.target;
+		if (el.tagName.toLowerCase() != 'img') return;
+		var src = $(el).get('src');
+		var content = '<img style="border:0;" class="smiley" src="' + src + '" alt="">';
+		this.focus();
+		this.selection.insertContent(content);
+	},
+	events: {
+		attach: function(editor){
+			if (Browser.ie){
+				// addListener instead of addEvent, because controlselect is a native event in IE
+				editor.doc.addListener('controlselect', function(e){
+					var el = e.target || e.srcElement;
+					if (el.tagName.toLowerCase() != 'img') return;
+					if (!document.id(el).hasClass('smiley')) return;
+					if (e.preventDefault){
+						e.preventDefault();
+					} else {
+						e.returnValue = false;
+					}
+				});
+			}
+		},
+		editorMouseDown: function(e, editor){
+			var el = e.target;
+			var isSmiley = (el.tagName.toLowerCase() == 'img') && $(el).hasClass('smiley');
+			Function.attempt(function(){
+				editor.doc.execCommand('enableObjectResizing', false, !isSmiley);
+			});
+		}
+	}
+};

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Smiley.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Table.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Table.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Table.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Table.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,379 @@
+/*
+---
+
+name: MooEditable.Table
+
+description: Extends MooEditable to insert table with manipulation options.
+
+license: MIT-style license
+
+authors:
+- Radovan Lozej
+- Ryan Mitchell
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+# - MooEditable.Actions
+
+provides:
+- MooEditable.UI.TableDialog
+- MooEditable.Actions.tableadd
+- MooEditable.Actions.tableedit
+- MooEditable.Actions.tablerowadd
+- MooEditable.Actions.tablerowedit
+- MooEditable.Actions.tablerowspan
+- MooEditable.Actions.tablerowsplit
+- MooEditable.Actions.tablerowdelete
+- MooEditable.Actions.tablecoladd
+- MooEditable.Actions.tablecoledit
+- MooEditable.Actions.tablecolspan
+- MooEditable.Actions.tablecolsplit
+- MooEditable.Actions.tablecoldelete
+
+usage: |
+  Add the following tags in your html
+  <link rel="stylesheet" href="MooEditable.css">
+  <link rel="stylesheet" href="MooEditable.Table.css">
+  <script src="mootools.js"></script>
+  <script src="MooEditable.js"></script>
+  <script src="MooEditable.Table.js"></script>
+
+  <script>
+  window.addEvent('domready', function(){
+    var mooeditable = $('textarea-1').mooEditable({
+      actions: 'bold italic underline strikethrough | table | toggleview'
+    });
+  });
+  </script>
+
+...
+*/
+
+MooEditable.Locale.define({
+	tableColumns: 'columns',
+	tableRows: 'rows',
+	tableWidth: 'width',
+	tableClass: 'class',
+	tableType: 'type',
+	tableHeader: 'Header',
+	tableCell: 'Cell',
+	tableAlign: 'align',
+	tableAlignNone: 'none',
+	tableAlignCenter: 'center',
+	tableAlignRight: 'right',
+	tableValign: 'vertical align',
+	tableValignNone: 'none',
+	tableValignTop: 'top',
+	tableValignMiddle: 'middle',
+	tableValignBottom: 'bottom',
+	addTable: 'Add Table',
+	editTable: 'Edit Table',
+	addTableRow: 'Add Table Row',
+	editTableRow: 'Edit Table Row',
+	mergeTableRow: 'Merge Table Row',
+	splitTableRow: 'Split Table Row',
+	deleteTableRow: 'Delete Table Row',
+	addTableCol: 'Add Table Column',
+	editTableCol: 'Edit Table Column',
+	mergeTableCell: 'Merge Table Cell',
+	splitTableCell: 'Split Table Cell',
+	deleteTableCol: 'Delete Table Column'
+});
+
+MooEditable.UI.TableDialog = function(editor, dialog){
+	var html = {
+		tableadd: MooEditable.Locale.get('tableColumns') + ' <input type="text" class="table-c" value="" size="4"> '
+			+ MooEditable.Locale.get('tableRows') + ' <input type="text" class="table-r" value="" size="4"> ',
+		tableedit: MooEditable.Locale.get('tableWidth') + ' <input type="text" class="table-w" value="" size="4"> '
+			+ MooEditable.Locale.get('tableClass') + ' <input type="text" class="table-c" value="" size="15"> ',
+		tablerowedit: MooEditable.Locale.get('tableClass') + ' <input type="text" class="table-c" value="" size="15"> '
+			+ MooEditable.Locale.get('tableType') + ' <select class="table-c-type">'
+				+ '<option value="th">' + MooEditable.Locale.get('tableHeader') + '</option>'
+				+ '<option value="td">' + MooEditable.Locale.get('tableCell') + '</option>'
+			+ '</select> ',
+		tablecoledit: MooEditable.Locale.get('tableWidth') + ' <input type="text" class="table-w" value="" size="4"> '
+			+ MooEditable.Locale.get('tableClass') + ' <input type="text" class="table-c" value="" size="15"> '
+			+ MooEditable.Locale.get('tableAlign') + ' <select class="table-a">'
+				+ '<option>' + MooEditable.Locale.get('tableAlignNone') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableAlignLeft') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableAlignCenter') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableAlignRight') + '</option>'
+			+ '</select> '
+			+ MooEditable.Locale.get('tableValign') + ' <select class="table-va">'
+				+ '<option>' + MooEditable.Locale.get('tableValignNone') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableValignTop') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableValignMiddle') + '</option>'
+				+ '<option>' + MooEditable.Locale.get('tableValignBottom') + '</option>'
+			+ '</select> '
+	};
+	html[dialog] += '<button class="dialog-button dialog-ok-button">' + MooEditable.Locale.get('ok') + '</button>'
+		+ '<button class="dialog-button dialog-cancel-button">' + MooEditable.Locale.get('cancel') + '</button>';
+		
+	var action = {
+		tableadd: {
+			click: function(e){
+				var col = this.el.getElement('.table-c').value.toInt();
+				var row = this.el.getElement('.table-r').value.toInt();
+				if (!(row>0 && col>0)) return;
+				var div, table, tbody, ro = [];
+				div = new Element('tdiv');
+				table = new Element('table').set('border', 0).set('width', '100%').inject(div);
+				tbody = new Element('tbody').inject(table);
+				for (var r = 0; r<row; r++){
+					ro[r] = new Element('tr').inject(tbody, 'bottom');
+					for (var c=0; c<col; c++) new Element('td').set('html', '&nbsp;').inject(ro[r], 'bottom');
+				}
+				editor.selection.insertContent(div.get('html'));
+			}
+		},
+		tableedit: {
+			load: function(e){
+				var node = editor.selection.getNode().getParent('table');
+				this.el.getElement('.table-w').set('value', node.get('width'));
+				this.el.getElement('.table-c').set('value', node.className);
+			},
+			click: function(e){
+				var node = editor.selection.getNode().getParent('table');
+				node.set('width', this.el.getElement('.table-w').value);
+				node.className = this.el.getElement('.table-c').value;
+			}
+		},
+		tablerowedit: {
+			load: function(e){
+				var node = editor.selection.getNode().getParent('tr');
+				this.el.getElement('.table-c').set('value', node.className);
+				this.el.getElement('.table-c-type').set('value', editor.selection.getNode().get('tag'));
+			},
+			click: function(e){
+				var node = editor.selection.getNode().getParent('tr');
+				node.className = this.el.getElement('.table-c').value;
+				node.getElements('td, th').each(function(c){
+					if (this.el.getElement('.table-c-type') != c.get('tag')){
+						var n = editor.doc.createElement(this.el.getElement('.table-c-type').get('value'));
+						$(n).set('html', c.get('html')).replaces(c);
+					}
+				}, this);
+			}
+		},
+		tablecoledit: {
+			load : function(e){
+				var node = editor.selection.getNode();
+				if (node.get('tag') != 'td') node = node.getParent('td');
+				this.el.getElement('.table-w').set('value', node.get('width'));
+				this.el.getElement('.table-c').set('value', node.className);
+				this.el.getElement('.table-a').set('value', node.get('align'));
+				this.el.getElement('.table-va').set('value', node.get('valign'));
+			},
+			click: function(e){
+				var node = editor.selection.getNode();
+				if (node.get('tag') != 'td') node = node.getParent('td');
+				node.set('width', this.el.getElement('.table-w').value);
+				node.className = this.el.getElement('.table-c').value;
+				node.set('align', this.el.getElement('.table-a').value);
+				node.set('valign', this.el.getElement('.table-va').value);
+			}
+		}
+	};
+	
+	return new MooEditable.UI.Dialog(html[dialog], {
+		'class': 'mooeditable-table-dialog',
+		onOpen: function(){
+			if (action[dialog].load) action[dialog].load.apply(this);
+			var input = this.el.getElement('input');
+			(function(){ input.focus(); }).delay(10);
+		},
+		onClick: function(e){
+			if (e.target.tagName.toLowerCase() == 'button') e.preventDefault();
+			var button = document.id(e.target);
+			if (button.hasClass('dialog-cancel-button')){
+				this.close();
+			} else if (button.hasClass('dialog-ok-button')){
+				this.close();
+				action[dialog].click.apply(this);
+			}
+		}
+	});
+};
+
+Object.append(MooEditable.Actions, {
+
+	tableadd:{
+		title: MooEditable.Locale.get('addTable'),
+		dialogs: {
+			prompt: function(editor){
+				return MooEditable.UI.TableDialog(editor, 'tableadd');
+			}
+		},
+		command: function(){
+			this.dialogs.tableadd.prompt.open();
+		}
+	},
+	
+	tableedit:{
+		title: MooEditable.Locale.get('editTable'),
+		dialogs: {
+			prompt: function(editor){
+				return MooEditable.UI.TableDialog(editor, 'tableedit');
+			}
+		},
+		command: function(){
+			if (this.selection.getNode().getParent('table')) this.dialogs.tableedit.prompt.open();
+		}
+	},
+	
+	tablerowadd:{
+		title: 'Add Row',
+		command: function(){
+			var node = this.selection.getNode().getParent('tr');
+			if (node) node.clone().inject(node, 'after');
+		}
+	},
+	
+	tablerowedit:{
+		title: MooEditable.Locale.get('editTableRow'),
+		dialogs: {
+			prompt: function(editor){
+				return MooEditable.UI.TableDialog(editor, 'tablerowedit');
+			}
+		},
+		command: function(){
+			if (this.selection.getNode().getParent('table')) this.dialogs.tablerowedit.prompt.open();
+		}
+	},
+	
+	tablerowspan:{
+		title: MooEditable.Locale.get('mergeTableRow'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag') != 'td') node = node.getParent('td');
+			if (node){
+				var index = node.cellIndex;
+				var row = node.getParent().rowIndex;
+				if (node.getParent().getParent().childNodes[row+node.rowSpan]){
+					node.getParent().getParent().childNodes[row+node.rowSpan].deleteCell(index);
+					node.rowSpan++;
+				}
+			}
+		}
+	},
+	
+	tablerowsplit:{
+		title: MooEditable.Locale.get('splitTableRow'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag') != 'td') node = node.getParent('td');
+			if (node){
+				var index = node.cellIndex;
+				var row = node.getParent().rowIndex;
+				if (node.getProperty('rowspan')){
+					var rows = parseInt(node.getProperty('rowspan'));
+					for (i=1; i<rows; i++){
+						node.getParent().getParent().childNodes[row+i].insertCell(index);
+					}
+					node.removeProperty('rowspan');
+				}
+			}
+		},
+		states: function(node){
+			if (node.get('tag') != 'td') return;
+			if (node){
+				if (node.getProperty('rowspan') && parseInt(node.getProperty('rowspan')) > 1){
+					this.el.addClass('onActive');
+				}
+			}
+		}
+	},
+	
+	tablerowdelete:{
+		title: MooEditable.Locale.get('deleteTableRow'),
+		command: function(){
+			var node = this.selection.getNode().getParent('tr');
+			if (node) node.getParent().deleteRow(node.rowIndex);
+		}
+	},
+	
+	tablecoladd:{
+		title: MooEditable.Locale.get('addTableCol'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag') != 'td') node = node.getParent('td');
+			if (node){
+				var index = node.cellIndex;
+				var len = node.getParent().getParent().childNodes.length;
+				for (var i=0; i<len; i++){
+					var ref = $(node.getParent().getParent().childNodes[i].childNodes[index]);
+					ref.clone().inject(ref, 'after');
+				}
+			}
+		}
+	},
+	
+	tablecoledit:{
+		title: MooEditable.Locale.get('editTableCol'),
+		dialogs: {
+			prompt: function(editor){
+				return MooEditable.UI.TableDialog(editor, 'tablecoledit');
+			}
+		},
+		command: function(){
+			if (this.selection.getNode().getParent('table')) this.dialogs.tablecoledit.prompt.open();
+		}
+	},
+	
+	tablecolspan:{
+		title: MooEditable.Locale.get('mergeTableCell'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag')!='td') node = node.getParent('td');
+			if (node){
+				var index = node.cellIndex + 1;
+				if (node.getParent().childNodes[index]){
+					node.getParent().deleteCell(index);
+					node.colSpan++;
+				}
+			}
+		}
+	},
+		
+	tablecolsplit:{
+		title: MooEditable.Locale.get('splitTableCell'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag')!='td') node = node.getParent('td');
+			if (node){
+				var index = node.cellIndex + 1;
+				if(node.getProperty('colspan')){
+					var cols = parseInt(node.getProperty('colspan'));
+					for (i=1;i<cols;i++){
+						node.getParent().insertCell(index+i);
+					}
+					node.removeProperty('colspan');
+				}
+			}
+		},
+		states: function(node){
+			if (node.get('tag')!='td') return;
+			if (node){
+				if (node.getProperty('colspan') && parseInt(node.getProperty('colspan')) > 1){
+					this.el.addClass('onActive');
+				}
+			}
+		}
+	},
+	
+	tablecoldelete:{
+		title: MooEditable.Locale.get('deleteTableCol'),
+		command: function(){
+			var node = this.selection.getNode();
+			if (node.get('tag') != 'td') node = node.getParent('td');
+			if (node){
+				var len = node.getParent().getParent().childNodes.length;
+				var index = node.cellIndex;
+				var tt = node.getParent().getParent();
+				for (var i=0; i<len; i++) tt.childNodes[i].deleteCell(index);
+			}
+		}
+	}
+	
+});

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.Table.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ButtonOverlay.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ButtonOverlay.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ButtonOverlay.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ButtonOverlay.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,114 @@
+/*
+---
+
+name: MooEditable.UI.ButtonOverlay
+
+description: UI Class to create a button element with a popup overlay.
+
+license: MIT-style license
+
+authors:
+- Lim Chee Aun
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+
+provides: [MooEditable.UI.ButtonOverlay]
+
+...
+*/
+
+MooEditable.UI.ButtonOverlay = new Class({
+
+	Extends: MooEditable.UI.Button,
+
+	options: {
+		/*
+		onOpenOverlay: function(){},
+		onCloseOverlay: function(){},
+		*/
+		overlayHTML: '',
+		overlayClass: '',
+		overlaySize: {x: 150, y: 'auto'},
+		overlayContentClass: ''
+	},
+
+	initialize: function(options){
+		this.parent(options);
+		this.render();
+		this.el.addClass('mooeditable-ui-buttonOverlay');
+		this.renderOverlay(this.options.overlayHTML);
+	},
+	
+	renderOverlay: function(html){
+		var self = this;
+		this.overlay = new Element('div', {
+			'class': 'mooeditable-ui-button-overlay ' + self.name + '-overlay ' + self.options.overlayClass,
+			html: '<div class="overlay-content ' + self.options.overlayContentClass + '">' + html + '</div>',
+			tabindex: 0,
+			styles: {
+				left: '-999em',
+				position: 'absolute',
+				width: self.options.overlaySize.x,
+				height: self.options.overlaySize.y
+			},
+			events: {
+				mousedown: self.clickOverlay.bind(self),
+				focus: self.openOverlay.bind(self),
+				blur: self.closeOverlay.bind(self)
+			}
+		}).inject(document.body).store('MooEditable.UI.ButtonOverlay', this);
+		this.overlayVisible = false;
+		
+		window.addEvent('resize', function(){
+			if (self.overlayVisible) self.positionOverlay();
+		});
+	},
+	
+	openOverlay: function(){
+		if (this.overlayVisible) return;
+		this.overlayVisible = true;
+		this.activate();
+		this.fireEvent('openOverlay', this);
+		return this;
+	},
+	
+	closeOverlay: function(){
+		if (!this.overlayVisible) return;
+		this.overlay.setStyle('left', '-999em');
+		this.overlayVisible = false;
+		this.deactivate();
+		this.fireEvent('closeOverlay', this);
+		return this;
+	},
+	
+	clickOverlay: function(e){
+		if (e.target == this.overlay || e.target.parentNode == this.overlay) return;
+		this.overlay.blur();
+		e.preventDefault();
+		this.action(e);
+	},
+	
+	click: function(e){
+		e.preventDefault();
+		if (this.disabled) return;
+		if (this.overlayVisible){
+			this.overlay.blur();
+			return;
+		} else {
+			this.positionOverlay();
+			this.overlay.focus();
+		}
+	},
+	
+	positionOverlay: function(){
+		var coords = this.el.getCoordinates();
+		this.overlay.setStyles({
+			top: coords.bottom,
+			left: coords.left
+		});
+		return this;
+	}
+	
+});

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ButtonOverlay.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ExtendedLinksDialog.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ExtendedLinksDialog.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ExtendedLinksDialog.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ExtendedLinksDialog.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,133 @@
+/*
+---
+
+name: MooEditable.UI.ExtendedLinksDialog
+
+description: Extends MooEditable, adds better link support.
+
+license: MIT-style license
+
+authors:
+- André Fiedler <kontakt@visualdrugs.net>
+
+requires:
+- MooEditable.UI.Dialog
+- MooEditable.Actions
+- MooEditable.UI.AlertDialog
+- More/URI
+
+provides: [MooEditable.UI.ExtendedLinksDialog]
+
+...
+*/
+
+(function(){
+    
+MooEditable.Locale.define({
+    protocol: 'protocol',
+    link: 'link',
+    email: 'e-Mail',
+    urlWithoutHttp: 'URL (without http://)',
+    window: 'window',
+    sameWindow: 'same window',
+    newWindow: 'new window'
+});
+
+String.implement({
+    camelCaseFirst: function(){
+    	return this.replace(/\s*(\D)/, function(match){
+    		return match.toUpperCase();
+    	});
+    }
+});
+
+var urlRegex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i;
+
+MooEditable.UI.ExtendedLinksDialog = function(editor){
+    var html = '<div class="dialog-column"><label class="dialog-label">' 
+        + MooEditable.Locale.get('protocol').camelCaseFirst()+ '<br/><select class="dialog-input-protocol">'
+        + '<option value="http">' + MooEditable.Locale.get('link') + '</option>'
+        + '<option value="mailto">' + MooEditable.Locale.get('email') + '</option>'
+        + '</select></label></div>'
+		+ '<div class="dialog-column"><label class="dialog-label">'
+        + MooEditable.Locale.get('urlWithoutHttp').camelCaseFirst()
+        + '<br/><input type="text" class="dialog-input-url" value=""></label></div> '
+		+ '<div class="dialog-column"><label class="dialog-label">'
+        + MooEditable.Locale.get('window').camelCaseFirst() + '<br/><select class="dialog-input-target">'
+        + '<option value="_self">' + MooEditable.Locale.get('sameWindow') + '</option>'
+        + '<option value="_blank">' + MooEditable.Locale.get('newWindow') + '</option>'
+        + '</select></label></div><br/>'
+		+ '<button class="dialog-button dialog-ok-button">' + MooEditable.Locale.get('ok').camelCaseFirst() + '</button>'
+		+ '<button class="dialog-button dialog-cancel-button">' + MooEditable.Locale.get('cancel').camelCaseFirst() + '</button>';
+	return new MooEditable.UI.Dialog(html, {
+		'class': 'mooeditable-prompt-dialog',
+		onOpen: function(){
+			var protocol_input = this.el.getElement('.dialog-input-protocol');
+			var url_input = this.el.getElement('.dialog-input-url');
+			var target_input = this.el.getElement('.dialog-input-target');
+			var text = editor.selection.getText();
+			var node = editor.selection.getNode();
+			if(node.get('tag') == 'a'){
+				var uri = new URI(node.href);
+				protocol_input.set('value', uri.get('scheme'));
+				if(uri.get('scheme') == 'mailto'){
+					url_input.set('value', node.href.replace('mailto:', ''));
+				}
+                else {
+					url_input.set('value', uri.get('host'));
+				}
+				target_input.set('value', node.target || '_self');
+			}
+			else if(urlRegex.test(text)) {
+				var uri = new URI(text);
+				protocol_input.set('value', uri.get('scheme'));
+				url_input.set('value', uri.get('host'));
+			}
+			(function(){
+				url_input.focus();
+				url_input.select();
+			}).delay(10);
+		},
+		onClick: function(e){
+			e.preventDefault();
+			if (e.target.tagName.toLowerCase() != 'button') return;
+			var button = document.id(e.target);
+			var protocol_input = this.el.getElement('.dialog-input-protocol');
+			var url_input = this.el.getElement('.dialog-input-url');
+			var target_input = this.el.getElement('.dialog-input-target');
+			if (button.hasClass('dialog-cancel-button')){
+				this.close();
+			}
+            else if (button.hasClass('dialog-ok-button')){
+				if(protocol_input.get('value') == 'mailto'){
+					editor.selection.insertContent('<a href="mailto:' + url_input.get('value') + '" target="' + target_input.get('value') + '">' + editor.selection.getText() + '</a>');
+				}
+                else {
+					editor.selection.insertContent('<a href="' + protocol_input.get('value') + '://' + url_input.get('value') + '" target="' + target_input.get('value') + '">' + editor.selection.getText() + '</a>');
+				}
+				this.close();
+			}
+		}
+	});
+};
+
+MooEditable.Actions.createlink.dialogs.prompt = function(editor){
+	return MooEditable.UI.ExtendedLinksDialog(editor);
+}
+MooEditable.Actions.createlink.command = function(){
+    var selection = this.selection;
+    var dialogs = this.dialogs.createlink;
+    if (selection.isCollapsed()){
+    	var node = selection.getNode();
+    	if (node.get('tag') == 'a' && node.get('href')){
+    		selection.selectNode(node);
+    		dialogs.prompt.open();
+    	} else {
+    		dialogs.alert.open();
+    	}
+    } else {
+    	dialogs.prompt.open();
+    }
+}
+
+})();
\ No newline at end of file

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.ExtendedLinksDialog.js
------------------------------------------------------------------------------
    svn:executable = *

Added: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.MenuList.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.MenuList.js?rev=1696096&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.MenuList.js (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.MenuList.js Sat Aug 15 20:45:46 2015
@@ -0,0 +1,120 @@
+/*
+---
+
+name: MooEditable.UI.MenuList
+
+description: UI Class to create a menu list (select) element.
+
+license: MIT-style license
+
+authors:
+- Lim Chee Aun
+
+requires:
+# - MooEditable
+# - MooEditable.UI
+
+provides: [MooEditable.UI.MenuList]
+
+...
+*/
+
+MooEditable.UI.MenuList = new Class({
+
+	Implements: [Events, Options],
+
+	options: {
+		/*
+		onAction: function(){},
+		*/
+		title: '',
+		name: '',
+		'class': '',
+		list: []
+	},
+
+	initialize: function(options){
+		this.setOptions(options);
+		this.name = this.options.name;
+		this.render();
+	},
+	
+	toElement: function(){
+		return this.el;
+	},
+	
+	render: function(){
+		var self = this;
+		var html = '';
+		this.options.list.each(function(item){
+			html += '<option value="{value}" style="{style}">{text}</option>'.substitute(item);
+		});
+		this.el = new Element('select', {
+			'class': self.options['class'],
+			title: self.options.title,
+			html: html,
+			styles: { 'height' : '21px' },
+			events: {
+				change: self.change.bind(self)
+			}
+		});
+		
+		this.disabled = false;
+
+		// add hover effect for IE
+		if (Browser.ie) this.el.addEvents({
+			mouseenter: function(e){ this.addClass('hover'); },
+			mouseleave: function(e){ this.removeClass('hover'); }
+		});
+		
+		return this;
+	},
+	
+	change: function(e){
+		e.preventDefault();
+		if (this.disabled) return;
+		var name = e.target.value;
+		this.action(name);
+	},
+	
+	action: function(){
+		this.fireEvent('action', [this].concat(Array.from(arguments)));
+	},
+	
+	enable: function(){
+		if (!this.disabled) return;
+		this.disabled = false;
+		this.el.set('disabled', false).removeClass('disabled').set({
+			disabled: false,
+			opacity: 1
+		});
+		return this;
+	},
+	
+	disable: function(){
+		if (this.disabled) return;
+		this.disabled = true;
+		this.el.set('disabled', true).addClass('disabled').set({
+			disabled: true,
+			opacity: 0.4
+		});
+		return this;
+	},
+	
+	activate: function(value){
+		if (this.disabled) return;
+		var index = 0;
+		if (value) this.options.list.each(function(item, i){
+			if (item.value == value) index = i;
+		});
+		this.el.selectedIndex = index;
+		return this;
+	},
+	
+	deactivate: function(){
+		this.el.selectedIndex = 0;
+		this.el.removeClass('onActive');
+		return this;
+	}
+	
+});

Propchange: jspwiki/trunk/jspwiki-war/src/main/webapp/scripts/mooeditable/Source/MooEditable/MooEditable.UI.MenuList.js
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message