Commit 76602465028863358747ed7683aef771ea8faa1d

Authored by Evandro Junior
2 parents 9dabe4ef 4f2d0747

Merge branch 'AI3074-community_dashboard' of gitlab.com:participa/noosfero into …

…AI3074-community_dashboard
public/javascripts/community_hub.js
@@ -312,6 +312,7 @@ function update_live_stream(recursive) { @@ -312,6 +312,7 @@ function update_live_stream(recursive) {
312 update_live_stream(true); 312 update_live_stream(true);
313 }, 5000); 313 }, 5000);
314 } 314 }
  315 +
315 } 316 }
316 317
317 function hub_left_tab_click() { 318 function hub_left_tab_click() {
@@ -326,17 +327,18 @@ function hub_right_tab_click() { @@ -326,17 +327,18 @@ function hub_right_tab_click() {
326 jQuery("#left-tab").addClass('hide'); 327 jQuery("#left-tab").addClass('hide');
327 jQuery("#right-tab").removeClass('hide'); 328 jQuery("#right-tab").removeClass('hide');
328 jQuery("#right-tab").addClass('show'); 329 jQuery("#right-tab").addClass('show');
329 - jQuery(".hub #left-tab.hide").click(hub_left_tab_click); 330 + jQuery(".hub #right-tab.show h1.live").click(hub_left_tab_click);
330 } 331 }
331 332
332 first_hub_load = true; 333 first_hub_load = true;
333 334
334 jQuery(document).ready(function() { 335 jQuery(document).ready(function() {
  336 +
335 jQuery("#live-posts").scroll(function() { 337 jQuery("#live-posts").scroll(function() {
336 live_scroll_position = jQuery("#live-posts").scrollTop(); 338 live_scroll_position = jQuery("#live-posts").scrollTop();
337 }); 339 });
338 340
339 - jQuery(".hub #right-tab.hide").click(hub_right_tab_click); 341 + jQuery(".hub #left-tab.show h1.mediation").click(hub_right_tab_click);
340 342
341 jQuery("body").addClass("loading"); 343 jQuery("body").addClass("loading");
342 344
public/style.css
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 height: 500px; 174 height: 500px;
175 overflow-x: hidden; 175 overflow-x: hidden;
176 overflow-y: scroll; 176 overflow-y: scroll;
177 - border-width: 1px 0; 177 + border-width: 1px;
178 border-style: solid; 178 border-style: solid;
179 border-color: lightGray; 179 border-color: lightGray;
180 padding-top: 10px; 180 padding-top: 10px;
@@ -219,36 +219,48 @@ @@ -219,36 +219,48 @@
219 #content .main-block .hub .live h1.live, 219 #content .main-block .hub .live h1.live,
220 #content .main-block .hub .mediation h1.mediation { 220 #content .main-block .hub .mediation h1.mediation {
221 /*background-color: #f4f4f4;*/ 221 /*background-color: #f4f4f4;*/
222 - border: 1px solid lightGray  
223 - 222 + border: 1px solid lightGray;
  223 + border-top: 1px solid #96110D;
224 border-bottom: 1px solid #FFFFFF; 224 border-bottom: 1px solid #FFFFFF;
225 float: left; 225 float: left;
226 font-weight: normal; 226 font-weight: normal;
227 margin-bottom: -1px; 227 margin-bottom: -1px;
228 - margin-right: 20px; 228 +
229 width: 60%; 229 width: 60%;
230 } 230 }
  231 +
  232 +#content .main-block .hub .live h1.live{
  233 + float: left;
  234 + margin-right: 20px;
  235 + margin-left: 0px;
  236 +}
  237 +
  238 +#content .main-block .hub .mediation h1.mediation{
  239 + float: right;
  240 + margin-right: 0px;
  241 + margin-left: 20px;
  242 +}
  243 +
231 #content .main-block .hub .live h1.mediation, 244 #content .main-block .hub .live h1.mediation,
232 #content .main-block .hub .mediation h1.live { 245 #content .main-block .hub .mediation h1.live {
233 -  
234 - display: inline; 246 + display: inline-block;
235 background-color: #EEEEEE; 247 background-color: #EEEEEE;
236 - border-bottom: 1px solid #CCCCCC; 248 + border-bottom: 0px solid #CCCCCC;
237 border-top-color: #CCCCCC; 249 border-top-color: #CCCCCC;
238 color: gray; 250 color: gray;
239 position: relative; 251 position: relative;
240 - top: 1px;  
241 - width: 20%;  
242 - text-align: center;  
243 - top: 7px; 252 + width: 30%;
  253 + text-align: center;
  254 + margin-top: 9px;
244 line-height: 27px; 255 line-height: 27px;
245 256
246 } 257 }
247 258
248 -#content .main-block .hub .live h1.mediation,  
249 -#content .main-block .hub .mediation h1.live {  
250 - display: inline-block;  
251 -} 259 +#content .main-block .hub .live h1.mediation {}
  260 +
  261 +#content .main-block .hub .mediation h1.live {margin-left: 20px;}
  262 +
  263 +
