Re: [tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread Mohammad
Yep,
 Thank you Eric!

--Mohammad

On Friday, February 21, 2020 at 12:37:10 PM UTC+3:30, Eric Shulman wrote:
>
> On Friday, February 21, 2020 at 12:20:37 AM UTC-8, Mohammad wrote:
>>
>> Many thanks Eric. This is a great solution.
>>
>> In my opinion, the $button here is more clear and semantic and for me is 
>> quite understandable.
>> The issue I have is I cannot drag the link like what I see in Open or 
>> Recent tabs in the sidebar and I need to have that feature.
>>
>
> The $button widget has an optional "dragTiddler" parameter for enabling 
> dragging.  For this use case:
>  <$button class="tc-btn-invisible" dragTiddler=<>>
>
> -e 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/25ccd1a9-dc16-4cc7-8aea-c40fb6a09e35%40googlegroups.com.


Re: [tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread Eric Shulman
On Friday, February 21, 2020 at 12:20:37 AM UTC-8, Mohammad wrote:
>
> Many thanks Eric. This is a great solution.
>
> In my opinion, the $button here is more clear and semantic and for me is 
> quite understandable.
> The issue I have is I cannot drag the link like what I see in Open or 
> Recent tabs in the sidebar and I need to have that feature.
>

The $button widget has an optional "dragTiddler" parameter for enabling 
dragging.  For this use case:
 <$button class="tc-btn-invisible" dragTiddler=<>>

-e 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0869de59-c64c-4e13-ba37-34e3b3b64fe6%40googlegroups.com.


Re: [tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread Mohammad Rahmani
Many thanks Eric. This is a great solution.

In my opinion, the $button here is more clear and semantic and for me is
quite understandable.
The issue I have is I cannot drag the link like what I see in Open or
Recent tab in the sidebar and I need to have that feature.

What do you think?


Best wishes
Mohammad


On Fri, Feb 21, 2020 at 11:42 AM Eric Shulman  wrote:

> On Thursday, February 20, 2020 at 11:03:58 PM UTC-8, Mohammad wrote:
>>
>> I am using $link to create some links using $list widget!
>> I want to save the title of clicked item in a temporary tiddler for
>> further processing. We know the $link widget does not supports actions
>> How can I do this?
>>
>
> How about using a $button instead of the $link widget?  Something like
> this:
>
> \define showlink(item)
> <$tiddler tiddler=<<__item__>>>
><$button class="tc-btn-invisible">
>   <$view field="caption"><$view field="title"/>
>   <$action-setfield $tiddler=<> text=< >> />
>   <$action-navigate />
>
> 
> \end
>
> Note: I used the <$tiddler> widget to set the <> to the
> <<__item__>>.  This is just so the $view and $action-navigate widgets can
> use their default parameters for $tiddler and $to
>
> -e
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/9b73736b-9c22-41a3-91f7-da84cad6556a%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMDz-yHHAyko9vB9LWAR6e4RVXq6O%2B8cdq0QZseyVe_afA%40mail.gmail.com.


Re: [tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread Mohammad Rahmani
Tony,
 I will post some examples and will need your review. I found it confusing
and worth to prepare some examples!
I hope other also share their thoughts.


Best wishes
Mohammad


On Fri, Feb 21, 2020 at 11:39 AM TonyM  wrote:

> Thanks for sharing the result Mohammad. I wanted to work on this as well.
>
> Tony
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/e94832e3-8dcf-42df-be1d-88aab8b82179%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMC5qysS%2BnWUkbh5UVE2TLp69bgk%2BGTknjGWvoieo_f4Rg%40mail.gmail.com.


[tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread Eric Shulman
On Thursday, February 20, 2020 at 11:03:58 PM UTC-8, Mohammad wrote:
>
> I am using $link to create some links using $list widget!
> I want to save the title of clicked item in a temporary tiddler for 
> further processing. We know the $link widget does not supports actions
> How can I do this?
>

How about using a $button instead of the $link widget?  Something like this:

\define showlink(item)
<$tiddler tiddler=<<__item__>>>
   <$button class="tc-btn-invisible">
  <$view field="caption"><$view field="title"/>
  <$action-setfield $tiddler=<> text=<> 
/>
  <$action-navigate />
   

\end

Note: I used the <$tiddler> widget to set the <> to the 
<<__item__>>.  This is just so the $view and $action-navigate widgets can 
use their default parameters for $tiddler and $to

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9b73736b-9c22-41a3-91f7-da84cad6556a%40googlegroups.com.


[tw5] Re: $linkcatcher widget, need an example

2020-02-21 Thread TonyM
Thanks for sharing the result Mohammad. I wanted to work on this as well.

Tony

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e94832e3-8dcf-42df-be1d-88aab8b82179%40googlegroups.com.


[tw5] Re: $linkcatcher widget, need an example

2020-02-20 Thread Mohammad
I found the solution

It seems the $linkcatcher  catch the link action so, if one needs to 
navigate shall pass a message to $linkcatcher
The logic is a bit confusing

Example

   - link and navigate to clicked title
   - capture the title of clicked item and store in my tiddler given 
   through a variable


<$linkcatcher set=<> setTo=<<__item__>> message="tm-navigate">
<$link to=<<__item__>> overrideClass=<> >
  <$view tiddler=<<__item__>> field="caption">
<$view tiddler=<<__item__>> field="title">
  




Remarks

   - a link to item is created (item holds a title is given through macro 
   input parameter
   - a proper form of caption/title is shown using $view widget
   - on click linkcatcher use the tm-navigate to navigate to tiddler its 
   title is given by item
   - the title of clicked item is stored in a temporary tiddler 
   (tidSelectedItem holds the title of temporary tiddler)


--Mohammad



On Friday, February 21, 2020 at 10:33:58 AM UTC+3:30, Mohammad wrote:
>
> I am using $link to create some links using $list widget!
>
> I want to save the title of clicked item in a temporary tiddler for 
> further processing. We know the $link widget does not supports actions
>
> How can I do this?
>
>
> <$link to=<>><$text text=<>/>
> <$linkcatcher actions="""<$action-setfield $tiddler=<> 
> text=<> />""" />
>
>
> here the tidSelectedItem is a variable refers to my temporary tiddler to 
> keep the title of clicked item
>
>
> Mohammad
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/14dfb543-ed57-466a-a5a7-0228a6d69f0a%40googlegroups.com.