From 6449b2563b9f2e0784ebfebabb4c93df56dfafd5 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 11:19:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8E=BB=E6=8E=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=BB=A3=E7=A0=81=E5=BA=93=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=202=E3=80=81=E5=90=8C=E6=AD=A5=E5=9C=88=E5=AD=90?= =?UTF-8?q?=E7=9A=84=E6=8F=8F=E8=BF=B0=203=E3=80=81=E5=9C=88=E5=AD=90JS?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/helpers/projects_helper.rb | 3 +++ app/views/layouts/base_projects.html.erb | 6 +++--- app/views/projects/new.html.erb | 10 +++++++++- app/views/projects/settings/_new_edit.html.erb | 10 ++-------- public/stylesheets/public.css | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ee958f20e..414ef6d70 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -188,7 +188,7 @@ class ProjectsController < ApplicationController @project.safe_attributes = params[:project] @project.organization_id = params[:organization_id] @project.user_id = User.current.id - @project.project_new_type = 1 + @project.project_new_type = params[:project_new_type] if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2db03dce1..f0ce70dc2 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -94,6 +94,9 @@ module ProjectsHelper type end + # 项目类型描述 + + # 被邀请成员的状态 def status_for_ivitied(ivite_list, project) if ivite_list.user.member_of?(project) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index b7b88c186..c9bc68c33 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -170,9 +170,9 @@

请选择项目类型:

确定
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 26fb104bd..f78bbf0c5 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -17,7 +17,7 @@
  • - <%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %>开发模式开发模式开发模式开发模式开发模式开发模式开发模式开发模 + <%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>为团队提供系列在线开发工具!
  • @@ -89,5 +89,13 @@ $("#new_project").submit(); } } + + $(document).ready(function(){ + $('#project_new_type').change(function(){ + alert($(this).children('option:selected').val("开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。")); + var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值 +// var p2=$('#param2').val();//获取本页面其他标签的值 + }) + }) diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb index 8de9b8229..b38871a60 100644 --- a/app/views/projects/settings/_new_edit.html.erb +++ b/app/views/projects/settings/_new_edit.html.erb @@ -5,9 +5,8 @@ <%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
  • -
  • - + @@ -15,7 +14,7 @@
  • - +
  • @@ -24,11 +23,6 @@ >
    -
  • - - > -
    -
  • 保存 <% end %> diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4f44a8b60..d8902876e 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -852,7 +852,7 @@ div.flash.warning, .conflict { /*弹出框*/ .black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} .white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} -.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.white_content02{display:none;position:fixed;top:15%;left:30%;width:450px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} .floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;} a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;} a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}