From cf038183b9aa4a4f606a8b119c89aa21410929a2 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Sun, 19 Feb 2012 17:43:47 +0800 Subject: [PATCH] Ika's changes in modules --- Gemfile | 1 + Gemfile.lock | 4 + app/assets/stylesheets/sidebar.css.erb | 177 +++++++++--------- app/models/design/design.rb | 2 +- public/static/kernel.js | 2 +- .../front_end/bulletins/index.html.erb | 4 +- .../widget/bulletins/index.html.erb | 26 +-- .../front_end/posts/_post_frontend.html.erb | 19 +- .../new_blog/front_end/posts/index.html.erb | 7 +- 9 files changed, 129 insertions(+), 113 deletions(-) diff --git a/Gemfile b/Gemfile index e7f88e3f..8c6b990d 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,7 @@ gem 'ruby-debug19' gem 'rubyzip' gem 'sinatra' gem 'sprockets' +gem 'therubyracer' # For linux gem 'tinymce-rails' # Gems used only for assets and not required diff --git a/Gemfile.lock b/Gemfile.lock index 92db033d..28e1ac54 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,6 +79,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) railties (>= 3.0.0) + libv8 (3.3.10.4) linecache19 (0.5.12) ruby_core_source (>= 0.1.4) mail (2.3.0) @@ -174,6 +175,8 @@ GEM rack (~> 1.0) tilt (~> 1.1, != 1.3.0) subexec (0.2.1) + therubyracer (0.9.9) + libv8 (~> 3.3.10) thor (0.14.6) tilt (1.3.3) tinymce-rails (3.4.8) @@ -229,6 +232,7 @@ DEPENDENCIES sinatra spork sprockets + therubyracer tinymce-rails uglifier watchr diff --git a/app/assets/stylesheets/sidebar.css.erb b/app/assets/stylesheets/sidebar.css.erb index a0457476..f5a5d572 100644 --- a/app/assets/stylesheets/sidebar.css.erb +++ b/app/assets/stylesheets/sidebar.css.erb @@ -1,85 +1,94 @@ - -#back_sidebar { - background: url(<%= asset_path "75.png" %>) repeat scroll left top transparent; - box-shadow: 3px 0 4px #472A12; - border-right: 1px solid #121212; - height: 100%; - left: 0; - position: fixed; - top: 0; - width: 220px; -} - -#back_sidebar h1 { - background: url(<%= asset_path "h1_bg.png" %>) repeat-x scroll left top transparent; - border-bottom: 1px solid #1B1B1B; - border-top: 1px solid #424344; - color: #FFFFFF; - font-size: 16px; - font-weight: normal; - height: 40px; - line-height: 40px; - margin: 0; - padding-left: 10px; - text-shadow: 0 -1px 0 #000000; -} -#back_sidebar .list { - color:#fff; - font-size:12px; - background:url(<%= asset_path "line.png" %>) repeat-x left bottom; -} -#back_sidebar .list li { - background:url(<%= asset_path "sidebar_li.jpg" %>) repeat-x left top; - border-top:1px solid #424344; - border-bottom:1px solid #000000; -} -#back_sidebar .list li:hover { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#back_sidebar .list li a { - display: block; - padding: 7px 0 6px 12px; - color:#c4c4c4; -} -#back_sidebar .list li a span { - background:url(<%= asset_path "add_mamber.png" %>) left top no-repeat; - text-shadow: 0px 1px 0px #000; - line-height: 18px; - padding: 2px 0 1px 35px; -} -#back_sidebar .list li a:hover span { - background-position:left bottom; - color:#eeeeee; -} -#back_sidebar .users .list .set_1 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#back_sidebar .users .list .set_1 a span { - background-position:left bottom; - color:#eeeeee; -} -#back_sidebar .roles .list .set_2 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#back_sidebar .roles .list .set_2 a span { - background-position:left bottom; - color:#eeeeee; -} -#sidebar .infos .list .set_3 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#sidebar .infos .list .set_3 a span { - background-position:left bottom; - color:#eeeeee; -} -#sidebar .translations_setup { - margin-top: 42px; + +#back_sidebar { + background: url(<%= asset_path "75.png" %>) repeat scroll left top transparent; + box-shadow: 3px 0 4px #472A12; + border-right: 1px solid #121212; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 220px; +} + +#back_sidebar h1 { + background: url(<%= asset_path "h1_bg.png" %>) repeat-x scroll left top transparent; + border-bottom: 1px solid #1B1B1B; + border-top: 1px solid #424344; + color: #FFFFFF; + font-size: 16px; + font-weight: normal; + height: 40px; + line-height: 40px; + margin: 0; + padding-left: 10px; + text-shadow: 0 -1px 0 #000000; +} +#back_sidebar .list { + background:url(<%= asset_path "line.png" %>) repeat-x left bottom; + color:#fff; + font-size:12px; + margin:0; + padding:0; +} +#back_sidebar .list li { + background:url(<%= asset_path "sidebar_li.jpg" %>) repeat-x left top; + border-top:1px solid #424344; + border-bottom:1px solid #000000; + list-style:none; +} +#back_sidebar .list li:hover { + background-position:left bottom; + border-top:1px solid #406cc3; + border-bottom:1px solid #242628; +} +#back_sidebar .list li a { + display: block; + padding: 7px 0 6px 12px; + color:#c4c4c4; +} +#back_sidebar .list li a span { + background:url(<%= asset_path "add_mamber.png" %>) left top no-repeat; + text-shadow: 0px 1px 0px #000; + line-height: 18px; + padding: 2px 0 1px 35px; +} +#back_sidebar .list li a:hover span { + background-position:left bottom; + color:#eeeeee; +} +#back_sidebar .list li ul{ + padding:0 0 0 15px; +} +#back_sidebar .list li ul ul{ + padding:0; +} +#back_sidebar .users .list .set_1 { + background-position:left bottom; + border-top:1px solid #406cc3; + border-bottom:1px solid #242628; +} +#back_sidebar .users .list .set_1 a span { + background-position:left bottom; + color:#eeeeee; +} +#back_sidebar .roles .list .set_2 { + background-position:left bottom; + border-top:1px solid #406cc3; + border-bottom:1px solid #242628; +} +#back_sidebar .roles .list .set_2 a span { + background-position:left bottom; + color:#eeeeee; +} +#sidebar .infos .list .set_3 { + background-position:left bottom; + border-top:1px solid #406cc3; + border-bottom:1px solid #242628; +} +#sidebar .infos .list .set_3 a span { + background-position:left bottom; + color:#eeeeee; +} +#sidebar .translations_setup { + margin-top: 42px; } \ No newline at end of file diff --git a/app/models/design/design.rb b/app/models/design/design.rb index d2ad07aa..7fbacedc 100644 --- a/app/models/design/design.rb +++ b/app/models/design/design.rb @@ -20,7 +20,7 @@ class Design validates_presence_of :title validates_presence_of :author - # after_save :parse_css_for_images + after_save :parse_css_for_images def new_files=(*attrs) attrs[0].map do |key,items_ary| #Loop by JSs,Themes,Imgs diff --git a/public/static/kernel.js b/public/static/kernel.js index 13d6d3fe..aebf8ac6 100644 --- a/public/static/kernel.js +++ b/public/static/kernel.js @@ -37,4 +37,4 @@ $(document).ready(function() { } }) }); -// Ad Banner FX code [end] \ No newline at end of file +// Ad Banner FX code [end] diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb index 52ec119a..6a56df4b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb @@ -4,10 +4,10 @@ <%= paginate @bulletins %> -

