Merge branch 'develop' of https://github.com/Pita/etherpad-lite into develop

pull/840/merge
johnyma22 2012-04-29 16:11:29 +01:00
commit 3b9bcf178a
4 changed files with 17 additions and 20 deletions

View File

@ -1402,7 +1402,7 @@ input[type=checkbox] {
float: left; float: left;
width: 50%; width: 50%;
} }
#settingsmenu, #settings,
#importexport, #importexport,
#embed { #embed {
position: absolute; position: absolute;
@ -1546,7 +1546,7 @@ input[type=checkbox] {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
} }
#settingsmenu, #settings,
#importexport, #importexport,
#embed { #embed {
left: 0; left: 0;

View File

@ -119,7 +119,7 @@ var padeditbar = (function()
} }
else if (cmd == 'settings') else if (cmd == 'settings')
{ {
self.toogleDropDown("settingsmenu"); self.toogleDropDown("settings");
} }
else if (cmd == 'embed') else if (cmd == 'embed')
{ {
@ -177,12 +177,11 @@ var padeditbar = (function()
}, },
toogleDropDown: function(moduleName) toogleDropDown: function(moduleName)
{ {
var modules = ["settingsmenu", "importexport", "embed", "users"]; var modules = ["settings", "importexport", "embed", "users"];
//hide all modules // hide all modules and remove highlighting of all buttons
if(moduleName == "none") if(moduleName == "none")
{ {
$(".toolbar ul.menu_right li").removeClass("selected");
for(var i=0;i<modules.length;i++) for(var i=0;i<modules.length;i++)
{ {
//skip the userlist //skip the userlist
@ -193,29 +192,27 @@ var padeditbar = (function()
if(module.css('display') != "none") if(module.css('display') != "none")
{ {
$("#" + modules[i] + "link").removeClass("selected");
module.slideUp("fast"); module.slideUp("fast");
} }
} }
} }
else else
{ {
var nth_child = indexOf(modules, moduleName) + 1; // hide all modules that are not selected and remove highlighting
if (nth_child > 0 && nth_child <= (modules.length-1)) { // respectively add highlighting to the corresponding button
$(".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) $(".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++) for(var i=0;i<modules.length;i++)
{ {
var module = $("#" + modules[i]); var module = $("#" + modules[i]);
if(module.css('display') != "none") if(module.css('display') != "none")
{ {
$("#" + modules[i] + "link").removeClass("selected");
module.slideUp("fast"); module.slideUp("fast");
} }
else if(modules[i]==moduleName) else if(modules[i]==moduleName)
{ {
$("#" + modules[i] + "link").addClass("selected");
module.slideDown("fast"); module.slideDown("fast");
} }
} }

View File

@ -2,10 +2,10 @@
<head> <head>
<title>Plugin manager</title> <title>Plugin manager</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="../../static/css/admin.css"> <link rel="stylesheet" href="../static/css/admin.css">
<script src="../../static/js/jquery.js"></script> <script src="../static/js/jquery.js"></script>
<script src="../../socket.io/socket.io.js"></script> <script src="../socket.io/socket.io.js"></script>
<script src="../../static/js/admin/plugins.js"></script> <script src="../static/js/admin/plugins.js"></script>
</head> </head>
<body> <body>
<div id="wrapper"> <div id="wrapper">
@ -20,7 +20,7 @@
<h1>Etherpad Lite</h1> <h1>Etherpad Lite</h1>
<div class="seperator"></div> <div class="seperator"></div>
<h2>Installed plugins</h2> <h2>Installed plugins</h2>
<table> <table>
<thead> <thead>
@ -44,7 +44,7 @@
</table> </table>
<div class="paged listing search-results"> <div class="paged listing search-results">
<div class="seperator"></div> <div class="seperator"></div>
<h2>Search for plugins to install</h2> <h2>Search for plugins to install</h2>
<form> <form>
<input type="text" name="search" placeholder="Search term" id="search-query"> <input type="text" name="search" placeholder="Search term" id="search-query">

View File

@ -113,7 +113,7 @@
<div id="editorloadingbox">Loading...</div> <div id="editorloadingbox">Loading...</div>
</div> </div>
<div id="settingsmenu" class="popup"> <div id="settings" class="popup">
<h1>Pad settings</h1> <h1>Pad settings</h1>
<div class="column"> <div class="column">
<h2>My view</h2> <h2>My view</h2>