<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -127,7 +127,7 @@ class PlaylistsController &lt; ApplicationController
     respond_to do |format|
       if @playlist.update_attributes(params[:playlist])
         flash[:notice] = 'Playlist was successfully updated.'
-        format.html { redirect_to(@playlist) }
+        format.html { redirect_to(@user,@playlist) }
         format.xml  { head :ok }
       else
         format.html { render :action =&gt; &quot;edit&quot; }</diff>
      <filename>app/controllers/playlists_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -126,7 +126,10 @@ class UsersController &lt; ApplicationController
         if @user.save 
           flash[:ok] = &quot;Sweet, updated&quot; 
         end
-        redirect_to :action =&gt; 'edit'
+        redirect_to :back
+      end
+      format.js do
+        @user.save ? (return head(:ok)) : (return head(:bad_request))
       end
     end
   end</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,31 +37,7 @@ module ApplicationHelper
     CGI.rfc1123_date(date)
   end
   
-  def website_for(user)
-    link_to &quot;#{user.name}'s website&quot;, ('http://'+h(user.website))
-  end
-  
-  def myspace_for(user)
-    link_to &quot;#{user.name} on Myspace.com&quot;,('http://'+h(user.myspace))
-  end
-  
-  def itunes_link_for(user)
-    link_to &quot;Open #{user.name}'s music in iTunes&quot;, 'http://'+h(user.itunes)
-  end
-  
-  def avatar(user, size=nil)
-    case size
-      when 100 then image_tag(user.has_pic? ? user.pic.public_filename(:large) : 'no-pic-thumb100.jpg')
-      when 50 then image_tag(user.has_pic? ? user.pic.thumb.public_filename(:small) : 'no-pic-thumb50.jpg')
-      when nil then image_tag(user.has_pic? ? user.pic.public_filename(:tiny) : 'no-pic.jpg' )
-    end
-  end
-  
-  def user_location(user)
-    if (user.present?(:city) || user.present?(:country))
-      &quot;from #{[user.city, user.country].compact.join(', ')}&quot; 
-    end
-  end
+
   
   def track_name_for(asset, length=40)
     truncate(h(asset.name),length)
@@ -100,5 +76,18 @@ module ApplicationHelper
     admin? || @user === current_user 
   end
   
+  def notice_for(notice, h1_text, &amp;block)
+    concat content_tag(:div, ((content_tag :h1, h1_text, :class =&gt; 'notice') + 
+      hide_notice_link(notice) + 
+      capture(&amp;block)), :class =&gt; 'notice'),
+      block.binding unless notice_hidden?(notice)
+  end
+  
+  def hide_notice_link(notice)
+    link_to ['Ok, hide this notice', 'Yup! all good, thanks'].rand, 
+      user_path(current_user, :user =&gt;{:settings =&gt; {:hide_notice =&gt; {notice =&gt; true}}}, :method =&gt; :put),
+      :class =&gt; 'hide_notice' if logged_in?
+  end
   
+  protected 
 end</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,39 @@
 module UsersHelper
   
