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>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="token" value="{$token}">
|
<input type="hidden" name="token" value="{$token}">
|
||||||
|
<input type="hidden" name="source" value="{$source}">
|
||||||
{if="$http_referer"}
|
{if="$http_referer"}
|
||||||
<input type="hidden" name="returnurl" value="{$http_referer}">
|
<input type="hidden" name="returnurl" value="{$http_referer}">
|
||||||
{/if}
|
{/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.'))"}');
|
alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}');
|
||||||
}
|
}
|
||||||
window.open(
|
window.open(
|
||||||
'{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
|
'{$pageabsaddr}admin/shaare?post='%20+%20encodeURIComponent(url)+
|
||||||
'&title='%20+%20encodeURIComponent(title)+
|
'&title='%20+%20encodeURIComponent(title)+
|
||||||
'&description='%20+%20encodeURIComponent(desc)+
|
'&description='%20+%20encodeURIComponent(desc)+
|
||||||
'&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
|
'&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();"
|
{elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
|
||||||
{else}onload="document.linkform.lf_tags.focus();"{/if} >
|
{else}onload="document.linkform.lf_tags.focus();"{/if} >
|
||||||
<div id="pageheader">
|
<div id="pageheader">
|
||||||
{if="$source !== 'firefoxsocialapi'"}
|
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
{else}
|
|
||||||
<div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
|
<div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
|
||||||
{/if}
|
{/if}
|
||||||
<div id="editlinkform">
|
<div id="editlinkform">
|
||||||
|
@ -55,12 +53,11 @@
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
<input type="hidden" name="token" value="{$token}">
|
<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}
|
{if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if="$source !== 'firefoxsocialapi'"}
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
{/if}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
var%20url%20=%20location.href;
|
var%20url%20=%20location.href;
|
||||||
var%20title%20=%20document.title%20||%20url;
|
var%20title%20=%20document.title%20||%20url;
|
||||||
window.open(
|
window.open(
|
||||||
'{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
|
'{$pageabsaddr}admin/shaare?post='%20+%20encodeURIComponent(url)+
|
||||||
'&title='%20+%20encodeURIComponent(title)+
|
'&title='%20+%20encodeURIComponent(title)+
|
||||||
'&description='%20+%20encodeURIComponent(document.getSelection())+
|
'&description='%20+%20encodeURIComponent(document.getSelection())+
|
||||||
'&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1'
|
'&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1'
|
||||||
|
|
Loading…
Reference in a new issue