Merge branch 'develop' of https://github.com/Pita/etherpad-lite into develop

pull/840/merge
johnyma22 2012-04-20 23:13:31 +01:00
commit ee77257636
9 changed files with 420 additions and 394 deletions

View File

@ -23,6 +23,7 @@ var ejs = require("ejs");
var fs = require("fs"); var fs = require("fs");
var path = require("path"); var path = require("path");
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks.js"); var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks.js");
var resolve = require("resolve");
exports.info = { exports.info = {
buf_stack: [], buf_stack: [],
@ -91,13 +92,28 @@ exports.inherit = function (name, args) {
exports.info.file_stack[exports.info.file_stack.length-1].inherit.push({name:name, args:args}); exports.info.file_stack[exports.info.file_stack.length-1].inherit.push({name:name, args:args});
} }
exports.require = function (name, args) { exports.require = function (name, args, mod) {
if (args == undefined) args = {}; if (args == undefined) args = {};
if ((name.indexOf("./") == 0 || name.indexOf("../") == 0) && exports.info.file_stack.length) { var basedir = __dirname;
name = path.join(path.dirname(exports.info.file_stack[exports.info.file_stack.length-1].path), name); var paths = [];
if (exports.info.file_stack.length) {
basedir = path.dirname(exports.info.file_stack[exports.info.file_stack.length-1].path);
} }
var ejspath = require.resolve(name) if (mod) {
basedir = path.dirname(mod.filename);
paths = mod.paths;
}
var ejspath = resolve.sync(
name,
{
paths : paths,
basedir : basedir,
extensions : [ '.html', '.ejs' ],
}
)
args.e = exports; args.e = exports;
args.require = require; args.require = require;

View File

@ -1,138 +1,123 @@
body { body {
margin: 0; margin: 0;
height: 100%; height: 100%;
color: #333; color: #333;
font: 14px helvetica, sans-serif; font: 14px helvetica, sans-serif;
background: #ddd; background: #ddd;
background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
border-top: 8px solid rgba(51,51,51,.8); border-top: 8px solid rgba(51,51,51,.8);
} }
#wrapper { #wrapper {
border-top: 1px solid #999; margin-top: 160px;
margin-top: 160px; padding: 15px;
padding: 15px; background: #fff;
background: #eee; opacity: .9;
background: -webkit-linear-gradient(#fff,#ccc); box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
background: -moz-linear-gradient(#fff,#ccc); max-width: 700px;
background: -ms-linear-gradient(#fff,#ccc); margin: auto;
background: -o-linear-gradient(#fff,#ccc); border-radius: 0 0 7px 7px;
opacity: .9; }
box-shadow: 0px 1px 8px rgba(0,0,0,0.3); h1 {
max-width: 1200px; font-size: 29px;
margin: auto; }
} h2 {
#inner { font-size: 24px;
width: 300px; }
margin: 0 auto; .seperator {
} margin: 10px 0;
#button:hover { height: 1px;
cursor: pointer; background: #aaa;
background: #666; background: -webkit-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
background: -webkit-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747); background: -moz-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
background: -moz-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747); background: -ms-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
background: -ms-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747); background: -o-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
background: -o-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747); }
} form {
#button:active { margin-bottom: 0;
box-shadow: inset 0 1px 12px rgba(0,0,0,0.9); }
background: #444; #inner {
} width: 300px;
#label { margin: 0 auto;
text-align: left; }
text-shadow: 0 1px 1px #fff; input {
margin: 16px auto 0; font-weight: bold;
} font-size: 15px;
form { }
border: 1px solid #bbb; input[type="button"] {
border-radius: 3px; padding: 4px 6px;
position: relative; margin: 0;
} }
button, input { input[type="button"].do-install, input[type="button"].do-uninstall {
font-weight: bold; float: right;
font-size: 15px; width: 100px;
} }
input[type="button"] { input[type="button"]#do-search {
height:30px; display: block;
} }
input[type="text"] { input[type="text"] {
border-radius: 3px; border-radius: 3px;
box-sizing: border-box; box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
padding: 10px 45px 10px 10px; padding: 10px;
*padding: 0; /* IE7 hack */ *padding: 0; /* IE7 hack */
width: 100%; width: 100%;
outline: none; outline: none;
border: none; border: 1px solid #ddd;
} margin: 0 0 5px 0;
button{ max-width: 500px;
display:block; }
} table {
@media only screen and (min-device-width: 320px) and (max-device-width: 720px) { border: 1px solid #ddd;
body { border-radius: 3px;
background: #bbb; border-spacing: 0;
background: -webkit-linear-gradient(#aaa,#eee 60%) center fixed; width: 100%;
background: -moz-linear-gradient(#aaa,#eee 60%) center fixed; margin: 20px 0;
background: -ms-linear-gradient(#aaa,#eee 60%) center fixed; }
} table thead tr {
#wrapper { background: #eee;
margin-top: 0; }
} td, th {
#inner { padding: 5px;
width: 95%; }
} .template {
#label { display: none;
text-align: center; }
} .dialog {
} display: none;
position: absolute;
table { left: 50%;
border-collapse: collapse; top: 50%;
} width: 700px;
td, th { height: 500px;
border: 1px solid black; margin-left: -350px;
padding-left: 10px; margin-top: -250px;
padding-right: 10px; border: 3px solid #999;
padding-top: 2px; background: #eee;
padding-bottom: 2px; }
} .dialog .title {
.template { margin: 0;
display: none; padding: 2px;
} border-bottom: 3px solid #999;
.dialog { font-size: 24px;
display: none; line-height: 24px;
position: absolute; height: 24px;
left: 50%; overflow: hidden;
top: 50%; }
width: 700px; .dialog .title .close {
height: 500px; float: right;
margin-left: -350px; padding: 1px 10px;
margin-top: -250px; }
border: 3px solid #999999; .dialog .history {
background: #eeeeee; background: #222;
} color: #eee;
.dialog .title { position: absolute;
margin: 0; top: 41px;
padding: 2px; bottom: 10px;
border-bottom: 3px solid #999999; left: 10px;
font-size: 24px; right: 10px;
line-height: 24px; padding: 2px;
height: 24px; overflow: auto;
overflow: hidden; }
}
.dialog .title .close {
float: right;
}
.dialog .history {
background: #222222;
color: #eeeeee;
position: absolute;
top: 41px;
bottom: 10px;
left: 10px;
right: 10px;
padding: 2px;
overflow: auto;
}