+  def website_for(user)
+    link_to &quot;#{user.name}'s website&quot;, ('http://'+h(user.website))
+  end
+  
+  def myspace_for(user)
+    link_to &quot;#{user.name} on Myspace.com&quot;,('http://'+h(user.myspace))
+  end
+  
+  def itunes_link_for(user)
+    link_to &quot;Open #{user.name}'s music in iTunes&quot;, 'http://'+h(user.itunes)
+  end
+  
+  def avatar(user, size=nil)
+    case size
+      when 100 then image_tag(user.has_pic? ? user.pic.public_filename(:large) : 'no-pic-thumb100.jpg')
+      when 50 then image_tag(user.has_pic? ? user.pic.thumb.public_filename(:small) : 'no-pic-thumb50.jpg')
+      when nil then image_tag(user.has_pic? ? user.pic.public_filename(:tiny) : 'no-pic.jpg' )
+    end
+  end
+  
+  def user_location(user)
+    if (user.present?(:city) || user.present?(:country))
+      &quot;from #{[user.city, user.country].compact.join(', ')}&quot; 
+    end
+  end
+  
   def user_image_link(user, size = :large)
     link_to(image_tag(user.avatar(size),:alt =&gt; &quot;#{user.name} on alonetone&quot;), user_home_path(user), :alt =&gt; &quot;#{user.name} on alonetone&quot;) 
   end
   
+  def notice_hidden?(notice)
+    logged_in? &amp;&amp; current_user.settings.present?('hide_notice') &amp;&amp; current_user.settings['hide_notice'].present?(notice)
+  end
+  
   def setting(symbol_or_string)
     if logged_in? &amp;&amp; current_user.settings
       return current_user.settings[symbol_or_string.to_sym]</diff>
      <filename>app/helpers/users_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
-&lt;h2&gt;Need some help?&lt;/h2&gt;
-&lt;ul&gt;
-	&lt;li&gt;Drag tracks from 'available tracks' into the playlist to add them &lt;/li&gt;
-	&lt;li&gt;Click on the description or title to edit&lt;/li&gt;
-	&lt;li&gt;Click on the photo to upload new cover art for your playlist&lt;/li&gt;
-	&lt;li&gt;Within the playlist drag tracks by the &lt;%= image_tag 'playlists/button-move.png'%&gt; to reorder them&lt;/li&gt;
-	&lt;li&gt;To remove tracks from the playlist click &lt;%= image_tag 'playlists/button-delete.png' %&gt;&lt;/li&gt;
-&lt;/ul&gt;
\ No newline at end of file
+&lt;% notice_for('edit_playlist',&quot;Editing '#{h @playlist.title}'&quot;) do %&gt;
+    &lt;ol&gt;
+        &lt;li&gt;Find the track you want to add&lt;/li&gt;
+        &lt;li&gt;Drag track to your playlist on the left&lt;/li&gt;
+        &lt;li&gt;Repeat!&lt;/li&gt;
+        &lt;li&gt;Order tracks in your playlist by dragging them up and down&lt;/li&gt;
+    &lt;/ol&gt;
+&lt;% end %&gt;
\ No newline at end of file</diff>
      <filename>app/views/playlists/_inline_help.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,34 @@
-&lt;h1&gt;Editing '&lt;%= @playlist.title %&gt;'&lt;/h1&gt;
-	
-	&lt;%= error_messages_for :playlist %&gt;
-	&lt;%= render :partial =&gt; 'inline_help'%&gt;
+&lt;%= error_messages_for :playlist %&gt;
+&lt;%= render :partial =&gt; 'inline_help'%&gt;
 
 &lt;% content_for :left do %&gt;
   
   &lt;div id=&quot;edit_playlist&quot;&gt;
     &lt;% render :layout =&gt; 'playlist_layout' do %&gt;
-      &lt;%= render :partial =&gt; 'track', :collection =&gt; @playlist.tracks %&gt;
-    &lt;div id=&quot;drop_here&quot;&gt;
-      Drop Track here
-    &lt;/div&gt;
-    &lt;% end %&gt;
-    
-
-    &lt;div id=&quot;pic_upload&quot; style=&quot;display:none;&quot;&gt;
+      &lt;%= link_to 'edit title &amp;amp; description','#edit_playlist_info',:class=&gt;'slide_open_href edit' %&gt;
+      &lt;div id=&quot;pic_upload&quot; class=&quot;static_content&quot; style=&quot;display:none;&quot;&gt;
     	Upload a square photo, 400px by 400px for best results.&lt;br/&gt;
     		&lt;% form_for :pic, :url =&gt; attach_pic_user_playlist_path(@user, @playlist), :html =&gt; {:multipart =&gt; true, :method =&gt; :post} do |f| %&gt;
     			&lt;%= f.file_field :uploaded_data  %&gt;
     			&lt;%= submit_tag &quot;Upload new Pic&quot; %&gt;
     		&lt;% end %&gt;
+      &lt;/div&gt;
+      &lt;div id=&quot;edit_playlist_info&quot; class=&quot;static_content&quot;style=&quot;display:none;&quot;&gt;
+        &lt;% form_for [@user, @playlist] do |f| %&gt;
+          Title&lt;br/&gt;
+            &lt;%= f.text_field :title %&gt;&lt;br/&gt;
+          Description&lt;br/&gt;
+            &lt;%= f.text_area :description, :rows =&gt; 4, :cols =&gt; 40, :class =&gt; 'double_trouble' %&gt;&lt;br/&gt;
+            &lt;div class=&quot;submit_wrapper&quot;&gt;
+                &lt;%= f.submit &quot;update&quot; %&gt;
+            &lt;/div&gt;
+        &lt;% end %&gt;
+      &lt;/div&gt;
+      &lt;%= render :partial =&gt; 'track', :collection =&gt; @playlist.tracks %&gt;
+    &lt;div id=&quot;drop_here&quot;&gt;
+      Drop Track here
     &lt;/div&gt;
+    &lt;% end %&gt;
   &lt;/div&gt;
   
 &lt;% end %&gt;</diff>
      <filename>app/views/playlists/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -35,8 +35,11 @@ class Object
   #
   def present?(*methods_variables_or_attributes)
     methods_variables_or_attributes.detect do |monkey|
-      if monkey.is_a? Symbol 
-        result = try(monkey.to_sym)
+      if (monkey.is_a? Symbol) 
+        result = try(monkey)
+        result &amp;&amp; !result.empty?
+      elsif self.is_a? Hash  # hashes with string keys
+        result = self[monkey]   
         result &amp;&amp; !result.empty?
       else # allow plain jane variables to be tested 
         monkey &amp;&amp; !monkey.empty?</diff>
      <filename>lib/goodies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,47 @@ soundManager.onload = function() {
   soundIsReady = true;
 }
 
+// we want regular access to the auth token
+Alonetone = {
+  authParams : $.param({'authenticity_token':window.authenticityToken})
+}
+
+// rails friendly &quot;delete&quot; (does not degrade!)
+Remote.DeleteLink = $.klass(Remote.Base,{
+  onclick: function(){
+    var options = $.extend({
+      url: this.element.attr('href'), 
+      type: 'POST', 
+      data: $.param({'authenticity_token':window.authenticityToken,'_method':'delete'})
+      },this.options);
+    return this._makeRequest(options);
+  }
+});
+
+// rails friendly 'put'
+Remote.PutLink = $.klass(Remote.Base,{
+  onclick: function(){
+    var options = $.extend({
+      url: this.element.attr('href'), 
+      type: 'POST', 
+      data: $.param({'authenticity_token':window.authenticityToken,'_method':'put'})
+      },this.options);
+    return this._makeRequest(options);
+  }
+});
+
+DismissableNotice = $.klass(Remote.PutLink,{
+  initialize: function($super){
+    this.notice = this.element.parents('div.notice');
+    $super(); // make sure to call init on parent
+  },
+  
+  success:function(e){
+    this.notice.fadeOut('slow');
+  }
+});
+
+
 // for debug purposes
 $.fn.log = function() {
   if (this.size()==0) return &quot;&lt;em&gt;wrapped set is empty&lt;/em&gt;&quot;
@@ -68,10 +109,6 @@ $(function() {
 });
 
 
-
-
-
-
 SortablePlaylist = $.klass({
   initialize : function(){
     this.tracks = $('.tracks', this.element);
@@ -192,8 +229,8 @@ ResizeableFooter = $.klass({
 });
 
 SlideOpenNext = $.klass({
-  initialize:function(){
-    this.next = this.element.next();
+  initialize:function(to_open){
+    this.next = (to_open == undefined ? this.element.next() : (to_open = 'href' ? $(this.element.attr('href')) : $(to_open)));
   },
   onclick:function(){
     this.next.slideToggle();
@@ -202,14 +239,6 @@ SlideOpenNext = $.klass({
   
 });
 
-/* rails friendly &quot;delete&quot; (does not degrade!)
-DeleteLink = $.klass({
-    onclick: function() {
-    var options = $.extend({ url: this.element.attr('href'), type: 'POST', data: }, this.options);
-    return this._makeRequest(options);
-  }
-});
-*/
 // text area that grows 2x in size upon need
 AdjustableTextarea = $.klass({
   
@@ -513,7 +542,15 @@ jQuery(function($) {
   // ability to tab through various track sources
   $('#playlist_sources ul#playlist_source_options').attach(Tabbies);
   
+  // the various groups of tracks you can add to a playlist
   $('#playlist_sources').attach(PlaylistSource);
+  
+  $('#edit_playlist .playlist .cover a').attach(SlideOpenNext, '#pic_upload');
+
+  $('a.slide_open_href').attach(SlideOpenNext,'href');
+
+  $('a.hide_notice').attach(DismissableNotice);
+
 
 });
 </diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -300,4 +300,4 @@ div.small_spinner
   :background url(../images/small_spinner.gif) no-repeat center center
   :height 20px
   :margin-top 5px
-  :width 20px
\ No newline at end of file
+  :width 20px</diff>
      <filename>public/stylesheets/sass/alonetone.sass</filename>
    </modified>
    <modified>
      <diff>@@ -40,6 +40,9 @@ img a, img a:visited
     :color = !text_color
     img
       :max-width 550px
+  ol li
+    :list-style-type decimal
+    :list-style-position inside
 .content .user_report .body, .content .update .body, .notice, .static_content, .content .comment_body
   a, a:visited
     :text-decoration underline
@@ -107,9 +110,11 @@ div.flash
   :padding 20px 30px
   :margin-bottom 20px
 
+// links that float right
 a.arrows, a.view_more, a.view_all,a.edit
   :background url(../images/buttons/arrow.png) no-repeat right center
   :padding-right 12px
+  
 .content 
   a.view_all, a.edit
     :color = !text_color
@@ -117,7 +122,16 @@ a.arrows, a.view_more, a.view_all,a.edit
     :float right
     :margin-top -31px
     :margin-right 25px
-
+div.notice a.hide_notice
+  :float right
+  :margin-top -31px
+  :margin-right 0px
+  :font-size 12px
+  :font-weight bold
+  :color = !orange
+  
+      
+    
 // for example the sort url and add url on edit playlists
 a.hidden
   :display none</diff>
      <filename>public/stylesheets/sass/typography.sass</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b855d749613478190f277f427ff834c9da63fc61</id>
    </parent>
  </parents>
  <author>
    <name>Sudara</name>
    <email>sudara@alonetone.com</email>
  </author>
  <url>http://github.com/sudara/alonetone/commit/4e24b9695a77bc04aafa862c62c084c72e120dcc</url>
  <id>4e24b9695a77bc04aafa862c62c084c72e120dcc</id>
  <committed-date>2008-04-22T13:52:33-07:00</committed-date>
  <authored-date>2008-04-22T13:52:33-07:00</authored-date>
  <message>flesh out playlist editing, add notices</message>
  <tree>0cbaa992a1be6a2c3fba5ad9dd23dbdb12e7d046</tree>
  <committer>
    <name>Sudara</name>
    <email>sudara@alonetone.com</email>
  </committer>
</commit>
