From 1ab675445e52000d8b667c898aae041357304a33 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 13 Jun 2020 18:17:15 +0200 Subject: Fix bookmarklet with new routes * Use the new shaare route * Add source hidden input in editlink template to close the popup after saving --- tpl/default/editlink.html | 1 + tpl/default/tools.html | 2 +- tpl/vintage/editlink.html | 5 +---- tpl/vintage/tools.html | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'tpl') diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html index 15edb00d..568545bd 100644 --- a/tpl/default/editlink.html +++ b/tpl/default/editlink.html @@ -81,6 +81,7 @@ + {if="$http_referer"} {/if} diff --git a/tpl/default/tools.html b/tpl/default/tools.html index fd58cca9..d07dabd0 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -86,7 +86,7 @@ alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}'); } window.open( - '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ + '{$pageabsaddr}admin/shaare?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ '&description='%20+%20encodeURIComponent(desc)+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' diff --git a/tpl/vintage/editlink.html b/tpl/vintage/editlink.html index f751d50b..ccf8c677 100644 --- a/tpl/vintage/editlink.html +++ b/tpl/vintage/editlink.html @@ -8,9 +8,7 @@ {elseif="$link.description==''"}onload="document.linkform.lf_description.focus();" {else}onload="document.linkform.lf_tags.focus();"{/if} > -{if="$source !== 'firefoxsocialapi'"} {include="page.footer"} -{/if} diff --git a/tpl/vintage/tools.html b/tpl/vintage/tools.html index 32707efa..7b69f43e 100644 --- a/tpl/vintage/tools.html +++ b/tpl/vintage/tools.html @@ -24,7 +24,7 @@ var%20url%20=%20location.href; var%20title%20=%20document.title%20||%20url; window.open( - '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ + '{$pageabsaddr}admin/shaare?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ '&description='%20+%20encodeURIComponent(document.getSelection())+ '&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' -- cgit v1.2.3