guange_homework
huang 10 years ago
commit cfdaf1f1b4

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

@ -7,13 +7,13 @@
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 --> <% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %> <% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai --> <% 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 %> <% end %>
<% else %> <% else %>
<% if user_id == obj.author_id %> <% 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) %>--> <!--<%#= 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 %> <% else %>
<!-- 积分少于2分不能踩帖 --> <!-- 积分少于2分不能踩帖 -->

@ -33,7 +33,7 @@
function del_confirm(){ function del_confirm(){
if(confirm('确认删除么?')){ if(confirm('确认删除么?')){
$("#del_link").click(); $("#del_memo_link").click();
}else{ }else{
} }
@ -52,7 +52,7 @@
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li> <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><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> </ul>
</li> </li>
</ul> </ul>

@ -13,7 +13,7 @@ KindEditor.plugin('emoticons', function(K) {
allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
currentPageNum = 1; currentPageNum = 1;
self.clickToolbar(name, function() { 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, var rows = 5, cols = 9, total = 135, startNum = 0,
cells = rows * cols, pages = Math.ceil(total / cells), cells = rows * cols, pages = Math.ceil(total / cells),
colsHalf = Math.floor(cols / 2), colsHalf = Math.floor(cols / 2),
@ -55,6 +55,9 @@ KindEditor.plugin('emoticons', function(K) {
K(this).removeClass('ke-on'); K(this).removeClass('ke-on');
}); });
cell.click(function(e) { 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(); self.insertHtml('<img src="' + path + num + '.gif" border="0" alt="" />').hideMenu().focus();
e.stop(); e.stop();
}); });

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