From 38b14c40f0f36f4fb0253d4a91ebec5514d6b2e1 Mon Sep 17 00:00:00 2001 From: Simon Leblanc Date: Mon, 3 Dec 2012 03:43:56 +0100 Subject: [PATCH 1/5] Add same color in pad and chat for author --- src/static/js/ace2_inner.js | 8 ++++++++ src/static/js/cssmanager.js | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 87132603e..da8dea85d 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -166,10 +166,12 @@ function Ace2Inner(){ } var dynamicCSS = null; + var parentDynamicCSS = null; function initDynamicCSS() { dynamicCSS = makeCSSManager("dynamicsyntax"); + parentDynamicCSS = makeCSSManager("dynamicsyntax", true); } var changesetTracker = makeChangesetTracker(scheduler, rep.apool, { @@ -217,6 +219,7 @@ function Ace2Inner(){ if (dynamicCSS) { dynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author))); + parentDynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author))); } } else @@ -234,18 +237,23 @@ function Ace2Inner(){ var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector( getAuthorClassName(author))); + var parentAuthorStyle = parentDynamicCSS.selectorStyle(getAuthorColorClassSelector( + getAuthorClassName(author))); var anchorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector( getAuthorClassName(author))+' > a') // author color authorStyle.backgroundColor = bgcolor; + parentAuthorStyle.backgroundColor = bgcolor; // text contrast if(colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5) { authorStyle.color = '#ffffff'; + parentAuthorStyle.color = '#ffffff'; }else{ authorStyle.color = null; + parentAuthorStyle.color = null; } // anchor text contrast diff --git a/src/static/js/cssmanager.js b/src/static/js/cssmanager.js index e20074498..62f17496f 100644 --- a/src/static/js/cssmanager.js +++ b/src/static/js/cssmanager.js @@ -20,12 +20,13 @@ * limitations under the License. */ -function makeCSSManager(emptyStylesheetTitle) +function makeCSSManager(emptyStylesheetTitle, parentCss) { function getSheetByTitle(title) { - var allSheets = document.styleSheets; + if (parentCss) var allSheets = window.parent.parent.document.styleSheets; + else var allSheets = document.styleSheets; for (var i = 0; i < allSheets.length; i++) { @@ -38,7 +39,7 @@ function makeCSSManager(emptyStylesheetTitle) return null; } - var browserSheet = getSheetByTitle(emptyStylesheetTitle); + var browserSheet = getSheetByTitle(emptyStylesheetTitle, parentCss); function browserRules() { From 3c8258f54d671a92a1b379341a84ce79489397f2 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:15:39 +0000 Subject: [PATCH 2/5] 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 7e4b47f3844d61d118ee82e4c6abec9a39983110 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:15:55 +0000 Subject: [PATCH 3/5] 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 b82af407357b093cf9c7a109c9070ad64d0b0b54 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 18:16:19 +0000 Subject: [PATCH 4/5] 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 110620696eebe7b8a42018ebeb7b9b857df4bd1f Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 5 Dec 2012 16:00:06 +0000 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d3a73f52..71ce8e77a 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ 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"` -Additionally, you'll need [node.js](http://nodejs.org). +Additionally, you'll need [node.js](http://nodejs.org) installed, Ideally the latest stable version, be careful of installing nodejs from apt. **As any user (we recommend creating a separate user called etherpad-lite):**