Compare commits

..
8 changed files with 21 additions and 22 deletions

No files matched your search

+7 -1
View File
@@ -1,5 +1,5 @@
<div style='position:relative'> <div style='position:relative'>
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-fx="<%= @ad_banner.ad_fx %>" data-cycle-pager=".banner_nav_<%= @ad_banner.title.dehumanize %>" data-cycle-pager-template="<li><a href='#'></a></li>" data-cycle-pager-active-class="activeSlide" data-cycle-random='true' style="z-index: 0"> <div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-fx="<%= @ad_banner.ad_fx %>" data-cycle-pager=".banner_nav_<%= @ad_banner.title.dehumanize %>" data-cycle-pager-template="<li class='needed'><a href='#'></a></li>" data-cycle-pager-active-class="activeSlide" data-cycle-random='true' style="z-index: 0">
<% @ad_banner.ad_images.can_display.each do |ad_image| %> <% @ad_banner.ad_images.can_display.each do |ad_image| %>
<% link = ad_image_link(ad_image) %> <% link = ad_image_link(ad_image) %>
<%= image_tag ad_image.file, width: @ad_banner.width, height: @ad_banner.height, link_open: ad_image.link_open, link_url: link, style: "display:none; #{'cursor:pointer;' if link.present?}" %> <%= image_tag ad_image.file, width: @ad_banner.width, height: @ad_banner.height, link_open: ad_image.link_open, link_url: link, style: "display:none; #{'cursor:pointer;' if link.present?}" %>
@@ -17,6 +17,12 @@
<% end %> <% end %>
$.preload(a, 2, function(){ $.preload(a, 2, function(){
$('.orbit-cycle-slideshow').cycle(); $('.orbit-cycle-slideshow').cycle();
var lis = $("ul.banner_nav_<%= @ad_banner.title.dehumanize %> li");
if( lis.length > a.length ){
for( i = lis.length - 1; i > a.length - 1; i-- ){
lis[i].remove();
}
}
}); });
} }
else{ else{
+1 -1
View File
@@ -24,4 +24,4 @@ production:
# password: <%= ENV['MONGOID_PASSWORD'] %> # password: <%= ENV['MONGOID_PASSWORD'] %>
# database: <%= ENV['MONGOID_DATABASE'] %> # database: <%= ENV['MONGOID_DATABASE'] %>
<<: *defaults <<: *defaults
database: test_site database: orbit_site_new
+1 -7
View File
@@ -48,13 +48,7 @@ module ParserFrontEnd
ret = '' ret = ''
part = PagePart.find(front['part_id']) if front['part_id'] part = PagePart.find(front['part_id']) if front['part_id']
ret << eval("\"#{front['path']}\"") rescue '' ret << eval("\"#{front['path']}\"") rescue ''
args.each do |index,arg| ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
if index=="tag_id" || index=="category_id"
ret << (ret.include?("?") ? "&#{index}[]=#{arg}": "?#{index}[]=#{arg}" )
else
ret << (ret.include?("?") ? "&#{index}=#{arg}": "?#{index}=#{arg}" )
end
end if args
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>") fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
end end
front.swap(fragment) front.swap(fragment)
+1 -1
View File
@@ -37,7 +37,7 @@ module Announcement
image :image image :image
field :postdate field :postdate
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 => [:bulletin_category,:id]}} link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
field :subtitle field :subtitle
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus' link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end end
@@ -37,14 +37,14 @@ class Panel::Faq::FrontEnd::QasController < OrbitWidgetController
def show def show
@qa = Qa.find(params[:id]) @qa = Qa.find(params[:id])
get_categorys # get_categorys
end end
protected protected
def get_categorys def get_categorys
@qa_categorys = QaCategory.excludes('disable' => true) # @qa_categorys = QaCategory.excludes('disable' => true)
end end
end end
+1 -1
View File
@@ -22,7 +22,7 @@ class Qa
accepts_nested_attributes_for :qa_files, :allow_destroy => true accepts_nested_attributes_for :qa_files, :allow_destroy => true
accepts_nested_attributes_for :qa_links, :allow_destroy => true accepts_nested_attributes_for :qa_links, :allow_destroy => true
belongs_to :qa_category # belongs_to :qa_category
before_save :clean_values before_save :clean_values
@@ -2,7 +2,7 @@
<h1 class="h1"><%= @qa.title %></h1> <h1 class="h1"><%= @qa.title %></h1>
<div class="info"> <div class="info">
<div class="info1"> <div class="info1">
<span><%= t(:category) %>:<%= @qa.qa_category.title rescue nil %></span> <span><%= t(:category) %>:<%= @qa.category.title rescue nil %></span>
</div> </div>
</div> </div>
<div class="news_paragraph"> <div class="news_paragraph">
+7 -8
View File
@@ -16,7 +16,7 @@ module Faq
end end
end end
category ["QaCategory"] # category ["QaCategory"]
data_count 1..20 data_count 1..20
taggable taggable
@@ -25,9 +25,9 @@ module Faq
widgets do widgets do
default_widget do default_widget do
query 'Qa.all' query 'Qa'
# enable ['typeA'] enable ['typeA']
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}} link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}}
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self} link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more' link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
end end
@@ -45,7 +45,7 @@ module Faq
side_bar do side_bar do
head_label_i18n 'faq.faq',:icon_class=>"icons-help" head_label_i18n 'faq.faq',:icon_class=>"icons-help"
available_for [:admin,:guest,:manager,:sub_manager] available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['qas', 'qa_categorys']}) active_for_controllers ({:private=>['qas', 'qa_categorys','module_tags', 'categories']})
active_for_object_auth ['QaCategory'] active_for_object_auth ['QaCategory']
head_link_path "panel_faq_back_end_qas_path" head_link_path "panel_faq_back_end_qas_path"
@@ -65,11 +65,10 @@ module Faq
context_link 'categories', context_link 'categories',
:link_path=>"admin_module_app_categories_path(get_module_app)" , :link_path=>"admin_module_app_categories_path(get_module_app)" ,
:priority=>3, :priority=>3,
:active_for_category => 'Qa', :active_for_category => 'Faq',
:available_for => [:manager] :available_for => [:manager]
context_link 'tags', context_link 'tags',
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Faq'}))" , :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
:priority=>4, :priority=>4,
:active_for_tag => 'Faq', :active_for_tag => 'Faq',
:available_for => [:manager] :available_for => [:manager]