* 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:
parent
ece3bedc6d
commit
da25a7bfdc
5 changed files with 19 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue