mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-28 15:08:46 +00:00
Tag completion min length (#3190)
* tested with tw5.com index.html * Controls the length of the input before the tag list is filtered
This commit is contained in:
parent
e4660a8cc1
commit
2e8eb15536
3
core/wiki/config/TagsMinLength.tid
Normal file
3
core/wiki/config/TagsMinLength.tid
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
title: $:/config/Tags/MinLength
|
||||||
|
|
||||||
|
0
|
@ -6,6 +6,11 @@ tags: $:/tags/Macro
|
|||||||
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
\define add-tag-actions()
|
||||||
|
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
|
||||||
|
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||||
|
\end
|
||||||
|
|
||||||
\define tag-button()
|
\define tag-button()
|
||||||
<$button class="tc-btn-invisible" tag="a">
|
<$button class="tc-btn-invisible" tag="a">
|
||||||
$(actions)$
|
$(actions)$
|
||||||
@ -34,13 +39,15 @@ $actions$
|
|||||||
<div class="tc-block-dropdown-wrapper">
|
<div class="tc-block-dropdown-wrapper">
|
||||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||||
<div class="tc-block-dropdown">
|
<div class="tc-block-dropdown">
|
||||||
|
<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||||
<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||||
<<tag-button>>
|
<<tag-button>>
|
||||||
</$list>
|
</$list></$list>
|
||||||
<hr>
|
<hr>
|
||||||
|
<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||||
<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||||
<<tag-button>>
|
<<tag-button>>
|
||||||
</$list>
|
</$list></$list>
|
||||||
</div>
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
created: 201712032331
|
||||||
|
modified: 201712032331
|
||||||
|
tags: [[Hidden Settings]]
|
||||||
|
title: Hidden Setting: Tags Minimum Length
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
<<.from-version "5.1.16">> Tag Dropdown: Controls the minimum length of an input string before results are displayed.
|
||||||
|
|
||||||
|
Defaults to "0".
|
||||||
|
|
||||||
|
$:/config/Tags/MinLength
|
Loading…
Reference in New Issue
Block a user