Merge branch 'develop' of github.com:ether/etherpad-lite into fix-socket-admin-etc

This commit is contained in:
John McLear 2014-11-23 14:14:11 +00:00
commit 0eb7cc7864
39 changed files with 651 additions and 296 deletions

View file

@ -379,16 +379,16 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
{
var self = this;
$(self).css('background-image', 'url(/static/img/crushed_button_depressed.png)');
// $(self).css('background-image', 'url(/static/img/crushed_button_depressed.png)');
$(self).mouseup(function(evt2)
{
$(self).css('background-image', 'url(/static/img/crushed_button_undepressed.png)');
// $(self).css('background-image', 'url(/static/img/crushed_button_undepressed.png)');
$(self).unbind('mouseup');
BroadcastSlider.playpause();
});
$(document).mouseup(function(evt2)
{
$(self).css('background-image', 'url(/static/img/crushed_button_undepressed.png)');
// $(self).css('background-image', 'url(/static/img/crushed_button_undepressed.png)');
$(document).unbind('mouseup');
});
});

View file

@ -386,7 +386,6 @@ var pad = {
diagnosticInfo: {},
initTime: 0,
clientTimeOffset: null,
preloadedImages: false,
padOptions: {},
// these don't require init; clientVars should all go through here
@ -728,19 +727,6 @@ var pad = {
},
handleIsFullyConnected: function(isConnected, isInitialConnect)
{
// load all images referenced from CSS, one at a time,
// starting one second after connection is first established.
if (isConnected && !pad.preloadedImages)
{
window.setTimeout(function()
{
if (!pad.preloadedImages)
{
pad.preloadImages();
pad.preloadedImages = true;
}
}, 1000);
}
pad.determineChatVisibility(isConnected && !isInitialConnect);
pad.determineAuthorshipColorsVisibility();
@ -837,34 +823,6 @@ var pad = {
{
pad.collabClient.addHistoricalAuthors(data);
}
},
preloadImages: function()
{
var images = ["../static/img/connectingbar.gif"];
function loadNextImage()
{
if (images.length == 0)
{
return;
}
var img = new Image();
img.src = images.shift();
if (img.complete)
{
scheduleLoadNextImage();
}
else
{
$(img).bind('error load onreadystatechange', scheduleLoadNextImage);
}
}
function scheduleLoadNextImage()
{
window.setTimeout(loadNextImage, 0);
}
scheduleLoadNextImage();
}
};

View file

@ -181,7 +181,7 @@ var padeditbar = (function()
},
redrawHeight: function(){
var editbarHeight = $('.menu_left').height() + 2 + "px";
var containerTop = $('.menu_left').height() + 5 + "px";
var containerTop = $('.menu_left').height() + 7 + "px";
$('#editbar').css("height", editbarHeight);
$('#editorcontainer').css("top", containerTop);
},

View file

@ -35,32 +35,10 @@ var padimpexp = (function()
function fileInputUpdated()
{
$('#importsubmitinput').addClass('throbbold');
$('#importformfilediv').addClass('importformenabled');
$('#importsubmitinput').removeAttr('disabled');
$('#importmessagefail').fadeOut("fast");
$('#importarrow').show();
$('#importarrow').animate(
{
paddingLeft: "0px"
}, 500).animate(
{
paddingLeft: "10px"
}, 150, 'swing').animate(
{
paddingLeft: "0px"
}, 150, 'swing').animate(
{
paddingLeft: "10px"
}, 150, 'swing').animate(
{
paddingLeft: "0px"
}, 150, 'swing').animate(
{
paddingLeft: "10px"
}, 150, 'swing').animate(
{
paddingLeft: "0px"
}, 150, 'swing');
$('#importmessagefail').fadeOut('fast');
}
function fileInputSubmit()

View file

@ -66,7 +66,12 @@ exports.getAvailablePlugins = function(maxCacheAge, cb) {
if(exports.availablePlugins && maxCacheAge && Math.round(+new Date/1000)-cacheTimestamp <= maxCacheAge) {
return cb && cb(null, exports.availablePlugins)
}
plugins = JSON.parse(plugins);
try {
plugins = JSON.parse(plugins);
} catch (err) {
console.error('error parsing plugins.json:', err);
plugins = [];
}
exports.availablePlugins = plugins;
cacheTimestamp = Math.round(+new Date/1000);
cb && cb(null, plugins)