> This both adds the procedure as an instance, and adds a checkmark
> which will tag the tiddler "done" (or "búið") - I'd really just like
> to add that clicking the checkbox also saves the TW as I'm using CCTW
> and need to manually save after checking the box.
Did you try my update to CheckboxPlugin, yet? *IF* you can invoke the
CCTW save processing via a javascript function, then you can define an
'onClickAfter' handler for the checkbox, so that checking "done" (and
setting the tag) also saves the file to CCTW.
> if you already have a journal tiddler with the name, it will override
> it when pushing the "new nightshift" button, which is a shame.. no
> idea why. I'd like to minimise ppl being able to screw things up :P
This is because you are using the "text:..." param in
<<newJournal ...>> If the tiddler exists and you DON'T specify default
text in the macro, then the current tiddler contents are used. But
when you specify the default text in the macro, that value overrides
any previously-stored content... which is, IMO, as it should be.
After all, the macro is <<NEWJournal>> not <<NEWorEDITJournal>>
One possible (though ugly) way out of this is to write:
text:{{store.getTiddlerText(new Date().formatString("DD MMM
YYYY"),"<<tiddler [[Kvöldferlið]]>\> [_(|Búið)] Allt ferlið
lokið?")}}
(note: google groups adds newlines that mess up the code above... the
"text:" param should be on one line...)
What this does is retrieve the current day's journal contents if it
exists, otherwise it uses the static default definition specified in
the macro param.
One little problem with this method: the text param value is computed
when the macro is rendered... not when it is clicked. Thus, after
creating a new journal, you MUST make sure that the "nýtt Kvöldferli"
command item is refreshed in order for it to re-retrieve the current
journal contents and compute a new default text value. Otherwise, it
will still apply the previously computed default when it is clicked
again.
You can force this command to be refreshed by placing it in an area of
the page that is already being auto-refreshed after EVERY tiddler
change, such as SideBarTabs, or by editing the [[PageTemplate]] to
add:
refresh='content' force='true'
to some other page element, as in:
<div id='mainMenu' refresh='content' force='true'
tiddler='MainMenu'></div>
If you combine all this little bits together, you *should* achieve the
results you are seeking...
HTH,
-e