Highlight selected tab in administration panel
This commit is contained in:
parent
fc10a45eef
commit
e62c63a103
2 changed files with 13 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
<p><b>Organization:</b> {{ organization }}</p>
|
||||
<p><b>User:</b> {{ user.first_name }} {{ user.last_name }} ({{ user.username }})</p>
|
||||
|
||||
<div align="center"><b>Manage:</b> <a href="#" onclick="showdevices();">Devices</a> ‐ <a href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} ‐ <a href="#" onclick="showusers();">Users</a>{% endif %}</div>
|
||||
<div align="center"><b>Manage:</b> <a id="linkdevices" href="#" onclick="showdevices();">Devices</a> ‐ <a id="linkwifi" href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} ‐ <a id="linkusers" href="#" onclick="showusers();">Users</a>{% endif %}</div>
|
||||
|
||||
<div name="devicespart" id="devicespart">
|
||||
<h2>Devices</h2>
|
||||
|
|
|
@ -70,18 +70,30 @@ function showdevices() {
|
|||
$("#devicespart").show();
|
||||
$("#wifipart").hide();
|
||||
$("#userpart").hide();
|
||||
|
||||
$("#linkdevices").css("font-weight", "bold");
|
||||
$("#linkwifi").css("font-weight", "normal");
|
||||
$("#linkusers").css("font-weight", "normal");
|
||||
};
|
||||
|
||||
function showwifi() {
|
||||
$("#devicespart").hide();
|
||||
$("#wifipart").show();
|
||||
$("#userpart").hide();
|
||||
|
||||
$("#linkdevices").css("font-weight", "normal");
|
||||
$("#linkwifi").css("font-weight", "bold");
|
||||
$("#linkusers").css("font-weight", "normal");
|
||||
};
|
||||
|
||||
function showusers() {
|
||||
$("#devicespart").hide();
|
||||
$("#wifipart").hide();
|
||||
$("#userpart").show();
|
||||
|
||||
$("#linkdevices").css("font-weight", "normal");
|
||||
$("#linkwifi").css("font-weight", "normal");
|
||||
$("#linkusers").css("font-weight", "bold");
|
||||
};
|
||||
|
||||
showdevices();
|
||||
|
|
Loading…
Reference in a new issue