social_stream-presence 1.1.0 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/images/chat-off.png +0 -0
  3. data/app/assets/images/chat-on.png +0 -0
  4. data/app/assets/javascripts/jquery.ui.chatbox.sstreampresence.js +3 -5
  5. data/app/assets/javascripts/presence_XmppClient.js.erb +6 -2
  6. data/app/assets/javascripts/presence_uiManager.js.erb +1 -1
  7. data/app/assets/javascripts/presence_windowManager.js +1 -1
  8. data/app/assets/stylesheets/social_stream/presence/_toolbar-chat.css.sass +65 -0
  9. data/app/assets/stylesheets/social_stream/presence/_wrapper-chatBox.css.sass +25 -0
  10. data/app/assets/stylesheets/social_stream/responsive/_responsive-1200px-min.css.sass +9 -0
  11. data/app/assets/stylesheets/social_stream/responsive/_responsive-767px-max.css.sass +16 -0
  12. data/app/assets/stylesheets/social_stream/responsive/_responsive-768px-979px.css.sass +9 -0
  13. data/app/assets/stylesheets/social_stream-presence.css.sass +9 -0
  14. data/app/overrides/settings/_index/add_chat.html.erb.deface +6 -0
  15. data/app/overrides/toolbar/_home/add_chat.html.erb.deface +3 -0
  16. data/app/overrides/toolbar/_profile/add_chat.html.erb.deface +4 -0
  17. data/app/views/chat/_contacts.html.erb +1 -1
  18. data/app/views/chat/_index.html.erb +126 -94
  19. data/app/views/settings/_chat.html.erb +23 -0
  20. data/config/locales/en.yml +5 -5
  21. data/config/locales/es.yml +5 -5
  22. data/lib/generators/social_stream/presence/install_generator.rb +2 -3
  23. data/lib/social_stream/presence/engine.rb +0 -11
  24. data/lib/social_stream/presence/version.rb +1 -1
  25. data/lib/social_stream-presence.rb +0 -10
  26. data/social_stream-presence.gemspec +2 -2
  27. data/spec/views/settings_spec.rb +41 -0
  28. metadata +32 -86
  29. data/app/assets/stylesheets/TresEnRaya.css +0 -57
  30. data/app/assets/stylesheets/chat.css.scss +0 -521
  31. data/app/assets/stylesheets/social_stream-presence.css +0 -5
  32. data/app/views/chat/_settings.html.erb +0 -34
  33. data/lib/social_stream/views/settings/presence.rb +0 -20
  34. data/lib/social_stream/views/toolbar/presence.rb +0 -28
  35. data/spec/demo/.gitignore +0 -5
  36. data/spec/demo/.rspec +0 -1
  37. data/spec/demo/README +0 -261
  38. data/spec/demo/Rakefile +0 -7
  39. data/spec/demo/app/assets/images/rails.png +0 -0
  40. data/spec/demo/app/assets/javascripts/application.js +0 -9
  41. data/spec/demo/app/assets/stylesheets/application.css +0 -7
  42. data/spec/demo/app/controllers/application_controller.rb +0 -3
  43. data/spec/demo/app/helpers/application_helper.rb +0 -2
  44. data/spec/demo/app/mailers/.gitkeep +0 -0
  45. data/spec/demo/app/models/.gitkeep +0 -0
  46. data/spec/demo/app/views/layouts/application.html.erb +0 -14
  47. data/spec/demo/autotest/discover.rb +0 -2
  48. data/spec/demo/config/application.rb +0 -41
  49. data/spec/demo/config/boot.rb +0 -6
  50. data/spec/demo/config/database.yml +0 -25
  51. data/spec/demo/config/environment.rb +0 -5
  52. data/spec/demo/config/environments/development.rb +0 -27
  53. data/spec/demo/config/environments/production.rb +0 -54
  54. data/spec/demo/config/environments/test.rb +0 -39
  55. data/spec/demo/config/initializers/backtrace_silencers.rb +0 -7
  56. data/spec/demo/config/initializers/inflections.rb +0 -10
  57. data/spec/demo/config/initializers/mime_types.rb +0 -5
  58. data/spec/demo/config/initializers/secret_token.rb +0 -7
  59. data/spec/demo/config/initializers/session_store.rb +0 -8
  60. data/spec/demo/config/initializers/wrap_parameters.rb +0 -12
  61. data/spec/demo/config/locales/en.yml +0 -5
  62. data/spec/demo/config/routes.rb +0 -58
  63. data/spec/demo/config.ru +0 -4
  64. data/spec/demo/db/seeds.rb +0 -7
  65. data/spec/demo/doc/README_FOR_APP +0 -2
  66. data/spec/demo/lib/tasks/.gitkeep +0 -0
  67. data/spec/demo/log/.gitkeep +0 -0
  68. data/spec/demo/public/404.html +0 -26
  69. data/spec/demo/public/422.html +0 -26
  70. data/spec/demo/public/500.html +0 -26
  71. data/spec/demo/public/favicon.ico +0 -0
  72. data/spec/demo/public/index.html +0 -241
  73. data/spec/demo/public/robots.txt +0 -5
  74. data/spec/demo/script/rails +0 -6
  75. data/spec/demo/spec/spec_helper.rb +0 -27
  76. data/spec/demo/test/fixtures/.gitkeep +0 -0
  77. data/spec/demo/test/functional/.gitkeep +0 -0
  78. data/spec/demo/test/integration/.gitkeep +0 -0
  79. data/spec/demo/test/performance/browsing_test.rb +0 -12
  80. data/spec/demo/test/test_helper.rb +0 -13
  81. data/spec/demo/test/unit/.gitkeep +0 -0
  82. data/spec/demo/vendor/assets/stylesheets/.gitkeep +0 -0
  83. data/spec/demo/vendor/plugins/.gitkeep +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b989789ea5b81aeb2924972e849e7c584ee67318
