diff --git a/app/views/aspects/_aspect.haml b/app/views/aspects/_aspect.haml index a0d499fc0..02f299ff9 100644 --- a/app/views/aspects/_aspect.haml +++ b/app/views/aspects/_aspect.haml @@ -1,4 +1,4 @@ -%li +%li.aspect{:data=>{:guid=>aspect.id}} .right = link_to t('contacts', :count => contact_count), edit_aspect_path(aspect), :rel => 'facebox' %b{:class => ("dull" if contacts.length == 0)} diff --git a/app/views/aspects/edit.html.haml b/app/views/aspects/edit.html.haml index 743cbc8ca..5793a5467 100644 --- a/app/views/aspects/edit.html.haml +++ b/app/views/aspects/edit.html.haml @@ -15,7 +15,7 @@ = link_to 'rename', '#' \. \. - = link_to 'delete', '#' + = link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect') .person_tiles{:style => "display:none;"} - for contact in @aspect.contacts diff --git a/app/views/aspects/index.js.erb b/app/views/aspects/index.js.erb index 24bf9b40e..6371393c4 100644 --- a/app/views/aspects/index.js.erb +++ b/app/views/aspects/index.js.erb @@ -1,2 +1,3 @@ $('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :post_hashes => @post_hashes)) %>"); $('#aspect_listings').html("<%= escape_javascript(render('aspects/aspect_listings', :aspect_hashes => @aspect_hashes)) %>"); +$('a[rel*=facebox]').facebox(); diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index edb18f1fb..550aaf415 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -47,7 +47,7 @@ - for aspect in @all_aspects %li{:data=>{:guid=>aspect.id}, :class => ("selected" if @object_aspect_ids.include?(aspect.id))} = link_for_aspect(aspect, :class => 'aspect_selector') - = link_to '▼', edit_aspect_path(aspect), :class => 'aspect_selector_edit' + = link_to '▼', edit_aspect_path(aspect), :class => 'aspect_selector_edit', :rel => 'facebox' %li = link_to '+', '#add_aspect_pane', :class => "add_aspect_button", :title => t('aspects.manage.add_a_new_aspect'), :rel => 'facebox' diff --git a/config/assets.yml b/config/assets.yml index 01315daf4..c6de88757 100644 --- a/config/assets.yml +++ b/config/assets.yml @@ -33,6 +33,7 @@ javascripts: home: - public/javascripts/publisher.js - public/javascripts/aspect-filters.js + - public/javascripts/contact-list.js people: - public/javascripts/contact-list.js photos: diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 5aa791b3c..348867196 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -26,7 +26,7 @@ var AspectEdit = { AspectEdit.animateImage($(this).find("img").first()); $(".draggable_info").fadeIn(100); }, - + animateImage: function(image) { image.animate({'height':80, 'width':80, 'opacity':0.8}, 200); image.tipsy("hide"); @@ -84,11 +84,11 @@ var AspectEdit = { person.attr('data-aspect_id', dropzone.attr('data-aspect_id')); person.removeAttr('data-person_id'); }, - + onMovePersonSuccess: function(person, dropzone) { person.attr('data-aspect_id', dropzone.attr('data-aspect_id')); }, - + deletePersonFromAspect: function(person) { var person_id = person.attr('data-guid');