remove a duplicate view, hence many files updated, and fixed the js to socket people to the aspect sidebar

This commit is contained in:
maxwell 2010-11-22 16:38:10 -08:00
parent 7df35ade12
commit c45893d07d
30 changed files with 570 additions and 566 deletions

View file

@ -10,6 +10,6 @@
- else - else
%h3=t('.nobody_in_aspect', :aspect_name => aspect.name) %h3=t('.nobody_in_aspect', :aspect_name => aspect.name)
- if defined?(options) && options - if defined?(options) && options
%h4= link_to t('.add_contact_to', :aspect_name => aspect.name), "#manage_aspect_contacts_pane", :class => "manage_aspect_contacts_button" %h4= link_to t('.add_contact_to', :aspect_name => aspect.name), "#aspect_contacts_pane", :class => "aspect_contacts_button"
%h4= link_to t('.invite', :aspect_name => aspect.name), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite') %h4= link_to t('.invite', :aspect_name => aspect.name), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite')

View file

@ -40,7 +40,7 @@
%span.tip click to edit %span.tip click to edit
%ul.tools %ul.tools
%li= link_to t('.add_a_new_contact'), "#manage_aspect_contacts_pane_#{aspect.id}", :class => 'manage_aspect_contacts_button' %li= link_to t('.add_a_new_contact'), "#aspect_contacts_pane_#{aspect.id}", :class => 'aspect_contacts_button'
%li!= remove_link(aspect) %li!= remove_link(aspect)
%ul.dropzone{:data=>{:aspect_id=>aspect.id}} %ul.dropzone{:data=>{:aspect_id=>aspect.id}}
@ -55,6 +55,6 @@
=t('.drag_to_add') =t('.drag_to_add')
.fancybox_content .fancybox_content
%div{:id => "manage_aspect_contacts_pane_#{aspect.id}"} %div{:id => "aspect_contacts_pane_#{aspect.id}"}
= render "requests/manage_aspect_contacts", :aspect => aspect, :manage => true = render "shared/aspect_contacts", :aspect => aspect, :contacts => @contacts, :manage => true

View file

@ -2,7 +2,10 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%div{:id => destination_handle}
= form_for Request.new, :remote => true do |request| = form_for Request.new, :remote => true do |request|
= request.hidden_field :into, :value => "changeme" = request.hidden_field :into, :value => "changeme"
= request.hidden_field :to, :value => destination_handle = request.hidden_field :to, :value => destination_handle
= request.submit '+', :class => 'add', :disable_with => "Sending" = request.submit '+', :class => 'add', :disable_with => t('requests.create.sending')
.message.hidden
%i sent!

View file

@ -22,11 +22,11 @@
- for contact in aspect.contacts - for contact in aspect.contacts
= person_image_link(contact.person) = person_image_link(contact.person)
= link_to (image_tag('add_contact_button.png', :title => t('shared.aspect_contacts.add_to', :aspect => aspect))), '#manage_aspect_contacts_pane', :class => 'manage_aspect_contacts_button' = link_to (image_tag('add_contact_button.png', :title => t('shared.aspect_contacts.add_to', :aspect => aspect))), '#aspect_contacts_pane', :class => 'aspect_contacts_button'
.fancybox_content .fancybox_content
#manage_aspect_contacts_pane #aspect_contacts_pane
= render "requests/manage_aspect_contacts", :aspect => aspect, :getting_started => 2 = render "shared/aspect_contacts", :aspect => aspect, :contacts => [], :getting_started => 2
= link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right" = link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right"

View file

@ -233,7 +233,7 @@ ar:
error: "!الرجاء اختيار جانب" error: "!الرجاء اختيار جانب"
ignore: ". تجاهل طلب الصداقة" ignore: ". تجاهل طلب الصداقة"
success: ".أنتم الآن أصدقاء" success: ".أنتم الآن أصدقاء"
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ cs:
error: "Prosím vyberte aspekt!" error: "Prosím vyberte aspekt!"
ignore: "Ignorovat žádost o přátelství." ignore: "Ignorovat žádost o přátelství."
success: "Nyní jste přáteli." success: "Nyní jste přáteli."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ cy:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored friend request." ignore: "Ignored friend request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ da:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored contact request." ignore: "Ignored contact request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ de:
error: "Bitte wähle einen Aspekt!" error: "Bitte wähle einen Aspekt!"
ignore: "Anfrage des Kontaktes ignoriert." ignore: "Anfrage des Kontaktes ignoriert."
success: "Ihr seit jetzt verbunden." success: "Ihr seit jetzt verbunden."
manage_aspect_contacts: aspect_contacts:
contact_username: "Diaspora Addresse des Kontaktes" contact_username: "Diaspora Addresse des Kontaktes"
create_request: "Anfrage erstellen" create_request: "Anfrage erstellen"
enter_a_diaspora_username: "Gib eine Diaspora Addresse ein:" enter_a_diaspora_username: "Gib eine Diaspora Addresse ein:"

