From 96a0e6cdbd5dad3cc07d162ff42f3258226b5f81 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 21 Apr 2016 15:42:13 +0200 Subject: [PATCH] =?UTF-8?q?Int=C3=A9gration=20du=20MenuDeflater()=20=C3=A0?= =?UTF-8?q?=20la=20cr=C3=A9ation=20de=20token/user=20pour=20la=20page=20de?= =?UTF-8?q?=20param=C3=A8tres.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/js/settings-min.js | 7 +++++++ view/js/settings.js | 34 ++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 view/js/settings-min.js diff --git a/view/js/settings-min.js b/view/js/settings-min.js new file mode 100644 index 0000000..e806d09 --- /dev/null +++ b/view/js/settings-min.js @@ -0,0 +1,7 @@ +var TOKEN={add:{toggle:document.getElementById("add-token"),panel:document.querySelector("[data-sublink='tokens'] div[data-add]"),state:!0,submit:document.querySelector("[data-sublink='tokens'] div[data-add] #add-token-submit")},remove:{buttons:document.querySelectorAll(".remove-token")}},tokenDeflater=new FormDeflater(TOKEN.add.panel,["input"],["id"]); +TOKEN.add.toggle.addEventListener("click",function(a){TOKEN.add.state?TOKEN.add.panel.addClass("active"):TOKEN.add.panel.remClass("active");TOKEN.add.state=!TOKEN.add.state},!1);TOKEN.add.submit.addEventListener("click",function(a){a=tokenDeflater.deflate();api.send({path:"token/generate",name:a["add-name"].value,duration:a["add-duration"].value},function(a){0==a.ModuleError&&reload()})},!1); +for(var i=0;i