From 958fc15fecfe353a2cb2cf1cb4c7d10591ab74f9 Mon Sep 17 00:00:00 2001 From: Willi Eggeling Date: Thu, 24 Aug 2017 10:20:32 +0200 Subject: fixed note bookmarklet - the double quotes used in the alert() call of the note bookmarklet in the default template collided with the ones of the href tag - replaced the double quotes with single ones (just like the link bookmarklet) --- tpl/default/tools.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/default/tools.html b/tpl/default/tools.html index 35173d17..72fd58af 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -97,7 +97,7 @@ var%20desc=document.getSelection().toString(); if(desc.length>4000){ desc=desc.substr(0,4000)+'...'; - alert("{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}"); + alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}'); } window.open( '{$pageabsaddr}?private=1&post='+ -- cgit v1.2.3 From 2e07e77573a379f9af006b2c523117eef9fdf9b2 Mon Sep 17 00:00:00 2001 From: Willi Eggeling Date: Sat, 26 Aug 2017 09:27:10 +0200 Subject: new setting: default value for 'remember me' checkbox - the default state for the login page's 'remember me' checkbox can now be configured - adapted the default and vintage theme to consider the new setting - added documentation for the new setting --- tpl/default/loginform.html | 3 ++- tpl/vintage/loginform.html | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tpl') diff --git a/tpl/default/loginform.html b/tpl/default/loginform.html index eb6d8378..5777a218 100644 --- a/tpl/default/loginform.html +++ b/tpl/default/loginform.html @@ -30,7 +30,8 @@
+ {if="$remember_user_default"}checked="checked"{/if} + tabindex="22">
diff --git a/tpl/vintage/loginform.html b/tpl/vintage/loginform.html index 84176385..1becd44f 100644 --- a/tpl/vintage/loginform.html +++ b/tpl/vintage/loginform.html @@ -24,7 +24,9 @@ {if="$returnurl"}{/if} -- cgit v1.2.3 From a74f52a8d206a6d5c3fe27667f1633bf2fc1374d Mon Sep 17 00:00:00 2001 From: Willi Eggeling Date: Sun, 27 Aug 2017 19:19:59 +0200 Subject: fixed link deletion When deleting links, the js of the default theme separated ids by an escaped space ('+'). There was a trailing '+' after the ids which led to the php code detecting multiple values even for single values. In combination with the id '0' this could led to no id found at all and a resulting php error. this commit fixes the behavior and adds an additional error handling and trimming to the php code. --- tpl/default/js/shaarli.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tpl') diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 4f49affa..f38ba62f 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -401,14 +401,14 @@ window.onload = function () { var message = 'Are you sure you want to delete '+ links.length +' links?\n'; message += 'This action is IRREVERSIBLE!\n\nTitles:\n'; - var ids = ''; + var ids = []; links.forEach(function(item) { message += ' - '+ item['title'] +'\n'; - ids += item['id'] +'+'; + ids.push(item['id']); }); if (window.confirm(message)) { - window.location = '?delete_link&lf_linkdate='+ ids +'&token='+ token.value; + window.location = '?delete_link&lf_linkdate='+ ids.join('+') +'&token='+ token.value; } }); } -- cgit v1.2.3 From 206c45bd05a79b5e6d0c51452a6ac69e85cca0b2 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 2 Sep 2017 13:50:03 +0200 Subject: Firefox Social title: Use document.title instead of RainTPL variable Fixes #929 --- tpl/default/js/shaarli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 4f49affa..e0b4c752 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -607,10 +607,11 @@ function htmlEntities(str) function activateFirefoxSocial(node) { var loc = location.href; var baseURL = loc.substring(0, loc.lastIndexOf("/") + 1); + var title = document.title; // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. var data = { - name: "{$shaarlititle}", + name: title, description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", author: "Shaarli", version: "1.0.0", -- cgit v1.2.3 From ceb738c59163b47e9c875764c9d3223bbc1eba24 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Mon, 4 Sep 2017 22:36:21 +0200 Subject: visited links color: same hue as unvisited links, darkened Related to https://github.com/shaarli/Shaarli/issues/877 Plain grey links would lead to think that the link is somehow disabled/inaccessible/private This slightly improves clarity/usability --- tpl/default/css/shaarli.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css index e1868c59..ba589723 100644 --- a/tpl/default/css/shaarli.css +++ b/tpl/default/css/shaarli.css @@ -539,7 +539,7 @@ body, .pure-g [class*="pure-u"] { } .linklist-item-title a:visited .linklist-link { - color: #555555; + color: #2a4c41; } .linklist-item-title a:hover, .linklist-item-title .linklist-link:hover{ -- cgit v1.2.3 From bfe4f536bbfe03f38e0c801bfbd26587a2b64a7f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 1 Oct 2017 11:02:48 +0200 Subject: Add a version hash for asset loading to prevent browser's cache issue The hash is generated using the same salt as the one used for credentials (1 salt per instance) in order to avoid exposing the instance version. Fixes #965 --- tpl/default/includes.html | 14 +++++++------- tpl/default/page.footer.html | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tpl') diff --git a/tpl/default/includes.html b/tpl/default/includes.html index 0350ef66..80c08333 100644 --- a/tpl/default/includes.html +++ b/tpl/default/includes.html @@ -5,16 +5,16 @@ - - - - - - + + + + + + {if="is_file('data/user.css')"} {/if} {loop="$plugins_includes.css_files"} - + {/loop} \ No newline at end of file diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html index 94f771a2..54b16e8a 100644 --- a/tpl/default/page.footer.html +++ b/tpl/default/page.footer.html @@ -27,6 +27,6 @@ {/loop} - - - + + + -- cgit v1.2.3 From 9c46b347b8118a127ca965106f66bb4d4d43f427 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 1 Oct 2017 11:49:17 +0200 Subject: Fix jumpy textarea with long content in post edit We manually reset the scroll position, to avoid height = 'auto' jump to the top Fixes #971 --- tpl/default/js/shaarli.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tpl') diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 1c66ebbd..55656f80 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -275,8 +275,14 @@ window.onload = function () { }; function init () { function resize () { + /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */ + var scrollTop = window.pageYOffset || + (document.documentElement || document.body.parentNode || document.body).scrollTop; + description.style.height = 'auto'; description.style.height = description.scrollHeight+10+'px'; + + window.scrollTo(0, scrollTop); } /* 0-timeout to get the already changed text */ function delayedResize () { -- cgit v1.2.3 From d14555a3dfdc0d16badefcc54054802ae83752a4 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 7 Oct 2017 11:27:44 +0200 Subject: Fix security issue reported by @chbi Vulnerability introduced by 6ccd0b218fbd34de750f55b78f3dc43bb3d9fa8e - release with Shaarli v0.9.1. --- tpl/default/tag.cloud.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html index 96b357a3..68335c70 100644 --- a/tpl/default/tag.cloud.html +++ b/tpl/default/tag.cloud.html @@ -26,7 +26,7 @@