Skip to content

Commit

Permalink
change vars and set to let widget
Browse files Browse the repository at this point in the history
  • Loading branch information
DesignThinkerer authored Dec 15, 2024
1 parent 34e2a5a commit 190abcd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions core/ui/EditorToolbar/link-dropdown.tid
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: $:/core/ui/EditorToolbar/link-dropdown
\function tf.get-focus-selector() [[$(prefix.bracket)$data-tiddler-title=$(cssEscapedTitle)$$(suffix.bracket)$ .tc-create-wikitext-link input]substitute[]]

\procedure cancel-search-actions-inner()
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="<$action-deletetiddler $filter='[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]'/>"><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
<$let userInput={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="<$action-deletetiddler $filter='[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]'/>"><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$let>
\end

\procedure cancel-search-actions() <$list filter="[<storeTitle>!has[text]] :and[<searchTiddler>!has[text]]" emptyMessage="<<cancel-search-actions-inner>>"><$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/></$list>
Expand All @@ -34,9 +34,9 @@ title: $:/core/ui/EditorToolbar/link-dropdown
\whitespace trim
''<<lingo Hint>>''

<$vars searchTiddler=`$(config-title)$/search` linkTiddler=`$(config-title)$/link` linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
<$let searchTiddler=`$(config-title)$/search` linkTiddler=`$(config-title)$/link` linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>

<$vars linkTiddler=<<searchTiddler>>>
<$let linkTiddler=<<searchTiddler>>>
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
<$keyboard key="((input-tab-left))" actions=<<set-previous-input-tab>> class="tc-create-wikitext-link">
<$transclude $variable="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
Expand All @@ -51,28 +51,28 @@ title: $:/core/ui/EditorToolbar/link-dropdown
<<external-link>>
&#32;
<$button class="tc-btn-invisible tc-btn-mini" style="width: auto; display: inline-block; background-colour: inherit;">
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<tf.get-focus-selector>>/></$set>
<<cancel-search-actions>><$let cssEscapedTitle={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<tf.get-focus-selector>>/></$let>
{{$:/core/images/close-button}}
</$button>
</$reveal>
</$vars>
</$let>

<$reveal tag="div" state=<<storeTitle>> type="nomatch" text="">

<$linkcatcher actions=<<add-link-actions>> to=<<linkTiddler>>>

<$vars userInput={{{ [<storeTitle>get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}] }}}>
<$let userInput={{{ [<storeTitle>get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}] }}}>

{{$:/core/ui/SearchResults}}

</$vars>
</$let>

</$linkcatcher>

</$reveal>

</$vars>
</$let>

\end

<$transclude $variable="body" config-title=<<qualify "$:/state/Link/">>/>
<$transclude $variable="body" config-title=<<qualify "$:/state/Link/">>/>

0 comments on commit 190abcd

Please sign in to comment.