TiddlySpace / tiddlyspace

A discoursive social model for tiddlers
http://tiddlyspace.com
Other
106 stars 38 forks source link

clean1 friendlytiddler.html needs to include decision making metadata somewhere #1084

Open cdent opened 11 years ago

cdent commented 11 years ago

When looking at a friendly tiddler javascript needs to know if this tiddler is a) from this space and (maybe) b) writeable by the current user.

Otherwise it is difficult to make a decision about things like "adding a widget with a link to whatever the current editor is", as done in editedit.js.

At the moment this information is available on the api (tiddler.html) but not friendlytiddler.html.

colmjude commented 11 years ago

I think using a data attr on the .tiddler would suffice.

If enough info to determine whether the tiddler is from the current space gets passed to the template we could use an indicator like data-from-space="true"

Alternatively, if there isn't we could just add the bag info, such as, data-bag="colmjude_public" and use a similar method as you use in editedit.js to determine if the tiddler belongs to the current space and is editable.