mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-07 12:21:33 +00:00
Sections now highlight when active
This commit is contained in:
parent
8ee1540c82
commit
b1b5515eec
@ -38,22 +38,22 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-3">
|
<div class="column is-3">
|
||||||
<aside class="menu">
|
<aside class="menu" id="menu">
|
||||||
<p class="menu-label">General</p>
|
<p class="menu-label">General</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li><a href="/">Frontpage</a></li>
|
<li><a href="/">Frontpage</a></li>
|
||||||
<li><a onclick="panel.getUploads()">Uploads</a></li>
|
<li><a id="itemUploads" onclick="panel.getUploads()">Uploads</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="menu-label">Albums</p>
|
<p class="menu-label">Albums</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li><a onclick="panel.getAlbums()">Manage your albums</a></li>
|
<li><a id="itemManageGallery" onclick="panel.getAlbums()">Manage your albums</a></li>
|
||||||
<li>
|
<li>
|
||||||
<ul id='albumsContainer'></ul>
|
<ul id='albumsContainer'></ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="menu-label">Administration</p>
|
<p class="menu-label">Administration</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li><a onclick="panel.changeTokens()">Change your tokens</a></li>
|
<li><a id="itemTokens" onclick="panel.changeTokens()">Change your tokens</a></li>
|
||||||
<li><a onclick="panel.logout()">Logout</a></li>
|
<li><a onclick="panel.logout()">Logout</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -54,19 +54,17 @@ panel.prepareDashboard = function(){
|
|||||||
document.getElementById('auth').style.display = 'none';
|
document.getElementById('auth').style.display = 'none';
|
||||||
document.getElementById('dashboard').style.display = 'block';
|
document.getElementById('dashboard').style.display = 'block';
|
||||||
|
|
||||||
/*
|
|
||||||
document.getElementById('itemUploads').addEventListener('click', function(){
|
document.getElementById('itemUploads').addEventListener('click', function(){
|
||||||
panel.getUploads();
|
panel.setActiveMenu(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('itemManageGallery').addEventListener('click', function(){
|
document.getElementById('itemManageGallery').addEventListener('click', function(){
|
||||||
panel.getAlbums();
|
panel.setActiveMenu(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('itemTokens').addEventListener('click', function(){
|
document.getElementById('itemTokens').addEventListener('click', function(){
|
||||||
panel.changeTokens();
|
panel.setActiveMenu(this);
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
panel.getAlbumsSidebar();
|
panel.getAlbumsSidebar();
|
||||||
}
|
}
|
||||||
@ -427,6 +425,7 @@ panel.getAlbumsSidebar = function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
panel.getAlbum = function(item){
|
panel.getAlbum = function(item){
|
||||||
|
panel.setActiveMenu(item);
|
||||||
panel.getUploads(item.id);
|
panel.getUploads(item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,6 +515,15 @@ panel.submitToken = function(type, token){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panel.setActiveMenu = function(item){
|
||||||
|
var menu = document.getElementById('menu');
|
||||||
|
var items = menu.getElementsByTagName('a');
|
||||||
|
for(var i = 0; i < items.length; i++)
|
||||||
|
items[i].className = "";
|
||||||
|
|
||||||
|
item.className = 'is-active';
|
||||||
|
}
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
panel.preparePage();
|
panel.preparePage();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user