4
+ data.tar.gz: a7cfd170446b4294244e64276d804a9c95a6c071
5
+ SHA512:
6
+ metadata.gz: da40366468ed6a328ce3ef50d434142c988cf837e95a1e24faec5b3bead99b6552148199571d2e4709dd8fb653ee0347ecd8aecfb3e9619a40f3d003310c6068
7
+ data.tar.gz: 383f09363d54f18768b6a2c8c4913535370586d142b5d12651ac240d6b0922922ae02b85d048102e4414682336f54b710d32d6f3c6ba3bdb4c5282be726774ac
Binary file
Binary file
@@ -150,8 +150,7 @@
150
150
  })
151
151
  .appendTo(uiChatboxTitlebar),
152
152
  uiChatboxTitlebarCloseText = $('<span></span>')
153
- .addClass('ui-icon-closethick ' + 'chat-thick ' + 'chat-closethick')
154
- .text('close')
153
+ .addClass('icon_tool16-trash ' + 'chat-thick ' + 'chat-closethick')
155
154
  .appendTo(uiChatboxTitlebarClose),
156
155
  uiChatboxTitlebarMinimize = (self.uiChatboxTitlebarMinimize = $('<a href="#"></a>'))
157
156
  .addClass('ui-corner-all ' +
@@ -172,8 +171,7 @@
172
171
  })
173
172
  .appendTo(uiChatboxTitlebar),
174
173
  uiChatboxTitlebarMinimizeText = $('<span></span>')
175
- .addClass('ui-icon-minusthick ' + 'chat-thick ' + ' chat-minusthick')
176
- .text('minimize')
174
+ .addClass('icon_tool16-less ' + 'chat-thick ' + ' chat-minusthick')
177
175
  .appendTo(uiChatboxTitlebarMinimize),
178
176
 
179
177
  //Video Menu button
@@ -391,4 +389,4 @@
391
389
  }
392
390
  });
393
391
 
