Commit 0ba0e6e90bf7a20f91fa71c336f82df0d0520809
1 parent
46e2d04e
Exists in
community_hub_submodule
#community dashboard - fixes
Showing
5 changed files
with
31 additions
and
34 deletions
Show diff stats
public/javascripts/community_hub.js
| @@ -33,6 +33,7 @@ function new_mediation_comment(button, mediation) { | @@ -33,6 +33,7 @@ function new_mediation_comment(button, mediation) { | ||
| 33 | if (data.ok) { | 33 | if (data.ok) { |
| 34 | jQuery("#mediation-comment-form-" + mediation + " textarea").val(''); | 34 | jQuery("#mediation-comment-form-" + mediation + " textarea").val(''); |
| 35 | jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-done"); | 35 | jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-done"); |
| 36 | + update_mediation_comments(mediation); | ||
| 36 | setTimeout(function(){ | 37 | setTimeout(function(){ |
| 37 | clearLoadingMediationCommentSignal(mediation); | 38 | clearLoadingMediationCommentSignal(mediation); |
| 38 | }, 3000); | 39 | }, 3000); |
| @@ -79,6 +80,7 @@ function new_mediation(button) { | @@ -79,6 +80,7 @@ function new_mediation(button) { | ||
| 79 | if (data.ok) { | 80 | if (data.ok) { |
| 80 | jQuery("#loading-mediation").addClass("loading-signal-done"); | 81 | jQuery("#loading-mediation").addClass("loading-signal-done"); |
| 81 | tinymce.get('article_body').setContent(''); | 82 | tinymce.get('article_body').setContent(''); |
| 83 | + update_mediations(); | ||
| 82 | setTimeout(clearLoadingMediationSignal, 3000); | 84 | setTimeout(clearLoadingMediationSignal, 3000); |
| 83 | } | 85 | } |
| 84 | else { | 86 | else { |
| @@ -140,7 +142,7 @@ function pin_message(post_id) { | @@ -140,7 +142,7 @@ function pin_message(post_id) { | ||
| 140 | 142 | ||
| 141 | function update_mediation_comments(mediation) { | 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 | var hub_id = jQuery(".hub").attr('id'); | 147 | var hub_id = jQuery(".hub").attr('id'); |
| 146 | 148 | ||
| @@ -201,7 +203,7 @@ function update_mediations() { | @@ -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,5 +272,5 @@ jQuery(document).ready(function() { | ||
| 270 | jQuery(".hub #right-tab.hide").click(hub_right_tab_click); | 272 | jQuery(".hub #right-tab.hide").click(hub_right_tab_click); |
| 271 | 273 | ||
| 272 | setTimeout(update_live_stream, 5000); | 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,9 +189,9 @@ div.content-tab.hide { | ||
| 189 | vertical-align: top; | 189 | vertical-align: top; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | -.hub .mediation-bar ul li.pin{ | 192 | +.hub .mediation-bar ul li.pin { |
| 193 | height: 25px; | 193 | height: 25px; |
| 194 | - /*margin-right: 10px;*/ | 194 | + margin-right: 15px; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | .hub .remove{} | 197 | .hub .remove{} |
| @@ -520,19 +520,30 @@ background-color: #f9f9f9; | @@ -520,19 +520,30 @@ background-color: #f9f9f9; | ||
| 520 | 520 | ||
| 521 | /****fim aba mediation aberta****/ | 521 | /****fim aba mediation aberta****/ |
| 522 | 522 | ||
| 523 | -.hub .form { | 523 | +.hub .form-mediation { |
| 524 | /*clear: left;*/ | 524 | /*clear: left;*/ |
| 525 | /*float: left;*/ | 525 | /*float: left;*/ |
| 526 | - width: 47%; | 526 | + width: 93%; |
| 527 | display: inline-block; | 527 | display: inline-block; |
| 528 | - height: 323px; | 528 | + height: 376px; |
| 529 | padding: 10px; | 529 | padding: 10px; |
| 530 | border: 1px solid #c0c0c0; | 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 | .hub div.settings { | 544 | .hub div.settings { |
| 534 | - float: right; | ||
| 535 | - width: 50%; | 545 | + width: 96%; |
| 546 | + margin-top: 10px; | ||
| 536 | } | 547 | } |
| 537 | 548 | ||
| 538 | .hub ul.settings li { | 549 | .hub ul.settings li { |
| @@ -646,7 +657,7 @@ textarea#message_body { | @@ -646,7 +657,7 @@ textarea#message_body { | ||
| 646 | display: inline-block; | 657 | display: inline-block; |
| 647 | float: right; | 658 | float: right; |
| 648 | margin-top: -24px; | 659 | margin-top: -24px; |
| 649 | - margin-right: 260px; | 660 | + margin-right: 585px; |
| 650 | } | 661 | } |
| 651 | 662 | ||
| 652 | .hub .loading-mediation-comment { | 663 | .hub .loading-mediation-comment { |
| @@ -655,7 +666,7 @@ textarea#message_body { | @@ -655,7 +666,7 @@ textarea#message_body { | ||
| 655 | display: inline-block; | 666 | display: inline-block; |
| 656 | float: right; | 667 | float: right; |
| 657 | margin-top: -25px; | 668 | margin-top: -25px; |
| 658 | - margin-right: 555px; | 669 | + margin-right: 440px; |
| 659 | } | 670 | } |
| 660 | 671 | ||
| 661 | .loading-signal-done { | 672 | .loading-signal-done { |
views/cms/community_hub_plugin/_hub.rhtml
| @@ -14,10 +14,6 @@ | @@ -14,10 +14,6 @@ | ||
| 14 | </div> | 14 | </div> |
| 15 | <br /> | 15 | <br /> |
| 16 | <div> | 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 | <%= _('Twitter Settings:') %> | 17 | <%= _('Twitter Settings:') %> |
| 22 | </div> | 18 | </div> |
| 23 | <br /> | 19 | <br /> |
| @@ -25,8 +21,6 @@ | @@ -25,8 +21,6 @@ | ||
| 25 | <br /><br /> | 21 | <br /><br /> |
| 26 | <span><%= required labelled_form_field(_('Twitter\'s Hashtags, comma separated words<br>(example: participa.br,participabr,arenanetmundial,netmundial'), text_field(:article, :hashtags_twitter)) %></span> | 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 | <br /> | 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 | <div> | 24 | <div> |
| 31 | <%= _('Facebook Settings:') %> | 25 | <%= _('Facebook Settings:') %> |
| 32 | </div> | 26 | </div> |
| @@ -35,8 +29,4 @@ | @@ -35,8 +29,4 @@ | ||
| 35 | <br /><br /> | 29 | <br /><br /> |
| 36 | <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> | 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 | <br /> | 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 | \ No newline at end of file | 32 | \ No newline at end of file |
| 33 | +</div> |
views/community_hub_plugin_public/_settings.rhtml
| 1 | <div class="settings"> | 1 | <div class="settings"> |
| 2 | <ul class="settings"> | 2 | <ul class="settings"> |
| 3 | <li class="general"> | 3 | <li class="general"> |
| 4 | - <%= link_to _("General settings") + '<span class="collapse">►</span>', :controller => 'cms', :action => 'edit', :id => @page.id %> | 4 | + <%= link_to _("General settings"), :controller => 'cms', :action => 'edit', :id => @page.id %> |
| 5 | </li> | 5 | </li> |
| 6 | </ul> | 6 | </ul> |
| 7 | -</div> | ||
| 8 | \ No newline at end of file | 7 | \ No newline at end of file |
| 8 | +</div> |
views/content_viewer/hub.rhtml
| @@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
| 8 | 8 | ||
| 9 | <br /> | 9 | <br /> |
| 10 | 10 | ||
| 11 | - | ||
| 12 | <div id="left-tab" class="live content-tab show"> | 11 | <div id="left-tab" class="live content-tab show"> |
| 13 | <h1> | 12 | <h1> |
| 14 | <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span> | 13 | <span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span> |
| @@ -32,7 +31,7 @@ | @@ -32,7 +31,7 @@ | ||
| 32 | 31 | ||
| 33 | <% if logged_in? %> | 32 | <% if logged_in? %> |
| 34 | 33 | ||
| 35 | - <div class="form"> | 34 | + <div class="form-mediation"> |
| 36 | 35 | ||
| 37 | <%= render :file => 'shared/tiny_mce' %> | 36 | <%= render :file => 'shared/tiny_mce' %> |
| 38 | 37 | ||
| @@ -61,7 +60,7 @@ | @@ -61,7 +60,7 @@ | ||
| 61 | 60 | ||
| 62 | <% if logged_in? %> | 61 | <% if logged_in? %> |
| 63 | 62 | ||
| 64 | - <div class="form"> | 63 | + <div class="form-message"> |
| 65 | 64 | ||
| 66 | <% form_for :message, | 65 | <% form_for :message, |
| 67 | :method => 'post', | 66 | :method => 'post', |
| @@ -72,7 +71,7 @@ | @@ -72,7 +71,7 @@ | ||
| 72 | } do |f| %> | 71 | } do |f| %> |
| 73 | <span><%= _("Streaming") %></span> | 72 | <span><%= _("Streaming") %></span> |
| 74 | <br /> | 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 | <%= submit_button('add', _('Post'), :onclick => 'new_message(this); return false;') %> | 75 | <%= submit_button('add', _('Post'), :onclick => 'new_message(this); return false;') %> |
| 77 | <span id="loading-message"></span> | 76 | <span id="loading-message"></span> |
| 78 | <% end %> | 77 | <% end %> |
| @@ -81,11 +80,6 @@ | @@ -81,11 +80,6 @@ | ||
| 81 | 80 | ||
| 82 | <% end %> | 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 | </div> | 83 | </div> |
| 90 | 84 | ||
| 91 | <% end %> | 85 | <% end %> |