View file

@ -233,7 +233,7 @@ el:
error: "Παρακαλώ επιλέξτε μια πτυχή!" error: "Παρακαλώ επιλέξτε μια πτυχή!"
ignore: "Αγνοήθηκε αίτηση φίλου." ignore: "Αγνοήθηκε αίτηση φίλου."
success: "Είστε πλέον φίλοι." success: "Είστε πλέον φίλοι."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -86,7 +86,7 @@ en:
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Find by Diaspora handle"
invitations: invitations:
invites: "Invites" invites: "Invites"
invite_someone: "Invite someone" invite_someone: "Invite someone"
@ -314,7 +314,7 @@ en:
results_for: " results for %{params}" results_for: " results for %{params}"
people_on_pod_are_aware_of: " people on pod are aware of" people_on_pod_are_aware_of: " people on pod are aware of"
requests: requests:
manage_aspect_contacts: aspect_contacts:
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
contact_username: "Contact's username" contact_username: "Contact's username"

View file

@ -233,7 +233,7 @@ es:
error: "Seleccione un aspecto!" error: "Seleccione un aspecto!"
ignore: "Ignorar peticion de amistad" ignore: "Ignorar peticion de amistad"
success: "Ahora son amigos." success: "Ahora son amigos."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ fi:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored friend request." ignore: "Ignored friend request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ fr:
error: "Veuillez sélectionner un aspect !" error: "Veuillez sélectionner un aspect !"
ignore: "Requête de contact ignorée." ignore: "Requête de contact ignorée."
success: "Vous êtes à présent amis." success: "Vous êtes à présent amis."
manage_aspect_contacts: aspect_contacts:
contact_username: "Nom d'utilisateur du contact" contact_username: "Nom d'utilisateur du contact"
create_request: "Créer une requête" create_request: "Créer une requête"
enter_a_diaspora_username: "Entrez un nom d'utilisateur Diaspora :" enter_a_diaspora_username: "Entrez un nom d'utilisateur Diaspora :"

View file

@ -233,7 +233,7 @@ he:
error: "נא לבחור בהיבט!" error: "נא לבחור בהיבט!"
ignore: "בקשות חברות מהן התעלמת." ignore: "בקשות חברות מהן התעלמת."
success: "אתם חברים כעת." success: "אתם חברים כעת."
manage_aspect_contacts: aspect_contacts:
contact_username: "שם המשתמש של איש הקשר" contact_username: "שם המשתמש של איש הקשר"
create_request: "יצירת בקשה" create_request: "יצירת בקשה"
enter_a_diaspora_username: "נא להזין שם משתמש בדיאספורה:" enter_a_diaspora_username: "נא להזין שם משתמש בדיאספורה:"

View file

@ -233,7 +233,7 @@ id:
error: "Silahkan pilih sebuah aspek!" error: "Silahkan pilih sebuah aspek!"
ignore: "Permintaan pertemanan yang diabaikan." ignore: "Permintaan pertemanan yang diabaikan."
success: "Anda sekarang berteman." success: "Anda sekarang berteman."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ it:
error: "Seleziona un aspetto!" error: "Seleziona un aspetto!"
ignore: "Ignora richiesta di amicizia." ignore: "Ignora richiesta di amicizia."
success: "Adesso siete amici." success: "Adesso siete amici."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ lt:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored friend request." ignore: "Ignored friend request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ nb:
error: "Velg et aspekt først!" error: "Velg et aspekt først!"
ignore: "Ignorerte venneforespørsel" ignore: "Ignorerte venneforespørsel"
success: "Dere er nå venner." success: "Dere er nå venner."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ nl:
error: "Selecteer een aspect!" error: "Selecteer een aspect!"
ignore: "Vriendenverzoek genegeerd." ignore: "Vriendenverzoek genegeerd."
success: "Jullie zijn nu vrienden." success: "Jullie zijn nu vrienden."
manage_aspect_contacts: aspect_contacts:
contact_username: "Gebruikersnaam van contact" contact_username: "Gebruikersnaam van contact"
create_request: "Doe verzoek" create_request: "Doe verzoek"
enter_a_diaspora_username: "Vul een Diaspora gebruikersnaam in:" enter_a_diaspora_username: "Vul een Diaspora gebruikersnaam in:"

View file

@ -233,7 +233,7 @@ pl:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored contact request." ignore: "Ignored contact request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ pt-BR:
error: "Favor selecionar um aspecto!" error: "Favor selecionar um aspecto!"
ignore: "Requisições de amigos ignoradas." ignore: "Requisições de amigos ignoradas."
success: "Vocês agora são amigos." success: "Vocês agora são amigos."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ pt-PT:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored friend request." ignore: "Ignored friend request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ ro:
error: "Please select an aspect!" error: "Please select an aspect!"
ignore: "Ignored friend request." ignore: "Ignored friend request."
success: "You are now friends." success: "You are now friends."
manage_aspect_contacts: aspect_contacts:
contact_username: "Contact's username" contact_username: "Contact's username"
create_request: "Create request" create_request: "Create request"
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"

