From b6bf0ab9363367de2651d317cf44f22938af77d1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:15:39 +0000 Subject: [PATCH 01/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0fff543e..51ea9763e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,8 @@ # Developer Guidelines (Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch)) +## Important note for pull requests +Pull requests should issued against the develop branch. We never pull directly into master. **Our goal is to iterate in small steps. Release often, release early. Evolution instead of a revolution** ## General goals of Etherpad Lite From 019d2e01be21153d1c97eeeed6b4f21ab43029b0 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:15:55 +0000 Subject: [PATCH 02/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51ea9763e..d3f05b677 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,7 @@ ## Important note for pull requests Pull requests should issued against the develop branch. We never pull directly into master. + **Our goal is to iterate in small steps. Release often, release early. Evolution instead of a revolution** ## General goals of Etherpad Lite From 7427f9ba15aa0f8dde82cc6bb4db0d215e54cf32 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:16:19 +0000 Subject: [PATCH 03/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3f05b677..4a69a3b65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ (Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch)) ## Important note for pull requests -Pull requests should issued against the develop branch. We never pull directly into master. +**Pull requests should issued against the develop branch**. We never pull directly into master. **Our goal is to iterate in small steps. Release often, release early. Evolution instead of a revolution** From 8686da87e8f838a5ffbc1cdb1b6ca68174062186 Mon Sep 17 00:00:00 2001 From: Stephan Jauernick Date: Thu, 6 Dec 2012 21:03:15 +0100 Subject: [PATCH 04/10] Update src/node/db/API.js Added a checkToken method for checking if the API token is valid. --- src/node/db/API.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/node/db/API.js b/src/node/db/API.js index 4979e8c65..18ed1d0c5 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -548,6 +548,18 @@ exports.sendClientsMessage = function (padID, msg, callback) { } ); } +/** +checkToken() returns ok when api token is valid + +Example returns: + +{code: 0, message:"ok"} +*/ +exports.checkToken = function(padID, callback) +{ + callback() +} + /******************************/ /** INTERNAL HELPER FUNCTIONS */ From 2163c8be5c8988f45bad7f380e2c0e8691e86798 Mon Sep 17 00:00:00 2001 From: Stephan Jauernick Date: Thu, 6 Dec 2012 21:06:09 +0100 Subject: [PATCH 05/10] Update src/node/handler/APIHandler.js Added the checkToken function to the function array. --- src/node/handler/APIHandler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js index f99762cea..198ec97b3 100644 --- a/src/node/handler/APIHandler.js +++ b/src/node/handler/APIHandler.js @@ -68,6 +68,7 @@ var version = , "isPasswordProtected" : ["padID"] , "listAuthorsOfPad" : ["padID"] , "padUsersCount" : ["padID"] + , "checkToken" : [] } , "1.1": { "createGroup" : [] @@ -102,6 +103,7 @@ var version = , "padUsers" : ["padID"] , "sendClientsMessage" : ["padID", "msg"] , "listAllGroups" : [] + , "checkToken" : [] } }; From 26ece95905f679917a6f8d3aa7bf7fae658bd6ac Mon Sep 17 00:00:00 2001 From: Stephan Jauernick Date: Thu, 6 Dec 2012 21:24:44 +0100 Subject: [PATCH 06/10] Update src/node/db/API.js Added a missing symicolon and removed the padID argument which is not passed(and thus leads to an errors because the callback lands in there). --- src/node/db/API.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 18ed1d0c5..783cf97f2 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -555,9 +555,9 @@ Example returns: {code: 0, message:"ok"} */ -exports.checkToken = function(padID, callback) +exports.checkToken = function(callback) { - callback() + callback(); } From 4318d210cef88ffecf956cf3b22ffd3c0a478572 Mon Sep 17 00:00:00 2001 From: Stephan Jauernick Date: Thu, 6 Dec 2012 21:26:51 +0100 Subject: [PATCH 07/10] Update src/node/db/API.js Corrected function documentation. --- src/node/db/API.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 783cf97f2..ea58d8599 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -553,7 +553,8 @@ checkToken() returns ok when api token is valid Example returns: -{code: 0, message:"ok"} +{"code":0,"message":"ok","data":null} +{"code":4,"message":"no or wrong API Key","data":null} */ exports.checkToken = function(callback) { From c2cc29232448f1e7c6d388824b506bfd1b9a5f27 Mon Sep 17 00:00:00 2001 From: Stephan Jauernick Date: Thu, 6 Dec 2012 21:33:22 +0100 Subject: [PATCH 08/10] Update doc/api/http_api.md Added docs for the checkToken function --- doc/api/http_api.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/http_api.md b/doc/api/http_api.md index 7ace1b0b7..e73109b01 100644 --- a/doc/api/http_api.md +++ b/doc/api/http_api.md @@ -407,3 +407,12 @@ sends a custom message of type `msg` to the pad *Example returns:* * `{code: 0, message:"ok", data: {}}` * `{code: 1, message:"padID does not exist", data: null}` + +#### checkToken() + * API >= 1 + +returns ok when api token is valid + +*Example returns:* + * `{"code":0,"message":"ok","data":null}` + * `{"code":4,"message":"no or wrong API Key","data":null}` From 0371d5ba9e3058a8e048e89d4a649191edbd842e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Eixarch?= Date: Sun, 9 Dec 2012 09:41:30 +0100 Subject: [PATCH 09/10] Remove async load of l10n.js because Chrome fail to translate --- src/templates/pad.html | 2 +- src/templates/timeslider.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/pad.html b/src/templates/pad.html index ba4e777a7..6232751f4 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -42,7 +42,7 @@ if(language) document.documentElement.lang = language[1]; })(); - + <% e.begin_block("styles"); %> diff --git a/src/templates/timeslider.html b/src/templates/timeslider.html index 281fa01b9..a3e94118c 100644 --- a/src/templates/timeslider.html +++ b/src/templates/timeslider.html @@ -41,7 +41,7 @@ if(language) document.documentElement.lang = language[1]; })(); - + From ff8b4b6b207d2b2732b356bb7365579555f00db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Eixarch?= Date: Sun, 9 Dec 2012 17:34:32 +0100 Subject: [PATCH 10/10] change key of message sucessfull on import --- src/locales/en.ini | 2 +- src/templates/pad.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/en.ini b/src/locales/en.ini index 3d78f67cb..1e8c0fd59 100644 --- a/src/locales/en.ini +++ b/src/locales/en.ini @@ -36,7 +36,7 @@ pad.settings.globalView = Global View pad.settings.language = Language: pad.importExport.import_export = Import/Export pad.importExport.import = Upload any text file or document -pad.importExport.successful = Successful! +pad.importExport.importSuccessful = Successful! pad.importExport.export = Export current pad as: pad.importExport.exporthtml = HTML pad.importExport.exportplain = Plain text diff --git a/src/templates/pad.html b/src/templates/pad.html index 6232751f4..804c2e807 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -266,7 +266,7 @@
-
+