« MonkeyGTD » : différence entre les versions

De FrozenWiki
Aller à la navigation Aller à la recherche
(Nouvelle page : Hello, I have just started using MonkeyGTD, it's really good. If it helps others, here is how I updated my copy of mgtd to set personal tickler repeat period. It requires updating ...)
 
Aucun résumé des modifications
 
Ligne 4 : Ligne 4 :
be overwritten by any upgrade ("import tiddlers") but when the code  
be overwritten by any upgrade ("import tiddlers") but when the code  
gets readded, the custom ticklers keep the custom repeat settings.  
gets readded, the custom ticklers keep the custom repeat settings.  
Example for a 4-weekly repeat time:  
Example for a 4-weekly repeat time:
 
1. Update the "dateChooserPlugin" code to:  
1. Update the "dateChooserPlugin" code to:  
<pre>
-------START------  
-------START------  
                addDay: {  
  addDay: {  
                        label:   {addDay:"+d", addWeek:"+w",  addMonth:"+m",  
        label:   {addDay:"+d", addWeek:"+w",  addMonth:"+m", addYear:"+y", add4weekly:"+4w"},  
addYear:"+y",  add4weekly:"+4w"},  
        tooltip: {addDay:"day",addWeek:"week",addMonth:"month",addYear:"year",add4weekly:"4weekly"},  
                        tooltip:  
{addDay:"day",addWeek:"week",addMonth:"month",addYear:"year",add4weekly:"4weekly"},  
[...]  
[...]  
config.macros.add4weekly  = config.macros.addDay;  
config.macros.add4weekly  = config.macros.addDay;  
--------END-------  
--------END-------</pre>
2. Add the following Tiddler "Mgtd4weeklyDate" (as a systemConfig  
2. Add the following Tiddler "Mgtd4weeklyDate" (as a systemConfig  
tiddler)  
tiddler)  
<pre>
-------START------  
-------START------  
merge(Date.prototype,{  
merge(Date.prototype,{  
        add4weekly:function(n) { this.setDate(  this.getDate()      +  
        add4weekly:function(n) { this.setDate(  this.getDate()      + n*28); }  
n*28); }  
});  
});  
 
--------END-------</pre>
--------END-------  
3. edit "TiddlerViewMethods" to add the 4weekly item  
3. edit "TiddlerViewMethods" to add the 4weekly item  
<pre>
-------START------  
-------START------  
        else if (repeatType.contains('Daily'))   { doneControl =  
        else if (repeatType.contains('Daily'))   { doneControl = '<<addDay [[%0]]>>' }  
'<<addDay [[%0]]>>' }  
        else if (repeatType.contains('Weekly'))  { doneControl = '<<addWeek [[%0]]>>' }  
        else if (repeatType.contains('Weekly'))  { doneControl =  
        else if (repeatType.contains('Monthly')) { doneControl = '<<addMonth [[%0]]>>' }  
'<<addWeek [[%0]]>>' }  
        else if (repeatType.contains('Yearly'))  { doneControl = '<<addYear [[%0]]>>' }  
        else if (repeatType.contains('Monthly')) { doneControl =  
        else if (repeatType.contains('4weekly'))  { doneControl = '<<add4weekly [[%0]]>>' }  
'<<addMonth [[%0]]>>' }  
--------END-------</pre>
        else if (repeatType.contains('Yearly'))  { doneControl =  
'<<addYear [[%0]]>>' }  
        else if (repeatType.contains('4weekly'))  { doneControl =  
'<<add4weekly [[%0]]>>' }  
--------END-------  
4. edit "TicklerRepeatType" and add "4weekly" to the list with  
4. edit "TicklerRepeatType" and add "4weekly" to the list with  
contents:  
contents:  
<pre>
-------START------  
-------START------  
order:5  
order:5  
button:4weekly  
button:4weekly  
buttonLong:4weekly  
buttonLong:4weekly  
--------END-------  
--------END-------</pre>
5. edit "TitleButtons" and add the 4weekly item to "!Tickler" template  
5. edit "TitleButtons" and add the 4weekly item to "!Tickler" template  
in 2 locations.  
in 2 locations.  
<pre>
-------START------  
-------START------  
  <span macro="showWhenTagged 'Daily'"   ><span macro="addDay"></  
  <span macro="showWhenTagged 'Daily'"   ><span macro="addDay"></ span></span>  
span></span>  
  <span macro="showWhenTagged 'Weekly'"  ><span macro="addWeek"></ span></span>  
  <span macro="showWhenTagged 'Weekly'"  ><span macro="addWeek"></  
  <span macro="showWhenTagged 'Monthly'" ><span macro="addMonth"></ span></span>  
span></span>  
  <span macro="showWhenTagged 'Yearly'"  ><span macro="addYear"></ span></span>  
  <span macro="showWhenTagged 'Monthly'" ><span macro="addMonth"></  
  <span macro="showWhenTagged 'Period'"  ><span macro="addPeriod"></ span></span>  
span></span>  
  <span macro="showWhenTagged 'Yearly'"  ><span macro="addYear"></  
span></span>  
  <span macro="showWhenTagged 'Period'"  ><span macro="addPeriod"></  
span></span>  
[...]  
[...]  
   <span macro="addDay"></span>  
   <span macro="addDay"></span>  
Ligne 63 : Ligne 55 :
   <span macro="addYear"></span>  
   <span macro="addYear"></span>  
   <span macro="add4weekly"></span>  
   <span macro="add4weekly"></span>  
--------END-------
--------END-------</pre>

Dernière version du 23 juillet 2008 à 12:10

Hello, I have just started using MonkeyGTD, it's really good. If it helps others, here is how I updated my copy of mgtd to set personal tickler repeat period. It requires updating system tiddlers and will be overwritten by any upgrade ("import tiddlers") but when the code gets readded, the custom ticklers keep the custom repeat settings. Example for a 4-weekly repeat time:

1. Update the "dateChooserPlugin" code to:

-------START------ 
   addDay: { 
         label:   {addDay:"+d", addWeek:"+w",  addMonth:"+m", addYear:"+y", add4weekly:"+4w"}, 
         tooltip: {addDay:"day",addWeek:"week",addMonth:"month",addYear:"year",add4weekly:"4weekly"}, 
[...] 
config.macros.add4weekly  = config.macros.addDay; 
--------END-------

2. Add the following Tiddler "Mgtd4weeklyDate" (as a systemConfig tiddler)

-------START------ 
 merge(Date.prototype,{ 
        add4weekly:function(n) { this.setDate(  this.getDate()      + n*28); } 
}); 
--------END-------

3. edit "TiddlerViewMethods" to add the 4weekly item

-------START------ 
        else if (repeatType.contains('Daily'))   { doneControl = '<<addDay [[%0]]>>' } 
        else if (repeatType.contains('Weekly'))  { doneControl = '<<addWeek [[%0]]>>' } 
        else if (repeatType.contains('Monthly')) { doneControl = '<<addMonth [[%0]]>>' } 
        else if (repeatType.contains('Yearly'))  { doneControl = '<<addYear [[%0]]>>' } 
        else if (repeatType.contains('4weekly'))  { doneControl = '<<add4weekly [[%0]]>>' } 
--------END-------

4. edit "TicklerRepeatType" and add "4weekly" to the list with contents:

-------START------ 
order:5 
button:4weekly 
buttonLong:4weekly 
--------END-------

5. edit "TitleButtons" and add the 4weekly item to "!Tickler" template in 2 locations.

-------START------ 
  <span macro="showWhenTagged 'Daily'"   ><span macro="addDay"></ span></span> 
  <span macro="showWhenTagged 'Weekly'"  ><span macro="addWeek"></ span></span> 
  <span macro="showWhenTagged 'Monthly'" ><span macro="addMonth"></ span></span> 
  <span macro="showWhenTagged 'Yearly'"  ><span macro="addYear"></ span></span> 
  <span macro="showWhenTagged 'Period'"  ><span macro="addPeriod"></ span></span> 
[...] 
   <span macro="addDay"></span> 
   <span macro="addWeek"></span> 
   <span macro="addMonth"></span> 
   <span macro="addYear"></span> 
   <span macro="add4weekly"></span> 
--------END-------