Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-09-29 16:22:33 +08:00
commit 8a6b3ab6a7
28 changed files with 231 additions and 161 deletions

View File

@ -50,11 +50,15 @@ class CommentsController < ApplicationController
# # <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
flash[:notice] = l(:label_comment_added)
course_activity = CourseActivity.where("course_act_type='News' and course_act_id =#{@news.id}").first
course_activity.updated_at = Time.now
course_activity.save
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='News' and act_id =#{@news.id}").first
user_activity.updated_at = Time.now
user_activity.save
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
end
if params[:user_activity_id]

View File

@ -163,11 +163,15 @@ class MessagesController < ApplicationController
# @reply.reply_id = params[:id]
@topic.children << @reply
course_activity = CourseActivity.where("course_act_type='Message' and course_act_id =#{@topic.id}").first
course_activity.updated_at = Time.now
course_activity.save
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first
user_activity.updated_at = Time.now
user_activity.save
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
#@topic.update_attribute(:updated_on, Time.now)
if !@reply.new_record?
if params[:asset_id]

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

@ -174,11 +174,15 @@ class StudentWorkController < ApplicationController
if student_work.save
course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first
course_activity.updated_at = Time.now
course_activity.save
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='HomeworkCommon' and act_id =#{@homework.id}").first
user_activity.updated_at = Time.now
user_activity.save
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)

View File

@ -55,12 +55,16 @@ class WordsController < ApplicationController
@jfm = add_reply_adapter options
@save_succ = true if @jfm.errors.empty?
if @save_succ
course_activity = CourseActivity.where("course_act_type='JournalsForMessage' and course_act_id =#{parent_id}").first
course_activity.updated_at = Time.now
course_activity.save
user_activity = UserActivity.where("act_type='JournalsForMessage' and act_id =#{parent_id}").first
user_activity.updated_at = Time.now
user_activity.save
course_activity = CourseActivity.where("course_act_type='JournalsForMessage' and course_act_id =#{parent_id}").first
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='JournalsForMessage' and act_id =#{parent_id}").first
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
end
respond_to do |format|
# format.html {

View File

@ -40,9 +40,9 @@ class HomeworkCommon < ActiveRecord::Base
def act_as_course_message
if self.course
self.course.members.each do |m|
if m.user_id != self.user_id
# if m.user_id != self.user_id
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
end
# end
end
end
end

View File

@ -53,7 +53,7 @@ class Mailer < ActionMailer::Base
recipients ||= []
course.members.each do |member|
user = User.find(member.user_id)
# @subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@ -62,7 +62,7 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
:subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
:subject => @subject
end
# 作业匿评关闭
@ -71,7 +71,7 @@ class Mailer < ActionMailer::Base
recipients ||= []
course.members.each do |member|
user = User.find(member.user_id)
#@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_close)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@ -80,7 +80,7 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
:subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
:subject => @subject
end
# 匿评失败给老师发送邮件通知
@ -89,9 +89,9 @@ class Mailer < ActionMailer::Base
recipients ||= []
# 只给该课程的老师发送邮件提醒
course.members.each do |member|
if m.user.allowed_to?(:as_teacher,course)
if member.user.allowed_to?(:as_teacher,course)
user = User.find(member.user_id)
#@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_fail_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_fail_name = homework_common.name
@ -101,7 +101,7 @@ class Mailer < ActionMailer::Base
end
end
mail :to => recipients,
:subject => "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
:subject => @subject
end
# author: alan

View File

