This is gold. Thanks for the hard work. It's been bugging me that I could
make a partially working model using the skin and the controls and this
puts the polish on it. Currently have three differently configured task
lists in the same TW.
Still encountering an issue with displayed team task tiddlers control
values not updating visually even though the values update in the report
view and in the html back end. Didn't know this forum was available until
tonight so I may find the solution somewhere here :)
On Saturday, August 30, 2008 1:27:56 PM UTC+10, gigahertz wrote:
>
> Hi,
>
> I found myself wanting to use TTReportView to show a table of contacts
> (instead of tasks) so I modified TTReportView so it can be passed an
> optional target tag to use (diff to follow).
>
> So now I can create a new contact with:
>
> <<newTiddler label:'new contact' title:NewContact tag:contact
> text:'Change the title to the person's name and then press DONE to
> fill in the contact's critical information.'>>
>
> and I have created a contact view template (but not worth posting).
>
> My goal in all of this is to be able to jump from a Task to the
> Assigned person and on the person's page have all of the tasks that
> they are currently assigned to. I can also use the following to make
> a table of all of the contacts:
>
> <<TTReportView TargetTag:"contact"
> DisplayFields:"Title,AKA,Company,Site,Role" Company:"Acne"
> OrderBy:"Title,asc">>
>
> It is a bit annoying that "Title" shows as the column header for the
> person's name.
>
> Thanks.
> ----
>
> Use with any license you see fit and take the copyright from me, etc.
> Thanks. (Not that this is copyrightable anyways.)
>
> @@ -2352,6 +2352,7 @@
> var params =
> paramString.parseParams("anon",null,true,false,false);
> var fieldsString =
> getParam(params,"DisplayFields",'title');
> var displayFields = fieldsString.split(",");
> + var targetTag =
> getParam(params,"TargetTag",'task');
> for(var i=0;i<displayFields.length;i++){
> displayFields[i] = displayFields[i].trim();
> }
> @@ -2359,7 +2360,7 @@
> var orderField = fieldPrefix +
> orderString.split(",")
> [0];
> var order = orderString.split(",")[1];
> var recentItems = getParam(params,"recent");
> - var expectedParams = ['DisplayFields','OrderBy'];
> + var expectedParams =
> ['DisplayFields','OrderBy','TargetTag'];
>
> //interpret and store the filter values.
> var filters = [];
> @@ -2382,32 +2383,32 @@
> }
>
> //collect the pertinent tiddlers.
> - var taskTiddlers =
> store.getTaggedTiddlers("task");
> + var targetTiddlers = store.getTaggedTiddlers(targetTag);
> var toConsider = [];
> var toDisplay = [];
> var toExclude = [];
>
> // limit to recently modified tiddlers
> if(recentItems) {
> - taskTiddlers.sort(function(a,b) {
> + targetTiddlers.sort(function(a,b) {
> return b.modified - a.modified;
> });
> - taskTiddlers = taskTiddlers.slice(0,
> recentItems);
> + targetTiddlers = targetTiddlers.slice(0,
> recentItems);
> }
>
> // first get all the tiddlers we might want to include.
> - for(var t=0; t<taskTiddlers.length; t++) {
> + for(var t=0; t<targetTiddlers.length; t++) {
> var consider = true;
> for(var f=0; f<filters.length; f++) {
> if(filters[f].match == true) {
> - if(store.getValue(taskTiddlers[t],
>
> filters[f].field).toLowerCase() != filters[f].value.toLowerCase()){
> + if(store.getValue(targetTiddlers[t],
>
> filters[f].field).toLowerCase() != filters[f].value.toLowerCase()){
> consider = false;
> break;
> }
> }
> }
> if(consider)
> - toConsider.push(taskTiddlers[t]);
> + toConsider.push(targetTiddlers[t]);
> }
>
>
>
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.