From 086cfa38676d04e568e8192e484218aca4884fdb Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Dec 2015 16:51:21 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_student_exercise.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/exercise/_student_exercise.html.erb b/app/views/exercise/_student_exercise.html.erb index 9b07e0626..6555cfc61 100644 --- a/app/views/exercise/_student_exercise.html.erb +++ b/app/views/exercise/_student_exercise.html.erb @@ -35,9 +35,9 @@ }); $(function(){ <% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %> - $("#show_student_result_div").on('click',show_result); + $("#show_student_result_div_<%= exercise.id%>").on('click',show_result); <% else %> - $("#show_student_result_div").attr("title","截止日期未到,暂不能查看学生答题结果"); + $("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); @@ -53,7 +53,7 @@
  • <%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40"),user_activities_path(exercise.user)) %>
  • -
    +
    • From 45726576cf839c53eefa33da570c6c6b163f753f Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Dec 2015 17:31:27 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=B5=8B=E9=AA=8C?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_student_exercise.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/exercise/_student_exercise.html.erb b/app/views/exercise/_student_exercise.html.erb index 6555cfc61..bbbe9026d 100644 --- a/app/views/exercise/_student_exercise.html.erb +++ b/app/views/exercise/_student_exercise.html.erb @@ -35,7 +35,9 @@ }); $(function(){ <% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %> - $("#show_student_result_div_<%= exercise.id%>").on('click',show_result); + $("#show_student_result_div_<%= exercise.id%>").on('click',function() { + window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>'; + }); <% else %> $("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); @@ -43,9 +45,9 @@ $("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); <% end %> }); - function show_result() { - window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>'; - } + /*function show_result(id) { + window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>'; + }*/
      • From 44ce4fe592f34529729ed505edcf2439c0768da7 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Dec 2015 17:34:08 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=95=99=E8=A8=80=E4=B8=8D=E4=BC=9A=E9=87=8D=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_courses_jours.html.erb | 100 +++++++++++----------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 7b6b44c69..ce775da4d 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -1,22 +1,18 @@ -<%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: true) %> -<% end %> - - +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %> @@ -24,11 +20,11 @@

        <%= l(:label_leave_message) %>

        <% if !User.current.logged?%> -
        - <%= l(:label_user_login_tips) %> - <%= link_to l(:label_user_login_new), signin_path %> -
        -
        +
        + <%= l(:label_user_login_tips) %> + <%= link_to l(:label_user_login_new), signin_path %> +
        +
        <% else %>
        <%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_course_message'}, :html=>{:id => "course_feedback_new"},:method => "post") do |f|%> @@ -59,37 +55,37 @@ $("#submit_feedback_course").one('click',function() { $("#course_feedback_new").submit(); }); - KindEditor.ready(function(K){ - $("a[nhname='reply_btn']").live('click',function(){ - var params = {}; - params.kindutil = K; - params.container = $(this).parent('div').parent('div'); - params.div_form = $(">.respond-form",params.container); - params.form = $("form",params.div_form); - params.textarea = $("textarea[name='user_notes']",params.div_form); - params.contentmsg = $("p[nhname='contentmsg']",params.div_form); - params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form); - params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form); - params.height = 55; - if(params.textarea.data('init') == undefined){ - params.editor = init_editor(params); - init_form(params); - params.cancel_btn.click(function(){ - nh_reset_form(params); - }); - } - params.cancel_btn.click(); - toggleAndSettingWordsVal(params.div_form, params.textarea); - setTimeout(function(){ - if(!params.div_form.is(':hidden')){ - params.textarea.show(); - params.textarea.focus(); - params.textarea.hide(); - } - },300); - params.textarea.data('init',1); - }); + KindEditor.ready(function(K){ + $("a[nhname='reply_btn']").live('click',function(){ + var params = {}; + params.kindutil = K; + params.container = $(this).parent('div').parent('div'); + params.div_form = $(">.respond-form",params.container); + params.form = $("form",params.div_form); + params.textarea = $("textarea[name='user_notes']",params.div_form); + params.contentmsg = $("p[nhname='contentmsg']",params.div_form); + params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form); + params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form); + params.height = 55; + if(params.textarea.data('init') == undefined){ + params.editor = init_editor(params); + init_form(params); + params.cancel_btn.click(function(){ + nh_reset_form(params); + }); + } + params.cancel_btn.click(); + toggleAndSettingWordsVal(params.div_form, params.textarea); + setTimeout(function(){ + if(!params.div_form.is(':hidden')){ + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); + } + },300); + params.textarea.data('init',1); + }); + }); }); - }); From dc4532145487e903367e0bbddf0ea1eedea89c7b Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 15 Dec 2015 17:34:40 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=9B=9E=E5=A4=8D=E4=BB=A3=E7=A0=81=E8=A2=AB?= =?UTF-8?q?=E8=A6=86=E7=9B=96=EF=BC=8C=E6=81=A2=E5=A4=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/org_document_comments/show.html.erb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb index dfe27cde3..7a64e4514 100644 --- a/app/views/org_document_comments/show.html.erb +++ b/app/views/org_document_comments/show.html.erb @@ -1,8 +1,4 @@ -<%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> -<%= javascript_include_tag 'blog' %> -<% end %> - +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor",'blog' %>