base/app/views/cheesecake/_index.html.erb in social_stream-0.20.0 vs base/app/views/cheesecake/_index.html.erb in social_stream-0.20.1

- old
+ new

@@ -1,8 +1,8 @@ - +<div id="edit_sector_button"><%= image_tag "btn/cheese_edit.png" %></div> <div id="contacts_cheesecake"></div> -<div id="sector_form" style="display:none;"> +<div id="sector_editor"> <%= render :partial => "sector_form" %> </div> <div id="contacts_explorer"> <div id="contacts_filter"> <%= text_field_tag :filter_query, nil,:autocomplete => :off, :id => :contacts_filter_input %> @@ -106,7 +106,30 @@ $("#contacts_changes_title").click(function(){ $("#contacts_changes_button").tipsy("hide"); }); } }); + var edit_sector_click = function(){ + $("#edit_sector_button").off("click.edit"); + $("#edit_sector_button").fadeOut("fast",function(){ + $("#edit_sector_button").html("<%= escape_javascript image_tag "btn/cheese_close_edit.png" %>"); + $("#edit_sector_button").fadeIn("fast"); + }); + $("#contacts_explorer").stop().animate({width: 0},500); + $("#sector_editor").stop().animate({width: 300},500, function(){ + $("#edit_sector_button").on("click.close_edit",close_edit_sector_click); + }); + } + var close_edit_sector_click = function(){ + $("#edit_sector_button").off("click.close_edit"); + $("#edit_sector_button").fadeOut("fast",function(){ + $("#edit_sector_button").html("<%= escape_javascript image_tag "btn/cheese_edit.png" %>"); + $("#edit_sector_button").fadeIn("fast"); + }); + $("#sector_editor").stop().animate({width: 0},500); + $("#contacts_explorer").stop().animate({width: 300},500,function(){ + $("#edit_sector_button").on("click.edit",edit_sector_click); + }); + } + $("#edit_sector_button").on("click.edit",edit_sector_click); <%= render :partial => 'cheesecake' %> <% end %> \ No newline at end of file