252 /*fim de novos elementos: h1.live - h1.mediation*/ 264 /*fim de novos elementos: h1.live - h1.mediation*/
253 265
254 266
@@ -256,7 +268,7 @@ @@ -256,7 +268,7 @@
256 color: #D71410; 268 color: #D71410;
257 display: inline-block; 269 display: inline-block;
258 font-size: 14px; 270 font-size: 14px;
259 - font-family: Arial Black, arial, sans-serif; 271 + font-family: /*Arial Black, */arial, sans-serif;
260 padding-right: 0; 272 padding-right: 0;
261 width: 70%; 273 width: 70%;
262 } 274 }
@@ -269,7 +281,7 @@ @@ -269,7 +281,7 @@
269 font-weight: bold; 281 font-weight: bold;
270 padding: 0 0.5em; 282 padding: 0 0.5em;
271 text-align: center; 283 text-align: center;
272 - text-transform: uppercase; 284 + /*text-transform: uppercase;*/
273 vertical-align: top; 285 vertical-align: top;
274 width: 20%; 286 width: 20%;
275 287
@@ -323,7 +335,8 @@ @@ -323,7 +335,8 @@
323 /****aba live aberta****/ 335 /****aba live aberta****/
324 336
325 .hub .live.show { 337 .hub .live.show {
326 - width: 85%; 338 + /*width: 85%;*/
  339 + width: 100%;
327 } 340 }
328 341
329 .hub .live.show ul#live-posts .li{ 342 .hub .live.show ul#live-posts .li{
@@ -353,7 +366,7 @@ margin-right: 10px; @@ -353,7 +366,7 @@ margin-right: 10px;
353 } 366 }
354 367
355 #content .main-block .hub .mediation h1{ 368 #content .main-block .hub .mediation h1{
356 - background-color: #ed8e01; 369 + /* background-color: #ed8e01;*/
357 border: 1px solid lightGray 370 border: 1px solid lightGray
358 } 371 }
359 372
@@ -363,7 +376,7 @@ margin-right: 10px; @@ -363,7 +376,7 @@ margin-right: 10px;
363 font-size: 14px; 376 font-size: 14px;
364 font-family: Arial, sans-serif; 377 font-family: Arial, sans-serif;
365 padding-right: 0; 378 padding-right: 0;
366 - width: 100%; 379 + /* width: 100%;*/
367 } 380 }
368 .hub .mediation .expand { 381 .hub .mediation .expand {
369 float: right; 382 float: right;
@@ -383,18 +396,20 @@ margin-right: 10px; @@ -383,18 +396,20 @@ margin-right: 10px;
383 } 396 }
384 397
385 #content .main-block .hub .mediation.hide h1{ 398 #content .main-block .hub .mediation.hide h1{
  399 +/*
386 background-color: #ed8e01; 400 background-color: #ed8e01;
387 border: 1px solid lightGray; 401 border: 1px solid lightGray;
388 text-align: center; 402 text-align: center;
389 padding-left: 0; 403 padding-left: 0;
  404 +*/
390 cursor: pointer; 405 cursor: pointer;
391 } 406 }
392 407
393 #content .hub .mediation.hide .title { 408 #content .hub .mediation.hide .title {
394 - color: white; 409 +/* color: white;*/
395 display: inline-block; 410 display: inline-block;
396 font-size: 14px; 411 font-size: 14px;
397 - font-family: Arial Black, arial, sans-serif; 412 + font-family: /*Arial Black, */arial, sans-serif;
398 padding-right: 0; 413 padding-right: 0;
399 width: 100%; 414 width: 100%;
400 } 415 }
@@ -423,44 +438,50 @@ display: none; @@ -423,44 +438,50 @@ display: none;
423 /****aba mediation aberta****/ 438 /****aba mediation aberta****/
424 439
425 .hub .mediation.show { 440 .hub .mediation.show {
426 - border: 0px solid lightGray; 441 +/* border: 0px solid lightGray;
427 display: inline-block; 442 display: inline-block;
428 clear: right; 443 clear: right;
429 float: none; 444 float: none;
430 margin-left: 1%; 445 margin-left: 1%;
431 - width: 85%;  
432 margin-bottom: 2em; 446 margin-bottom: 2em;
  447 +*/
  448 + /*width: 85%;*/
  449 + width: 100%;
433 } 450 }
434 451
435 #content .main-block .hub .mediation.show h1{ 452 #content .main-block .hub .mediation.show h1{
436 - background-color: #ed8e01;  
437 - border: 1px solid lightGray 453 +/* background-color: #ed8e01;*/
  454 +/* border: 1px solid lightGray*/
438 } 455 }
439 456
440 #content .hub .mediation.show .title { 457 #content .hub .mediation.show .title {
441 - color: white; 458 + /*color: white;*/
442 display: inline-block; 459 display: inline-block;
443 - font-size: 20px;  
444 - font-family: Arial Black, arial, sans-serif; 460 +/* font-size: 20px;*/
  461 + font-family: /*Arial Black, */arial, sans-serif;
