From 4103962931b031490fccbaf95ff2b052a82037c7 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 14 Oct 2016 15:13:38 +0200 Subject: [PATCH] Change password and manage tags template --- tpl/default/addlink.html | 5 +---- tpl/default/changepassword.html | 29 ++++++++++++++++++++++++ tpl/default/changetag.html | 40 +++++++++++++++++++++++++++++++++ tpl/default/css/shaarli.css | 2 +- tpl/default/js/shaarli.js | 31 +++++++++++++++++-------- 5 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 tpl/default/changepassword.html create mode 100644 tpl/default/changetag.html diff --git a/tpl/default/addlink.html b/tpl/default/addlink.html index bc328daa..05207551 100644 --- a/tpl/default/addlink.html +++ b/tpl/default/addlink.html @@ -9,7 +9,7 @@
{include="page.footer"} - diff --git a/tpl/default/changepassword.html b/tpl/default/changepassword.html new file mode 100644 index 00000000..69191fad --- /dev/null +++ b/tpl/default/changepassword.html @@ -0,0 +1,29 @@ + + + + {include="includes"} + + +{include="page.header"} +
+
+ +
+{include="page.footer"} + + diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html new file mode 100644 index 00000000..ca2d2dba --- /dev/null +++ b/tpl/default/changetag.html @@ -0,0 +1,40 @@ + + + + {include="includes"} + + +{include="page.header"} +
+
+ +
+{include="page.footer"} + + diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css index 4c9f76af..22c173b1 100644 --- a/tpl/default/css/shaarli.css +++ b/tpl/default/css/shaarli.css @@ -969,4 +969,4 @@ pre { #pluginform .mobile-row, #pluginform .mobile-row td { border-top-style: none; } -} \ No newline at end of file +} diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index f24aff73..e5425486 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -146,16 +146,29 @@ if (newVersionDismiss != null) { var loginButton = document.getElementById('login-button'); var loginBlock = document.getElementById('header-login-form'); -loginButton.addEventListener('click', function(event) { - event.preventDefault(); - loginBlock.classList.toggle('open'); - document.getElementById('content').style.boxShadow = 'none'; -}); +if (loginButton != null) { + loginButton.addEventListener('click', function(event) { + event.preventDefault(); + loginBlock.classList.toggle('open'); + document.getElementById('content').style.boxShadow = 'none'; + }); +} // Focus on login field. -loginBlock.addEventListener('transitionend', function() { - loginBlock.firstElementChild.focus(); -}); +if (loginBlock != null) { + loginBlock.addEventListener('transitionend', function () { + loginBlock.firstElementChild.focus(); + }); +} var hiddenReturnurl = document.getElementsByName('returnurl'); -hiddenReturnurl.value = window.location.href; \ No newline at end of file +if (hiddenReturnurl != null) { + hiddenReturnurl.value = window.location.href; +} + + +var autofocusElements = document.querySelector('.autofocus'); +console.log(autofocusElements); +if (autofocusElements != null) { + autofocusElements.focus(); +} \ No newline at end of file -- 2.41.0