From 67a07307100e588adf68ca075c307a293b7ac177 Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 5 Mar 2013 21:28:38 +0100 Subject: [PATCH 01/28] added nodemailer to package.json - fix #1586 --- src/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/package.json b/src/package.json index 44d03d809..38085650e 100644 --- a/src/package.json +++ b/src/package.json @@ -24,6 +24,7 @@ "uglify-js" : "1.2.5", "formidable" : "1.0.9", "log4js" : "0.5.x", + "nodemailer" : "0.3.x", "jsdom-nocontextifiy" : "0.2.10", "async-stacktrace" : "0.0.2", "npm" : "1.1.x", From d8ca1b9139c95fa47e9a55220061aef7d3e29b2e Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 5 Mar 2013 21:29:44 +0100 Subject: [PATCH 02/28] Update settings.json.template --- settings.json.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json.template b/settings.json.template index ec0e6f837..40b7289f6 100644 --- a/settings.json.template +++ b/settings.json.template @@ -123,7 +123,7 @@ }*/ /* , { "type": "logLevelFilter" - , "level": "error" // filters out all log messages that have a lower level than "error" + , "level": "error" // filters out all log messages that have a lower or same level than "error" , "appender": { "type": "smtp" , "subject": "An error occured in your EPL instance!" From d464ea9817045dc742205a5c03aeff59e9d2ace3 Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 5 Mar 2013 22:36:51 +0100 Subject: [PATCH 03/28] Update settings.json.template --- settings.json.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json.template b/settings.json.template index 40b7289f6..ec0e6f837 100644 --- a/settings.json.template +++ b/settings.json.template @@ -123,7 +123,7 @@ }*/ /* , { "type": "logLevelFilter" - , "level": "error" // filters out all log messages that have a lower or same level than "error" + , "level": "error" // filters out all log messages that have a lower level than "error" , "appender": { "type": "smtp" , "subject": "An error occured in your EPL instance!" From 12107859bb2325c5ba7b7bf0efeaa76682b5edb7 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 13:41:49 -0300 Subject: [PATCH 04/28] fix tests in firefox as firefox fires on keypress not down --- tests/frontend/specs/bold.js | 2 +- tests/frontend/specs/indentation.js | 2 +- tests/frontend/specs/italic.js | 2 +- tests/frontend/specs/redo.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 2fb6bbfeb..010d69010 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,7 +44,7 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 66; // b inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 06d90aa86..6b9b432da 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,7 +15,7 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.keyCode = 9; // tab :| inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 052d2df4f..15976f295 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,7 +44,7 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 105; // i inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index c14972219..d72b5a096 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,7 +47,7 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 90; // z inner$("#innerdocbody").trigger(e); From 34c2cf40faae53ef33980378ca7f5e704b91be07 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 13:51:23 -0300 Subject: [PATCH 05/28] This isn't ideal, basically some browsers interact with keypress/keydown in different ways so this is a workaround but it's not perma --- tests/frontend/specs/bold.js | 8 +++++++- tests/frontend/specs/indentation.js | 8 +++++++- tests/frontend/specs/italic.js | 8 +++++++- tests/frontend/specs/redo.js | 8 +++++++- tests/frontend/specs/undo.js | 8 +++++++- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 010d69010..7c04835e2 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,7 +44,13 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keypress"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 66; // b inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 6b9b432da..6e5b3c1a0 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,7 +15,13 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keypress"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.keyCode = 9; // tab :| inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 15976f295..9bee72dcb 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,7 +44,13 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keypress"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 105; // i inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index d72b5a096..059e97111 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,7 +47,13 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - var e = inner$.Event("keypress"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 90; // z inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 8ba752ac5..4e9dd0d57 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -44,7 +44,13 @@ describe("undo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - var e = inner$.Event("keydown"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 90; // z inner$("#innerdocbody").trigger(e); From 6bac01009b6706c63a63a8b6f63af99fb2f8e60e Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 13:52:20 -0300 Subject: [PATCH 06/28] missed an evt --- tests/frontend/specs/redo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index 059e97111..14ec31f62 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -58,7 +58,7 @@ describe("undo button then redo button", function(){ e.which = 90; // z inner$("#innerdocbody").trigger(e); - var e = inner$.Event("keydown"); + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 121; // y inner$("#innerdocbody").trigger(e); From 1462d8e80c3a20486cee95cf10c1bc3d7724c6d1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 14:22:58 -0300 Subject: [PATCH 07/28] now IE friendly --- tests/frontend/specs/bold.js | 6 +++--- tests/frontend/specs/indentation.js | 6 +++--- tests/frontend/specs/italic.js | 6 +++--- tests/frontend/specs/redo.js | 6 +++--- tests/frontend/specs/undo.js | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 7c04835e2..0bdbbc843 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,10 +44,10 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.chrome){ - var evtType = "keypress"; - }else{ + if(!inner$.browser.firefox){ var evtType = "keydown"; + }else{ + var evtType = "keypress"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 6e5b3c1a0..81ffc78e7 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,10 +15,10 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.chrome){ - var evtType = "keypress"; - }else{ + if(!inner$.browser.firefox){ var evtType = "keydown"; + }else{ + var evtType = "keypress"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 9bee72dcb..be226d489 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,10 +44,10 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.chrome){ - var evtType = "keypress"; - }else{ + if(!inner$.browser.firefox){ var evtType = "keydown"; + }else{ + var evtType = "keypress"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index 14ec31f62..7595da599 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,10 +47,10 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(!inner$.browser.chrome){ - var evtType = "keypress"; - }else{ + if(!inner$.browser.firefox){ var evtType = "keydown"; + }else{ + var evtType = "keypress"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 4e9dd0d57..9152c884d 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -44,10 +44,10 @@ describe("undo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(!inner$.browser.chrome){ - var evtType = "keypress"; - }else{ + if(!inner$.browser.firefox){ var evtType = "keydown"; + }else{ + var evtType = "keypress"; } var e = inner$.Event(evtType); From 24188d70076eb6368b31a41466b567e7e59186f8 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 14:36:54 -0300 Subject: [PATCH 08/28] this should pass more tests.. --- tests/frontend/specs/bold.js | 7 +++---- tests/frontend/specs/indentation.js | 6 +++--- tests/frontend/specs/italic.js | 6 +++--- tests/frontend/specs/redo.js | 6 +++--- tests/frontend/specs/undo.js | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 0bdbbc843..95da7331c 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -43,11 +43,10 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 81ffc78e7..9692120ae 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,10 +15,10 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index be226d489..29dbae59c 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,10 +44,10 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index 7595da599..c2f8a95a6 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,10 +47,10 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 9152c884d..6fed22e38 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -45,9 +45,9 @@ describe("undo button", function(){ expect(modifiedValue).not.to.be(originalValue); // expect the value to change if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); From 29c0d790b51f187d6ce74fe8603013544a9217df Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 14:48:23 -0300 Subject: [PATCH 09/28] fix undo test --- tests/frontend/specs/undo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 6fed22e38..0c58c9b84 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -44,7 +44,7 @@ describe("undo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(!inner$.browser.firefox){ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; From d72abceee7556c1337e0fde1d04b24b40a554cfb Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 18:18:14 -0300 Subject: [PATCH 10/28] escape .color --- src/static/js/pad_userlist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad_userlist.js b/src/static/js/pad_userlist.js index c8f8e2c9e..77ebb190e 100644 --- a/src/static/js/pad_userlist.js +++ b/src/static/js/pad_userlist.js @@ -116,7 +116,7 @@ var paduserlist = (function() nameHtml = ''; } - return ['
 
', '', nameHtml, '', '', padutils.escapeHtml(data.activity), ''].join(''); + return ['
 
', '', nameHtml, '', '', padutils.escapeHtml(data.activity), ''].join(''); } function getRowHtml(id, innerHtml, authorId) From 1bb9d1d6259983b1bcbdfa72f17872516f55a5c4 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 18:23:27 -0300 Subject: [PATCH 11/28] remove pointless + --- src/static/js/ace2_inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index e57bb36e5..2dc6408b1 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -5125,7 +5125,7 @@ function Ace2Inner(){ function initLineNumbers() { lineNumbersShown = 1; - sideDiv.innerHTML = '' + '
1
'; + sideDiv.innerHTML = '
1
'; sideDivInner = outerWin.document.getElementById("sidedivinner"); } From 383439629a46c29578fded5db4bf9a2c07d6aa2f Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 18:27:32 -0300 Subject: [PATCH 12/28] specialkey doesnt even exist afaik --- src/static/js/pad.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 4b0526208..7cefc41e9 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -470,14 +470,6 @@ var pad = { userAgent: pad.getDisplayUserAgent() }; - if (clientVars.specialKey) - { - pad.myUserInfo.specialKey = clientVars.specialKey; - if (clientVars.specialKeyTranslation) - { - $("#specialkeyarea").html("mode: " + String(clientVars.specialKeyTranslation).toUpperCase()); - } - } padimpexp.init(this); padsavedrevs.init(this); From 5d12be940c6ed3062637be0f940a25f92702fb71 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Mar 2013 18:28:35 -0300 Subject: [PATCH 13/28] return text instead of html --- src/static/js/pad.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 7cefc41e9..60a435572 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -655,8 +655,8 @@ var pad = { { alertBar.displayMessage(function(abar) { - abar.find("#servermsgdate").html(" (" + padutils.simpleDateTime(new Date) + ")"); - abar.find("#servermsgtext").html(m.text); + abar.find("#servermsgdate").text(" (" + padutils.simpleDateTime(new Date) + ")"); + abar.find("#servermsgtext").text(m.text); }); } if (m.js) From de552df6db435717912bad3aad558d343c23d8f8 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 15 Mar 2013 18:08:51 +0100 Subject: [PATCH 14/28] Fix clearing authorship colors which was broken by #1609 Fixes #1620 --- src/node/handler/PadMessageHandler.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 35f1ab4cc..4b98292ec 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -551,10 +551,19 @@ function handleUserChanges(client, message) } }); - // Validate all 'author' attribs to be the same value as the current user - wireApool.eachAttrib(function(type, value) { - if('author' == type && value != thisSession.author) throw "Trying to submit changes as another author" - }) + // Validate all added 'author' attribs to be the same value as the current user + var iterator = Changeset.opIterator(Changeset.unpack(changeset).ops) + , op + while(iterator.hasNext()) { + op = iterator.next() + if(op.opcode != '+') continue; + op.attribs.split('*').forEach(function(attr) { + if(!attr) return + attr = wireApool.getAttrib(attr) + if(!attr) return + if('author' == attr[0] && attr[1] != thisSession.author) throw "Trying to submit changes as another author" + }) + } } catch(e) { From 54433db47f5083faa921da6050b4e4e4b55dfb20 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 15 Mar 2013 21:43:29 +0100 Subject: [PATCH 15/28] release v1.2.9 --- CHANGELOG.md | 12 ++++++++++++ src/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fac58f2a..642846a6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# 1.2.9 + * Fix: MAJOR Security issue, where a hacker could submit content as another user + * Fix: security issue due to unescaped user input + * Fix: Admin page at /admin redirects to /admin/ now to prevent breaking relative links + * Fix: indentation in chrome on linux + * Fix: PadUsers API endpoint + * NEW: A script to import data to all dbms + * NEW: Add authorId to chat and userlist as a data attribute + * NEW Refactor and fix our frontend tests + * NEW: Localisation updates + + # 1.2.81 * Fix: CtrlZ-Y for Undo Redo * Fix: RTL functionality on contents & fix RTL/LTR tests and RTL in Safari diff --git a/src/package.json b/src/package.json index 0e418edea..a7147cf2a 100644 --- a/src/package.json +++ b/src/package.json @@ -46,5 +46,5 @@ "engines" : { "node" : ">=0.6.3", "npm" : ">=1.0" }, - "version" : "1.2.81" + "version" : "1.2.9" } From f972d2a92d574648d20bd5d41c3115c3563a83d6 Mon Sep 17 00:00:00 2001 From: accolade Date: Sat, 16 Mar 2013 17:05:23 +0100 Subject: [PATCH 16/28] (( 2 typos --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a69a3b65..4e59afbfc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,8 +11,8 @@ To make sure everybody is going in the same direction: * easy to install for admins and easy to use for people * easy to integrate into other apps, but also usable as standalone * using less resources on server side -* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core -Also, keep it maintainable. We don't wanna end ob as the monster Etherpad was! +* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core. +Also, keep it maintainable. We don't wanna end up as the monster Etherpad was! ## How to work with git? * Don't work in your master branch. @@ -62,4 +62,4 @@ The docs are in the `doc/` folder in the git repository, so people can easily fi Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request. -You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet. \ No newline at end of file +You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet. From 69a4ab76cfb4de059d3c5bc34f3d803bac718899 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 16 Mar 2013 17:50:53 +0000 Subject: [PATCH 17/28] hide modal once reconnect is good --- src/static/js/pad_modals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad_modals.js b/src/static/js/pad_modals.js index 0292e048f..0013e8999 100644 --- a/src/static/js/pad_modals.js +++ b/src/static/js/pad_modals.js @@ -49,7 +49,7 @@ var padmodals = (function() }, duration); }, hideOverlay: function(duration) { - $("#overlay").animate( + $("#overlay").hide().css( { 'opacity': 0 }, duration, function() From a1d9d27cde3bee416355222ec1988debfdc3d4c2 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 16 Mar 2013 17:57:23 +0000 Subject: [PATCH 18/28] much cleaner way of showing / hiding overlay --- src/static/js/pad_connectionstatus.js | 1 - src/static/js/pad_modals.js | 16 ++-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/static/js/pad_connectionstatus.js b/src/static/js/pad_connectionstatus.js index 2d9354ab1..862d5fd13 100644 --- a/src/static/js/pad_connectionstatus.js +++ b/src/static/js/pad_connectionstatus.js @@ -76,7 +76,6 @@ var padconnectionstatus = (function() }, isFullyConnected: function() { - padmodals.hideOverlay(); return status.what == 'connected'; }, getStatus: function() diff --git a/src/static/js/pad_modals.js b/src/static/js/pad_modals.js index 0013e8999..39094a7ea 100644 --- a/src/static/js/pad_modals.js +++ b/src/static/js/pad_modals.js @@ -40,22 +40,10 @@ var padmodals = (function() }); }, showOverlay: function(duration) { - $("#overlay").show().css( - { - 'opacity': 0 - }).animate( - { - 'opacity': 1 - }, duration); + $("#overlay").show(); }, hideOverlay: function(duration) { - $("#overlay").hide().css( - { - 'opacity': 0 - }, duration, function() - { - $("#modaloverlay").hide(); - }); + $("#overlay").hide(); } }; return self; From b084cf4f28bb1fe766984dfbeb73d3505eb8951e Mon Sep 17 00:00:00 2001 From: maixithn Date: Sun, 17 Mar 2013 21:57:14 +0100 Subject: [PATCH 19/28] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91410b873..574740730 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,11 @@ Update to the latest version with `git pull origin`, then run `bin\installOnWind [Next steps](#next-steps). -## Linux +## Linux/Unix You'll need gzip, git, curl, libssl develop libraries, python and gcc. *For Debian/Ubuntu*: `apt-get install gzip git-core curl python libssl-dev pkg-config build-essential` *For Fedora/CentOS*: `yum install gzip git-core curl python openssl-devel && yum groupinstall "Development Tools"` +*For FreeBSD*: `portinstall node node, npm and git (optional)` Additionally, you'll need [node.js](http://nodejs.org) installed, Ideally the latest stable version, be careful of installing nodejs from apt. From 83ed9303dacf75f870378e91b9ca165fdc3247cc Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 18 Mar 2013 00:43:57 +0000 Subject: [PATCH 20/28] Localisation updates from http://translatewiki.net. --- src/locales/ast.json | 3 +- src/locales/be-tarask.json | 61 ++++++++++++++++++++++++++++++++++++++ src/locales/br.json | 1 + src/locales/ca.json | 1 + src/locales/da.json | 12 ++++---- src/locales/de.json | 1 + src/locales/fa.json | 2 +- src/locales/fr.json | 3 +- src/locales/gl.json | 3 +- src/locales/he.json | 3 +- src/locales/ia.json | 1 + src/locales/it.json | 3 +- src/locales/ja.json | 1 + src/locales/ko.json | 3 +- src/locales/mk.json | 3 +- src/locales/ms.json | 3 +- src/locales/nl.json | 1 + src/locales/ru.json | 3 +- src/locales/sl.json | 3 +- src/locales/sv.json | 3 +- src/locales/te.json | 2 +- src/locales/zh-hant.json | 1 + 22 files changed, 99 insertions(+), 18 deletions(-) create mode 100644 src/locales/be-tarask.json diff --git a/src/locales/ast.json b/src/locales/ast.json index 7beb706ad..7d471860f 100644 --- a/src/locales/ast.json +++ b/src/locales/ast.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "Llimpiar los colores d'autor\u00eda", "pad.toolbar.import_export.title": "Importar\/Esportar ente distintos formatos de ficheru", "pad.toolbar.timeslider.title": "Eslizador de tiempu", - "pad.toolbar.savedRevision.title": "Revisiones guardaes", + "pad.toolbar.savedRevision.title": "Guardar revisi\u00f3n", "pad.toolbar.settings.title": "Configuraci\u00f3n", "pad.toolbar.embed.title": "Incrustar esti bloc", "pad.toolbar.showusers.title": "Amosar los usuarios d'esti bloc", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Alderique en pantalla siempres", "pad.settings.colorcheck": "Colores d'autor\u00eda", "pad.settings.linenocheck": "N\u00famberos de llinia", + "pad.settings.rtlcheck": "\u00bfLleer el conten\u00edu de drecha a izquierda?", "pad.settings.fontType": "Tipograf\u00eda:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monoespaciada", diff --git a/src/locales/be-tarask.json b/src/locales/be-tarask.json new file mode 100644 index 000000000..dda412895 --- /dev/null +++ b/src/locales/be-tarask.json @@ -0,0 +1,61 @@ +{ + "index.newPad": "\u0421\u0442\u0432\u0430\u0440\u044b\u0446\u044c", + "index.createOpenPad": "\u0446\u0456 \u0442\u0432\u0430\u0440\u044b\u0446\u044c\/\u0430\u0434\u043a\u0440\u044b\u0446\u044c \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442 \u0437 \u043d\u0430\u0437\u0432\u0430\u0439:", + "pad.toolbar.bold.title": "\u0422\u043e\u045e\u0441\u0442\u044b (Ctrl-B)", + "pad.toolbar.italic.title": "\u041a\u0443\u0440\u0441\u0456\u045e (Ctrl-I)", + "pad.toolbar.underline.title": "\u041f\u0430\u0434\u043a\u0440\u044d\u0441\u044c\u043b\u0456\u0432\u0430\u043d\u044c\u043d\u0435 (Ctrl-U)", + "pad.toolbar.strikethrough.title": "\u0417\u0430\u043a\u0440\u044d\u0441\u044c\u043b\u0456\u0432\u0430\u043d\u044c\u043d\u0435", + "pad.toolbar.ol.title": "\u0423\u043f\u0430\u0440\u0430\u0434\u043a\u0430\u0432\u0430\u043d\u044b \u0441\u044c\u043f\u0456\u0441", + "pad.toolbar.ul.title": "\u041d\u0435\u045e\u043f\u0430\u0440\u0430\u0434\u043a\u0430\u0432\u0430\u043d\u044b \u0441\u044c\u043f\u0456\u0441", + "pad.toolbar.indent.title": "\u0412\u043e\u0434\u0441\u0442\u0443\u043f", + "pad.toolbar.unindent.title": "\u0412\u044b\u0441\u0442\u0443\u043f", + "pad.toolbar.undo.title": "\u0421\u043a\u0430\u0441\u0430\u0432\u0430\u0446\u044c(Ctrl-Z)", + "pad.toolbar.redo.title": "\u0412\u044f\u0440\u043d\u0443\u0446\u044c (Ctrl-Y)", + "pad.toolbar.clearAuthorship.title": "\u041f\u0440\u044b\u0431\u0440\u0430\u0446\u044c \u043a\u043e\u043b\u0435\u0440 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0443", + "pad.toolbar.import_export.title": "\u0406\u043c\u043f\u0430\u0440\u0442\/\u042d\u043a\u0441\u043f\u0430\u0440\u0442 \u0437 \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u0430\u043d\u044c\u043d\u0435 \u0440\u043e\u0437\u043d\u044b\u0445 \u0444\u0430\u0440\u043c\u0430\u0442\u0430\u045e \u0444\u0430\u0439\u043b\u0430\u045e", + "pad.toolbar.timeslider.title": "\u0428\u043a\u0430\u043b\u0430 \u0447\u0430\u0441\u0443", + "pad.toolbar.savedRevision.title": "\u0417\u0430\u0445\u0430\u0432\u0430\u0446\u044c \u0432\u044d\u0440\u0441\u0456\u044e", + "pad.toolbar.settings.title": "\u041d\u0430\u043b\u0430\u0434\u044b", + "pad.toolbar.embed.title": "\u0423\u0431\u0443\u0434\u0430\u0432\u0430\u0446\u044c \u0433\u044d\u0442\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442", + "pad.toolbar.showusers.title": "\u041f\u0430\u043a\u0430\u0437\u0430\u0446\u044c \u043a\u0430\u0440\u044b\u0441\u0442\u0430\u043b\u044c\u043d\u0456\u043a\u0430\u045e \u0443 \u0433\u044d\u0442\u044b\u043c \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0446\u0435", + "pad.colorpicker.save": "\u0417\u0430\u0445\u0430\u0432\u0430\u0446\u044c", + "pad.colorpicker.cancel": "\u0421\u043a\u0430\u0441\u0430\u0432\u0430\u0446\u044c", + "pad.loading": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...", + "pad.passwordRequired": "\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0434\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430 \u043f\u0430\u0442\u0440\u044d\u0431\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044c", + "pad.permissionDenied": "\u0412\u044b \u043d\u044f \u043c\u0430\u0435\u0446\u0435 \u0434\u0430\u0437\u0432\u043e\u043b\u0443 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430", + "pad.wrongPassword": "\u0412\u044b \u045e\u0432\u044f\u043b\u0456 \u043d\u044f\u0441\u043b\u0443\u0448\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044c", + "pad.settings.padSettings": "\u041d\u0430\u043b\u0430\u0434\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430", + "pad.settings.myView": "\u041c\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434", + "pad.settings.stickychat": "\u0417\u0430\u045e\u0441\u0451\u0434\u044b \u043f\u0430\u043a\u0430\u0437\u0432\u0430\u0446\u044c \u0447\u0430\u0442", + "pad.settings.colorcheck": "\u041a\u043e\u043b\u0435\u0440\u044b \u0430\u045e\u0442\u0430\u0440\u0441\u0442\u0432\u0430", + "pad.settings.linenocheck": "\u041d\u0443\u043c\u0430\u0440\u044b \u0440\u0430\u0434\u043a\u043e\u045e", + "pad.settings.rtlcheck": "\u0422\u044d\u043a\u0441\u0442 \u0441\u043f\u0440\u0430\u0432\u0430-\u043d\u0430\u043b\u0435\u0432\u0430", + "pad.settings.fontType": "\u0422\u044b\u043f \u0448\u0440\u044b\u0444\u0442\u0443:", + "pad.settings.fontType.normal": "\u0417\u0432\u044b\u0447\u0430\u0439\u043d\u044b", + "pad.settings.fontType.monospaced": "\u041c\u043e\u043d\u0430\u0448\u044b\u0440\u044b\u043d\u043d\u044b", + "pad.settings.globalView": "\u0410\u0433\u0443\u043b\u044c\u043d\u044b \u0432\u044b\u0433\u043b\u044f\u0434", + "pad.settings.language": "\u041c\u043e\u0432\u0430:", + "pad.importExport.import_export": "\u0406\u043c\u043f\u0430\u0440\u0442\/\u042d\u043a\u0441\u043f\u0430\u0440\u0442", + "pad.importExport.import": "\u0417\u0430\u0433\u0440\u0443\u0437\u0456\u0436\u0430\u0439\u0446\u0435 \u043b\u044e\u0431\u044b\u044f \u0442\u044d\u043a\u0441\u0442\u0430\u0432\u044b\u044f \u0444\u0430\u0439\u043b\u044b \u0430\u0431\u043e \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u044b", + "pad.importExport.importSuccessful": "\u041f\u0430\u0441\u044c\u043f\u044f\u0445\u043e\u0432\u0430!", + "pad.importExport.export": "\u042d\u043a\u0441\u043f\u0430\u0440\u0442\u0430\u0432\u0430\u0446\u044c \u0431\u044f\u0433\u0443\u0447\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442 \u044f\u043a:", + "pad.importExport.exporthtml": "HTML", + "pad.importExport.exportplain": "\u041f\u0440\u043e\u0441\u0442\u044b \u0442\u044d\u043a\u0441\u0442", + "pad.importExport.exportword": "Microsoft Word", + "pad.importExport.exportpdf": "PDF", + "pad.importExport.exportopen": "ODF (Open Document Format)", + "pad.importExport.exportdokuwiki": "DokuWiki", + "pad.modals.connected": "\u041f\u0430\u0434\u043b\u0443\u0447\u044b\u043b\u0456\u0441\u044f.", + "pad.modals.reconnecting": "\u041f\u0435\u0440\u0430\u043f\u0430\u0434\u043b\u0443\u0447\u044d\u043d\u044c\u043d\u0435 \u0434\u0430 \u0432\u0430\u0448\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430...", + "pad.modals.forcereconnect": "\u041f\u0440\u044b\u043c\u0443\u0441\u043e\u0432\u0430\u0435 \u043f\u0435\u0440\u0430\u043f\u0430\u0434\u043b\u0443\u0447\u044d\u043d\u044c\u043d\u0435", + "pad.share": "\u041f\u0430\u0434\u0437\u044f\u043b\u0456\u0446\u0446\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430\u043c", + "pad.share.readonly": "\u0422\u043e\u043b\u044c\u043a\u0456 \u0434\u043b\u044f \u0447\u044b\u0442\u0430\u043d\u044c\u043d\u044f", + "pad.share.link": "\u0421\u043f\u0430\u0441\u044b\u043b\u043a\u0430", + "pad.chat": "\u0427\u0430\u0442", + "@metadata": { + "authors": [ + "Jim-by", + "Wizardist" + ] + } +} \ No newline at end of file diff --git a/src/locales/br.json b/src/locales/br.json index 1197f0d65..f844eb054 100644 --- a/src/locales/br.json +++ b/src/locales/br.json @@ -37,6 +37,7 @@ "pad.settings.stickychat": "Diskwel ar flap bepred", "pad.settings.colorcheck": "Livio\u00f9 anaout", "pad.settings.linenocheck": "Niverenno\u00f9 linenno\u00f9", + "pad.settings.rtlcheck": "Lenn an danvez a-zehou da gleiz ?", "pad.settings.fontType": "Seurt font :", "pad.settings.fontType.normal": "Reizh", "pad.settings.fontType.monospaced": "Monospas", diff --git a/src/locales/ca.json b/src/locales/ca.json index ec521ecac..e736fd3c1 100644 --- a/src/locales/ca.json +++ b/src/locales/ca.json @@ -28,6 +28,7 @@ "pad.settings.stickychat": "Xateja sempre a la pantalla", "pad.settings.colorcheck": "Colors d'autoria", "pad.settings.linenocheck": "N\u00fameros de l\u00ednia", + "pad.settings.rtlcheck": "Llegir el contingut de dreta a esquerra?", "pad.settings.fontType": "Tipus de lletra:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "D'amplada fixa", diff --git a/src/locales/da.json b/src/locales/da.json index e7cde1f55..b0aef7139 100644 --- a/src/locales/da.json +++ b/src/locales/da.json @@ -1,9 +1,10 @@ { "@metadata": { - "authors": [ - "Christian List", - "Peter Alberti" - ] + "authors": { + "0": "Christian List", + "1": "Peter Alberti", + "3": "Steenth" + } }, "index.newPad": "Ny Pad", "index.createOpenPad": "eller opret\/\u00e5bn en Pad med navnet:", @@ -20,7 +21,7 @@ "pad.toolbar.clearAuthorship.title": "Fjern farver for forfatterskab", "pad.toolbar.import_export.title": "Import\/eksport fra\/til forskellige filformater", "pad.toolbar.timeslider.title": "Timeslider", - "pad.toolbar.savedRevision.title": "Gemte revisioner", + "pad.toolbar.savedRevision.title": "Gem Revision", "pad.toolbar.settings.title": "Indstillinger", "pad.toolbar.embed.title": "Integrer denne pad", "pad.toolbar.showusers.title": "Vis brugere p\u00e5 denne pad", @@ -35,6 +36,7 @@ "pad.settings.stickychat": "Chat altid p\u00e5 sk\u00e6rmen", "pad.settings.colorcheck": "Forfatterskabsfarver", "pad.settings.linenocheck": "Linjenumre", + "pad.settings.rtlcheck": "L\u00e6se indhold fra h\u00f8jre mod venstre?", "pad.settings.fontType": "Skrifttype:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Fastbredde", diff --git a/src/locales/de.json b/src/locales/de.json index 209384222..fdd016753 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -37,6 +37,7 @@ "pad.settings.stickychat": "Chat immer anzeigen", "pad.settings.colorcheck": "Autorenfarben anzeigen", "pad.settings.linenocheck": "Zeilennummern", + "pad.settings.rtlcheck": "Inhalt von rechts nach links lesen?", "pad.settings.fontType": "Schriftart:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monospace", diff --git a/src/locales/fa.json b/src/locales/fa.json index bccc353c2..8e0fd1388 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -21,7 +21,7 @@ "pad.toolbar.clearAuthorship.title": "\u067e\u0627\u06a9 \u06a9\u0631\u062f\u0646 \u0631\u0646\u06af\u200c\u0647\u0627\u06cc \u0646\u0648\u06cc\u0633\u0646\u062f\u06af\u06cc", "pad.toolbar.import_export.title": "\u062f\u0631\u0648\u0646\u200c\u0631\u06cc\u0632\u06cc\/\u0628\u0631\u0648\u0646\u200c\u0631\u06cc\u0632\u06cc \u0627\u0632\/\u0628\u0647 \u0642\u0627\u0644\u0628\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641", "pad.toolbar.timeslider.title": "\u0627\u0633\u0644\u0627\u06cc\u062f\u0631 \u0632\u0645\u0627\u0646", - "pad.toolbar.savedRevision.title": "\u0630\u062e\u06cc\u0631\u0647\u200c\u0633\u0627\u0632\u06cc \u0646\u0633\u062e\u0647", + "pad.toolbar.savedRevision.title": "\u0630\u062e\u06cc\u0631\u0647\u200c\u06cc \u0628\u0627\u0632\u0646\u0648\u06cc\u0633\u06cc", "pad.toolbar.settings.title": "\u062a\u0646\u0638\u06cc\u0645\u0627\u062a", "pad.toolbar.embed.title": "\u062c\u0627\u0633\u0627\u0632\u06cc \u0627\u06cc\u0646 \u062f\u0641\u062a\u0631\u0686\u0647 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a", "pad.toolbar.showusers.title": "\u0646\u0645\u0627\u06cc\u0634 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u062f\u0641\u062a\u0631\u0686\u0647 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a", diff --git a/src/locales/fr.json b/src/locales/fr.json index 4131c723a..6e1e79b44 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -28,7 +28,7 @@ "pad.toolbar.clearAuthorship.title": "Effacer les couleurs identifiant les auteurs", "pad.toolbar.import_export.title": "Importer\/Exporter de\/vers un format de fichier diff\u00e9rent", "pad.toolbar.timeslider.title": "Historique dynamique", - "pad.toolbar.savedRevision.title": "Versions enregistr\u00e9es", + "pad.toolbar.savedRevision.title": "Enregistrer la r\u00e9vision", "pad.toolbar.settings.title": "Param\u00e8tres", "pad.toolbar.embed.title": "Int\u00e9grer ce Pad", "pad.toolbar.showusers.title": "Afficher les utilisateurs du Pad", @@ -43,6 +43,7 @@ "pad.settings.stickychat": "Toujours afficher le chat", "pad.settings.colorcheck": "Couleurs d\u2019identification", "pad.settings.linenocheck": "Num\u00e9ros de lignes", + "pad.settings.rtlcheck": "Lire le contenu de la droite vers la gauche?", "pad.settings.fontType": "Type de police :", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monospace", diff --git a/src/locales/gl.json b/src/locales/gl.json index 261d28ef7..6b9c2b549 100644 --- a/src/locales/gl.json +++ b/src/locales/gl.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "Limpar as cores de identificaci\u00f3n dos autores", "pad.toolbar.import_export.title": "Importar\/Exportar desde\/a diferentes formatos de ficheiro", "pad.toolbar.timeslider.title": "Li\u00f1a do tempo", - "pad.toolbar.savedRevision.title": "Revisi\u00f3ns gardadas", + "pad.toolbar.savedRevision.title": "Gardar a revisi\u00f3n", "pad.toolbar.settings.title": "Configuraci\u00f3ns", "pad.toolbar.embed.title": "Incorporar este documento", "pad.toolbar.showusers.title": "Mostrar os usuarios deste documento", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Chat sempre visible", "pad.settings.colorcheck": "Cores de identificaci\u00f3n", "pad.settings.linenocheck": "N\u00fameros de li\u00f1a", + "pad.settings.rtlcheck": "Quere ler o contido da dereita \u00e1 esquerda?", "pad.settings.fontType": "Tipo de letra:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monoespazada", diff --git a/src/locales/he.json b/src/locales/he.json index 7e5f3b048..77e68e63d 100644 --- a/src/locales/he.json +++ b/src/locales/he.json @@ -20,7 +20,7 @@ "pad.toolbar.clearAuthorship.title": "\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e6\u05d1\u05e2\u05d9\u05dd", "pad.toolbar.import_export.title": "\u05d9\u05d9\u05d1\u05d5\u05d0\/\u05d9\u05d9\u05e6\u05d0 \u05d1\u05ea\u05e1\u05d3\u05d9\u05e8\u05d9 \u05e7\u05d1\u05e6\u05d9\u05dd \u05e9\u05d5\u05e0\u05d9\u05dd", "pad.toolbar.timeslider.title": "\u05d2\u05d5\u05dc\u05dc \u05d6\u05de\u05df", - "pad.toolbar.savedRevision.title": "\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05de\u05d5\u05e8\u05d5\u05ea", + "pad.toolbar.savedRevision.title": "\u05e9\u05de\u05d9\u05e8\u05ea \u05d2\u05e8\u05e1\u05d4", "pad.toolbar.settings.title": "\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea", "pad.toolbar.embed.title": "\u05d4\u05d8\u05de\u05e2\u05ea \u05d4\u05e4\u05e0\u05e7\u05e1 \u05d4\u05d6\u05d4", "pad.toolbar.showusers.title": "\u05d4\u05e6\u05d2\u05ea \u05d4\u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05e4\u05e0\u05e7\u05e1 \u05d4\u05d6\u05d4", @@ -35,6 +35,7 @@ "pad.settings.stickychat": "\u05d4\u05e9\u05d9\u05d7\u05d4 \u05ea\u05de\u05d9\u05d3 \u05e2\u05dc \u05d4\u05de\u05e1\u05da", "pad.settings.colorcheck": "\u05e6\u05d1\u05d9\u05e2\u05d4 \u05dc\u05e4\u05d9 \u05de\u05d7\u05d1\u05e8", "pad.settings.linenocheck": "\u05de\u05e1\u05e4\u05e8\u05d9 \u05e9\u05d5\u05e8\u05d5\u05ea", + "pad.settings.rtlcheck": "\u05dc\u05e7\u05e8\u05d5\u05d0 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05df \u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc?", "pad.settings.fontType": "\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df:", "pad.settings.fontType.normal": "\u05e8\u05d2\u05d9\u05dc", "pad.settings.fontType.monospaced": "\u05d1\u05e8\u05d5\u05d7\u05d1 \u05e7\u05d1\u05d5\u05e2", diff --git a/src/locales/ia.json b/src/locales/ia.json index e6c5dde11..3c57a8f03 100644 --- a/src/locales/ia.json +++ b/src/locales/ia.json @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Chat sempre visibile", "pad.settings.colorcheck": "Colores de autor", "pad.settings.linenocheck": "Numeros de linea", + "pad.settings.rtlcheck": "Leger le contento de dextra a sinistra?", "pad.settings.fontType": "Typo de litteras:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monospatial", diff --git a/src/locales/it.json b/src/locales/it.json index 05569a322..c80b2a390 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -22,7 +22,7 @@ "pad.toolbar.clearAuthorship.title": "Elimina i colori che indicano gli autori", "pad.toolbar.import_export.title": "Importa\/esporta da\/a diversi formati di file", "pad.toolbar.timeslider.title": "Presentazione cronologia", - "pad.toolbar.savedRevision.title": "Revisioni salvate", + "pad.toolbar.savedRevision.title": "Versione salvata", "pad.toolbar.settings.title": "Impostazioni", "pad.toolbar.embed.title": "Incorpora questo Pad", "pad.toolbar.showusers.title": "Visualizza gli utenti su questo Pad", @@ -37,6 +37,7 @@ "pad.settings.stickychat": "Chat sempre sullo schermo", "pad.settings.colorcheck": "Colori che indicano gli autori", "pad.settings.linenocheck": "Numeri di riga", + "pad.settings.rtlcheck": "Leggere il contenuto da destra a sinistra?", "pad.settings.fontType": "Tipo di carattere:", "pad.settings.fontType.normal": "Normale", "pad.settings.fontType.monospaced": "A larghezza fissa", diff --git a/src/locales/ja.json b/src/locales/ja.json index f7173dd4f..2464f02ce 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -34,6 +34,7 @@ "pad.settings.stickychat": "\u753b\u9762\u306b\u30c1\u30e3\u30c3\u30c8\u3092\u5e38\u306b\u8868\u793a", "pad.settings.colorcheck": "\u4f5c\u8005\u306e\u8272\u5206\u3051", "pad.settings.linenocheck": "\u884c\u756a\u53f7", + "pad.settings.rtlcheck": "\u53f3\u6a2a\u66f8\u304d\u306b\u3059\u308b", "pad.settings.fontType": "\u30d5\u30a9\u30f3\u30c8\u306e\u7a2e\u985e:", "pad.settings.fontType.normal": "\u901a\u5e38", "pad.settings.fontType.monospaced": "\u56fa\u5b9a\u5e45", diff --git a/src/locales/ko.json b/src/locales/ko.json index ccd7705ce..ac12f0b41 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "\uc800\uc790\uc758 \uc0c9 \uc9c0\uc6b0\uae30", "pad.toolbar.import_export.title": "\ub2e4\ub978 \ud30c\uc77c \ud615\uc2dd\uc73c\ub85c \uac00\uc838\uc624\uae30\/\ub0b4\ubcf4\ub0b4\uae30", "pad.toolbar.timeslider.title": "\uc2dc\uac04\uc2ac\ub77c\uc774\ub354", - "pad.toolbar.savedRevision.title": "\uc800\uc7a5\ud55c \ud310", + "pad.toolbar.savedRevision.title": "\ud310 \uc800\uc7a5", "pad.toolbar.settings.title": "\uc124\uc815", "pad.toolbar.embed.title": "\uc774 \ud328\ub4dc \ud3ec\ud568\ud558\uae30", "pad.toolbar.showusers.title": "\uc774 \ud328\ub4dc\uc5d0 \uc0ac\uc6a9\uc790 \ubcf4\uae30", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "\ud654\uba74\uc5d0 \ud56d\uc0c1 \ub300\ud654 \ubcf4\uae30", "pad.settings.colorcheck": "\uc800\uc790 \uc0c9", "pad.settings.linenocheck": "\uc904 \ubc88\ud638", + "pad.settings.rtlcheck": "\uc6b0\ud6a1\uc11c(\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd\uc73c\ub85c)\uc785\ub2c8\uae4c?", "pad.settings.fontType": "\uae00\uaf34 \uc885\ub958:", "pad.settings.fontType.normal": "\ubcf4\ud1b5", "pad.settings.fontType.monospaced": "\uace0\uc815 \ud3ed", diff --git a/src/locales/mk.json b/src/locales/mk.json index 94d73bd85..1ba1fb70f 100644 --- a/src/locales/mk.json +++ b/src/locales/mk.json @@ -20,7 +20,7 @@ "pad.toolbar.clearAuthorship.title": "\u041f\u043e\u043d\u0438\u0448\u0442\u0438 \u0433\u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0442\u0435 \u0431\u043e\u0438", "pad.toolbar.import_export.title": "\u0423\u0432\u043e\u0437\/\u0418\u0437\u0432\u043e\u0437 \u043e\u0434\/\u0432\u043e \u0440\u0430\u0437\u043d\u0438 \u043f\u043e\u0434\u0430\u0442\u043e\u0442\u0435\u0447\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438", "pad.toolbar.timeslider.title": "\u0418\u0441\u0442\u043e\u0440\u0438\u0441\u043a\u0438 \u043f\u0440\u0435\u0433\u043b\u0435\u0434", - "pad.toolbar.savedRevision.title": "\u0417\u0430\u0447\u0443\u0432\u0430\u043d\u0438 \u0440\u0435\u0432\u0438\u0437\u0438\u0438", + "pad.toolbar.savedRevision.title": "\u0417\u0430\u0447\u0443\u0432\u0430\u0458 \u0440\u0435\u0432\u0438\u0437\u0438\u0458\u0430", "pad.toolbar.settings.title": "\u041f\u043e\u0441\u0442\u0430\u0432\u043a\u0438", "pad.toolbar.embed.title": "\u0412\u043c\u0435\u0442\u043d\u0438 \u0458\u0430 \u0442\u0435\u0442\u0440\u0430\u0442\u043a\u0430\u0432\u0430", "pad.toolbar.showusers.title": "\u041f\u0440\u0438\u043a\u0430\u0436. \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438\u0442\u0435 \u043d\u0430 \u0442\u0435\u0442\u0440\u0430\u0442\u043a\u0430\u0432\u0430", @@ -35,6 +35,7 @@ "pad.settings.stickychat": "\u0420\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435 \u0441\u0435\u043a\u043e\u0433\u0430\u0448 \u043d\u0430 \u0435\u043a\u0440\u0430\u043d\u043e\u0442", "pad.settings.colorcheck": "\u0410\u0432\u0442\u043e\u0440\u0441\u043a\u0438 \u0431\u043e\u0438", "pad.settings.linenocheck": "\u0411\u0440\u043e\u0435\u0432\u0438 \u043d\u0430 \u0440\u0435\u0434\u043e\u0432\u0438\u0442\u0435", + "pad.settings.rtlcheck": "\u0421\u043e\u0434\u0440\u0436\u0438\u043d\u0438\u0442\u0435 \u0434\u0430 \u0441\u0435 \u0447\u0438\u0442\u0430\u0430\u0442 \u043e\u0434 \u0434\u0435\u0441\u043d\u043e \u043d\u0430 \u043b\u0435\u0432\u043e?", "pad.settings.fontType": "\u0422\u0438\u043f \u043d\u0430 \u0444\u043e\u043d\u0442:", "pad.settings.fontType.normal": "\u041d\u043e\u0440\u043c\u0430\u043b\u0435\u043d", "pad.settings.fontType.monospaced": "\u041d\u0435\u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d", diff --git a/src/locales/ms.json b/src/locales/ms.json index 04055d26e..732a7759e 100644 --- a/src/locales/ms.json +++ b/src/locales/ms.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "Padamkan Warna Pengarang", "pad.toolbar.import_export.title": "Import\/Eksport dari\/ke format-format fail berbeza", "pad.toolbar.timeslider.title": "Gelangsar masa", - "pad.toolbar.savedRevision.title": "Semakan Tersimpan", + "pad.toolbar.savedRevision.title": "Simpan Semakan", "pad.toolbar.settings.title": "Tetapan", "pad.toolbar.embed.title": "Benamkan pad ini", "pad.toolbar.showusers.title": "Tunjukkan pengguna pada pad ini", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Sentiasa bersembang pada skrin", "pad.settings.colorcheck": "Warna pengarang", "pad.settings.linenocheck": "Nombor baris", + "pad.settings.rtlcheck": "Membaca dari kanan ke kiri?", "pad.settings.fontType": "Jenis fon:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Monospace", diff --git a/src/locales/nl.json b/src/locales/nl.json index 4142cc339..3f4a0cab6 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Chat altijd zichtbaar", "pad.settings.colorcheck": "Kleuren auteurs", "pad.settings.linenocheck": "Regelnummers", + "pad.settings.rtlcheck": "Inhoud van rechts naar links lezen?", "pad.settings.fontType": "Lettertype:", "pad.settings.fontType.normal": "Normaal", "pad.settings.fontType.monospaced": "Monospace", diff --git a/src/locales/ru.json b/src/locales/ru.json index 4e4c40506..8cd82a5f6 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -22,7 +22,7 @@ "pad.toolbar.clearAuthorship.title": "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430", "pad.toolbar.import_export.title": "\u0418\u043c\u043f\u043e\u0440\u0442\/\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432", "pad.toolbar.timeslider.title": "\u0428\u043a\u0430\u043b\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438", - "pad.toolbar.savedRevision.title": "\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438", + "pad.toolbar.savedRevision.title": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e", "pad.toolbar.settings.title": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", "pad.toolbar.embed.title": "\u0412\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442", "pad.toolbar.showusers.title": "\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435", @@ -37,6 +37,7 @@ "pad.settings.stickychat": "\u0412\u0441\u0435\u0433\u0434\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0447\u0430\u0442", "pad.settings.colorcheck": "\u0426\u0432\u0435\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430", "pad.settings.linenocheck": "\u041d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a", + "pad.settings.rtlcheck": "\u0427\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e?", "pad.settings.fontType": "\u0422\u0438\u043f \u0448\u0440\u0438\u0444\u0442\u0430:", "pad.settings.fontType.normal": "\u041e\u0431\u044b\u0447\u043d\u044b\u0439", "pad.settings.fontType.monospaced": "\u041c\u043e\u043d\u043e\u0448\u0438\u0440\u0438\u043d\u043d\u044b\u0439", diff --git a/src/locales/sl.json b/src/locales/sl.json index edfa68c00..98cd92b67 100644 --- a/src/locales/sl.json +++ b/src/locales/sl.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "Po\u010disti barvo avtorstva", "pad.toolbar.import_export.title": "Izvozi\/Uvozi razli\u010dne oblike zapisov", "pad.toolbar.timeslider.title": "Drsnik zgodovine", - "pad.toolbar.savedRevision.title": "Shranjene predelave", + "pad.toolbar.savedRevision.title": "Shrani predelavo", "pad.toolbar.settings.title": "Nastavitve", "pad.toolbar.embed.title": "Vstavi dokument", "pad.toolbar.showusers.title": "Poka\u017ei uporabnike dokumenta", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Vsebina klepeta je vedno na zaslonu.", "pad.settings.colorcheck": "Barve avtorstva", "pad.settings.linenocheck": "\u0160tevilke vrstic", + "pad.settings.rtlcheck": "Ali naj se vsebina prebira od desne proti levi?", "pad.settings.fontType": "Vrsta pisave:", "pad.settings.fontType.normal": "Obi\u010dajno", "pad.settings.fontType.monospaced": "Monospace", diff --git a/src/locales/sv.json b/src/locales/sv.json index 8c6c2d86e..5e37d02a8 100644 --- a/src/locales/sv.json +++ b/src/locales/sv.json @@ -19,7 +19,7 @@ "pad.toolbar.clearAuthorship.title": "Rensa f\u00f6rfattarf\u00e4rger", "pad.toolbar.import_export.title": "Importera\/exportera fr\u00e5n\/till olika filformat", "pad.toolbar.timeslider.title": "Tidsreglage", - "pad.toolbar.savedRevision.title": "Sparade revisioner", + "pad.toolbar.savedRevision.title": "Spara revision", "pad.toolbar.settings.title": "Inst\u00e4llningar", "pad.toolbar.embed.title": "B\u00e4dda in detta block", "pad.toolbar.showusers.title": "Visa anv\u00e4ndarna p\u00e5 detta block", @@ -34,6 +34,7 @@ "pad.settings.stickychat": "Chatten alltid p\u00e5 sk\u00e4rmen", "pad.settings.colorcheck": "F\u00f6rfattarskapsf\u00e4rger", "pad.settings.linenocheck": "Radnummer", + "pad.settings.rtlcheck": "Vill du l\u00e4sa inneh\u00e5llet fr\u00e5n h\u00f6ger till v\u00e4nster?", "pad.settings.fontType": "Typsnitt:", "pad.settings.fontType.normal": "Normal", "pad.settings.fontType.monospaced": "Fast breddsteg", diff --git a/src/locales/te.json b/src/locales/te.json index 955b263ab..898b40fd1 100644 --- a/src/locales/te.json +++ b/src/locales/te.json @@ -26,7 +26,7 @@ "pad.colorpicker.save": "\u0c2d\u0c26\u0c4d\u0c30\u0c2a\u0c30\u0c1a\u0c41", "pad.colorpicker.cancel": "\u0c30\u0c26\u0c4d\u0c26\u0c41\u0c1a\u0c47\u0c2f\u0c3f", "pad.loading": "\u0c32\u0c4b\u0c21\u0c35\u0c41\u0c24\u0c4b\u0c02\u0c26\u0c3f...", - "pad.wrongPassword": "\u0c2e\u0c40 \u0c30\u0c39\u0c38\u0c4d\u0c2f\u0c2a\u0c26\u0c02 \u0c24\u0c2a\u0c41", + "pad.wrongPassword": "\u0c2e\u0c40 \u0c38\u0c02\u0c15\u0c47\u0c24\u0c2a\u0c26\u0c02 \u0c24\u0c2a\u0c4d\u0c2a\u0c41", "pad.settings.padSettings": "\u0c2a\u0c32\u0c15 \u0c05\u0c2e\u0c30\u0c3f\u0c15\u0c32\u0c41", "pad.settings.myView": "\u0c28\u0c3e \u0c09\u0c26\u0c4d\u0c26\u0c47\u0c36\u0c4d\u0c2f\u0c2e\u0c41", "pad.settings.stickychat": "\u0c24\u0c46\u0c30\u0c2a\u0c48\u0c28\u0c47 \u0c2e\u0c3e\u0c1f\u0c3e\u0c2e\u0c02\u0c24\u0c3f\u0c28\u0c3f \u0c0e\u0c32\u0c4d\u0c32\u0c2a\u0c41\u0c21\u0c41 \u0c1a\u0c47\u0c2f\u0c41\u0c2e\u0c41", diff --git a/src/locales/zh-hant.json b/src/locales/zh-hant.json index efe4da617..7b5c725cd 100644 --- a/src/locales/zh-hant.json +++ b/src/locales/zh-hant.json @@ -35,6 +35,7 @@ "pad.settings.stickychat": "\u6c38\u9060\u5728\u5c4f\u5e55\u4e0a\u986f\u793a\u804a\u5929", "pad.settings.colorcheck": "\u4f5c\u8005\u984f\u8272", "pad.settings.linenocheck": "\u884c\u865f", + "pad.settings.rtlcheck": "\u5f9e\u53f3\u81f3\u5de6\u8b80\u53d6\u5167\u5bb9\uff1f", "pad.settings.fontType": "\u5b57\u9ad4\u985e\u578b\uff1a", "pad.settings.fontType.normal": "\u6b63\u5e38", "pad.settings.fontType.monospaced": "\u7b49\u5bec", From 2bc45de1062cd4afcb8cc53e6a89b480a05f77b6 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 18 Mar 2013 22:09:47 +0100 Subject: [PATCH 21/28] Fix #1639 by removing bodyParser middleware introduced with swagger REST API --- src/node/hooks/express/swagger.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node/hooks/express/swagger.js b/src/node/hooks/express/swagger.js index f4fc5cffa..3a437a51c 100644 --- a/src/node/hooks/express/swagger.js +++ b/src/node/hooks/express/swagger.js @@ -354,7 +354,6 @@ exports.expressCreateServer = function (hook_name, args, cb) { // Let's put this under /rest for now var subpath = express(); - args.app.use(express.bodyParser()); args.app.use(basePath, subpath); swagger.setAppHandler(subpath); From b3dbf1c995d16bb3c2ebbe630b00e5ef4b60dc1f Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 18 Mar 2013 22:29:42 +0100 Subject: [PATCH 22/28] Update html10n.js --- src/static/js/html10n.js | 230 +++++++++++++++++++-------------------- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index e1c025c43..aa53a2668 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -23,27 +23,27 @@ window.html10n = (function(window, document, undefined) { // fix console - var console = window.console; + var console = window.console function interceptConsole(method){ - if (!console) return function() {}; + if (!console) return function() {} - var original = console[method]; + var original = console[method] // do sneaky stuff if (original.bind){ // Do this for normal browsers - return original.bind(console); + return original.bind(console) }else{ return function() { // Do this for IE - var message = Array.prototype.slice.apply(arguments).join(' '); - original(message); + var message = Array.prototype.slice.apply(arguments).join(' ') + original(message) } } } var consoleLog = interceptConsole('log') , consoleWarn = interceptConsole('warn') - , consoleError = interceptConsole('warn'); + , consoleError = interceptConsole('warn') // fix Array.prototype.instanceOf in, guess what, IE! <3 @@ -84,14 +84,14 @@ window.html10n = (function(window, document, undefined) { * MicroEvent - to make any js object an event emitter (server or browser) */ - var MicroEvent = function(){} + var MicroEvent = function(){} MicroEvent.prototype = { - bind : function(event, fct){ + bind : function(event, fct){ this._events = this._events || {}; this._events[event] = this._events[event] || []; this._events[event].push(fct); }, - unbind : function(event, fct){ + unbind : function(event, fct){ this._events = this._events || {}; if( event in this._events === false ) return; this._events[event].splice(this._events[event].indexOf(fct), 1); @@ -100,7 +100,7 @@ window.html10n = (function(window, document, undefined) { this._events = this._events || {}; if( event in this._events === false ) return; for(var i = 0; i < this._events[event].length; i++){ - this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1)); + this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1)) } } }; @@ -122,50 +122,50 @@ window.html10n = (function(window, document, undefined) { * and caching all necessary resources */ function Loader(resources) { - this.resources = resources; - this.cache = {}; // file => contents - this.langs = {}; // lang => strings + this.resources = resources + this.cache = {} // file => contents + this.langs = {} // lang => strings } Loader.prototype.load = function(lang, cb) { - if(this.langs[lang]) return cb(); + if(this.langs[lang]) return cb() if (this.resources.length > 0) { var reqs = 0; for (var i=0, n=this.resources.length; i < n; i++) { this.fetch(this.resources[i], lang, function(e) { reqs++; - if(e) return setTimeout(function(){ throw e }, 0); + if(e) console.warn(e) if (reqs < n) return;// Call back once all reqs are completed - cb && cb(); + cb && cb() }) } } } Loader.prototype.fetch = function(href, lang, cb) { - var that = this; + var that = this if (this.cache[href]) { this.parse(lang, href, this.cache[href], cb) return; } - var xhr = new XMLHttpRequest(); - xhr.open('GET', href, /*async: */true); + var xhr = new XMLHttpRequest() + xhr.open('GET', href, /*async: */true) if (xhr.overrideMimeType) { xhr.overrideMimeType('application/json; charset=utf-8'); } xhr.onreadystatechange = function() { if (xhr.readyState == 4) { if (xhr.status == 200 || xhr.status === 0) { - var data = JSON.parse(xhr.responseText); - that.cache[href] = data; + var data = JSON.parse(xhr.responseText) + that.cache[href] = data // Pass on the contents for parsing - that.parse(lang, href, data, cb); + that.parse(lang, href, data, cb) } else { - cb(new Error('Failed to load '+href)); + cb(new Error('Failed to load '+href)) } } }; @@ -174,39 +174,39 @@ window.html10n = (function(window, document, undefined) { Loader.prototype.parse = function(lang, currHref, data, cb) { if ('object' != typeof data) { - cb(new Error('A file couldn\'t be parsed as json.')); - return; + cb(new Error('A file couldn\'t be parsed as json.')) + return } - if (!data[lang]) lang = lang.substr(0, lang.indexOf('-') == -1? lang.length : lang.indexOf('-')); + if (!data[lang]) lang = lang.substr(0, lang.indexOf('-') == -1? lang.length : lang.indexOf('-')) if (!data[lang]) { - cb(new Error('Couldn\'t find translations for '+lang)); - return; + cb(new Error('Couldn\'t find translations for '+lang)) + return } if ('string' == typeof data[lang]) { // Import rule // absolute path - var importUrl = data[lang]; + var importUrl = data[lang] // relative path if(data[lang].indexOf("http") != 0 && data[lang].indexOf("/") != 0) { - importUrl = currHref+"/../"+data[lang]; + importUrl = currHref+"/../"+data[lang] } - this.fetch(importUrl, lang, cb); - return; + this.fetch(importUrl, lang, cb) + return } if ('object' != typeof data[lang]) { - cb(new Error('Translations should be specified as JSON objects!')); - return; + cb(new Error('Translations should be specified as JSON objects!')) + return } - this.langs[lang] = data[lang]; + this.langs[lang] = data[lang] // TODO: Also store accompanying langs - cb(); + cb() } @@ -216,11 +216,11 @@ window.html10n = (function(window, document, undefined) { var html10n = { language : null } - MicroEvent.mixin(html10n); + MicroEvent.mixin(html10n) - html10n.macros = {}; + html10n.macros = {} - html10n.rtl = ["ar","dv","fa","ha","he","ks","ku","ps","ur","yi"]; + html10n.rtl = ["ar","dv","fa","ha","he","ks","ku","ps","ur","yi"] /** * Get rules for plural forms (shared with JetPack), see: @@ -664,14 +664,14 @@ window.html10n = (function(window, document, undefined) { * @param langs An array of lang codes defining fallbacks */ html10n.localize = function(langs) { - var that = this; + var that = this // if only one string => create an array - if ('string' == typeof langs) langs = [langs]; + if ('string' == typeof langs) langs = [langs] this.build(langs, function(er, translations) { - html10n.translations = translations; - html10n.translateElement(translations); - that.trigger('localized'); + html10n.translations = translations + html10n.translateElement(translations) + that.trigger('localized') }) } @@ -682,78 +682,78 @@ window.html10n = (function(window, document, undefined) { * @param element A DOM element, if omitted, the document element will be used */ html10n.translateElement = function(translations, element) { - element = element || document.documentElement; + element = element || document.documentElement var children = element? getTranslatableChildren(element) : document.childNodes; for (var i=0, n=children.length; i < n; i++) { - this.translateNode(translations, children[i]); + this.translateNode(translations, children[i]) } // translate element itself if necessary - this.translateNode(translations, element); + this.translateNode(translations, element) } function asyncForEach(list, iterator, cb) { var i = 0 - , n = list.length; + , n = list.length iterator(list[i], i, function each(err) { - if(err) consoleLog(err); - i++; + if(err) consoleLog(err) + i++ if (i < n) return iterator(list[i],i, each); - cb(); + cb() }) } function getTranslatableChildren(element) { if(!document.querySelectorAll) { - if (!element) return []; + if (!element) return [] var nodes = element.getElementsByTagName('*') - , l10nElements = []; + , l10nElements = [] for (var i=0, n=nodes.length; i < n; i++) { if (nodes[i].getAttribute('data-l10n-id')) l10nElements.push(nodes[i]); } - return l10nElements; + return l10nElements } - return element.querySelectorAll('*[data-l10n-id]'); + return element.querySelectorAll('*[data-l10n-id]') } html10n.get = function(id, args) { - var translations = html10n.translations; - if(!translations) return consoleWarn('No translations available (yet)'); - if(!translations[id]) return consoleWarn('Could not find string '+id); + var translations = html10n.translations + if(!translations) return consoleWarn('No translations available (yet)') + if(!translations[id]) return consoleWarn('Could not find string '+id) // apply args - var str = substArguments(translations[id], args); + var str = substArguments(translations[id], args) // apply macros - return substMacros(id, str, args); + return substMacros(id, str, args) // replace {{arguments}} with their values or the // associated translation string (based on its key) function substArguments(str, args) { var reArgs = /\{\{\s*([a-zA-Z\.]+)\s*\}\}/ - , match; + , match while (match = reArgs.exec(str)) { if (!match || match.length < 2) - return str; // argument key not found + return str // argument key not found var arg = match[1] - , sub = ''; + , sub = '' if (arg in args) { - sub = args[arg]; + sub = args[arg] } else if (arg in translations) { - sub = translations[arg]; + sub = translations[arg] } else { - consoleWarn('Could not find argument {{' + arg + '}}'); - return str; + consoleWarn('Could not find argument {{' + arg + '}}') + return str } - str = str.substring(0, match.index) + sub + str.substr(match.index + match[0].length); + str = str.substring(0, match.index) + sub + str.substr(match.index + match[0].length) } - return str; + return str } // replace {[macros]} with their values @@ -766,21 +766,21 @@ window.html10n = (function(window, document, undefined) { // a macro has been found // Note: at the moment, only one parameter is supported var macroName = reMatch[1] - , paramName = reMatch[2]; + , paramName = reMatch[2] - if (!(macroName in gMacros)) return str; + if (!(macroName in gMacros)) return str - var param; + var param if (args && paramName in args) { - param = args[paramName]; + param = args[paramName] } else if (paramName in translations) { - param = translations[paramName]; + param = translations[paramName] } // there's no macro parser yet: it has to be defined in gMacros - var macro = html10n.macros[macroName]; - str = macro(translations, key, str, param); - return str; + var macro = html10n.macros[macroName] + str = macro(translations, key, str, param) + return str } } @@ -788,26 +788,26 @@ window.html10n = (function(window, document, undefined) { * Applies translations to a DOM node (recursive) */ html10n.translateNode = function(translations, node) { - var str = {}; + var str = {} // get id - str.id = node.getAttribute('data-l10n-id'); - if (!str.id) return; + str.id = node.getAttribute('data-l10n-id') + if (!str.id) return - if(!translations[str.id]) return consoleWarn('Couldn\'t find translation key '+str.id); + if(!translations[str.id]) return consoleWarn('Couldn\'t find translation key '+str.id) // get args if(window.JSON) { - str.args = JSON.parse(node.getAttribute('data-l10n-args')); + str.args = JSON.parse(node.getAttribute('data-l10n-args')) }else{ try{ - str.args = eval(node.getAttribute('data-l10n-args')); + str.args = eval(node.getAttribute('data-l10n-args')) }catch(e) { - consoleWarn('Couldn\'t parse args for '+str.id); + consoleWarn('Couldn\'t parse args for '+str.id) } } - str.str = html10n.get(str.id, str.args); + str.str = html10n.get(str.id, str.args) // get attribute name to apply str to var prop @@ -817,31 +817,31 @@ window.html10n = (function(window, document, undefined) { , "innerHTML": 1 , "alt": 1 , "textContent": 1 - }; + } if (index > 0 && str.id.substr(index + 1) in attrList) { // an attribute has been specified - prop = str.id.substr(index + 1); + prop = str.id.substr(index + 1) } else { // no attribute: assuming text content by default - prop = document.body.textContent ? 'textContent' : 'innerText'; + prop = document.body.textContent ? 'textContent' : 'innerText' } // Apply translation if (node.children.length === 0 || prop != 'textContent') { - node[prop] = str.str; + node[prop] = str.str } else { var children = node.childNodes, - found = false; + found = false for (var i=0, n=children.length; i < n; i++) { if (children[i].nodeType === 3 && /\S/.test(children[i].textContent)) { if (!found) { - children[i].nodeValue = str.str; - found = true; + children[i].nodeValue = str.str + found = true } else { - children[i].nodeValue = ''; + children[i].nodeValue = '' } } } if (!found) { - consoleWarn('Unexpected error: could not translate element content for key '+str.id, node); + consoleWarn('Unexpected error: could not translate element content for key '+str.id, node) } } } @@ -852,32 +852,32 @@ window.html10n = (function(window, document, undefined) { */ html10n.build = function(langs, cb) { var that = this - , build = {}; + , build = {} asyncForEach(langs, function (lang, i, next) { if(!lang) return next(); - that.loader.load(lang, next); + that.loader.load(lang, next) }, function() { - var lang; - langs.reverse(); + var lang + langs.reverse() // loop through priority array... for (var i=0, n=langs.length; i < n; i++) { - lang = langs[i]; + lang = langs[i] if(!lang || !(lang in that.loader.langs)) continue; // ... and apply all strings of the current lang in the list // to our build object for (var string in that.loader.langs[lang]) { - build[string] = that.loader.langs[lang][string]; + build[string] = that.loader.langs[lang][string] } // the last applied lang will be exposed as the // lang the page was translated to - that.language = lang; + that.language = lang } - cb(null, build); + cb(null, build) }) } @@ -893,8 +893,8 @@ window.html10n = (function(window, document, undefined) { * Returns the direction of the language returned be html10n#getLanguage */ html10n.getDirection = function() { - var langCode = this.language.indexOf('-') == -1? this.language : this.language.substr(0, this.language.indexOf('-')); - return html10n.rtl.indexOf(langCode) == -1? 'ltr' : 'rtl'; + var langCode = this.language.indexOf('-') == -1? this.language : this.language.substr(0, this.language.indexOf('-')) + return html10n.rtl.indexOf(langCode) == -1? 'ltr' : 'rtl' } /** @@ -903,28 +903,28 @@ window.html10n = (function(window, document, undefined) { html10n.index = function () { // Find all s var links = document.getElementsByTagName('link') - , resources = []; + , resources = [] for (var i=0, n=links.length; i < n; i++) { if (links[i].type != 'application/l10n+json') continue; - resources.push(links[i].href); + resources.push(links[i].href) } - this.loader = new Loader(resources); - this.trigger('indexed'); + this.loader = new Loader(resources) + this.trigger('indexed') } if (document.addEventListener) // modern browsers and IE9+ document.addEventListener('DOMContentLoaded', function() { - html10n.index(); - }, false); + html10n.index() + }, false) else if (window.attachEvent) window.attachEvent('onload', function() { - html10n.index(); - }, false); + html10n.index() + }, false) // gettext-like shortcut if (window._ === undefined) window._ = html10n.get; - return html10n; -})(window, document); + return html10n +})(window, document) \ No newline at end of file From e49620ea077117179d3e5faccf9974080cdbb5b3 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 18 Mar 2013 21:36:50 +0000 Subject: [PATCH 23/28] update ueber for pg --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index a7147cf2a..f2150b5d9 100644 --- a/src/package.json +++ b/src/package.json @@ -16,7 +16,7 @@ "require-kernel" : "1.0.5", "resolve" : "0.2.x", "socket.io" : "0.9.x", - "ueberDB" : "0.1.94", + "ueberDB" : "0.1.95", "async" : "0.1.x", "express" : "3.x", "connect" : "2.4.x", From 7741f762e2b743116ef9d90224c3db348402a34a Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 19 Mar 2013 02:21:53 +0000 Subject: [PATCH 24/28] hook for chat msg --- src/static/js/chat.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 83a487dee..bba3d87e5 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -17,6 +17,7 @@ var padutils = require('./pad_utils').padutils; var padcookie = require('./pad_cookie').padcookie; var Tinycon = require('tinycon/tinycon'); +var hooks = require('./pluginfw/hooks'); var chat = (function() { @@ -162,7 +163,18 @@ var chat = (function() time: '4000' }); Tinycon.setBubble(count); - + var msg = { + "authorName" : authorName, + "text" : text, + "sticky" : false, + "time" : timeStr + }; + hooks.aCallAll("chatNewMessage", { + "authorName" : authorName, + "text" : text, + "sticky" : false, + "time" : timeStr + }); } } } From 8406cc95ab0c050138e0cc0411fdc8d9618e7a0a Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 19 Mar 2013 03:43:38 +0000 Subject: [PATCH 25/28] docs for hook --- doc/api/hooks_client-side.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/hooks_client-side.md b/doc/api/hooks_client-side.md index 7f376defa..a84ccdeb0 100644 --- a/doc/api/hooks_client-side.md +++ b/doc/api/hooks_client-side.md @@ -143,6 +143,15 @@ Things in context: This hook is called on the client side whenever a user joins or changes. This can be used to create notifications or an alternate user list. +## chatNewMessage +Called from: src/static/js/chat.js + +Things in context: + +1. msg - The message object + +This hook is called on the client side whenever a user recieves a chat message from the server. This can be used to create different notifications for chat messages. + ## collectContentPre Called from: src/static/js/contentcollector.js From a628317b555743a1de5772e0af9e5ff1b09ada67 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 19 Mar 2013 18:34:21 +0100 Subject: [PATCH 26/28] Log http on debug log level ... and additionally log the response time --- src/node/hooks/express/webaccess.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index c39f91da6..944fd98f7 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -94,7 +94,7 @@ exports.expressConfigure = function (hook_name, args, cb) { // If the log level specified in the config file is WARN or ERROR the application server never starts listening to requests as reported in issue #158. // Not installing the log4js connect logger when the log level has a higher severity than INFO since it would not log at that level anyway. if (!(settings.loglevel === "WARN" || settings.loglevel == "ERROR")) - args.app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'})); + args.app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.DEBUG, format: ':status, :method :url -- :response-timems'})); /* Do not let express create the session, so that we can retain a * reference to it for socket.io to use. Also, set the key (cookie From c30697cb0771882a6077b40e4d6f62105fafbf0b Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 19 Mar 2013 18:40:39 +0100 Subject: [PATCH 27/28] Don't break the whole server if an import failed because no files were uploaded Fixes #1611 --- src/node/handler/ImportHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index ac856a604..7bb9c5db9 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -60,7 +60,7 @@ exports.doImport = function(req, res, padId) form.parse(req, function(err, fields, files) { //the upload failed, stop at this point if(err || files.file === undefined) { - console.warn("Uploading Error: " + err.stack); + if(err) console.warn("Uploading Error: " + err.stack); callback("uploadFailed"); } //everything ok, continue From bcb92f25a63da45fbe328e43a4a3d0311675a2ba Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 19 Mar 2013 20:21:27 +0100 Subject: [PATCH 28/28] Refactor chat notifications and the chatNewMessage hook --- doc/api/hooks_client-side.md | 9 ++- src/static/js/chat.js | 113 +++++++++++++++-------------------- 2 files changed, 55 insertions(+), 67 deletions(-) diff --git a/doc/api/hooks_client-side.md b/doc/api/hooks_client-side.md index a84ccdeb0..919859417 100644 --- a/doc/api/hooks_client-side.md +++ b/doc/api/hooks_client-side.md @@ -148,9 +148,14 @@ Called from: src/static/js/chat.js Things in context: -1. msg - The message object +1. authorName - The user that wrote this message +2. author - The authorID of the user that wrote the message +2. text - the message text +3. sticky (boolean) - if you want the gritter notification bubble to fade out on its own or just sit there +3. timestamp - the timestamp of the chat message +4. timeStr - the timestamp as a formatted string -This hook is called on the client side whenever a user recieves a chat message from the server. This can be used to create different notifications for chat messages. +This hook is called on the client side whenever a chat message is received from the server. It can be used to create different notifications for chat messages. ## collectContentPre Called from: src/static/js/contentcollector.js diff --git a/src/static/js/chat.js b/src/static/js/chat.js index bba3d87e5..38d6f38d3 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -78,7 +78,7 @@ var chat = (function() $("#chatinput").val(""); }, addMessage: function(msg, increment, isHistoryAdd) - { + { //correct the time msg.time += this._pad.clientTimeOffset; @@ -100,85 +100,68 @@ var chat = (function() var text = padutils.escapeHtmlWithClickableLinks(msg.text, "_blank"); - /* Performs an action if your name is mentioned */ - var myName = $('#myusernameedit').val(); - myName = myName.toLowerCase(); - var chatText = text.toLowerCase(); - var wasMentioned = false; - if (chatText.indexOf(myName) !== -1 && myName != "undefined"){ - wasMentioned = true; + var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName); + + // the hook args + var ctx = { + "authorName" : authorName, + "author" : msg.userId, + "text" : text, + "sticky" : false, + "timestamp" : msg.time, + "timeStr" : timeStr } - /* End of new action */ - var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName); - - var html = "

" + authorName + ":" + timeStr + " " + text + "

"; - if(isHistoryAdd) - $(html).insertAfter('#chatloadmessagesbutton'); - else - $("#chattext").append(html); - - //should we increment the counter?? - if(increment && !isHistoryAdd) - { - var count = Number($("#chatcounter").text()); - count++; - - // is the users focus already in the chatbox? - var alreadyFocused = $("#chatinput").is(":focus"); - - // does the user already have the chatbox open? - var chatOpen = $("#chatbox").is(":visible"); + // is the users focus already in the chatbox? + var alreadyFocused = $("#chatinput").is(":focus"); - $("#chatcounter").text(count); - // chat throb stuff -- Just make it throw for twice as long - if(wasMentioned && !alreadyFocused && !isHistoryAdd && !chatOpen) - { // If the user was mentioned show for twice as long and flash the browser window - $.gritter.add({ - // (string | mandatory) the heading of the notification - title: authorName, - // (string | mandatory) the text inside the notification - text: text, - // (bool | optional) if you want it to fade out on its own or just sit there - sticky: true, - // (int | optional) the time you want it to be alive for before fading out - time: '2000' - }); + // does the user already have the chatbox open? + var chatOpen = $("#chatbox").is(":visible"); - chatMentions++; - Tinycon.setBubble(chatMentions); - } + // does this message contain this user's name? (is the curretn user mentioned?) + var myName = $('#myusernameedit').val(); + var wasMentioned = (text.toLowerCase().indexOf(myName.toLowerCase()) !== -1 && myName != "undefined"); + + if(wasMentioned && !alreadyFocused && !isHistoryAdd && !chatOpen) + { // If the user was mentioned show for twice as long and flash the browser window + chatMentions++; + Tinycon.setBubble(chatMentions); + ctx.sticky = true; + } + + // Call chat message hook + hooks.aCallAll("chatNewMessage", ctx, function() { + + var html = "

" + authorName + ":" + ctx.timeStr + " " + ctx.text + "

"; + if(isHistoryAdd) + $(html).insertAfter('#chatloadmessagesbutton'); else + $("#chattext").append(html); + + //should we increment the counter?? + if(increment && !isHistoryAdd) { - if(!chatOpen){ + // Update the counter of unread messages + var count = Number($("#chatcounter").text()); + count++; + $("#chatcounter").text(count); + + if(!chatOpen) { $.gritter.add({ // (string | mandatory) the heading of the notification - title: authorName, + title: ctx.authorName, // (string | mandatory) the text inside the notification - text: text, - + text: ctx.text, // (bool | optional) if you want it to fade out on its own or just sit there - sticky: false, + sticky: ctx.sticky, // (int | optional) the time you want it to be alive for before fading out time: '4000' }); - Tinycon.setBubble(count); - var msg = { - "authorName" : authorName, - "text" : text, - "sticky" : false, - "time" : timeStr - }; - hooks.aCallAll("chatNewMessage", { - "authorName" : authorName, - "text" : text, - "sticky" : false, - "time" : timeStr - }); } } - } - // Clear the chat mentions when the user clicks on the chat input box + }); + + // Clear the chat mentions when the user clicks on the chat input box $('#chatinput').click(function(){ chatMentions = 0; Tinycon.setBubble(0);