From: Jean-Philippe Lang Date: Thu, 17 Jan 2008 18:39:17 +0000 (+0000) Subject: Added i18n support to the jstoolbar (only english and french are actually translated). X-Git-Tag: 0.7.0-RC1~212 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=32b9bf0ef265355cdb4e10559cfce250af03a30f;p=redmine.git Added i18n support to the jstoolbar (only english and french are actually translated). Translations can be found in public/javascripts/jstoolbar/lang/ git-svn-id: http://redmine.rubyforge.org/svn/trunk@1074 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 111709ce4..f0455f3e4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -433,7 +433,9 @@ module ApplicationHelper def wikitoolbar_for(field_id) return '' unless Setting.text_formatting == 'textile' - javascript_include_tag('jstoolbar') + javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.draw();") + javascript_include_tag('jstoolbar/jstoolbar') + + javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language}") + + javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.draw();") end def content_for(name, content = nil, &block) diff --git a/public/javascripts/jstoolbar.js b/public/javascripts/jstoolbar.js deleted file mode 100644 index b94a4ed80..000000000 --- a/public/javascripts/jstoolbar.js +++ /dev/null @@ -1,521 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * This file is part of DotClear. - * Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All - * rights reserved. - * - * DotClear is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * DotClear is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with DotClear; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * ***** END LICENSE BLOCK ***** -*/ - -/* Modified by JP LANG for textile formatting */ - -function jsToolBar(textarea) { - if (!document.createElement) { return; } - - if (!textarea) { return; } - - if ((typeof(document["selection"]) == "undefined") - && (typeof(textarea["setSelectionRange"]) == "undefined")) { - return; - } - - this.textarea = textarea; - - this.editor = document.createElement('div'); - this.editor.className = 'jstEditor'; - - this.textarea.parentNode.insertBefore(this.editor,this.textarea); - this.editor.appendChild(this.textarea); - - this.toolbar = document.createElement("div"); - this.toolbar.className = 'jstElements'; - this.editor.parentNode.insertBefore(this.toolbar,this.editor); - - // Dragable resizing (only for gecko) - if (this.editor.addEventListener) - { - this.handle = document.createElement('div'); - this.handle.className = 'jstHandle'; - var dragStart = this.resizeDragStart; - var This = this; - this.handle.addEventListener('mousedown',function(event) { dragStart.call(This,event); },false); - // fix memory leak in Firefox (bug #241518) - window.addEventListener('unload',function() { - var del = This.handle.parentNode.removeChild(This.handle); - delete(This.handle); - },false); - - this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling); - } - - this.context = null; - this.toolNodes = {}; // lorsque la toolbar est dessinée , cet objet est garni - // de raccourcis vers les éléments DOM correspondants aux outils. -} - -function jsButton(title, fn, scope, className) { - this.title = title || null; - this.fn = fn || function(){}; - this.scope = scope || null; - this.className = className || null; -} -jsButton.prototype.draw = function() { - if (!this.scope) return null; - - var button = document.createElement('button'); - button.setAttribute('type','button'); - if (this.className) button.className = this.className; - button.title = this.title; - var span = document.createElement('span'); - span.appendChild(document.createTextNode(this.title)); - button.appendChild(span); - - if (this.icon != undefined) { - button.style.backgroundImage = 'url('+this.icon+')'; - } - if (typeof(this.fn) == 'function') { - var This = this; - button.onclick = function() { try { This.fn.apply(This.scope, arguments) } catch (e) {} return false; }; - } - return button; -} - -function jsSpace(id) { - this.id = id || null; - this.width = null; -} -jsSpace.prototype.draw = function() { - var span = document.createElement('span'); - if (this.id) span.id = this.id; - span.appendChild(document.createTextNode(String.fromCharCode(160))); - span.className = 'jstSpacer'; - if (this.width) span.style.marginRight = this.width+'px'; - - return span; -} - -function jsCombo(title, options, scope, fn, className) { - this.title = title || null; - this.options = options || null; - this.scope = scope || null; - this.fn = fn || function(){}; - this.className = className || null; -} -jsCombo.prototype.draw = function() { - if (!this.scope || !this.options) return null; - - var select = document.createElement('select'); - if (this.className) select.className = className; - select.title = this.title; - - for (var o in this.options) { - //var opt = this.options[o]; - var option = document.createElement('option'); - option.value = o; - option.appendChild(document.createTextNode(this.options[o])); - select.appendChild(option); - } - - var This = this; - select.onchange = function() { - try { - This.fn.call(This.scope, this.value); - } catch (e) { alert(e); } - - return false; - } - - return select; -} - - -jsToolBar.prototype = { - base_url: '', - mode: 'wiki', - elements: {}, - - getMode: function() { - return this.mode; - }, - - setMode: function(mode) { - this.mode = mode || 'wiki'; - }, - - switchMode: function(mode) { - mode = mode || 'wiki'; - this.draw(mode); - }, - - button: function(toolName) { - var tool = this.elements[toolName]; - if (typeof tool.fn[this.mode] != 'function') return null; - var b = new jsButton(tool.title, tool.fn[this.mode], this, 'jstb_'+toolName); - if (tool.icon != undefined) b.icon = tool.icon; - return b; - }, - space: function(toolName) { - var tool = new jsSpace(toolName) - if (this.elements[toolName].width !== undefined) - tool.width = this.elements[toolName].width; - return tool; - }, - combo: function(toolName) { - var tool = this.elements[toolName]; - var length = tool[this.mode].list.length; - - if (typeof tool[this.mode].fn != 'function' || length == 0) { - return null; - } else { - var options = {}; - for (var i=0; i < length; i++) { - var opt = tool[this.mode].list[i]; - options[opt] = tool.options[opt]; - } - return new jsCombo(tool.title, options, this, tool[this.mode].fn); - } - }, - draw: function(mode) { - this.setMode(mode); - - // Empty toolbar - while (this.toolbar.hasChildNodes()) { - this.toolbar.removeChild(this.toolbar.firstChild) - } - this.toolNodes = {}; // vide les raccourcis DOM/**/ - - // Draw toolbar elements - var b, tool, newTool; - - for (var i in this.elements) { - b = this.elements[i]; - - var disabled = - b.type == undefined || b.type == '' - || (b.disabled != undefined && b.disabled) - || (b.context != undefined && b.context != null && b.context != this.context); - - if (!disabled && typeof this[b.type] == 'function') { - tool = this[b.type](i); - if (tool) newTool = tool.draw(); - if (newTool) { - this.toolNodes[i] = newTool; //mémorise l'accès DOM pour usage éventuel ultérieur - this.toolbar.appendChild(newTool); - } - } - } - }, - - singleTag: function(stag,etag) { - stag = stag || null; - etag = etag || stag; - - if (!stag || !etag) { return; } - - this.encloseSelection(stag,etag); - }, - - encloseLineSelection: function(prefix, suffix, fn) { - this.textarea.focus(); - - prefix = prefix || ''; - suffix = suffix || ''; - - var start, end, sel, scrollPos, subst, res; - - if (typeof(document["selection"]) != "undefined") { - sel = document.selection.createRange().text; - } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { - start = this.textarea.selectionStart; - end = this.textarea.selectionEnd; - scrollPos = this.textarea.scrollTop; - // go to the start of the line - start = this.textarea.value.substring(0, start).replace(/[^\r\n]*$/g,'').length; - // go to the end of the line - end = this.textarea.value.length - this.textarea.value.substring(end, this.textarea.value.length).replace(/^[^\r\n]*/, '').length; - sel = this.textarea.value.substring(start, end); - } - - if (sel.match(/ $/)) { // exclude ending space char, if any - sel = sel.substring(0, sel.length - 1); - suffix = suffix + " "; - } - - if (typeof(fn) == 'function') { - res = (sel) ? fn.call(this,sel) : fn(''); - } else { - res = (sel) ? sel : ''; - } - - subst = prefix + res + suffix; - - if (typeof(document["selection"]) != "undefined") { - document.selection.createRange().text = subst; - var range = this.textarea.createTextRange(); - range.collapse(false); - range.move('character', -suffix.length); - range.select(); - } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { - this.textarea.value = this.textarea.value.substring(0, start) + subst + - this.textarea.value.substring(end); - if (sel) { - this.textarea.setSelectionRange(start + subst.length, start + subst.length); - } else { - this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); - } - this.textarea.scrollTop = scrollPos; - } - }, - - encloseSelection: function(prefix, suffix, fn) { - this.textarea.focus(); - - prefix = prefix || ''; - suffix = suffix || ''; - - var start, end, sel, scrollPos, subst, res; - - if (typeof(document["selection"]) != "undefined") { - sel = document.selection.createRange().text; - } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { - start = this.textarea.selectionStart; - end = this.textarea.selectionEnd; - scrollPos = this.textarea.scrollTop; - sel = this.textarea.value.substring(start, end); - } - - if (sel.match(/ $/)) { // exclude ending space char, if any - sel = sel.substring(0, sel.length - 1); - suffix = suffix + " "; - } - - if (typeof(fn) == 'function') { - res = (sel) ? fn.call(this,sel) : fn(''); - } else { - res = (sel) ? sel : ''; - } - - subst = prefix + res + suffix; - - if (typeof(document["selection"]) != "undefined") { - document.selection.createRange().text = subst; - var range = this.textarea.createTextRange(); - range.collapse(false); - range.move('character', -suffix.length); - range.select(); -// this.textarea.caretPos -= suffix.length; - } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { - this.textarea.value = this.textarea.value.substring(0, start) + subst + - this.textarea.value.substring(end); - if (sel) { - this.textarea.setSelectionRange(start + subst.length, start + subst.length); - } else { - this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); - } - this.textarea.scrollTop = scrollPos; - } - }, - - stripBaseURL: function(url) { - if (this.base_url != '') { - var pos = url.indexOf(this.base_url); - if (pos == 0) { - url = url.substr(this.base_url.length); - } - } - - return url; - } -}; - -/** Resizer --------------------------------------------------------- */ -jsToolBar.prototype.resizeSetStartH = function() { - this.dragStartH = this.textarea.offsetHeight + 0; -}; -jsToolBar.prototype.resizeDragStart = function(event) { - var This = this; - this.dragStartY = event.clientY; - this.resizeSetStartH(); - document.addEventListener('mousemove', this.dragMoveHdlr=function(event){This.resizeDragMove(event);}, false); - document.addEventListener('mouseup', this.dragStopHdlr=function(event){This.resizeDragStop(event);}, false); -}; - -jsToolBar.prototype.resizeDragMove = function(event) { - this.textarea.style.height = (this.dragStartH+event.clientY-this.dragStartY)+'px'; -}; - -jsToolBar.prototype.resizeDragStop = function(event) { - document.removeEventListener('mousemove', this.dragMoveHdlr, false); - document.removeEventListener('mouseup', this.dragStopHdlr, false); -}; - -// Elements definition ------------------------------------ - -// strong -jsToolBar.prototype.elements.strong = { - type: 'button', - title: 'Strong emphasis', - fn: { - wiki: function() { this.singleTag('*') } - } -} - -// em -jsToolBar.prototype.elements.em = { - type: 'button', - title: 'Emphasis', - fn: { - wiki: function() { this.singleTag("_") } - } -} - -// ins -jsToolBar.prototype.elements.ins = { - type: 'button', - title: 'Inserted', - fn: { - wiki: function() { this.singleTag('+') } - } -} - -// del -jsToolBar.prototype.elements.del = { - type: 'button', - title: 'Deleted', - fn: { - wiki: function() { this.singleTag('-') } - } -} - -// quote -jsToolBar.prototype.elements.quote = { - type: 'button', - title: 'Inline quote', - fn: { - wiki: function() { this.singleTag('??') } - } -} - -// code -jsToolBar.prototype.elements.code = { - type: 'button', - title: 'Code', - fn: { - wiki: function() { this.singleTag('@') } - } -} - -// spacer -jsToolBar.prototype.elements.space1 = {type: 'space'} - -// headings -jsToolBar.prototype.elements.h1 = { - type: 'button', - title: 'Heading 1', - fn: { - wiki: function() { - this.encloseLineSelection('h1. ', '',function(str) { - str = str.replace(/^h\d+\.\s+/, '') - return str; - }); - } - } -} -jsToolBar.prototype.elements.h2 = { - type: 'button', - title: 'Heading 2', - fn: { - wiki: function() { - this.encloseLineSelection('h2. ', '',function(str) { - str = str.replace(/^h\d+\.\s+/, '') - return str; - }); - } - } -} -jsToolBar.prototype.elements.h3 = { - type: 'button', - title: 'Heading 3', - fn: { - wiki: function() { - this.encloseLineSelection('h3. ', '',function(str) { - str = str.replace(/^h\d+\.\s+/, '') - return str; - }); - } - } -} - -// spacer -jsToolBar.prototype.elements.space2 = {type: 'space'} - -// ul -jsToolBar.prototype.elements.ul = { - type: 'button', - title: 'Unordered list', - fn: { - wiki: function() { - this.encloseLineSelection('','',function(str) { - str = str.replace(/\r/g,''); - return str.replace(/(\n|^)[#-]?\s*/g,"$1* "); - }); - } - } -} - -// ol -jsToolBar.prototype.elements.ol = { - type: 'button', - title: 'Ordered list', - fn: { - wiki: function() { - this.encloseLineSelection('','',function(str) { - str = str.replace(/\r/g,''); - return str.replace(/(\n|^)[*-]?\s*/g,"$1# "); - }); - } - } -} - -// pre -jsToolBar.prototype.elements.pre = { - type: 'button', - title: 'Preformatted text', - fn: { - wiki: function() { this.encloseLineSelection('
\n', '\n
') } - } -} - -// spacer -jsToolBar.prototype.elements.space3 = {type: 'space'} - -// wiki page -jsToolBar.prototype.elements.link = { - type: 'button', - title: 'Wiki Page Link', - fn: { - wiki: function() { this.encloseSelection("[[", "]]") } - } -} -// image -jsToolBar.prototype.elements.img = { - type: 'button', - title: 'Inline image', - fn: { - wiki: function() { this.encloseSelection("!", "!") } - } -} diff --git a/public/javascripts/jstoolbar/jstoolbar.js b/public/javascripts/jstoolbar/jstoolbar.js new file mode 100644 index 000000000..65f25bac1 --- /dev/null +++ b/public/javascripts/jstoolbar/jstoolbar.js @@ -0,0 +1,525 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * This file is part of DotClear. + * Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All + * rights reserved. + * + * DotClear is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * DotClear is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with DotClear; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * ***** END LICENSE BLOCK ***** +*/ + +/* Modified by JP LANG for textile formatting */ + +function jsToolBar(textarea) { + if (!document.createElement) { return; } + + if (!textarea) { return; } + + if ((typeof(document["selection"]) == "undefined") + && (typeof(textarea["setSelectionRange"]) == "undefined")) { + return; + } + + this.textarea = textarea; + + this.editor = document.createElement('div'); + this.editor.className = 'jstEditor'; + + this.textarea.parentNode.insertBefore(this.editor,this.textarea); + this.editor.appendChild(this.textarea); + + this.toolbar = document.createElement("div"); + this.toolbar.className = 'jstElements'; + this.editor.parentNode.insertBefore(this.toolbar,this.editor); + + // Dragable resizing (only for gecko) + if (this.editor.addEventListener) + { + this.handle = document.createElement('div'); + this.handle.className = 'jstHandle'; + var dragStart = this.resizeDragStart; + var This = this; + this.handle.addEventListener('mousedown',function(event) { dragStart.call(This,event); },false); + // fix memory leak in Firefox (bug #241518) + window.addEventListener('unload',function() { + var del = This.handle.parentNode.removeChild(This.handle); + delete(This.handle); + },false); + + this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling); + } + + this.context = null; + this.toolNodes = {}; // lorsque la toolbar est dessinée , cet objet est garni + // de raccourcis vers les éléments DOM correspondants aux outils. +} + +function jsButton(title, fn, scope, className) { + if(typeof jsToolBar.strings == 'undefined') { + this.title = title || null; + } else { + this.title = jsToolBar.strings[title] || title || null; + } + this.fn = fn || function(){}; + this.scope = scope || null; + this.className = className || null; +} +jsButton.prototype.draw = function() { + if (!this.scope) return null; + + var button = document.createElement('button'); + button.setAttribute('type','button'); + if (this.className) button.className = this.className; + button.title = this.title; + var span = document.createElement('span'); + span.appendChild(document.createTextNode(this.title)); + button.appendChild(span); + + if (this.icon != undefined) { + button.style.backgroundImage = 'url('+this.icon+')'; + } + if (typeof(this.fn) == 'function') { + var This = this; + button.onclick = function() { try { This.fn.apply(This.scope, arguments) } catch (e) {} return false; }; + } + return button; +} + +function jsSpace(id) { + this.id = id || null; + this.width = null; +} +jsSpace.prototype.draw = function() { + var span = document.createElement('span'); + if (this.id) span.id = this.id; + span.appendChild(document.createTextNode(String.fromCharCode(160))); + span.className = 'jstSpacer'; + if (this.width) span.style.marginRight = this.width+'px'; + + return span; +} + +function jsCombo(title, options, scope, fn, className) { + this.title = title || null; + this.options = options || null; + this.scope = scope || null; + this.fn = fn || function(){}; + this.className = className || null; +} +jsCombo.prototype.draw = function() { + if (!this.scope || !this.options) return null; + + var select = document.createElement('select'); + if (this.className) select.className = className; + select.title = this.title; + + for (var o in this.options) { + //var opt = this.options[o]; + var option = document.createElement('option'); + option.value = o; + option.appendChild(document.createTextNode(this.options[o])); + select.appendChild(option); + } + + var This = this; + select.onchange = function() { + try { + This.fn.call(This.scope, this.value); + } catch (e) { alert(e); } + + return false; + } + + return select; +} + + +jsToolBar.prototype = { + base_url: '', + mode: 'wiki', + elements: {}, + + getMode: function() { + return this.mode; + }, + + setMode: function(mode) { + this.mode = mode || 'wiki'; + }, + + switchMode: function(mode) { + mode = mode || 'wiki'; + this.draw(mode); + }, + + button: function(toolName) { + var tool = this.elements[toolName]; + if (typeof tool.fn[this.mode] != 'function') return null; + var b = new jsButton(tool.title, tool.fn[this.mode], this, 'jstb_'+toolName); + if (tool.icon != undefined) b.icon = tool.icon; + return b; + }, + space: function(toolName) { + var tool = new jsSpace(toolName) + if (this.elements[toolName].width !== undefined) + tool.width = this.elements[toolName].width; + return tool; + }, + combo: function(toolName) { + var tool = this.elements[toolName]; + var length = tool[this.mode].list.length; + + if (typeof tool[this.mode].fn != 'function' || length == 0) { + return null; + } else { + var options = {}; + for (var i=0; i < length; i++) { + var opt = tool[this.mode].list[i]; + options[opt] = tool.options[opt]; + } + return new jsCombo(tool.title, options, this, tool[this.mode].fn); + } + }, + draw: function(mode) { + this.setMode(mode); + + // Empty toolbar + while (this.toolbar.hasChildNodes()) { + this.toolbar.removeChild(this.toolbar.firstChild) + } + this.toolNodes = {}; // vide les raccourcis DOM/**/ + + // Draw toolbar elements + var b, tool, newTool; + + for (var i in this.elements) { + b = this.elements[i]; + + var disabled = + b.type == undefined || b.type == '' + || (b.disabled != undefined && b.disabled) + || (b.context != undefined && b.context != null && b.context != this.context); + + if (!disabled && typeof this[b.type] == 'function') { + tool = this[b.type](i); + if (tool) newTool = tool.draw(); + if (newTool) { + this.toolNodes[i] = newTool; //mémorise l'accès DOM pour usage éventuel ultérieur + this.toolbar.appendChild(newTool); + } + } + } + }, + + singleTag: function(stag,etag) { + stag = stag || null; + etag = etag || stag; + + if (!stag || !etag) { return; } + + this.encloseSelection(stag,etag); + }, + + encloseLineSelection: function(prefix, suffix, fn) { + this.textarea.focus(); + + prefix = prefix || ''; + suffix = suffix || ''; + + var start, end, sel, scrollPos, subst, res; + + if (typeof(document["selection"]) != "undefined") { + sel = document.selection.createRange().text; + } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { + start = this.textarea.selectionStart; + end = this.textarea.selectionEnd; + scrollPos = this.textarea.scrollTop; + // go to the start of the line + start = this.textarea.value.substring(0, start).replace(/[^\r\n]*$/g,'').length; + // go to the end of the line + end = this.textarea.value.length - this.textarea.value.substring(end, this.textarea.value.length).replace(/^[^\r\n]*/, '').length; + sel = this.textarea.value.substring(start, end); + } + + if (sel.match(/ $/)) { // exclude ending space char, if any + sel = sel.substring(0, sel.length - 1); + suffix = suffix + " "; + } + + if (typeof(fn) == 'function') { + res = (sel) ? fn.call(this,sel) : fn(''); + } else { + res = (sel) ? sel : ''; + } + + subst = prefix + res + suffix; + + if (typeof(document["selection"]) != "undefined") { + document.selection.createRange().text = subst; + var range = this.textarea.createTextRange(); + range.collapse(false); + range.move('character', -suffix.length); + range.select(); + } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { + this.textarea.value = this.textarea.value.substring(0, start) + subst + + this.textarea.value.substring(end); + if (sel) { + this.textarea.setSelectionRange(start + subst.length, start + subst.length); + } else { + this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); + } + this.textarea.scrollTop = scrollPos; + } + }, + + encloseSelection: function(prefix, suffix, fn) { + this.textarea.focus(); + + prefix = prefix || ''; + suffix = suffix || ''; + + var start, end, sel, scrollPos, subst, res; + + if (typeof(document["selection"]) != "undefined") { + sel = document.selection.createRange().text; + } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { + start = this.textarea.selectionStart; + end = this.textarea.selectionEnd; + scrollPos = this.textarea.scrollTop; + sel = this.textarea.value.substring(start, end); + } + + if (sel.match(/ $/)) { // exclude ending space char, if any + sel = sel.substring(0, sel.length - 1); + suffix = suffix + " "; + } + + if (typeof(fn) == 'function') { + res = (sel) ? fn.call(this,sel) : fn(''); + } else { + res = (sel) ? sel : ''; + } + + subst = prefix + res + suffix; + + if (typeof(document["selection"]) != "undefined") { + document.selection.createRange().text = subst; + var range = this.textarea.createTextRange(); + range.collapse(false); + range.move('character', -suffix.length); + range.select(); +// this.textarea.caretPos -= suffix.length; + } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { + this.textarea.value = this.textarea.value.substring(0, start) + subst + + this.textarea.value.substring(end); + if (sel) { + this.textarea.setSelectionRange(start + subst.length, start + subst.length); + } else { + this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); + } + this.textarea.scrollTop = scrollPos; + } + }, + + stripBaseURL: function(url) { + if (this.base_url != '') { + var pos = url.indexOf(this.base_url); + if (pos == 0) { + url = url.substr(this.base_url.length); + } + } + + return url; + } +}; + +/** Resizer +-------------------------------------------------------- */ +jsToolBar.prototype.resizeSetStartH = function() { + this.dragStartH = this.textarea.offsetHeight + 0; +}; +jsToolBar.prototype.resizeDragStart = function(event) { + var This = this; + this.dragStartY = event.clientY; + this.resizeSetStartH(); + document.addEventListener('mousemove', this.dragMoveHdlr=function(event){This.resizeDragMove(event);}, false); + document.addEventListener('mouseup', this.dragStopHdlr=function(event){This.resizeDragStop(event);}, false); +}; + +jsToolBar.prototype.resizeDragMove = function(event) { + this.textarea.style.height = (this.dragStartH+event.clientY-this.dragStartY)+'px'; +}; + +jsToolBar.prototype.resizeDragStop = function(event) { + document.removeEventListener('mousemove', this.dragMoveHdlr, false); + document.removeEventListener('mouseup', this.dragStopHdlr, false); +}; + +// Elements definition ------------------------------------ + +// strong +jsToolBar.prototype.elements.strong = { + type: 'button', + title: 'Strong', + fn: { + wiki: function() { this.singleTag('*') } + } +} + +// em +jsToolBar.prototype.elements.em = { + type: 'button', + title: 'Italic', + fn: { + wiki: function() { this.singleTag("_") } + } +} + +// ins +jsToolBar.prototype.elements.ins = { + type: 'button', + title: 'Underline', + fn: { + wiki: function() { this.singleTag('+') } + } +} + +// del +jsToolBar.prototype.elements.del = { + type: 'button', + title: 'Deleted', + fn: { + wiki: function() { this.singleTag('-') } + } +} + +// quote +jsToolBar.prototype.elements.quote = { + type: 'button', + title: 'Inline quote', + fn: { + wiki: function() { this.singleTag('??') } + } +} + +// code +jsToolBar.prototype.elements.code = { + type: 'button', + title: 'Code', + fn: { + wiki: function() { this.singleTag('@') } + } +} + +// spacer +jsToolBar.prototype.elements.space1 = {type: 'space'} + +// headings +jsToolBar.prototype.elements.h1 = { + type: 'button', + title: 'Heading 1', + fn: { + wiki: function() { + this.encloseLineSelection('h1. ', '',function(str) { + str = str.replace(/^h\d+\.\s+/, '') + return str; + }); + } + } +} +jsToolBar.prototype.elements.h2 = { + type: 'button', + title: 'Heading 2', + fn: { + wiki: function() { + this.encloseLineSelection('h2. ', '',function(str) { + str = str.replace(/^h\d+\.\s+/, '') + return str; + }); + } + } +} +jsToolBar.prototype.elements.h3 = { + type: 'button', + title: 'Heading 3', + fn: { + wiki: function() { + this.encloseLineSelection('h3. ', '',function(str) { + str = str.replace(/^h\d+\.\s+/, '') + return str; + }); + } + } +} + +// spacer +jsToolBar.prototype.elements.space2 = {type: 'space'} + +// ul +jsToolBar.prototype.elements.ul = { + type: 'button', + title: 'Unordered list', + fn: { + wiki: function() { + this.encloseLineSelection('','',function(str) { + str = str.replace(/\r/g,''); + return str.replace(/(\n|^)[#-]?\s*/g,"$1* "); + }); + } + } +} + +// ol +jsToolBar.prototype.elements.ol = { + type: 'button', + title: 'Ordered list', + fn: { + wiki: function() { + this.encloseLineSelection('','',function(str) { + str = str.replace(/\r/g,''); + return str.replace(/(\n|^)[*-]?\s*/g,"$1# "); + }); + } + } +} + +// pre +jsToolBar.prototype.elements.pre = { + type: 'button', + title: 'Preformatted text', + fn: { + wiki: function() { this.encloseLineSelection('
\n', '\n
') } + } +} + +// spacer +jsToolBar.prototype.elements.space3 = {type: 'space'} + +// wiki page +jsToolBar.prototype.elements.link = { + type: 'button', + title: 'Wiki link', + fn: { + wiki: function() { this.encloseSelection("[[", "]]") } + } +} +// image +jsToolBar.prototype.elements.img = { + type: 'button', + title: 'Image', + fn: { + wiki: function() { this.encloseSelection("!", "!") } + } +} diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-bg.js b/public/javascripts/jstoolbar/lang/jstoolbar-bg.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-bg.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-cs.js b/public/javascripts/jstoolbar/lang/jstoolbar-cs.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-cs.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-de.js b/public/javascripts/jstoolbar/lang/jstoolbar-de.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-de.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-en.js b/public/javascripts/jstoolbar/lang/jstoolbar-en.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-en.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-es.js b/public/javascripts/jstoolbar/lang/jstoolbar-es.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-es.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-fi.js b/public/javascripts/jstoolbar/lang/jstoolbar-fi.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-fi.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-fr.js b/public/javascripts/jstoolbar/lang/jstoolbar-fr.js new file mode 100644 index 000000000..402c34d29 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-fr.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Gras'; +jsToolBar.strings['Italic'] = 'Italique'; +jsToolBar.strings['Underline'] = 'Souligné'; +jsToolBar.strings['Deleted'] = 'Rayé'; +jsToolBar.strings['Inline quote'] = 'Citation'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Titre niveau 1'; +jsToolBar.strings['Heading 2'] = 'Titre niveau 2'; +jsToolBar.strings['Heading 3'] = 'Titre niveau 3'; +jsToolBar.strings['Unordered list'] = 'Liste à puces'; +jsToolBar.strings['Ordered list'] = 'Liste numérotée'; +jsToolBar.strings['Preformatted text'] = 'Texte préformaté'; +jsToolBar.strings['Wiki link'] = 'Lien vers une page Wiki'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-he.js b/public/javascripts/jstoolbar/lang/jstoolbar-he.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-he.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-it.js b/public/javascripts/jstoolbar/lang/jstoolbar-it.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-it.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-ja.js b/public/javascripts/jstoolbar/lang/jstoolbar-ja.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-ja.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-ko.js b/public/javascripts/jstoolbar/lang/jstoolbar-ko.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-ko.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-lt.js b/public/javascripts/jstoolbar/lang/jstoolbar-lt.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-lt.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-nl.js b/public/javascripts/jstoolbar/lang/jstoolbar-nl.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-nl.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-pl.js b/public/javascripts/jstoolbar/lang/jstoolbar-pl.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-pl.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-pt-br.js b/public/javascripts/jstoolbar/lang/jstoolbar-pt-br.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-pt-br.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-pt.js b/public/javascripts/jstoolbar/lang/jstoolbar-pt.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-pt.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-ro.js b/public/javascripts/jstoolbar/lang/jstoolbar-ro.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-ro.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-ru.js b/public/javascripts/jstoolbar/lang/jstoolbar-ru.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-ru.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-sr.js b/public/javascripts/jstoolbar/lang/jstoolbar-sr.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-sr.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-sv.js b/public/javascripts/jstoolbar/lang/jstoolbar-sv.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-sv.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js b/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image'; diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-zh.js b/public/javascripts/jstoolbar/lang/jstoolbar-zh.js new file mode 100644 index 000000000..72bab0be3 --- /dev/null +++ b/public/javascripts/jstoolbar/lang/jstoolbar-zh.js @@ -0,0 +1,15 @@ +jsToolBar.strings = {}; +jsToolBar.strings['Strong'] = 'Strong'; +jsToolBar.strings['Italic'] = 'Italic'; +jsToolBar.strings['Underline'] = 'Underline'; +jsToolBar.strings['Deleted'] = 'Deleted'; +jsToolBar.strings['Inline quote'] = 'Inline quote'; +jsToolBar.strings['Code'] = 'Code'; +jsToolBar.strings['Heading 1'] = 'Heading 1'; +jsToolBar.strings['Heading 2'] = 'Heading 2'; +jsToolBar.strings['Heading 3'] = 'Heading 3'; +jsToolBar.strings['Unordered list'] = 'Unordered list'; +jsToolBar.strings['Ordered list'] = 'Ordered list'; +jsToolBar.strings['Preformatted text'] = 'Preformatted text'; +jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; +jsToolBar.strings['Image'] = 'Image';