Merge pull request #641 from 0ip/highlight_module
Fix | Highlight currently opened module
This commit is contained in:
commit
9fe8a7530d
|
@ -182,7 +182,7 @@ var padeditbar = (function()
|
|||
//hide all modules
|
||||
if(moduleName == "none")
|
||||
{
|
||||
$("#editbar ul#menu_right > li").removeClass("selected");
|
||||
$(".toolbar ul.menu_right li").removeClass("selected");
|
||||
for(var i=0;i<modules.length;i++)
|
||||
{
|
||||
//skip the userlist
|
||||
|
@ -201,10 +201,10 @@ var padeditbar = (function()
|
|||
{
|
||||
var nth_child = indexOf(modules, moduleName) + 1;
|
||||
if (nth_child > 0 && nth_child <= (modules.length-1)) {
|
||||
$("#editbar ul#menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected");
|
||||
$("#editbar ul#menu_right li:nth-child(" + nth_child + ")").toggleClass("selected");
|
||||
$(".toolbar ul.menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected");
|
||||
$(".toolbar ul.menu_right li:nth-child(" + nth_child + ")").toggleClass("selected");
|
||||
}
|
||||
if(modules[modules.length-1] === moduleName) $("#editbar ul#menu_right li").removeClass("selected");
|
||||
if(modules[modules.length-1] === moduleName) $(".toolbar ul.menu_right li").removeClass("selected");
|
||||
//hide all modules that are not selected and show the selected one
|
||||
for(var i=0;i<modules.length;i++)
|
||||
{
|
||||
|
|
|
@ -61,19 +61,17 @@
|
|||
</ul>
|
||||
<ul class="menu_right">
|
||||
<% e.begin_block("editbarMenuRight"); %>
|
||||
<li onClick="window.pad&&pad.editbarClick('savedRevision');return false;">
|
||||
<a id="settingslink" title="Mark this revision as a saved revision">
|
||||
<div class="buttonicon buttonicon-savedRevision"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li id="settingslink" onClick="window.pad&&pad.editbarClick('settings');return false;">
|
||||
<a class="buttonicon buttonicon-settings" id="settingslink" title="Settings of this pad"></a>
|
||||
<a class="buttonicon buttonicon-settings" title="Settings of this pad"></a>
|
||||
</li>
|
||||
<li id="importexportlink" onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
||||
<a class="buttonicon buttonicon-import_export" id="exportlink" title="Import/Export from/to different document formats"></a>
|
||||
<a class="buttonicon buttonicon-import_export" title="Import/Export from/to different document formats"></a>
|
||||
</li>
|
||||
<li id="embedlink" onClick="window.pad&&pad.editbarClick('embed');return false;">
|
||||
<a class="buttonicon buttonicon-embed" id="embedlink" title="Share and Embed this pad"></a>
|
||||
<a class="buttonicon buttonicon-embed" title="Share and Embed this pad"></a>
|
||||
</li>
|
||||
<li id="revisionlink" onClick="window.pad&&pad.editbarClick('savedRevision');return false;">
|
||||
<a class="buttonicon buttonicon-savedRevision" title="Mark this revision as a saved revision"></a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
|
||||
|
|
Loading…
Reference in New Issue