From 2aaf80c8809a0a91a87f56e3f217869071dc8d68 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Wed, 14 Nov 2012 09:27:21 -0800 Subject: [PATCH 01/16] Initial commit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..33021bd7 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +etherpad-lite +============= + +Etherpad Lite \ No newline at end of file From a5c4fb154f7414cd5dca9e50c3f2ad00e42672f5 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Wed, 14 Nov 2012 09:29:49 -0800 Subject: [PATCH 02/16] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 33021bd7..95dfee26 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -etherpad-lite +We moved! ============= -Etherpad Lite \ No newline at end of file +You can now find Etherpad Lite under [github.com/ether/etherpad-lite](https://github.com/ether/etherpad-lite) \ No newline at end of file From 94e9cf0a328c110133079c1df26ae418ad22b5fb Mon Sep 17 00:00:00 2001 From: Simon Leblanc Date: Fri, 23 Nov 2012 06:20:09 +0100 Subject: [PATCH 03/16] improving the translation of the timeline --- src/locales/en.ini | 17 ++++++++++++++++- src/static/js/broadcast.js | 28 ++++++++++++++++++++++++++-- src/static/js/broadcast_slider.js | 6 +++--- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/locales/en.ini b/src/locales/en.ini index a110583e..e542594d 100644 --- a/src/locales/en.ini +++ b/src/locales/en.ini @@ -74,4 +74,19 @@ timeslider.pageTitle = {{appTitle}} Timeslider timeslider.toolbar.returnbutton = Return to pad timeslider.toolbar.authors = Authors: timeslider.toolbar.authorsList = No Authors -timeslider.exportCurrent = Export current version as: \ No newline at end of file +timeslider.exportCurrent = Export current version as: +timeslider.version = Version {{version}} +timeslider.saved = Saved {{month}} {{day}}, {{year}} +timeslider.dateformat = {{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}} +timeslider.month.january = January +timeslider.month.february = February +timeslider.month.march = March +timeslider.month.april = April +timeslider.month.may = May +timeslider.month.june = June +timeslider.month.july = July +timeslider.month.august = August +timeslider.month.september = September +timeslider.month.october = October +timeslider.month.november = November +timeslider.month.december = December diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js index 86e63f93..d67398fb 100644 --- a/src/static/js/broadcast.js +++ b/src/static/js/broadcast.js @@ -304,7 +304,14 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro var hours = zpad(date.getHours(), 2); var minutes = zpad(date.getMinutes(), 2); var seconds = zpad(date.getSeconds(), 2); - return ([month, '/', day, '/', year, ' ', hours, ':', minutes, ':', seconds].join("")); + return (document.webL10n.get("timeslider.dateformat", { + "day": day, + "month": month, + "year": year, + "hours": hours, + "minutes": minutes, + "seconds": seconds + })); } @@ -313,7 +320,24 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro $('#timer').html(dateFormat()); - var revisionDate = ["Saved", ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"][date.getMonth()], date.getDate() + ",", date.getFullYear()].join(" ") + var revisionDate = document.webL10n.get("timeslider.saved", { + "day": date.getDate(), + "month": [ + document.webL10n.get("timeslider.month.january"), + document.webL10n.get("timeslider.month.february"), + document.webL10n.get("timeslider.month.march"), + document.webL10n.get("timeslider.month.april"), + document.webL10n.get("timeslider.month.may"), + document.webL10n.get("timeslider.month.june"), + document.webL10n.get("timeslider.month.july"), + document.webL10n.get("timeslider.month.august"), + document.webL10n.get("timeslider.month.september"), + document.webL10n.get("timeslider.month.october"), + document.webL10n.get("timeslider.month.november"), + document.webL10n.get("timeslider.month.december") + ][date.getMonth()], + "year": date.getFullYear() + }); $('#revision_date').html(revisionDate) } diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index fed9f2e7..a597c926 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -112,7 +112,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) { $(this).attr('href', $(this).attr('thref').replace("%revision%", newpos)); }); - $("#revision_label").html("Version " + newpos); + $("#revision_label").html(document.webL10n.get("timeslider.version", { "version": newpos})); if (newpos == 0) { @@ -215,7 +215,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) } if (authors.length == 0) { - authorsList.append("No Authors"); + authorsList.append(document.webL10n.get("timeslider.toolbar.authorsList")); } fixPadHeight(); @@ -346,7 +346,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) var newloc = self.currentLoc + (evt2.clientX - self.startLoc); if (newloc < 0) newloc = 0; if (newloc > ($("#ui-slider-bar").width() - 2)) newloc = ($("#ui-slider-bar").width() - 2); - $("#revision_label").html("Version " + Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))); + $("#revision_label").html(document.webL10n.get("timeslider.version", { "version": Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))})); $(self).css('left', newloc); if (getSliderPosition() != Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))) _callSliderCallbacks(Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))) }); From a49bab5daee2f744e56770dab667c29e00c1805f Mon Sep 17 00:00:00 2001 From: Wikinaut Date: Mon, 26 Nov 2012 08:54:13 +0100 Subject: [PATCH 04/16] fix timeslider rightstep button position --- src/static/css/timeslider.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/css/timeslider.css b/src/static/css/timeslider.css index 1dd0ca91..d786d89b 100644 --- a/src/static/css/timeslider.css +++ b/src/static/css/timeslider.css @@ -113,7 +113,7 @@ background-position: -29px -22px; right: 5px; top: 20px; - width: 29px; + width: 30px; } #timeslider .star { background-image: url(../../static/img/star.png); From 6239c66e3639bfed8345dabf304c4f4578dd67ed Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 26 Nov 2012 20:19:27 +0000 Subject: [PATCH 05/16] remove alert on line wrap as it doesnt mean anything --- src/static/js/ace2_inner.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 661ea011..b3bc91a9 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -333,14 +333,6 @@ function Ace2Inner(){ return colorutils.triple2css(color); } - function doAlert(str) - { - scheduler.setTimeout(function() - { - alert(str); - }, 0); - } - editorInfo.ace_getRep = function() { return rep; @@ -1624,7 +1616,7 @@ function Ace2Inner(){ if (linesWrapped > 0) { - doAlert("Editor warning: " + linesWrapped + " long line" + (linesWrapped == 1 ? " was" : "s were") + " hard-wrapped into " + ccData.numLinesAfter + " lines."); + // console.log("Editor warning: " + linesWrapped + " long line" + (linesWrapped == 1 ? " was" : "s were") + " hard-wrapped into " + ccData.numLinesAfter + " lines."); } if (ss[0] >= 0) selStart = [ss[0] + a + netNumLinesChangeSoFar, ss[1]]; From bf26f60bac93b104cef2986a45ac51b000674b64 Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 27 Nov 2012 09:59:47 +0100 Subject: [PATCH 06/16] Update doc/api/http_api.md As EPL moved from "Pita" to "ether" the edited link had to be changed. --- doc/api/http_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http_api.md b/doc/api/http_api.md index 990d1b49..7ace1b0b 100644 --- a/doc/api/http_api.md +++ b/doc/api/http_api.md @@ -9,7 +9,7 @@ The API gives another web application control of the pads. The basic functions a The API is designed in a way, so you can reuse your existing user system with their permissions, and map it to etherpad lite. Means: Your web application still has to do authentication, but you can tell etherpad lite via the api, which visitors should get which permissions. This allows etherpad lite to fit into any web application and extend it with real-time functionality. You can embed the pads via an iframe into your website. -Take a look at [HTTP API client libraries](https://github.com/Pita/etherpad-lite/wiki/HTTP-API-client-libraries) to see if a library in your favorite language. +Take a look at [HTTP API client libraries](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) to see if a library in your favorite language. ## Examples From 8c7939ec9f18da05bb58da0b43d805948c9cc9b9 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 28 Nov 2012 17:17:35 +0000 Subject: [PATCH 07/16] catch control S and send an event to save a revision --- src/static/js/ace2_inner.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index b3bc91a9..9290fd56 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3537,7 +3537,7 @@ function Ace2Inner(){ var keyCode = evt.keyCode; var which = evt.which; - // prevent ESC key + // prevent ESC key and Control S if (keyCode == 27) { evt.preventDefault(); @@ -3562,7 +3562,7 @@ function Ace2Inner(){ inCallStackIfNecessary("handleKeyEvent", function() { - if (type == "keypress" || (isTypeForSpecialKey && keyCode == 13 /*return*/ )) + if (type == "keypress" || (isTypeForSpecialKey && keyCode == 13 || keyCode == 83 /*return*/ )) { // in IE, special keys don't send keypress, the keydown does the action if (!outsideKeyPress(evt)) @@ -3575,7 +3575,6 @@ function Ace2Inner(){ { outsideKeyDown(evt); } - if (!stopped) { var specialHandledInHook = hooks.callAll('aceKeyEvent', { @@ -3614,6 +3613,12 @@ function Ace2Inner(){ }, 0); specialHandled = true; } + if ((!specialHandled) && isTypeForSpecialKey && keyCode == 83) + { + evt.preventDefault(); + parent.parent.pad.collabClient.sendMessage({"type":"SAVE_REVISION"}); /* The parent.parent part of this is BAD and I feel bad.. It may break something */ + specialHandled = true; + } if ((!specialHandled) && isTypeForSpecialKey && keyCode == 9 && !(evt.metaKey || evt.ctrlKey)) { // tab From 93e9d7c852be597b3793106069ef8adc5d80734c Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 28 Nov 2012 17:20:58 +0000 Subject: [PATCH 08/16] remove control S comment --- 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 9290fd56..da646b7e 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3537,7 +3537,7 @@ function Ace2Inner(){ var keyCode = evt.keyCode; var which = evt.which; - // prevent ESC key and Control S + // prevent ESC key if (keyCode == 27) { evt.preventDefault(); From 719fb7e04508f74b64bd0c4ed9bf8119f35686bf Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 29 Nov 2012 13:42:37 +0100 Subject: [PATCH 09/16] Let socket.io decide which transport is best for the browser --- src/node/hooks/express/socketio.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/node/hooks/express/socketio.js b/src/node/hooks/express/socketio.js index 546ba2af..c2b9ff6c 100644 --- a/src/node/hooks/express/socketio.js +++ b/src/node/hooks/express/socketio.js @@ -36,13 +36,10 @@ exports.expressCreateServer = function (hook_name, args, cb) { }); }); - // the following has been successfully tested with the following browsers - // works also behind reverse proxy - // Firefox 14.0.1 - // IE8 with Native XMLHTTP support - // IE8 without Native XMLHTTP support - // Chrome 21.0.1180.79 - io.set('transports', ['jsonp-polling']); + // there shouldn#t be a browser that isn't compatible to all + // transports in this list at once + // e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling + io.set('transports', ['xhr-polling', 'jsonp-polling', 'htmlfile']); var socketIOLogger = log4js.getLogger("socket.io"); io.set('logger', { From d76100358840e24079a523b7b9c8d135370878ef Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 30 Nov 2012 22:50:54 +0000 Subject: [PATCH 10/16] fix path to favicon resolves #1236 --- src/node/utils/Settings.js | 2 ++ src/templates/pad.html | 2 +- src/templates/timeslider.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 9caa2b0b..fb2a592c 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -38,6 +38,8 @@ exports.title = "Etherpad Lite"; * The app favicon fully specified url, visible e.g. in the browser window */ exports.favicon = "favicon.ico"; +exports.faviconPad = "../" + exports.favicon; +exports.faviconTimeslider = "../../" + exports.favicon; /** * The IP ep-lite should listen to diff --git a/src/templates/pad.html b/src/templates/pad.html index 3f3eee4f..c1300d5e 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -32,7 +32,7 @@ - +