Merge pull request #6963 from svbergerem/contacts-page-fixes
Contacts page fixes
This commit is contained in:
commit
218de300bd
5 changed files with 22 additions and 15 deletions
|
|
@ -9,7 +9,8 @@ app.pages.Contacts = Backbone.View.extend({
|
|||
"click #chat_privilege_toggle" : "toggleChatPrivilege",
|
||||
"click #change_aspect_name" : "showAspectNameForm",
|
||||
"keyup #contact_list_search" : "searchContactList",
|
||||
"click .conversation_button": "showMessageModal"
|
||||
"click .conversation_button": "showMessageModal",
|
||||
"click #invitations-button": "showInvitationsModal"
|
||||
},
|
||||
|
||||
initialize: function(opts) {
|
||||
|
|
@ -86,6 +87,10 @@ app.pages.Contacts = Backbone.View.extend({
|
|||
app.helpers.showModal("#conversationModal");
|
||||
},
|
||||
|
||||
showInvitationsModal: function() {
|
||||
app.helpers.showModal("#invitationsModal");
|
||||
},
|
||||
|
||||
setupAspectSorting: function() {
|
||||
$("#aspect_nav .list-group").sortable({
|
||||
items: "a.aspect[data-aspect-id]",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ app.Router = Backbone.Router.extend({
|
|||
"help": "help",
|
||||
"getting_started": "gettingStarted",
|
||||
"contacts": "contacts",
|
||||
"community_spotlight": "spotlight",
|
||||
"conversations": "conversations",
|
||||
"user/edit": "settings",
|
||||
"users/sign_up": "registration",
|
||||
|
|
@ -94,6 +95,12 @@ app.Router = Backbone.Router.extend({
|
|||
this.renderPage(function(){ return new app.pages.SinglePostViewer({ id: id })});
|
||||
},
|
||||
|
||||
spotlight: function() {
|
||||
$("#invitations-button").click(function() {
|
||||
app.helpers.showModal("#invitationsModal");
|
||||
});
|
||||
},
|
||||
|
||||
renderPage : function(pageConstructor){
|
||||
app.page && app.page.unbind && app.page.unbind(); //old page might mutate global events $(document).keypress, so unbind before creating
|
||||
app.page = pageConstructor(); //create new page after the world is clean (like that will ever happen)
|
||||
|
|
|
|||
|
|
@ -13,9 +13,3 @@
|
|||
path: new_user_invitation_path,
|
||||
id: "invitationsModal",
|
||||
title: t("invitations.new.invite_someone_to_join")
|
||||
|
||||
-# This will have to be extracte in a JS view
|
||||
:javascript
|
||||
$("#invitations-button").click(function(){
|
||||
app.helpers.showModal("#invitationsModal");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
- content_for :page_title do
|
||||
= t('contacts.spotlight.community_spotlight')
|
||||
|
||||
|
||||
.container#contacts_container
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'contacts/sidebar'
|
||||
.sidebar
|
||||
= render "contacts/sidebar"
|
||||
|
||||
.col-md-9
|
||||
#people_stream.stream.contacts
|
||||
.header
|
||||
.stream.contacts.framed-content#people_stream
|
||||
.header.clearfix
|
||||
- if AppConfig.settings.community_spotlight.suggest_email.present?
|
||||
.pull-right
|
||||
= link_to t('contacts.spotlight.suggest_member'), "mailto:#{AppConfig.settings.community_spotlight.suggest_email}", :class => "btn btn-default", :id => "suggest_member"
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
= t('contacts.spotlight.community_spotlight')
|
||||
|
||||
#community_spotlight
|
||||
- unless @people.blank?
|
||||
- if @people.blank?
|
||||
.well
|
||||
= t("contacts.spotlight.no_members")
|
||||
- else
|
||||
- @people.each do |person|
|
||||
= render 'people/person', :person => person, :contact => current_user.contact_for(person)
|
||||
|
||||
-# if @contacts_size > 0
|
||||
= render @contacts
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ en:
|
|||
spotlight:
|
||||
community_spotlight: "Community spotlight"
|
||||
suggest_member: "Suggest a member"
|
||||
no_members: "There are no members yet."
|
||||
|
||||
conversations:
|
||||
index:
|
||||
|
|
|
|||
Loading…
Reference in a new issue