394
- }(jQuery));
392
+ }(jQuery));
@@ -236,7 +236,7 @@ PRESENCE.XMPPClient = (function(P,$,undefined){
236
236
  } else if (status == Strophe.Status.AUTHFAIL) {
237
237
  PRESENCE.UTILITIES.log('Strophe authentication fail.');
238
238
  if ((window.sessionStorage)&&(sessionStorage.getItem("ss_user_pass") != null)){
239
- sessionStorage.setItem("ss_user_pass",null);
239
+ sessionStorage.removeItem("ss_user_pass");
240
240
  }
241
241
  disconnectionFlag = true;
242
242
  } else if (status == Strophe.Status.ERROR) {
@@ -290,7 +290,11 @@ PRESENCE.XMPPClient = (function(P,$,undefined){
290
290
 
291
291
  PRESENCE.UIMANAGER.changeChatHeaderTitle(I18n.t('chat.reconnecting'))
292
292
 
293
- connectToChat(user_jid,cookie,null);
293
+ if (authByCookie()){
294
+ connectToChat(user_jid,cookie);
295
+ } else {
296
+ connectToChat(user_jid);
297
+ }
294
298
 
295
299
  reconnectTimer = setTimeout ("PRESENCE.XMPPClient.onReconnect()", 9000);
296
300
 
@@ -565,4 +565,4 @@ PRESENCE.UIMANAGER = (function(P,$,undefined){
565
565
  updateConnectedUsersOfMainChatBox : updateConnectedUsersOfMainChatBox
566
566
  };
567
567
 
568
- }) (PRESENCE, jQuery);
568
+ }) (PRESENCE, jQuery);
@@ -259,7 +259,7 @@ PRESENCE.WINDOW = (function(P,$,undefined){
259
259
 
260
260
  var modifyChatPartialIfMainBox = function(chatPartial){
261
261
  if (mainChatBox != null) {
262
- p = $(chatPartial)
262
+ p = $('<div/>').append(chatPartial);
263
263
  $(p).find(".header").remove();
264
264
  $(p).find(".dropdown dd ul").css("min-width",147);
265
265
  return $(p);
@@ -0,0 +1,65 @@
1
+ #chat_partial
2
+ margin-top: 30px
3
+ .chat_off
4
+ input
5
+ &[type="submit"]
6
+ @extend .pull-rigth
7
+ @extend .btn-blue
8
+ .users_connected
9
+ display: block
10
+ padding-left: 17px
11
+ .user_presence
12
+ display: inline-block
13
+ img
14
+ width: 40px
15
+ .presence_status
16
+ width: 20px
17
+ .chat_wrapper
18
+ @include makeColumn(2, 0)
19
+
20
+ #status,
21
+ #statusList
22
+ dt,
23
+ li
24
+ font-size: 15px
25
+ border-bottom: 1px solid #ccc
26
+ padding-bottom: 7px
27
+ a
28
+ padding: 4px 6px
29
+ text-decoration: none
30
+ &:hover
31
+ background-color: $white
32
+ .badge
33
+ @include size(12px, 12px)
34
+ padding: 0px
35
+ .available
36
+ background-color: $green
37
+ .away
38
+ background-color: $orange
39
+ .dnd
40
+ background-color: $red
41
+ .offline
42
+ background-color: $blue
43
+ #statusList
44
+ @include box-shadow (0px 4px 6px #c4c4c4)
45
+ margin-left: -11px !important
46
+ background-color: $white
47
+ li
48
+ margin: 4px 0px 4px 6px
49
+ a
50
+ &:hover
51
+ text-decoration: none
52
+
53
+ #chat_header_title
54
+ display: inline-block
55
+ #search_chat_contact,
56
+ #search_chat_contact,
57
+ width: 100%
58
+
59
+ .connectChatButton
60
+ @extend .btn
61
+
62
+ .searchChatContacts
63
+ input
64
+ &[type="text"]
65
+ width: 91%
@@ -0,0 +1,25 @@
1
+ @import "jquery.ui.chatbox"
2
+
3
+ .ui-chatbox
4
+ @include border-top-left-radius (5px)
5
+ @mixin box-shadow($gray)
6
+ background: #f2f2f2
7
+ border: 1px solid $grayLighter
8
+ right: 1px
9
+ position: fixed
10
+ z-index: 10000
11
+
12
+ .ui-chatbox-titlebar,
13
+ .ui-widget-content
14
+ width: 98%
15
+
16
+ .ui-chatbox-titlebar
17
+ a
18
+ .icon_tool16-less
19
+ margin-right: 6px
20
+
21
+ .ui-chatbox-input
22
+ border: none
23
+ textarea
24
+ border: 1px solid $grayLight
25
+ height: 22px
@@ -0,0 +1,9 @@
1
+ //
2
+ // Responsive: Large desktop and up
3
+ // --------------------------------------------------
4
+
5
+
6
+ @media (min-width: 1200px)
7
+
8
+ .ui-chatbox
9
+ @include grid-core-span(3, $fluidGridColumnWidth, $fluidGridGutterWidth)
@@ -0,0 +1,16 @@
1
+ //
2
+ // Responsive: Landscape phone to desktop/tablet
3
+ // --------------------------------------------------
4
+
5
+
6
+ @media (max-width: 767px)
7
+
8
+ .ui-chatbox
9
+ @include grid-core-span(3, $fluidGridColumnWidth, $fluidGridGutterWidth)
10
+
11
+ // UP TO LANDSCAPE PHONE
12
+ // ---------------------
13
+
14
+ @media (max-width: 480px)
15
+
16
+
@@ -0,0 +1,9 @@
1
+ //
2
+ // Responsive: Tablet to desktop
3
+ // --------------------------------------------------
4
+
5
+
6
+ @media (min-width: 768px) and (max-width: 1119px)
7
+
8
+ .ui-chatbox
9
+ @include grid-core-span(3, $fluidGridColumnWidth, $fluidGridGutterWidth)
@@ -0,0 +1,9 @@
1
+ /* require_tree
2
+
3
+ @import "social_stream/responsive/responsive-768px-979px"
4
+ @import "social_stream/responsive/responsive-1200px-min"
5
+ @import "social_stream/responsive/responsive-767px-max"
6
+
7
+ @import "social_stream/presence/toolbar-chat"
8
+
9
+ @import "social_stream/presence/wrapper-chatBox"
@@ -0,0 +1,6 @@
1
+ <!-- insert_before "code[erb-loud]:contains('notifications')" -->
2
+
3
+ <% if SocialStream::Presence.enable && current_subject == current_user %>
4
+ <%= render partial: "settings/chat" %>
5
+ <% end %>
6
+
@@ -0,0 +1,3 @@
1
+ <!-- insert_after "code[erb-loud]:contains('toolbar/menu')" -->
2
+
3
+ <%= render partial: 'chat/index' %>
@@ -0,0 +1,4 @@
1
+ <!-- insert_after "code[erb-loud]:contains('toolbar/contacts')" -->
2
+
3
+ <%= render partial: 'chat/index',
4
+ locals: { group: @group } %>
@@ -15,4 +15,4 @@
15
15
  </a>
16
16
  </div>
17
17
  <%end%>
18
- </div>
18
+ </div>
@@ -1,77 +1,104 @@
1
- <% if current_user and current_user.chat_enabled and current_subject.subject_type=="User" %>
2
-
1
+ <% if current_user && current_user.chat_enabled %>
2
+
3
3
  <div id="chat_wrapper">
4
4
 
5
5
  <div id="chat_partial">
6
6
  </div>
7
-
8
- <div id="chat_divs">
9
- <div id="chat_div"></div>
10
- </div>
11
-
12
- <div id="chat_connecting">
13
- <div class="block">
14
- <div class="header">
15
- <%=image_tag("btn/btn_friend.png", :class => "header_icon")%>
16
- <div class="header_text">
17
- <%=t('chat.connecting')%>
18
- </div>
19
- </div>
20
- </div>
21
- </div>
22
-
23
- <div id="chat_connection_off">
24
- <div class="block">
25
- <div class="header">
26
- <%=image_tag("btn/btn_friend.png", :class => "header_icon")%>
27
- <div class="header_text">
28
- <p id="chat_header_title"><%=t('chat.disconnected')%></p>
29
- </div>
30
- </div>
7
+
8
+ <div id="chat_divs">
9
+ <div id="chat_div">
31
10
  </div>
11
+ </div>
12
+
13
+ <section id="chat_connecting">
14
+ <header>
15
+ <%=image_tag("chat-off.png", :class => "header_icon")%>
16
+
17
+ <%=t('chat.connecting')%>
18
+ </header>
19
+ </section>
20
+
21
+ <article id="chat_connection_off">
22
+ <header>
23
+ <%=image_tag("chat-off.png", :class => "header_icon")%>
24
+ <p id="chat_header_title">
25
+ <%=t('chat.disconnected')%>
26
+ </p>
27
+ </header>
28
+
32
29
  <div class="chat_off">
33
30
  <div id="passwordFormChat">
34
- <label for="user_password" class="chatPasswordTitle"><%=t('chat.password')%></label>
35
- <input id="user_password" class="chat_password" type="password"></input>
36
- </div>
37
- <input class="connectChatButton storePass" value="Connect">
38
- </div>
39
- </div>
40
-
41
- <div id="chat_widgets">
42
- <div class="block">
43
- <div class="header">
44
- <%=image_tag("btn/btn_friend.png", :class => "header_icon")%>
45
- <div class="header_text">
46
- <%=t('chat.title')%>
47
- </div>
31
+ <label for="user_password" class="chatPasswordTitle">
32
+ <%=t('chat.password')%>
33
+ </label>
34
+ <input id="user_password" class="chat_password" type="password">
35
+ </input>
48
36
  </div>
37
+ <input type="submit" class="btn storePass connectChatButton" value="Connect">
38
+ </div>
39
+ </article>
40
+
41
+ <div id="chat_widgets">
42
+ <header>
43
+ <%=image_tag("chat-off.png", :class => "header_icon")%>
49
44
 
50
- <div id="status" class="dropdown">
51
- <dt><a href=""><span><%=t('chat.status.choose')%></span></a></dt>
52
- <dd>
53
- <ul id="statusList">
54
- <li><a id="available" href="#" class="option"><img class="flag" src="<%=image_path("status/available.png")%>" alt=""/> <%=t('chat.status.available')%> <span class="value">available</span></a></li>
55
- <li><a id="away" href="#" class="option"><img class="flag" src="<%=image_path("status/away.png")%>" alt=""/> <%=t('chat.status.away')%> <span class="value">away</span></a></li>
56
- <li><a id="dnd" href="#" class="option"><img class="flag" src="<%=image_path("status/dnd.png")%>" alt=""/> <%=t('chat.status.dnd')%> <span class="value">dnd</span></a></li>
57
- <li><a id="offline" href="#" class="option"><img class="flag" src="<%=image_path("status/offline.png")%>" alt=""/> <%=t('chat.status.offline')%> <span class="value">offline</span></a></li>
58
- </ul>
59
- </dd>
60
- </div>
61
-
62
- <div class="searchChatContacts">
63
- <select id="search_chat_contact" class="flexselect">
64
- <option value="">""</option>
65
- </select>
66
- </div>
67
-
45
+ <%=t('chat.title')%>
46
+ </header>
47
+
48
+ <div id="status" class="dropdown">
49
+ <dt>
50
+ <a href="">
51
+ <span>
52
+ <%=t('chat.status.choose')%>
53
+ </span>
54
+ </a>
55
+ </dt>
56
+ <dd>
57
+ <ul id="statusList">
58
+ <li>
59
+ <a id="available" href="#" class="option">
60
+ <span class="badge available">
61
+ </span>
62
+ <%=t('chat.status.available')%>
63
+ </a>
64
+ </li>
65
+ <li>
66
+ <a id="away" href="#" class="option">
67
+ <span class="badge away">
68
+ </span>
69
+ <%=t('chat.status.away')%>
70
+ </a>
71
+ </li>
72
+ <li>
73
+ <a id="dnd" href="#" class="option">
74
+ <span class="badge dnd">
75
+ </span>
76
+ <%=t('chat.status.dnd')%>
77
+ </a>
78
+ </li>
79
+ <li>
80
+ <a id="offline" href="#" class="option">
81
+ <span class="badge offline">
82
+ </span>
83
+ <%=t('chat.status.offline')%>
84
+ </a>
85
+ </li>
86
+ </ul>
87
+ </dd>
68
88
  </div>
69
- </div>
70
-
71
- <div>
72
- <div id="publisherID"></div>
73
- </div>
74
-
89
+
90
+ <div class="searchChatContacts">
91
+ <select id="search_chat_contact" class="flexselect">
92
+ <option value="">
93
+ ""
94
+ </option>
95
+ </select>
96
+ </div>
97
+ </div>
98
+ <div>
99
+ <div id="publisherID">
100
+ </div>
101
+ </div>
75
102
  </div>
76
103
 
77
104
 
@@ -79,45 +106,50 @@
79
106
 
80
107
  //Global variables
81
108
  var cookie = "AuthenticationByCookie>>" + "<%=cookies[Rails.application.config.session_options[:key]]%>";
82
- var BOSH_SERVICE = '<%= SocialStream::Presence.bosh_service || root_url + "http-bind/" %>';
83
- var user_name = '<%=current_user.name%>';
109
+ var BOSH_SERVICE = '<%= SocialStream::Presence.bosh_service || root_url + "http-bind/" %>';
110
+ var user_name = '<%=current_user.name%>';
84
111
  var user_slug = '<%=current_user.slug%>';
85
112
  var user_jid = PRESENCE.XMPPClient.getJidFromSlug('<%=current_user.slug%>');
86
-
113
+
87
114
 
88
115
  $(document).ready(function () {
89
-
90
- //Inicial field
91
- $("#chat_partial").html($("#chat_connecting").html())
92
-
93
- if((PRESENCE.PERSISTENCE.getRestoreUserChatStatus()!="offline")&&(cookie)){
94
- PRESENCE.XMPPClient.connectToChat(user_jid,cookie);
95
- initialTimer = setTimeout("PRESENCE.UIMANAGER.updateChatWindow()", 10000);
96
- } else {
97
- PRESENCE.UIMANAGER.updateChatWindow();
98
- }
99
-
100
- PRESENCE.CORE.init();
101
- });
116
+
117
+ //Inicial field
118
+ $("#chat_connecting").hide();
119
+ $("#chat_connection_off").hide();
120
+ $("#chat_widgets").hide();
121
+ $("#statusList").hide();
122
+ $("#chat_partial").html($("#chat_connecting").html())
123
+
124
+ if((PRESENCE.PERSISTENCE.getRestoreUserChatStatus()!="offline")&&(cookie)){
125
+ if (PRESENCE.XMPPClient.authByCookie()) {
126
+ PRESENCE.XMPPClient.connectToChat(user_jid,cookie);
127
+ } else {
128
+ PRESENCE.XMPPClient.connectToChat(user_jid);
129
+ }
130
+ initialTimer = setTimeout("PRESENCE.UIMANAGER.updateChatWindow()", 10000);
131
+ } else {
132
+ PRESENCE.UIMANAGER.updateChatWindow();
133
+ }
134
+
135
+ PRESENCE.CORE.init();
136
+ });
102
137
 
103
- </script>
138
+ </script>
104
139
 
105
- <% if defined?(flow)!=nil and flow %>
106
140
  <script type="text/javascript">
107
- $(document).ready(function () {
108
- PRESENCE.WINDOW.createMainChatBox();
109
- PRESENCE.WINDOW.addContentToMainChatBox(PRESENCE.WINDOW.modifyChatPartialIfMainBox($("#chat_partial")));
110
- $("#chat_wrapper").find("#chat_partial").remove();
111
- });
112
- </script>
113
- <% end %>
114
-
141
+ $(document).ready(function () {
142
+ PRESENCE.WINDOW.createMainChatBox();
143
+ PRESENCE.WINDOW.addContentToMainChatBox(PRESENCE.WINDOW.modifyChatPartialIfMainBox($("#chat_partial")));
144
+ $("#chat_wrapper").find("#chat_partial").remove();
145
+ });
146
+ </script>
115
147
 
116
- <% if defined?(group)!=nil and group %>
148
+ <% if defined?(group)!=nil and group %>
117
149
  <script type="text/javascript">
118
- var current_group_slug = '<%=group.slug%>';
150
+ var current_group_slug = '<%=group.slug%>';
119
151
  </script>
120
- <% end %>
152
+ <% end %>
121
153
 
122
154
 
123
- <% end %>
155
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <div id="chat_settings" class="accordion-group">
2
+ <header class="accordion-heading">
3
+ <h5>
4
+ <%= link_to t('chat.title'), "javascript:void(0);", class: 'accordion-toggle', "data-toggle" => 'collapse', "data-parent" => "#settings-accordion", "data-target" => "#chat_settings_content" %>
5
+ </h5>
6
+ </header>
7
+
8
+ <div class="content settings_content collapse" id="chat_settings_content">
9
+ <%= form_tag(:controller => "Xmpp", :action => "updateSettings", :method => "get") do %>
10
+ <ul class="settings_block">
11
+ <li>
12
+ <% checked = current_user.chat_enabled %>
13
+ <%= check_box_tag 'enable_chat', true, checked %>
14
+ <%= label_tag(:enable_chat, t('chat.settings.checkbox')) %>
15
+ <div class="actions center">
16
+ <%= hidden_field_tag :settings_section, :chat %>
17
+ <%= submit_tag t('chat.settings.update'), :class => "btn" %>
18
+ </div>
19
+ </li>
20
+ </ul>
21
+ <% end %>
22
+ </div>
23
+ </div>
@@ -1,9 +1,9 @@
1
1
  en:
2
2
  chat:
3
- connecting: "Chat Connecting"
4
- reconnecting: "Chat Reconnecting"
5
- disconnected: "Chat Disconnected"
6
- unableconnect: "Chat Out of Service"
3
+ connecting: "Connecting"
4
+ reconnecting: "Reconnecting"
5
+ disconnected: "Disconnected"
6
+ unableconnect: "Out of Service"
7
7
  title: "Chat"
8
8
  password: "Password"
9
9
  zerousers: "No users connected"
@@ -64,4 +64,4 @@ en:
64
64
  finish: "{{name}} close the game"
65
65
  waiting: Waiting for response...
66
66
  unknown: Unknown response
67
- clientIssue: "{{name}}'s client not support games"
67
+ clientIssue: "{{name}}'s client not support games"
@@ -1,9 +1,9 @@
1
1
  es:
2
2
  chat:
3
- connecting: "Chat Conectando"
4
- reconnecting: "Chat Reconectando"
5
- disconnected: "Chat Desconectado"
6
- unableconnect: "Chat Fuera de servicio"
3
+ connecting: "Conectando"
4
+ reconnecting: "Reconectando"
5
+ disconnected: "Desconectado"
6
+ unableconnect: "Fuera de servicio"
7
7
  title: "Chat"
8
8
  password: "Contraseña"
9
9
  zerousers: "No hay contactos conectados"
@@ -64,4 +64,4 @@ es:
64
64
  finish: "{{name}} ha cerrado el juego"
65
65
  waiting: Esperando respuesta...
66
66
  unknown: Respuesta desconocida
67
- clientIssue: "El cliente de {{name}} no tiene juegos"
67
+ clientIssue: "El cliente de {{name}} no tiene juegos"
@@ -21,8 +21,7 @@ class SocialStream::Presence::InstallGenerator < Rails::Generators::Base
21
21
  end
22
22
 
23
23
  def require_stylesheets
24
- inject_into_file 'app/assets/stylesheets/application.css',
25
- " *= require social_stream-presence\n",
26
- :before => ' *= require_tree .'
24
+ append_file 'app/assets/stylesheets/social_stream.css.sass',
25
+ "@import social_stream-presence\n"
27
26
  end
28
27
  end
@@ -1,17 +1,6 @@
1
1
  module SocialStream
2
2
  module Presence
3
3
  class Engine < Rails::Engine
4
- initializer "social_stream-presence.views.settings" do
5
- SocialStream::Views::Settings.module_eval do
6
- include SocialStream::Views::Settings::Presence
7
- end
8
- end
9
-
10
- initializer "social_stream-presence.views.toolbar" do
11
- SocialStream::Views::Toolbar.module_eval do
12
- include SocialStream::Views::Toolbar::Presence
13
- end
14
- end
15
4
  end
16
5
  end
17
6
  end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Presence
3
- VERSION = "1.1.0"
3
+ VERSION = "2.0.0.beta1"
4
4
  end
5
5
  end
@@ -1,16 +1,6 @@
1
1
  require 'social_stream-base'
2
2
 
3
3
  module SocialStream
4
- module Views
5
- module Settings
6
- autoload :Presence, 'social_stream/views/settings/presence'
7
- end
8
-
9
- module Toolbar
10
- autoload :Presence, 'social_stream/views/toolbar/presence'
11
- end
12
- end
13
-
14
4
  module Presence
15
5
  autoload :VERSION, 'social_stream/presence/version'
16
6
 
@@ -5,7 +5,7 @@ require "social_stream/presence/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "social_stream-presence"
7
7
  s.version = SocialStream::Presence::VERSION
8
- s.authors = ["Aldo Gordillo"]
8
+ s.authors = ["Aldo Gordillo", "GING"]
9
9
  s.email = ["agordillos@gmail.com"]
10
10
  s.homepage = "https://github.com/ging/social_stream/wiki/Getting-Started-With-Social-Stream-Presence"
11
11
  s.summary = "Presence capabilities for Social Stream, the core for building social network websites."
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency('social_stream-base', '~> 1.1.0')
22
+ s.add_runtime_dependency('social_stream-base', '~> 2.0.0.beta1')
23
23
 
24
24
  s.add_runtime_dependency "xmpp4r"
25
25