social_stream-events 2.0.0.beta2 → 2.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e596aa40ebd3027ede9e2444bfbc273597fadef
4
- data.tar.gz: acedc480c8feea85f71afcb1336ce60b3bdb1750
3
+ metadata.gz: 413862f99b52759c18367e61802d60a14ead62b5
4
+ data.tar.gz: 69d95c4cbc56b11cf520670ab9c29ec3f5940945
5
5
  SHA512:
6
- metadata.gz: 79bef9997ef7ddb5e09992398fe975a982253f92e06f4a53d7017967e9176a2651c41a6be8d45018692bb3b809c1e0fd5abcf023f6b41c7fee97f4dfbdfc3e67
7
- data.tar.gz: c2cfee3edba3b1e9450646cf6dc71b680601a2a2ca279af86da47e822c5231f94fb34daa3ec72df592305ccf313fa21ba09ac151f182a0bb98ecc89c06886d0e
6
+ metadata.gz: 6cbd48dc9da1cb77fd8b95492c0d71254afde71cebf902aee1daef75f6f402eb1df22178d13dff1ade9365f89924a29f7d1e663829314d0ac66eb4bcca29a8d8
7
+ data.tar.gz: 7fff146cd37ff468d3633d06a78755794ba55883b64a4a70cf0bd72132c3b806c2ef8a19ceecebd49421312544f68d75e550c87a0ac942f8e210f45cc4a9298f
@@ -30,7 +30,8 @@ SocialStream.FullCalendar = (function(SS, $, Scheduler, undefined){
30
30
  ignoreTimezone: false,
31
31
  firstDay: 1,
32
32
  eventColor: eventColor,
33
- events: getEvents
33
+ events: getEvents,
34
+ eventClick: eventClick
34
35
  };
35
36
 
36
37
  if (calendar.attr('data-can-create')) {
@@ -79,7 +80,7 @@ SocialStream.FullCalendar = (function(SS, $, Scheduler, undefined){
79
80
 
80
81
  var getEvents = function(start, end, callback) {
81
82
  $.ajax({
82
- url: getCalendarEl().attr('data-events-path'),
83
+ url: getCalendarEl().attr('data-events_path'),
83
84
  dataType: 'json',
84
85
  data: {
85
86
  // our hypothetical feed requires UNIX timestamps
@@ -118,6 +119,17 @@ SocialStream.FullCalendar = (function(SS, $, Scheduler, undefined){
118
119
  Scheduler.form.reset(form.find('.scheduler_form'));
119
120
  };
120
121
 
122
+ // After clicking an event a modal is shown
123
+ var eventClick = function(e) {
124
+ $.ajax({
125
+ url: getCalendarEl().attr('data-events_path') + '/' + e.id,
126
+ dataType: 'html',
127
+ success: function(data) {
128
+ $(data).modal();
129
+ }
130
+ });
131
+ };
132
+
121
133
  callback.register('show',
122
134
  initFullCalendar,
123
135
  initFormModal,
@@ -12,12 +12,15 @@
12
12
  .event,
13
13
  .link
14
14
  .date
15
- width: 48px
16
- .details,
17
- .text
18
- margin-left: 10px
19
- width: 50%
15
+ width: 70px
16
+ margin-left: 0
17
+ .details
20
18
  display: inline-block !important
19
+ width: 100%
20
+ .text
21
+ width: 100%
22
+ margin-left: 0px
23
+
21
24
 
22
25
  #calendar
23
26
  @include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
@@ -55,16 +58,16 @@
55
58
  .event,
56
59
  .link
57
60
  .date
61
+ width: 70px
62
+ margin-left: 0
58
63
  .day,
59
64
  .month
60
65
  font-weight: bold
61
66
  font-size: 15px
62
67
  .poster
63
68
  @include hidden-phone
64
- .details,
65
- .text
66
- width: 40%
67
- margin-left: 7px
69
+
70
+
68
71
 
69
72
 
70
73
 
@@ -21,7 +21,13 @@ class EventsController < ApplicationController
21
21
 
22
22
  def show
23
23
  show! do |format|
24
- format.html { redirect_to polymorphic_path([ @event.post_activity.receiver_subject, Event.new ], :at => @event.start_at.to_i) }
24
+ format.html {
25
+ if request.xhr?
26
+ render partial: 'show_modal'
27
+ else
28
+ redirect_to polymorphic_path([ @event.post_activity.receiver_subject, Event.new ], :at => @event.start_at.to_i)
29
+ end
30
+ }
25
31
  end
26
32
  end
27
33
 
@@ -1,24 +1,26 @@
1
1
  <div class="details">
2
- <div class="title">
2
+ <div class="text">
3
+ <h6>
3
4
  <%= link_to event.title, event %>
4
- </div>
5
+ </h6>
5
6
 
6
- <div class="frequency">
7
- <%= event.frequency_description %>
8
- </div>
7
+ <div class="frequency">
8
+ <%= event.frequency_description %>
9
+ </div>
9
10
 
10
- <%= render partial: 'objects/timeline_description',
11
- object: event,
12
- as: :obj %>
11
+ <%= render partial: 'objects/timeline_description',
12
+ object: event,
13
+ as: :obj %>
13
14
 
14
- <div class="follow">
15
- <div class="follow_sentence">
16
- <%= render :partial => 'activity_actions/follow_sentence',
17
- :locals => { :activity_object => event.activity_object } %>
18
- </div>
19
- <div class="follow_form">
20
- <%= render :partial => 'activity_actions/follow_form',
21
- :locals => { :activity_object => event.activity_object } %>
15
+ <div class="follow">
16
+ <div class="follow_sentence">
17
+ <%= render :partial => 'activity_actions/follow_sentence',
18
+ :locals => { :activity_object => event.activity_object } %>
19
+ </div>
20
+ <div class="follow_form">
21
+ <%= render :partial => 'activity_actions/follow_form',
22
+ :locals => { :activity_object => event.activity_object } %>
23
+ </div>
22
24
  </div>
23
25
  </div>
24
26
  </div>
@@ -0,0 +1,10 @@
1
+ <div class="modal fade">
2
+ <div class="modal-header">
3
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
4
+ <h3><%= @event.title %></h3>
5
+ </div>
6
+ <div class="modal-body">
7
+ <%= render partial: 'event_sidebar',
8
+ object: @event %>
9
+ </div>
10
+ </div>
@@ -1,6 +1,6 @@
1
1
  <% bow = (Time.now - 6.days).beginning_of_week %>
2
2
 
3
- <div class="calendar" id="sidebar_calendar" data-path="<%= polymorphic_path([@current_subject, Event.new])%>" data-start="<%= bow.to_i %>" data-end="<%= (bow + 28.days).to_i %>">
3
+ <div class="calendar" id="sidebar_calendar" data-path="<%= polymorphic_path([profile_or_current_subject, Event.new])%>" data-start="<%= bow.to_i %>" data-end="<%= (bow + 28.days).to_i %>">
4
4
 
5
5
  <%= render partial: 'events/calendar_month',
6
6
  locals: {
@@ -1,56 +1,57 @@
1
+ ---
1
2
  en:
2
3
  activerecord:
3
4
  attributes:
4
5
  event:
5
- title: "Title"
6
- room: "Room"
7
- frequency: "Frequency"
6
+ title: Title
7
+ room: Room
8
+ frequency: Frequency
8
9
  room:
9
- name: "Name"
10
+ name: Name
10
11
  errors:
11
12
  models:
12
13
  room:
13
14
  attributes:
14
15
  name:
15
- taken: "is taken"
16
+ taken: is taken
16
17
  models:
17
- event: "event"
18
- room: "room"
18
+ event: event
19
+ room: room
19
20
  boxy:
20
- close_text: "[close]"
21
+ close_text: '[close]'
21
22
  event:
22
23
  activity_action:
23
- follow: "Follow"
24
+ follow: Follow
24
25
  sentence:
25
- one: "%{followers} follows this"
26
- other: "%{followers} follow this"
27
- unfollow: "Unfollow"
28
- calendar: "Calendar"
29
- confirm_delete: "Delete event?"
26
+ one: '%{followers} follows this'
27
+ other: '%{followers} follow this'
28
+ unfollow: Unfollow
29
+ calendar: Calendar
30
+ confirm_delete: Delete event?
30
31
  modal:
31
- view_in_calendar: "View in calendar"
32
- name: "event"
32
+ view_in_calendar: View in calendar
33
+ name: event
33
34
  new:
34
- title: "New event"
35
- one: "an event"
36
- other: "events"
35
+ title: New event
36
+ one: an event
37
+ other: events
37
38
  popover:
38
- title: "Events on %{date}"
39
+ title: Events on %{date}
39
40
  poster:
40
- button: "Upload"
41
- update: "Upload poster"
41
+ button: Upload
42
+ update: Upload poster
42
43
  title:
43
- one: "Event"
44
- other: "Events"
45
- wall_post: "Published an event: %{title}"
44
+ one: Event
45
+ other: Events
46
+ wall_post: 'Published an event: %{title}'
46
47
  header:
47
48
  icon:
48
- calendar: "Calendar"
49
+ calendar: Calendar
49
50
  room:
50
- confirm_delete: "Delete room?"
51
- delete: "Delete"
51
+ confirm_delete: Delete room?
52
+ delete: Delete
52
53
  settings:
53
- title: "Rooms"
54
- description: "Rooms available for event celebration"
54
+ title: Rooms
55
+ description: Rooms available for event celebration
55
56
  watermark:
56
- name: "New room"
57
+ name: New room
@@ -1,57 +1,57 @@
1
+ ---
1
2
  es:
2
3
  activerecord:
3
4
  attributes:
4
5
  event:
5
- title: "Título"
6
- room: "Espacio"
7
- frequency: "Repetición"
6
+ title: Título
7
+ room: Espacio
8
+ frequency: Repetición
8
9
  room:
9
- name: "Nombre"
10
+ name: Nombre
10
11
  errors:
11
12
  models:
12
13
  room:
13
14
  attributes:
14
15
  name:
15
- taken: "está repetido"
16
+ taken: está repetido
16
17
  models:
17
- event: "evento"
18
- room: "espacio"
18
+ event: evento
19
+ room: espacio
19
20
  boxy:
20
- close_text: "[cerrar]"
21
+ close_text: '[cerrar]'
21
22
  event:
22
23
  activity_action:
23
- follow: "Me lo apunto"
24
+ follow: Me lo apunto
24
25
  sentence:
25
- follow:
26
- one: "%{followers} se ha apuntado esto"
27
- other: "%{followers} se han apuntado esto"
28
- unfollow: "Desapuntar"
29
- calendar: "Calendario"
30
- confirm_delete: "¿Borrar evento?"
26
+ one: '%{followers} follows this'
27
+ other: '%{followers} follow this'
28
+ unfollow: Desapuntar
29
+ calendar: Calendario
30
+ confirm_delete: ¿Borrar evento?
31
31
  modal:
32
- view_in_calendar: "Ver en el calendario"
33
- name: "evento"
32
+ view_in_calendar: Ver en el calendario
33
+ name: evento
34
34
  new:
35
- title: "Nuevo evento"
36
- one: "un evento"
37
- other: "eventos"
35
+ title: Nuevo evento
36
+ one: un evento
37
+ other: eventos
38
38
  popover:
39
- title: "Eventos el %{date}"
39
+ title: Eventos el %{date}
40
40
  poster:
41
- button: "Subir"
42
- update: "Subir cartel"
41
+ button: Subir
42
+ update: Subir cartel
43
43
  title:
44
- one: "Evento"
45
- other: "Eventos"
46
- wall_post: "Publicó un evento: %{title}"
44
+ one: Evento
45
+ other: Eventos
46
+ wall_post: 'Publicó un evento: %{title}'
47
47
  header:
48
48
  icon:
49
- calendar: "Calendar"
49
+ calendar: Calendar
50
50
  room:
51
- confirm_delete: "¿Borrar espacio?"
52
- delete: "Borrar"
51
+ confirm_delete: ¿Borrar espacio?
52
+ delete: Borrar
53
53
  settings:
54
- title: "Espacios"
55
- description: "Salas disponibles para la realización de eventos"
54
+ title: Espacios
55
+ description: Salas disponibles para la realización de eventos
56
56
  watermark:
57
- name: "Nuevo espacio"
57
+ name: Nuevo espacio
@@ -0,0 +1,57 @@
1
+ ---
2
+ zh:
3
+ activerecord:
4
+ attributes:
5
+ event:
6
+ title: Title
7
+ room: Room
8
+ frequency: Frequency
9
+ room:
10
+ name: Name
11
+ errors:
12
+ models:
13
+ room:
14
+ attributes:
15
+ name:
16
+ taken: is taken
17
+ models:
18
+ event: event
19
+ room: room
20
+ boxy:
21
+ close_text: '[close]'
22
+ event:
23
+ activity_action:
24
+ follow: Follow
25
+ sentence:
26
+ one: '%{followers} follows this'
27
+ other: '%{followers} follow this'
28
+ unfollow: Unfollow
29
+ calendar: Calendar
30
+ confirm_delete: Delete event?
31
+ modal:
32
+ view_in_calendar: View in calendar
33
+ name: event
34
+ new:
35
+ title: New event
36
+ one: an event
37
+ other: events
38
+ popover:
39
+ title: Events on %{date}
40
+ poster:
41
+ button: Upload
42
+ update: Upload poster
43
+ title:
44
+ one: Event
45
+ other: Events
46
+ wall_post: 'Published an event: %{title}'
47
+ header:
48
+ icon:
49
+ calendar: Calendar
50
+ room:
51
+ confirm_delete: Delete room?
52
+ delete: Delete
53
+ settings:
54
+ title: Rooms
55
+ description: Rooms available for event celebration
56
+ watermark:
57
+ name: New room
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Events
3
- VERSION = "2.0.0.beta2".freeze
3
+ VERSION = "2.0.0.beta3".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 2.0.0.beta2')
15
+ s.add_runtime_dependency('social_stream-base', '~> 2.0.0.beta3')
16
16
  s.add_runtime_dependency('rails-scheduler', '~> 0.1.1')
17
17
 
18
18
  # Development Gem dependencies
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-events
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta2
4
+ version: 2.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Tapiador
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-18 00:00:00.000000000 Z
12
+ date: 2013-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: social_stream-base
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.0.beta2
20
+ version: 2.0.0.beta3
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0.beta2
27
+ version: 2.0.0.beta3
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rails-scheduler
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -110,6 +110,7 @@ files:
110
110
  - app/views/events/_poster.html.erb
111
111
  - app/views/events/_quick_search_result.html.erb
112
112
  - app/views/events/_search_result.html.erb
113
+ - app/views/events/_show_modal.html.erb
113
114
  - app/views/events/_timeline.html.erb
114
115
  - app/views/events/create.js.erb
115
116
  - app/views/events/destroy.js.erb
@@ -124,6 +125,7 @@ files:
124
125
  - app/views/sidebar/_calendar.html.erb
125
126
  - config/locales/en.yml
126
127
  - config/locales/es.yml
128
+ - config/locales/zh.yml
127
129
  - config/routes.rb
128
130
  - db/migrate/20120330131859_create_social_stream_events.rb
129
131
  - lib/generators/social_stream/events/install_generator.rb