View file

@ -233,7 +233,7 @@ ru:
error: "Выберите аспект!" error: "Выберите аспект!"
ignore: "Игнорированные запросы на дружбу." ignore: "Игнорированные запросы на дружбу."
success: "Теперь вы друзья." success: "Теперь вы друзья."
manage_aspect_contacts: aspect_contacts:
contact_username: "Контакты пользователя" contact_username: "Контакты пользователя"
create_request: "Создать запрос" create_request: "Создать запрос"
enter_a_diaspora_username: "Введите имя пользователя в Диаспоре:" enter_a_diaspora_username: "Введите имя пользователя в Диаспоре:"

View file

@ -233,7 +233,7 @@ sv:
error: "Var god välj en aspekt!" error: "Var god välj en aspekt!"
ignore: "Ignorerade kontaktförfrågan." ignore: "Ignorerade kontaktförfrågan."
success: "Kontakten är nu tillagd." success: "Kontakten är nu tillagd."
manage_aspect_contacts: aspect_contacts:
contact_username: "Kontaktens Diaspora-adress" contact_username: "Kontaktens Diaspora-adress"
create_request: "Skapa förfrågan" create_request: "Skapa förfrågan"
enter_a_diaspora_username: "Ange ett användarnamn:" enter_a_diaspora_username: "Ange ett användarnamn:"

View file

@ -233,7 +233,7 @@ tr:
error: "Lutfen bir yan seçiniz!" error: "Lutfen bir yan seçiniz!"
ignore: "Arkadaş isteğini reddettiniz." ignore: "Arkadaş isteğini reddettiniz."
success: "Siz şimdi arkadaşsınız." success: "Siz şimdi arkadaşsınız."
manage_aspect_contacts: aspect_contacts:
contact_username: "Kontak kullanıcı adı" contact_username: "Kontak kullanıcı adı"
create_request: "Yaratma isteği" create_request: "Yaratma isteği"
enter_a_diaspora_username: "Diaspora kullanıcı adı girin:" enter_a_diaspora_username: "Diaspora kullanıcı adı girin:"

View file

@ -19,7 +19,7 @@ $(document).ready(function(){
//buttons////// //buttons//////
$(".add_aspect_button," + $(".add_aspect_button," +
".manage_aspect_contacts_button," + ".aspect_contacts_button," +
".invite_user_button," + ".invite_user_button," +
".add_photo_button," + ".add_photo_button," +
".remove_person_button," + ".remove_person_button," +
@ -37,7 +37,7 @@ $(document).ready(function(){
} }
); );
$('.new_request').submit(function(){ $('.new_request').live("submit", function(){
var foo = $(this).parent(); var foo = $(this).parent();
$(this).hide(); $(this).hide();
foo.find('.message').removeClass('hidden'); foo.find('.message').removeClass('hidden');
@ -85,7 +85,7 @@ $(document).ready(function(){
$('.webfinger_form').submit(function(evt){ $('.webfinger_form').submit(function(evt){
form = $(evt.currentTarget); form = $(evt.currentTarget);
form.siblings('.spinner').show(); form.siblings('#loader').show();
$('#request_result li:first').hide(); $('#request_result li:first').hide();
}); });

View file

@ -36,15 +36,16 @@ var WebSocketReceiver = {
}, },
processPerson: function(response){ processPerson: function(response){
form = $('.webfinger_form:visible'); form = $('.webfinger_form');
form.siblings('.spinner').hide(); form.siblings('#loader').hide();
result_ul = form.siblings('.webfinger_result'); result_ul = form.siblings('#request_result');
if(response['status'] == 'fail'){ if(response['status'] == 'fail'){
result_ul.children('.error').show(); result_ul.siblings('.error').show();
result_ul.children('.webfinger_error').text(response['response']).show(); result_ul.find('.error').text(response['response']).show();
}else{ }else{
$('#people_stream').prepend(response['html']).slideDown('slow', function(){}); $('#people_stream').prepend(response['html']).slideDown('slow', function(){});
var first_li = result_ul.find('li:first'); var first_li = result_ul.find('li:first');
first_li.hide()
first_li.after(response['html']); first_li.after(response['html']);
result_ul.find("[name='request[into]']").val(result_ul.attr('aspect_id')); result_ul.find("[name='request[into]']").val(result_ul.attr('aspect_id'));
result_ul.children(':nth-child(2)').slideDown('fast', function(){}); result_ul.children(':nth-child(2)').slideDown('fast', function(){});

1050
spec/fixtures/users.yaml vendored

File diff suppressed because it is too large Load diff