aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/linklist.html
diff options
context:
space:
mode:
authorFlorian Eula <eula.florian@gmail.com>2014-11-21 19:43:53 +0100
committerFlorian Eula <eula.florian@gmail.com>2014-11-21 19:43:53 +0100
commitd741c9fc16d80cbb99c192a816c1643a12a38266 (patch)
tree61a5ba6bf9b73403399a57ad409c81068e3c7a6c /tpl/linklist.html
parent732e683bdacc2033b03820c8e80f7d31c54b94ef (diff)
downloadShaarli-d741c9fc16d80cbb99c192a816c1643a12a38266.tar.gz
Shaarli-d741c9fc16d80cbb99c192a816c1643a12a38266.tar.zst
Shaarli-d741c9fc16d80cbb99c192a816c1643a12a38266.zip
Added a link to the visible URL in the link list
Corrected CSS to prevent a line from showing underneath Fixes https://github.com/shaarli/Shaarli/issues/53
Diffstat (limited to 'tpl/linklist.html')
-rw-r--r--tpl/linklist.html18
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
75function remove_qrcode() 75function 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).
83function showQrCode(caller,loading=false) 83function 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);