On Wednesday, January 21, 2015 at 6:19:04 PM UTC-6, PE Pat wrote:
>
> Hi Tobias and BJ,
>
> Thank you both very much for your input. Tobias, that's a great 
> suggestion, but I don't know enough JavaScript to assign variables with 
> comma separations. The way it is now you can use multiple remove widgets, 
> one for each list you want to remove from, for example:
>
> <$remove /> // removes current tiddler from all tag fields
> <$remove removeFromField = "list"/> // removes current tiddler from all 
> list fields
>
> Not the most elegant, I know...
>
> BJ, I made some changes to your taglist widget for this specific 
> application. I have many tiddlers that have multiple ordered lists, but I 
> do not necessarily want a unique tag for every ordered list in my program. 
> Although I suppose that each list does have a unique combination of tags, 
> and using that would have probably been a better approach.
>
> Also, I added some things in to restrict what tiddlers can be added to 
> what lists. For example, I do not want users to be able to accidentally 
> drop a Task into a list of Learning Objectives. Since I am using a fair 
> number of nested taglists, this has been helpful.
>
> BJ I absolutely LOVE the taglist widget. It is practically the foundation 
> of my user interface because it makes the program so much more usable. I 
> don't have the time or the expertise to figure this out, unfortunately, but 
> if you have the time, do you have any suggestions for the following -- say 
> I drag a Task tiddler into a list of Tasks in a Lesson tiddler. Both Task 
> and Lesson tiddlers have lists of Objective tiddlers. Can I add the 
> objectives of the Task to the objectives of the Lesson? (I can do this with 
> a button, but it would be awesome if it were automatically done on the drop 
> event.)
>
> Thanks! I use the drag and drop (with taglist and other widgets) in all my 
tiddlywikis and plan to publish some more of my work. I am developing tools 
to do the kind of operation you describe - one is to remove a set of tags:

<$mangletagsextra removeAll=<<stations>> addAll={{!!title}} >
<div class="station">
<$ondrop targeTtag="{{!!title}}" onAddMessage="tw-mangle-tags" >
&nbsp;{{!!title}}
<hr>

<$taglist  targeTtag={{!!title}} onAddMessage="tw-mangle-tags" class="btn 
btn-primary">{{!!title||$:/kanban/cardTemplate}}</$taglist>
</$ondrop>
</div></$mangletagsextra>

this example uses the parameter 'onAddMessage'to generate a widget message 
when a item is added to the list,
which is then caught by mangletagsextra. I am working on some others.

cheers

BJ

> One last thing: don't use that original remove.js -- it can delete things 
> unpredictably if the listfield of a tiddler is blank or missing! Instead, 
> use this change to the execute part:
>
> RemoveWidget.prototype.execute = function() {
>         var defaultFilter;
>       this.removeThis = 
> this.getAttribute("remove",this.getVariable("currentTiddler"));
>       this.removeFromField = this.getAttribute("removeFromField","tags");
> if (this.removeFromField == "") { this.removeFromTiddlers = ""} else {
>       var defaultFilter = "[search:" + this.removeFromField + "[" + 
> this.removeThis + "]]";
>         this.removeFromTiddlers = 
> this.getTiddlerList(this.getAttribute("removeFilter",defaultFilter));
> }
> };
>
>
> Thanks for everyone's help,
> Patrick
>
>
> On Tuesday, January 20, 2015 at 12:25:44 AM UTC-5, BJ wrote:
>>
>> HI Patrick,
>> the list field is not used to store the list of tiddlers with a given tag 
>> - it is used to re-sort the order of the list (of tagged tiddlers) that is 
>> obtained by searching through all tiddlers for those with a given tag. - 
>> see the *sortByList()* function.
>> cheers
>>
>> BJ
>>
>> On Thursday, January 15, 2015 at 8:04:13 PM UTC-6, PE Pat wrote:
>>>
>>> I'm using TiddlyWiki to help with lesson planning - I'm a teacher. As 
>>> part of the program, I have a list of tiddlers that correspond to skills I 
>>> want students to learn. Each skill has an associated list of tasks that I 
>>> could use to help teach the skill.
>>>
>>> However, if I decide to delete a task, it's title still remains in all 
>>> the lists. If I create a new task, it might have the same title (e.g. "Task 
>>> 2") as the deleted task, and then it pops up in a list where I don't want 
>>> it. I'm using a slightly modified version of BJ's taglist widget. I made 
>>> this modification:
>>>
>>> TagListWidget.prototype.getTiddlerList = function() {
>>>        var defaultFilter = "[list["+ this.listtag + "!!" + this.listField + 
>>> "]is[tiddler]]";
>>>     return 
>>> this.wiki.filterTiddlers(this.getAttribute("filter",defaultFilter),this);//BJ
>>>  FIXME should not allow user defined filters
>>> };
>>>
>>>
>>> Somehow, this immediately filters out all deleted tiddlers visually -- 
>>> the display refreshes, the deleted tiddlers are removed -- but the list 
>>> still contains the deleted tiddler until I make some other change to the 
>>> list.
>>>
>>> How can I make it so that if I delete a tiddler, it is removed from all 
>>> lists? Btw this also applies to tiddlers that are used as tags.
>>>
>>> Thanks,
>>> Patrick
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to