Fix link for ad_banner
Add missing helper for web_link_category Show design's js in front-end
This commit is contained in:
parent
736bda0679
commit
be00cec4d7
|
@ -209,7 +209,7 @@ module ApplicationHelper
|
||||||
javascripts << "<script type='text/javascript' src='/assets/lib/social-share-button.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/lib/social-share-button.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||||
page.design.javascripts.each do |js|
|
page.design.javascripts.each do |js|
|
||||||
# javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||||
end
|
end
|
||||||
javascripts
|
javascripts
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||||
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
||||||
<% if ad_image.display? %>
|
<% if ad_image.display? %>
|
||||||
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= (ad_image.direct_to_after_click? ? ad_image.out_link : ad_image.context) || ' ' %>' link_url='<%= (ad_image.out_link) %>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/>
|
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= (ad_image.out_link) %>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@ function getTimeout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.slideshow').children('img').click(function()
|
$(document).on('click', '.slideshow img', function()
|
||||||
{
|
{
|
||||||
if($(this).attr('link_url')!='')
|
if($(this).attr('link_url')!='')
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
module Panel::WebResource::BackEnd::WebLinkCategorysHelper
|
||||||
|
include ActionView::Helpers::UrlHelper
|
||||||
|
|
||||||
|
def show_web_link_permission_link(web_link)
|
||||||
|
type = 'edit'
|
||||||
|
oa = web_link.get_object_auth_by_title(type)
|
||||||
|
if oa.nil?
|
||||||
|
web_link.object_auths.new(title: type ).save
|
||||||
|
oa = web_link.get_object_auth_by_title(type)
|
||||||
|
end
|
||||||
|
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue