From dcb3da829d07c73229a3d95862cb289bcd96a842 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 21 Nov 2012 17:45:01 +0100 Subject: [PATCH 01/10] Fix #1186 Autodetection wouldn't work correctly in IE9 --- src/static/js/l10n.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/l10n.js b/src/static/js/l10n.js index 1d232908..ef8218d3 100644 --- a/src/static/js/l10n.js +++ b/src/static/js/l10n.js @@ -902,7 +902,7 @@ document.webL10n = (function(window, document, undefined) { // browser-specific startup if (document.addEventListener) { // modern browsers and IE9+ document.addEventListener('DOMContentLoaded', function() { - var lang = document.documentElement.lang || navigator.language; + var lang = document.documentElement.lang || navigator.language || navigator.userLanguage || 'en'; loadLocale(lang, translateFragment); }, false); } else if (window.attachEvent) { // IE8 and before (= oldIE) @@ -977,7 +977,7 @@ document.webL10n = (function(window, document, undefined) { // startup for IE<9 window.attachEvent('onload', function() { gTextProp = document.body.textContent ? 'textContent' : 'innerText'; - var lang = document.documentElement.lang || window.navigator.userLanguage; + var lang = document.documentElement.lang || navigator.language || navigator.userLanguage || 'en'; loadLocale(lang, translateFragment); }); } From 2260b1fc6282589ecb90b8d530ced5c12e054071 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 21 Nov 2012 17:52:10 +0000 Subject: [PATCH 02/10] Test for PR 1188 https://github.com/ether/etherpad-lite/pull/1188 --- .../specs/keystroke_urls_become_clickable.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/frontend/specs/keystroke_urls_become_clickable.js b/tests/frontend/specs/keystroke_urls_become_clickable.js index 2a46360e..8c72d748 100644 --- a/tests/frontend/specs/keystroke_urls_become_clickable.js +++ b/tests/frontend/specs/keystroke_urls_become_clickable.js @@ -21,4 +21,27 @@ describe("urls", function(){ return inner$("div").first().find("a").length === 1; }, 2000).done(done); }); + + it("when you enter a url containing a !, it becomes clickable and contains the whole URL", function(done) { + var inner$ = helper.padInner$; + var chrome$ = helper.padChrome$; + + //get the first text element out of the inner iframe + var firstTextElement = inner$("div").first(); + var url = "http://etherpad.org/!foo"; + + // simulate key presses to delete content + firstTextElement.sendkeys('{selectall}'); // select all + firstTextElement.sendkeys('{del}'); // clear the first line + firstTextElement.sendkeys(url); // insert a URL + + helper.waitFor(function(){ + if(inner$("div").first().find("a").length === 1){ // if it contains an A link + if(inner$("div").first().find("a")[0].href === url){ + return true; + } + }; + }, 2000).done(done); + }); + }); From db5119f798b9e513c51b757b9cf076eb5dae0bb4 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 21 Nov 2012 17:53:46 +0000 Subject: [PATCH 03/10] Fix tests to run on IE8 etc. A bit more fragile but so is the life of supporting older browsers. --- tests/frontend/specs/language.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js index 83bb8458..f93bc33d 100644 --- a/tests/frontend/specs/language.js +++ b/tests/frontend/specs/language.js @@ -21,12 +21,8 @@ describe("Language select and change", function(){ $languageoption.attr('selected','selected'); $language.change(); - var localizedEventFired = false; - $(chrome$.window).bind('localized', function() { - localizedEventFired = true; - }) - - helper.waitFor(function() { return localizedEventFired;}) + var current = $language.val(); + helper.waitFor(function() { return $language.val() != current}) // GOT IT? .done(function(){ //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); @@ -56,12 +52,8 @@ describe("Language select and change", function(){ $languageoption.attr('selected','selected'); $language.change(); - var localizedEventFired = false; - $(chrome$.window).bind('localized', function() { - localizedEventFired = true; - }) - - helper.waitFor(function() { return localizedEventFired;}) + var current = $language.val(); + helper.waitFor(function() { return $language.val() != current}) .done(function(){ //get the value of the bold button @@ -78,4 +70,3 @@ describe("Language select and change", function(){ }); }); - From 122093904fb536b6fc4f1ee5c0ac726d176c8f1a Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 21 Nov 2012 18:14:05 +0000 Subject: [PATCH 04/10] Actually fix the language tests... --- tests/frontend/specs/language.js | 42 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js index f93bc33d..87d04220 100644 --- a/tests/frontend/specs/language.js +++ b/tests/frontend/specs/language.js @@ -4,69 +4,67 @@ describe("Language select and change", function(){ helper.newPad(cb); this.timeout(60000); }); - + it("makes text german", function(done) { var inner$ = helper.padInner$; var chrome$ = helper.padChrome$; - + //click on the settings button to make settings visible var $settingsButton = chrome$(".buttonicon-settings"); $settingsButton.click(); - + //click the language button var $language = chrome$("#languagemenu"); var $languageoption = $language.find("[value=de]"); - + //select german $languageoption.attr('selected','selected'); $language.change(); - - var current = $language.val(); - helper.waitFor(function() { return $language.val() != current}) // GOT IT? + + helper.waitFor(function() { return $language.val() == "de"}) .done(function(){ //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); - + //get the title of the bold button var boldButtonTitle = $boldButton[0]["title"]; - + //check if the language is now german expect(boldButtonTitle).to.be("Fett (Strg-B)"); done(); }); }); - + it("makes text English", function(done) { var inner$ = helper.padInner$; var chrome$ = helper.padChrome$; - + //click on the settings button to make settings visible var $settingsButton = chrome$(".buttonicon-settings"); $settingsButton.click(); - + //click the language button var $language = chrome$("#languagemenu"); var $languageoption = $language.find("[value=en]"); - + //select german $languageoption.attr('selected','selected'); $language.change(); - - var current = $language.val(); - helper.waitFor(function() { return $language.val() != current}) + + helper.waitFor(function() { return $language.val() == "en";}) .done(function(){ - + //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); - + //get the title of the bold button var boldButtonTitle = $boldButton[0]["title"]; - + //check if the language is now English expect(boldButtonTitle).to.be("Bold (Ctrl-B)"); done(); - + }); }); - -}); + +}); \ No newline at end of file From 064051a30dd7ba732d6b1dba538111e6964735a8 Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Wed, 21 Nov 2012 18:20:54 +0000 Subject: [PATCH 05/10] Bump stuff to 1.2.1 --- CHANGELOG.md | 7 +++++++ src/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abcf0a21..cdcf7b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.2.1 + * Allow ! in urls inside the editor (Not Pad urls) + * Allow comments in language files + * More languages (Finish, Spanish, Hindi, Dutch) Thanks to TranslateWiki.net team. + * Bugfix for IE7/8 issue with a JS error #1186 + * Bugfix windows package extraction issue and make the .zip file smaller + # v1.2 * Internationalization / Language / Translation support (i18n) with support for German/French * A frontend/client side testing framework and backend build tests diff --git a/src/package.json b/src/package.json index 9fd180ab..8c95c4d3 100644 --- a/src/package.json +++ b/src/package.json @@ -46,5 +46,5 @@ "engines" : { "node" : ">=0.6.0", "npm" : ">=1.0" }, - "version" : "1.2.0" + "version" : "1.2.1" } From 196aafd9d6d72ea09701a1b5b3fce33dc889410a Mon Sep 17 00:00:00 2001 From: Mike Brousseau Date: Wed, 21 Nov 2012 13:35:47 -0500 Subject: [PATCH 06/10] Update src/static/js/pad.js Gramatically change. Changed "You're Password" to "Your Password". --- src/static/js/pad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index b665c2fb..34f2a287 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -310,7 +310,7 @@ function handshake() } else if(obj.accessStatus == "wrongPassword") { - $("#editorloadingbox").html("You're password was wrong
" + + $("#editorloadingbox").html("Your password was wrong
" + ""+ ""); } From a75d17f55a5070fe8114c2e06d8c64502ec03dfa Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Wed, 21 Nov 2012 18:48:33 +0000 Subject: [PATCH 07/10] More stuff into changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcf7b18..a2f7586f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ # 1.2.1 * Allow ! in urls inside the editor (Not Pad urls) * Allow comments in language files - * More languages (Finish, Spanish, Hindi, Dutch) Thanks to TranslateWiki.net team. + * More languages (Finish, Spanish, Bengali, Dutch) Thanks to TranslateWiki.net team. See https://translatewiki.net/w/i.php?title=Special:MessageGroupStats&group=out-etherpad-lite for more details * Bugfix for IE7/8 issue with a JS error #1186 * Bugfix windows package extraction issue and make the .zip file smaller + * Bugfix group pad API export + * Kristen Stewart is a terrible actress and Twilight sucks. # v1.2 * Internationalization / Language / Translation support (i18n) with support for German/French From 28cd6e64b3a1494cdbaef44e936f4e458d7bfa92 Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Wed, 21 Nov 2012 20:09:31 +0000 Subject: [PATCH 08/10] make runner CSS more sane --- tests/frontend/runner.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/frontend/runner.css b/tests/frontend/runner.css index 0e4b5fd1..7d5bb783 100644 --- a/tests/frontend/runner.css +++ b/tests/frontend/runner.css @@ -15,12 +15,15 @@ body { #iframe-container { width: 50%; height: 100%; - float:right; } #iframe-container iframe { - width: 100%; height: 100%; + position:absolute; + min-width:500px; + max-width:800px; + left:50%; + width:100%; } #mocha { From aebf6ee1e8688d4efd8a6a06fb15cad824cac62c Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Wed, 21 Nov 2012 22:22:01 +0000 Subject: [PATCH 09/10] language test should pass int ravis now --- tests/frontend/specs/language.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js index 87d04220..7d294282 100644 --- a/tests/frontend/specs/language.js +++ b/tests/frontend/specs/language.js @@ -1,10 +1,19 @@ +function deletecookie(name) { + document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; +} + describe("Language select and change", function(){ + // Destroy language cookies + deletecookie("language", null); + //create a new pad before each test run beforeEach(function(cb){ helper.newPad(cb); this.timeout(60000); }); + // Destroy language cookies + it("makes text german", function(done) { var inner$ = helper.padInner$; var chrome$ = helper.padChrome$; @@ -21,14 +30,16 @@ describe("Language select and change", function(){ $languageoption.attr('selected','selected'); $language.change(); - helper.waitFor(function() { return $language.val() == "de"}) + helper.waitFor(function() { + return chrome$(".buttonicon-bold").parent()[0]["title"] = "Fett (Strg-B)"; + }) .done(function(){ //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); //get the title of the bold button var boldButtonTitle = $boldButton[0]["title"]; - + //check if the language is now german expect(boldButtonTitle).to.be("Fett (Strg-B)"); done(); @@ -51,7 +62,10 @@ describe("Language select and change", function(){ $languageoption.attr('selected','selected'); $language.change(); - helper.waitFor(function() { return $language.val() == "en";}) + //get the value of the bold button + var $boldButton = chrome$(".buttonicon-bold").parent(); + + helper.waitFor(function() { return $boldButton[0]["title"] != "Fett (Strg-B)";}) .done(function(){ //get the value of the bold button @@ -67,4 +81,4 @@ describe("Language select and change", function(){ }); }); -}); \ No newline at end of file +}); From d6027726e687b04ee23b2c5b5475e2b0d9b15ff5 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Thu, 22 Nov 2012 01:12:30 +0100 Subject: [PATCH 10/10] Fix urls, use github.com/ether Signed-off-by: Hyacinthe Cartiaux --- bin/loadTesting/README | 2 +- doc/api/http_api.md | 2 +- src/node/hooks/express.js | 2 +- src/package.json | 2 +- src/static/js/AttributePool.js | 2 +- src/static/js/ace2_inner.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/loadTesting/README b/bin/loadTesting/README index 297756f9..6a778664 100644 --- a/bin/loadTesting/README +++ b/bin/loadTesting/README @@ -3,7 +3,7 @@ This load tester is extremely useful for testing how many dormant clients can co TODO: Emulate characters being typed into a pad -HOW TO USE (from @mjd75) proper formatting at: https://github.com/Pita/etherpad-lite/issues/360 +HOW TO USE (from @mjd75) proper formatting at: https://github.com/ether/etherpad-lite/issues/360 Server 1: Installed Node.js (etc), EtherPad Lite and MySQL 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 diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js index eb3f6188..1900a86a 100644 --- a/src/node/hooks/express.js +++ b/src/node/hooks/express.js @@ -26,7 +26,7 @@ exports.createServer = function () { { console.warn("Can't get git version for server header\n" + e.message) } - console.log("Report bugs at https://github.com/Pita/etherpad-lite/issues") + console.log("Report bugs at https://github.com/ether/etherpad-lite/issues") serverName = "Etherpad-Lite " + version + " (http://j.mp/ep-lite)"; diff --git a/src/package.json b/src/package.json index 9fd180ab..00dc0f1f 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "name" : "ep_etherpad-lite", "description" : "A Etherpad based on node.js", - "homepage" : "https://github.com/Pita/etherpad-lite", + "homepage" : "https://github.com/ether/etherpad-lite", "keywords" : ["etherpad", "realtime", "collaborative", "editor"], "author" : "Peter 'Pita' Martischka - Primary Technology Ltd", "contributors" : [ diff --git a/src/static/js/AttributePool.js b/src/static/js/AttributePool.js index f5990c07..96ea9b0d 100644 --- a/src/static/js/AttributePool.js +++ b/src/static/js/AttributePool.js @@ -3,7 +3,7 @@ * 90% of the code is still like in the original Etherpad * Look at https://github.com/ether/pad/blob/master/infrastructure/ace/www/easysync2.js * You can find a explanation what a attribute pool is here: - * https://github.com/Pita/etherpad-lite/blob/master/doc/easysync/easysync-notes.txt + * https://github.com/ether/etherpad-lite/blob/master/doc/easysync/easysync-notes.txt */ /* diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 2e56b950..661ea011 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3266,7 +3266,7 @@ function Ace2Inner(){ } } //hide the dropdownso - if(window.parent.parent.padeditbar){ // required in case its in an iframe should probably use parent.. See Issue 327 https://github.com/Pita/etherpad-lite/issues/327 + if(window.parent.parent.padeditbar){ // required in case its in an iframe should probably use parent.. See Issue 327 https://github.com/ether/etherpad-lite/issues/327 window.parent.parent.padeditbar.toggleDropDown("none"); } }