<%= t('bulletin.list_announcement') %>

+

<%= t('bulletin.list_announcement') %>

- +
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb index 8aa261ef..84e01f2c 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb @@ -2,19 +2,19 @@ <% if @bulletins and !@bulletins.nil? %> -

<%= t('焦點新聞')%>

-<%= link_to "more+",panel_announcement_front_end_bulletins_path(), :class => "topic_note" %> -
previous page
-
next page
- +

<%= t('焦點新聞')%>

+ <%= link_to "more+",panel_announcement_front_end_bulletins_path(), :class => "topic_note" %> +
previous page
+
next page
+ <% end %> diff --git a/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/_post_frontend.html.erb b/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/_post_frontend.html.erb index 0ad677bf..b2a162c8 100644 --- a/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/_post_frontend.html.erb +++ b/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/_post_frontend.html.erb @@ -1,13 +1,14 @@ -
<%= t('bulletin.postdate') %> <%= t('bulletin.category') %>
@@ -20,9 +21,9 @@ - - + + + diff --git a/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/index.html.erb b/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/index.html.erb index 27cc5ca4..d28f49e7 100644 --- a/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/index.html.erb +++ b/vendor/built_in_modules/new_blog/app/views/panel/new_blog/front_end/posts/index.html.erb @@ -6,8 +6,9 @@ <%= flash_messages %> -

<%= t('blog.front_end_index') %>

- -<%= render :partial => "post_frontend", :collection => @posts %> +

<%= t('blog.front_end_index') %>

+
+ <%= render :partial => "post_frontend", :collection => @posts %> +
<%= post_frontend.title %> - <%= truncate(post_frontend.body,:length=>25) %><%= link_to 'Read more...',panel_new_blog_front_end_post_path(post_frontend), :class => 'btn' %><%= post_frontend.title %><%= truncate(post_frontend.body,:length=>100) %><%= link_to 'Read more...',panel_new_blog_front_end_post_path(post_frontend), :class => 'btn' %>