Permalink
Browse files

now when you destroy an asset it will be removed from index

  • Loading branch information...
1 parent 2da4946 commit 7bb041a2bd7b9d581e61b9044d05b2bd7f025fc8 @aviflombaum committed Apr 12, 2012
@@ -79,7 +79,7 @@ def destroy
flash[:warning] = "<strong>#{titles}</strong> has been deleted from the database."
lastsearch
end
- format.js
+ format.js { render :partial => 'assets/destroy' }
end
end
@@ -0,0 +1,5 @@
+if @destroyed_id
+ page.visual_effect :fade, "asset_#{@destroyed_id}", :duration => 0.5
+else
+ page.call 'alert', "That entry is still in use and can not be destroyed."
+end
@@ -1,3 +1,4 @@
-$("#tr_asset_<%= @destroyed_id %>, #tr_divider_<%= @destroyed_id %>").fadeOut(500, function() {
+// This file is not being used. 4/12/2012 - Avi Flombaum
+$("div#asset_<%= @destroyed_id %>").fadeOut(500, function() {
$(this).remove();
});
@@ -3,7 +3,7 @@
- unless @assets.empty?
= render :partial => "pagination"
- @assets.each do |asset|
- %div.recordItem
+ %div.recordItem{:id => "asset_#{asset.id}"}
%div.recordItemTitle
%h2

0 comments on commit 7bb041a

Please sign in to comment.