@ -73,6 +73,25 @@
$(function () {
init_activity_KindEditor_data(<%= activity.id%>, null, "87%");
var description_images=$("div#activity_description_<%= activity.id %>").find("img");
if (description_images.length>0) {
for (var i=0; i<description_images.length; i++){
var image=$(description_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
var reply_images=$("div#reply_content_<%= activity.id %>").find("img");
if (reply_images.length>0) {
for (var i=0; i<reply_images.length; i++){
var image=$(reply_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
});
</script>
<% if activity %>

View File

@ -10,7 +10,7 @@
<a href="<%= forum_path(forum) %>" class="f16 linkBlue" style="word-break: break-all;word-wrap : break-word ;white-space:pre-wrap;"><%=forum.name.gsub(/(\r\n)/,'<br/>').html_safe %></a>
<%#= link_to forum.name.gsub(/(\r\n|\s+)/,'<br/>'), forum_path(forum),:class=>"f16 linkBlue" %>
</div>
<div class="postDes" style="word-break: break-all;word-wrap : break-word ;white-space:pre-wrap;"><%= textAreailizable forum.description%></div>
<div class="postDes"><%= textAreailizable forum.description%></div>
<div class="postCreater">创建者:<a href="<%= user_path( forum.creator)%>" class="linkGrey2" target="_blank"><%= forum.creator.name %></a></div>
<div class="postDate">创建时间:<%= format_date(forum.created_at) %></div>
</div>

View File

@ -135,7 +135,7 @@
<div id="new_forum_div" class="mb5" style="display: none">
<div class="red fl mb10" id="error" style="display: none">error</div>
<%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
<div class="mt15">
<div>
<textarea type="text" name="forum[name]" id="forum_name" maxlength="80" class="postCreateInput" onfocus="hideError();" onblur="check_forum_name();" placeholder="输入贴吧名称" ></textarea>
<script>
var textarea = document.getElementById('forum_name');

View File

@ -19,7 +19,7 @@
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body class="<%=h body_css_classes %>">
<body class="<%=h body_css_classes %>" onload="prettyPrint();">
<div class="cl"></div>
<div class="navContainer mb10">

View File

@ -23,7 +23,7 @@
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body>
<body onload="prettyPrint();">
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>

View File

@ -130,10 +130,10 @@
}
</script>
</head>
<body class="<%= h body_css_classes %>">
<body class="<%= h body_css_classes %>" onload="prettyPrint();">
<div class="cl"></div>
<div class="navContainer mb10">
<div class="navContainer">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
@ -143,6 +143,9 @@
<div class="cl"></div>
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="postRouteContainer mb10">
»&nbsp;<a href="<%= forums_path%>" class="postRouteLink">贴吧</a>&nbsp;»&nbsp;<a href="<%= forum_path(@forum)%>" title="<%=@forum.name %>" class="postRouteLink"><%= truncate(@forum.name,:lenght=>32)%></a>&nbsp;<%if @memo %> »&nbsp;<font class="fontGrey2"><%= @memo.subject%></font><% end %>
</div>
<div class="homepageLeft">
<div class="postDetailContainer">
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %>
@ -155,11 +158,11 @@
</div>
<div class="cl"></div>
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description.html_safe%></span>
<%if @forum.creator.id == User.current.id%>
<a href="javascript:void(0);" onclick="edit_desc();">
<%= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
</a>
<%end%>
<%#if @forum.creator.id == User.current.id%>
<!--<a href="javascript:void(0);" onclick="edit_desc();">-->
<%#= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
<!--</a>-->
<%#end%>
</div>
<div class="mt15">
<div id="forum_tag_list">

View File

@ -21,7 +21,7 @@
</head>
<!--add by huang-->
<body onload=" ">
<body onload="prettyPrint();">
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>

View File

@ -25,7 +25,7 @@
</head>
<body>
<body onload="prettyPrint();">
<div id="Container">
<%= render :partial => 'layouts/base_header_new'%>
<div id="TopBar">

View File

@ -19,7 +19,7 @@
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body>
<body onload="prettyPrint();">
<div class="navContainer mb10">
<% if User.current.logged? %>

View File

@ -16,7 +16,7 @@
<%= yield :header_tags -%>
</head>
<body>
<body onload="prettyPrint();">
<div class="navContainer">
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>

View File

@ -18,7 +18,7 @@
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
</head>
<body>
<body onload="prettyPrint();">
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>

View File

@ -2,18 +2,18 @@
<% if User.current.logged? %>
<% if horizontal %>
<!-- 横排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right;">
<div id="praise_tread_<%= obj.id %>" style="float:right; " >
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% 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="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,18 +52,21 @@
<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>
</div>
<%end%>
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a></div>
<div class="postDetailCreater"><a href="javascript:void(0);" class="linkBlue2" target="_blank"><%= @memo.author.name%></a></div>
<div class="postDetailTitle fl">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @memo.subject%></a>
</div>
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
<div class="cl"></div>
<div class="postDetailCreater">
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%></div>
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
<span id="praise_tread" style="float: right">
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
</span>
<div class="cl"></div>
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @memo.content.html_safe%>

View File

@ -23,15 +23,15 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题</strong><%= ma.course_message.commented.title %></p>
<p><strong>评论对象</strong><%= ma.course_message.commented.title %></p>
<% unless ma.course_message.comments.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
<div class="fl"><strong>评论内容:</strong></div>
<div class="ml60"><%= ma.course_message.comments.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -138,7 +138,7 @@
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
@ -164,7 +164,7 @@
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>关闭了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>

View File

@ -197,7 +197,7 @@
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
<li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.comments.html_safe}",
<%= link_to "#{ma.forge_message.commented.title}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>

View File

@ -32,7 +32,7 @@ namespace :homework_evaluation do
homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
# 邮件通知
Mailer.send_mail_anonymous_comment_close(homework_common).deliver
Mailer.send_mail_anonymous_comment_open(homework_common).deliver
else
#作业数小于2启动失败, 只给老师发
# status==4 发送失败
@ -65,7 +65,10 @@ namespace :homework_evaluation do
end
homework_detail_manual.update_column('comment_status', 3)
# 匿评关闭消息通知 给所有人发
send_message_anonymous_comment(homework_common, 3)
course = homework_common.course
course.members.each do |m|
homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 3)
end
# 邮件通知
Mailer.send_mail_anonymous_comment_close(homework_common).deliver
end

View File

@ -264,7 +264,7 @@ K.options = {
minHeight : 100,
minChangeSize : 50,
zIndex : 811213,
items : ['emoticons','fontname',
items : ['code','emoticons','fontname',
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'formatblock', 'fontsize', '|','indent', 'outdent',
'|','imagedirectupload','table', 'media', 'preview',"more"
@ -4986,7 +4986,7 @@ KEditor.prototype = {
htmlList.unshift('<div style="display:block" id="define"/>')
htmlList.push('</div>')
var htmlListFull = [];
var fullItems = ['emoticons','fontname',
var fullItems = ['code','emoticons','fontname',
'forecolor', 'hilitecolor', 'bold','|', 'justifyleft', 'justifycenter', 'insertorderedlist', 'insertunorderedlist', '|',
'formatblock', 'fontsize', '|', 'indent', 'outdent',
'|','imagedirectupload','table', 'media', 'preview', "less",
@ -5068,7 +5068,7 @@ KEditor.prototype = {
}
self.updateState();
self.addBookmark();
prettyPrint("",self.edit.doc.body);
//prettyPrint("",self.edit.doc.body);
if (self.options.afterChange) {
self.options.afterChange.call(self);
}

View File

@ -1,79 +1,47 @@
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln { color: #000 } /* plain text */
@media screen {
.str { color: #080 } /* string content */
.kwd { color: #008 } /* a keyword */
.com { color: #800 } /* a comment */
.typ { color: #606 } /* a type name */
.lit { color: #066 } /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun, .opn, .clo { color: #660 }
.tag { color: #008 } /* a markup tag name */
.atn { color: #606 } /* a markup attribute name */
.atv { color: #080 } /* a markup attribute value */
.dec, .var { color: #606 } /* a declaration; a variable name */
.fun { color: red } /* a function name */
.ke-content {
font-size: 10pt;
}
.ke-content pre {
font-size:9pt;
font-family:Courier New,Arial;
border:1px solid #ddd;
border-left:5px solid #6CE26C;
background:#f6f6f6;
padding:5px;
}
/* Use higher contrast and text-weight for printable form. */
@media print, projection {
.str { color: #060 }
.kwd { color: #006; font-weight: bold }
.com { color: #600; font-style: italic }
.typ { color: #404; font-weight: bold }
.lit { color: #044 }
.pun, .opn, .clo { color: #440 }
.tag { color: #006; font-weight: bold }
.atn { color: #404 }
.atv { color: #060 }
.ke-content code {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #DDD;
background-color: #F6F6F6;
border-radius: 3px;
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint { padding: 2px;
border-left:1px solid #ccc;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc,
border-top: 1px solid #ccc }
pre li,ol li {
list-style-type: decimal;
.ke-content pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
ul li{
list-style-type: disc;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: decimal }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #eee }
.prettyprint *{font-family:'courier new',monospace;}
/*.prettyprint .com { color: #93a1a1; }*/
/*.prettyprint .lit { color: #AE81FF; }*/
/*.prettyprint .pun,*/
/*.prettyprint .opn,*/
/*.prettyprint .clo { color: #F8F8F2; }*/
/*.prettyprint .fun { color: #dc322f; }*/
/*.prettyprint .str,*/
/*.prettyprint .atv { color: #E6DB74; }*/
/*.prettyprint .kwd,*/
/*.prettyprint .tag { color: #F92659; }*/
/*.prettyprint .typ,*/
/*.prettyprint .atn,*/
/*.prettyprint .dec,*/
/*.prettyprint .var { color: #A6E22E; }*/
/*.prettyprint .pln { color: #66D9EF; }*/
.ke-content pre code {
background-color: transparent;
border: none;
}
.ke-content p {
margin: 0 0 15px 0;
margin-bottom:15pt;
line-height:1.5;
letter-spacing: 1px;
}
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}

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

@ -177,6 +177,41 @@ a.c_green{ color:#28be6c;}
.b_green{background:#28be6c;}
.b_w{ background:#fff;}
/*font&color add by Tim*/
.fontGrey {color:#cecece;}
.fontGrey2 {color:#888888;}
.fontGrey3 {color:#484848;}
.fontBlue {color:#3498db;}
a.underline {text-decoration:underline;}
a.fontBlue {color:#297fb8;}
a.fontGrey {color:#cecece;}
a.fontGrey2 {color:#888888;}
a.linkOrange {color:#ff7143;}
a.linkBlue {color:#269ac9;}
a.linkBlue:hover {color:#297fb8;}
a.linkBlue2 {color:#3498db;}
a.linkBlue2:hover {color:#297fb8;}
a.buttonBlue {background-color:#269ac9;}
a.buttonBlue:hover {background-color:#297fb8;}
a.linkGrey {color:#484848;}
a.linkGrey:hover {color:#269ac9;}
a.linkGrey2 {color:#888888;}
a.linkGrey2:hover {color:#484848;}
a.linkGrey3 {color:#484848;}
a.linkGrey3:hover {color:#000000;}
a.linkGrey4 {color:#484848;}
a.linkGrey4:hover {color:#297fb8;}
a.linkGrey5 {color:#484848;}
a.linkGrey5:hover {color:#3498db;}
a.linkGrey6 {color:#484848 !important;}
a.linkGrey6:hover {color:#ffffff !important;}
a.linkGrey7 {color:#888888;}
a.linkGrey7:hover {color:#269ac9;}
a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
/****翻页***/
.wlist{float:right;}
.wlist li{float:left;}
@ -318,12 +353,16 @@ a:hover.search_btn{ background: #0fa9bb;}
/*资源库*/
.resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right}
/*.resources {width:730px; background-color:#ffffff; padding:10px;float: right}*/
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}
.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}
.resourcesSelect {width:30px; height:24px; float:right; position:relative; margin-top:-6px;}
.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;}
.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
/*.resourcesIcon {margin-top:15px; display:block; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat; width:25px; height:20px;}*/
/*.resourcesIcon:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}*/
/*.resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;}*/
a.resourcesGrey {font-size:12px; color:#888888;}
a.resourcesGrey:hover {font-size:12px; color:#269ac9;}
.resourcesBanner ul li:hover ul.resourcesType {display:block;}
@ -335,13 +374,21 @@ a.uploadText {color:#ffffff; font-size:14px;}
.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:left; background-color:#ffffff;}
.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;}
.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;}
/*.resourcesSearchBanner {height:34px; margin-bottom:10px;}*/
.resourcesSearchBanner {width:710px; height:34px; margin-bottom:10px; margin-top:15px; margin-left:auto; margin-right:auto;}
/*.resourcesListTab {width:730px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;}*/
.resourcesListTab {width:710px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a; margin-left:auto; margin-right:auto;}
/*.resourcesListName {width:175px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListSize {width:110px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListUploader {width:130px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListTime {width:165px; height:40px; line-height:40px; text-align:center;}*/
.resourcesListName {width:340px; height:40px; line-height:40px; text-align:left;}
.resourcesListSize {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListType {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListUploader {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListTime {width:95px; height:40px; line-height:40px; text-align:center;}
/*.resourcesList {width:730px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px;}*/
a.resourcesBlack {font-size:12px; color:#4c4c4c;white-space: nowrap;text-align: left}
a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
@ -350,6 +397,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
.resourcesSelectSend {float:right;}
/*.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;}*/
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;}
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
@ -447,7 +495,7 @@ input.sendSourceText:hover {background-color:#297fb8;}
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.courseReferContainer {float:left; max-height:120px;margin-right:16px;margin-bottom:10px; overflow:auto; overflow-x:hidden;}
.popbox{position:fixed !important;left:50%;top:50%;margin:-100px 0 0 -150px; -moz-border-radius:5px;}
.popbox{/* width:300px; *//* height:100px; */position:fixed !important;/* z-index:100; */left:50%;top:50%;margin:-100px 0 0 -150px; /* background:#fff; */ -moz-border-radius:5px; /* -webkit-border-radius:5px; */ /* border-radius:5px; */ /* box-shadow:0px 0px 8px #194a81; */ /* overflow:auto; */}
/*上传资源弹窗*/
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
.uploadText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; width:140px; display:inline-block;}
@ -579,7 +627,7 @@ a.postTypeGrey {color:#888888;}
a.postTypeGrey:hover {color:#269ac9;}
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
.homepagePostPortrait {float:left; width:42px;}
.homepagePostDes {float:left; width:645px; margin-left:15px;}
.homepagePostDes {float:left; width:645px; margin-left:15px; overflow:hidden;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
@ -615,7 +663,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyPortrait {float:left; width:33px;}
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
@ -689,7 +737,7 @@ ul.list_watch{
.w450{width: 450px;}
/*引用资源库弹窗*/
.referenceResourcesPopup {width:710px; height:500px !important; border:3px solid #269ac9 !important; padding-left:16px !important; padding-right:16px !important; padding-bottom:16px !important; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
.referenceResourcesPopup {width:710px; height:500px !important; border:3px solid #269ac9 !important; padding-left:20px; padding-right:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
@ -716,7 +764,7 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
/*创建贴吧样式*/
.postContainer {width:968px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; margin-top:15px;}
.postContainer {width:968px; border:1px solid #dddddd; padding:15px; background-color:#ffffff;}
.postBanner {height:30px; width:970px; border-bottom:1px solid #efefef;}
.postSort {width:40px; float:left; margin-top:5px; padding-left:5px;}
a.sortArrowDown {background:url(images/post_image_list.png) 0px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
@ -732,7 +780,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDes {width:690px; max-width:690px; margin-bottom:6px; color:#484848;}
.postCreater {color:#888888; font-size:12px; float:left; margin-right:40px;}
.postDate {color:#888888; font-size:12px;}
.postStatics { margin-top:28px; color:#888888; float:right;}
.postStatics { margin-top:28px; color:#888888; float:right; text-align:center;}
.slice {width:1px; height:25px; background-color:#d1d1d1; float:right; margin-top:35px; margin-right:20px;}
.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;}
.pageCell {border:1px solid #dddddd; border-width:1px 1px 1px 0px; padding:5px 12px; float:left; border-spacing:0px;}
@ -743,7 +791,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
/*贴吧内部样式*/
.postDetailContainer {padding:15px; border:1px solid #dddddd; background-color:#ffffff;}
.postlabel {background-color:#edf1f2; color:#888888; padding:2px 5px; float:left; margin-bottom:5px;}
.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left;} /* margin-top:15px;*/
.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left; margin-bottom:10px;}
.postDetailBanner {height:30px; width:720px; border-bottom:1px solid #efefef;}
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
@ -760,7 +808,7 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no
.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
.postThemeContainer {width:720px;}
.postThemeWrap {width:655px; float:left;position: relative}
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px;}
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px;}
.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
@ -768,6 +816,9 @@ a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repe
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
.homepagePostReplyInput {width:543px; height:33px; max-width:543px; max-height:33px; border:1px solid #d9d9d9; outline:none;}
.postRouteContainer {padding:10px 15px; background-color:#ffffff; border:1px solid #dddddd; margin-top:10px; font-size:14px;}
a.postRouteLink {font-weight:bold; color:#484848;}
a.postRouteLink:hover {text-decoration:underline;}
/*底部*/
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}

View File

@ -43,7 +43,7 @@ pre li,ul,ol {
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 3px } /* IE indents via margin-left */
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
@ -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;
}