diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-03-14 20:52:32 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-03-14 20:52:32 +0100 |
commit | 61417657790d29718dc44784d54df03d2a94645a (patch) | |
tree | 07c7e9e7f132d48b3fc9d63c5ac89f228dd9135d /static/playlist.js | |
parent | 510dbf0d713a36c933965666d66e788108cdd90c (diff) |
Minor changes to playlist looks.
Diffstat (limited to 'static/playlist.js')
-rw-r--r-- | static/playlist.js | 7 |
1 files changed, 6 insertions, 1 deletions
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('<td><a href="#" class="play">{{trackname}}</a></td><td><a href="#" class="delete"><img src="/static/icons/delete.png" alt="Delete" title="Delete" /></a></td>'), + 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(); |