aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Martischka <pita@pitapoison.de>2010-04-10 10:46:05 +0200
committerPeter Martischka <pita@pitapoison.de>2010-04-10 10:46:05 +0200
commit3a6489d7b064ae812115ad0545eb605f28dd8d6c (patch)
treee289abdfd9e4bf965629faa931fae48bb975364f
parent6938cf57d04bf1af1065c054e7002d44d48265ab (diff)
parentf49fc5640ddcdd9c72ae1e95729fb44073dbb595 (diff)
downloadetherpad-3a6489d7b064ae812115ad0545eb605f28dd8d6c.tar.gz
etherpad-3a6489d7b064ae812115ad0545eb605f28dd8d6c.tar.xz
etherpad-3a6489d7b064ae812115ad0545eb605f28dd8d6c.zip
Merge branch 'master' of http://github.com/redhog/pad
Diffstat (limited to '')
-rw-r--r--etherpad/etc/etherpad.localdev-default.properties1
-rw-r--r--etherpad/src/etherpad/utils.js50
-rw-r--r--etherpad/src/plugins/testplugin/controllers/testplugin.js15
-rw-r--r--etherpad/src/plugins/testplugin/templates/page.ejs23
-rw-r--r--etherpad/src/plugins/testplugin/templates/testplugin.ejs10
-rw-r--r--etherpad/src/templates/pad/pad_body2.ejs576
-rw-r--r--etherpad/src/themes/default/templates/500_body.ejs (renamed from etherpad/src/templates/500_body.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/admin/pluginmanager.ejs (renamed from etherpad/src/templates/admin/pluginmanager.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/email/padinvite.ejs (renamed from etherpad/src/templates/email/padinvite.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/framed/framedfooter.ejs (renamed from etherpad/src/templates/framed/framedfooter.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/framed/framedheader-pro.ejs (renamed from etherpad/src/templates/framed/framedheader-pro.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/framed/framedheader.ejs (renamed from etherpad/src/templates/framed/framedheader.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/framed/framedpage-pro.ejs (renamed from etherpad/src/templates/framed/framedpage-pro.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/framed/framedpage.ejs (renamed from etherpad/src/templates/framed/framedpage.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/html.ejs (renamed from etherpad/src/templates/html.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/main/home.ejs (renamed from etherpad/src/templates/main/home.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/main/pro_signup_body.ejs (renamed from etherpad/src/templates/main/pro_signup_body.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/misc/pad_default.ejs (renamed from etherpad/src/templates/misc/pad_default.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/notice.ejs (renamed from etherpad/src/templates/notice.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pad/create_body.ejs (renamed from etherpad/src/templates/pad/create_body.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pad/pad_body2.ejs499
-rw-r--r--etherpad/src/themes/default/templates/pad/pad_iphone_body.ejs (renamed from etherpad/src/templates/pad/pad_iphone_body.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pad/padview_body.ejs (renamed from etherpad/src/templates/pad/padview_body.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/page.ejs139
-rw-r--r--etherpad/src/themes/default/templates/pro-account/recover.ejs (renamed from etherpad/src/templates/pro-account/recover.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro-account/sign-in.ejs (renamed from etherpad/src/templates/pro-account/sign-in.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro-help/main.ejs (renamed from etherpad/src/templates/pro-help/main.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro-help/pro-help-template.ejs (renamed from etherpad/src/templates/pro-help/pro-help-template.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/account/account-welcome-email.ejs (renamed from etherpad/src/templates/pro/account/account-welcome-email.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/account/forgot-password-email.ejs (renamed from etherpad/src/templates/pro/account/forgot-password-email.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/account/forgot-password.ejs (renamed from etherpad/src/templates/pro/account/forgot-password.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/account/my-account.ejs (renamed from etherpad/src/templates/pro/account/my-account.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/account/signin.ejs (renamed from etherpad/src/templates/pro/account/signin.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/account-manager.ejs (renamed from etherpad/src/templates/pro/admin/account-manager.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/admin-template.ejs (renamed from etherpad/src/templates/pro/admin/admin-template.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/delete-account.ejs (renamed from etherpad/src/templates/pro/admin/delete-account.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/manage-account.ejs (renamed from etherpad/src/templates/pro/admin/manage-account.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/new-account.ejs (renamed from etherpad/src/templates/pro/admin/new-account.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/padlist/pro-padlist.ejs (renamed from etherpad/src/templates/pro/padlist/pro-padlist.ejs)0
-rw-r--r--etherpad/src/themes/default/templates/pro/pro_home.ejs (renamed from etherpad/src/templates/pro/pro_home.ejs)0
-rw-r--r--infrastructure/framework-src/modules/ejs.js16
41 files changed, 735 insertions, 594 deletions
diff --git a/etherpad/etc/etherpad.localdev-default.properties b/etherpad/etc/etherpad.localdev-default.properties
index 98327fd..374101f 100644
--- a/etherpad/etc/etherpad.localdev-default.properties
+++ b/etherpad/etc/etherpad.localdev-default.properties
@@ -20,3 +20,4 @@ transportPrefix = /comet
transportUseWildcardSubdomains = true
useHttpsUrls = false
useVirtualFileRoot = ./src
+theme = default
diff --git a/etherpad/src/etherpad/utils.js b/etherpad/src/etherpad/utils.js
index 3e35f00..1d139ed 100644
--- a/etherpad/src/etherpad/utils.js
+++ b/etherpad/src/etherpad/utils.js
@@ -40,6 +40,8 @@ import("etherpad.admin.plugins");
jimport("java.lang.System.out.print");
jimport("java.lang.System.out.println");
+jimport("java.io.File");
+
//----------------------------------------------------------------
// utilities
//----------------------------------------------------------------
@@ -57,17 +59,58 @@ function randomUniquePadId() {
// template rendering
//----------------------------------------------------------------
+function findExistsingFile(files) {
+ for (var i = 0; i < files.length; i++) {
+ var f = new File('./src' + files[i]);
+ if (f.exists())
+ return files[i];
+ }
+}
+
function findTemplate(filename, plugin) {
- if (plugin != undefined)
- return '/plugins/' + plugin + '/templates/' + filename;
+ var files = [];
+
+ if (plugin != undefined) {
+ files.push('/plugins/' + plugin + '/templates/' + filename);
+ files.push('/themes/' + appjet.config.theme + '/plugins/' + plugin + '/templates/' + filename);
+ files.push('/themes/default/plugins/' + plugin + '/templates/' + filename);
+ }
+ files.push('/themes/' + appjet.config.theme + '/templates/' + filename);
+ files.push('/themes/default/templates/' + filename);
+
+ return findExistsingFile(files);
+}
+
+function Template(params, plugin) {
+ this._defines = {}
+ this._params = params;
+ this._params.template = this;
+ this._plugin = plugin;
+}
+
+Template.prototype.define = function(name, fn) {
+ this._defines[name] = fn;
+ return '';
+}
+
+Template.prototype.use = function (name, fn, arg) {
+ if (this._defines[name] != undefined)
+ return this._defines[name](arg);
+ else if (fn != undefined)
+ return fn(arg);
else
- return '/templates/' + filename;
+ return '';
+}
+
+Template.prototype.inherit = function (template) {
+ return renderTemplateAsString(template, this._params, this._plugin);
}
function renderTemplateAsString(filename, data, plugin) {
data = data || {};
data.helpers = helpers; // global helpers
data.plugins = plugins; // Access callHook and the like...
+ var template = new Template(data, plugin);
var f = findTemplate(filename, plugin); //"/templates/"+filename;
if (! appjet.scopeCache.ejs) {
@@ -76,6 +119,7 @@ function renderTemplateAsString(filename, data, plugin) {
var cacheObj = appjet.scopeCache.ejs[filename];
if (cacheObj === undefined || fileLastModified(f) > cacheObj.mtime) {
var templateText = readFile(f);
+ templateText += "<%: template.use('body', function () { return ''; }); %> ";
cacheObj = {};
cacheObj.tmpl = new EJS({text: templateText, name: filename});
cacheObj.mtime = fileLastModified(f);
diff --git a/etherpad/src/plugins/testplugin/controllers/testplugin.js b/etherpad/src/plugins/testplugin/controllers/testplugin.js
index 0c79e06..da74ade 100644
--- a/etherpad/src/plugins/testplugin/controllers/testplugin.js
+++ b/etherpad/src/plugins/testplugin/controllers/testplugin.js
@@ -29,7 +29,6 @@ import("sqlbase.sqlbase");
import("sqlbase.sqlcommon");
import("sqlbase.sqlobj");
-
function onRequest() {
var isPro = pro_utils.isProDomainRequest();
var userId = padusers.getUserId();
@@ -47,11 +46,13 @@ function onRequest() {
var isProUser = (isPro && ! padusers.isGuest(userId));
- renderHtml("testplugin.ejs",
- {
- isPro: isPro,
- isProAccountHolder: isProUser,
- account: getSessionProAccount(), // may be falsy
- }, 'testplugin');
+ renderHtml(
+ "testplugin.ejs",
+ {
+ isPro: isPro,
+ isProAccountHolder: isProUser,
+ account: getSessionProAccount(), // may be falsy
+ },
+ 'testplugin');
return true;
}
diff --git a/etherpad/src/plugins/testplugin/templates/page.ejs b/etherpad/src/plugins/testplugin/templates/page.ejs
new file mode 100644
index 0000000..71633c0
--- /dev/null
+++ b/etherpad/src/plugins/testplugin/templates/page.ejs
@@ -0,0 +1,23 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %>
+
+<% template.define('body', function() { var ejs_data=''; %>
+ <div id="blabla">
+ <h1>Page header</h1>
+ <%: template.use('content', function() { var ejs_data=''; %>
+ Original content
+ <% return ejs_data; }); %>
+ <div>footer</div>
+ </div>
+<% return ejs_data; }); %>
diff --git a/etherpad/src/plugins/testplugin/templates/testplugin.ejs b/etherpad/src/plugins/testplugin/templates/testplugin.ejs
index f70ca8d..69c4453 100644
--- a/etherpad/src/plugins/testplugin/templates/testplugin.ejs
+++ b/etherpad/src/plugins/testplugin/templates/testplugin.ejs
@@ -24,6 +24,10 @@ limitations under the License. */ %>
helpers.addToHead('\n<style type="text/css" title="dynamicsyntax"></style>\n');
%>
-<div id="padpage">
- Welcome to the test plugin
-</div>
+<% template.inherit('page.ejs') %>
+
+<% template.define('content', function() { var ejs_data=''; %>
+ <div id="padpage">
+ Welcome to the test plugin
+ </div>
+<% return ejs_data; }); %>
diff --git a/etherpad/src/templates/pad/pad_body2.ejs b/etherpad/src/templates/pad/pad_body2.ejs
deleted file mode 100644
index 0eb9029..0000000
--- a/etherpad/src/templates/pad/pad_body2.ejs
+++ /dev/null
@@ -1,576 +0,0 @@
-<% /*
-Copyright 2009 Google Inc.
-Copyright 2010 Pita, Peter Martischka
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS-IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. */ %>
-<% helpers.setHtmlTitle("EtherPad: "+pageTitle); %>
-<% helpers.setBodyId("padbody") %>
-<% helpers.addBodyClass(bodyClass) %>
-<% helpers.includeCss("pad2_ejs.css") %>
-<% helpers.includeJs("undo-xpopup.js") %>
-<% helpers.includeCometJs() %>
-<% helpers.includeJQuery(); %>
-<% helpers.includeJs("json2.js") %>
-<% helpers.includeJs("colorutils.js") %>
-<% helpers.includeJs("ace.js") %>
-<% helpers.includeJs("collab_client.js") %>
-<% helpers.includeJs("draggable.js") %>
-<% helpers.includeJs("pad_utils.js") %>
-<% helpers.includeJs("pad_cookie.js") %>
-<% helpers.includeJs("pad_editor.js") %>
-<% helpers.includeJs("pad_userlist.js") %>
-<% helpers.includeJs("pad_editbar.js") %>
-<% helpers.includeJs("pad_chat.js") %>
-<% helpers.includeJs("pad_docbar.js") %>
-<% helpers.includeJs("pad_impexp.js") %>
-<% helpers.includeJs("pad_savedrevs.js") %>
-<% helpers.includeJs("pad_connectionstatus.js") %>
-<% helpers.includeJs("pad_modals.js") %>
-<% helpers.includeJs("pad2.js") %>
-<% helpers.suppressGA() %>
-<% helpers.setRobotsPolicy({index: false, follow: false}) %>
-<%
- var padUrlAttrValue = request.url.split("?", 1)[0].replace(/\"/g, '&quot;'); //"
-%>
-
-<%
- function exportLink(type, n, label, requiresOffice, url, title) {
- url = url || '/ep/pad/export/'+localPadId+'/latest?format='+type;
- var classes = ["exportlink", "exporthref"+type, "n"+n];
- if (requiresOffice && !hasOffice) {
- classes.push("disabledexport");
- }
- else {
- classes.push("requiresoffice");
- }
- var pieces = ['<a'];
- pieces.push(' class="', classes.join(' '), '"');
- pieces.push(' target="_blank"');
- pieces.push(' href="', url, '"');
- if (title) {
- pieces.push(' title="', title.replace(/\"/g, "&quot;"), '"'); //"
- }
- pieces.push('>', label);
- /* if (title) {
- pieces.push('<sup>?</sup>');
- }*/
- pieces.push('</a>');
- return pieces.join('');
- }
-%>
-
-<div id="padpage">
-
-<div id="padtop">
- <div id="topbar">
- <% /* floated left */ %>
- <div id="topbarleft"><!-- --></div>
- <% /* <a href="#" id="topbarnewpad">New Pad</a> */ %>
- <% /* floated right */ %>
- <div id="topbarright"><!-- --></div>
- <% /* <a href="#" id="topbarfullwidth">Toggle Width</a> */ %>
- <% /* non-floated */ %>
- <div id="topbarcenter">
- <a href="/" id="topbaretherpad">EtherPad</a>
- </div>
-<% if (isProAccountHolder) { %>
- <a id="backtoprosite" href="/ep/padlist/">Return to pad list</a>
- <div id="accountnav"><%= toHTML(account.email) %>
- <a href="/ep/account/sign-out">(sign out)</a>
- </div>
-<% } else if (isPro) { %>
- <div id="accountnav">
- <a href="<%= signinUrl %>">sign in</a>
- </div>
-<% } %>
- <div id="specialkeyarea"><!-- --></div>
- </div>
- <div id="alertbar">
- <div id="servermsg">
- <h3>Server Notice<span id="servermsgdate"><!-- --></span>:</h3>
- <a id="hidetopmsg" href="javascript: void pad.hideServerMessage()">hide</a>
- <p id="servermsgtext"><!-- --></p>
- </div>
- </div>
-
- <div id="docbar">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" id="docbartable">
- <tr>
- <td><img src="/static/img/jun09/pad/roundcorner_left.gif"></td>
- <td id="docbarpadtitle"><span><%= initialTitle %></span></td>
- <td width="100%">&nbsp;</td>
- <%
- plugins.callHookStr('docbarItemsAll', {}, '', '<td class="docbarbutton">', '</td>');
- plugins.callHookStr('docbarItemsPad', {}, '', '<td class="docbarbutton">', '</td>');
- %>
- <% if (isProAccountHolder) { %>
- <td id="docbarsecurity-outer" class="docbarbutton">
- <a href="javascript:void(0)" id="docbarsecurity">
- <img src="/static/img/jun09/pad/icon_security.gif">Security
- </a>
- </td>
- <% } /* isProAccountHolder */ %>
- <td id="docbaroptions-outer" class="docbarbutton">
- <a href="javascript:void(0)" id="docbaroptions">
- <img src="/static/img/jun09/pad/icon_pad_options.gif">Pad&nbsp;Options</a>
- </td>
- <td id="docbarimpexp-outer" class="docbarbutton">
- <a href="javascript:void(0)" id="docbarimpexp">
- <img src="/static/img/jun09/pad/icon_import_export.gif">Import/Export</a>
- </td>
- <td id="docbarsavedrevs-outer" class="docbarbutton">
- <a href="javascript:void(0)" id="docbarsavedrevs">
- <img src="/static/img/jun09/pad/icon_saved_revisions.gif">Saved&nbsp;revisions</a>
- </td>
- <td id="docbarslider-outer" class="docbarbutton highlight">
- <a target="_blank" href="/ep/pad/view/<%= localPadId %>/latest" id="docbarslider">
- <img src="/static/img/jun09/pad/icon_time_slider.gif">Time&nbsp;Slider</a>
- </td>
- <td><img src="/static/img/jun09/pad/roundcorner_right_orange.gif"></td>
- </tr>
- </table>
- <% if (isProAccountHolder) { %>
- <div id="docbarrenamelink">
- <a href="javascript:void(0)">(rename)</a>
- </div>
- <% } /* isProAccountHolder */ %>
- <input type="text" id="padtitleedit"/>
- <div id="padtitlebuttons">
- <a id="padtitlesave" href="javascript:void(0)">Save</a>
- <a id="padtitlecancel" href="javascript:void(0)">Cancel</a>
- </div>
- <div id="impexp-wrapper" class="dbpanel-wrapper">
- <div id="impexp-panel" class="dbpanel-panel">
- <div class="dbpanel-leftedge"><!-- --></div>
- <div class="dbpanel-rightedge"><!-- --></div>
- <div class="dbpanel-botleftcorner"><!-- --></div>
- <div class="dbpanel-botrightcorner"><!-- --></div>
- <div class="dbpanel-middle">
- <div class="dbpanel-inner">
- <div class="dbpanel-top"><!-- --></div>
- </div>
- <div class="dbpanel-bottom"><!-- --></div>
- <div id="importexport">
- <div id="impexp-import">
- <div id="impexp-importlabel"><b>Import</b> from text file, HTML, Word, or RTF:</div>
- <form id="importform" method="post" action="/ep/pad/impexp/import"
- target="importiframe" enctype="multipart/form-data">
- <div class="importformdiv" id="importformfilediv">
- <input type="file" name="file" size="20" id="importfileinput" />
- <div class="importmessage" id="importmessagefail"></div>
- </div>
- <div class="importmessage" id="importmessagesuccess">Successful!</div>
- <div class="importformdiv" id="importformsubmitdiv">
- <input type="hidden" name="padId" value="<%= encodeURIComponent(localPadId) %>" />
- <span class="nowrap">
- <input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput" />
- <img alt="" id="importstatusball" src="/static/img/misc/status-ball.gif" align="top" />
- <img alt="" id="importarrow" src="/static/img/may09/leftarrow2.gif" align="top" />
- </span>
- </div>
- </form>
- </div><!-- /impexp-import -->
- <div id="impexp-export">
- <div id="impexp-exportlabel"><b>Export</b> current pad as:</div>
- <div id="exportlinks">
- <%= exportLink('html', 1, 'HTML', false) %>
- <%= exportLink('txt', 2, 'Plain text', false) %>
- <%= exportLink('link', 3, 'Bookmark file', false, '/ep/pad/linkfile?padId='+localPadId, 'This will save a file that, when opened, takes you to this pad.') %>
- <%= exportLink('doc', 4, 'Microsoft Word', true) %>
- <%= exportLink('pdf', 5, 'PDF', true) %>
- <%= exportLink('odt', 6, 'OpenDocument', true) %>
- </div>
- </div><!-- /impexp-export -->
- <div id="impexp-divider"><!-- --></div>
- <div id="impexp-disabled-clickcatcher"><!-- --></div>
- <a id="impexp-close" href="javascript:void(0)">Hide</a>
- </div><!-- /importexport -->
- </div>
- </div>
- </div>
- <div id="savedrevs-wrapper" class="dbpanel-wrapper">
- <div id="savedrevs-panel" class="dbpanel-panel">
- <div class="dbpanel-leftedge"><!-- --></div>
- <div class="dbpanel-rightedge"><!-- --></div>
- <div class="dbpanel-botleftcorner"><!-- --></div>
- <div class="dbpanel-botrightcorner"><!-- --></div>
- <div class="dbpanel-middle">
- <div class="dbpanel-inner">
- <div class="dbpanel-top"><!-- --></div>
- </div>
- <div class="dbpanel-bottom"><!-- --></div>
- </div>
- <div id="savedrevisions">
- <a href="javascript:void(0)" id="savedrevs-savenow">
- Save Now
- </a>
- <div id="savedrevs-scrolly">
- <div id="savedrevs-scrollleft" class="disabledscrollleft"><!-- --></div>
- <div id="savedrevs-scrollright" class="disabledscrollright"><!-- --></div>
- <div id="savedrevs-scrollouter">
- <div id="savedrevs-scrollinner">
- <!-- -->
- </div>
- </div>
- </div>
- <a id="savedrevs-close" href="javascript:void(0)">Hide</a>
- </div><!-- /savedrevs close -->
- </div>
- </div><!-- /savedrevs-wrapper -->
- <div id="revision-notifier"><span class="label">Saved:</span> <span class="name">Revision 1</span></div>
- <div id="options-wrapper" class="dbpanel-wrapper">
- <div id="options-panel" class="dbpanel-panel">
- <div class="dbpanel-leftedge"><!-- --></div>
- <div class="dbpanel-rightedge"><!-- --></div>
- <div class="dbpanel-botleftcorner"><!-- --></div>
- <div class="dbpanel-botrightcorner"><!-- --></div>
- <div class="dbpanel-middle">
- <div class="dbpanel-inner">
- <div class="dbpanel-top"><!-- --></div>
- </div>
- <div class="dbpanel-bottom"><!-- --></div>
- </div>
- <div id="padoptions">
- <div id="options-viewhead">Shared view options:</div>
- <input type="checkbox" id="options-colorscheck" />
- <label for="options-colorscheck" id="options-colorslabel">Authorship colors</label>
- <input type="checkbox" id="options-linenoscheck" />
- <label for="options-linenoscheck" id="options-linenoslabel">Line numbers</label>
- <div id="options-fontlabel">Display font:</div>
- <select id="viewfontmenu"><option value="normal">Normal</option><option value="monospace">Monospaced</option></select>
- <div id="options-viewexplain">These options affect everyone's view of the pad.</div>
- <a id="options-close" href="javascript:void(0)">Hide</a>
- </div>
- </div>
- </div><!-- /options-wrapper -->
-<% if (isProAccountHolder) { %>
- <div id="security-wrapper" class="dbpanel-wrapper">
- <div id="security-panel" class="dbpanel-panel">
- <div class="dbpanel-leftedge"><!-- --></div>
- <div class="dbpanel-rightedge"><!-- --></div>
- <div class="dbpanel-botleftcorner"><!-- --></div>
- <div class="dbpanel-botrightcorner"><!-- --></div>
- <div class="dbpanel-middle">
- <div class="dbpanel-inner">
- <div class="dbpanel-top"><!-- --></div>
- </div>
- <div class="dbpanel-bottom"><!-- --></div>
- </div>
- <div id="padsecurity">
- <div id="security-access">
- <div id="security-accesshead">Pad Access:</div>
- <input type="radio" name="padaccess" id="access-private" value="deny"/>
- <label for="access-private" id="access-private-label"><strong>Private</strong> (Team account-holders only)</label>
- <input type="radio" name="padaccess" id="access-public" value="allow"/>
- <label for="access-public" id="access-public-label"><strong>Public</strong> (Allow Internet guests)</label>
- </div>
- <div id="security-password">
- <div id="security-passhead">Password:</div>
- <div id="security-passbody">
- <div class="nopassword" id="password-nonedit">
- <div id="password-display">None</div>
- <a href="javascript:void(0)" id="password-setlink">Set...</a>
- <a href="javascript:void(0)" id="password-clearlink">Clear</a>
- </div>
- <div id="password-inedit">
- <a href="javascript:void(0)" id="password-savelink">Save</a>
- <a href="javascript:void(0)" id="password-cancellink">Cancel</a>
- <input type="text" id="security-passwordedit" maxlength="31" />
- </div>
- </div>
- </div>
- <a id="security-close" href="javascript:void(0)">Hide</a>
- </div>
- </div>
- </div><!-- /security-wrapper -->
-<% } /* isProAccountHolder */ %>
- </div><!-- /docbar -->
-</div>
-
-<div id="padmain">
- <div id="padsidebar">
- <div id="padusers">
- <div id="connectionbox" class="cboxconnecting">
- <div id="connectionboxinner">
- <div class="connecting">
- Connecting...
- </div>
- <div class="reconnecting">
- Reestablishing connection...
- </div>
- <div class="disconnected">
- <h2 class="h2_disconnect">Disconnected.</h2>
- <h2 class="h2_userdup">Opened in another window.</h2>
- <h2 class="h2_unauth">No Authorization.</h2>
- <div id="disconnected_looping">
- <p><b>We're having trouble talking to the EtherPad synchronization server.</b>
- You may be connecting through an incompatible firewall or proxy server.</p>
- </div>
- <div id="disconnected_initsocketfail">
- <p><b>We were unable to connect to the EtherPad synchronization server.</b>
- This may be due to an incompatibility with your web
- browser or internet connection.</p>
- </div>
- <div id="disconnected_userdup">
- <p><b>You seem to have opened this pad in another browser window.</b>
- If you'd like to use this window instead, you can reconnect.</p>
- </div>
- <div id="disconnected_unknown">
- <p><b>Lost connection with the EtherPad synchronization
- server.</b> This may be due to a loss of network connectivity.</p>
- </div>
- <div id="disconnected_slowcommit">
- <p><b>Server not responding.</b> This may be due to network connectivity issues or high load on the server.</p>
- </div>
- <div id="disconnected_unauth">
- <p>Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.</p>
- </div>
- <div id="reconnect_advise">
- <p>If this continues to happen, please <a target="_blank" href="/ep/support">let us know</a>
- (opens in new window).</p>
- </div>
- <div id="reconnect_form">
- <button id="forcereconnect">Reconnect Now</button>
- </div>
- </div>
- </div>
- </div>
-
- <div id="connectionstatus">
- <!-- -->
- </div>
-
- <div id="myuser">
- <div id="mycolorpicker">
- <div>
- <div class="pickerswatchouter n1"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n2"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n3"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n4"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n5"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n6"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n7"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n8"><div class="pickerswatch"><!-- --></div></div>
- </div><div>
- <div class="pickerswatchouter n9"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n10"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n11"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n12"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n13"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n14"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n15"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n16"><div class="pickerswatch"><!-- --></div></div>
- </div><div>
- <div class="pickerswatchouter n17"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n18"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n19"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n20"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n21"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n22"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n23"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n24"><div class="pickerswatch"><!-- --></div></div>
- </div><div>
- <div class="pickerswatchouter n25"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n26"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n27"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n28"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n29"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n30"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n31"><div class="pickerswatch"><!-- --></div></div>
- <div class="pickerswatchouter n32"><div class="pickerswatch"><!-- --></div></div>
- </div>
- <div id="mycolorpickersave">Save</div>
- <div id="mycolorpickercancel">Cancel</div>
- </div>
- <div id="myswatchbox"><div id="myswatch"><!-- --></div></div>
- <div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" /></div>
- <div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled" /></div>
- </div>
- <div id="otherusers">
- <div id="guestprompts"><!-- --></div>
- <table id="otheruserstable" cellspacing="0" cellpadding="0" border="0">
- <tr><td></td></tr>
- </table>
- <div id="nootherusers"><a href="javascript:void(0)">Invite</a> other users and they will show up here.</div>
- </div>
- <div id="userlistbuttonarea">
- <a href="javascript:void(0)" id="sharebutton">Share</a>
- </div>
- </div> <!-- /padusers -->
-
- <div id="hdraggie"><!-- --></div>
-
- <div id="padchat">
-<!-- <div id="chattop"><a href="#">View chat logs...</a></div> -->
- <div id="chatlines">
- <a href="javascript:void(0)" id="chatloadmore">Load more history...</a>
- <div id="chatloadingmore">Loading history...</div>
- </div>
- <div id="chatbottom">
- <div id="chatprompt">Chat:</div>
- <div id="chatentryform"><input type="text" id="chatentrybox"/></div>
- </div>
- </div>
- </div> <!-- /padsidebar -->
-
- <div id="padeditor">
- <div id="editbar" class="disabledtoolbar">
- <% /* floated left */ %>
- <div id="editbarleft"><!-- --></div>
- <% /* floated right */ %>
- <div id="editbarright"><!-- --></div>
- <% /* non-floated */ %>
- <div id="editbarinner">
- <table cellpadding="0" cellspacing="0" border = "0" id="editbartable"><tr>
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('bold'));" title="Bold (ctrl-B)"><img src="/static/img/jun09/pad/editbar_bold.gif"></a></td>
- <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('italic'));" title="Italics (ctrl-I)"><img src="/static/img/jun09/pad/editbar_italic.gif"></a></td>
- <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('underline'));" title="Underline (ctrl-U)"><img src="/static/img/jun09/pad/editbar_underline.gif"></a></td>
- <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('strikethrough'));" title="Strikethrough"><img src="/static/img/jun09/pad/editbar_strikethrough.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
-
- <td>&nbsp;&nbsp;</td>
-
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('insertunorderedlist'));" title="Toggle Bullet List"><img src="/static/img/jun09/pad/editbar_insertunorderedlist.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
-
- <td>&nbsp;&nbsp;</td>
-
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('indent'));" title="Indent List"><img src="/static/img/jun09/pad/editbar_indent.gif"></a></td>
- <td class="editbarbutton"><a href="javascript:void (window.pad&&pad.editbarClick('outdent'));" title="Unindent List"><img src="/static/img/jun09/pad/editbar_outdent.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
-
- <td>&nbsp;&nbsp;</td>
-
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('clearauthorship'));" title="Clear Authorship Colors"><img src="/static/img/jun09/pad/editbar_clearauthorship.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
-
- <td>&nbsp;&nbsp;</td>
-
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('undo'));" title="Undo (ctrl-Z)"><img src="/static/img/jun09/pad/editbar_undo.gif"></a></td>
- <td class="editbarbutton"><a href="javascript:void (window.pad&&pad.editbarClick('redo'));" title="Redo (ctrl-Y)"><img src="/static/img/jun09/pad/editbar_redo.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
-
- <td width="100%">&nbsp;</td>
- </tr></table>
- <table cellpadding="0" cellspacing="0" border = "0" id="editbarsavetable">
- <tr>
- <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
- <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('save'));" title="Save Revision"><img src="/static/img/jun09/pad/editbar_save.gif"></a></td>
- <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
- </tr>
- </table>
- </div>
- </div>
- <div id="editorcontainerbox">
- <div id="editorloadingbox">Loading...</div>
- <div id="editorcontainer"><!-- --></div>
- </div>
- </div><!-- /padeditor -->
-
- <div id="bottomarea">
- <div id="viewbarcontents">
- <div id="viewzoomtitle">Zoom:</div>
- <select id="viewzoommenu"><option value="z85">85%</option><option value="z100">100%</option><option value="z115">115%</option><option value="z150">150%</option><option value="z200">200%</option><option value="z300">300%</option></select>
- </div>
-
- <div id="widthprefcheck"
- class="<%= (prefs.isFullWidth?'widthprefchecked':'widthprefunchecked') %>"
- ><!-- --></div>
- <div id="sidebarcheck"
- class="<%= (prefs.hideSidebar?'sidebarunchecked':'sidebarchecked') %>"
- ><!-- --></div>
- </div>
-
-</div><!-- /padmain -->
-
-</div><!-- /padpage -->
-
-<div id="modaloverlay"><div id="modaloverlay-inner"><!-- --></div></div>
-<div id="mainmodals">
- <div id="feedbackbox">
- <div id="feedbackbox-tl"><!-- --></div>
- <div id="feedbackbox-tr"><!-- --></div>
- <div id="feedbackbox-bl"><!-- --></div>
- <div id="feedbackbox-br"><!-- --></div>
- <div id="feedbackbox-back"><!-- --></div>
-<%/* <a href="javascript:void(0)" id="feedbackbox-send"><!-- --></a>
- <input type="text" id="feedbackbox-email" class="modalfield" />
- <textarea id="feedbackbox-message" rows="6" cols="40" class="modalfield"></textarea>
- <div id="feedbackbox-response"><!-- --></div>*/%>
- <div id="feedbackbox-contents">
- <div id="feedbackbox-contentsinner">
- <p><strong>Great, we love feedback! What kind?</strong></p>
- <ul id="uservoicelinks">
- <li><a href="http://uservoice.etherpad.com/pages/17280-feature-requests" target="_blank">Feature Request</a></li>
- <li><a href="http://uservoice.etherpad.com/pages/17285-bugs-and-problems" target="_blank">Bug Report</a></li>
- <li><a href="http://uservoice.etherpad.com/pages/22732-how-are-you-using-etherpad-" target="_blank">How I'm Using It</a></li>
- <li><a href="http://uservoice.etherpad.com/pages/22751-general-questions" target="_blank">Other Question</a></li>
- <li><a href="http://uservoice.etherpad.com/pages/22733-general-feedback" target="_blank">Other Feedback</a></li>
- </ul>
- <p>These links will open UserVoice in a new window.</p>
- <p id="feedbackemails">You can also send email to <a href="feedback"><tt>feedback</tt></a>, <a href="support"><tt>support</tt></a>, or <a href="bugs"><tt>bugs</tt></a> at <tt>etherpad.com</tt>.</p>
- </div>
- </div>
- <a href="javascript:void(0)" id="feedbackbox-hide"><!-- --></a>
- </div>
- <div id="sharebox">
- <div id="sharebox-inner">
- <a href="javascript:void(0)" id="sharebox-hide"><!-- --></a>
- <div id="sharebox-stripe" class="sharebox-stripe-private">
- <div class="public">
- <strong>Public Pad:</strong> This pad is accessible to anyone who
- visits its URL. To make it private, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
- </div>
- <div class="private">
- <strong>Private Pad:</strong> This pad is only accessible to team account-holders. To allow anyone to access it, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
- </div>
- </div>
- <div id="sharebox-forms">
- <div id="sharebox-pastelink">Paste link over email or IM:</div>
- <div id="sharebox-orsend">or send an email invitation...</div>
- <a href="javascript:void(0)" id="sharebox-send"><!-- --></a>
- <input id="sharebox-url" type="text" readonly="readonly" value="<%=padUrlAttrValue%>"/>
- <input type="text" id="sharebox-to" class="modalfield" />
- <input type="text" id="sharebox-subject" class="modalfield" />
- <textarea id="sharebox-message" rows="6" cols="40" class="modalfield"></textarea>
- <div id="sharebox-fieldname-to">To</div>
- <div id="sharebox-fieldname-subject">Subject</div>
- <div id="sharebox-fieldname-message">Message</div>
- <div id="sharebox-dislink"><!-- --></div>
- </div>
- <div id="sharebox-shownwhenexpanded">
- <div id="sharebox-response"><!-- --></div>
- </div>
- </div>
- </div>
-</div>
-
-<% if (request.params.djs) { %>
- <div id="djs"><!-- --></div>
-<% } %>
-
-<form id="reconnectform"
- method="post"
- action="/ep/pad/reconnect"
- accept-charset="UTF-8"
- style="display: none;">
- <input type="hidden" class="padId" name="padId" />
- <input type="hidden" class="diagnosticInfo"
- name="diagnosticInfo" />
- <input type="hidden" class="missedChanges" name="missedChanges" />
-</form>
diff --git a/etherpad/src/templates/500_body.ejs b/etherpad/src/themes/default/templates/500_body.ejs
index 291e0fd..291e0fd 100644
--- a/etherpad/src/templates/500_body.ejs
+++ b/etherpad/src/themes/default/templates/500_body.ejs
diff --git a/etherpad/src/templates/admin/pluginmanager.ejs b/etherpad/src/themes/default/templates/admin/pluginmanager.ejs
index 077d10a..077d10a 100644
--- a/etherpad/src/templates/admin/pluginmanager.ejs
+++ b/etherpad/src/themes/default/templates/admin/pluginmanager.ejs
diff --git a/etherpad/src/templates/email/padinvite.ejs b/etherpad/src/themes/default/templates/email/padinvite.ejs
index c6467b8..c6467b8 100644
--- a/etherpad/src/templates/email/padinvite.ejs
+++ b/etherpad/src/themes/default/templates/email/padinvite.ejs
diff --git a/etherpad/src/templates/framed/framedfooter.ejs b/etherpad/src/themes/default/templates/framed/framedfooter.ejs
index 7994e38..7994e38 100644
--- a/etherpad/src/templates/framed/framedfooter.ejs
+++ b/etherpad/src/themes/default/templates/framed/framedfooter.ejs
diff --git a/etherpad/src/templates/framed/framedheader-pro.ejs b/etherpad/src/themes/default/templates/framed/framedheader-pro.ejs
index 73b0e99..73b0e99 100644
--- a/etherpad/src/templates/framed/framedheader-pro.ejs
+++ b/etherpad/src/themes/default/templates/framed/framedheader-pro.ejs
diff --git a/etherpad/src/templates/framed/framedheader.ejs b/etherpad/src/themes/default/templates/framed/framedheader.ejs
index d6c25cb..d6c25cb 100644
--- a/etherpad/src/templates/framed/framedheader.ejs
+++ b/etherpad/src/themes/default/templates/framed/framedheader.ejs
diff --git a/etherpad/src/templates/framed/framedpage-pro.ejs b/etherpad/src/themes/default/templates/framed/framedpage-pro.ejs
index b3acb07..b3acb07 100644
--- a/etherpad/src/templates/framed/framedpage-pro.ejs
+++ b/etherpad/src/themes/default/templates/framed/framedpage-pro.ejs
diff --git a/etherpad/src/templates/framed/framedpage.ejs b/etherpad/src/themes/default/templates/framed/framedpage.ejs
index b1590f8..b1590f8 100644
--- a/etherpad/src/templates/framed/framedpage.ejs
+++ b/etherpad/src/themes/default/templates/framed/framedpage.ejs
diff --git a/etherpad/src/templates/html.ejs b/etherpad/src/themes/default/templates/html.ejs
index 056d7a7..056d7a7 100644
--- a/etherpad/src/templates/html.ejs
+++ b/etherpad/src/themes/default/templates/html.ejs
diff --git a/etherpad/src/templates/main/home.ejs b/etherpad/src/themes/default/templates/main/home.ejs
index aa5d934..aa5d934 100644
--- a/etherpad/src/templates/main/home.ejs
+++ b/etherpad/src/themes/default/templates/main/home.ejs
diff --git a/etherpad/src/templates/main/pro_signup_body.ejs b/etherpad/src/themes/default/templates/main/pro_signup_body.ejs
index e984878..e984878 100644
--- a/etherpad/src/templates/main/pro_signup_body.ejs
+++ b/etherpad/src/themes/default/templates/main/pro_signup_body.ejs
diff --git a/etherpad/src/templates/misc/pad_default.ejs b/etherpad/src/themes/default/templates/misc/pad_default.ejs
index 96b7e25..96b7e25 100644
--- a/etherpad/src/templates/misc/pad_default.ejs
+++ b/etherpad/src/themes/default/templates/misc/pad_default.ejs
diff --git a/etherpad/src/templates/notice.ejs b/etherpad/src/themes/default/templates/notice.ejs
index 311694f..311694f 100644
--- a/etherpad/src/templates/notice.ejs
+++ b/etherpad/src/themes/default/templates/notice.ejs
diff --git a/etherpad/src/templates/pad/create_body.ejs b/etherpad/src/themes/default/templates/pad/create_body.ejs
index 5fec49a..5fec49a 100644
--- a/etherpad/src/templates/pad/create_body.ejs
+++ b/etherpad/src/themes/default/templates/pad/create_body.ejs
diff --git a/etherpad/src/themes/default/templates/pad/pad_body2.ejs b/etherpad/src/themes/default/templates/pad/pad_body2.ejs
new file mode 100644
index 0000000..a19e685
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pad/pad_body2.ejs
@@ -0,0 +1,499 @@
+<% /*
+Copyright 2009 Google Inc.
+Copyright 2010 Pita, Peter Martischka
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %>
+
+<% template.inherit('page.ejs') %>
+
+<%
+ helpers.setHtmlTitle("EtherPad: "+pageTitle);
+ helpers.includeJs("ace.js");
+ helpers.includeJs("collab_client.js");
+ helpers.includeJs("pad_userlist.js");
+ helpers.includeJs("pad_chat.js");
+ helpers.includeJs("pad_impexp.js");
+ helpers.includeJs("pad_savedrevs.js");
+ helpers.includeJs("pad_connectionstatus.js");
+
+ var padUrlAttrValue = request.url.split("?", 1)[0].replace(/\"/g, '&quot;');
+
+ function exportLink(type, n, label, requiresOffice, url, title) {
+ url = url || '/ep/pad/export/'+localPadId+'/latest?format='+type;
+ var classes = ["exportlink", "exporthref"+type, "n"+n];
+ if (requiresOffice && !hasOffice) {
+ classes.push("disabledexport");
+ }
+ else {
+ classes.push("requiresoffice");
+ }
+ var pieces = ['<a'];
+ pieces.push(' class="', classes.join(' '), '"');
+ pieces.push(' target="_blank"');
+ pieces.push(' href="', url, '"');
+ if (title) {
+ pieces.push(' title="', title.replace(/\"/g, "&quot;"), '"'); //"
+ }
+ pieces.push('>', label);
+ /* if (title) {
+ pieces.push('<sup>?</sup>');
+ }*/
+ pieces.push('</a>');
+ return pieces.join('');
+ }
+%>
+
+
+<% template.define('docBarTitleEditor', function() { var ejs_data=''; %>
+ <% if (isProAccountHolder) { %>
+ <div id="docbarrenamelink">
+ <a href="javascript:void(0)">(rename)</a>
+ </div>
+ <% } /* isProAccountHolder */ %>
+ <input type="text" id="padtitleedit"/>
+ <div id="padtitlebuttons">
+ <a id="padtitlesave" href="javascript:void(0)">Save</a>
+ <a id="padtitlecancel" href="javascript:void(0)">Cancel</a>
+ </div>
+<% return ejs_data; }); %>
+
+
+<% template.define('docBarItems', function() { var ejs_data=''; %>
+ <% if (isProAccountHolder) { %>
+ <td id="docbarsecurity-outer" class="docbarbutton">
+ <a href="javascript:void(0)" id="docbarsecurity">
+ <img src="/static/img/jun09/pad/icon_security.gif">Security
+ </a>
+ </td>
+ <% } /* isProAccountHolder */ %>
+ <td id="docbaroptions-outer" class="docbarbutton">
+ <a href="javascript:void(0)" id="docbaroptions">
+ <img src="/static/img/jun09/pad/icon_pad_options.gif">Pad&nbsp;Options</a>
+ </td>
+ <td id="docbarimpexp-outer" class="docbarbutton">
+ <a href="javascript:void(0)" id="docbarimpexp">
+ <img src="/static/img/jun09/pad/icon_import_export.gif">Import/Export</a>
+ </td>
+ <td id="docbarsavedrevs-outer" class="docbarbutton">
+ <a href="javascript:void(0)" id="docbarsavedrevs">
+ <img src="/static/img/jun09/pad/icon_saved_revisions.gif">Saved&nbsp;revisions</a>
+ </td>
+ <td id="docbarslider-outer" class="docbarbutton highlight">
+ <a target="_blank" href="/ep/pad/view/<%= localPadId %>/latest" id="docbarslider">
+ <img src="/static/img/jun09/pad/icon_time_slider.gif">Time&nbsp;Slider</a>
+ </td>
+<% return ejs_data; }); %>
+
+
+<% template.define('docBarDropdowns', function() { var ejs_data=''; %>
+ <div id="impexp-wrapper" class="dbpanel-wrapper">
+ <div id="impexp-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ <div id="importexport">
+ <div id="impexp-import">
+ <div id="impexp-importlabel"><b>Import</b> from text file, HTML, Word, or RTF:</div>
+ <form id="importform" method="post" action="/ep/pad/impexp/import"
+ target="importiframe" enctype="multipart/form-data">
+ <div class="importformdiv" id="importformfilediv">
+ <input type="file" name="file" size="20" id="importfileinput" />
+ <div class="importmessage" id="importmessagefail"></div>
+ </div>
+ <div class="importmessage" id="importmessagesuccess">Successful!</div>
+ <div class="importformdiv" id="importformsubmitdiv">
+ <input type="hidden" name="padId" value="<%= encodeURIComponent(localPadId) %>" />
+ <span class="nowrap">
+ <input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput" />
+ <img alt="" id="importstatusball" src="/static/img/misc/status-ball.gif" align="top" />
+ <img alt="" id="importarrow" src="/static/img/may09/leftarrow2.gif" align="top" />
+ </span>
+ </div>
+ </form>
+ </div><!-- /impexp-import -->
+ <div id="impexp-export">
+ <div id="impexp-exportlabel"><b>Export</b> current pad as:</div>
+ <div id="exportlinks">
+ <%= exportLink('html', 1, 'HTML', false) %>
+ <%= exportLink('txt', 2, 'Plain text', false) %>
+ <%= exportLink('link', 3, 'Bookmark file', false, '/ep/pad/linkfile?padId='+localPadId, 'This will save a file that, when opened, takes you to this pad.') %>
+ <%= exportLink('doc', 4, 'Microsoft Word', true) %>
+ <%= exportLink('pdf', 5, 'PDF', true) %>
+ <%= exportLink('odt', 6, 'OpenDocument', true) %>
+ </div>
+ </div><!-- /impexp-export -->
+ <div id="impexp-divider"><!-- --></div>
+ <div id="impexp-disabled-clickcatcher"><!-- --></div>
+ <a id="impexp-close" href="javascript:void(0)">Hide</a>
+ </div><!-- /importexport -->
+ </div>
+ </div>
+ </div>
+ <div id="savedrevs-wrapper" class="dbpanel-wrapper">
+ <div id="savedrevs-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="savedrevisions">
+ <a href="javascript:void(0)" id="savedrevs-savenow">
+ Save Now
+ </a>
+ <div id="savedrevs-scrolly">
+ <div id="savedrevs-scrollleft" class="disabledscrollleft"><!-- --></div>
+ <div id="savedrevs-scrollright" class="disabledscrollright"><!-- --></div>
+ <div id="savedrevs-scrollouter">
+ <div id="savedrevs-scrollinner">
+ <!-- -->
+ </div>
+ </div>
+ </div>
+ <a id="savedrevs-close" href="javascript:void(0)">Hide</a>
+ </div><!-- /savedrevs close -->
+ </div>
+ </div><!-- /savedrevs-wrapper -->
+ <div id="revision-notifier"><span class="label">Saved:</span> <span class="name">Revision 1</span></div>
+ <div id="options-wrapper" class="dbpanel-wrapper">
+ <div id="options-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="padoptions">
+ <div id="options-viewhead">Shared view options:</div>
+ <input type="checkbox" id="options-colorscheck" />
+ <label for="options-colorscheck" id="options-colorslabel">Authorship colors</label>
+ <input type="checkbox" id="options-linenoscheck" />
+ <label for="options-linenoscheck" id="options-linenoslabel">Line numbers</label>
+ <div id="options-fontlabel">Display font:</div>
+ <select id="viewfontmenu"><option value="normal">Normal</option><option value="monospace">Monospaced</option></select>
+ <div id="options-viewexplain">These options affect everyone's view of the pad.</div>
+ <a id="options-close" href="javascript:void(0)">Hide</a>
+ </div>
+ </div>
+ </div><!-- /options-wrapper -->
+ <% if (isProAccountHolder) { %>
+ <div id="security-wrapper" class="dbpanel-wrapper">
+ <div id="security-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="padsecurity">
+ <div id="security-access">
+ <div id="security-accesshead">Pad Access:</div>
+ <input type="radio" name="padaccess" id="access-private" value="deny"/>
+ <label for="access-private" id="access-private-label"><strong>Private</strong> (Team account-holders only)</label>
+ <input type="radio" name="padaccess" id="access-public" value="allow"/>
+ <label for="access-public" id="access-public-label"><strong>Public</strong> (Allow Internet guests)</label>
+ </div>
+ <div id="security-password">
+ <div id="security-passhead">Password:</div>
+ <div id="security-passbody">
+ <div class="nopassword" id="password-nonedit">
+ <div id="password-display">None</div>
+ <a href="javascript:void(0)" id="password-setlink">Set...</a>
+ <a href="javascript:void(0)" id="password-clearlink">Clear</a>
+ </div>
+ <div id="password-inedit">
+ <a href="javascript:void(0)" id="password-savelink">Save</a>
+ <a href="javascript:void(0)" id="password-cancellink">Cancel</a>
+ <input type="text" id="security-passwordedit" maxlength="31" />
+ </div>
+ </div>
+ </div>
+ <a id="security-close" href="javascript:void(0)">Hide</a>
+ </div>
+ </div>
+ </div><!-- /security-wrapper -->
+ <% } /* isProAccountHolder */ %>
+<% return ejs_data; }); %>
+
+
+<% template.define('sideBar', function() { var ejs_data=''; %>
+ <div id="padusers">
+ <div id="connectionbox" class="cboxconnecting">
+ <div id="connectionboxinner">
+ <div class="connecting">
+ Connecting...
+ </div>
+ <div class="reconnecting">
+ Reestablishing connection...
+ </div>
+ <div class="disconnected">
+ <h2 class="h2_disconnect">Disconnected.</h2>
+ <h2 class="h2_userdup">Opened in another window.</h2>
+ <h2 class="h2_unauth">No Authorization.</h2>
+ <div id="disconnected_looping">
+ <p><b>We're having trouble talking to the EtherPad synchronization server.</b>
+ You may be connecting through an incompatible firewall or proxy server.</p>
+ </div>
+ <div id="disconnected_initsocketfail">
+ <p><b>We were unable to connect to the EtherPad synchronization server.</b>
+ This may be due to an incompatibility with your web
+ browser or internet connection.</p>
+ </div>
+ <div id="disconnected_userdup">
+ <p><b>You seem to have opened this pad in another browser window.</b>
+ If you'd like to use this window instead, you can reconnect.</p>
+ </div>
+ <div id="disconnected_unknown">
+ <p><b>Lost connection with the EtherPad synchronization
+ server.</b> This may be due to a loss of network connectivity.</p>
+ </div>
+ <div id="disconnected_slowcommit">
+ <p><b>Server not responding.</b> This may be due to network connectivity issues or high load on the server.</p>
+ </div>
+ <div id="disconnected_unauth">
+ <p>Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.</p>
+ </div>
+ <div id="reconnect_advise">
+ <p>If this continues to happen, please <a target="_blank" href="/ep/support">let us know</a>
+ (opens in new window).</p>
+ </div>
+ <div id="reconnect_form">
+ <button id="forcereconnect">Reconnect Now</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="connectionstatus">
+ <!-- -->
+ </div>
+
+ <div id="myuser">
+ <div id="mycolorpicker">
+ <div>
+ <div class="pickerswatchouter n1"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n2"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n3"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n4"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n5"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n6"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n7"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n8"><div class="pickerswatch"><!-- --></div></div>
+ </div><div>
+ <div class="pickerswatchouter n9"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n10"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n11"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n12"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n13"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n14"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n15"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n16"><div class="pickerswatch"><!-- --></div></div>
+ </div><div>
+ <div class="pickerswatchouter n17"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n18"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n19"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n20"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n21"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n22"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n23"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n24"><div class="pickerswatch"><!-- --></div></div>
+ </div><div>
+ <div class="pickerswatchouter n25"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n26"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n27"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n28"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n29"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n30"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n31"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n32"><div class="pickerswatch"><!-- --></div></div>
+ </div>
+ <div id="mycolorpickersave">Save</div>
+ <div id="mycolorpickercancel">Cancel</div>
+ </div>
+ <div id="myswatchbox"><div id="myswatch"><!-- --></div></div>
+ <div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" /></div>
+ <div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled" /></div>
+ </div>
+ <div id="otherusers">
+ <div id="guestprompts"><!-- --></div>
+ <table id="otheruserstable" cellspacing="0" cellpadding="0" border="0">
+ <tr><td></td></tr>
+ </table>
+ <div id="nootherusers"><a href="javascript:void(0)">Invite</a> other users and they will show up here.</div>
+ </div>
+ <div id="userlistbuttonarea">
+ <a href="javascript:void(0)" id="sharebutton">Share</a>
+ </div>
+ </div> <!-- /padusers -->
+
+ <div id="hdraggie"><!-- --></div>
+
+ <div id="padchat">
+ <!-- <div id="chattop"><a href="#">View chat logs...</a></div> -->
+ <div id="chatlines">
+ <a href="javascript:void(0)" id="chatloadmore">Load more history...</a>
+ <div id="chatloadingmore">Loading history...</div>
+ </div>
+ <div id="chatbottom">
+ <div id="chatprompt">Chat:</div>
+ <div id="chatentryform"><input type="text" id="chatentrybox"/></div>
+ </div>
+ </div>
+<% return ejs_data; }); %>
+
+
+<% template.define('editBarItemsLeft', function() { var ejs_data=''; %>
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('bold'));" title="Bold (ctrl-B)"><img src="/static/img/jun09/pad/editbar_bold.gif"></a></td>
+ <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('italic'));" title="Italics (ctrl-I)"><img src="/static/img/jun09/pad/editbar_italic.gif"></a></td>
+ <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('underline'));" title="Underline (ctrl-U)"><img src="/static/img/jun09/pad/editbar_underline.gif"></a></td>
+ <td class="editbarbutton"> <a href="javascript:void (window.pad&&pad.editbarClick('strikethrough'));" title="Strikethrough"><img src="/static/img/jun09/pad/editbar_strikethrough.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+
+ <td>&nbsp;&nbsp;</td>
+
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('insertunorderedlist'));" title="Toggle Bullet List"><img src="/static/img/jun09/pad/editbar_insertunorderedlist.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+
+ <td>&nbsp;&nbsp;</td>
+
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('indent'));" title="Indent List"><img src="/static/img/jun09/pad/editbar_indent.gif"></a></td>
+ <td class="editbarbutton"><a href="javascript:void (window.pad&&pad.editbarClick('outdent'));" title="Unindent List"><img src="/static/img/jun09/pad/editbar_outdent.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+
+ <td>&nbsp;&nbsp;</td>
+
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('clearauthorship'));" title="Clear Authorship Colors"><img src="/static/img/jun09/pad/editbar_clearauthorship.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+
+ <td>&nbsp;&nbsp;</td>
+
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('undo'));" title="Undo (ctrl-Z)"><img src="/static/img/jun09/pad/editbar_undo.gif"></a></td>
+ <td class="editbarbutton"><a href="javascript:void (window.pad&&pad.editbarClick('redo'));" title="Redo (ctrl-Y)"><img src="/static/img/jun09/pad/editbar_redo.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+<% return ejs_data; }); %>
+
+
+<% template.define('editBarItemsRight', function() { var ejs_data=''; %>
+ <td><img src="/static/img/jun09/pad/editbar_groupleft.gif" width="2" height="24"></td>
+ <td class="editbarbutton editbargroupsfirst"><a href="javascript:void (window.pad&&pad.editbarClick('save'));" title="Save Revision"><img src="/static/img/jun09/pad/editbar_save.gif"></a></td>
+ <td><img src="/static/img/jun09/pad/editbar_groupright.gif" width="2" height="24"></td>
+<% return ejs_data; }); %>
+
+
+<% template.define('contentArea', function() { var ejs_data=''; %>
+ <div id="editorloadingbox">Loading...</div>
+ <div id="editorcontainer"><!-- --></div>
+<% return ejs_data; }); %>
+
+
+<% template.define('modals', function() { var ejs_data=''; %>
+ <div id="modaloverlay"><div id="modaloverlay-inner"><!-- --></div></div>
+
+ <div id="mainmodals">
+ <div id="feedbackbox">
+ <div id="feedbackbox-tl"><!-- --></div>
+ <div id="feedbackbox-tr"><!-- --></div>
+ <div id="feedbackbox-bl"><!-- --></div>
+ <div id="feedbackbox-br"><!-- --></div>
+ <div id="feedbackbox-back"><!-- --></div>
+ <%/* <a href="javascript:void(0)" id="feedbackbox-send"><!-- --></a>
+ <input type="text" id="feedbackbox-email" class="modalfield" />
+ <textarea id="feedbackbox-message" rows="6" cols="40" class="modalfield"></textarea>
+ <div id="feedbackbox-response"><!-- --></div>*/%>
+ <div id="feedbackbox-contents">
+ <div id="feedbackbox-contentsinner">
+ <p><strong>Great, we love feedback! What kind?</strong></p>
+ <ul id="uservoicelinks">
+ <li><a href="http://uservoice.etherpad.com/pages/17280-feature-requests" target="_blank">Feature Request</a></li>
+ <li><a href="http://uservoice.etherpad.com/pages/17285-bugs-and-problems" target="_blank">Bug Report</a></li>
+ <li><a href="http://uservoice.etherpad.com/pages/22732-how-are-you-using-etherpad-" target="_blank">How I'm Using It</a></li>
+ <li><a href="http://uservoice.etherpad.com/pages/22751-general-questions" target="_blank">Other Question</a></li>
+ <li><a href="http://uservoice.etherpad.com/pages/22733-general-feedback" target="_blank">Other Feedback</a></li>
+ </ul>
+ <p>These links will open UserVoice in a new window.</p>
+ <p id="feedbackemails">You can also send email to <a href="feedback"><tt>feedback</tt></a>, <a href="support"><tt>support</tt></a>, or <a href="bugs"><tt>bugs</tt></a> at <tt>etherpad.com</tt>.</p>
+ </div>
+ </div>
+ <a href="javascript:void(0)" id="feedbackbox-hide"><!-- --></a>
+ </div>
+ <div id="sharebox">
+ <div id="sharebox-inner">
+ <a href="javascript:void(0)" id="sharebox-hide"><!-- --></a>
+ <div id="sharebox-stripe" class="sharebox-stripe-private">
+ <div class="public">
+ <strong>Public Pad:</strong> This pad is accessible to anyone who
+ visits its URL. To make it private, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
+ </div>
+ <div class="private">
+ <strong>Private Pad:</strong> This pad is only accessible to team account-holders. To allow anyone to access it, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
+ </div>
+ </div>
+ <div id="sharebox-forms">
+ <div id="sharebox-pastelink">Paste link over email or IM:</div>
+ <div id="sharebox-orsend">or send an email invitation...</div>
+ <a href="javascript:void(0)" id="sharebox-send"><!-- --></a>
+ <input id="sharebox-url" type="text" readonly="readonly" value="<%=padUrlAttrValue%>"/>
+ <input type="text" id="sharebox-to" class="modalfield" />
+ <input type="text" id="sharebox-subject" class="modalfield" />
+ <textarea id="sharebox-message" rows="6" cols="40" class="modalfield"></textarea>
+ <div id="sharebox-fieldname-to">To</div>
+ <div id="sharebox-fieldname-subject">Subject</div>
+ <div id="sharebox-fieldname-message">Message</div>
+ <div id="sharebox-dislink"><!-- --></div>
+ </div>
+ <div id="sharebox-shownwhenexpanded">
+ <div id="sharebox-response"><!-- --></div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <% if (request.params.djs) { %>
+ <div id="djs"><!-- --></div>
+ <% } %>
+
+ <form id="reconnectform"
+ method="post"
+ action="/ep/pad/reconnect"
+ accept-charset="UTF-8"
+ style="display: none;">
+ <input type="hidden" class="padId" name="padId" />
+ <input type="hidden" class="diagnosticInfo"
+ name="diagnosticInfo" />
+ <input type="hidden" class="missedChanges" name="missedChanges" />
+ </form>
+
+<% return ejs_data; }); %>
diff --git a/etherpad/src/templates/pad/pad_iphone_body.ejs b/etherpad/src/themes/default/templates/pad/pad_iphone_body.ejs
index 96279ce..96279ce 100644
--- a/etherpad/src/templates/pad/pad_iphone_body.ejs
+++ b/etherpad/src/themes/default/templates/pad/pad_iphone_body.ejs
diff --git a/etherpad/src/templates/pad/padview_body.ejs b/etherpad/src/themes/default/templates/pad/padview_body.ejs
index 75c38fe..75c38fe 100644
--- a/etherpad/src/templates/pad/padview_body.ejs
+++ b/etherpad/src/themes/default/templates/pad/padview_body.ejs
diff --git a/etherpad/src/themes/default/templates/page.ejs b/etherpad/src/themes/default/templates/page.ejs
new file mode 100644
index 0000000..7dd36ad
--- /dev/null
+++ b/etherpad/src/themes/default/templates/page.ejs
@@ -0,0 +1,139 @@
+<% /*
+Copyright 2009 Google Inc.
+Copyright 2010 Pita, Peter Martischka
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %>
+<%
+ helpers.setBodyId("padbody");
+ helpers.addBodyClass(bodyClass);
+ helpers.includeCss("pad2_ejs.css");
+ helpers.includeJs("undo-xpopup.js");
+ helpers.includeCometJs();
+ helpers.includeJQuery();;
+ helpers.includeJs("json2.js");
+ helpers.includeJs("colorutils.js");
+ helpers.includeJs("draggable.js");
+ helpers.includeJs("pad_utils.js");
+ helpers.includeJs("pad_cookie.js");
+ helpers.includeJs("pad_editor.js");
+ helpers.includeJs("pad_editbar.js");
+ helpers.includeJs("pad_docbar.js");
+ helpers.includeJs("pad_modals.js");
+ helpers.includeJs("pad2.js");
+ helpers.suppressGA();
+ helpers.setRobotsPolicy({index: false, follow: false});
+
+%>
+
+<% template.define('body', function() { var ejs_data=''; %>
+ <div id="padpage">
+ <div id="padtop">
+ <div id="topbar">
+ <% /* floated left */ %>
+ <div id="topbarleft"><!-- --></div>
+ <% /* <a href="#" id="topbarnewpad">New Pad</a> */ %>
+ <% /* floated right */ %>
+ <div id="topbarright"><!-- --></div>
+ <% /* <a href="#" id="topbarfullwidth">Toggle Width</a> */ %>
+ <% /* non-floated */ %>
+ <div id="topbarcenter">
+ <a href="/" id="topbaretherpad">EtherPad</a>
+ </div>
+ <% if (isProAccountHolder) { %>
+ <a id="backtoprosite" href="/ep/padlist/">Return to pad list</a>
+ <div id="accountnav"><%= toHTML(account.email) %>
+ <a href="/ep/account/sign-out">(sign out)</a>
+ </div>
+ <% } else if (isPro) { %>
+ <div id="accountnav">
+ <a href="<%= signinUrl %>">sign in</a>
+ </div>
+ <% } %>
+ <div id="specialkeyarea"><!-- --></div>
+ </div>
+ <div id="alertbar">
+ <div id="servermsg">
+ <h3>Server Notice<span id="servermsgdate"><!-- --></span>:</h3>
+ <a id="hidetopmsg" href="javascript: void pad.hideServerMessage()">hide</a>
+ <p id="servermsgtext"><!-- --></p>
+ </div>
+ </div>
+
+ <div id="docbar">
+ <%: template.use('docBarTitle'); %>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" id="docbartable">
+ <tr>
+ <td><img src="/static/img/jun09/pad/roundcorner_left.gif"></td>
+ <td id="docbarpadtitle"><span><%= initialTitle %></span></td>
+ <td width="100%">&nbsp;</td>
+ <%
+ plugins.callHookStr('docbarItemsAll', {}, '', '<td class="docbarbutton">', '</td>');
+ plugins.callHookStr('docbarItemsPad', {}, '', '<td class="docbarbutton">', '</td>');
+ %>
+ <%: template.use('docBarItems'); %>
+ <td><img src="/static/img/jun09/pad/roundcorner_right_orange.gif"></td>
+ </tr>
+ </table>
+ <%: template.use('docBarTitleEditor'); %>
+ <%: template.use('docBarDropdowns'); %>
+ </div><!-- /docbar -->
+ </div>
+
+ <div id="padmain">
+ <div id="padsidebar"><%: template.use('sideBar'); %></div>
+
+ <div id="padeditor">
+ <div id="editbar" class="disabledtoolbar">
+ <% /* floated left */ %>
+ <div id="editbarleft"><!-- --></div>
+ <% /* floated right */ %>
+ <div id="editbarright"><!-- --></div>
+ <% /* non-floated */ %>
+ <div id="editbarinner">
+ <table cellpadding="0" cellspacing="0" border = "0" id="editbartable">
+ <tr>
+ <%: template.use('editBarItemsLeft'); %>
+ <td width="100%">&nbsp;</td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border = "0" id="editbarsavetable">
+ <tr>
+ <%: template.use('editBarItemsRight'); %>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div id="editorcontainerbox"><%: template.use('contentArea'); %></div>
+ </div><!-- /padeditor -->
+
+ <div id="bottomarea">
+ <div id="viewbarcontents">
+ <div id="viewzoomtitle">Zoom:</div>
+ <select id="viewzoommenu"><option value="z85">85%</option><option value="z100">100%</option><option value="z115">115%</option><option value="z150">150%</option><option value="z200">200%</option><option value="z300">300%</option></select>
+ </div>
+
+ <div id="widthprefcheck"
+ class="<%= (prefs.isFullWidth?'widthprefchecked':'widthprefunchecked') %>"
+ ><!-- --></div>
+ <div id="sidebarcheck"
+ class="<%= (prefs.hideSidebar?'sidebarunchecked':'sidebarchecked') %>"
+ ><!-- --></div>
+ </div>
+
+ </div><!-- /padmain -->
+
+ </div><!-- /padpage -->
+
+ <%: template.use('modals'); %>
+
+<% return ejs_data; }); %>
diff --git a/etherpad/src/templates/pro-account/recover.ejs b/etherpad/src/themes/default/templates/pro-account/recover.ejs
index 686fe3b..686fe3b 100644
--- a/etherpad/src/templates/pro-account/recover.ejs
+++ b/etherpad/src/themes/default/templates/pro-account/recover.ejs
diff --git a/etherpad/src/templates/pro-account/sign-in.ejs b/etherpad/src/themes/default/templates/pro-account/sign-in.ejs
index 470bbc4..470bbc4 100644
--- a/etherpad/src/templates/pro-account/sign-in.ejs
+++ b/etherpad/src/themes/default/templates/pro-account/sign-in.ejs
diff --git a/etherpad/src/templates/pro-help/main.ejs b/etherpad/src/themes/default/templates/pro-help/main.ejs
index 428d7f7..428d7f7 100644
--- a/etherpad/src/templates/pro-help/main.ejs
+++ b/etherpad/src/themes/default/templates/pro-help/main.ejs
diff --git a/etherpad/src/templates/pro-help/pro-help-template.ejs b/etherpad/src/themes/default/templates/pro-help/pro-help-template.ejs
index 9cc8205..9cc8205 100644
--- a/etherpad/src/templates/pro-help/pro-help-template.ejs
+++ b/etherpad/src/themes/default/templates/pro-help/pro-help-template.ejs
diff --git a/etherpad/src/templates/pro/account/account-welcome-email.ejs b/etherpad/src/themes/default/templates/pro/account/account-welcome-email.ejs
index 25af6f8..25af6f8 100644
--- a/etherpad/src/templates/pro/account/account-welcome-email.ejs
+++ b/etherpad/src/themes/default/templates/pro/account/account-welcome-email.ejs
diff --git a/etherpad/src/templates/pro/account/forgot-password-email.ejs b/etherpad/src/themes/default/templates/pro/account/forgot-password-email.ejs
index 4595cee..4595cee 100644
--- a/etherpad/src/templates/pro/account/forgot-password-email.ejs
+++ b/etherpad/src/themes/default/templates/pro/account/forgot-password-email.ejs
diff --git a/etherpad/src/templates/pro/account/forgot-password.ejs b/etherpad/src/themes/default/templates/pro/account/forgot-password.ejs
index bbc78dd..bbc78dd 100644
--- a/etherpad/src/templates/pro/account/forgot-password.ejs
+++ b/etherpad/src/themes/default/templates/pro/account/forgot-password.ejs
diff --git a/etherpad/src/templates/pro/account/my-account.ejs b/etherpad/src/themes/default/templates/pro/account/my-account.ejs
index 9634285..9634285 100644
--- a/etherpad/src/templates/pro/account/my-account.ejs
+++ b/etherpad/src/themes/default/templates/pro/account/my-account.ejs
diff --git a/etherpad/src/templates/pro/account/signin.ejs b/etherpad/src/themes/default/templates/pro/account/signin.ejs
index c67bea6..c67bea6 100644
--- a/etherpad/src/templates/pro/account/signin.ejs
+++ b/etherpad/src/themes/default/templates/pro/account/signin.ejs
diff --git a/etherpad/src/templates/pro/admin/account-manager.ejs b/etherpad/src/themes/default/templates/pro/admin/account-manager.ejs
index f1b443f..f1b443f 100644
--- a/etherpad/src/templates/pro/admin/account-manager.ejs
+++ b/etherpad/src/themes/default/templates/pro/admin/account-manager.ejs
diff --git a/etherpad/src/templates/pro/admin/admin-template.ejs b/etherpad/src/themes/default/templates/pro/admin/admin-template.ejs
index e1a7736..e1a7736 100644
--- a/etherpad/src/templates/pro/admin/admin-template.ejs
+++ b/etherpad/src/themes/default/templates/pro/admin/admin-template.ejs
diff --git a/etherpad/src/templates/pro/admin/delete-account.ejs b/etherpad/src/themes/default/templates/pro/admin/delete-account.ejs
index 3de2122..3de2122 100644
--- a/etherpad/src/templates/pro/admin/delete-account.ejs
+++ b/etherpad/src/themes/default/templates/pro/admin/delete-account.ejs
diff --git a/etherpad/src/templates/pro/admin/manage-account.ejs b/etherpad/src/themes/default/templates/pro/admin/manage-account.ejs
index 72529b4..72529b4 100644
--- a/etherpad/src/templates/pro/admin/manage-account.ejs
+++ b/etherpad/src/themes/default/templates/pro/admin/manage-account.ejs
diff --git a/etherpad/src/templates/pro/admin/new-account.ejs b/etherpad/src/themes/default/templates/pro/admin/new-account.ejs
index 2f2cccf..2f2cccf 100644
--- a/etherpad/src/templates/pro/admin/new-account.ejs
+++ b/etherpad/src/themes/default/templates/pro/admin/new-account.ejs
diff --git a/etherpad/src/templates/pro/padlist/pro-padlist.ejs b/etherpad/src/themes/default/templates/pro/padlist/pro-padlist.ejs
index b762679..b762679 100644
--- a/etherpad/src/templates/pro/padlist/pro-padlist.ejs
+++ b/etherpad/src/themes/default/templates/pro/padlist/pro-padlist.ejs
diff --git a/etherpad/src/templates/pro/pro_home.ejs b/etherpad/src/themes/default/templates/pro/pro_home.ejs
index 8d92139..8d92139 100644
--- a/etherpad/src/templates/pro/pro_home.ejs
+++ b/etherpad/src/themes/default/templates/pro/pro_home.ejs
diff --git a/infrastructure/framework-src/modules/ejs.js b/infrastructure/framework-src/modules/ejs.js
index bf14ed3..58c67bc 100644
--- a/infrastructure/framework-src/modules/ejs.js
+++ b/infrastructure/framework-src/modules/ejs.js
@@ -33,6 +33,7 @@
import("jsutils.*");
import("funhtml");
+import("etherpad.log");
jimport("java.lang.System.out.println");
jimport("net.appjet.ajstdlib.execution.executeCodeInNewScope");
@@ -75,12 +76,13 @@ var EjsScanner = function(source, left, right) {
this.double_left = left+'%%';
this.double_right = '%%'+right;
this.left_equal = left+'%=';
+ this.left_colon = left+'%:';
this.left_comment = left+'%#';
if(left=='[') {
- this.SplitRegexp = /(\[%%)|(%%\])|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/;
+ this.SplitRegexp = /(\[%%)|(%%\])|(\[%:)|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/;
}
else {
- this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)')
+ this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_colon+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)')
}
this.source = source;
@@ -178,7 +180,7 @@ EjsBuffer.prototype = {
/* Adaptation from the Compiler of erb.rb */
EjsCompiler = function(source, left) {
- this.pre_cmd = ['var ___ejsO = "";'];
+ this.pre_cmd = ['var ejs_data = "";'];
this.post_cmd = new Array();
this.source = ' ';
if (source != null)
@@ -217,7 +219,7 @@ EjsCompiler.prototype = {
compile: function(options) {
options = options || {};
this.out = '';
- var put_cmd = "___ejsO += ";
+ var put_cmd = "ejs_data += ";
var insert_cmd = put_cmd;
var buff = new EjsBuffer(this.pre_cmd, this.post_cmd);
var content = '';
@@ -241,6 +243,7 @@ EjsCompiler.prototype = {
break;
case scanner.left_delimiter:
case scanner.left_equal:
+ case scanner.left_colon:
case scanner.left_comment:
scanner.stag = token;
if (content.length > 0)
@@ -277,6 +280,9 @@ EjsCompiler.prototype = {
case scanner.left_equal:
buff.push(insert_cmd + "(EjsScanner.to_text(" + content + "))");
break;
+ case scanner.left_colon:
+ buff.push(insert_cmd + content);
+ break;
}
scanner.stag = null;
content = '';
@@ -302,7 +308,7 @@ EjsCompiler.prototype = {
' with(_VIEW) {',
' with (_CONTEXT) {',
this.out,
- ' return ___ejsO;',
+ ' return ejs_data;',
' }',
' }',
'};'