]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix bookmarklet with new routes
authorArthurHoaro <arthur@hoa.ro>
Sat, 13 Jun 2020 16:17:15 +0000 (18:17 +0200)
committerArthurHoaro <arthur@hoa.ro>
Thu, 23 Jul 2020 19:19:21 +0000 (21:19 +0200)
   * Use the new shaare route
   * Add source hidden input in editlink template to close the popup after saving

tpl/default/editlink.html
tpl/default/tools.html
tpl/vintage/editlink.html
tpl/vintage/tools.html

index 15edb00d6a80fe3f154671f329f395dced26e7b8..568545bd5cee0fb100ef838fb9d08cc813079b3c 100644 (file)
@@ -81,6 +81,7 @@
       </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}
index fd58cca9bd8430feab9e329ab8c426ed5de7dcc6..d07dabd00141ed872302af4a0f64d4de07fb1328 100644 (file)
@@ -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)+
               '&amp;title='%20+%20encodeURIComponent(title)+
               '&amp;description='%20+%20encodeURIComponent(desc)+
               '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
index f751d50b055968123334cd3c4a3e48a39b6d1edb..ccf8c6778a0a18f98e05026e5aabe06c9f912fb0 100644 (file)
@@ -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">
               </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>
index 32707efacb151216d929c6063c7b8b99d8b29289..7b69f43eea7f86b92a39d390e898589e52006ed1 100644 (file)
@@ -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)+
                                        '&amp;title='%20+%20encodeURIComponent(title)+
                                        '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
                                        '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1'