merged develop back in

This commit is contained in:
Peter 'Pita' Martischka 2012-11-13 07:43:48 -08:00
commit 6de7634357
40 changed files with 9664 additions and 5 deletions

View file

@ -14,6 +14,7 @@
{ "name": "importexport", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/importexport:expressCreateServer" } },
{ "name": "errorhandling", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/errorhandling:expressCreateServer" } },
{ "name": "socketio", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/socketio:expressCreateServer" } },
{ "name": "tests", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/tests:expressCreateServer" } },
{ "name": "admin", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/admin:expressCreateServer" } },
{ "name": "adminplugins", "hooks": {
"expressCreateServer": "ep_etherpad-lite/node/hooks/express/adminplugins:expressCreateServer",

View file

@ -0,0 +1,46 @@
var path = require("path");
var fs = require("fs");
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/tests/frontend/specs_list.js', function(req, res){
fs.readdir('tests/frontend/specs', function(err, files){
if(err){ return res.send(500); }
res.send("var specs_list = " + JSON.stringify(files.sort()) + ";\n");
});
});
var url2FilePath = function(url){
var subPath = url.substr("/tests/frontend".length);
if (subPath == ""){
subPath = "index.html"
}
subPath = subPath.split("?")[0];
var filePath = path.normalize(__dirname + "/../../../../tests/frontend/")
filePath += subPath.replace("..", "");
return filePath;
}
args.app.get('/tests/frontend/specs/*', function (req, res) {
var specFilePath = url2FilePath(req.url);
var specFileName = path.basename(specFilePath);
fs.readFile(specFilePath, function(err, content){
if(err){ return res.send(500); }
content = "describe(" + JSON.stringify(specFileName) + ", function(){ " + content + " });";
res.send(content);
});
});
args.app.get('/tests/frontend/*', function (req, res) {
var filePath = url2FilePath(req.url);
res.sendfile(filePath);
});
args.app.get('/tests/frontend', function (req, res) {
res.redirect('/tests/frontend/');
});
}

View file

@ -40,7 +40,8 @@
},
"bin": { "etherpad-lite": "./node/server.js" },
"devDependencies": {
"jshint" : "*"
"jshint" : "*",
"wd" : "0.0.26"
},
"engines" : { "node" : ">=0.6.0",
"npm" : ">=1.0"

View file

@ -126,7 +126,7 @@ body.doesWrap {
.sidedivdelayed { /* class set after sizes are set */
background-color: #eee;
color: #888 !important;
border-right: 1px solid #999;
border-right: 1px solid #ccc;
}
.sidedivhidden {
display: none;

View file

@ -150,7 +150,7 @@ var chat = (function()
$("#chatinput").keypress(function(evt)
{
//if the user typed enter, fire the send
if(evt.which == 13)
if(evt.which == 13 || evt.which == 10)
{
evt.preventDefault();
self.send();

View file

@ -397,6 +397,10 @@ function handshake()
});
// Bind the colorpicker
var fb = $('#colorpicker').farbtastic({ callback: '#mycolorpickerpreview', width: 220});
// Bind the read only button
$('#readonlyinput').on('click',function(){
padeditbar.setEmbedLinks();
});
}
var pad = {

View file

@ -318,7 +318,7 @@
<div id="embed" class="popup">
<% e.begin_block("embedPopup"); %>
<div id="embedreadonly" class="right acl-write">
<input type="checkbox" id="readonlyinput" onClick="padeditbar.setEmbedLinks();">
<input type="checkbox" id="readonlyinput">
<label for="readonlyinput" data-l10n-id="pad.share.readonly"></label>
</div>
<h1 data-l10n-id="pad.share"></h1>