From 48f096178ca4a0a443dbc30eadedc3650ef0785f Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 13 Apr 2015 21:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AEmodoule?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 5 ++--- app/views/projects/settings/_new_modules.html.erb | 7 ++----- public/javascripts/project.js | 6 +++++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 24d34991a..5207be823 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1368,7 +1368,7 @@ module ApplicationHelper end def link_to_function(name, function, html_options={}) - content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(html_options)) + content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:class => " c_purple")) end # Helper to render JSON in views @@ -1390,8 +1390,7 @@ module ApplicationHelper end def check_all_links(form_name) - link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + - " | ".html_safe + + link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + "  ".html_safe + " | "+ "  ".html_safe + link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)") end diff --git a/app/views/projects/settings/_new_modules.html.erb b/app/views/projects/settings/_new_modules.html.erb index c14656b94..281d07fef 100644 --- a/app/views/projects/settings/_new_modules.html.erb +++ b/app/views/projects/settings/_new_modules.html.erb @@ -13,12 +13,9 @@

- 全选 -   |   - 清除 + <%= check_all_links 'modules-form' %>

- 保存 + <%= l(:button_save) %>

<% end %> - diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 98e808622..fe850728c 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -180,4 +180,8 @@ function project_setting(n) } } -// 背景换色 \ No newline at end of file +// 配置模块提交 +function submitModules() +{ + $("#modules-form").submit(); +} \ No newline at end of file