diff options
author | nodiscc <nodiscc@gmail.com> | 2014-11-21 21:16:02 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2014-11-21 21:16:02 +0100 |
commit | a58240ce8d0e1bdb814e24ae4dc9584dda2dd6f7 (patch) | |
tree | 3c3e3c1d0e48fa6fccb1ba5544f8572e42ff4db6 /tpl | |
parent | 9bd6089b57bc62b904df47f5105be05a9747d798 (diff) | |
parent | d741c9fc16d80cbb99c192a816c1643a12a38266 (diff) | |
download | Shaarli-a58240ce8d0e1bdb814e24ae4dc9584dda2dd6f7.tar.gz Shaarli-a58240ce8d0e1bdb814e24ae4dc9584dda2dd6f7.tar.zst Shaarli-a58240ce8d0e1bdb814e24ae4dc9584dda2dd6f7.zip |
Merge pull request #62 from pikzen/linkurl
Added a link to the visible URL in the link list
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/linklist.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tpl/linklist.html b/tpl/linklist.html index acb4bab0..d33fc3c3 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html | |||
@@ -51,9 +51,9 @@ | |||
51 | {if="$GLOBALS['config']['ARCHIVE_ORG']"} | 51 | {if="$GLOBALS['config']['ARCHIVE_ORG']"} |
52 | <span class="linkarchive"><a href="https://web.archive.org/web/{$value.url|htmlspecialchars}">archive</a> - </span> | 52 | <span class="linkarchive"><a href="https://web.archive.org/web/{$value.url|htmlspecialchars}">archive</a> - </span> |
53 | {/if} | 53 | {/if} |
54 | <div style="position:relative;display:inline;"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}" | 54 | <div style="position:relative;display:inline;"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}" |
55 | onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - | 55 | onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - |
56 | <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br> | 56 | <a href={$value.url|htmlspecialchars}><span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span></a><br> |
57 | {if="$value.tags"} | 57 | {if="$value.tags"} |
58 | <div class="linktaglist"> | 58 | <div class="linktaglist"> |
59 | {loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value|htmlspecialchars}</a></span> {/loop} | 59 | {loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value|htmlspecialchars}</a></span> {/loop} |
@@ -68,12 +68,12 @@ | |||
68 | 68 | ||
69 | </div> | 69 | </div> |
70 | 70 | ||
71 | {include="page.footer"} | 71 | {include="page.footer"} |
72 | 72 | ||
73 | <script language="JavaScript"> | 73 | <script language="JavaScript"> |
74 | // Remove any displayed QR-Code | 74 | // Remove any displayed QR-Code |
75 | function remove_qrcode() | 75 | function remove_qrcode() |
76 | { | 76 | { |
77 | var elem = document.getElementById("permalinkQrcode"); | 77 | var elem = document.getElementById("permalinkQrcode"); |
78 | if (elem) elem.parentNode.removeChild(elem); | 78 | if (elem) elem.parentNode.removeChild(elem); |
79 | return false; | 79 | return false; |
@@ -81,7 +81,7 @@ function remove_qrcode() | |||
81 | 81 | ||
82 | // Show the QR-Code of a permalink (when the QR-Code icon is clicked). | 82 | // Show the QR-Code of a permalink (when the QR-Code icon is clicked). |
83 | function showQrCode(caller,loading=false) | 83 | function showQrCode(caller,loading=false) |
84 | { | 84 | { |
85 | // Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked: | 85 | // Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked: |
86 | if (typeof(qr)=='undefined') // Load qr.js only if not present. | 86 | if (typeof(qr)=='undefined') // Load qr.js only if not present. |
87 | { | 87 | { |
@@ -97,18 +97,18 @@ function showQrCode(caller,loading=false) | |||
97 | 97 | ||
98 | // Remove previous qrcode if present. | 98 | // Remove previous qrcode if present. |
99 | remove_qrcode(); | 99 | remove_qrcode(); |
100 | 100 | ||
101 | // Build the div which contains the QR-Code: | 101 | // Build the div which contains the QR-Code: |
102 | var element = document.createElement('div'); | 102 | var element = document.createElement('div'); |
103 | element.id="permalinkQrcode"; | 103 | element.id="permalinkQrcode"; |
104 | // Make QR-Code div commit sepuku when clicked: | 104 | // Make QR-Code div commit sepuku when clicked: |
105 | if ( element.attachEvent ){ element.attachEvent('onclick', 'this.parentNode.removeChild(this);' ); } // Damn IE | 105 | if ( element.attachEvent ){ element.attachEvent('onclick', 'this.parentNode.removeChild(this);' ); } // Damn IE |
106 | else { element.setAttribute('onclick', 'this.parentNode.removeChild(this);' ); } | 106 | else { element.setAttribute('onclick', 'this.parentNode.removeChild(this);' ); } |
107 | 107 | ||
108 | // Build the QR-Code: | 108 | // Build the QR-Code: |
109 | var image = qr.image({size: 8,value: caller.dataset.permalink}); | 109 | var image = qr.image({size: 8,value: caller.dataset.permalink}); |
110 | if (image) | 110 | if (image) |
111 | { | 111 | { |
112 | element.appendChild(image); | 112 | element.appendChild(image); |
113 | element.innerHTML+= "<br>Click to close"; | 113 | element.innerHTML+= "<br>Click to close"; |
114 | caller.parentNode.appendChild(element); | 114 | caller.parentNode.appendChild(element); |