445 padding-right: 0; 462 padding-right: 0;
446 - width: 100%; 463 +/* width: 60%;*/
447 } 464 }
  465 +
  466 +/*
448 .hub .mediation.show .expand { 467 .hub .mediation.show .expand {
449 float: right; 468 float: right;
450 padding-right: 1em; 469 padding-right: 1em;
451 display: block; 470 display: block;
452 -} 471 +}*/
453 472
454 473
455 .hub .mediation.show ul#mediation-posts { 474 .hub .mediation.show ul#mediation-posts {
456 -height: 500px;  
457 -overflow-x: hidden;  
458 -overflow-y: scroll;  
459 -border-width: 0 1px 1px;  
460 -border-style: solid;  
461 -border-color: lightGray;  
462 -padding-top: 10px;  
463 -background-color: #f9f9f9; 475 +/*
  476 + height: 500px;
  477 + overflow-x: hidden;
  478 + overflow-y: scroll;
  479 + border-width: 0 1px 1px;
  480 + border-style: solid;
  481 + border-color: lightGray;
  482 + padding-top: 10px;
  483 + background-color: #f9f9f9;
  484 +*/
464 } 485 }
465 486
466 .hub .mediation.show ul#mediation-posts li{ 487 .hub .mediation.show ul#mediation-posts li{
@@ -482,11 +503,14 @@ background-color: #f9f9f9; @@ -482,11 +503,14 @@ background-color: #f9f9f9;
482 } 503 }
483 504
484 .hub .form-mediation { 505 .hub .form-mediation {
485 - width: 93%;  
486 - display: inline-block;  
487 - height: 376px;  
488 - padding: 10px;  
489 - border: 1px solid #c0c0c0; 506 + /*width: 93%;*/
  507 + /*width: 426px;*/
  508 + width: 60%;
  509 + display: inline-block;
  510 + height: 376px;
  511 + padding: 10px;
  512 + border: 1px solid #c0c0c0;
  513 + overflow-x: hidden;
490 } 514 }
491 515
492 .hub .form-message { 516 .hub .form-message {
@@ -499,8 +523,15 @@ background-color: #f9f9f9; @@ -499,8 +523,15 @@ background-color: #f9f9f9;
499 523
500 524
501 .hub div.settings { 525 .hub div.settings {
502 - width: 96%;  
503 - margin-top: 10px; 526 + /*width: 96%;*/
  527 + /*margin-top: 10px;*/
  528 + /*margin-left: 10px;*/
  529 + /*width: 240px;*/
  530 + display: inline-block;
  531 + margin-left: 1%;
  532 + margin-top: 10px;
  533 + vertical-align: top;
  534 + width: 35%;
504 } 535 }
505 536
506 .hub ul.settings li { 537 .hub ul.settings li {
script/hub_updater
@@ -7,5 +7,6 @@ NOOSFERO_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../../') @@ -7,5 +7,6 @@ NOOSFERO_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../../')
7 7
8 Daemons.run_proc('hub') do 8 Daemons.run_proc('hub') do
9 require NOOSFERO_ROOT + '/config/environment' 9 require NOOSFERO_ROOT + '/config/environment'
  10 + require 'proxifier/env' unless ENV['PROXY'].blank?
10 CommunityHubPlugin::Listener.run 11 CommunityHubPlugin::Listener.run
11 end 12 end
views/content_viewer/hub.rhtml
@@ -8,31 +8,36 @@ @@ -8,31 +8,36 @@
8 8
9 <br /> 9 <br />
10 10
11 -<div id="left-tab" class="live content-tab show">  
12 - <h1 class="live">  
13 - <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>  
14 - </h1> 11 + <div id="left-tab" class="live content-tab show">
15 12
16 - <h1 class="mediation">  
17 - <span class="title"><%= _("Mediation") %><span class="expand"><!--&#9660;--></span></span>  
18 - </h1> 13 + <h1 class="live">
  14 + <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>
  15 + </h1>
  16 +
  17 + <h1 class="mediation">
  18 + <span class="title"><%= _("Mediation") %></span>
  19 + </h1>
19 20
20 <ul id="live-posts"> 21 <ul id="live-posts">
21 </ul> 22 </ul>
  23 +
22 <span><%= check_box_tag 'auto_scrolling', 'yes', true %><%= _("Auto scrolling") %></span> 24 <span><%= check_box_tag 'auto_scrolling', 'yes', true %><%= _("Auto scrolling") %></span>
  25 +
23 </div> 26 </div>
24 27
25 <div id="right-tab" class="mediation content-tab hide"> 28 <div id="right-tab" class="mediation content-tab hide">
26 - <h1 class="live">  
27 - <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>  
28 - </h1>  
29 29
30 - <h1>  
31 - <span class="title"><%= _("Mediation") %><span class="expand"><!--&#9660;--></span></span>  
32 - </h1> 30 + <h1 class="live">
  31 + <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>
  32 + </h1>
  33 +
  34 + <h1 class="mediation">
  35 + <span class="title"><%= _("Mediation") %></span>
  36 + </h1>
33 37
34 <ul id="mediation-posts"> 38 <ul id="mediation-posts">
35 </ul> 39 </ul>
  40 +
36 </div> 41 </div>
37 42
38 <% if mediator?(@page) %> 43 <% if mediator?(@page) %>