Hi Tobias,

среда, 11 сентября 2013 г., 18:31:14 UTC+4 пользователь Tobias Beer написал:
>
> Hi Yakov...
>
> Great work, thanks!
>
> You are welcome :)
 

> Something to perhaps consider: to distinguish between readOnly and editing 
> / admin mode.
>
> For example, in *readOnly* I would (by default) not want to display a 
> visitor any include messages.
>
> Well, I wouldn't say that I want such behavior by default (for instance, 
I'd like to see such messages on my cite, but consider them as "errors to 
be fixed"), but this can be easily "implemented". As you probably know, 
there's a global readOnly variable in TiddlyWiki, so you can just write in 
the "Config" part of the plugin something like:

config.options.chkWarnOnSharedTiddlersConflicts  = readOnly ? fasle : true;
config.options.chkAlertOnSharedTiddlersConflicts = false;
 

> In editing / admin mode, I would want all included tiddlers to be rendered 
> with a given class on top of ".tiddler" and perhaps also with the source as 
> an attribute, e.g. rel="xyz.html". That way, I can style them differently 
> (even by source) and visually see from what source a tiddler is.
>
> As for me, I distinguish included tiddlers as they have "view" instead of 
"edit", but of'course you may want to highlight further. It's may be worth 
including this into STP itself, but you can solve this by adding a simple 
plugin:

/***
|Requires|SharedTiddlersPluginDev|
***/
//{{{
config.extensions.SharedTiddlersPlugin.orig_displayTiddler = 
Story.prototype.displayTiddler;

Story.prototype.displayTiddler = 
function(srcElement,tiddler,template,animate,unused,customFields,toggle,animationSrc)
 
{

    var tiddlerElem = 
config.extensions.SharedTiddlersPlugin.orig_displayTiddler.apply(this,arguments);

    var title = (tiddler instanceof Tiddler) ? tiddler.title : tiddler,
        tid = store.fetchTiddler(title);

    if(tid && tiddlerElem)
        if(tid.getIncludeURL())
            jQuery(tiddlerElem).addClass("included");

    return tiddlerElem;
}
//}}}

It adds the desirable "included" class.
 

> These classes could be also available in *readOnly *mode, but it would 
> perhaps not be desired to apply that styling, so that a visitor to some 
> site wouldn't know anything about inclusion and that stuff.
>
> Well, I'd say that applying the styles themseflves is not the work of STP 
anyway (one would prefer to change the background color, another -- 
something else), so you can apply them using a microplugin which checks the 
readOnly variable and desides whether to apply.
 

> There could also be some <<include info>> macro that shows include 
> information for the current tiddler... which could be rendered as a panel 
> below the tiddler body.
>
> I'm thinking about this: I'd prefer something like ", included from .... 
(refresh)" (where "refresh" is the output of the <<reloadIncluded>> macro), 
but it seems that this can't be hijacked elegantly. Of'course one can 
hijack the view macro like it's done to the edit macro already and add the 
desirable info/macros, but simple options (add before or after the viewer 
area) don't look very nice. May be adding toolbar commands would be better, 
but I still haven't learned how to use the popup interface, especially in 
the toolbar. What do you think?
 
Best regards,
Yakov.

PS by the way, it seems that STP is not present in the customize space you 
introduced recently. What's the main method to add changes to the space? 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to