Hello,
I want to share one of my modifications I made to MonkeyGTD. I have no
idea if anyone else has already done this (or similar), but here it is
anyway, up for your discussion and use:

Requirement:
I do not want to open a tiddler (action/project/tickler) just to check
if there are some notes entered, especially if I just want to mark it
done.
I can not put all the necessary information in the tiddler title, so I
have to check for notes in the tiddler.

Solution:
Show a little icon next to the tiddler link when there are notes
entered for that tiddler.

Screenshot:
http://drop.io/note_icon_in_mgtd/asset/actions-with-notes-jpg

Implementation:
(The current implementation is just quick and dirty, with no/little
regards to easy portability)
*) Added a macro that shows the icon dependent on the tiddler content
(tiddler.text)
*) Image is embedded as base64 encoded string
*) Use this macro in the render-functions for the mgtdlists as needed

MgtdTagControls - add this macro
===
        showNotesIcon: {
                handler: function
(place,macroName,params,wikifier,paramString,tiddler) {
                        var useTiddler = params[0] ? 
store.fetchTiddler(params[0]) :
tiddler;
                        var output = "";
                        var imageString = "[img[Notes vorhanden|data:image/
gif;base64,R0lGODlhDgAOAKU3AHJcM21cQnFhRYBkLXVlSHdoS3hpTH5sQXxtUYpvNMeKCcuRD9CZBdKbGuCbAM
+iEtWkHtmmELiqgb+tgeSsPMCwgt6wLMOyhMa1hd22O+m2OM68iuK/
QOy8UdHBjOzEKdfGk/XJKujJVPbNZP7RNezRdvTTZf3SbP/Zc/HejPXkfP/jfvfln//
ogv7uiPjvsv/1j/v1x///mf//qv/72v//xP//
zP///////////////////////////////////
yH5BAEKAD8ALAAAAAAOAA4AAAZ6QJBw6PFsNheJEkSz1Z7QKAIUm1mv2BkC85J5v2CZ4cKCmc9omKGScrnfcFdhUmrZ7/
hWQdJRrf6AgQQSGRwZFg8mgX
+DIgwhHwwcKyiVlQISIxYRJCENlpaYJ5oLDg4WKCeWARKqJxoQEAoQFB22rAe5CQkDvb0AwEEAOw==]]";
                        if(useTiddler.text != "") {
                                //output += "[[%0|%1]]".format([imageString, 
useTiddler.title]);
                                output += imageString;
                                output = "{{showNotesIcon{" + imageString + 
"}}}";
                        }
                        if (output != "")
                                wikify(output,place,null,useTiddler);
                }
        },
===

TiddlerViewMethods - use the macro in all render methods you want the
icon to show
=== (just one example)
        render_Action: function() {
// Added by ByteDoc
var pLink = "";
pLink += "{{notesLink{<<showNotesIcon [[%0]]>>}}}".format
([this.title]);
                return this.renderUtil(
                '{{action{'+
                '<<toggleTag Done [[%0]] ->>'+
                '<<multiToggleTag tag:ActionStatus title:[[%0]]>>'+
                //'<<multiSelectTag tag:Project title:[[%0]]>>'+
                //'<<multiCheckboxTag tag:ActionStatus title:[[%0]]>>'+
                '<<singleToggleTag tag:Starred title:[[%0]]>>'+
                ' &nbsp;[[%0]] '+
                '<<deleteTiddler [[%0]]>>'+
                '}}} %1', // Added by ByteDoc (%1)
                [
                        this.title,
                        pLink // Added by ByteDoc
                ]
        );},

===

Finally, place this in your Theme or StyleSheet, whatever fits your
tiddlywiki
===
// make the icon fit in a bit better
.showNotesIcon img {
vertical-align:middle;
margin-right: 1px;
}
===

That's it, give it a try if it's useful to you, re-use and/or modify
as you need - and give me some feedback, plz ;)

Cheers
Max
(ByteDoc)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "GTD 
TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/GTD-TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to