Commit 0ba0e6e90bf7a20f91fa71c336f82df0d0520809

Authored by Francisco Marcelo de Araújo Lima Júnior
1 parent 46e2d04e
Exists in master

#community dashboard - fixes

public/javascripts/community_hub.js
... ... @@ -33,6 +33,7 @@ function new_mediation_comment(button, mediation) {
33 33 if (data.ok) {
34 34 jQuery("#mediation-comment-form-" + mediation + " textarea").val('');
35 35 jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-done");
  36 + update_mediation_comments(mediation);
36 37 setTimeout(function(){
37 38 clearLoadingMediationCommentSignal(mediation);
38 39 }, 3000);
... ... @@ -79,6 +80,7 @@ function new_mediation(button) {
79 80 if (data.ok) {
80 81 jQuery("#loading-mediation").addClass("loading-signal-done");
81 82 tinymce.get('article_body').setContent('');
  83 + update_mediations();
82 84 setTimeout(clearLoadingMediationSignal, 3000);
83 85 }
84 86 else {
... ... @@ -140,7 +142,7 @@ function pin_message(post_id) {
140 142  
141 143 function update_mediation_comments(mediation) {
142 144  
143   - if (jQuery("#mediation-section.show").size() != 0) {
  145 + if (jQuery("#right-tab.show").size() != 0) {
144 146  
145 147 var hub_id = jQuery(".hub").attr('id');
146 148  
... ... @@ -201,7 +203,7 @@ function update_mediations() {
201 203  
202 204 }
203 205  
204   - setTimeout(update_mediations, 7000);
  206 + setTimeout(update_mediations, 5000);
205 207 }
206 208  
207 209  
... ... @@ -270,5 +272,5 @@ jQuery(document).ready(function() {
270 272 jQuery(".hub #right-tab.hide").click(hub_right_tab_click);
271 273  
272 274 setTimeout(update_live_stream, 5000);
273   - setTimeout(update_mediations, 7000);
  275 + setTimeout(update_mediations, 5000);
274 276 });
... ...
public/style.css
... ... @@ -189,9 +189,9 @@ div.content-tab.hide {
189 189 vertical-align: top;
190 190 }
191 191  
192   -.hub .mediation-bar ul li.pin{
  192 +.hub .mediation-bar ul li.pin {
193 193 height: 25px;
194   - /*margin-right: 10px;*/
  194 + margin-right: 15px;
195 195 }
196 196  
197 197 .hub .remove{}
... ... @@ -520,19 +520,30 @@ background-color: #f9f9f9;
520 520  
521 521 /****fim aba mediation aberta****/
522 522  
523   -.hub .form {
  523 +.hub .form-mediation {
524 524 /*clear: left;*/
525 525 /*float: left;*/
526   - width: 47%;
  526 + width: 93%;
527 527 display: inline-block;
528   - height: 323px;
  528 + height: 376px;
529 529 padding: 10px;
530 530 border: 1px solid #c0c0c0;
531 531 }
532 532  
  533 +.hub .form-message {
  534 + /*clear: left;*/
  535 + /*float: left;*/
  536 + width: 93%;
  537 + display: inline-block;
  538 + height: 148px;
  539 + padding: 10px;
  540 + border: 1px solid #c0c0c0;
  541 +}
  542 +
  543 +
533 544 .hub div.settings {
534   - float: right;
535   - width: 50%;
  545 + width: 96%;
  546 + margin-top: 10px;
536 547 }
537 548  
538 549 .hub ul.settings li {
... ... @@ -646,7 +657,7 @@ textarea#message_body {
646 657 display: inline-block;
647 658 float: right;
648 659 margin-top: -24px;
649   - margin-right: 260px;
  660 + margin-right: 585px;
650 661 }
651 662  
652 663 .hub .loading-mediation-comment {
... ... @@ -655,7 +666,7 @@ textarea#message_body {
655 666 display: inline-block;
656 667 float: right;
657 668 margin-top: -25px;
658   - margin-right: 555px;
  669 + margin-right: 440px;
659 670 }
660 671  
661 672 .loading-signal-done {
... ...
views/cms/community_hub_plugin/_hub.rhtml
... ... @@ -14,10 +14,6 @@
14 14 </div>
15 15 <br />
16 16 <div>
17   - <%= labelled_form_field(_('Proxy URL[:port] leave blank for none (example: http://161.148.1.167:3128)'), text_field(:article, :proxy_url, :size => '64', :maxlength => 150)) %>
18   - </div>
19   - <br />
20   - <div>
21 17 <%= _('Twitter Settings:') %>
22 18 </div>
23 19 <br />
... ... @@ -25,8 +21,6 @@
25 21 <br /><br />
26 22 <span><%= required labelled_form_field(_('Twitter\'s Hashtags, comma separated words<br>(example: participa.br,participabr,arenanetmundial,netmundial'), text_field(:article, :hashtags_twitter)) %></span>
27 23 <br />
28   - <span><%= required labelled_form_field(_('Twitter\'s token file<br>use "twurlrc_mariajoseopinto" for production and "twurlrc" for development and test'), text_field(:article, :twitter_token_file)) %></span>
29   - <br />
30 24 <div>
31 25 <%= _('Facebook Settings:') %>
32 26 </div>
... ... @@ -35,8 +29,4 @@
35 29 <br /><br />
36 30 <span><%= required labelled_form_field(_('Id of Facebook\'s page which will be listened for comments (example: participabr'), text_field(:article, :facebook_page_id)) %></span>
37 31 <br />
38   - <span><%= required labelled_form_field(_('Facebook\'s access token (don\'t change unless last one has expired)'), text_field(:article, :facebook_access_token)) %></span>
39   - <br />
40   - <a href='https://smashballoon.com/custom-facebook-feed/access-token/' ><%= _('How to get a new access token?') %><a>
41   - <br />
42   -</div>
43 32 \ No newline at end of file
  33 +</div>
... ...
views/community_hub_plugin_public/_settings.rhtml
1 1 <div class="settings">
2 2 <ul class="settings">
3 3 <li class="general">
4   - <%= link_to _("General settings") + '<span class="collapse">&#9658;</span>', :controller => 'cms', :action => 'edit', :id => @page.id %>
  4 + <%= link_to _("General settings"), :controller => 'cms', :action => 'edit', :id => @page.id %>
5 5 </li>
6 6 </ul>
7   -</div>
8 7 \ No newline at end of file
  8 +</div>
... ...
views/content_viewer/hub.rhtml
... ... @@ -8,7 +8,6 @@
8 8  
9 9 <br />
10 10  
11   -
12 11 <div id="left-tab" class="live content-tab show">
13 12 <h1>
14 13 <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>
... ... @@ -32,7 +31,7 @@
32 31  
33 32 <% if logged_in? %>
34 33  
35   - <div class="form">
  34 + <div class="form-mediation">
36 35  
37 36 <%= render :file => 'shared/tiny_mce' %>
38 37  
... ... @@ -61,7 +60,7 @@
61 60  
62 61 <% if logged_in? %>
63 62  
64   - <div class="form">
  63 + <div class="form-message">
65 64  
66 65 <% form_for :message,
67 66 :method => 'post',
... ... @@ -72,7 +71,7 @@
72 71 } do |f| %>
73 72 <span><%= _("Streaming") %></span>
74 73 <br />
75   - <%= f.text_area :body, :style => "width: 99%;", :cols => "38", :rows => "10", :placeholder => _("Type your message here") %>
  74 + <%= f.text_area :body, :style => "width: 99%;", :cols => "38", :rows => "5", :placeholder => _("Type your message here") %>
76 75 <%= submit_button('add', _('Post'), :onclick => 'new_message(this); return false;') %>
77 76 <span id="loading-message"></span>
78 77 <% end %>
... ... @@ -81,11 +80,6 @@
81 80  
82 81 <% end %>
83 82  
84   - <div id="banner-embed-container">
85   - <%= render :partial => "community_hub_plugin_public/banner" %>
86   - <%= render :partial => "community_hub_plugin_public/embed" %>
87   - </div>
88   -
89 83 </div>
90 84  
91 85 <% end %>
... ...