aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/dailyrss.html24
-rw-r--r--tpl/editlink.html24
2 files changed, 39 insertions, 9 deletions
diff --git a/tpl/dailyrss.html b/tpl/dailyrss.html
index 1b7ab8e9..d959d6be 100644
--- a/tpl/dailyrss.html
+++ b/tpl/dailyrss.html
@@ -1,8 +1,16 @@
1{loop="links"} 1<item>
2 <h3><a href="{$value.url}">{$value.title}</a></h3> 2 <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title>
3 <small>{if="!$GLOBALS['config']['HIDE_TIMESTAMPS']"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br> 3 <guid>{$absurl}</guid>
4 {$value.url}</small><br> 4 <link>{$absurl}</link>
5 {if="$value.thumbnail"}{$value.thumbnail}{/if}<br> 5 <pubDate>{$rfc822date}</pubDate>
6 {if="$value.description"}{$value.formatedDescription}{/if} 6 <description><![CDATA[
7 <br><br><hr> 7 {loop="links"}
8{/loop} \ No newline at end of file 8 <h3><a href="{$value.url}">{$value.title}</a></h3>
9 <small>{if="!$GLOBALS['config']['HIDE_TIMESTAMPS']"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br>
10 {$value.url}</small><br>
11 {if="$value.thumbnail"}{$value.thumbnail}{/if}<br>
12 {if="$value.description"}{$value.formatedDescription}{/if}
13 <br><br><hr>
14 {/loop}
15 ]]></description>
16</item> \ No newline at end of file
diff --git a/tpl/editlink.html b/tpl/editlink.html
index a32748ab..3733ca21 100644
--- a/tpl/editlink.html
+++ b/tpl/editlink.html
@@ -42,7 +42,7 @@
42{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn())"} 42{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn())"}
43<script> 43<script>
44 $ = Awesomplete.$; 44 $ = Awesomplete.$;
45 new Awesomplete($('input[data-multiple]'), { 45 awesomplete = new Awesomplete($('input[data-multiple]'), {
46 filter: function(text, input) { 46 filter: function(text, input) {
47 return Awesomplete.FILTER_CONTAINS(text, input.match(/[^ ]*$/)[0]); 47 return Awesomplete.FILTER_CONTAINS(text, input.match(/[^ ]*$/)[0]);
48 }, 48 },
@@ -52,6 +52,28 @@
52 }, 52 },
53 minChars: 1 53 minChars: 1
54 }); 54 });
55
56 /**
57 * Remove already selected items from autocompletion list.
58 * HTML list is never updated, so removing a tag will add it back to awesomplete.
59 *
60 * FIXME: This a workaround waiting for awesomplete to handle this.
61 * https://github.com/LeaVerou/awesomplete/issues/16749
62 */
63 var input = document.querySelector('#lf_tags');
64 input.addEventListener('input', function()
65 {
66 proposedTags = input.getAttribute('data-list').replace(/,/g, '').split(' ');
67 reg = /(\w+) /g;
68 while((match = reg.exec(input.value)) !== null) {
69 id = proposedTags.indexOf(match[1]);
70 if(id != -1 ) {
71 proposedTags.splice(id, 1);
72 }
73 }
74
75 awesomplete.list = proposedTags;
76 });
55</script> 77</script>
56{/if} 78{/if}
57</body> 79</body>