diff --git a/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb b/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb
index 3dbcf04..8815b3c 100644
--- a/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb
+++ b/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb
@@ -6,75 +6,82 @@ class CommunityHubPluginPublicController < PublicController
def new_message
- article = Article.find(params[:article_id])
+ if logged_in?
+
+ begin
+ hub = Article.find(params[:article_id])
+ rescue
+ hub = nil
+ end
+
+ if hub
+ message_data = {}
+ message_data.merge!(params[:message]) if params[:message]
+
+ message = Comment.new(message_data)
+ message.author = user
+ message.title = message_timestamp
+ message.article = hub
+ message.ip_address = request.remote_ip
+ message.user_agent = request.user_agent
+ message.referrer = request.referrer
+
+ if message && message.save
+ render :text => {'ok' => true}.to_json, :content_type => 'application/json'
+ return true
+ end
+ end
- message_data = {}
- message_data.merge!(params[:message]) if params[:message]
-
- @message = Comment.new(message_data)
- @message.author = user if logged_in?
- @message.title = message_timestamp
- @message.article = article
- @message.ip_address = request.remote_ip
- @message.user_agent = request.user_agent
- @message.referrer = request.referrer
-
- if @message && @message.save
- render :text => {'ok' => true}.to_json, :content_type => 'application/json'
- else
- render :text => {'ok' => false}.to_json, :content_type => 'application/json'
end
+ render :text => {'ok' => false}.to_json, :content_type => 'application/json'
end
def new_mediation
- profile = Profile.find(params[:profile_id])
-
- mediation_data = {}
- mediation_data.merge!(params[:article]) if params[:article]
-
- @mediation = TinyMceArticle.new(mediation_data)
- @mediation.profile = profile
- @mediation.last_changed_by = user
- @mediation.name = mediation_timestamp
- @mediation.notify_comments = false
- @mediation.type = 'TinyMceArticle'
- @mediation.advertise = false
- @mediation.save
-
- if @mediation && @mediation.save
- render :text => {'ok' => true}.to_json, :content_type => 'application/json'
- else
- render :text => {'ok' => false}.to_json, :content_type => 'application/json'
+ if logged_in?
+
+ begin
+ profile = Profile.find(params[:profile_id])
+ rescue
+ profile = nil
+ end
+
+ if profile
+ mediation_data = {}
+ mediation_data.merge!(params[:article]) if params[:article]
+
+ mediation = TinyMceArticle.new(mediation_data)
+ mediation.profile = profile
+ mediation.last_changed_by = user
+ mediation.name = mediation_timestamp
+ mediation.notify_comments = false
+ mediation.type = 'TinyMceArticle'
+ mediation.advertise = false
+ mediation.created_by_id = user.id
+
+ if mediation && mediation.save
+ render :text => {'ok' => true}.to_json, :content_type => 'application/json'
+ return true
+ end
+ end
+
end
+ render :text => {'ok' => false}.to_json, :content_type => 'application/json'
end
def newer_mediation_comment
latest_id = params[:latest_post]
mediation = params[:mediation]
- comments = Comment.find(:all,
- :limit => 100,
- :conditions => ["id > :id and source_id = :mediation", {
- :id => latest_id,
- :mediation => mediation
- }])
-
- render :partial => "mediation_comment",
- :collection => comments
+ comments = Comment.find(:all, :conditions => ["id > :id and source_id = :mediation", { :id => latest_id, :mediation => mediation }])
+ render :partial => "mediation_comment", :collection => comments
end
def newer_comments
latest_post = params[:latest_post]
hub = Article.find(params[:hub])
- posts = Comment.find(:all,
- :order => "id desc",
- :limit => 100,
- :conditions => ["id > :id and source_id = :hub", {
- :id => latest_post,
- :hub => hub
- }])
+ posts = Comment.find(:all, :order => "id desc", :conditions => ["id > :id and source_id = :hub", { :id => latest_post, :hub => hub }])
if !posts.empty?
oldest_post = posts.last.id
@@ -84,27 +91,14 @@ class CommunityHubPluginPublicController < PublicController
latest_post = 0
end
- render :partial => "post",
- :collection => posts,
- :locals => {
- :latest_post => latest_post,
- :oldest_post => oldest_post,
- :hub => hub
- }
+ render :partial => "post", :collection => posts, :locals => { :latest_post => latest_post, :oldest_post => oldest_post, :hub => hub }
end
def newer_articles
latest_post = params[:latest_post]
hub = Article.find(params[:hub])
- posts = Article.find(:all,
- :order => "id desc",
- :limit => 100,
- :conditions => ["id > :id and type = :type and parent_id = :hub", {
- :id => latest_post,
- :type => 'TinyMceArticle',
- :hub => hub.id
- }])
+ posts = Article.find(:all, :order => "id desc", :conditions => ["id > :id and type = :type and parent_id = :hub", { :id => latest_post, :type => 'TinyMceArticle', :hub => hub.id }])
if !posts.empty?
oldest_post = posts.last.id
@@ -114,122 +108,88 @@ class CommunityHubPluginPublicController < PublicController
latest_post = 0
end
- render :partial => "mediation",
- :collection => posts,
- :locals => {
- :latest_post => latest_post,
- :oldest_post => oldest_post,
- :hub => hub
- }
- end
-
-
- def settings
- settings_section = params[:id]
- render :partial => "settings/twitter", :layout => true
- end
-
-
- def set_hub_view
- hub = Article.find(params[:hub])
- hub_owner = hub.profile
- role = params[:role]
- render :partial => "post_form", :locals => {:hub => hub, :profile => user, :user_role => role}
- end
-
-
- def check_user_level
- if false
- render :text => {'level' => 0}.to_json, :content_type => 'application/json'
- else
- render :text => {'level' => 1}.to_json, :content_type => 'application/json'
- end
+ render :partial => "mediation", :collection => posts, :locals => { :latest_post => latest_post, :oldest_post => oldest_post, :hub => hub }
end
def promote_user
- hub = Article.find(params[:hub])
-
- user_id = params[:user].to_i
-
- hub.mediators += [user_id] unless hub.mediators.include?(user_id)
-
- if hub && hub.save
- render :text => {'ok' => true}.to_json, :content_type => 'application/json'
- else
- render :text => {'ok' => false}.to_json, :content_type => 'application/json'
+ if logged_in?
+ if (!params[:hub].blank? && !params[:user].blank?)
+ begin
+ hub = Article.find(params[:hub])
+ rescue
+ hub = nil
+ end
+ if hub && hub.mediator?(user)
+ begin
+ user_to_promote = Profile.find(params[:user])
+ rescue
+ user_to_promote = nil
+ end
+ if user_to_promote
+ hub.mediators += [user_to_promote.id] unless hub.mediators.include?(user_to_promote.id)
+ if hub.save
+ render :text => {'ok' => true}.to_json, :content_type => 'application/json'
+ return true
+ end
+ end
+ end
+ end
end
+ render :text => {'ok' => false}.to_json, :content_type => 'application/json'
end
def pin_message
- message = Comment.find(params[:message])
- hub = Article.find(params[:hub])
-
- mediation = make_mediation_from_message(hub, message)
- mediation.save
-
- if mediation && mediation.save
- hub.pinned_messages += [message.id] unless hub.pinned_messages.include?(message.id)
- hub.pinned_mediations += [mediation.id] unless hub.pinned_mediations.include?(mediation.id)
- hub.save
- render :text => {'ok' => true}.to_json, :content_type => 'application/json'
- else
- render :text => {'ok' => false}.to_json, :content_type => 'application/json'
- end
-
+ if logged_in?
+ if (!params[:hub].blank? && !params[:message].blank?)
+ begin
+ hub = Article.find(params[:hub])
+ rescue
+ hub = nil
+ end
+ if hub && hub.mediator?(user)
+ begin
+ message = Comment.find(params[:message])
+ rescue
+ message = nil
+ end
+ if message
+ mediation = TinyMceArticle.new
+ mediation.profile = hub.profile
+ mediation.parent = hub
+ mediation.last_changed_by = message.author
+ mediation.created_by_id = message.author.id
+ mediation.name = mediation_timestamp
+ mediation.body = message.body
+ mediation.notify_comments = false
+ mediation.type = 'TinyMceArticle'
+ mediation.advertise = false
+ if mediation.save
+ hub.pinned_messages += [message.id] unless hub.pinned_messages.include?(message.id)
+ hub.pinned_mediations += [mediation.id] unless hub.pinned_mediations.include?(mediation.id)
+ if hub.save
+ render :text => {'ok' => true}.to_json, :content_type => 'application/json'
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+ render :text => {'ok' => false}.to_json, :content_type => 'application/json'
end
protected
- def posts_to_json(list)
- list.map do |item| {
- 'id' => item.id,
- 'created_at' => item.created_at,
- 'body' => item.body,
- 'profile' => item.author
- }
- end.to_json
- end
-
-
- def make_mediation_from_message(hub, message)
- begin
- mediation = Article.new
-
- mediation.profile = hub.profile
- mediation.parent = hub
- mediation.name = mediation_timestamp
- mediation.body = message.body
- mediation.abstract = ""
- mediation.last_changed_by = message.author
- mediation.type = 'TinyMceArticle'
- mediation.display_versions = false
- mediation.moderate_comments = false
- mediation.translation_of_id = ""
- mediation.notify_comments = false
- mediation.accept_comments = true
- mediation.tag_list = ""
- mediation.allow_members_to_edit = false
- mediation.display_hits = false
- mediation.published = true
- mediation.license_id = ""
- mediation.category_ids = []
- rescue
- mediation = nil
- end
-
- mediation
- end
-
-
def mediation_timestamp
"hub-mediation-#{(Time.now.to_f * 1000).to_i}"
end
-
+
+
def message_timestamp
"hub-message-#{(Time.now.to_f * 1000).to_i}"
end
-end
\ No newline at end of file
+end
diff --git a/plugins/community_hub/lib/community_hub_plugin/hub.rb b/plugins/community_hub/lib/community_hub_plugin/hub.rb
index 5c0a122..31ced8d 100644
--- a/plugins/community_hub/lib/community_hub_plugin/hub.rb
+++ b/plugins/community_hub/lib/community_hub_plugin/hub.rb
@@ -4,13 +4,13 @@ require File.dirname(__FILE__) + '/../../facebook_stream/lib_facebook_stream'
class CommunityHubPlugin::Hub < Folder
settings_items :proxy_url, :type => :string, :default => 'http://161.148.1.167:3128' # Remember to use add the port, in case needed.
- settings_items :twitter_enabled, :type => :boolean, :default => false
- settings_items :hashtags_twitter, :type => :string, :default => "participa.br,participabr,arenanetmundial,netmundial"
+ settings_items :twitter_enabled, :type => :boolean, :default => false
+ settings_items :hashtags_twitter, :type => :string, :default => "participa.br,participabr,arenanetmundial,netmundial"
settings_items :twitter_token_file, :type => :string, :default => "twurlrc_mariajoseopinto"
settings_items :facebook_enabled, :type => :boolean, :default => false
- settings_items :facebook_page_id, :type => :string, :default => "participabr"
- settings_items :facebook_pooling_time, :type => :integer, :default => 5 # Time in seconds
- settings_items :facebook_access_token, :type => :string, :default => 'CAAD8cd4tMVkBAO3sh2DrzwZCDfeQq9ZAvTz7Jz24ZC26KtMfBoljqaXhD2vBV1zpP0bjrpxXUBzJvKKcFzOm6rMG9Sok7iNVUaxt5iwr7dfMqCvHpMboKpqrqgeLrfCH5ITVTAdezA6ZBSr9iOJrqyCSOYfui0zTmbXJ3FqtshwNRrRy4NPH'
+ settings_items :facebook_page_id, :type => :string, :default => "participabr"
+ settings_items :facebook_pooling_time, :type => :integer, :default => 5 # Time in seconds
+ settings_items :facebook_access_token, :type => :string, :default => 'CAAD8cd4tMVkBAO3sh2DrzwZCDfeQq9ZAvTz7Jz24ZC26KtMfBoljqaXhD2vBV1zpP0bjrpxXUBzJvKKcFzOm6rMG9Sok7iNVUaxt5iwr7dfMqCvHpMboKpqrqgeLrfCH5ITVTAdezA6ZBSr9iOJrqyCSOYfui0zTmbXJ3FqtshwNRrRy4NPH'
settings_items :pinned_messages, :type => Array, :default => []
settings_items :pinned_mediations, :type => Array, :default => []
settings_items :mediators, :type => Array, :default => []
@@ -42,4 +42,8 @@ class CommunityHubPlugin::Hub < Folder
def view_page
"content_viewer/hub.rhtml"
end
+
+ def mediator?(user)
+ self.author.id == user.id || self.mediators.include?(user.id) ? true : false
+ end
end
diff --git a/plugins/community_hub/public/javascripts/community_hub.js b/plugins/community_hub/public/javascripts/community_hub.js
index 0c73d37..dd8141c 100644
--- a/plugins/community_hub/public/javascripts/community_hub.js
+++ b/plugins/community_hub/public/javascripts/community_hub.js
@@ -1,6 +1,11 @@
var latest_post_id = 0;
var oldest_post_id = 0;
live_scroll_position = 0;
+var mediations = [];
+
+function validate_textarea(txt) {
+ return (txt.search(/[^\n\s]/)!=-1);
+}
function clearLoadingMediationCommentSignal(mediation) {
jQuery(".loading-mediation-comment").filter("#" + mediation).removeClass("loading-signal-error");
@@ -24,8 +29,28 @@ function toogle_mediation_comments(mediation) {
function new_mediation_comment(button, mediation) {
+
+ if (!validate_textarea(jQuery("#mediation-comment-form-" + mediation + " textarea").val())) {
+ return false;
+ }
+
+ for (var i = 0; i < mediations.length; i++) {
+ mediation_id = mediations[i][0];
+ if (mediation_id == mediation) {
+ interval_id = mediations[i][1];
+ clearInterval( interval_id );
+ break;
+ }
+
+ }
+
+ mediations.splice(i, 1);
+
var form = jQuery(button).parents("form");
+ jQuery("#mediation-comment-form-" + mediation + " .submit").attr("disabled", true);
+
+ jQuery("body").addClass("loading");
jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-processing");
jQuery.post(form.attr("action"), form.serialize(), function(data) {
@@ -33,14 +58,22 @@ function new_mediation_comment(button, mediation) {
if (data.ok) {
jQuery("#mediation-comment-form-" + mediation + " textarea").val('');
jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-done");
- update_mediation_comments(mediation);
+ jQuery("body").removeClass("loading");
+ jQuery("#mediation-comment-form-" + mediation + " .submit").attr("disabled", false);
+ update_mediation_comments(mediation, false);
setTimeout(function(){
clearLoadingMediationCommentSignal(mediation);
}, 3000);
+ mediations.push( [ mediation, setInterval(function() { update_mediation_comments(mediation, false)}, 5000) ] );
}
else {
jQuery(".loading-mediation-comment").filter("#" + mediation).addClass("loading-signal-error");
- setTimeout(clearLoadingMessageSignal, 3000);
+ jQuery("body").removeClass("loading");
+ jQuery("#mediation-comment-form-" + mediation + " .submit").attr("disabled", false);
+ setTimeout(function(){
+ clearLoadingMediationCommentSignal(mediation);
+ }, 3000);
+ mediations.push( [ mediation, setInterval(function() { update_mediation_comments(mediation, false)}, 5000) ] );
}
}, 'json');
@@ -48,20 +81,33 @@ function new_mediation_comment(button, mediation) {
function new_message(button) {
+
+ if (!validate_textarea(jQuery(".hub .form-message #message_body").val())) {
+ return false;
+ }
+
var form = jQuery(button).parents("form");
+ jQuery(".hub .form-message .submit").attr("disabled", true);
+
+ jQuery("body").addClass("loading");
jQuery("#loading-message").addClass("loading-signal-processing");
jQuery.post(form.attr("action"), form.serialize(), function(data) {
jQuery("#loading-message").removeClass("loading-signal-processing");
if (data.ok) {
- jQuery(".hub .form #message_body").val('');
+ jQuery(".hub .form-message #message_body").val('');
jQuery("#loading-message").addClass("loading-signal-done");
- update_live_stream();
+ jQuery("body").removeClass("loading");
+ jQuery(".hub .form-message .submit").attr("disabled", false);
+ update_live_stream(false);
setTimeout(clearLoadingMessageSignal, 3000);
+
}
else {
jQuery("#loading-message").addClass("loading-signal-error");
+ jQuery("body").removeClass("loading");
+ jQuery(".hub .form-message .submit").attr("disabled", false);
setTimeout(clearLoadingMessageSignal, 3000);
}
}, 'json');
@@ -70,8 +116,16 @@ function new_message(button) {
function new_mediation(button) {
+
+ if (!validate_textarea(tinymce.get('article_body').getContent(''))) {
+ return false;
+ }
+
var form = jQuery(button).parents("form");
+ jQuery(".hub .form-mediation .submit").attr("disabled", true);
+
+ jQuery("body").addClass("loading");
jQuery("#loading-mediation").addClass("loading-signal-processing");
tinymce.triggerSave();
@@ -79,12 +133,16 @@ function new_mediation(button) {
jQuery("#loading-mediation").removeClass("loading-signal-processing");
if (data.ok) {
jQuery("#loading-mediation").addClass("loading-signal-done");
+ jQuery("body").removeClass("loading");
+ jQuery(".hub .form-mediation .submit").attr("disabled", false);
tinymce.get('article_body').setContent('');
update_mediations();
setTimeout(clearLoadingMediationSignal, 3000);
}
else {
jQuery("#loading-mediation").addClass("loading-signal-error");
+ jQuery("body").removeClass("loading");
+ jQuery(".hub .form-mediation .submit").attr("disabled", false);
setTimeout(clearLoadingMediationSignal, 3000);
}
}, 'json');
@@ -107,7 +165,6 @@ function promote_user(mediation, user_id) {
jQuery(".promote a").filter("#" + mediation).replaceWith( '
' );
},
error: function(ajax, stat, errorThrown) {
- console.log(stat);
}
});
@@ -131,7 +188,6 @@ function pin_message(post_id) {
jQuery(".pin a").filter("#" + post_id).replaceWith( '
' );
},
error: function(ajax, stat, errorThrown) {
- console.log(stat);
}
});
@@ -140,37 +196,44 @@ function pin_message(post_id) {
}
-function update_mediation_comments(mediation) {
+function update_mediation_comments(mediation, recursive) {
if (jQuery("#right-tab.show").size() != 0) {
- var hub_id = jQuery(".hub").attr('id');
+ if (jQuery(".hub #mediation-comment-list-" + mediation).css('display') != "none") {
- if (jQuery("#mediation-comment-list-" + mediation + " li").first().length == 0) {
- var latest_post_id = 0;
- }
- else {
- var latest_post_id = jQuery("#mediation-comment-list-" + mediation + " li.mediation-comment").last().attr('id');
- }
+ var hub_id = jQuery(".hub").attr('id');
- jQuery.ajax({
- url: '/plugin/community_hub/public/newer_mediation_comment',
- type: 'get',
- data: { latest_post: latest_post_id, mediation: mediation },
- success: function(data) {
- if (data.trim().length > 0) {
- jQuery("#mediation-comment-list-" + mediation + "").append(data);
- jQuery("#mediation-comment-total-" + mediation).html(jQuery("#mediation-comment-list-" + mediation + " li.mediation-comment").size());
- }
- },
- error: function(ajax, stat, errorThrown) {
- console.log(stat);
+ if (jQuery("#mediation-comment-list-" + mediation + " li").first().length == 0) {
+ var latest_post_id = 0;
}
- });
+ else {
+ var latest_post_id = jQuery("#mediation-comment-list-" + mediation + " li.mediation-comment").last().attr('id');
+ }
+
+ jQuery.ajax({
+ url: '/plugin/community_hub/public/newer_mediation_comment',
+ type: 'get',
+ data: { latest_post: latest_post_id, mediation: mediation },
+ success: function(data) {
+ if (data.trim().length > 0) {
+ jQuery("#mediation-comment-list-" + mediation + "").append(data);
+ jQuery("#mediation-comment-total-" + mediation).html(jQuery("#mediation-comment-list-" + mediation + " li.mediation-comment").size());
+ }
+ },
+ error: function(ajax, stat, errorThrown) {
+ }
+ });
+
+ }
}
- setTimeout(function() { update_mediation_comments(mediation); }, 5000);
+ if (recursive) {
+ setTimeout(function() {
+ update_mediation_comments(mediation, true);
+ }, 5000);
+ }
}
@@ -197,17 +260,16 @@ function update_mediations() {
}
},
error: function(ajax, stat, errorThrown) {
- console.log(stat);
}
});
}
- setTimeout(update_mediations, 5000);
+ setTimeout(update_mediations, 10000);
}
-function update_live_stream() {
+function update_live_stream(recursive) {
if (jQuery("#left-tab.show").size() != 0) {
@@ -233,16 +295,23 @@ function update_live_stream() {
else {
jQuery("#live-posts").scrollTop(live_scroll_position);
}
+ if (first_hub_load) {
+ jQuery("body").removeClass("loading");
+ first_hub_load = false;
+ }
}
},
error: function(ajax, stat, errorThrown) {
- console.log(stat);
}
});
}
- setTimeout(update_live_stream, 5000);
+ if (recursive) {
+ setTimeout(function() {
+ update_live_stream(true);
+ }, 5000);
+ }
}
function hub_left_tab_click() {
@@ -260,9 +329,7 @@ function hub_right_tab_click() {
jQuery(".hub #left-tab.hide").click(hub_left_tab_click);
}
-function marcelo() {
- console.log('teste!');
-}
+first_hub_load = true;
jQuery(document).ready(function() {
jQuery("#live-posts").scroll(function() {
@@ -271,6 +338,8 @@ jQuery(document).ready(function() {
jQuery(".hub #right-tab.hide").click(hub_right_tab_click);
- setTimeout(update_live_stream, 5000);
- setTimeout(update_mediations, 5000);
+ jQuery("body").addClass("loading");
+
+ update_live_stream(true);
+ update_mediations();
});
diff --git a/plugins/community_hub/public/style.css b/plugins/community_hub/public/style.css
index b1b5dc7..fe86594 100644
--- a/plugins/community_hub/public/style.css
+++ b/plugins/community_hub/public/style.css
@@ -1,11 +1,3 @@
-/*div.content-tab.show {
- display: block;
-}
-
-div.content-tab.hide {
- display: none;
-}*/
-
#banner-embed-container {
width: 49%;
float: right;
@@ -17,62 +9,7 @@ div.content-tab.hide {
height: 350px;
}
-/*.hub #left-tab {
- comentado-border: 0px solid lightGray;-comentado
- border: 1px solid red;
- display: inline-block;
- float: left;
- width: 49%;
- margin-bottom: 2em;
- cursor: pointer;
-}*/
-
-/*.hub #right-tab {
- border: 1px solid green;
- display: inline-block;
- clear: right;
- float: none;
- margin-left: 1%;
- width: 50%;
- margin-bottom: 2em;
- cursor: pointer;
-}*/
-
-.hub #content-tab {
-}
-
-/*.hub #left-tab .on-air {
- background-color: #d40000;
- border-radius: 10px 10px 10px 10px;
- color: white;
- display: inline-block;
- font-size: 16px;
- font-weight: bold;
- padding: 0 0.5em;
- text-align: center;
- text-transform: uppercase;
- vertical-align: top;
- width: 20%;
-
-}
-
-.hub #left-tab .off-air {
- background-color: gray;
- border-radius: 10px 10px 10px 10px;
- color: black;
- display: inline-block;
- font-size: 16px;
- font-weight: bold;
- padding: 0 0.5em;
- text-align: center;
- text-transform: uppercase;
- vertical-align: top;
- width: 20%;
-}
-*/
-
#hub-loading {
- /*margin-top: 18px;*/
float: right;
}
@@ -81,10 +18,6 @@ div.content-tab.hide {
background-image: url(/plugins/community_hub/icons/community-hub.png)
}
-.hub {
- /*border: 1px solid red;*/
-}
-
.hub ul {padding-left: 0px; margin-top: 0;}
#content .hub h1{
@@ -135,11 +68,6 @@ div.content-tab.hide {
max-width: 43px;
}
-/*.hub .message{
- display: inline-block;
- width: 70%;
-}*/
-
.hub .message {
display: inline-block;
width: 65%;
@@ -151,14 +79,6 @@ div.content-tab.hide {
width: 80%;
}
-/*.hub .message .author {
- font-weight: bold;
- float: left;
- display: inline-block;
- line-height: 16px;
- margin-right: 5px;
-}*/
-
.hub .message .author {
font-weight: bold;
display: inline-block;
@@ -176,9 +96,7 @@ div.content-tab.hide {
.hub .mediation-bar ul li {
display: inline-block;
- /*margin-right: 5px;*/
overflow: hidden;
- /*text-indent: -1000px;*/
width: 16px;
}
@@ -200,23 +118,11 @@ div.content-tab.hide {
text-indent: -10000px;
}
-/*
-.hub .promoted {
- background: url("images/hub-promote-icon.png") no-repeat center center #fff;
-}*/
-
.hub .not-promoted {
- /*background: url("images/hub-not-promote-icon.png") no-repeat center center #fff;*/
opacity: 0.5;
filter: alpha(opacity=50);
}
-/*
-.hub .pin {
- background: url("images/hub-pin-icon.png") no-repeat center center #fff;
-}
-*/
-
.hub .pin .not-pinned {
opacity: 0.5;
filter: alpha(opacity=50);
@@ -247,8 +153,6 @@ div.content-tab.hide {
display: block;
}
-/**/
-
.hub .live {
border: 0px solid lightGray;
display: inline-block;
@@ -265,7 +169,6 @@ div.content-tab.hide {
border-style: solid;
border-color: lightGray;
padding-top: 10px;
-/*border: 1px solid red;*/
}
@@ -343,16 +246,13 @@ div.content-tab.hide {
}
#content .hub .live.hide h1 .title {
- /*display: inline-block;*/
display: none;
}
#content .hub .live.hide .on-air,
#content .hub .live.hide .off-air {
- width: auto;
+ width: auto;
}
-
-
/****fim aba live fechada****/
/****aba live aberta****/
@@ -361,12 +261,6 @@ div.content-tab.hide {
width: 85%;
}
-/*.hub .live.show ul#live-posts{
- overflow-x: hidden;
- overflow-y: scroll;
- background-color: #fff;
-}*/
-
.hub .live.show ul#live-posts .li{
}
@@ -377,13 +271,6 @@ float: right;
margin-right: 10px;
}
-/*#content .hub .live.show .on-air,
-#content .hub .live.show .off-air {
- width: 20%;
-}*/
-
-
-
/****fim aba mlive aberta****/
@@ -412,7 +299,6 @@ margin-right: 10px;
font-family: Arial Black, arial, sans-serif;
padding-right: 0;
width: 100%;
- /*font-variant: normal;*/
}
.hub .mediation .expand {
float: right;
@@ -445,7 +331,6 @@ margin-right: 10px;
font-family: Arial Black, arial, sans-serif;
padding-right: 0;
width: 100%;
- /*font-variant: normal;*/
}
.hub .mediation.hide .expand {
display: none;
@@ -493,7 +378,6 @@ display: none;
font-family: Arial Black, arial, sans-serif;
padding-right: 0;
width: 100%;
- /*font-variant: normal;*/
}
.hub .mediation.show .expand {
float: right;
@@ -521,8 +405,6 @@ background-color: #f9f9f9;
/****fim aba mediation aberta****/
.hub .form-mediation {
- /*clear: left;*/
- /*float: left;*/
width: 93%;
display: inline-block;
height: 376px;
@@ -531,8 +413,6 @@ background-color: #f9f9f9;
}
.hub .form-message {
- /*clear: left;*/
- /*float: left;*/
width: 93%;
display: inline-block;
height: 148px;
@@ -560,10 +440,8 @@ background-color: #f9f9f9;
}
.hub div.banner {
- /*width: 50%;*/
height: 70px;
background-color: #6d6d6d;
- /*float: right;*/
text-align: center;
padding-top: 30px;
}
@@ -573,17 +451,13 @@ background-color: #f9f9f9;
font-family: Arial Black, arial, sans-serif;
font-size: large;
font-weight: normal;
- /*margin-top: 35px;*/
display: block;
}
.hub div.embed {
margin-top: 10px;
padding: 8px;
- /*width: 48%;*/
- /*height: 216px;*/
border: 1px solid #c0c0c0;
- /*float: right;*/
}
.hub div.embed textarea.code {
@@ -612,27 +486,11 @@ background-color: #f9f9f9;
margin-top: 10px;
}
-.hub .settings .twitter, .hub .settings .facebook, .hub .settings .general {
- /* border: 1px solid red;*/
-}
-
textarea#message_body {
width: auto;
margin-left: 80px;
}
-/*
-.comment-count {
- margin-left: 80px;
- padding: 5px 10px;
- background-color: white;
- display: inline-block;
- border-radius: 5px;
- font-weight: bold;
- margin-bottom: -5px;
-}
-*/
-
.comment-count {
margin-left: 80px;
padding: 5px 10px;
@@ -680,5 +538,3 @@ textarea#message_body {
.loading-signal-processing {
background-image: url(/plugins/community_hub/icons/hub-samarelo.gif);
}
-
-
diff --git a/plugins/community_hub/views/cms/community_hub_plugin/_hub.rhtml b/plugins/community_hub/views/cms/community_hub_plugin/_hub.rhtml
index 384d35a..7ec79d2 100644
--- a/plugins/community_hub/views/cms/community_hub_plugin/_hub.rhtml
+++ b/plugins/community_hub/views/cms/community_hub_plugin/_hub.rhtml
@@ -5,7 +5,8 @@
<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %>