Ray's changes for front-end banner

This commit is contained in:
Christophe Vilayphiou 2012-05-08 17:21:26 +08:00
parent 2aaff21000
commit a3868cb785
8 changed files with 76 additions and 18 deletions

BIN
app/assets/images/Thumbs.db Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
#banner_nav {
position: absolute;
z-index: 10;
bottom: 0;
margin-right: 5px;
right: 0;
}
#banner_nav>li {
float: left;
display: inline-block;
*display: inline;
}
#banner_nav>li>a {
width: 10px;
height: 10px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
background-color: #FFFFFF;
opacity: .5;
filter: alpha(opacity = 50);
margin: 0 4px 10px;
text-indent: -9999px;
box-shadow: 0 0 5px rgba(0,0,0,.7);
}
#banner_nav>li>a:hover {
opacity: 1;
filter: alpha(opacity = 100);
}
#banner_nav>li.activeSlide>a {
opacity: 1;
filter: alpha(opacity = 100);
}

View File

@ -10,7 +10,7 @@
} }
.checkbox{ .checkbox{
padding: 5px; padding: 5px;
margin: 0; margin: 10px;
display: inline-block; display: inline-block;
color:#777777; color:#777777;
text-shadow: 0 1px 0px rgba(255,255,255,.4); text-shadow: 0 1px 0px rgba(255,255,255,.4);
@ -20,7 +20,7 @@
border-style: solid; border-style: solid;
border-width: 0px 1px 1px 0; border-width: 0px 1px 1px 0;
border-color: #dfdfdf; border-color: #dfdfdf;
/*background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) ); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% ); background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf'); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
@ -28,7 +28,7 @@
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
border-radius: 3px; border-radius: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px;*/ -webkit-border-radius: 3px;
} }
.checkbox .check-icon { .checkbox .check-icon {
display: none; display: none;
@ -79,4 +79,7 @@ img.member-img {
} }
.popover-content p { .popover-content p {
font-size: 12px; font-size: 12px;
}
.preview_trigger {
margin: 5px 10px 0 0;
} }

View File

@ -132,7 +132,7 @@ module ApplicationHelper
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n" stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
end end
stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css
# stylesheets << "<link href='/assets/menu.css' rel='stylesheet' type='text/css' />\n" stylesheets << "<link href='#{asset_path 'banner_nav.css'}' rel='stylesheet' type='text/css' />\n"
stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css
theme = page.design.themes.detect{ |d| d.id == page.theme_id } theme = page.design.themes.detect{ |d| d.id == page.theme_id }
stylesheets << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />\n" if theme stylesheets << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />\n" if theme

View File

@ -9,15 +9,17 @@
<% end %> <% end %>
</ul> </ul>
<div class="tab-content form-horizontal"> <div class="tab-content form-horizontal">
<div class="control-group"> <div class="control-group" style="margin-bottom: 0;">
<label class="control-label"><%= t 'admin.site_title' %></label>
<div class="controls"> <div class="controls">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %> <label class="checkbox">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
</label>
</div> </div>
</div> </div>
<% @site_valid_locales.each do |locale|%> <% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'admin.site_title' %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :title, @site.title do |f| %> <%= f.fields_for :title, @site.title do |f| %>
<%= f.text_field locale, :class => "input-xxlarge" %> <%= f.text_field locale, :class => "input-xxlarge" %>

View File

@ -41,8 +41,19 @@ module ParserCommon
ad_banner = AdBanner.find(banner["id"]) rescue nil ad_banner = AdBanner.find(banner["id"]) rescue nil
if ad_banner if ad_banner
res << "<script type='text/javascript'> res << "<script type='text/javascript'>
$(document).ready(function(){ $('#slideshow-#{ad_banner.title.dehumanize}').cycle({delay: -1000, fx: '#{ad_banner.ad_fx.nil?? 'fade': ad_banner.ad_fx}', timeoutFn: getTimeout }); }); $(document).ready(function(){
$('#slideshow-#{ad_banner.title.dehumanize}').cycle({
delay: -1000,
fx: '#{ad_banner.ad_fx.nil? ? 'fade': ad_banner.ad_fx}',
timeoutFn: getTimeout,
pager: '#banner_nav',
pagerAnchorBuilder: function(idx, slide) {
return \"<li><a href='#'>sfdsfsf</a></li>\";
}
});
});
</script>" </script>"
res << "<ul id='banner_nav' class='clear'></ul>"
res << "<div id='slideshow-#{ad_banner.title.dehumanize}'>" res << "<div id='slideshow-#{ad_banner.title.dehumanize}'>"
printable_ad_images = [] printable_ad_images = []
ad_banner.ad_images.each do |ad_image| ad_banner.ad_images.each do |ad_image|
@ -55,7 +66,7 @@ module ParserCommon
printable_ad_images.shuffle! printable_ad_images.shuffle!
printable_ad_images.each do |ad_image| #TODO Need Reflact printable_ad_images.each do |ad_image| #TODO Need Reflact
res << "<img src='#{ad_image.file}' " res << "<img src='#{ad_image.file}' "
res << "alt='#{ad_image.title || ' '}' " res << "alt='#{ad_image.title[I18n.locale] || ' '}' "
res << "time_to_next='#{ad_banner.transition_msec}' " res << "time_to_next='#{ad_banner.transition_msec}' "
res << "link_open='#{ad_image.link_open}' " res << "link_open='#{ad_image.link_open}' "
# res << "link_url='#{(ad_image.direct_to_after_click?? ad_image.out_link : ad_banner.context) || ' '}' " # res << "link_url='#{(ad_image.direct_to_after_click?? ad_image.out_link : ad_banner.context) || ' '}' "

View File

@ -91,12 +91,20 @@
</div> </div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3> <h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<div class="widget-content clear form-horizontal"> <div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %> <p>
<%= content_tag :label,:class => "checkbox inline" do -%> <% @tags.each do |tag| %>
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%> <%= content_tag :label,:class => "checkbox inline" do -%>
<%= tag[I18n.locale] %> <%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<% end %>
<% end %> <% end %>
<% end %> </p>
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
<hr>
<input type="text" class="input-xlarge">
</div> </div>
</div> </div>
<% if params[:action] != 'new' %> <% if params[:action] != 'new' %>

View File

@ -16,9 +16,9 @@
</table> </table>
<% end %> <% end %>
<div id="web_link_pagination" class="paginationFixed">
<%= paginate @web_links, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path, :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path, :class => 'btn btn-primary pull-right' %>
<div id="web_link_pagination" class="paginationFixed">
<%= paginate @web_links, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div> </div>