1
0
Fork 0

Add single track to playlist

This commit is contained in:
Gregory Eremin 2011-10-05 14:51:50 +04:00
parent 0071d476ae
commit 32ca000b8b
4 changed files with 121 additions and 8 deletions

View File

@ -71,7 +71,7 @@ GEM
nokogiri (1.5.0)
pg (0.11.0)
polyglot (0.3.2)
rack (1.3.3)
rack (1.3.4)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
@ -98,7 +98,7 @@ GEM
rake (0.9.2)
rdoc (3.9.4)
sass (3.1.8)
sprockets (2.0.1)
sprockets (2.0.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)

View File

@ -230,3 +230,10 @@ $('.add-album').live 'click', ->
_player.addTracks album.tracks
false
$('.s-add').live 'click', ->
artist = $('.artist-info h2').text()
album = _player.albums[$(this).attr('data-album-id')]
item = album.tracks[$(this).attr('data-id')-1]
item['artist'] = artist
item['album'] = album.name
_player.addTracks [item]

View File

@ -22,11 +22,11 @@
.button-container
%a.btn.add-album{ :'data-album-id' => album[:id] }= I18n.t 'player.add'
.span7.columns.tracks
%h3= album[:name] + " (" + album[:year].to_s + ")"
%h3{ :'data-album-id' => album[:id] }= album[:name] + " (" + album[:year].to_s + ")"
%table.zebra-striped.tracklist
- album[:tracks].each do |track|
%tr
%td.song-title= track[:name]
%td.song-duration
.s-duration= track[:duration]
.s-add{ :data_id => track[:id] }= I18n.t 'player.add_one'
.s-add{ :'data-album-id' => album[:id], :'data-id' => track[:id] }= I18n.t 'player.add_one'

View File

@ -21,28 +21,134 @@
<integer>200</integer>
<key>metaData</key>
<dict>
<key>app/assets/javascripts/player.coffee</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>6</integer>
<key>line</key>
<integer>202</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>179</integer>
</dict>
<key>app/assets/stylesheets/albums.scss</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>20</integer>
<key>line</key>
<integer>47</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>11</integer>
</dict>
<key>app/assets/stylesheets/player.scss</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>0</integer>
<key>line</key>
<integer>74</integer>
</dict>
<key>columnSelection</key>
<false/>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>37</integer>
<key>selectFrom</key>
<dict>
<key>column</key>
<integer>5</integer>
<key>line</key>
<integer>86</integer>
</dict>
<key>selectTo</key>
<dict>
<key>column</key>
<integer>0</integer>
<key>line</key>
<integer>74</integer>
</dict>
</dict>
<key>app/controllers/artist_controller.rb</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>62</integer>
<integer>55</integer>
<key>line</key>
<integer>91</integer>
<integer>98</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>54</integer>
<integer>0</integer>
</dict>
<key>app/views/artist/_page.html.haml</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>43</integer>
<key>line</key>
<integer>31</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>0</integer>
</dict>
<key>config/locales/en.yml</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>17</integer>
<key>line</key>
<integer>48</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>0</integer>
</dict>
<key>config/locales/ru.yml</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>22</integer>
<key>line</key>
<integer>48</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>0</integer>
</dict>
</dict>
<key>openDocuments</key>
<array>
<string>app/controllers/artist_controller.rb</string>
<string>app/views/artist/_page.html.haml</string>
<string>config/locales/en.yml</string>
<string>app/assets/stylesheets/player.scss</string>
<string>app/assets/stylesheets/albums.scss</string>
<string>app/assets/javascripts/player.coffee</string>
<string>config/locales/ru.yml</string>
</array>
<key>showFileHierarchyDrawer</key>
<false/>
<key>windowFrame</key>
<string>{{0, 91}, {1280, 1327}}</string>
<string>{{0, 78}, {1680, 950}}</string>
</dict>
</plist>