diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 71782ee28..293346365 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -190,11 +190,11 @@ class HomeworkCommonController < ApplicationController #开启匿评 #statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限 def start_anonymous_comment - @statue =4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course) + @statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course) @statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") if @homework_detail_manual.comment_status == 1 student_works = @homework.student_works - if student_works && student_works.size >=2 + if student_works && student_works.size >= 2 student_works.each_with_index do |work, index| user = work.user n = @homework_detail_manual.evaluation_num @@ -218,11 +218,11 @@ class HomeworkCommonController < ApplicationController #关闭匿评 def stop_anonymous_comment @homework_detail_manual.update_column('comment_status', 3) - + #计算缺评扣分---->计算缺评数量 work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" @homework.student_works.each do |student_work| absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count - student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 + student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count : 0 student_work.save end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ae80f8fcb..a58906c67 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -216,6 +216,7 @@ class ProjectsController < ApplicationController end } format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) } + format.js end else respond_to do |format| diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 0de5184c7..474fb81bc 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -180,15 +180,15 @@ class StudentWorkController < ApplicationController student_work.homework_common_id = @homework.id student_work.user_id = User.current.id student_work.save_attachments(params[:attachments]) + render_attachment_warning_if_needed(student_work) + #提交作品时,计算是否迟交 if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = @homework.late_penalty - else + student_work.late_penalty = 1 + else student_work.late_penalty = 0 end - render_attachment_warning_if_needed(student_work) if student_work.save - respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 05e828aae..4796d0c0c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -419,6 +419,14 @@ class UsersController < ApplicationController homework = HomeworkCommon.find(params[:homework]) student_work = StudentWork.where(homework_common_id: homework.id, user_id: User.current.id).first if student_work + + #提交作品时,计算是否迟交 + if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") + student_work.late_penalty = 1 + else + student_work.late_penalty = 0 + end + student_work.save flash[:notice] = l(:notice_successful_create) redirect_to student_work_index_url(:homework => params[:homework]) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a1663c76b..f085032c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2304,20 +2304,19 @@ module ApplicationHelper # else # link = "启动匿评".html_safe # end - if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") - link = "启动匿评".html_safe + link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评" elsif homework.student_works.count >= 2 #作业份数大于2 case homework.homework_detail_manual.comment_status - when 1 - link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit' - when 2 - link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit' - when 3 - link = "匿评结束".html_safe + when 1 + link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink' + when 2 + link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink' + when 3 + link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" end else - link = "启动匿评".html_safe + link = link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" end link end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 12925b0b1..c25035fdb 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -18,6 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. include AvatarHelper +include StudentWorkHelper module ProjectsHelper def link_to_version(version, options = {}) return '' unless version && version.is_a?(Version) diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index bff997ba4..aa359e273 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -2,17 +2,16 @@ include UserScoreHelper module StudentWorkHelper + #获取当前用户的项目列表 def user_projects_option - cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" - memberships = User.current.memberships.all(:conditions => cond) - projects = memberships.map(&:project) + projects = User.current.projects.visible not_have_project = [] - not_have_project << Setting.please_chose + not_have_project << "没有可选项目,请直接为本作品创建一个项目" not_have_project << 0 type = [] type << not_have_project projects.each do |project| - if project != nil + if project option = [] option << project.name option << project.id diff --git a/app/views/homework_common/alert_anonymous_comment.js.erb b/app/views/homework_common/alert_anonymous_comment.js.erb index 2b3248dc2..375b333f1 100644 --- a/app/views/homework_common/alert_anonymous_comment.js.erb +++ b/app/views/homework_common/alert_anonymous_comment.js.erb @@ -3,5 +3,4 @@ showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","").css("left",""); -$('#ajax-modal').parent().addClass("anonymos"); \ No newline at end of file +$('#ajax-modal').parent().css("top","30%").css("left","30%"); \ No newline at end of file diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb index 5f27a5b82..b0424bf7a 100644 --- a/app/views/homework_common/start_anonymous_comment.js.erb +++ b/app/views/homework_common/start_anonymous_comment.js.erb @@ -1,6 +1,6 @@ <% if @statue == 1%> alert('启动成功'); -$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "fr mr10 work_edit")%>'); +$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>'); <% elsif @statue == 2 %> alert('启动失败\n作业总数大于等于2份时才能启动匿评'); <% elsif @statue == 3%> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 38bfbfe5c..4830431a0 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -33,36 +33,6 @@
-
-
-

