From 0fe5baf93f449b55db16b827cb730f95d612c52d Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 13 Apr 2012 16:14:43 +0800 Subject: [PATCH 1/2] fix for letting ad_banner display even when file in not uploaded --- app/assets/stylesheets/widget.css | 2 +- app/views/admin/ad_banners/_ad_image_update.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/widget.css b/app/assets/stylesheets/widget.css index f1c4d615..7a658f36 100644 --- a/app/assets/stylesheets/widget.css +++ b/app/assets/stylesheets/widget.css @@ -58,7 +58,7 @@ cursor: pointer; } .select-role { - display:none; + display:none; padding: 10px 0; } .file-upload { diff --git a/app/views/admin/ad_banners/_ad_image_update.html.erb b/app/views/admin/ad_banners/_ad_image_update.html.erb index 366d370d..b87e5684 100644 --- a/app/views/admin/ad_banners/_ad_image_update.html.erb +++ b/app/views/admin/ad_banners/_ad_image_update.html.erb @@ -1,5 +1,5 @@
  • - <%= image_tag ad_image.file %> + <%= image_tag ad_image.file rescue nil%>

    <%= ad_image.display? ? '[Showing]' : '[NotShawing]' %> <%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %> From 4af73ecf6fcee27a5b44a35d8829c5d862f62ce0 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 13 Apr 2012 16:46:16 +0800 Subject: [PATCH 2/2] fix preview window size. --- app/assets/stylesheets/admin/ad_banner_preview.css.erb | 4 ++++ app/views/admin/ad_banners/_preview_block.html.erb | 2 +- app/views/admin/ad_banners/index.html.erb | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 app/assets/stylesheets/admin/ad_banner_preview.css.erb diff --git a/app/assets/stylesheets/admin/ad_banner_preview.css.erb b/app/assets/stylesheets/admin/ad_banner_preview.css.erb new file mode 100644 index 00000000..f46be689 --- /dev/null +++ b/app/assets/stylesheets/admin/ad_banner_preview.css.erb @@ -0,0 +1,4 @@ +.banner-preview { + width: auto; + left: 35%; +} \ No newline at end of file diff --git a/app/views/admin/ad_banners/_preview_block.html.erb b/app/views/admin/ad_banners/_preview_block.html.erb index 4e8432b6..c2185d04 100644 --- a/app/views/admin/ad_banners/_preview_block.html.erb +++ b/app/views/admin/ad_banners/_preview_block.html.erb @@ -1,7 +1,7 @@ <% if ad_banner -%> <%= link_to 'Preview',"#slideshow-#{ad_banner.title.dehumanize}",:class=>"btn btn-primary btn-large",:data=>{:toggle=>'modal'} %> -