social_stream-base 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -91,11 +91,12 @@ $(function() {
91
91
  //show only the text fields for new comment if there are any comment to the post
92
92
  $(".activity_new_comment").each(function(){
93
93
  if ($.trim($(this).siblings(".activity_comments").text()) != ""){
94
- $(this).addClass("comment_shown");
95
94
  $(this).show();
96
95
  }
97
96
  });
98
97
  $(".activities_comment_btn").hide();
98
+ $(".actor_name_new_comment").hide();
99
+ $(".actor_logo_new_comment").hide();
99
100
 
100
101
  //if there are 4 or more commments we only show the last 2 and a link to show the rest
101
102
  $(".activity_comments").each(function(){
@@ -117,9 +118,16 @@ showAllComments = function(id){
117
118
  };
118
119
 
119
120
  //usa livequery para usar el javascript luego de una accion con AJAX
120
- $(".input_new_comments").live("click",function(){
121
+ $(".input_new_comments").live("click", function(){
121
122
  $(".activities_comment_btn").hide();
123
+ $(".new_comment").removeClass("new_comment_shown");
124
+ $(".actor_name_new_comment").hide();
125
+ $(".actor_logo_new_comment").hide();
122
126
  $(this).parent(".new_comment").children(".activities_comment_btn").show();
127
+ $(this).parent(".new_comment").addClass("new_comment_shown");
128
+ $(this).parents(".activity_new_comment").find(".actor_name_new_comment").show();
129
+ $(this).parents(".activity_new_comment").find(".actor_logo_new_comment").show();
130
+ return false;
123
131
  });
124
132
 
125
133
  //javascript for tocomment option
@@ -23,14 +23,14 @@
23
23
  .activity { text-align:left; display: block; vertical-align: top; padding: 10px 0px 5px 0px;
24
24
  display: inline-block; color: #000; font-size: 13px; color: #2A3890;border-bottom:1px solid #E9E9E9;}
25
25
  .actor_logo { width: 38px; padding: 8px 0px 5px 5px; display: inline-block; vertical-align: top;}
26
- .activity_content { padding: 8px 0px 0px 0px; display: inline-block; color: #000; width: 89%;}
26
+ .activity_content { padding: 0px; display: inline-block; color: #000; width: 89%;}
27
27
  .actor_name {font-size: 13px;}
28
28
  .actor_name a{font-weight: bold;}
29
29
  .post a { color: #2A3890;}
30
30
 
31
31
  /***************** ACTIVITY OPTIONS ***/
32
32
  .activity_options { color: #2A3890; font-size: 10px; display: inline-block;}
33
- .actor_name-activity_objects{ font-weight: bold; color: #2A3890; font-size:12px;}
33
+ .actor_name-activity_objects, .actor_name_new_comment{ font-weight: bold; color: #2A3890; font-size:12px; margin: 5px 0px;}
34
34
  .activity_objects{padding-bottom:5px;}
35
35
  .subactivity_objects{ color: #000; font-weight:normal; font-size:11px;}
36
36
  .post_time_ago { color: #6c6d6f;}
@@ -42,6 +42,7 @@
42
42
  .activity_options .icon_blue{ padding-left:5px; list-style-image:url("/images/point_blue.png");
43
43
  list-style-position:inside;}
44
44
 
45
+ .security, .post_time_ago, .verb_comment, .verb_like, .verb_comment, .verb_delete{ display: inline-block;}
45
46
 
46
47
 
47
48
  /************* ACTIVITY - FOOTER *********/
@@ -58,7 +59,7 @@
58
59
 
59
60
  .activity_new_comment{ font-size: 11px; padding-left: 5px; background: #deeff8;
60
61
  border: thin solid #D4E4E4; padding-top: 3px; padding-bottom: 3px;display:none;}
61
- .actor_logo_subactivity { width: 40px; padding: 5px 3px 5px 2px; display: inline-block;
62
+ .actor_logo_subactivity, .actor_logo_new_comment{ width: 40px; padding: 5px 3px 5px 2px; display: inline-block;
62
63
  vertical-align: top;}
63
64
  .input_new_comments{ border:1px solid #BDC7D8; width:98%; padding: 2px; color:#2A3890;}
64
65
  .subactivity{ font-size: 11px; padding: 0px 5px 0px 5px; background: #deeff8;
@@ -71,7 +72,8 @@
71
72
 
72
73
  .hide_show_comments{font-size: 11px; padding-left: 5px; background: #deeff8;
73
74
  border: thin solid #D4E4E4; width:100%; padding-top: 3px; padding-bottom: 3px;}
74
- .new_comment{ display: inline-block; padding-top: 19px; width: 410px;}
75
+ .new_comment{ width: 465px;}
76
+ .new_comment_shown{ width: 410px;}
75
77
  /*********** DROP DOWN**********/
76
78
  #security_chzn .chzn-choices {
77
79
  padding-left: 20px;
@@ -7,9 +7,11 @@ module ContactsHelper
7
7
  if c.reflexive?
8
8
  t('subject.this_is_you')
9
9
  else
10
- link_to c.status,
10
+ link_to(c.status,
11
11
  edit_contact_path(c),
12
- :title => t("contact.#{ c.action }.title", :name => c.receiver.name)
12
+ :title => t("contact.#{ c.action }.title", :name => c.receiver.name)) +
13
+ "<br/>".html_safe +
14
+ link_to(t('actor.delete'), contact_path(c), :action => :destroy, :confirm => t('actor.confirm_delete'), :remote => true)
13
15
  end
14
16
 
15
17
  end
data/app/models/tie.rb CHANGED
@@ -131,7 +131,7 @@ class Tie < ActiveRecord::Base
131
131
  end
132
132
 
133
133
  def relation_belongs_to_sender
134
- errors.add(:relation, "Relation must belong to sender") unless
134
+ errors.add(:relation, "must belong to sender") unless
135
135
  contact.sender_id == relation.actor_id
136
136
  end
137
137
  end
@@ -0,0 +1,83 @@
1
+ <% content_for :javascript do %>
2
+ $(function() {
3
+ /**
4
+ * the element
5
+ */
6
+ var $ui = $('#form_filter');
7
+ var $ui_really = $('#ul_filter');
8
+ /**
9
+ * on focus and on click display the dropdown,
10
+ * and change the arrow image
11
+ */
12
+ /*$ui.find('.sb_down').bind('focus click',function()*/
13
+ $ui.find('.sb_down').bind('mouseover',function()
14
+ {
15
+ $ui.find('.sb_down')
16
+ .addClass('sb_up')
17
+ .removeClass('sb_down')
18
+ .andSelf()
19
+ .find('.sb_dropdown')
20
+ .show();
21
+ /*$ui.find('.sb_up')
22
+ .hide();*/
23
+ });
24
+
25
+ /**
26
+ * on mouse leave hide the dropdown,
27
+ * and change the arrow image
28
+ */
29
+
30
+ $ui_really.bind('mouseleave',function(){
31
+
32
+ $ui.find('.sb_up')
33
+ .addClass('sb_down')
34
+ .removeClass('sb_up')
35
+ .andSelf()
36
+ .find('.sb_dropdown')
37
+ .hide();
38
+ /*$ui.find('.sb_down')
39
+ .show();*/
40
+ });
41
+
42
+ /**
43
+ * selecting all checkboxes
44
+ */
45
+ $ui.find('.sb_dropdown').find('label[for="all"]').prev().bind('click',function(){
46
+ $(this).parent().siblings().find(':checkbox').attr('checked',this.checked).attr('disabled',this.checked);
47
+ });
48
+ });
49
+ <% end %>
50
+
51
+ <div id="filter_div">
52
+ <%= form_tag "/activities/documents", :method => :post ,:id=> 'form_filter', :class => "tie_form",:remote=> true do %>
53
+ <span class="sb_down">Filter</span>
54
+ <ul class="sb_dropdown" style="display:none;" id="ul_filter">
55
+
56
+ <li>
57
+ <%= check_box_tag 'types', 'Documents', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
58
+ <label for="<%=t('activity.view.documents')%>"><%=t('activity.view.documents')%></label>
59
+ </li>
60
+ <li>
61
+ <%= check_box_tag 'types', 'Audio', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
62
+ <label for="t('activity.view.audio')"><%=t('activity.view.audio')%></label>
63
+ </li>
64
+ <li>
65
+ <%= check_box_tag 'types', 'Event', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
66
+ <label for="<%=t('activity.view.event')%>"><%=t('activity.view.event')%></label>
67
+ </li>
68
+ <li>
69
+ <%= check_box_tag 'types', 'Picture', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
70
+ <label for="<%=t('activity.view.photos')%>"><%=t('activity.view.photos')%></label>
71
+ </li>
72
+ <li>
73
+ <%= check_box_tag 'types', 'Post', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
74
+ <label for="<%=t('activity.view.post')%>"><%=t('activity.view.post')%></label>
75
+ </li>
76
+ <li>
77
+ <%= check_box_tag 'types', 'Video', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
78
+ <label for="<%=t('activity.view.video')%>"><%=t('activity.view.video')%></label>
79
+ </li>
80
+ </ul>
81
+ <% end %>
82
+ </div>
83
+
@@ -1,15 +1,18 @@
1
1
  <div class="activity_options">
2
- <ul class="activity_options" >
3
2
  <% if user_signed_in? %>
4
- <li><div class="security"><%= image_tag('btn/btn_security.png', :title => activity.audience_in_words(current_subject)) %></div></li>
3
+ <div class="security"><%= image_tag('btn/btn_security.png', :title => activity.audience_in_words(current_subject)) %></div>
5
4
  <% end %>
6
- <li><div class="post_time_ago"><%= t('time.ago', :time => time_ago_in_words(activity.created_at)) %></div></li>
5
+ <div class="post_time_ago"><%= t('time.ago', :time => time_ago_in_words(activity.created_at)) %></div>
7
6
  <% if activity.is_root? && user_signed_in? %>
8
- <li><div class="verb_comment"> · <%= link_to t('activity.to_comment'), "#", :class => "to_comment" %> </div></li>
7
+ <div class="verb_comment"> · <%= link_to t('activity.to_comment'), "#", :class => "to_comment" %> </div>
9
8
  <% end %>
10
- <li><div class="verb_like" id="like_<%= dom_id(activity) %>"> · <%= link_like(activity)%></div></li>
9
+ <div class="verb_like" id="like_<%= dom_id(activity) %>"> · <%= link_like(activity)%></div>
11
10
  <% if activity.delete_object_by?(current_subject) %>
12
- <li><div class="verb_delete"> · <%= link_to t('activity.delete'), activity.direct_object , :confirm => t('confirm_delete', :scope => activity.direct_object.class.to_s.underscore), :method => :delete, :remote => true %> </div></li>
11
+ <div class="verb_delete">
12
+ · <%= link_to t('activity.delete'), activity.direct_object , :confirm => t('confirm_delete',
13
+ :scope => activity.direct_object.class.to_s.underscore), :method => :delete,
14
+ :remote => true %>
15
+ </div>
13
16
  <% end %>
14
17
  </ul>
15
18
  </div>
@@ -1,9 +1,13 @@
1
1
  <% if user_signed_in? && current_subject.can_comment?(activity) %>
2
2
  <div class="activity_new_comment">
3
- <div class="actor_logo_subactivity">
3
+ <div class="actor_logo_new_comment">
4
4
  <%= image_tag(current_subject.logo.url(:actor),
5
5
  :alt => current_subject.name)%>
6
6
  </div>
7
+ <div class= "activity_content">
8
+ <div class="actor_name_new_comment">
9
+ <%= current_subject.name %>
10
+ </div>
7
11
  <%= form_for Comment.new(:text => t('comment.input'),
8
12
  :_contact_id =>
9
13
  current_subject.contact_to!(activity.receiver).id,
@@ -12,26 +16,23 @@
12
16
  :html => { :class => "new_comment", :id => "new_comment"+dom_id(activity) },
13
17
  :remote => true do |f| %>
14
18
 
15
- <%= f.hidden_field :_contact_id %>
16
- <%= f.hidden_field :_activity_parent_id %>
19
+ <%= f.hidden_field :_contact_id %>
20
+ <%= f.hidden_field :_activity_parent_id %>
21
+
22
+ <%= f.text_field :text, :class =>"input_new_comments", :id => "comment_text_"+dom_id(activity) %>
17
23
 
18
- <%= f.text_field :text, :class =>"input_new_comments", :id => "comment_text_"+dom_id(activity) %>
19
-
20
- <div class="activities_comment_btn">
21
- <div class="activities_security"></div>
22
- <%= f.submit t('share'), :class =>"myButtonBlue submitActivity", :id => "comment_submit_"+dom_id(activity) %>
23
- </div>
24
- <% end %>
24
+ <div class="activities_comment_btn">
25
+ <div class="activities_security"></div>
26
+ <%= f.submit t('share'), :class =>"myButtonBlue submitActivity", :id => "comment_submit_"+dom_id(activity) %>
27
+ </div>
28
+ <% end %>
25
29
  </div>
30
+ </div>
26
31
  <% end %>
27
32
 
28
33
  <%= javascript_tag do %>
29
34
  $(document).ready(function() {
30
35
  $("#comment_text_<%= dom_id(activity) %>").Watermark("<%= I18n.t('comment.input') %>","#666");
31
- activate_anti_rebounds();
32
- $(".input_new_comments").blur(function(){
33
- $(".activity_new_comment").hide();
34
- $(".comment_shown").show();
35
- });
36
+ activate_anti_rebounds();
36
37
  });
37
38
  <% end %>
@@ -6,6 +6,10 @@
6
6
  <%= render :partial=> "personal"%>
7
7
  <%end%>
8
8
 
9
+ <% if @profile.subject.subject_type == 'Event' %>
10
+ <%= render :partial=> "outline", :locals => {:profile => @profile} %>
11
+ <% end %>
12
+
9
13
  <% if (!is_contact_empty?) or(is_owner?)%>
10
14
  <%= render :partial=> "contact"%>
11
15
  <%end%>
@@ -0,0 +1,16 @@
1
+ <div class="block" id="manage_settings">
2
+ <div class="header">
3
+ <div class="header_text">
4
+ <%= t('settings.manage.name')%>
5
+ </div>
6
+ <div class="header_icon_right">
7
+ <%= link_to image_tag('btn/edit.png'), contacts_path %>
8
+ </div>
9
+ </div>
10
+ <div class="content" id="contact_settings_briefing">
11
+ <div class="form_row">
12
+ <%= t('settings.manage.briefing')%>
13
+ </div>
14
+ </div>
15
+ </div>
16
+
@@ -9,3 +9,4 @@
9
9
  <% if current_subject.respond_to? :authentication_token%>
10
10
  <%= render :partial => "api_key" %>
11
11
  <% end %>
12
+ <%= render :partial => "contacts" %>
@@ -14,3 +14,10 @@
14
14
  <%= link_to image_tag(subject.logo.url, :alt => subject.name , :size => "119x119"), subject %>
15
15
  <% end %>
16
16
  </div>
17
+ <% if subject.subject_type == 'Event' %>
18
+ <% @founder = Actor.normalize(subject.founder_id) %>
19
+ <div id="founder">
20
+ <div id="created"><%=t('actor.created')%></div>
21
+ <div id="thumb"><%= link_to(image_tag(@founder.logo.url(:representation), :width => 20, :height => 20, :class => 'menu_icon', :id=> 'current_user_avatar_img'), @founder.subject ) %></div>
22
+ </div>
23
+ <% end %>
@@ -10,7 +10,14 @@
10
10
  <div class="block space_center">
11
11
  </div>
12
12
 
13
- <%= render :partial => 'subjects/contacts', :locals => { :subject => subject } %>
13
+ <% if subject.subject_type == 'Event' %>
14
+ <% subject.relation_customs.each do |temp| %>
15
+ <%= render :partial => 'toolbar/organizer', :locals => { :subject => subject,:tie=> temp } %>
16
+ <% end %>
17
+ <%= render :partial => 'toolbar/suscribed', :locals => { :subject => subject } %>
18
+ <% else %>
19
+ <%= render :partial => 'subjects/contacts', :locals => { :subject => subject } %>
20
+ <% end %>
14
21
 
15
22
  <div class="block space_center">
16
23
  </div>
@@ -55,32 +55,10 @@ en:
55
55
  post:
56
56
  title:
57
57
  other_wall: "%{sender} → %{receiver}"
58
- avatar:
59
- crop_image: "Crop the uploaded image"
60
- crop_submit: "Crop image"
61
- destroy: "Delete"
62
- destroy_sure: "Are you sure you wan't to delete the selected avatar?"
63
- error:
64
- no_file: "You have to select a file"
65
- no_image_file: "The file you uploaded isn't valid, it must be an image file"
66
- list: "You have these avatars"
67
- new: "Create a new avatar"
68
- new_short: "New avatar"
69
- no_avatars: "You haven't got any avatar, plesase create a new one."
70
- one: "Avatar"
71
- other: "Avatars"
72
- original: "Original image"
73
- preview: "Preview"
74
- profile_change: "Change your avatar"
75
- set_default: "Set as default"
76
- set_default_sure: "Are you sure you wan't to set this avatar as default?"
77
- text:
78
- new: "... or upload a new one"
79
- use: "Use your saved avatars ..."
80
- upload: "Upload"
81
58
  browse: "Browse"
82
59
  button:
83
60
  cancel: "Cancel"
61
+ create: "Create"
84
62
  save: "Save"
85
63
  update: "Update"
86
64
  cleditor:
@@ -246,6 +224,8 @@ en:
246
224
  form:
247
225
  title: "Post"
248
226
  title: "Posts"
227
+ preposition:
228
+ and: "and"
249
229
  profile:
250
230
  one: "Profile"
251
231
  age: "Age"
@@ -351,6 +331,10 @@ en:
351
331
  error: "Some errors raised when saving your changes"
352
332
  for: "Settings for"
353
333
  main: "Main settings"
334
+ manage:
335
+ name: "Admin Contacs"
336
+ briefing: "Settings contacts preferences"
337
+ explanation: "Change contacts permissions"
354
338
  one: "Settings"
355
339
  success: "Your settings where correctly changed"
356
340
  api_key:
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.9.10".freeze
3
+ VERSION = "0.9.11".freeze
4
4
  end
5
5
  end
@@ -40,7 +40,7 @@ namespace :db do
40
40
  dimensions = Avatar.get_image_dimensions(avatar)
41
41
  l = Avatar.new(:actor => i.actor,:logo => File.open(avatar), :name => File.basename(avatar), :crop_x => 0, :crop_y => 0, :crop_w => dimensions[:width], :crop_h => dimensions[:height] )
42
42
  l.active = true
43
- l.save
43
+ l.save!
44
44
  end
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-base
3
3
  version: !ruby/object:Gem::Version
4
- hash: 47
4
+ hash: 45
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 10
10
- version: 0.9.10
9
+ - 11
10
+ version: 0.9.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - GING - DIT - UPM
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-28 00:00:00 +02:00
19
+ date: 2011-09-29 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -728,6 +728,7 @@ files:
728
728
  - app/views/activities/_activity.html.erb
729
729
  - app/views/activities/_child.html.erb
730
730
  - app/views/activities/_comments.html.erb
731
+ - app/views/activities/_filter.html.erb
731
732
  - app/views/activities/_index.html.erb
732
733
  - app/views/activities/_new.html.erb
733
734
  - app/views/activities/_options.html.erb
@@ -868,6 +869,7 @@ files:
868
869
  - app/views/search/index.html.erb
869
870
  - app/views/search/index.js.erb
870
871
  - app/views/settings/_api_key.html.erb
872
+ - app/views/settings/_contacts.html.erb
871
873
  - app/views/settings/_index.html.erb
872
874
  - app/views/settings/_notifications.html.erb
873
875
  - app/views/settings/index.html.erb
@@ -924,7 +926,6 @@ files:
924
926
  - lib/social_stream/test_helpers/controllers.rb
925
927
  - lib/social_stream/toolbar_config/base.rb
926
928
  - lib/tasks/db/populate.rake
927
- - lib/tasks/resque.rake
928
929
  - lib/tasks/workers.rake
929
930
  - social_stream-base.gemspec
930
931
  - spec/controllers/comments_controller_spec.rb
@@ -1,3 +0,0 @@
1
- require "resque/tasks"
2
-
3
- task "resque:setup" => :environment