mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
removed sliderEnabled, supportsSlider clientVars, as they were not used anywhere
This commit is contained in:
parent
f4fe98265f
commit
e664320b8c
2 changed files with 52 additions and 81 deletions
|
@ -155,8 +155,6 @@ function createTimesliderClientVars (padId, callback)
|
||||||
var clientVars = {
|
var clientVars = {
|
||||||
viewId: padId,
|
viewId: padId,
|
||||||
colorPalette: ["#ffc7c7", "#fff1c7", "#e3ffc7", "#c7ffd5", "#c7ffff", "#c7d5ff", "#e3c7ff", "#ffc7f1", "#ff8f8f", "#ffe38f", "#c7ff8f", "#8fffab", "#8fffff", "#8fabff", "#c78fff", "#ff8fe3", "#d97979", "#d9c179", "#a9d979", "#79d991", "#79d9d9", "#7991d9", "#a979d9", "#d979c1", "#d9a9a9", "#d9cda9", "#c1d9a9", "#a9d9b5", "#a9d9d9", "#a9b5d9", "#c1a9d9", "#d9a9cd"],
|
colorPalette: ["#ffc7c7", "#fff1c7", "#e3ffc7", "#c7ffd5", "#c7ffff", "#c7d5ff", "#e3c7ff", "#ffc7f1", "#ff8f8f", "#ffe38f", "#c7ff8f", "#8fffab", "#8fffff", "#8fabff", "#c78fff", "#ff8fe3", "#d97979", "#d9c179", "#a9d979", "#79d991", "#79d9d9", "#7991d9", "#a979d9", "#d979c1", "#d9a9a9", "#d9cda9", "#c1d9a9", "#a9d9b5", "#a9d9d9", "#a9b5d9", "#c1a9d9", "#d9a9cd"],
|
||||||
sliderEnabled : true,
|
|
||||||
supportsSlider: true,
|
|
||||||
savedRevisions: [],
|
savedRevisions: [],
|
||||||
padIdForUrl: padId,
|
padIdForUrl: padId,
|
||||||
fullWidth: false,
|
fullWidth: false,
|
||||||
|
|
|
@ -161,12 +161,9 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
// just take over the whole slider screen with a reconnect message
|
// just take over the whole slider screen with a reconnect message
|
||||||
|
|
||||||
function showReconnectUI()
|
function showReconnectUI()
|
||||||
{
|
|
||||||
if (!clientVars.sliderEnabled || !clientVars.supportsSlider)
|
|
||||||
{
|
{
|
||||||
$("#padmain, #rightbars").css('top', "130px");
|
$("#padmain, #rightbars").css('top', "130px");
|
||||||
$("#timeslider").show();
|
$("#timeslider").show();
|
||||||
}
|
|
||||||
$('#error').show();
|
$('#error').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,8 +285,6 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
disableSelection($("#playpause_button")[0]);
|
disableSelection($("#playpause_button")[0]);
|
||||||
disableSelection($("#timeslider")[0]);
|
disableSelection($("#timeslider")[0]);
|
||||||
|
|
||||||
if (clientVars.sliderEnabled && clientVars.supportsSlider)
|
|
||||||
{
|
|
||||||
$(document).keyup(function(e)
|
$(document).keyup(function(e)
|
||||||
{
|
{
|
||||||
var code = -1;
|
var code = -1;
|
||||||
|
@ -334,7 +329,6 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
else if (code == 32) playpause();
|
else if (code == 32) playpause();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
$(window).resize(function()
|
$(window).resize(function()
|
||||||
{
|
{
|
||||||
|
@ -486,36 +480,15 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
$("#revision").css('top', "20px");
|
$("#revision").css('top', "20px");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (clientVars.sliderEnabled)
|
|
||||||
{
|
|
||||||
if (clientVars.supportsSlider)
|
|
||||||
{
|
|
||||||
$("#timeslider").show();
|
$("#timeslider").show();
|
||||||
setSliderLength(clientVars.totalRevs);
|
setSliderLength(clientVars.totalRevs);
|
||||||
setSliderPosition(clientVars.revNum);
|
setSliderPosition(clientVars.revNum);
|
||||||
|
|
||||||
_.each(clientVars.savedRevisions, function(revision)
|
_.each(clientVars.savedRevisions, function(revision)
|
||||||
{
|
{
|
||||||
addSavedRevision(revision.revNum, revision);
|
addSavedRevision(revision.revNum, revision);
|
||||||
})
|
})
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// slider is not supported
|
|
||||||
$("#padmain, #rightbars").css('top', "130px");
|
|
||||||
$("#timeslider").show();
|
|
||||||
$("#error").html("The timeslider feature is not supported on this pad. <a href=\"/ep/about/faq#disabledslider\">Why not?</a>");
|
|
||||||
$("#error").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (clientVars.supportsSlider)
|
|
||||||
{
|
|
||||||
setSliderLength(clientVars.totalRevs);
|
|
||||||
setSliderPosition(clientVars.revNum);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue