social_stream-presence 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/app/assets/images/games/sfighter/abobo/abobo.png +0 -0
  2. data/app/assets/images/games/sfighter/abobo/abobo_block_81x130x1.png +0 -0
  3. data/app/assets/images/games/sfighter/abobo/abobo_die_156x119x1.png +0 -0
  4. data/app/assets/images/games/sfighter/abobo/abobo_hit_108x120x3.png +0 -0
  5. data/app/assets/images/games/sfighter/abobo/abobo_idle_100x121x3.png +0 -0
  6. data/app/assets/images/games/sfighter/abobo/abobo_kick_137x130x2.png +0 -0
  7. data/app/assets/images/games/sfighter/abobo/abobo_punch_131x170x4.png +0 -0
  8. data/app/assets/images/games/sfighter/abobo/abobo_walk_backward_94x126x6.png +0 -0
  9. data/app/assets/images/games/sfighter/abobo/abobo_walk_forward_94x126x6.png +0 -0
  10. data/app/assets/images/games/sfighter/cvs/cvs_block_69x99x2.png +0 -0
  11. data/app/assets/images/games/sfighter/cvs/cvs_die_150x110x1.png +0 -0
  12. data/app/assets/images/games/sfighter/cvs/cvs_hit_59x103x1.png +0 -0
  13. data/app/assets/images/games/sfighter/cvs/cvs_idle_59x106x6.png +0 -0
  14. data/app/assets/images/games/sfighter/cvs/cvs_kick_156x106x9.png +0 -0
  15. data/app/assets/images/games/sfighter/cvs/cvs_punch_120x104x6.png +0 -0
  16. data/app/assets/images/games/sfighter/cvs/cvs_walk_backward_58x106x5.png +0 -0
  17. data/app/assets/images/games/sfighter/cvs/cvs_walk_forward_58x106x5.png +0 -0
  18. data/app/assets/images/games/sfighter/stage/background1.png +0 -0
  19. data/app/assets/images/games/sfighter/stage/background2.png +0 -0
  20. data/app/assets/images/games/sfighter/stage/background3.png +0 -0
  21. data/app/assets/images/games/sfighter/stage/foreground.png +0 -0
  22. data/app/assets/images/games/sfighter/stage/ground.png +0 -0
  23. data/app/assets/images/games/sfighter/thumbnail.png +0 -0
  24. data/app/assets/images/games/ter/classic_circle.png +0 -0
  25. data/app/assets/images/games/ter/classic_thumbnail.png +0 -0
  26. data/app/assets/images/games/ter/modern_thumbnail.png +0 -0
  27. data/app/assets/images/webcam.png +0 -0
  28. data/app/assets/javascripts/jquery.ui.chatbox.sstreampresence.js +2 -2
  29. data/app/assets/javascripts/presence_XmppClient.js.erb +3 -1
  30. data/app/assets/javascripts/presence_game.js.erb +13 -6
  31. data/app/assets/javascripts/presence_game_comunication.js.erb +83 -13
  32. data/app/assets/javascripts/presence_game_factory.js.erb +47 -0
  33. data/app/assets/javascripts/presence_game_interface.js.erb +143 -53
  34. data/app/assets/javascripts/presence_game_sfighter.js.erb +583 -0
  35. data/app/assets/javascripts/presence_game_ter.js.erb +20 -9
  36. data/app/assets/javascripts/presence_uiManager.js.erb +0 -2
  37. data/app/assets/javascripts/presence_utilities.js +1 -1
  38. data/app/assets/javascripts/presence_videochat.js.erb +5 -0
  39. data/app/assets/javascripts/social_stream-presence.js +1 -0
  40. data/app/assets/stylesheets/chat.css.scss +59 -6
  41. data/config/locales/en.yml +1 -1
  42. data/config/locales/es.yml +1 -1
  43. data/lib/social_stream/presence/version.rb +1 -1
  44. metadata +119 -65
@@ -9,17 +9,25 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
9
9
 
10
10
  //Games variables
11
11
  var game; //Game and player are objects defined in the gamecore.
12
+ var name = "Tic Tac Toe"
12
13
  var player = null;
13
14
  var currentPlayer = null;
14
15
  var playing=true;
15
16
 
17
+
16
18
  //We must define our ACTION object.
17
19
  //The information exchanged between players is performed through the exchange of action type objects.
18
20
  //We can define our own types of actions, with different fields
19
- function action(player,square) {
21
+ //function action(player,square) {
22
+ //this.player = player;
23
+ //this.square = square;
24
+ //this.type = "general";
25
+ //}
26
+
27
+ function action(player,square) {
20
28
  this.player = player;
21
- this.type = "general";
22
29
  this.square = square;
30
+ this.type = "general";
23
31
  }
24
32
 
25
33
  //Html Divs
@@ -99,8 +107,8 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
99
107
  //We can include our own validation conditions here!
100
108
  //The core will invoke this method automatically in the validation process
101
109
  var validateParams = function(myPlayer,myGame,myDivID){
102
- if(myGame.players.lenght < 2){
103
- return new CORE.createValidationResult(false,"This game needs two players at least");
110
+ if(myGame.players.length != 2){
111
+ return new CORE.createValidationResult(false,"This game needs two players");
104
112
  }
105
113
  return new CORE.createValidationResult(true,"Ok");
106
114
  }
@@ -119,7 +127,7 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
119
127
  ///////////////////////////////// * When some player send us a action, the core will invoke the << onActionReceived >> method.
120
128
 
121
129
  var sendAction = function(action){
122
- CORE.sendAction(game.id,game.players,action)
130
+ CORE.sendAction(game,action)
123
131
  return;
124
132
  }
125
133
 
@@ -322,15 +330,13 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
322
330
  var figure = "aspa";
323
331
  }
324
332
 
325
- var path = "/assets/games/ter/modern_circle.png"
326
333
  $(img).attr("src","/assets/games/ter/" + game.options['theme'].toLowerCase() + "_" + figure + ".png");
327
334
  $("#" + containerDivId).append(img);
328
335
  $(img).addClass('tresEnRayaImgTheme' + game.options['theme'])
329
336
 
330
- //Calculate displacement
331
337
  var figureSizePercent = 0.8;
332
- var xdisplacement = -squareDimension*figureSizePercent/2*0.9;
333
- var ydisplacement = 10;
338
+ var xdisplacement = -squareDimension*figureSizePercent/2*0.7;
339
+ var ydisplacement = 13;
334
340
 
335
341
  $(img).width(squareDimension*figureSizePercent)
336
342
  $(img).height(squareDimension*figureSizePercent)
@@ -406,6 +412,10 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
406
412
  }
407
413
 
408
414
  //Getters
415
+ var getName = function(){
416
+ return name
417
+ }
418
+
409
419
  var getGame = function(){
410
420
  return game;
411
421
  }
