From d935532f8d57b5efd5d56259e875a114b513f23e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 13 Jan 2016 17:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BAat?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/at_controller.rb | 1 + app/views/boards/_course_show_detail.html.erb | 2 +- public/assets/kindeditor/at/config.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb index 9e7309646..25e731754 100644 --- a/app/controllers/at_controller.rb +++ b/app/controllers/at_controller.rb @@ -53,6 +53,7 @@ class AtController < ApplicationController end def find_project(id) + return [] if id<0 at_persons = Project.find(id).users at_persons.delete_if { |u| u.id == User.current.id } end diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb index 804f6543e..1898fce02 100644 --- a/app/views/boards/_course_show_detail.html.erb +++ b/app/views/boards/_course_show_detail.html.erb @@ -40,7 +40,7 @@ } $(function () { - init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); + init_activity_KindEditor_data(<%= topic.id%>, null, "87%", "<%=topic.class.to_s%>"); }); <% if topic %> diff --git a/public/assets/kindeditor/at/config.js b/public/assets/kindeditor/at/config.js index 651f33464..72aeacb39 100644 --- a/public/assets/kindeditor/at/config.js +++ b/public/assets/kindeditor/at/config.js @@ -23,7 +23,7 @@ var enableAt = function(_editor) { } if('undefined' != (typeof id)){ - names = '/at/' + id + '?type='+type; + names = '/at/' + id + '.json?type='+type; } //var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你", "가"];