Fix bug.
This commit is contained in:
parent
6eb97bddae
commit
174e0d657b
|
@ -193,7 +193,8 @@ module AnnouncementsHelper
|
||||||
page_number = 1 if page_number == 0
|
page_number = 1 if page_number == 0
|
||||||
page_data_count = data_count || OrbitHelper.page_data_count.to_i
|
page_data_count = data_count || OrbitHelper.page_data_count.to_i
|
||||||
feeds_anns = []
|
feeds_anns = []
|
||||||
page = Page.where(url:params['url']).first
|
page = OrbitHelper.page rescue nil
|
||||||
|
page = Page.where(url:params['url']).first if page.nil?
|
||||||
if @type == "show_widget"
|
if @type == "show_widget"
|
||||||
tags = @tags
|
tags = @tags
|
||||||
categories = @categories
|
categories = @categories
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
for(var i=0;i< lilength -num ; i++)
|
for(var i=0;i< lilength -num ; i++)
|
||||||
$(v).find('ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
|
$(v).find('ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
|
||||||
})
|
})
|
||||||
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
|
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
|
||||||
};
|
};
|
||||||
$(window).resize(function(){
|
$(window).resize(function(){
|
||||||
if($(window).width()>1024){
|
if($(window).width()>1024){
|
||||||
|
|
Loading…
Reference in New Issue