From 2faddd7d753b6cc125b060d994da573b000b75ca Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 10:00:26 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E5=88=86=E7=BB=84=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=9F=BA=E4=BA=8E=E9=A1=B9=E7=9B=AE=E5=AE=9E?= =?UTF-8?q?=E6=96=BD=E9=BB=98=E8=AE=A4=E5=8B=BE=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_group_attr.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_user_group_attr.html.erb b/app/views/users/_user_group_attr.html.erb index 652cb723a..a815d85e7 100644 --- a/app/views/users/_user_group_attr.html.erb +++ b/app/views/users/_user_group_attr.html.erb @@ -10,7 +10,7 @@

提醒:勾选后各小组必须在Trustie平台创建项目,教师可随时观察平台对各小组最新进展的实时统计。

From b65e84d166d574ce421b8f99b6fda14694ed8e84 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 12:47:34 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E6=9C=AA=E7=AD=94=E6=B5=8B=E9=AA=8C?= =?UTF-8?q?=E7=9A=84=E5=AD=A6=E7=94=9F=E5=9C=A8=E6=B5=8B=E9=AA=8C=E6=88=AA?= =?UTF-8?q?=E6=AD=A2=E6=97=B6=E9=97=B4=E5=88=B0=E4=BA=86=E5=90=8E=E7=AE=97?= =?UTF-8?q?=E4=BD=9C=E9=9B=B6=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercise_controller.rb | 10 ++-------- app/views/exercise/_student_exercise.html.erb | 3 +++ lib/tasks/exercise_publish.rake | 12 ++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 8fa90ea46..25b5dacec 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -16,10 +16,7 @@ class ExerciseController < ApplicationController exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2) end end - end_exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now) - end_exercises.each do |exercise| - exercise.update_column('exercise_status', 3) - end + if @course.is_public == 0 && !(User.current.member_of_course?(@course)||User.current.admin?) render_403 return @@ -46,10 +43,7 @@ class ExerciseController < ApplicationController exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2) end end - end_exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now) - end_exercises.each do |exercise| - exercise.update_column('exercise_status', 3) - end + unless User.current.member_of_course?(@course) || User.current.admin? render_403 return diff --git a/app/views/exercise/_student_exercise.html.erb b/app/views/exercise/_student_exercise.html.erb index bbbe9026d..3bcd6b83f 100644 --- a/app/views/exercise/_student_exercise.html.erb +++ b/app/views/exercise/_student_exercise.html.erb @@ -75,6 +75,9 @@
  • <% if exercise.created_at%> <%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>  + <% if @exercise.end_time <= exercise.created_at %> + [未答] + <% end %> <% end %>
  • diff --git a/lib/tasks/exercise_publish.rake b/lib/tasks/exercise_publish.rake index a27c6a6fb..13ae8c484 100644 --- a/lib/tasks/exercise_publish.rake +++ b/lib/tasks/exercise_publish.rake @@ -14,9 +14,21 @@ namespace :exercise_publish do end task :end => :environment do + include ExerciseHelper exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now) exercises.each do |exercise| + course = exercise.course exercise.update_column('exercise_status', 3) + course.student.each do |student| + if ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,exercise.id).empty? + ExerciseUser.create(:user_id => student.student_id, :exercise_id => exercise.id, :start_at => exercise.end_time, :status => true,:score=>0) + end +=begin + s_score = calculate_student_score(exercise, student.student) + exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", student.student_id, exercise.id).first + exercise_user.update_attributes(:score => s_score) +=end + end end end end From ca77af9221a9e3eb8a1a678d85a02837a42c1238 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 13:13:23 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=A3=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 14 ++++++++++++-- app/views/users/_user_homework_detail.html.erb | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 60b8e6728..f02105fb6 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -97,11 +97,21 @@
    -
    + +
    + 迟交扣分:<%= activity.late_penalty%>分 +
    +
    匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00
    -
    +
    +
    +
    +
    + 缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品 +
    +
    匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
    diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index d9421f5ea..5bfe1814d 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -102,11 +102,21 @@
    -
    + +
    + 迟交扣分:<%= homework_common.late_penalty%>分 +
    +
    匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
    -
    +
    +
    +
    +
    + 缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品 +
    +
    匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
    From c230ff5bed99cddaf5af17b3d8d443f8c8a1b9ee Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 13:16:01 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E6=99=AE=E9=80=9A=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_choose_group_member.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/student_work/_choose_group_member.html.erb b/app/views/student_work/_choose_group_member.html.erb index dc650cfa8..c47c31d9d 100644 --- a/app/views/student_work/_choose_group_member.html.erb +++ b/app/views/student_work/_choose_group_member.html.erb @@ -1,3 +1,4 @@ +<% if @homework.homework_detail_group %>
    请从<%= @homework.homework_detail_group.base_on_project == 1 ? '项目成员':'课程成员' %>中添加小组成员
    @@ -105,4 +106,5 @@ <% end %> <% end %> }); - \ No newline at end of file + +<% end %> \ No newline at end of file From a7c006c59fec38264de2f239632939562a3325b5 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 15:02:36 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E7=9A=84=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 74 +------------------ app/views/boards/_course_show_detail.html.erb | 70 ++++++++++++++++++ app/views/boards/show.js.erb | 2 +- 3 files changed, 73 insertions(+), 73 deletions(-) create mode 100644 app/views/boards/_course_show_detail.html.erb diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 306a0c7ce..de3b038e6 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -1,20 +1,3 @@ -<%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor" %> -<% end %> - - - <% if topic %> - <%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id} %> - <% end %> - <% end %> - - <% if topics.count == 10 %> -
    展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %>
    - <% end %> -<% end%> + <%= render :partial=> 'course_show_detail',:locals =>{:topics => @topics, :page => 0} %>
    - - diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb new file mode 100644 index 000000000..c324f1d69 --- /dev/null +++ b/app/views/boards/_course_show_detail.html.erb @@ -0,0 +1,70 @@ +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: false, prettify: false) %> + <%= javascript_include_tag "init_activity_KindEditor" %> +<% end %> + + +<% if topics%> + <% topics.each do |topic| %> + + <% if topic %> + <%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id} %> + <% end %> + <% end %> + + <% if topics.count == 10 %> +
    展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %>
    + <% end %> +<% end%> + + \ No newline at end of file diff --git a/app/views/boards/show.js.erb b/app/views/boards/show.js.erb index dd5fa4688..c088abce5 100644 --- a/app/views/boards/show.js.erb +++ b/app/views/boards/show.js.erb @@ -1 +1 @@ -$("#show_more_course_topic").replaceWith("<%= escape_javascript( render :partial => 'boards/course_show',:locals => {:topics => @topics, :page => @page} )%>"); \ No newline at end of file +$("#show_more_course_topic").replaceWith("<%= escape_javascript( render :partial => 'boards/course_show_detail',:locals => {:topics => @topics, :page => @page} )%>"); \ No newline at end of file From 084844941f0d766c2f54f64d624db05e92b5a6d2 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 18 Dec 2015 15:22:29 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82=20=E8=81=9A=E7=84=A6=E5=B0=B1?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=89=80=E6=9C=89=E7=9A=84=E5=AD=A6=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/school_controller.rb | 5 +- app/views/my/account.html.erb | 78 ++++++++++++++-------------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb index d20a58b75..e0aff6254 100644 --- a/app/controllers/school_controller.rb +++ b/app/controllers/school_controller.rb @@ -120,15 +120,16 @@ class SchoolController < ApplicationController condition.scan(/./).each_with_index do |char,index| if char =~ /[a-zA-Z0-9]/ pinyin << char + elsif char =~ /\'/ else chinese << char end end if(condition == '') - @school = School.page((params[:page].to_i || 1) - 1).per(100) + @school = School.reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100) @school_count = School.count else - @school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").page((params[:page].to_i || 1) - 1).per(100) + @school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100) @school_count = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").count end diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 604953ad9..30072777e 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -642,45 +642,45 @@ $("#hint").hide(); } }); -// $("input[name='province']").on('focus', function (e) { -// if($(e.target).val() == ''){ // -// return; -// } -// if( $("input[name='occupation']").val() != ''){ //如果已经有id了。肯定存在,不用去找了。 -// return; -// } -// -// $.ajax({ -// url: '<%#= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value, -// type: 'post', -// success: function (data) { -// if(data.length != undefined && data.length != 0) { -// var i = 0; -// $("#search_school_result_list").html(''); -// for (; i < data.length; i++) { -// link = '' + data[i].school.name + '
    '; -// $("#search_school_result_list").append(link); -// } -// $("#search_school_result_list").css('left', $(e.target).offset().left); -// $("#search_school_result_list").css('top', $(e.target).offset().top + 28); -// $("#search_school_result_list").css("position", "absolute"); -// $("#search_school_result_list").show(); -// if ($(e.target).val().trim() != '') { -// str = e.target.value.length > 8 ? e.target.value.substr(0, 6) + "..." : e.target.value; -// $("#hint").html('找到了' + data.length + '个包含"' + str + '"的高校'); -// $("#hint").show(); -// } else { -// $("#hint").hide(); -// } -// }else { -// $("#search_school_result_list").html(''); -// str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value; -// $("#hint").html('没有找到包含"'+str+'"的高校,创建高校'); -// $("#hint").show(); -// } -// } -// }); -// }); + $("input[name='province']").on('focus', function (e) { + if( $("input[name='occupation']").val() != ''){ //如果已经有id了。肯定存在,不用去找了。 + return; + } + + $.ajax({ + url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value+'&page='+page, + type: 'post', + success: function (data) { + schoolsResult = data.schools; + count = data.count; + maxPage = Math.ceil(count/100) //最大页码值 + if(schoolsResult.length != undefined && schoolsResult.length != 0) { + var i = 0; + $("#search_school_result_list").html(''); + for (; i < schoolsResult.length; i++) { + link = '' + schoolsResult[i].school.name + '
    '; + $("#search_school_result_list").append(link); + } + $("#search_school_result_list").css('left', $(e.target).offset().left); + $("#search_school_result_list").css('top', $(e.target).offset().top + 28); + $("#search_school_result_list").css("position", "absolute"); + $("#search_school_result_list").show(); + if($(e.target).val().trim() != '') { + str = e.target.value.length > 8 ? e.target.value.substr(0, 6)+"..." : e.target.value; + $("#hint").html('找到了' + count + '个包含"' + str + '"的高校'); + $("#hint").show(); + }else{ + $("#hint").hide(); + } + }else{ + $("#search_school_result_list").html(''); + str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value; + $("#hint").html('没有找到包含"'+str+'"的高校,创建高校'); + $("#hint").show(); + } + } + }); + }); // $("#province").leanModal({top: 100, closeButton: ".modal_close"}); From c6e7c8860da7784e3d894a1cc4ba12fd8a78a5dc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 15:45:23 +0800 Subject: [PATCH 07/13] dd --- db/schema.rb | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 9c7702aa2..eac8a81db 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -558,23 +558,26 @@ ActiveRecord::Schema.define(:version => 20151218022014) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - create_table "dts", :force => true do |t| - t.string "IPLineCode" - t.string "Description" - t.string "Num" - t.string "Variable" - t.string "TraceInfo" - t.string "Method" + 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 "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" + 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 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false end create_table "editor_of_documents", :force => true do |t| @@ -923,16 +926,6 @@ ActiveRecord::Schema.define(:version => 20151218022014) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" From 793a98ade12e33b93fe824a06785d3e5eb8363bf Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 18 Dec 2015 15:51:41 +0800 Subject: [PATCH 08/13] =?UTF-8?q?forge=5Factivities=E9=82=A3=E4=B8=AA?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E5=8A=A8=E6=80=81=E8=84=9A=E6=9C=AC=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...18022014_batch_delete_project_journal_activities.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/db/migrate/20151218022014_batch_delete_project_journal_activities.rb b/db/migrate/20151218022014_batch_delete_project_journal_activities.rb index 95d6a39c5..6752b5b30 100644 --- a/db/migrate/20151218022014_batch_delete_project_journal_activities.rb +++ b/db/migrate/20151218022014_batch_delete_project_journal_activities.rb @@ -1,7 +1,15 @@ # encoding: utf-8 class BatchDeleteProjectJournalActivities < ActiveRecord::Migration def up - ForgeActivity.where('forge_act_type = \'Journal\'').destroy_all #需要触发回调 + #ForgeActivity.where('forge_act_type = \'Journal\'').destroy_all #需要触发回调 + count = ForgeActivity.where('forge_act_type = \'Journal\'').count / 30 + 2 + transaction do + for i in 1 ... count do i + ForgeActivity.where('forge_act_type = \'Journal\'').page(i).per(30).each do |activity| + activity.destroy + end + end + end end def down From 7ce8e330c3e15a1fc5baf059a774f7df0f364889 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 16:21:27 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_course_journalsformessage.html.erb | 41 +++---------------- 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 27549f6d9..69f966979 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -26,7 +26,7 @@
    - <% count=course.journals_for_messages.where('m_parent_id IS NULL').count %> + <% count = fetch_user_leaveWord_reply(activity).count %>
    @@ -47,7 +47,7 @@ <% if count > 0 %>
      - <% course.journals_for_messages.where('m_parent_id IS NULL').reorder("created_on desc").each do |comment| %> + <% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %> -
      -
      - <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %> -
      -
      -
      - <% if reply.try(:user).try(:realname) == ' ' %> - <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> - <% else %> - <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> - <% end %> - <%= l(:label_reply_to)%> - <% if comment.try(:user).try(:realname) == ' ' %> - <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %> - <% else %> - <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %> - <% end %> - <%= format_time reply.created_on %> -
      -
      - <%= reply.notes.html_safe %>
      -
      -
      -
      -
      - <% end %> - <% end %> + <%= comment.notes.html_safe %> +
    + <% end %> <% end %>
    From c38191eb424e722182bda8eeb24a28aa3977004a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:25:14 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=9B=9E=E5=A4=8Dat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 115a70e7a..fd6171f18 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -18,7 +18,7 @@ } $(function () { - init_activity_KindEditor_data(<%= issue.id%>, null, "87%"); + init_activity_KindEditor_data(<%= issue.id%>, null, "87%", "<%= issue.class.name %>"); showNormalImage('activity_description_<%= issue.id %>'); if ($("#intro_content_<%= issue.id %>").height() > 360) { $("#intro_content_show_<%= issue.id %>").show(); From 71a0802a498eddab43add025663b40fa4458ae09 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:46:35 +0800 Subject: [PATCH 11/13] =?UTF-8?q?at=E5=90=8E=E5=AD=97=E4=BD=93=E6=94=B9?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 6f8e489f8..bd7c7ec35 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -260,7 +260,7 @@ K.options = { bodyClass : 'ke-content', indentChar : '\t', cssPath : K.basePath +'plugins/code/previewcode.css', - cssData : '', + cssData : 'font{color:#7d7d7d;}', minWidth : 650, minHeight : 100, minChangeSize : 1, From d0e139650f9a60846c0b93925edd564e0cbdaf33 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:50:44 +0800 Subject: [PATCH 12/13] =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E7=9A=84at?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 4 ++-- public/javascripts/create_kindeditor.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index c832c884f..4af757c77 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,9 +1,9 @@ <%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false) %> + <%= import_ke(enable_at: true) %> <%= javascript_include_tag 'create_kindeditor'%> <% end %>