From 61417657790d29718dc44784d54df03d2a94645a Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 14 Mar 2012 20:52:32 +0100 Subject: Minor changes to playlist looks. --- static/playlist.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'static/playlist.js') diff --git a/static/playlist.js b/static/playlist.js index eabd56e..45a4a07 100644 --- a/static/playlist.js +++ b/static/playlist.js @@ -10,7 +10,7 @@ $(function(){ window.items = new Playlist; PlaylistItemView = Backbone.View.extend({ tagName: 'tr', - template: Handlebars.compile('{{trackname}}Delete'), + template: templates.playlist_item, render: function() { var model = this.model; var item = model.toJSON(); @@ -54,6 +54,11 @@ $(function(){ if(item.attributes.nocache) $(el).addClass('nocache'); $('#playlist').append(el); + if(item.attributes.cache !== undefined || item.attributes.nocache !== undefined) { + delete item.attributes.cache; + delete item.attributes.nocache; + item.save(); + } }, removeOne: function(item) { $('#playlist #cid-' + item.cid).remove(); -- cgit v1.2.3