Intermediate commit:

* Improved tag framework 
 * Added support for image tags
 * Moved most code of StoryMgr.evalNewStory to Story.evalStory to decrease redundancy
 * Added compatibility module (including drafts for database conversions)
 * Moved code for topics to compatibility module
 * Removed obsolete code
This commit is contained in:
Tobi Schäfer 2007-08-03 19:41:51 +00:00
parent d5c59cf2ec
commit 09b39b2af3
48 changed files with 872 additions and 494 deletions

View file

@ -314,6 +314,11 @@ Image.prototype.evalImg = function(param, modifier) {
this.alttext = param.alttext;
this.modifier = modifier;
this.modifytime = new Date();
param.tags = Story.prototype.setTopic.call(this,
param.topic || param.addToTopic);
Story.prototype.setTags.call(this, param.tags);
if (this.thumbnail) {
this.thumbnail.alttext = this.alttext;
this.thumbnail.modifytime = this.modifytime;

View file

@ -22,6 +22,20 @@
<% image.alttext as="editor" class="formText" %><br />
</td>
</tr>
<tr>
<td colspan="3">
Add this image to a topic<br />
<table style="margin-left:15px;">
<tr>
<td width="48%" class="small">Choose a topic...<br />
<% image.topicchooser firstOption="--- choose topic ---" %></td>
<td valign="top" width="4%">&nbsp;</td>
<td valign="top" width="48%" class="small">...or enter a new one<br />
<input type="text" name="topic" value="<% request.topic %>" /></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="small"><% image.creator as="link" prefix="Created by " %><% image.createtime format="short" prefix=" on " suffix="." %></div><br />

View file

@ -61,6 +61,6 @@ modifier.foreign = USER_ID
tags = collection(TagHub)
tags.local.1 = $id
tags.foreign.1 = parent_id
tags.foreign.1 = tagged_id
tags.local.2 = $prototype
tags.foreign.2 = parent_type
tags.foreign.2 = tagged_type