From 033be8f064bc856c55a37574c36600edca1277da Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 5 Apr 2010 13:05:31 -0400 Subject: If fastjar 0.97/0.98 is installed, use jar instead. Otherwise the build will crash, due to: http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html --- etherpad/bin/rebuildjar.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index fc05194..e733d6f 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -17,8 +17,15 @@ bin/java-version.sh if [ -z "$JAR" ]; then - if [ ! -z `which fastjar` ]; then - JAR=fastjar + if [ ! -z $(which fastjar 2>/dev/null) ]; then + # http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html + version=`fastjar --version | grep fastjar | sed 's/.* //g'` + if [[ "$version" = "0.97" || "$version" = "0.98" ]]; then + echo "fastjar version $version can't build etherpad. Falling back to standard jar." + JAR=jar + else + JAR=fastjar + fi else JAR=jar fi -- cgit v1.2.3-1-g7c22 From d9cdda6e130c30020028c1da2c31c6f4cd72dfd4 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Wed, 23 Dec 2009 19:50:42 -0500 Subject: Silence `which growlnotify` output --- etherpad/bin/rebuildjar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index e733d6f..61f180f 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -32,7 +32,7 @@ if [ -z "$JAR" ]; then fi function notify { - if [ ! -z `which growlnotify` ]; then + if [ ! -z $(which growlnotify 2>/dev/null) ]; then echo $0 finished | growlnotify fi } -- cgit v1.2.3-1-g7c22 From 04669dd33b624a9827e335dff15d99f703ca49f8 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Wed, 23 Dec 2009 20:20:50 -0500 Subject: Add depschecking; check environment variables are pointing at existing files --- etherpad/bin/rebuildjar.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index 61f180f..3238163 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -31,6 +31,32 @@ if [ -z "$JAR" ]; then fi fi +function depscheck { + if [ ! -d "$JAVA_HOME" ]; then + echo "\$JAVA_HOME does not point to an existing dir; should be e.g. /usr/java/latest" + exit 1 + fi + if [ ! -d "$SCALA_HOME" ]; then + echo "\$SCALA_HOME does not point to an existing dir; should be e.g. /usr/share/scala" + exit 1 + fi + if [ ! -e "$SCALA" ]; then + echo "\$SCALA does not point to an existing file; should be e.g. /usr/bin/scala" + exit 1 + fi + if [ ! -e "$JAVA" ]; then + echo "\$JAVA does not point to an existing file; should be e.g. /usr/bin/java" + exit 1 + fi + if [ ! -e "$MYSQL_CONNECTOR_JAR" ]; then + echo "\$MYSQL_CONNECTOR_JAR does not point to an existing file; should be e.g. /usr/share/java/mysql-connector-java.jar" + exit 1 + fi + +} + +depscheck + function notify { if [ ! -z $(which growlnotify 2>/dev/null) ]; then echo $0 finished | growlnotify -- cgit v1.2.3-1-g7c22 From 6d5f97d67df88ba77cb38f62c08dcba9fe306f87 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Thu, 24 Dec 2009 01:53:41 -0500 Subject: Attempt to check for Sun javac, and warn the user if we don't find it. --- etherpad/bin/rebuildjar.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index 3238163..a63cc0c 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -53,6 +53,22 @@ function depscheck { exit 1 fi + # Check for javac version. Unfortunately, javac doesn't tell you whether + # it's Sun Java or OpenJDK, but the "java" binary that's in the same + # directory will. + if [ -e "$JAVA_HOME/bin/java" ]; then + ($JAVA_HOME/bin/java -version 2>&1) | { + while read file; do + javaver=$file + done + for word in $javaver; do + if [ $word != "Java" ]; then + echo "$JAVA_HOME/bin/java is from a non-Sun compiler, and may not be able to compile etherpad. If you get syntax errors, you should point \$JAVA_HOME at a Sun Java JDK installation instead." + fi + break + done + } + fi } depscheck -- cgit v1.2.3-1-g7c22 From dc553ec9c0a172c51a69ce2fe9599c1123d493ba Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 5 Apr 2010 13:09:29 -0400 Subject: Make config parsing more robust Previously, config booleans like etherpad.isProduction accepted only "true", and not "true " or " true" or "True" or "TRUE". Fix that. --- etherpad/src/etherpad/globals.js | 4 +++- etherpad/src/etherpad/pne/pne_utils.js | 3 ++- etherpad/src/main.js | 3 ++- infrastructure/net.appjet.oui/config.scala | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/etherpad/src/etherpad/globals.js b/etherpad/src/etherpad/globals.js index 343a989..8087337 100644 --- a/etherpad/src/etherpad/globals.js +++ b/etherpad/src/etherpad/globals.js @@ -22,8 +22,10 @@ var COMETPATH = "/comet"; var COLOR_PALETTE = ['#ffc7c7','#fff1c7','#e3ffc7','#c7ffd5','#c7ffff','#c7d5ff','#e3c7ff','#ffc7f1','#ff8f8f','#ffe38f','#c7ff8f','#8fffab','#8fffff','#8fabff','#c78fff','#ff8fe3','#d97979','#d9c179','#a9d979','#79d991','#79d9d9','#7991d9','#a979d9','#d979c1','#d9a9a9','#d9cda9','#c1d9a9','#a9d9b5','#a9d9d9','#a9b5d9','#c1a9d9','#d9a9cd']; +var trueRegex = /\s*true\s*/i; + function isProduction() { - return (appjet.config['etherpad.isProduction'] == "true"); + return (trueRegex.test(appjet.config['etherpad.isProduction'])); } var SUPERDOMAINS = { diff --git a/etherpad/src/etherpad/pne/pne_utils.js b/etherpad/src/etherpad/pne/pne_utils.js index 3169407..bc105bd 100644 --- a/etherpad/src/etherpad/pne/pne_utils.js +++ b/etherpad/src/etherpad/pne/pne_utils.js @@ -72,7 +72,8 @@ function checkDbVersionUpgrade() { var dbVersion = parseVersionString(dbVersionString); var runningVersion = getVersionNumbers(); - var force = (appjet.config['etherpad.forceDbUpgrade'] == "true"); + var trueRegex = /\s*true\s*/i; + var force = trueRegex.test(appjet.config['etherpad.forceDbUpgrade']); if (!force && (runningVersion.major != dbVersion.major)) { println("Error: you are attempting to update an EtherPad["+dbVersionString+ diff --git a/etherpad/src/main.js b/etherpad/src/main.js index 745f5fa..c881223 100644 --- a/etherpad/src/main.js +++ b/etherpad/src/main.js @@ -259,7 +259,8 @@ function checkRequestIsWellFormed() { // checkHost() //---------------------------------------------------------------- function checkHost() { - if (appjet.config['etherpad.skipHostnameCheck'] == "true") { + var trueRegex = /\s*true\s*/i; + if (trueRegex.test(appjet.config['etherpad.skipHostnameCheck'])) { return; } diff --git a/infrastructure/net.appjet.oui/config.scala b/infrastructure/net.appjet.oui/config.scala index 46e73cf..6201816 100644 --- a/infrastructure/net.appjet.oui/config.scala +++ b/infrastructure/net.appjet.oui/config.scala @@ -41,7 +41,7 @@ object config { null; } } - def boolOrElse(name: String, default: Boolean) = values.get(name).map(_.equals("true")).getOrElse(default); + def boolOrElse(name: String, default: Boolean) = values.get(name).map(_.matches("(?i)\\s*true\\s*")).getOrElse(default); def intOrElse(name: String, default: Int) = values.get(name).map(Integer.parseInt(_)).getOrElse(default); def longOrElse(name: String, default: Long) = values.get(name).map(java.lang.Long.parseLong(_)).getOrElse(default); -- cgit v1.2.3-1-g7c22 From ec9fcd7b971f2cab81050679f662c2a21ce87626 Mon Sep 17 00:00:00 2001 From: Jeppe Toustrup Date: Tue, 5 Jan 2010 23:21:39 +0100 Subject: Made check to see if we are on Solaris, and if we are, then don't use '-u' on the cp command. Also, convertion of spaces to tabs. --- infrastructure/bin/compilecache.sh | 84 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/infrastructure/bin/compilecache.sh b/infrastructure/bin/compilecache.sh index a2b6220..6e42a50 100644 --- a/infrastructure/bin/compilecache.sh +++ b/infrastructure/bin/compilecache.sh @@ -16,49 +16,51 @@ CP_CMD="cp -R -u" if [ `uname` == "Darwin" ]; then - CP_CMD="/bin/cp -R -n" + CP_CMD="/bin/cp -R -n" +elif [ `uname` == "SunOS" ]; then + CP_CMD="cp -R" #Solaris cp does not have '-u' fi function cacheonfiles { - NAME=$1; FILES=$2; FUNC=$3; NOCOPY=1; - if [ -z "$4" ]; then - NOCOPY=0 - fi - REBUILD=0 - BPATH=buildcache/$NAME - FILETEST=$BPATH/t - if [ ! -f $FILETEST ]; then - REBUILD=1 - else - for a in $FILES; do - if [ $FILETEST -ot $a ]; then - echo $a has changed, rebuilding $NAME + NAME=$1; FILES=$2; FUNC=$3; NOCOPY=1; + if [ -z "$4" ]; then + NOCOPY=0 + fi + REBUILD=0 + BPATH=buildcache/$NAME + FILETEST=$BPATH/t + if [ ! -f $FILETEST ]; then REBUILD=1 - fi - done - fi - if [ $REBUILD -eq 1 ]; then - if [ -d $BPATH ]; then - rm -rf $BPATH + else + for a in $FILES; do + if [ $FILETEST -ot $a ]; then + echo $a has changed, rebuilding $NAME + REBUILD=1 + fi + done + fi + if [ $REBUILD -eq 1 ]; then + if [ -d $BPATH ]; then + rm -rf $BPATH + fi + mkdir -p $BPATH + $FUNC $BPATH + pushd $BPATH >> /dev/null + touch t + popd >> /dev/null + else + echo using cached $NAME... + fi + if [ $NOCOPY -ne 1 ]; then + for a in $BPATH/*; do + if [ -d $a ]; then + $CP_CMD $a build/ + elif [ -f $a ]; then + cp $a build/ + else + echo unknown file type $a + exit 1 + fi + done fi - mkdir -p $BPATH - $FUNC $BPATH - pushd $BPATH >> /dev/null - touch t - popd >> /dev/null - else - echo using cached $NAME... - fi - if [ $NOCOPY -ne 1 ]; then - for a in $BPATH/*; do - if [ -d $a ]; then - $CP_CMD $a build/ - elif [ -f $a ]; then - cp $a build/ - else - echo unknown file type $a - exit 1 - fi - done - fi -} +} -- cgit v1.2.3-1-g7c22 From 13bf676f0ce8201de185c83fedda0a16564eb53e Mon Sep 17 00:00:00 2001 From: Jeppe Toustrup Date: Tue, 5 Jan 2010 23:57:38 +0100 Subject: Changed the default setup to a production setup, use 'dev' as a parameter if you want a development setup. --- etherpad/bin/rebuildjar.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index a63cc0c..40f6a10 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -82,10 +82,9 @@ trap notify EXIT source ../infrastructure/bin/compilecache.sh -suffix="-dev"; -if [ "$1" == "prod" ]; then - suffix=""; - shift; +if [ "$1" == "dev" ]; then + suffix="-dev"; + shift fi OWD=`pwd` -- cgit v1.2.3-1-g7c22 From a057a37ce3ec2621fbfaadaea083aef0bd5180cc Mon Sep 17 00:00:00 2001 From: Jeppe Toustrup Date: Wed, 6 Jan 2010 00:16:02 +0100 Subject: Revamped the environment variable testing section, which now asks for values of variables not entered, and tries to guess paths to 'java' and 'scala' binaries. --- etherpad/bin/rebuildjar.sh | 111 +++++++++++++++++++++++++++++---------------- 1 file changed, 73 insertions(+), 38 deletions(-) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index 40f6a10..acd57d2 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -21,7 +21,7 @@ if [ -z "$JAR" ]; then # http://lists.gnu.org/archive/html/fastjar-dev/2009-12/msg00000.html version=`fastjar --version | grep fastjar | sed 's/.* //g'` if [[ "$version" = "0.97" || "$version" = "0.98" ]]; then - echo "fastjar version $version can't build etherpad. Falling back to standard jar." + echo "fastjar version $version can't build EtherPad. Falling back to standard jar." JAR=jar else JAR=fastjar @@ -31,47 +31,82 @@ if [ -z "$JAR" ]; then fi fi -function depscheck { - if [ ! -d "$JAVA_HOME" ]; then - echo "\$JAVA_HOME does not point to an existing dir; should be e.g. /usr/java/latest" - exit 1 - fi - if [ ! -d "$SCALA_HOME" ]; then - echo "\$SCALA_HOME does not point to an existing dir; should be e.g. /usr/share/scala" - exit 1 - fi - if [ ! -e "$SCALA" ]; then - echo "\$SCALA does not point to an existing file; should be e.g. /usr/bin/scala" - exit 1 - fi - if [ ! -e "$JAVA" ]; then - echo "\$JAVA does not point to an existing file; should be e.g. /usr/bin/java" - exit 1 - fi - if [ ! -e "$MYSQL_CONNECTOR_JAR" ]; then - echo "\$MYSQL_CONNECTOR_JAR does not point to an existing file; should be e.g. /usr/share/java/mysql-connector-java.jar" - exit 1 +[ -z "$JAVA_HOME" ] && read -p "\$JAVA_HOME is not set, please enter the path to your Java installation: " JAVA_HOME +if [ ! -e "$JAVA_HOME" ]; then + echo "The path to \$JAVA_HOME ($JAVA_HOME) does not exist, please check and try again." + exit 1 +else + export JAVA_HOME +fi + +[ -z "$SCALA_HOME" ] && read -p "\$SCALA_HOME is not set, please enter the path to your Scala installation: " SCALA_HOME +if [ ! -e "$SCALA_HOME" ]; then + echo "The path to \$SCALA_HOME ($SCALA_HOME) does not exist, please check and try again." + exit 1 +else + export SCALA_HOME +fi + +if [ -z "$SCALA" ]; then + if [ `which scala 2>/dev/null 1>/dev/null` ]; then + SCALA=`which scala` + echo "Using 'scala' binary found at $SCALA. Set \$SCALA to use another one." + elif [ -x "$SCALA_HOME/bin/scala" ]; then + SCALA="$SCALA_HOME/bin/scala" + echo "Using 'scala' binary found at $SCALA. Set \$SCALA to use another one." + else + read -p "\$SCALA is not set and the 'scala' binary could not be found, please enter the path to the file: " SCALA fi +fi +if [ ! -x "$SCALA" ]; then + echo "The path to \$SCALA ($SCALA) is not an executable file, please check and try again." + exit 1 +else + export SCALA +fi - # Check for javac version. Unfortunately, javac doesn't tell you whether - # it's Sun Java or OpenJDK, but the "java" binary that's in the same - # directory will. - if [ -e "$JAVA_HOME/bin/java" ]; then - ($JAVA_HOME/bin/java -version 2>&1) | { - while read file; do - javaver=$file - done - for word in $javaver; do - if [ $word != "Java" ]; then - echo "$JAVA_HOME/bin/java is from a non-Sun compiler, and may not be able to compile etherpad. If you get syntax errors, you should point \$JAVA_HOME at a Sun Java JDK installation instead." - fi - break - done - } +if [ -z "$JAVA" ]; then + if [ `which java 2>/dev/null 1>/dev/null` ]; then + JAVA=`which java` + echo "Using 'java' binary found at $JAVA. Set \$JAVA to use another one." + elif [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" + echo "Using 'java' binary found at $JAVA. Set \$JAVA to use another one." + else + read -p "\$JAVA is not set and the 'java' binary could not be found, please enter the path to the file: " JAVA fi -} +fi +if [ ! -x "$JAVA" ]; then + echo "The path to \$JAVA ($JAVA) is not an executeable file, please check and try again." + exit 1 +else + export JAVA +fi + +[ -z "$MYSQL_CONNECTOR_JAR" ] && read -p "\$MYSQL_CONNECTOR_JAR is not set, please enter the path to the MySQL JDBC driver .jar file: " MYSQL_CONNECTOR_JAR +if [ ! -e "$MYSQL_CONNECTOR_JAR" ]; then + echo "The path to \$MYSQL_CONNECTOR_JAR ($MYSQL_CONNECTOR_JAR) does not exist, please check and try again." + exit 1 +else + export MYSQL_CONNECTOR_JAR +fi -depscheck +# Check for javac version. Unfortunately, javac doesn't tell you whether +# it's Sun Java or OpenJDK, but the "java" binary that's in the same +# directory will. +if [ -e "$JAVA_HOME/bin/java" ]; then + ($JAVA_HOME/bin/java -version 2>&1) | { + while read file; do + javaver=$file + done + for word in $javaver; do + if [ $word != "Java" ]; then + echo "$JAVA_HOME/bin/java is from a non-Sun compiler, and may not be able to compile EtherPad. If you get syntax errors, you should point \$JAVA_HOME at a Sun Java JDK installation instead." + fi + break + done + } +fi function notify { if [ ! -z $(which growlnotify 2>/dev/null) ]; then -- cgit v1.2.3-1-g7c22 From 46f96150d3a56bd9cbdbb308995415613e7bf4e4 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Mon, 5 Apr 2010 21:13:53 +0200 Subject: Plugin-support for docbar menu --- etherpad/src/templates/pad/pad_body2.ejs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/etherpad/src/templates/pad/pad_body2.ejs b/etherpad/src/templates/pad/pad_body2.ejs index c359b14..004c4c1 100644 --- a/etherpad/src/templates/pad/pad_body2.ejs +++ b/etherpad/src/templates/pad/pad_body2.ejs @@ -103,16 +103,21 @@ limitations under the License. */ %>
+ -<% if (isProAccountHolder) { %> - -<% } /* isProAccountHolder */ %> + <% + plugins.callHookStr('docbarItemsAll', {}, '', ''); + plugins.callHookStr('docbarItemsPad', {}, '', ''); + %> + <% if (isProAccountHolder) { %> + + <% } /* isProAccountHolder */ %> +
<%= initialTitle %>   - - Security - - ', '', ' + + Security + + Pad Options @@ -134,12 +139,13 @@ limitations under the License. */ %>
-<% if (isProAccountHolder) { %> - -<% } /* isProAccountHolder */ %> + <% if (isProAccountHolder) { %> + + <% } /* isProAccountHolder */ %>
Save -- cgit v1.2.3-1-g7c22 From 397d10d630db17ef590b330a489f07971673d565 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Mon, 5 Apr 2010 21:58:18 +0200 Subject: Revert "Changed the default setup to a production setup, use 'dev' as a parameter if you want a development setup." This stuff seems broken. Fix and recommit another time? This reverts commit 13bf676f0ce8201de185c83fedda0a16564eb53e. --- etherpad/bin/rebuildjar.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index acd57d2..d32d994 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -117,9 +117,10 @@ trap notify EXIT source ../infrastructure/bin/compilecache.sh -if [ "$1" == "dev" ]; then - suffix="-dev"; - shift +suffix="-dev"; +if [ "$1" == "prod" ]; then + suffix=""; + shift; fi OWD=`pwd` -- cgit v1.2.3-1-g7c22 From 8ab9d08d49839ca30305ef92d8d995963d915746 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Mon, 5 Apr 2010 23:24:09 +0200 Subject: Updated SUPERDOMAINS to use /etc/etherpad.localdev-default.properties --- etherpad/etc/etherpad.localdev-default.properties | 3 ++- etherpad/src/etherpad/globals.js | 13 +++++++------ etherpad/src/etherpad/pro/pro_utils.js | 4 ++-- etherpad/src/etherpad/sessions.js | 2 +- etherpad/src/main.js | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/etherpad/etc/etherpad.localdev-default.properties b/etherpad/etc/etherpad.localdev-default.properties index 97f420f..c540d12 100644 --- a/etherpad/etc/etherpad.localdev-default.properties +++ b/etherpad/etc/etherpad.localdev-default.properties @@ -15,4 +15,5 @@ modulePath = ./src transportPrefix = /comet transportUseWildcardSubdomains = true useVirtualFileRoot = ./src -motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0 \ No newline at end of file +motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0 +topdomains = localhost,redhog.org diff --git a/etherpad/src/etherpad/globals.js b/etherpad/src/etherpad/globals.js index 87fe428..fcd5519 100644 --- a/etherpad/src/etherpad/globals.js +++ b/etherpad/src/etherpad/globals.js @@ -32,13 +32,14 @@ function isProduction() { function isProAccountEnabled() { return (appjet.config['etherpad.proAccounts'] == "true"); } - -var SUPERDOMAINS = { - 'localbox.info': true, - 'localhost': true, - 'etherpad.com': true -}; +function domainEnabled(domain) { + var enabled = appjet.config.topdomains.split(','); + for (var i = 0; i < enabled.length; i++) + if (domain == enabled[i]) + return true; + return false; +} var PNE_RELEASE_VERSION = "1.1.3"; var PNE_RELEASE_DATE = "June 15, 2009"; diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js index c9874f0..5e8b801 100644 --- a/etherpad/src/etherpad/pro/pro_utils.js +++ b/etherpad/src/etherpad/pro/pro_utils.js @@ -72,13 +72,13 @@ function _computeIsProDomainRequest() { var domain = _stripComet(request.domain); - if (SUPERDOMAINS[domain]) { + if (domainEnabled(domain)) { return false; } var requestSuperdomain = getRequestSuperdomain(); - if (SUPERDOMAINS[requestSuperdomain]) { + if (domainEnabled(requestSuperdomain)) { // now see if this subdomain is actually in our database. if (domains.getRequestDomainRecord()) { return true; diff --git a/etherpad/src/etherpad/sessions.js b/etherpad/src/etherpad/sessions.js index 633bf0b..3c10963 100644 --- a/etherpad/src/etherpad/sessions.js +++ b/etherpad/src/etherpad/sessions.js @@ -156,7 +156,7 @@ function preRequestCookieCheck() { } // Only superdomains can set cookies. - var isSuperdomain = SUPERDOMAINS[request.domain]; + var isSuperdomain = domainEnabled(request.domain); if (isSuperdomain) { // superdomain without cookies diff --git a/etherpad/src/main.js b/etherpad/src/main.js index 6faa71a..b77d5ee 100644 --- a/etherpad/src/main.js +++ b/etherpad/src/main.js @@ -268,7 +268,7 @@ function checkHost() { } // we require the domain to either be or a pro domain request. - if (SUPERDOMAINS[request.domain]) { + if (domainEnabled(request.domain)) { return; } if (pro_utils.isProDomainRequest()) { -- cgit v1.2.3-1-g7c22 From d7e6656422854be1c35abf667bec2f950aeea100 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 6 Apr 2010 19:04:02 +0200 Subject: Styling for plugin manager --- etherpad/src/static/css/admin/pluginmanager.css | 44 +++++++++++++++++++++++++ etherpad/src/templates/admin/pluginmanager.ejs | 25 ++++++++------ 2 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 etherpad/src/static/css/admin/pluginmanager.css diff --git a/etherpad/src/static/css/admin/pluginmanager.css b/etherpad/src/static/css/admin/pluginmanager.css new file mode 100644 index 0000000..5814c08 --- /dev/null +++ b/etherpad/src/static/css/admin/pluginmanager.css @@ -0,0 +1,44 @@ +#editorcontainer { + padding: 5pt; +} + +#editorcontainerbox { + overflow: auto; + height: auto; +} + +#editbarinner { + line-height: 36px; + font-size: 16px; + padding-left: 6pt; +} + +#editbarinner a { + font-size: 12px; +} + +#editorcontainerbox table { + margin: 10pt; + border-collapse: collapse; +} + +#editorcontainerbox table tr th { + font-weight: bold; + background: #c3c3c3; +} + +#editorcontainerbox table tr td, +#editorcontainerbox table tr th { + border: 1px solid #c3c3c3; + padding: 2pt; +} + +#editorcontainerbox table tr:first-child th, +#editorcontainerbox table tr:first-child td { + border-top-color: #e6e6e6; +} + +#editorcontainerbox table tr th:first-child, +#editorcontainerbox table tr td:first-child { + border-left-color: #e6e6e6; +} diff --git a/etherpad/src/templates/admin/pluginmanager.ejs b/etherpad/src/templates/admin/pluginmanager.ejs index 8a3d0bf..29f70cd 100644 --- a/etherpad/src/templates/admin/pluginmanager.ejs +++ b/etherpad/src/templates/admin/pluginmanager.ejs @@ -19,6 +19,7 @@ limitations under the License. */ %> helpers.setBodyId("padbody"); helpers.addBodyClass("limwidth nonpropad nonprouser"); helpers.includeCss("pad2_ejs.css"); + helpers.includeCss("admin/pluginmanager.css"); helpers.includeJs("undo-xpopup.js"); helpers.includeCometJs(); helpers.includeJQuery(); @@ -63,13 +64,19 @@ limitations under the License. */ %> <% } %>
-
-
Manage plugins
- - - - - +
+ + + + + + <% + plugins.callHookStr('docbarItemsAll', {}, '', ''); + plugins.callHookStr('docbarItemsPluginManager', {}, '', ''); + %> + + +
Plugin manager ', '', '
@@ -89,12 +96,10 @@ limitations under the License. */ %>
-
-
+
-

Plugin manager

-- cgit v1.2.3-1-g7c22 From f51c8e7bb17d6eba61a2022cf6ecfbc9ff90dbf2 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 6 Apr 2010 19:15:13 +0200 Subject: Changed right hand rounded corner to silver --- etherpad/src/templates/admin/pluginmanager.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etherpad/src/templates/admin/pluginmanager.ejs b/etherpad/src/templates/admin/pluginmanager.ejs index 29f70cd..6c8d76e 100644 --- a/etherpad/src/templates/admin/pluginmanager.ejs +++ b/etherpad/src/templates/admin/pluginmanager.ejs @@ -74,7 +74,7 @@ limitations under the License. */ %> plugins.callHookStr('docbarItemsAll', {}, '', ''); plugins.callHookStr('docbarItemsPluginManager', {}, '', ''); %> - +
Module name', '', '
-- cgit v1.2.3-1-g7c22 From f4fb4fee242f5a85ebcc5646a98672f90dc6b8b4 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 6 Apr 2010 19:17:37 +0200 Subject: Changed button-specific coloring to a class --- etherpad/src/static/css/pad2_ejs.css | 2 +- etherpad/src/templates/pad/pad_body2.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etherpad/src/static/css/pad2_ejs.css b/etherpad/src/static/css/pad2_ejs.css index 0029e7d..a05bf9d 100644 --- a/etherpad/src/static/css/pad2_ejs.css +++ b/etherpad/src/static/css/pad2_ejs.css @@ -91,7 +91,7 @@ a#hidetopmsg { position: absolute; right: 5px; bottom: 5px; } float: right; } -#docbarslider-outer +.docbarbutton.highlight { background-color: #fef2bd; border: 1px solid #CCC; diff --git a/etherpad/src/templates/pad/pad_body2.ejs b/etherpad/src/templates/pad/pad_body2.ejs index 004c4c1..ca9dc83 100644 --- a/etherpad/src/templates/pad/pad_body2.ejs +++ b/etherpad/src/templates/pad/pad_body2.ejs @@ -133,7 +133,7 @@ limitations under the License. */ %> Saved revisions - + Time Slider -- cgit v1.2.3-1-g7c22 From a2151e06591cf6467a1e0ea36ca3961ae8b73930 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 6 Apr 2010 19:32:17 +0200 Subject: More plugin manager styling --- etherpad/src/static/css/admin/pluginmanager.css | 18 ++++++++++++++++++ etherpad/src/templates/admin/pluginmanager.ejs | 10 +++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/etherpad/src/static/css/admin/pluginmanager.css b/etherpad/src/static/css/admin/pluginmanager.css index 5814c08..136a713 100644 --- a/etherpad/src/static/css/admin/pluginmanager.css +++ b/etherpad/src/static/css/admin/pluginmanager.css @@ -42,3 +42,21 @@ #editorcontainerbox table tr td:first-child { border-left-color: #e6e6e6; } + +.mousover_parent .mouseover_child { + display: none; + position: absolute; + padding: 4pt; + + border-top-color: #e6e6e6; + border-bottom-color: #c3c3c3; + border-left-color: #e6e6e6; + border-right-color: #c3c3c3; + border: 1px solid; + + background: #ffffff; +} + +.mousover_parent:hover .mouseover_child { + display: block; +} diff --git a/etherpad/src/templates/admin/pluginmanager.ejs b/etherpad/src/templates/admin/pluginmanager.ejs index 6c8d76e..1cd7139 100644 --- a/etherpad/src/templates/admin/pluginmanager.ejs +++ b/etherpad/src/templates/admin/pluginmanager.ejs @@ -108,7 +108,12 @@ limitations under the License. */ %> <% for (var plugin in plugins.pluginModules) { %> - <%= plugins.pluginModules[plugin].description %> + + <%= plugin %> +
+ <%= plugins.pluginModules[plugin].description %> +
+ <% if (plugins.plugins[plugin] !== undefined) { %> Installed @@ -120,6 +125,9 @@ limitations under the License. */ %> <% if (plugins.plugins[plugin] !== undefined) { %> Uninstall Reinstall + <% if (plugins.plugins[plugin].configLink !== undefined) { %> + Configure + <% } %> <% } else { %> Install <% } %> -- cgit v1.2.3-1-g7c22 From 06fbed86dcec9b4021ae782d293dfac73436fef4 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 6 Apr 2010 19:37:31 +0200 Subject: Better plugin descriptions --- etherpad/src/plugins/fileUpload/main.js | 2 +- etherpad/src/plugins/twitterStyleTags/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etherpad/src/plugins/fileUpload/main.js b/etherpad/src/plugins/fileUpload/main.js index 5ff105f..71bd819 100644 --- a/etherpad/src/plugins/fileUpload/main.js +++ b/etherpad/src/plugins/fileUpload/main.js @@ -3,7 +3,7 @@ import("plugins.fileUpload.hooks"); function init() { this.hooks = ['handlePath']; - this.description = 'File upload manager'; + this.description = 'File upload manager adds a button to pads to upload a file. A URL to the uploaded file is then inserted into the pad.'; this.handlePath = hooks.handlePath; this.install = install; this.uninstall = uninstall; diff --git a/etherpad/src/plugins/twitterStyleTags/main.js b/etherpad/src/plugins/twitterStyleTags/main.js index 5f42dea..34d5d85 100644 --- a/etherpad/src/plugins/twitterStyleTags/main.js +++ b/etherpad/src/plugins/twitterStyleTags/main.js @@ -7,7 +7,7 @@ import("sqlbase.sqlcommon"); function init() { this.hooks = ['handlePath', 'aceGetFilterStack', 'aceCreateDomLine', 'padModelWriteToDB']; this.client = new main.init(); - this.description = 'Twitter-style tags'; + this.description = 'Twitter-style tags allows the user to tag pads by writing #tagname anywhere in the pad text. Tags are automatically linked to searches for that tag in other pads. This plugin also provides an alternative home-page for Etherpad with a display of the last changed public pads as well as that information available as an RSS stream.'; this.handlePath = hooks.handlePath; this.aceGetFilterStack = main.aceGetFilterStack; this.aceCreateDomLine = main.aceCreateDomLine; -- cgit v1.2.3-1-g7c22