mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 10:26:15 -04:00
Setting up the right toolbar.
This commit is contained in:
parent
c57bc444cd
commit
292a3bd7b7
4 changed files with 97 additions and 78 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
@ -117,7 +117,7 @@ var padeditbar = (function()
|
|||
$("#editbar").addClass('disabledtoolbar').removeClass("enabledtoolbar");
|
||||
},
|
||||
toolbarClick: function(cmd)
|
||||
{
|
||||
{
|
||||
if (self.isEnabled())
|
||||
{
|
||||
if(cmd == "showusers")
|
||||
|
@ -189,7 +189,7 @@ var padeditbar = (function()
|
|||
toggleDropDown: function(moduleName, cb)
|
||||
{
|
||||
var modules = ["settings", "connectivity", "importexport", "embed", "users"];
|
||||
|
||||
|
||||
// hide all modules and remove highlighting of all buttons
|
||||
if(moduleName == "none")
|
||||
{
|
||||
|
@ -199,9 +199,9 @@ var padeditbar = (function()
|
|||
//skip the userlist
|
||||
if(modules[i] == "users")
|
||||
continue;
|
||||
|
||||
|
||||
var module = $("#" + modules[i]);
|
||||
|
||||
|
||||
if(module.css('display') != "none")
|
||||
{
|
||||
$("#" + modules[i] + "link").removeClass("selected");
|
||||
|
@ -211,14 +211,14 @@ var padeditbar = (function()
|
|||
}
|
||||
if(!returned && cb) return cb();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// hide all modules that are not selected and remove highlighting
|
||||
// respectively add highlighting to the corresponding button
|
||||
for(var i=0;i<modules.length;i++)
|
||||
{
|
||||
var module = $("#" + modules[i]);
|
||||
|
||||
|
||||
if(module.css('display') != "none")
|
||||
{
|
||||
$("#" + modules[i] + "link").removeClass("selected");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue