Updated Facebook set
This commit is contained in:
parent
cfda9365ab
commit
5bab384195
|
@ -55,7 +55,6 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@item = Page.find(params[:page_id]) rescue nil
|
@item = Page.find(params[:page_id]) rescue nil
|
||||||
@fb_share = eval(params[:facebook_share]) rescue false
|
|
||||||
if params[:preview] == "true"
|
if params[:preview] == "true"
|
||||||
preview_content
|
preview_content
|
||||||
else
|
else
|
||||||
|
|
|
@ -38,20 +38,4 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%#= share_links(@bulletin, 'announcement') %>
|
<%= share_links(@bulletin, 'announcement') %>
|
||||||
<% if @fb_share %>
|
|
||||||
<a href="" target="_blank" class="fb-share-button">
|
|
||||||
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
|
|
||||||
</a>
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function(){
|
|
||||||
$(".fb-share-button").click(function(){
|
|
||||||
var img = window.location.protocol + "//" + window.location.host + "<%= @bulletin.image.url rescue '' %>",
|
|
||||||
url = "https://www.facebook.com/sharer/sharer.php?s=100&p[title]=<%= @bulletin.title %>&p[images][0]=" + img + "&p[url]="+window.location.href;
|
|
||||||
newwindow = window.open(url,'name','height=500,width=1024');
|
|
||||||
if (window.focus) {newwindow.focus()}
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<% end %>
|
|
|
@ -38,7 +38,6 @@ module Announcement
|
||||||
enable ["typeA", "typeB_style3", "typeC"]
|
enable ["typeA", "typeB_style3", "typeC"]
|
||||||
image :image
|
image :image
|
||||||
field :postdate
|
field :postdate
|
||||||
facebook_enabled false
|
|
||||||
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
|
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
|
||||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
|
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
|
||||||
field :subtitle
|
field :subtitle
|
||||||
|
|
Loading…
Reference in New Issue