mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
[fix] Do not close "force reconnect" messages
If a "force reconnect" message is displayed to the user, it means the only way to go back to a healthy state is to reload the pad. So we cannot hide this kind of message, like what is done with other modals (eg: "settings").
This commit is contained in:
parent
4eec3763b4
commit
9176bf9bad
2 changed files with 137 additions and 58 deletions
|
@ -259,18 +259,25 @@ var padeditbar = (function()
|
|||
// hide all modules and remove highlighting of all buttons
|
||||
if(moduleName == "none")
|
||||
{
|
||||
var returned = false
|
||||
var returned = false;
|
||||
for(var i=0;i<self.dropdowns.length;i++)
|
||||
{
|
||||
var thisModuleName = self.dropdowns[i];
|
||||
|
||||
//skip the userlist
|
||||
if(self.dropdowns[i] == "users")
|
||||
if(thisModuleName == "users")
|
||||
continue;
|
||||
|
||||
var module = $("#" + self.dropdowns[i]);
|
||||
var module = $("#" + thisModuleName);
|
||||
|
||||
//skip any "force reconnect" message
|
||||
var isAForceReconnectMessage = module.find('#forcereconnect').is(':visible');
|
||||
if(isAForceReconnectMessage)
|
||||
continue;
|
||||
|
||||
if(module.css('display') != "none")
|
||||
{
|
||||
$("li[data-key=" + self.dropdowns[i] + "] > a").removeClass("selected");
|
||||
$("li[data-key=" + thisModuleName + "] > a").removeClass("selected");
|
||||
module.slideUp("fast", cb);
|
||||
returned = true;
|
||||
}
|
||||
|
@ -283,16 +290,17 @@ var padeditbar = (function()
|
|||
// respectively add highlighting to the corresponding button
|
||||
for(var i=0;i<self.dropdowns.length;i++)
|
||||
{
|
||||
var module = $("#" + self.dropdowns[i]);
|
||||
var thisModuleName = self.dropdowns[i];
|
||||
var module = $("#" + thisModuleName);
|
||||
|
||||
if(module.css('display') != "none")
|
||||
{
|
||||
$("li[data-key=" + self.dropdowns[i] + "] > a").removeClass("selected");
|
||||
$("li[data-key=" + thisModuleName + "] > a").removeClass("selected");
|
||||
module.slideUp("fast");
|
||||
}
|
||||
else if(self.dropdowns[i]==moduleName)
|
||||
else if(thisModuleName==moduleName)
|
||||
{
|
||||
$("li[data-key=" + self.dropdowns[i] + "] > a").addClass("selected");
|
||||
$("li[data-key=" + thisModuleName + "] > a").addClass("selected");
|
||||
module.slideDown("fast", cb);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue