941aceb9b0
* Update tomorrow.css * Update main.css * Update main.css * fix invalid date of torrents in user profile * modify fancy js to work with new form * enhance fancy JS to adapt to every form * Update index.jet.html * Update index_admin.jet.html * Update torrentlist.jet.html * what the fuck * ditto * forgot to remove the debug alert
47 lignes
1,3 Kio
HTML
47 lignes
1,3 Kio
HTML
{* We extend the base template *}
|
|
{{ extends "partials/base" }}
|
|
{{import "partials/helpers/search"}}
|
|
|
|
{* We apply the menu in the base template *}
|
|
{{ block menu()}}
|
|
{{include "partials/menu/site"}}
|
|
{{end}}
|
|
|
|
{* We used to add the class content for admin *}
|
|
{{ block contclass()}}admin-content{{end}}
|
|
|
|
{* We add the mod panel title and the title block *}
|
|
{{block titleBase()}} Moderation Panel - {{block title()}}{{end}}
|
|
{{end}}
|
|
|
|
{* We add the mod nav and the body block *}
|
|
{{ block content_body_base()}}
|
|
{{include "partials/menu/admin"}}
|
|
{{ block content_body()}}
|
|
{{end}}
|
|
{{end}}
|
|
{{block footer_js()}}
|
|
<script type="text/javascript">
|
|
var deleteButtons = document.querySelectorAll("button.form-input.btn-red")
|
|
|
|
for(var i = 0; i < deleteButtons.length; i++) {
|
|
deleteButtons[i].addEventListener("click", function (e) {
|
|
e.preventDefault()
|
|
var form = this.parentNode
|
|
var formInputs = form.querySelectorAll('input')
|
|
var query = ""
|
|
|
|
for(var x = 0; x < formInputs.length; x ++) {
|
|
if(query != "") query = query + "&"
|
|
query = query + formInputs[x].name + "=" + formInputs[x].value
|
|
}
|
|
|
|
Query.Post(form.action, query, function(data) {})
|
|
|
|
this.parentNode.parentNode.parentNode.className = this.parentNode.parentNode.className + " hidden"
|
|
this.innerText = "Deleted"
|
|
this.disabled = true
|
|
})
|
|
}
|
|
</script>
|
|
{{end}}
|