aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/linklist.html
diff options
context:
space:
mode:
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-01 22:21:10 +0100
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-01 22:21:10 +0100
commit858c5c2b43ce16f6d4b388725ef2d7a95e4a1986 (patch)
treea5d4f24761bd768ea44118803162907f814c3980 /tpl/linklist.html
parent58046a19ae3e8cba4b4dbef783bd3caed2f6e881 (diff)
downloadShaarli-858c5c2b43ce16f6d4b388725ef2d7a95e4a1986.tar.gz
Shaarli-858c5c2b43ce16f6d4b388725ef2d7a95e4a1986.tar.zst
Shaarli-858c5c2b43ce16f6d4b388725ef2d7a95e4a1986.zip
Added option to disable jQuery and heavy javascript
Shaarli uses light Javascript in its normal operation, and some jQuery for some features (autocomplete in tags, QR-Code popup...). jQuery can be slow on small computers. An option has been added in configuration screen to disable javascript features which are hard on CPU. (Note that the Picture Wall is awfully heavy *without* jQuery.) (Side note: A *LOT* of users want Shaarli to work without javasript at all, if possible. That's why I try to use as few javascript as possible: It keeps Shaarli pages fast.)
Diffstat (limited to 'tpl/linklist.html')
-rw-r--r--tpl/linklist.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/tpl/linklist.html b/tpl/linklist.html
index 45bd478f..3a703512 100644
--- a/tpl/linklist.html
+++ b/tpl/linklist.html
@@ -48,7 +48,8 @@
48 {else} 48 {else}
49 <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span> 49 <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
50 {/if} 50 {/if}
51 <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%3F{$value.linkdate|smallHash}&width=200&height=200" onclick="return false;" class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - 51 <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%3F{$value.linkdate|smallHash}&width=200&height=200"
52 {if="empty($GLOBALS['disablejquery'])"}onclick="return false;"{/if} class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> -
52 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br> 53 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
53 {if="$value.tags"} 54 {if="$value.tags"}
54 <div class="linktaglist"> 55 <div class="linktaglist">
@@ -65,6 +66,7 @@
65</div> 66</div>
66 67
67 {include="page.footer"} 68 {include="page.footer"}
69{if="empty($GLOBALS['disablejquery'])"}
68<script> 70<script>
69$(document).ready(function() { 71$(document).ready(function() {
70 $('a.qrcode').click(function(){ 72 $('a.qrcode').click(function(){
@@ -75,5 +77,6 @@ $(document).ready(function() {
75}); 77});
76function hide_qrcode() { $('div.qrcode').remove(); } 78function hide_qrcode() { $('div.qrcode').remove(); }
77</script> 79</script>
80{/if}
78</body> 81</body>
79</html> \ No newline at end of file 82</html> \ No newline at end of file