Many thanks Jeremy!

I tried to use this feature in my newly developed plugin Trashbin:
https://kookma.github.io/TW-Trashbin/
but I decided to use the tm-notify!

For the other part e.g user interaction I use the same mechanism as you 
pointed out: the “delete” button in advanced search “Filter” tab.
I used this in "Empty Trashbin" button on the sidebar!


Thanks again!

Cheers
Mohammad


On Thursday, July 11, 2019 at 8:11:13 PM UTC+4:30, Jeremy Ruston wrote:
>
> Hi Mohammad
>
>
> When you want to delete a tiddler via Tiddler view toolbar, delete button
> a nice local (tm-modal) is appeared and says
>  Do you wish to delete the tiddler "HelloThere"?
>
> I want to know how I can duplicate this for other purpose!
>
> I dont want to develop from scarctch and wish to use it for other purpose!
>
>
> That modal dialogue is a browser feature called “confirm()”:
>
> https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm
>
> It presents a simple text based dialogue to the user with optional “OK” 
> and “cancel” buttons. It’s unusual amongst web DOM features in that it 
> pauses execution of the script until the user responds.
>
> Making it available as a generic wikitext feature is tricky, however. For 
> example, we could make a “tm-confirm” message. The easy part is to give it 
> a parameter containing the message to be displayed. For the users response, 
> one could imagine a parameter specifying the name of a tiddler to receive 
> the text “ok” or “cancel” according to the response of the user.
>
> The gotcha is that that updated tiddler value wouldn’t be available to any 
> further actions in an action string; they would have been compiled with the 
> previous value of that tiddler.
>
> Making a <$action-confirm> widget instead of a message doesn’t help, sadly.
>
> On the bright side, some people people consider the Window.confirm() to be 
> a bad idea because of the way that it blocks access to the rest of the 
> page. The alternative is to construct a non-modal confirmation system — for 
> example, the “delete” button in advanced search “Filter” tab.
>
> Best wishes
>
> Jeremy
>
>
> --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 tiddl...@googlegroups.com <javascript:>.
> To post to this group, send email to tiddl...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/9f618915-4e42-4e09-80f7-f3f3f00835f5%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/9f618915-4e42-4e09-80f7-f3f3f00835f5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/436a4f5c-6cfa-4c27-8bbe-b9a467bea23d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to