@@ -425,6 +435,7 @@ PRESENCE.GAME.TER = (function(P,$,undefined){
425
435
 
426
436
  return {
427
437
  init: init,
438
+ getName: getName,
428
439
  validateParams: validateParams,
429
440
  minimumRequirements: minimumRequirements,
430
441
  onActionReceived: onActionReceived
@@ -1,5 +1,3 @@
1
- //= require jquery.watermark
2
- //
3
1
  ////////////////////
4
2
  //Reconnect button interface functions
5
3
  ////////////////////
@@ -1,7 +1,7 @@
1
1
  ////////////////////
2
2
  //Debug functions
3
3
  ////////////////////
4
- var sspresence_debugging=true;
4
+ var sspresence_debugging=false;
5
5
 
6
6
  function log(msg) {
7
7
  if(sspresence_debugging){
@@ -21,6 +21,8 @@ function clickVideoChatButton(slug){
21
21
  }
22
22
 
23
23
  function closeVideoChatWindow(slug){
24
+ //Show games button
25
+ $(getChatBoxButtonForSlug(slug,"games")).show()
24
26
  closeVideoSession(slug);
25
27
  return;
26
28
  }
@@ -29,6 +31,9 @@ function closeVideoChatWindow(slug){
29
31
  var reconnectAttemptsVideo = 1;
30
32
 
31
33
  function openVideoChatWindow(slug){
34
+
35
+ //Hide games button
36
+ $(getChatBoxButtonForSlug(slug,"games")).hide()
32
37
 
33
38
  if (slug in contactsInfo) {
34
39
  var connectionStatus = contactsInfo[slug].videoChatStatus;
@@ -3,5 +3,6 @@
3
3
  //= require strophe.muc
4
4
  //= require jquery.tools.tooltip
5
5
  //= require liquidmetal
6
+ //= require jquery.watermark
6
7
  //= require TB.min
7
8
  //= require_tree .
@@ -81,10 +81,8 @@ div.ui-videobox{
81
81
  height: 0px;
82
82
  border-bottom: 1px solid $separation-color;
83
83
  max-width: 230px;
84
- }
85
-
86
- div.ui-videobox-icon{
87
-
84
+ text-align: center;
85
+ margin: auto;
88
86
  }
89
87
 
90
88
  div.ui-videobox-icon-change{
@@ -131,7 +129,7 @@ p.video-request{
131
129
  }
132
130
 
133
131
  p.game-info{
134
- padding-top: 25%;
132
+ padding-top: 20%;
135
133
  text-align: center;
136
134
  }
137
135
 
@@ -143,6 +141,57 @@ p.game-request{
143
141
  color: $main-color;
144
142
  }
145
143
 
144
+ .game-choices{
145
+ display: inline;
146
+ width: 100%;
147
+ height: 100%;
148
+ text-align: center;
149
+ }
150
+
151
+ div.game-choice {
152
+ float: left;
153
+ position: relative;
154
+ width: 90px;
155
+ height: 90px;
156
+ margin-left: 20px;
157
+ margin-right: 20px;
158
+ margin-top: 20px;
159
+ }
160
+
161
+ div.game-choice-buttonLeft {
162
+ float: left;
163
+ position: relative;
164
+ margin-left: 40px;
165
+ margin-top: 50px;
166
+ }
167
+
168
+ div.game-choice-buttonRight {
169
+ float: left;
170
+ position: relative;
171
+ margin-right: 40px;
172
+ margin-top: 50px;
173
+ }
174
+
175
+ img.game-choice-img{
176
+ width: 90px;
177
+ height: 90px;
178
+ }
179
+
180
+ img.game-choice-button{
181
+ margin-top: 5px;
182
+ width: 30px;
183
+ height: 30px;
184
+ }
185
+
186
+ p.game-name{
187
+ margin-top: 5px;
188
+ text-align: center;
189
+ }
190
+
191
+ a.game-choice-link{
192
+
193
+ }
194
+
146
195
  /* notifications style sheet */
147
196
 
148
197
  div.ui-chatbox-notify{
@@ -192,8 +241,12 @@ p.ui-chatbox-notify-text{
192
241
  }
193
242
 
194
243
  .chat-videothick{
195
- /* display: none; */
196
244
  padding: 1px;
245
+ /*background-image: url("webcam.png");
246
+ background-repeat: no-repeat;
247
+ display: block;
248
+ height: 16px;
249
+ width: 16px; */
197
250
  }
198
251
 
199
252
  .chat-videoPublisherthick{
@@ -52,7 +52,7 @@ en:
52
52
  joinError: "You can't join in the room \n {{errorMsg}}"
53
53
  offline: "You are offline"
54
54
  game:
55
- call: "{{name}} wants to play"
55
+ call: "{{name}} wants to play a {{game}} game"
56
56
  accept: Accept
57
57
  deny: Deny
58
58
  offline: "Unable to connect. You are offline"
@@ -52,7 +52,7 @@ es:
52
52
  joinError: "No se pudo acceder a la sala. \n {{errorMsg}}"
53
53
  offline: "Estás desconectado"
54
54
  game:
55
- call: "{{name}} quiere iniciar una partida"
55
+ call: "{{name}} quiere iniciar una partida de {{game}}"
56
56
  accept: Aceptar
57
57
  deny: Rechazar
58
58
  offline: "Imposible conectar. Estás desconectado"
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Presence
3
- VERSION = "0.10.2"
3
+ VERSION = "0.10.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,80 +1,99 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: social_stream-presence
3
- version: !ruby/object:Gem::Version
4
- version: 0.10.2
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 10
8
+ - 3
9
+ version: 0.10.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Aldo Gordillo
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-03-12 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-03-13 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: social_stream-base
16
- requirement: &84856790 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
25
+ requirements:
19
26
  - - ~>
20
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 17
31
+ - 2
21
32
  version: 0.17.2
22
33
  type: :runtime
23
- prerelease: false
24
- version_requirements: *84856790
25
- - !ruby/object:Gem::Dependency
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
26
36
  name: xmpp4r
27
- requirement: &84856380 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 0
45
+ version: "0"
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *84856380
36
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
37
49
  name: net-ssh
38
- requirement: &84855570 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
39
52
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
58
+ version: "0"
44
59
  type: :runtime
45
- prerelease: false
46
- version_requirements: *84855570
47
- - !ruby/object:Gem::Dependency
60
+ version_requirements: *id003
61
+ - !ruby/object:Gem::Dependency
48
62
  name: net-sftp
49
- requirement: &84855030 !ruby/object:Gem::Requirement
63
+ prerelease: false
64
+ requirement: &id004 !ruby/object:Gem::Requirement
50
65
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ version: "0"
55
72
  type: :runtime
56
- prerelease: false
57
- version_requirements: *84855030
58
- - !ruby/object:Gem::Dependency
73
+ version_requirements: *id004
74
+ - !ruby/object:Gem::Dependency
59
75
  name: ruby-debug19
60
- requirement: &84854560 !ruby/object:Gem::Requirement
76
+ prerelease: false
77
+ requirement: &id005 !ruby/object:Gem::Requirement
61
78
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ segments:
83
+ - 0
84
+ version: "0"
66
85
  type: :development
67
- prerelease: false
68
- version_requirements: *84854560
69
- description: Social Stream Presence provides everything you need for including presence,
70
- instant messaging and video chat services in your social network website, including
71
- a complete chat fully integrated with Social Stream.
72
- email:
86
+ version_requirements: *id005
87
+ description: Social Stream Presence provides everything you need for including presence, instant messaging and video chat services in your social network website, including a complete chat fully integrated with Social Stream.
88
+ email:
73
89
  - agordillos@gmail.com
74
90
  executables: []
91
+
75
92
  extensions: []
93
+
76
94
  extra_rdoc_files: []
77
- files:
95
+
96
+ files:
78
97
  - .gitignore
79
98
  - Gemfile
80
99
  - Rakefile
@@ -94,17 +113,43 @@ files:
94
113
  - app/assets/images/emoticons/present.png
95
114
  - app/assets/images/emoticons/rain.png
96
115
  - app/assets/images/emoticons/sun.png
116
+ - app/assets/images/games/sfighter/abobo/abobo.png
117
+ - app/assets/images/games/sfighter/abobo/abobo_block_81x130x1.png
118
+ - app/assets/images/games/sfighter/abobo/abobo_die_156x119x1.png
119
+ - app/assets/images/games/sfighter/abobo/abobo_hit_108x120x3.png
120
+ - app/assets/images/games/sfighter/abobo/abobo_idle_100x121x3.png
121
+ - app/assets/images/games/sfighter/abobo/abobo_kick_137x130x2.png
122
+ - app/assets/images/games/sfighter/abobo/abobo_punch_131x170x4.png
123
+ - app/assets/images/games/sfighter/abobo/abobo_walk_backward_94x126x6.png
124
+ - app/assets/images/games/sfighter/abobo/abobo_walk_forward_94x126x6.png
125
+ - app/assets/images/games/sfighter/cvs/cvs_block_69x99x2.png
126
+ - app/assets/images/games/sfighter/cvs/cvs_die_150x110x1.png
127
+ - app/assets/images/games/sfighter/cvs/cvs_hit_59x103x1.png
128
+ - app/assets/images/games/sfighter/cvs/cvs_idle_59x106x6.png
129
+ - app/assets/images/games/sfighter/cvs/cvs_kick_156x106x9.png
130
+ - app/assets/images/games/sfighter/cvs/cvs_punch_120x104x6.png
131
+ - app/assets/images/games/sfighter/cvs/cvs_walk_backward_58x106x5.png
132
+ - app/assets/images/games/sfighter/cvs/cvs_walk_forward_58x106x5.png
133
+ - app/assets/images/games/sfighter/stage/background1.png
134
+ - app/assets/images/games/sfighter/stage/background2.png
135
+ - app/assets/images/games/sfighter/stage/background3.png
136
+ - app/assets/images/games/sfighter/stage/foreground.png
137
+ - app/assets/images/games/sfighter/stage/ground.png
138
+ - app/assets/images/games/sfighter/thumbnail.png
97
139
  - app/assets/images/games/ter/classic_aspa.png
98
140
  - app/assets/images/games/ter/classic_board.png
99
141
  - app/assets/images/games/ter/classic_circle.png
142
+ - app/assets/images/games/ter/classic_thumbnail.png
100
143
  - app/assets/images/games/ter/modern_aspa.png
101
144
  - app/assets/images/games/ter/modern_board.png
102
145
  - app/assets/images/games/ter/modern_circle.png
146
+ - app/assets/images/games/ter/modern_thumbnail.png
103
147
  - app/assets/images/status/available.png
104
148
  - app/assets/images/status/away.png
105
149
  - app/assets/images/status/chat.png
106
150
  - app/assets/images/status/dnd.png
107
151
  - app/assets/images/status/offline.png
152
+ - app/assets/images/webcam.png
108
153
  - app/assets/javascripts/jquery.flexselect.sstreampresence.js
109
154
  - app/assets/javascripts/jquery.ui.chatbox.sstreampresence.js
110
155
  - app/assets/javascripts/presence.js.erb
@@ -112,7 +157,9 @@ files:
112
157
  - app/assets/javascripts/presence_audio.js.erb
113
158
  - app/assets/javascripts/presence_game.js.erb
114
159
  - app/assets/javascripts/presence_game_comunication.js.erb
160
+ - app/assets/javascripts/presence_game_factory.js.erb
115
161
  - app/assets/javascripts/presence_game_interface.js.erb
162
+ - app/assets/javascripts/presence_game_sfighter.js.erb
116
163
  - app/assets/javascripts/presence_game_ter.js.erb
117
164
  - app/assets/javascripts/presence_notifications.js
118
165
  - app/assets/javascripts/presence_parser.js
@@ -240,30 +287,37 @@ files:
240
287
  - vendor/assets/javascripts/strophe.muc.js
241
288
  - vendor/assets/stylesheets/flexselect.css
242
289
  - vendor/assets/stylesheets/jquery.ui.chatbox.css
290
+ has_rdoc: true
243
291
  homepage: https://github.com/ging/social_stream/wiki/Getting-Started-With-Social-Stream-Presence
244
292
  licenses: []
293
+
245
294
  post_install_message:
246
295
  rdoc_options: []
247
- require_paths:
296
+
297
+ require_paths:
248
298
  - lib
249
- required_ruby_version: !ruby/object:Gem::Requirement
299
+ required_ruby_version: !ruby/object:Gem::Requirement
250
300
  none: false
251
- requirements:
252
- - - ! '>='
253
- - !ruby/object:Gem::Version
254
- version: '0'
255
- required_rubygems_version: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - ">="
303
+ - !ruby/object:Gem::Version
304
+ segments:
305
+ - 0
306
+ version: "0"
307
+ required_rubygems_version: !ruby/object:Gem::Requirement
256
308
  none: false
257
- requirements:
258
- - - ! '>='
259
- - !ruby/object:Gem::Version
260
- version: '0'
309
+ requirements:
310
+ - - ">="
311
+ - !ruby/object:Gem::Version
312
+ segments:
313
+ - 0
314
+ version: "0"
261
315
  requirements: []
316
+
262
317
  rubyforge_project: social_stream-presence
263
- rubygems_version: 1.8.12
318
+ rubygems_version: 1.3.7
264
319
  signing_key:
265
320
  specification_version: 3
266
- summary: Presence capabilities for Social Stream, the core for building social network
267
- websites.
321
+ summary: Presence capabilities for Social Stream, the core for building social network websites.
268
322
  test_files: []
269
- has_rdoc:
323
+