Fix bookmarklet with new routes
* Use the new shaare route * Add source hidden input in editlink template to close the popup after saving
This commit is contained in:
parent
baa6979194
commit
1ab675445e
4 changed files with 4 additions and 6 deletions
|
@ -81,6 +81,7 @@ <h2 class="window-title">
|
|||
</div>
|
||||
|
||||
<input type="hidden" name="token" value="{$token}">
|
||||
<input type="hidden" name="source" value="{$source}">
|
||||
{if="$http_referer"}
|
||||
<input type="hidden" name="returnurl" value="{$http_referer}">
|
||||
{/if}
|
||||
|
|
|
@ -86,7 +86,7 @@ <h2 class="window-title">Bookmarklets</h2>
|
|||
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'
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
{elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
|
||||
{else}onload="document.linkform.lf_tags.focus();"{/if} >
|
||||
<div id="pageheader">
|
||||
{if="$source !== 'firefoxsocialapi'"}
|
||||
{include="page.header"}
|
||||
{else}
|
||||
<div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
|
||||
{/if}
|
||||
<div id="editlinkform">
|
||||
|
@ -55,12 +53,11 @@
|
|||
</a>
|
||||
{/if}
|
||||
<input type="hidden" name="token" value="{$token}">
|
||||
<input type="hidden" name="source" value="{$source}">
|
||||
{if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{if="$source !== 'firefoxsocialapi'"}
|
||||
{include="page.footer"}
|
||||
{/if}
|
||||
</body>
|
||||
</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'
|
||||
|
|
Loading…
Reference in a new issue