This commit is contained in:
huang 2015-09-29 16:21:53 +08:00
commit cfdaf1f1b4
5 changed files with 25 additions and 18 deletions

View File

@ -175,19 +175,19 @@ class NewsController < ApplicationController
update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS
end
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
teachers = searchTeacherAndAssistant(@course)
for teacher in teachers
if(teacher.user_id != User.current.id)
notify = ActivityNotify.new()
notify.activity_container_id = @course.id
notify.activity_container_type = 'Course'
notify.activity_id = @news.id
notify.activity_type = 'News'
notify.notify_to = teacher.user_id
notify.is_read = 0
notify.save()
end
end
# teachers = searchTeacherAndAssistant(@course)
# for teacher in teachers
# if(teacher.user_id != User.current.id)
# notify = ActivityNotify.new()
# notify.activity_container_id = @course.id
# notify.activity_container_type = 'Course'
# notify.activity_id = @news.id
# notify.activity_type = 'News'
# notify.notify_to = teacher.user_id
# notify.is_read = 0
# notify.save()
# end
# end
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
render_attachment_warning_if_needed(@news)
flash[:notice] = l(:notice_successful_create)

View File

@ -7,13 +7,13 @@
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<a href="javascript:void(0);" class="<%= @memo.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<a href="javascript:void(0);" class="<%= @obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% end %>
<% else %>
<% if user_id == obj.author_id %>
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% else %>
<!-- 积分少于2分不能踩帖 -->

View File

@ -33,7 +33,7 @@
function del_confirm(){
if(confirm('确认删除么?')){
$("#del_link").click();
$("#del_memo_link").click();
}else{
}
@ -52,7 +52,7 @@
<ul class="homepagePostSettiongText">
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_link" ></a></li>
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_memo_link" ></a></li>
</ul>
</li>
</ul>

View File

@ -13,7 +13,7 @@ KindEditor.plugin('emoticons', function(K) {
allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
currentPageNum = 1;
self.clickToolbar(name, function() {
this.edit.focus();//如果没有这句 火狐下取不到焦点 导致_getSel()为空 报错
this.edit.focus();//<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>_getSel()Ϊ<><CEAA> <20><><EFBFBD><EFBFBD>
var rows = 5, cols = 9, total = 135, startNum = 0,
cells = rows * cols, pages = Math.ceil(total / cells),
colsHalf = Math.floor(cols / 2),
@ -55,6 +55,9 @@ KindEditor.plugin('emoticons', function(K) {
K(this).removeClass('ke-on');
});
cell.click(function(e) {
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
self.insertHtml('<img src="' + path + num + '.gif" border="0" alt="" />').hideMenu().focus();
e.stop();
});

View File

@ -75,3 +75,7 @@ li.L9 { background: #eee }
/*.prettyprint .dec,*/
/*.prettyprint .var { color: #A6E22E; }*/
/*.prettyprint .pln { color: #66D9EF; }*/
.memo-content pre {
white-space:pre !important;
word-wrap: break-word;
}