- - <%= l(:label_courses_community)%> - -

-

- <%= l(:label_user_location) %> : - <%= link_to l(:field_homepage), home_path %> - > - - <%=l(:label_courses_management_platform)%> - - > - <%= link_to @course.name, course_path(@course) %> -

-
- - - - - - - - - - -
-
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 8676c6fb1..7f8b4c69e 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -109,9 +109,9 @@ <% end%> <% end%>
-
+ <% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%> +
    - <% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
@@ -122,9 +122,9 @@ <%=link_to "", new_project_path, :class => "homepageMenuSetting fr", :title => "新建项目"%> <% end%>
-
+ <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> +
    - <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
diff --git a/app/views/projects/create.js.erb b/app/views/projects/create.js.erb new file mode 100644 index 000000000..9bb447789 --- /dev/null +++ b/app/views/projects/create.js.erb @@ -0,0 +1,3 @@ +$("#project_id").replaceWith("<%= escape_javascript(select_tag :project_id, options_for_select(user_projects_option), {:class => "InputBox W680 fl"})%>"); +hideModal("#popbox02"); +alert("创建成功"); \ No newline at end of file diff --git a/app/views/student_work/_new_project.html.erb b/app/views/student_work/_new_project.html.erb new file mode 100644 index 000000000..3d9214c7d --- /dev/null +++ b/app/views/student_work/_new_project.html.erb @@ -0,0 +1,31 @@ +
+ <%= labelled_form_for(Project.new,:remote => "true") do |f| %> +

新建项目

+
+
+
+ + +

+
+
+ +

