mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
More changes related to the previous commit
This commit is contained in:
parent
c238f4f8ed
commit
5c365dc4a8
@ -5,7 +5,6 @@ var page = {
|
||||
token: localStorage.token,
|
||||
|
||||
// HTML elements
|
||||
form: null,
|
||||
user: null,
|
||||
pass: null
|
||||
}
|
||||
@ -78,10 +77,10 @@ window.onload = function () {
|
||||
page.user = document.getElementById('user')
|
||||
page.pass = document.getElementById('pass')
|
||||
|
||||
page.form = document.getElementById('authForm')
|
||||
page.form.addEventListener('keyup', page.formEnter)
|
||||
page.form.addEventListener('keypress', page.formEnter)
|
||||
page.form.onsubmit = function (event) {
|
||||
var form = document.getElementById('authForm')
|
||||
form.addEventListener('keyup', page.formEnter)
|
||||
form.addEventListener('keypress', page.formEnter)
|
||||
form.onsubmit = function (event) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
|
@ -73,29 +73,39 @@ page.prepareDashboard = function () {
|
||||
|
||||
document.getElementById('itemUploads').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.getUploads()
|
||||
})
|
||||
|
||||
document.getElementById('itemDeleteByNames').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.deleteByNames()
|
||||
})
|
||||
|
||||
document.getElementById('itemManageGallery').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.getAlbums()
|
||||
})
|
||||
|
||||
document.getElementById('itemFileLength').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.changeFileLength()
|
||||
})
|
||||
|
||||
document.getElementById('itemTokens').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.changeToken()
|
||||
})
|
||||
|
||||
document.getElementById('itemPassword').addEventListener('click', function () {
|
||||
page.setActiveMenu(this)
|
||||
page.changePassword()
|
||||
})
|
||||
|
||||
document.getElementById('itemLogout').innerHTML = `Logout ( ${page.username} )`
|
||||
var logoutBtn = document.getElementById('itemLogout')
|
||||
logoutBtn.addEventListener('click', function () {
|
||||
page.logout()
|
||||
})
|
||||
logoutBtn.innerHTML = `Logout ( ${page.username} )`
|
||||
|
||||
page.getAlbumsSidebar()
|
||||
}
|
||||
|
@ -505,4 +505,8 @@ window.onload = function () {
|
||||
})
|
||||
|
||||
page.lazyLoad = new LazyLoad()
|
||||
|
||||
document.getElementById('createAlbum').addEventListener('click', function () {
|
||||
page.createAlbum()
|
||||
})
|
||||
}
|
||||
|
@ -53,16 +53,16 @@
|
||||
<a href=".">Frontpage</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemUploads" onclick="page.getUploads()">Uploads</a>
|
||||
<a id="itemUploads">Uploads</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemDeleteByNames" onclick="page.deleteByNames()">Delete by names</a>
|
||||
<a id="itemDeleteByNames">Delete by names</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Albums</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemManageGallery" onclick="page.getAlbums()">Manage your albums</a>
|
||||
<a id="itemManageGallery">Manage your albums</a>
|
||||
</li>
|
||||
<li>
|
||||
<ul id="albumsContainer"></ul>
|
||||
@ -71,16 +71,16 @@
|
||||
<p class="menu-label">Administration</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemFileLength" onclick="page.changeFileLength()">File name length</a>
|
||||
<a id="itemFileLength">File name length</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemTokens" onclick="page.changeToken()">Manage your token</a>
|
||||
<a id="itemTokens">Manage your token</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemPassword" onclick="page.changePassword()">Change your password</a>
|
||||
<a id="itemPassword">Change your password</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemLogout" onclick="page.logout()">Logout</a>
|
||||
<a id="itemLogout">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<a class="button is-breeze" title="Create new album" onclick="page.createAlbum()">
|
||||
<a id="createAlbum" class="button is-breeze" title="Create new album">
|
||||
<i class="icon-plus"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user