diff --git a/app/views/users/_show_user_homeworks.html.erb b/app/views/users/_show_user_homeworks.html.erb
index c14278de3..935cc4513 100644
--- a/app/views/users/_show_user_homeworks.html.erb
+++ b/app/views/users/_show_user_homeworks.html.erb
@@ -10,6 +10,7 @@
<% end%>
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
+
<%= render :partial => 'users/show_user_homework_form', :locals => {:user_homeworks => @user_homeworks}%>
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
index fe320992a..6167e4e10 100644
--- a/app/views/users/_user_homework_form.html.erb
+++ b/app/views/users/_user_homework_form.html.erb
@@ -16,7 +16,7 @@
- <%= link_to("导入作业", user_import_homeworks_user_path(User.current.id),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
+ <%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
<%= calendar_for('homework_end_time')%>
diff --git a/app/views/users/user_select_homework.js.erb b/app/views/users/user_select_homework.js.erb
index 308f74938..1d9cc8d70 100644
--- a/app/views/users/user_select_homework.js.erb
+++ b/app/views/users/user_select_homework.js.erb
@@ -2,7 +2,9 @@
hideModal('#coursesChoosePopup');
$("#homework_name").val("<%= @homework.name%>");
$("#homework_end_time").val("<%= @homework.end_time%>");
-$("#course_id").val("<%= @homework.course_id%>");
+<% if @select_course == "0"%>
+ $("#course_id").val("<%= @homework.course_id%>");
+<% end%>
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true })%>");
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
$("#BluePopupBox").html("<%=escape_javascript( render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
diff --git a/db/migrate/20150930011457_alter_user_activities_news.rb b/db/migrate/20150930011457_alter_user_activities_news.rb
new file mode 100644
index 000000000..169ac6795
--- /dev/null
+++ b/db/migrate/20150930011457_alter_user_activities_news.rb
@@ -0,0 +1,18 @@
+class AlterUserActivitiesNews < ActiveRecord::Migration
+ def up
+ UserActivity.all.each do |activity|
+ if activity.act_type = 'News'
+ if activity.act
+ activity.created_at = activity.act.created_on
+ activity.updated_at = activity.act.updated_on ? activity.act.updated_on : activity.act.created_on
+ activity.save
+ else
+ activity.destroy
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 205f3140c..9da8cdd66 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20150928090128) do
+ActiveRecord::Schema.define(:version => 20150930011457) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -476,13 +476,6 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
- create_table "discuss_demos", :force => true do |t|
- t.string "title"
- t.text "body"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false
@@ -497,26 +490,23 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
- create_table "dts", :primary_key => "Num", :force => true do |t|
- t.string "Defect", :limit => 50
- t.string "Category", :limit => 50
- t.string "File"
- t.string "Method"
- t.string "Module", :limit => 20
- t.string "Variable", :limit => 50
- t.integer "StartLine"
- t.integer "IPLine"
- t.string "IPLineCode", :limit => 200
- t.string "Judge", :limit => 15
- t.integer "Review", :limit => 1
+ create_table "dts", :force => true do |t|
+ t.string "IPLineCode"
t.string "Description"
- t.text "PreConditions", :limit => 2147483647
- t.text "TraceInfo", :limit => 2147483647
- t.text "Code", :limit => 2147483647
+ t.string "Num"
+ t.string "Variable"
+ t.string "TraceInfo"
+ t.string "Method"
+ t.string "File"
+ t.string "IPLine"
+ t.string "Review"
+ t.string "Category"
+ t.string "Defect"
+ t.string "PreConditions"
+ t.string "StartLine"
t.integer "project_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "enabled_modules", :force => true do |t|
@@ -921,6 +911,7 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
+ t.datetime "updated_on"
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index dd8c6d636..403febc23 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -314,7 +314,7 @@ a.un_work_edit{color: white; display:block; padding:1px 5px; background-color: d
.normaltab a { color:#64bdd9 ; }
.hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;}
.dis{display:block; }
-.undis{display:none;}
+
.c_red{ color:#de030d;}
input.c_red {padding:0px; text-align:center; border:0;}
.f_12{ font-size:12px;}
@@ -512,9 +512,7 @@ a:hover.st_add{ color:#ff8e15;}
.courses_text{ border:1px solid #64bdd9; height:100px;width:532px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
.upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;}
.upimg:hover{ border:1px solid #64bdd9; }
-.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
-.upbtn:hover{color:#64bdd9;cursor: pointer;}
-.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
+
/* 功能倒计时*/
.w_img{ float:left; margin:10px 10px 15px 0px;}
.w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; }
diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css
index 25c2ae211..45f057155 100644
--- a/public/stylesheets/header.css
+++ b/public/stylesheets/header.css
@@ -14,7 +14,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
-.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
+.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 1px;padding-right: 1px;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index d3f5e92db..a3cf6bf9b 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -528,7 +528,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
-.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
+.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 1px;padding-right: 1px;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.portraitRadius {border-radius: 3px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
diff --git a/public/stylesheets/prettify.css b/public/stylesheets/prettify.css
index 7979d061a..489f1959b 100644
--- a/public/stylesheets/prettify.css
+++ b/public/stylesheets/prettify.css
@@ -46,7 +46,7 @@ pre li,ul,ol {
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */
.list_style ol li {
list-style-type: decimal;
- margin-left: 10px;
+ margin-left: 10px !important;
}
li.L0,
li.L1,
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 2806a1dbe..fb6da363a 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -881,3 +881,19 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.wiki {width: 510px;}
.wiki img {max-width:100%;}
+#content_ .tabs_enterprise ul li a.selected:hover {background-color: #E2F4FF;}
+/*end*/
+/*end*/
+/***** Diff *****/
+.diff_out { background: #fcc; }
+.diff_out span { background: #faa; }
+.diff_in { background: #cfc; }
+.diff_in span { background: #afa; }
+
+.text-diff {
+ padding: 1em;
+ background-color:#f6f6f6;
+ color:#505050;
+ border: 1px solid #e4e4e4;
+}
+
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index bf89de015..669f086a3 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -269,7 +269,10 @@ a:hover.bgreen_n_btn{background:#08a384;}
.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
-/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; }*/
+.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
+.upbtn:hover{color:#64bdd9;cursor: pointer;}
+.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
+.undis{display:none;}
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
@@ -448,7 +451,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
-.newsActive {width:8px; height:8px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
+.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 1px;padding-right: 1px;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}