* Re-enabled setting of tags in Story and Image prototype

* Added custom Layout.href() method to prevent the URL from being corrupted with the layout ID (which strangely happens from time to time)
 * Uncommented $tags collection in Root.properties to prevent conflict with collection in Site having the same name
 * Fixed output of tags list in Story.getFormValue() method
This commit is contained in:
Tobi Schäfer 2008-01-09 21:34:21 +00:00
parent ece3bedc6d
commit da25a7bfdc
5 changed files with 19 additions and 6 deletions

View file

@ -140,7 +140,9 @@ Story.prototype.getFormValue = function(name) {
case "status":
return this.status || Story.PUBLIC;
case "tags":
return this.tags.list();
return this.tags.list().map(function(item) {
return item.tag.name;
});
}
return this[name];
};
@ -178,7 +180,7 @@ Story.prototype.update = function(data) {
this.title = data.title;
this.text = data.text;
this.setContent(data);
//this.setTags(data.tags || data.tag_array)
this.setTags(data.tags || data.tag_array)
this.commentMode = data.commentMode;
this.mode = data.mode;
this.status = data.status;

View file

@ -228,7 +228,6 @@ $(function() {
</p>
<p>
<button type="submit" name="save" value="1">save</button>
<!--button type="submit" name="save" value="2">publish</button-->
<button type="submit" name="cancel" value="1">cancel</button>
<button type="button" id="restore" value="1">restore</button>
</p>