View File

@ -167,7 +167,13 @@ require.setGlobalKeyPath("require");\n\
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]); buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
buffer.push(KERNEL_BOOT); buffer.push(KERNEL_BOOT);
buffer.push('<\/script>'); buffer.push('<\/script>');
} } else {
file = KERNEL_SOURCE;
buffer.push('<script type="application/javascript" src="' + KERNEL_SOURCE + '"><\/script>');
buffer.push('<script type="text/javascript">');
buffer.push(KERNEL_BOOT);
buffer.push('<\/script>');
}
} }
function pushScriptsTo(buffer) { function pushScriptsTo(buffer) {
/* Folling is for packaging regular expression. */ /* Folling is for packaging regular expression. */

View File

@ -229,6 +229,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
result.node.innerHTML = curHTML; result.node.innerHTML = curHTML;
} }
if (lineClass !== null) result.node.className = lineClass; if (lineClass !== null) result.node.className = lineClass;
hooks.callAll("acePostWriteDomLineHTML", {
node: result.node
});
} }
result.prepareForAdd = writeHTML; result.prepareForAdd = writeHTML;
result.finishUpdate = writeHTML; result.finishUpdate = writeHTML;

View File

@ -182,7 +182,7 @@ var padeditbar = (function()
//hide all modules //hide all modules
if(moduleName == "none") if(moduleName == "none")
{ {
$("#editbar ul#menu_right > li").removeClass("selected"); $(".toolbar ul.menu_right li").removeClass("selected");
for(var i=0;i<modules.length;i++) for(var i=0;i<modules.length;i++)
{ {
//skip the userlist //skip the userlist
@ -200,11 +200,11 @@ var padeditbar = (function()
else else
{ {
var nth_child = indexOf(modules, moduleName) + 1; var nth_child = indexOf(modules, moduleName) + 1;
if (nth_child > 0 && nth_child <= (modules.length-1)) { if (nth_child > 0 && nth_child <= (modules.length-1)) {
$("#editbar ul#menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected"); $(".toolbar ul.menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected");
$("#editbar ul#menu_right li:nth-child(" + nth_child + ")").toggleClass("selected"); $(".toolbar ul.menu_right li:nth-child(" + nth_child + ")").toggleClass("selected");
} }
if(modules[modules.length-1] === moduleName) $("#editbar ul#menu_right li").removeClass("selected"); if(modules[modules.length-1] === moduleName) $(".toolbar ul.menu_right li").removeClass("selected");
//hide all modules that are not selected and show the selected one //hide all modules that are not selected and show the selected one
for(var i=0;i<modules.length;i++) for(var i=0;i<modules.length;i++)
{ {

View File

@ -748,13 +748,14 @@ function closeColorPicker(accept)
var newColor = $("#mycolorpickerpreview").css("background-color"); var newColor = $("#mycolorpickerpreview").css("background-color");
var parts = newColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); var parts = newColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
// parts now should be ["rgb(0, 70, 255", "0", "70", "255"] // parts now should be ["rgb(0, 70, 255", "0", "70", "255"]
delete (parts[0]); if (parts) {
for (var i = 1; i <= 3; ++i) { delete (parts[0]);
parts[i] = parseInt(parts[i]).toString(16); for (var i = 1; i <= 3; ++i) {
if (parts[i].length == 1) parts[i] = '0' + parts[i]; parts[i] = parseInt(parts[i]).toString(16);
if (parts[i].length == 1) parts[i] = '0' + parts[i];
}
var newColor = "#" +parts.join(''); // "0070ff"
} }
var newColor = "#" +parts.join(''); // "0070ff"
myUserInfo.colorId = newColor; myUserInfo.colorId = newColor;
pad.notifyChangeColor(newColor); pad.notifyChangeColor(newColor);
paduserlist.renderMyUserInfo(); paduserlist.renderMyUserInfo();

View File

@ -61,7 +61,7 @@ exports.loadFn = function (path, hookName) {
return fn; return fn;
}; };
exports.extractHooks = function (parts, hook_set_name) { exports.extractHooks = function (parts, hook_set_name, plugins) {
var hooks = {}; var hooks = {};
_.each(parts,function (part) { _.each(parts,function (part) {
_.chain(part[hook_set_name] || {}) _.chain(part[hook_set_name] || {})
@ -69,14 +69,27 @@ exports.extractHooks = function (parts, hook_set_name) {
.each(function (hook_name) { .each(function (hook_name) {
if (hooks[hook_name] === undefined) hooks[hook_name] = []; if (hooks[hook_name] === undefined) hooks[hook_name] = [];
var hook_fn_name = part[hook_set_name][hook_name]; var hook_fn_name = part[hook_set_name][hook_name];
var hook_fn = exports.loadFn(hook_fn_name, hook_name);
/* On the server side, you can't just
* require("pluginname/whatever") if the plugin is installed as
* a dependency of another plugin! Bah, pesky little details of
* npm... */
if (!exports.isClient) {
hook_fn_name = path.normalize(path.join(path.dirname(exports.plugins[part.plugin].package.path), hook_fn_name));
}
try {
var hook_fn = exports.loadFn(hook_fn_name, hook_name);
if (!hook_fn) {
throw "Not a function";
}
} catch (exc) {
console.error("Failed to load '" + hook_fn_name + "' for '" + part.full_name + "/" + hook_set_name + "/" + hook_name + "': " + exc.toString())
}
if (hook_fn) { if (hook_fn) {
hooks[hook_name].push({"hook_name": hook_name, "hook_fn": hook_fn, "hook_fn_name": hook_fn_name, "part": part}); hooks[hook_name].push({"hook_name": hook_name, "hook_fn": hook_fn, "hook_fn_name": hook_fn_name, "part": part});
} else { }
console.error("Unable to load hook function for " + part.full_name + " for hook " + hook_name + ": " + part.hooks[hook_name]);
}
}); });
}); });
return hooks; return hooks;
@ -90,7 +103,7 @@ if (exports.isClient) {
// which appears to fix the issue. // which appears to fix the issue.
var callback = function () {setTimeout(cb, 0);}; var callback = function () {setTimeout(cb, 0);};
jQuery.getJSON('/pluginfw/plugin-definitions.json', function(data) { jQuery.getJSON('../pluginfw/plugin-definitions.json', function(data) {
exports.plugins = data.plugins; exports.plugins = data.plugins;
exports.parts = data.parts; exports.parts = data.parts;
exports.hooks = exports.extractHooks(exports.parts, "client_hooks"); exports.hooks = exports.extractHooks(exports.parts, "client_hooks");
@ -139,7 +152,7 @@ exports.update = function (cb) {
if (err) cb(err); if (err) cb(err);
exports.plugins = plugins; exports.plugins = plugins;
exports.parts = exports.sortParts(parts); exports.parts = exports.sortParts(parts);
exports.hooks = exports.extractHooks(exports.parts, "hooks"); exports.hooks = exports.extractHooks(exports.parts, "hooks");
exports.loaded = true; exports.loaded = true;
exports.callInit(cb); exports.callInit(cb);
} }

View File

@ -1,84 +1,87 @@
<html> <html>
<head> <head>
<title>Plugin manager</title> <title>Plugin manager</title>
<link href="../../static/css/admin.css" rel="stylesheet" type="text/css" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<script src="../../static/js/jquery.js"></script> <link rel="stylesheet" href="../../static/css/admin.css">
<script src="../../socket.io/socket.io.js"></script> <script src="../../static/js/jquery.js"></script>
<script src="../../static/js/admin/plugins.js"></script> <script src="../../socket.io/socket.io.js"></script>
</head> <script src="../../static/js/admin/plugins.js"></script>
<body> </head>
<div id="wrapper"> <body>
<div id="wrapper">
<% if (errors.length) { %>
<div class="errors"> <% if (errors.length) { %>
<% errors.forEach(function (item) { %> <div class="errors">
<div class="error"><%= item.toString() %></div> <% errors.forEach(function (item) { %>
<% }) %> <div class="error"><%= item.toString() %></div>
</div> <% }) %>
<% } %> </div>
<% } %>
<h1>Installed plugins</h1>
<table> <h1>Etherpad Lite</h1>
<thead> <div class="seperator"></div>
<tr> <h2>Installed plugins</h2>
<th>Name</th> <table>
<th>Description</th> <thead>
<td></td> <tr>
</tr> <th>Name</th>
</thead> <th>Description</th>
<tbody class="template"> <td></td>
<tr id="installed-plugin-template"> </tr>
<td class="name"></td> </thead>
<td class="description"></td> <tbody class="template">
<td class="actions"> <tr id="installed-plugin-template">
<input type="button" value="Uninstall" class="do-uninstall"> <td class="name"></td>
</td> <td class="description"></td>
</tr> <td class="actions">
</tbody> <input type="button" value="Uninstall" class="do-uninstall">
<tbody id="installed-plugins"> </td>
</tbody> </tr>
</table> </tbody>
<tbody id="installed-plugins">
<div class="paged listing search-results"> </tbody>
<h1>Search for plugins to install</h1> </table>
<form>
<input type="text" name="search" value="" id="search-query"> <div class="paged listing search-results">
<input type="button" value="Search" id="do-search"> <div class="seperator"></div>
</form> <h2>Search for plugins to install</h2>
<table> <form>
<thead> <input type="text" name="search" placeholder="Search term" id="search-query">
<tr> <input type="button" value="Search" id="do-search">
<th>Name</th> </form>
<th>Description</th> <table>
<td></td> <thead>
</tr> <tr>
</thead> <th>Name</th>
<tbody class="template"> <th>Description</th>
<tr> <td></td>
<td class="name"></td> </tr>
<td class="description"></td> </thead>
<td class="actions"> <tbody class="template">
<input type="button" value="Install" class="do-install"> <tr>
</td> <td class="name"></td>
</tr> <td class="description"></td>
</tbody> <td class="actions">
<tbody class="results"> <input type="button" value="Install" class="do-install">
</tbody> </td>
</table> </tr>
<input type="button" value="<<" class="do-prev-page"> </tbody>
<span class="offset"></span>..<span class="limit"></span> of <span class="total"></span>. <tbody class="results">
<input type="button" value=">>" class="do-next-page"> </tbody>
</div> </table>
<input type="button" value="<<" class="do-prev-page">
<span class="offset"></span>..<span class="limit"></span> of <span class="total"></span>.
<div id="progress" class="dialog"> <input type="button" value=">>" class="do-next-page">
<h1 class="title"> </div>
Please wait: <span class="message"></span>
<input type="button" class="close" value="Close"> <div id="progress" class="dialog">
</h1> <h1 class="title">
<div class="history"></div> Please wait: <span class="message"></span>
</div> <input type="button" class="close" value="Close">
</div> </h1>
</body> <div class="history"></div>
</html> </div>
</div>
</body>
</html>

View File

@ -11,79 +11,77 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<% e.begin_block("styles"); %> <% e.begin_block("styles"); %>
<link href="../static/css/pad.css" rel="stylesheet"> <link href="../static/css/pad.css" rel="stylesheet">
<link href="../static/custom/pad.css" rel="stylesheet"> <link href="../static/custom/pad.css" rel="stylesheet">
<style title="dynamicsyntax"></style> <style title="dynamicsyntax"></style>
<% e.end_block(); %> <% e.end_block(); %>
<!-- head and body had been removed intentionally --> <!-- head and body had been removed intentionally -->
<div id="editbar" class="toolbar"> <div id="editbar" class="toolbar">
<ul class="menu_left"> <ul class="menu_left">
<% e.begin_block("editbarMenuLeft"); %> <% e.begin_block("editbarMenuLeft"); %>
<li id="bold" onClick="window.pad&amp;&amp;pad.editbarClick('bold');return false"> <li id="bold" onClick="window.pad&amp;&amp;pad.editbarClick('bold');return false">
<a class="buttonicon buttonicon-bold" title="Bold (ctrl-B)"></a> <a class="buttonicon buttonicon-bold" title="Bold (ctrl-B)"></a>
</li> </li>
<li id="italic" onClick="window.pad&amp;&amp;pad.editbarClick('italic'); return false;"> <li id="italic" onClick="window.pad&amp;&amp;pad.editbarClick('italic'); return false;">
<a class="buttonicon buttonicon-italic" title="Italics (ctrl-I)"></a> <a class="buttonicon buttonicon-italic" title="Italics (ctrl-I)"></a>
</li> </li>
<li id="underline" onClick="window.pad&amp;&amp;pad.editbarClick('underline');return false;" > <li id="underline" onClick="window.pad&amp;&amp;pad.editbarClick('underline');return false;" >
<a class="buttonicon buttonicon-underline" title="Underline (ctrl-U)"></a> <a class="buttonicon buttonicon-underline" title="Underline (ctrl-U)"></a>
</li> </li>
<li id="strikethrough" onClick="window.pad&amp;&amp;pad.editbarClick('strikethrough');return false;"> <li id="strikethrough" onClick="window.pad&amp;&amp;pad.editbarClick('strikethrough');return false;">
<a class="buttonicon buttonicon-strikethrough" title="Strikethrough"></a> <a class="buttonicon buttonicon-strikethrough" title="Strikethrough"></a>
</li> </li>
<li class="separator"></li> <li class="separator"></li>
<li id="oderedlist" onClick="window.pad&amp;&amp;pad.editbarClick('insertorderedlist');return false;"> <li id="oderedlist" onClick="window.pad&amp;&amp;pad.editbarClick('insertorderedlist');return false;">
<a class="buttonicon buttonicon-insertorderedlist" title="Toggle Ordered List"></a> <a class="buttonicon buttonicon-insertorderedlist" title="Toggle Ordered List"></a>
</li> </li>
<li id="unoderedlist" onClick="window.pad&amp;&amp;pad.editbarClick('insertunorderedlist');return false;"> <li id="unoderedlist" onClick="window.pad&amp;&amp;pad.editbarClick('insertunorderedlist');return false;">
<a class="buttonicon buttonicon-insertunorderedlist" title="Toggle Bullet List"></a> <a class="buttonicon buttonicon-insertunorderedlist" title="Toggle Bullet List"></a>
</li> </li>
<li id="indent" onClick="window.pad&amp;&amp;pad.editbarClick('indent');return false;"> <li id="indent" onClick="window.pad&amp;&amp;pad.editbarClick('indent');return false;">
<a class="buttonicon buttonicon-indent" title="Indent"></a> <a class="buttonicon buttonicon-indent" title="Indent"></a>
</li> </li>
<li id="outdent" onClick="window.pad&amp;&amp;pad.editbarClick('outdent');return false;"> <li id="outdent" onClick="window.pad&amp;&amp;pad.editbarClick('outdent');return false;">
<a class="buttonicon buttonicon-outdent" title="Unindent"></a> <a class="buttonicon buttonicon-outdent" title="Unindent"></a>
</li> </li>
<li class="separator"></li> <li class="separator"></li>
<li id="undo" onClick="window.pad&amp;&amp;pad.editbarClick('undo');return false;"> <li id="undo" onClick="window.pad&amp;&amp;pad.editbarClick('undo');return false;">
<a class="buttonicon buttonicon-undo" title="Undo (ctrl-Z)"></a> <a class="buttonicon buttonicon-undo" title="Undo (ctrl-Z)"></a>
</li> </li>
<li id="redo" onClick="window.pad&amp;&amp;pad.editbarClick('redo');return false;"> <li id="redo" onClick="window.pad&amp;&amp;pad.editbarClick('redo');return false;">
<a class="buttonicon buttonicon-redo" title="Redo (ctrl-Y)"></a> <a class="buttonicon buttonicon-redo" title="Redo (ctrl-Y)"></a>
</li> </li>
<li class="separator"></li> <li class="separator"></li>
<li id="clearAuthorship" onClick="window.pad&amp;&amp;pad.editbarClick('clearauthorship');return false;"> <li id="clearAuthorship" onClick="window.pad&amp;&amp;pad.editbarClick('clearauthorship');return false;">
<a class="buttonicon buttonicon-clearauthorship" title="Clear Authorship Colors"></a> <a class="buttonicon buttonicon-clearauthorship" title="Clear Authorship Colors"></a>
</li> </li>
<% e.end_block(); %> <% e.end_block(); %>
</ul> </ul>
<ul class="menu_right"> <ul class="menu_right">
<% e.begin_block("editbarMenuRight"); %> <% e.begin_block("editbarMenuRight"); %>
<li onClick="window.pad&amp;&amp;pad.editbarClick('savedRevision');return false;"> <li id="settingslink" onClick="window.pad&amp;&amp;pad.editbarClick('settings');return false;">
<a id="settingslink" title="Mark this revision as a saved revision"> <a class="buttonicon buttonicon-settings" title="Settings of this pad"></a>
<div class="buttonicon buttonicon-savedRevision"></div> </li>
</a> <li id="importexportlink" onClick="window.pad&amp;&amp;pad.editbarClick('import_export');return false;">
</li> <a class="buttonicon buttonicon-import_export" title="Import/Export from/to different document formats"></a>
<li id="settingslink" onClick="window.pad&amp;&amp;pad.editbarClick('settings');return false;"> </li>
<a class="buttonicon buttonicon-settings" id="settingslink" title="Settings of this pad"></a> <li id="embedlink" onClick="window.pad&amp;&amp;pad.editbarClick('embed');return false;">
</li> <a class="buttonicon buttonicon-embed" title="Share and Embed this pad"></a>
<li id="importexportlink" onClick="window.pad&amp;&amp;pad.editbarClick('import_export');return false;"> </li>
<a class="buttonicon buttonicon-import_export" id="exportlink" title="Import/Export from/to different document formats"></a> <li id="revisionlink" onClick="window.pad&amp;&amp;pad.editbarClick('savedRevision');return false;">
</li> <a class="buttonicon buttonicon-savedRevision" title="Mark this revision as a saved revision"></a>
<li id="embedlink" onClick="window.pad&amp;&amp;pad.editbarClick('embed');return false;" > </li>
<a class="buttonicon buttonicon-embed" id="embedlink" title="Share and Embed this pad"></a> <li class="separator"></li>
</li> <li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
<li class="separator"></li> <a class="buttonicon buttonicon-history" title="Show the history of this pad"></a>
<li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'"> </li>
<a class="buttonicon buttonicon-history" title="Show the history of this pad"></a> <li id="usericon" onClick="window.pad&amp;&amp;pad.editbarClick('showusers');return false;" title="Show connected users">
</li> <span class="buttonicon buttonicon-showusers" id="usericonback"></span>
<li id="usericon" onClick="window.pad&amp;&amp;pad.editbarClick('showusers');return false;" title="Show connected users"> <span id="online_count">1</span>
<span class="buttonicon buttonicon-showusers" id="usericonback"></span> </li>
<span id="online_count">1</span> <% e.end_block(); %>
</li>
<% e.end_block(); %>
</ul> </ul>
</div> </div>
@ -95,17 +93,17 @@
<button id="mycolorpickersave">Save</button> <button id="mycolorpickersave">Save</button>
<button id="mycolorpickercancel">Cancel</button> <button id="mycolorpickercancel">Cancel</button>
<span id="mycolorpickerpreview" class="myswatchboxhoverable"></span> <span id="mycolorpickerpreview" class="myswatchboxhoverable"></span>
</div> </div>
<div id="myswatchbox"><div id="myswatch"></div></div> <div id="myswatchbox"><div id="myswatch"></div></div>
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled"></div> <div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled"></div>
<div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled"></div> <div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled"></div>
</div> </div>
<div id="otherusers"> <div id="otherusers">
<div id="guestprompts"></div> <div id="guestprompts"></div>
<table id="otheruserstable" cellspacing="0" cellpadding="0" border="0"> <table id="otheruserstable" cellspacing="0" cellpadding="0" border="0">
<tr><td></td></tr> <tr><td></td></tr>
</table> </table>
<div id="nootherusers"></div> <div id="nootherusers"></div>
</div> </div>
<div id="userlistbuttonarea"></div> <div id="userlistbuttonarea"></div>
</div> </div>
@ -150,20 +148,20 @@
<div class="column"> <div class="column">
<h2>Import from text file, HTML, PDF, Word, ODT or RTF</h2><br> <h2>Import from text file, HTML, PDF, Word, ODT or RTF</h2><br>
<form id="importform" method="post" action="" target="importiframe" enctype="multipart/form-data"> <form id="importform" method="post" action="" target="importiframe" enctype="multipart/form-data">
<div class="importformdiv" id="importformfilediv"> <div class="importformdiv" id="importformfilediv">
<input type="file" name="file" size="15" id="importfileinput"> <input type="file" name="file" size="15" id="importfileinput">
<div class="importmessage" id="importmessagefail"></div> <div class="importmessage" id="importmessagefail"></div>
</div> </div>
<div id="import"></div> <div id="import"></div>
<div class="importmessage" id="importmessagesuccess">Successful!</div> <div class="importmessage" id="importmessagesuccess">Successful!</div>
<div class="importformdiv" id="importformsubmitdiv"> <div class="importformdiv" id="importformsubmitdiv">
<input type="hidden" name="padId" value="blpmaXT35R"> <input type="hidden" name="padId" value="blpmaXT35R">
<span class="nowrap"> <span class="nowrap">
<input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput"> <input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput">
<img alt="" id="importstatusball" src="../static/img/loading.gif" align="top"> <img alt="" id="importstatusball" src="../static/img/loading.gif" align="top">
<img alt="" id="importarrow" src="../static/img/leftarrow.png" align="top"> <img alt="" id="importarrow" src="../static/img/leftarrow.png" align="top">
</span> </span>
</div> </div>
</form> </form>
</div> </div>
<div class="column"> <div class="column">
@ -223,79 +221,79 @@
<div id="modaloverlay"> <div id="modaloverlay">
<div id="modaloverlay-inner"></div> <div id="modaloverlay-inner"></div>
</div> </div>
<div id="mainmodals"> <div id="mainmodals">
<% e.begin_block("modals"); %> <% e.begin_block("modals"); %>
<div id="connectionbox" class="modaldialog"> <div id="connectionbox" class="modaldialog">
<div id="connectionboxinner" class="modaldialog-inner"> <div id="connectionboxinner" class="modaldialog-inner">
<div class="connecting">Connecting...</div> <div class="connecting">Connecting...</div>
<div class="reconnecting">Reestablishing connection...</div> <div class="reconnecting">Reestablishing connection...</div>
<div class="disconnected"> <div class="disconnected">
<h2 class="h2_disconnect">Disconnected.</h2> <h2 class="h2_disconnect">Disconnected.</h2>
<h2 class="h2_userdup">Opened in another window.</h2> <h2 class="h2_userdup">Opened in another window.</h2>
<h2 class="h2_unauth">No Authorization.</h2> <h2 class="h2_unauth">No Authorization.</h2>
<div id="disconnected_looping"> <div id="disconnected_looping">
<p><b>We're having trouble talking to the EtherPad lite synchronization server.</b> You may be connecting through an incompatible firewall or proxy server.</p> <p><b>We're having trouble talking to the EtherPad lite synchronization server.</b> You may be connecting through an incompatible firewall or proxy server.</p>
</div> </div>
<div id="disconnected_initsocketfail"> <div id="disconnected_initsocketfail">
<p><b>We were unable to connect to the EtherPad lite synchronization server.</b> This may be due to an incompatibility with your web browser or internet connection.</p> <p><b>We were unable to connect to the EtherPad lite synchronization server.</b> This may be due to an incompatibility with your web browser or internet connection.</p>
</div> </div>
<div id="disconnected_userdup"> <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> <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>
<div id="disconnected_unknown"> <div id="disconnected_unknown">
<p><b>Lost connection with the EtherPad lite synchronization server.</b> This may be due to a loss of network connectivity.</p> <p><b>Lost connection with the EtherPad lite synchronization server.</b> This may be due to a loss of network connectivity.</p>
</div> </div>
<div id="disconnected_slowcommit"> <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> <p><b>Server not responding.</b> This may be due to network connectivity issues or high load on the server.</p>
</div> </div>
<div id="disconnected_unauth"> <div id="disconnected_unauth">
<p>Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.</p> <p>Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.</p>
</div> </div>
<div id="disconnected_deleted"> <div id="disconnected_deleted">
<p>This pad was deleted.</p> <p>This pad was deleted.</p>
</div> </div>
<div id="reconnect_advise"> <div id="reconnect_advise">
<p>If this continues to happen, please let us know</p> <p>If this continues to happen, please let us know</p>
</div> </div>
<div id="reconnect_form"> <div id="reconnect_form">
<button id="forcereconnect">Reconnect Now</button> <button id="forcereconnect">Reconnect Now</button>
</div>
</div> </div>
</div> </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>
</div> </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>
</div>
<% e.end_block(); %> <% e.end_block(); %>
</div> </div>
<% e.begin_block("scripts"); %> <% e.begin_block("scripts"); %>
<script type="text/javascript" src="../static/js/require-kernel.js"></script> <script type="text/javascript" src="../static/js/require-kernel.js"></script>
<script type="text/javascript" src="../static/js/jquery.js"></script> <script type="text/javascript" src="../static/js/jquery.js"></script>
<script type="text/javascript" src="../socket.io/socket.io.js"></script> <script type="text/javascript" src="../socket.io/socket.io.js"></script>
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script> <script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
<script type="text/javascript"> <script type="text/javascript">
document.domain = document.domain; document.domain = document.domain;
var clientVars = {}; var clientVars = {};
(function () { (function () {
require.setRootURI("../javascripts/src"); require.setRootURI("../javascripts/src");
require.setLibraryURI("../javascripts/lib"); require.setLibraryURI("../javascripts/lib");
require.setGlobalKeyPath("require"); require.setGlobalKeyPath("require");
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins'); var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
plugins.update(function () { plugins.update(function () {
require('ep_etherpad-lite/static/js/pad').init(); require('ep_etherpad-lite/static/js/pad').init();
}); });
/* TODO: These globals shouldn't exist. */ /* TODO: These globals shouldn't exist. */
pad = require('ep_etherpad-lite/static/js/pad').pad; pad = require('ep_etherpad-lite/static/js/pad').pad;
chat = require('ep_etherpad-lite/static/js/chat').chat; chat = require('ep_etherpad-lite/static/js/chat').chat;
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar; padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp; padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
}()); }());
</script> </script>
<% e.end_block(); %> <% e.end_block(); %>
</html> </html>