Use nice editbar popups for connection status instead of srceen-blocking modals.

This commit is contained in:
Marcel Klehr 2012-07-13 08:23:22 +02:00
parent ead379cf66
commit 6da6a7f0d8
5 changed files with 114 additions and 263 deletions

View file

@ -128,6 +128,10 @@ var padeditbar = (function()
{
self.toogleDropDown("settings");
}
else if (cmd == 'connectivity')
{
self.toogleDropDown("connectivity");
}
else if (cmd == 'embed')
{
self.setEmbedLinks();
@ -182,13 +186,14 @@ var padeditbar = (function()
}
if(padeditor.ace) padeditor.ace.focus();
},
toogleDropDown: function(moduleName)
toogleDropDown: function(moduleName, cb)
{
var modules = ["settings", "importexport", "embed", "users"];
var modules = ["settings", "connectivity", "importexport", "embed", "users"];
// hide all modules and remove highlighting of all buttons
if(moduleName == "none")
{
var returned = false
for(var i=0;i<modules.length;i++)
{
//skip the userlist
@ -200,9 +205,11 @@ var padeditbar = (function()
if(module.css('display') != "none")
{
$("#" + modules[i] + "link").removeClass("selected");
module.slideUp("fast");
module.slideUp("fast", cb);
returned = true;
}
}
if(!returned) return cb();
}
else
{
@ -220,7 +227,7 @@ var padeditbar = (function()
else if(modules[i]==moduleName)
{
$("#" + modules[i] + "link").addClass("selected");
module.slideDown("fast");
module.slideDown("fast", cb);
}
}
}