diff options
author | nodiscc <nodiscc@gmail.com> | 2015-06-23 14:18:31 +0200 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2015-06-23 14:18:31 +0200 |
commit | 0fe36414c86e8417974d847f8d6d28c90def9ccc (patch) | |
tree | aceae145e8467302ac9c68c9bb2adeeffb9a9af4 | |
parent | 7d338fa5315a9de59cfff924114ec73e62380466 (diff) | |
parent | 65d62517443b67fc4a180c43b50fe62f11b9e3b6 (diff) | |
download | Shaarli-0fe36414c86e8417974d847f8d6d28c90def9ccc.tar.gz Shaarli-0fe36414c86e8417974d847f8d6d28c90def9ccc.tar.zst Shaarli-0fe36414c86e8417974d847f8d6d28c90def9ccc.zip |
Merge remote-tracking branch 'ArthurHoaro/search-tag-awesomplete' into next
-rw-r--r-- | inc/shaarli.css | 11 | ||||
-rw-r--r-- | index.php | 1 | ||||
-rw-r--r-- | tpl/linklist.html | 14 |
3 files changed, 23 insertions, 3 deletions
diff --git a/inc/shaarli.css b/inc/shaarli.css index c4348c70..f5413524 100644 --- a/inc/shaarli.css +++ b/inc/shaarli.css | |||
@@ -221,8 +221,17 @@ h1 { | |||
221 | margin-left:24px; | 221 | margin-left:24px; |
222 | } | 222 | } |
223 | 223 | ||
224 | .tagfilter div.awesomplete { | ||
225 | width: inherit; | ||
226 | } | ||
227 | |||
224 | .tagfilter #tagfilter_value { | 228 | .tagfilter #tagfilter_value { |
225 | width: 10%; | 229 | width: 100%; |
230 | display: inline; | ||
231 | } | ||
232 | |||
233 | .tagfilter li { | ||
234 | color: black; | ||
226 | } | 235 | } |
227 | 236 | ||
228 | .tagfilter input.bigbutton, .searchform input.bigbutton, .addform input.bigbutton { | 237 | .tagfilter input.bigbutton, .searchform input.bigbutton, .addform input.bigbutton { |
@@ -2006,6 +2006,7 @@ function buildLinkList($PAGE,$LINKSDB) | |||
2006 | $PAGE->assign('redirector',empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector']); // Optional redirector URL. | 2006 | $PAGE->assign('redirector',empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector']); // Optional redirector URL. |
2007 | $PAGE->assign('token',$token); | 2007 | $PAGE->assign('token',$token); |
2008 | $PAGE->assign('links',$linkDisp); | 2008 | $PAGE->assign('links',$linkDisp); |
2009 | $PAGE->assign('tags', $LINKSDB->allTags()); | ||
2009 | return; | 2010 | return; |
2010 | } | 2011 | } |
2011 | 2012 | ||
diff --git a/tpl/linklist.html b/tpl/linklist.html index 766a80ce..47e67e71 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html | |||
@@ -1,12 +1,21 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head>{include="includes"}</head> | 3 | <head> |
4 | <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" /> | ||
5 | {include="includes"} | ||
6 | </head> | ||
4 | <body> | 7 | <body> |
5 | <div id="pageheader"> | 8 | <div id="pageheader"> |
6 | {include="page.header"} | 9 | {include="page.header"} |
7 | <div id="headerform" class="search"> | 10 | <div id="headerform" class="search"> |
8 | <form method="GET" class="searchform" name="searchform"><input type="text" id="searchform_value" name="searchterm" placeholder="Search text" value=""> <input type="submit" value="Search" class="bigbutton"></form> | 11 | <form method="GET" class="searchform" name="searchform"><input type="text" id="searchform_value" name="searchterm" placeholder="Search text" value=""> <input type="submit" value="Search" class="bigbutton"></form> |
9 | <form method="GET" class="tagfilter" name="tagfilter"><input type="text" name="searchtags" id="tagfilter_value" placeholder="Filter by tag" value=""> <input type="submit" value="Search" class="bigbutton"></form> | 12 | <form method="GET" class="tagfilter" name="tagfilter"> |
13 | <input type="text" name="searchtags" id="tagfilter_value" placeholder="Filter by tag" value="" list="tagsList" autocomplete="off" class="awesomplete" data-minChars="1"> | ||
14 | <datalist id="tagsList"> | ||
15 | {loop="$tags"}<option>{$key}</option>{/loop} | ||
16 | </datalist> | ||
17 | <input type="submit" value="Search" class="bigbutton"> | ||
18 | </form> | ||
10 | </div> | 19 | </div> |
11 | </div> | 20 | </div> |
12 | 21 | ||
@@ -129,5 +138,6 @@ function showQrCode(caller,loading) | |||
129 | return false; | 138 | return false; |
130 | } | 139 | } |
131 | </script> | 140 | </script> |
141 | <script src="inc/awesomplete.min.js#"></script> | ||
132 | </body> | 142 | </body> |
133 | </html> | 143 | </html> |