Permalink
Browse files

JQUERY upgrade. Point. Playlist fixing. Comment Background Fixing.

  • Loading branch information...
1 parent cbeadfb commit e8ff0739fcb8920e71e37c89f62d7ae4a5260e33 @sudara sudara committed Mar 21, 2009
@@ -94,10 +94,17 @@ def edit
:per_page => 10,
:page => params[:listens_page]
)
+
+ @favorites = Track.favorites.paginate_all_by_user_id(@user.id,
+ :limit => 10,
+ :per_page => 10,
+ :page => params[:favorites_page]
+ )
if request.xhr?
render :partial => 'your_stuff.html.erb' if params[:uploads_page]
render :partial => 'your_listens.html.erb' if params[:listens_page]
+ render :partial => 'your_favorites.html.erb' if params[:favorites_page]
end
end
@@ -42,7 +42,7 @@ def favorite_asset_ids
end
def favorites
- @favorites ||= self.playlists.favorites.find(:first)
+ playlists.favorites.find(:first)
end
def has_pic?
@@ -1,6 +1,5 @@
<div class="more tabs" id="tabs_for_track_<%= object_id %>" style="display:none;">
-
<ul>
<li><%= link_to 'comment', "#comment_track_#{asset.unique_id}" %> </li>
<li><%= link_to 'about', "#details_track_#{asset.unique_id}" %> </li>
@@ -79,6 +78,5 @@
<%= render :partial => 'assets/comment', :object => asset %>
</div>
-
</div>
@@ -16,7 +16,7 @@
<link rel="alternate" type="application/rss+xml" title="Latest uploaded mp3s on alonetone" href="/latest.rss"/>
<link rel="alternate" type="application/rss+xml" title="alonetone news" href="/updates.rss"/>
- <%= javascript_include_tag 'jquery-1.2.6','soundmanager','jquery-ui-and-tabs','jquery-carousel','jquery-lowpro','jquery-hotkeys','facebox','application', :cache => 'allonetone' %>
+ <%= javascript_include_tag 'jquery-1.3.2.min','soundmanager','jquery-ui-1.7.1.custom.min','jquery-carousel','jquery-lowpro','jquery-hotkeys','facebox','application', :cache => 'allonetone' %>
<!-- ensure token is available to javascript for accessible link posts, etc -->
<%= render :partial => 'shared/javascript_auth_token' %>
@@ -1,24 +1,23 @@
<div id="playlist_sources" class="draggable_wrapper">
<div class="draggable_tracks">
<h2 class="box">Available tracks</h2>
-
- <ul id="playlist_source_options" class="tabs">
- <li><%= link_to 'Your Uploads', '#your_uploads', :class => 'playlist_option', :id => 'open_your_stuff' if @user.has_tracks? %> </li>
- <li><%= link_to "Your Listens", "#your_listens", :class => 'playlist_option', :id => 'open_your_listens' %> </li>
- <li><%= link_to "Search", '#your_search', :class => 'playlist_option',:id => 'open_search' %> </li>
- </ul>
+
+ <div id="playlist_tabs">
+ <ul id="playlist_source_options" class="tabs">
+ <li><%= link_to 'Your Uploads', '#your_uploads', :class => 'playlist_option', :id => 'open_your_stuff' if @user.has_tracks? %> </li>
+ <li><%= link_to "Your Listens", "#your_listens", :class => 'playlist_option', :id => 'open_your_listens' %> </li>
+ <li><%= link_to "Favs", '#your_favorites', :class => 'playlist_option',:id => 'open_your_favorites' %> </li>
+ </ul>
- <%= render :partial => 'your_stuff' %>
-
+ <%= render :partial => 'your_stuff' %>
- <%= render :partial => 'your_listens' %>
- <div id="your_search" class="playlist_source" style="display:none;">
- <div class="scriptaculous">
- <div id="results"> </div>
- </div>
- </div>
-
+ <%= render :partial => 'your_listens' %>
+
+
+ <%= render :partial => 'your_favorites'%>
+
+ </div>
</div>
</div>
@@ -0,0 +1,9 @@
+<div id="your_favorites" class="playlist_source">
+ <div class="mini_paginator">
+ <%= will_paginate @favorites, {:param_name => :favorites_page, :ignore_get_params => true}%>
+ </div>
+
+ <div class="scriptaculous">
+ <%= render :partial => 'playlists/asset', :collection => @favorites.collect(&:asset) %>
+ </div>
+</div>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -632,7 +632,7 @@ Track = $.klass({
},
createTabbies : function(){
- this.tabbies = $('ul',this.more).attachAndReturn(Tabbies)[0]; // low pro returns an array
+ this.tabbies = $(this.more).attachAndReturn(Tabbies)[0]; // low pro returns an array
this.commentForm = $('.comment_form form',this.more).attachAndReturn(CommentForm)[0];
$('a.add_to_favorites',this.more).attach(FavoriteToggle);
},
@@ -872,7 +872,7 @@ jQuery(function($) {
});
// ability to tab through various track sources
- $('#playlist_sources ul#playlist_source_options').attach(Tabbies);
+ $('#playlist_tabs').attach(Tabbies);
// the various groups of tracks you can add to a playlist
$('#playlist_sources').attach(PlaylistSource);

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -190,6 +190,7 @@
.comment
:position relative
:color = !white
+ :background url(../images/backgrounds/new_comment.png) repeat-x top left
div.private_comment
:background url(../images/icons/private.png) no-repeat top left
:position absolute

0 comments on commit e8ff073

Please sign in to comment.