+ +
+ +
+ +
+ + 确定 + + 取消 +
+
+ <% end%> +
+
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index 85c23f300..f9b242443 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -9,12 +9,18 @@ ""); $('#ajax-modal').parent().css("top","30%").css("left","40%"); $('#ajax-modal').parent().addClass("anonymos_work"); -// alert("当前作业已开启匿评,您提交作品后将不会收到任何匿评作品,您的作品也不会被其他用户匿评,如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分"); }); <% end%> - //匿评弹框取消按钮 - function clickCanel(){hideModal("#popbox02");} + //快速创建项目的弹框 + function new_project(){ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_project') %>'); + showModal('ajax-modal', '800px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed"); + }
@@ -75,6 +81,18 @@ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false} %>
+ +
+ +
+ <%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %> + <%#=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%> + +
+
+
确定 @@ -83,4 +101,4 @@
<% end%>
-
+
\ No newline at end of file diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index 0944ffab6..08927ab8f 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -48,10 +48,10 @@
上传附件 - <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mr15 mt3",:remote => true%> + <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3",:remote => true%> <% if defined?(has_program) && has_program %> - 编程 - + 编程 + <% end %>
diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 642373d58..6a9ffb727 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -47,6 +47,9 @@
  • <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
  • +
  • + <%= homework_anonymous_comment homework_common %> +
  • diff --git a/public/images/avatars/AnonymousUser/0 b/public/images/avatars/AnonymousUser/0 deleted file mode 100644 index a4cc45467..000000000 Binary files a/public/images/avatars/AnonymousUser/0 and /dev/null differ diff --git a/public/images/avatars/Course/0 b/public/images/avatars/Course/0 deleted file mode 100644 index 8eb3d27d5..000000000 Binary files a/public/images/avatars/Course/0 and /dev/null differ diff --git a/public/images/avatars/Course/6314 b/public/images/avatars/Course/6314 deleted file mode 100644 index b58caabfa..000000000 Binary files a/public/images/avatars/Course/6314 and /dev/null differ diff --git a/public/images/avatars/Course/6315 b/public/images/avatars/Course/6315 deleted file mode 100644 index cce3b9ccf..000000000 Binary files a/public/images/avatars/Course/6315 and /dev/null differ diff --git a/public/images/avatars/Course/6316 b/public/images/avatars/Course/6316 deleted file mode 100644 index fa4fd4110..000000000 Binary files a/public/images/avatars/Course/6316 and /dev/null differ diff --git a/public/images/avatars/Course/6322 b/public/images/avatars/Course/6322 deleted file mode 100644 index 1f0332907..000000000 Binary files a/public/images/avatars/Course/6322 and /dev/null differ diff --git a/public/images/avatars/Course/6330 b/public/images/avatars/Course/6330 deleted file mode 100644 index 030ab8a68..000000000 Binary files a/public/images/avatars/Course/6330 and /dev/null differ diff --git a/public/images/avatars/Course/6356 b/public/images/avatars/Course/6356 deleted file mode 100644 index 757c2a628..000000000 Binary files a/public/images/avatars/Course/6356 and /dev/null differ diff --git a/public/images/avatars/Course/6358 b/public/images/avatars/Course/6358 deleted file mode 100644 index 030ab8a68..000000000 Binary files a/public/images/avatars/Course/6358 and /dev/null differ diff --git a/public/images/avatars/Course/6408 b/public/images/avatars/Course/6408 deleted file mode 100644 index bf740e537..000000000 Binary files a/public/images/avatars/Course/6408 and /dev/null differ diff --git a/public/images/avatars/Course/6446 b/public/images/avatars/Course/6446 deleted file mode 100644 index 90e0e8474..000000000 Binary files a/public/images/avatars/Course/6446 and /dev/null differ diff --git a/public/images/avatars/Course/course.jpg b/public/images/avatars/Course/course.jpg deleted file mode 100644 index 8eb3d27d5..000000000 Binary files a/public/images/avatars/Course/course.jpg and /dev/null differ diff --git a/public/images/avatars/Organization/0 b/public/images/avatars/Organization/0 deleted file mode 100644 index 2ae1d7494..000000000 Binary files a/public/images/avatars/Organization/0 and /dev/null differ diff --git a/public/images/avatars/Project/0 b/public/images/avatars/Project/0 deleted file mode 100644 index 19a3ac4c6..000000000 Binary files a/public/images/avatars/Project/0 and /dev/null differ diff --git a/public/images/avatars/Project/6314 b/public/images/avatars/Project/6314 deleted file mode 100644 index b58caabfa..000000000 Binary files a/public/images/avatars/Project/6314 and /dev/null differ diff --git a/public/images/avatars/Project/6315 b/public/images/avatars/Project/6315 deleted file mode 100644 index cce3b9ccf..000000000 Binary files a/public/images/avatars/Project/6315 and /dev/null differ diff --git a/public/images/avatars/Project/6316 b/public/images/avatars/Project/6316 deleted file mode 100644 index fa4fd4110..000000000 Binary files a/public/images/avatars/Project/6316 and /dev/null differ diff --git a/public/images/avatars/Project/6322 b/public/images/avatars/Project/6322 deleted file mode 100644 index 1f0332907..000000000 Binary files a/public/images/avatars/Project/6322 and /dev/null differ diff --git a/public/images/avatars/Project/6330 b/public/images/avatars/Project/6330 deleted file mode 100644 index 030ab8a68..000000000 Binary files a/public/images/avatars/Project/6330 and /dev/null differ diff --git a/public/images/avatars/Project/6356 b/public/images/avatars/Project/6356 deleted file mode 100644 index 757c2a628..000000000 Binary files a/public/images/avatars/Project/6356 and /dev/null differ diff --git a/public/images/avatars/Project/6358 b/public/images/avatars/Project/6358 deleted file mode 100644 index 030ab8a68..000000000 Binary files a/public/images/avatars/Project/6358 and /dev/null differ diff --git a/public/images/avatars/Project/6408 b/public/images/avatars/Project/6408 deleted file mode 100644 index bf740e537..000000000 Binary files a/public/images/avatars/Project/6408 and /dev/null differ diff --git a/public/images/avatars/Project/6446 b/public/images/avatars/Project/6446 deleted file mode 100644 index 90e0e8474..000000000 Binary files a/public/images/avatars/Project/6446 and /dev/null differ diff --git a/public/images/avatars/Project/course.jpg b/public/images/avatars/Project/course.jpg deleted file mode 100644 index 81b0e925c..000000000 Binary files a/public/images/avatars/Project/course.jpg and /dev/null differ diff --git a/public/images/avatars/User/0 b/public/images/avatars/User/0 deleted file mode 100644 index bd2597dd2..000000000 Binary files a/public/images/avatars/User/0 and /dev/null differ diff --git a/public/images/avatars/User/1 b/public/images/avatars/User/1 deleted file mode 100644 index 090de2290..000000000 Binary files a/public/images/avatars/User/1 and /dev/null differ diff --git a/public/images/avatars/User/4245 b/public/images/avatars/User/4245 deleted file mode 100644 index 8057fac14..000000000 Binary files a/public/images/avatars/User/4245 and /dev/null differ diff --git a/public/images/avatars/User/4246 b/public/images/avatars/User/4246 deleted file mode 100644 index 757c2a628..000000000 Binary files a/public/images/avatars/User/4246 and /dev/null differ diff --git a/public/images/avatars/User/4247 b/public/images/avatars/User/4247 deleted file mode 100644 index 3df1c4e68..000000000 Binary files a/public/images/avatars/User/4247 and /dev/null differ diff --git a/public/images/avatars/User/4249 b/public/images/avatars/User/4249 deleted file mode 100644 index 93600eb8f..000000000 Binary files a/public/images/avatars/User/4249 and /dev/null differ diff --git a/public/images/avatars/User/4275 b/public/images/avatars/User/4275 deleted file mode 100644 index 2659a14b7..000000000 Binary files a/public/images/avatars/User/4275 and /dev/null differ diff --git a/public/images/avatars/User/4288 b/public/images/avatars/User/4288 deleted file mode 100644 index ca17e5328..000000000 Binary files a/public/images/avatars/User/4288 and /dev/null differ diff --git a/public/images/avatars/User/4856 b/public/images/avatars/User/4856 deleted file mode 100644 index 96d1098fd..000000000 Binary files a/public/images/avatars/User/4856 and /dev/null differ diff --git a/public/images/avatars/User/4858 b/public/images/avatars/User/4858 deleted file mode 100644 index 8df8790ba..000000000 Binary files a/public/images/avatars/User/4858 and /dev/null differ diff --git a/public/images/avatars/User/4859 b/public/images/avatars/User/4859 deleted file mode 100644 index 78704a099..000000000 Binary files a/public/images/avatars/User/4859 and /dev/null differ diff --git a/public/images/avatars/User/4861 b/public/images/avatars/User/4861 deleted file mode 100644 index a587c9656..000000000 Binary files a/public/images/avatars/User/4861 and /dev/null differ diff --git a/public/images/avatars/User/4863 b/public/images/avatars/User/4863 deleted file mode 100644 index 26e7db3e7..000000000 Binary files a/public/images/avatars/User/4863 and /dev/null differ diff --git a/public/images/avatars/User/4869 b/public/images/avatars/User/4869 deleted file mode 100644 index 030ab8a68..000000000 Binary files a/public/images/avatars/User/4869 and /dev/null differ diff --git a/public/images/avatars/User/4874 b/public/images/avatars/User/4874 deleted file mode 100644 index 90e0e8474..000000000 Binary files a/public/images/avatars/User/4874 and /dev/null differ diff --git a/public/images/avatars/User/4896 b/public/images/avatars/User/4896 deleted file mode 100644 index 757c2a628..000000000 Binary files a/public/images/avatars/User/4896 and /dev/null differ diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index 127f12e92..a6f3223b6 100644 Binary files a/public/images/homepage_icon.png and b/public/images/homepage_icon.png differ diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index eb50c2762..4f2cbeeff 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -180,6 +180,12 @@ function regexStudentWorkDescription() } } +//学生作品 +function show_project() +{ + $("#about_project").slideToggle(); +} + //textarea自适应高度 纯js写的 有浏览器判断 /** * 文本框根据输入内容自适应高度 @@ -249,4 +255,63 @@ var autoTextarea = function (elem, extra, maxHeight) { addEvent('input', change); addEvent('focus', change); change(); -}; \ No newline at end of file +}; + +/////////////////////////////////////////////////////////////////////////////////////创建项目 +//验证项目名称是不是为空 +function regex_project_name(){ + var name = $.trim($("#project_name").val()); + if(name=="") + { + $("#project_name_error_msg").text("项目名称不能为空"); + return false; + } + else + { + $("#project_name_error_msg").text(""); + return true; + } +} + +//验证项目名称是否重复---项目名称可以重复。。。。 +function regex_project_name_same(){ + var name = $.trim($("#project_name").val()); + return true; +} + +//验证项目描述 +function regex_project_desc(){ + var desc = $.trim($("#project_description").val()); + if(desc == "") + { + $("#project_desc_error_msg").text("项目名称不能为空"); + return false; + } + else + { + $("#project_desc_error_msg").text(""); + return true; + } +} +//提交 +function submit_project(){ + if(regex_project_name()&®ex_project_desc()){ + $("#new_project").submit(); + } +} +/////////////////////////////////////////////////////////////////////////////////////创建项目 end +//匿评弹框取消按钮 +function clickCanel(){hideModal("#popbox02");} +//匿评弹框确定按钮 +function clickOK(path) +{ + clickCanel(); + $.ajax({ + type: "GET", + url: path, + data: 'text', + success: function (data) { + } + }); +} +///////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 51bd52547..48696b743 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -890,7 +890,7 @@ a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} -a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:35px; height:20px; display:block; padding-left:20px; color:#888888;} +a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;} a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} @@ -938,7 +938,7 @@ a:hover.UsersApBtn{border:1px solid #888888; } .C_Blue{ color:#3598db;} a.C_Blue{ color:#3598db;} a:hover.C_Blue{ color:#297fb8;} -.BluePopupBox{ border:3px solid #3598db; padding:20px; background:#fff; width:707px;} +.BluePopupBox{ padding:20px; background:#fff; width:707px;} /*.BluePopupBox:hover{ border:3px solid #297fb8; }*/ a.CloseBtn{background:url(../images/CloseBtn.png) 0px 0px no-repeat; width:13px; height:13px; display:block; float:right;} a:hover.CloseBtn{background:url(../images/CloseBtn.png) 0px -24px no-repeat; } @@ -1116,3 +1116,25 @@ a:hover.tijiao{ background:#0f99a9;} #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;} #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;} #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;} + +/*20150906关联项目LB*/ +a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;} +a.SetUpIcon{background: url(../images/homepage_icon.png) 0px -453px no-repeat; width:20px; height:20px; display:block; color:#888888;} +a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-repeat; color:#3598db;} +.W680{ width:680px;} +.W710{ width:708px;} + +/* 开启匿评弹框 */ +.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.ni_con { width:425px; margin:25px 30px;} +.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;} +.ni_con p{ color:#808181; } +.ni_con a:hover{ text-decoration:none;} +.ni_btn{ width:190px; margin:15px auto; line-height:1.9;} +a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;} +a:hover.tijiao{ background:#0f99a9;} +.c_pink{ color:#e65d5e;} +.ni_con_work { width:300px; margin:25px 20px;} +.ni_con_work p{ color:#808181; }