Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
4a1b2fbbd6
|
@ -34,7 +34,7 @@ class CommentsController < ApplicationController
|
|||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT
|
||||
end
|
||||
# 与我相关动态的记录add start
|
||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
|
||||
if( @comment.id && @news.course )
|
||||
if(@news.author_id != User.current.id)
|
||||
notify = ActivityNotify.new()
|
||||
|
@ -47,11 +47,18 @@ class CommentsController < ApplicationController
|
|||
notify.save()
|
||||
end
|
||||
end
|
||||
# 与我相关动态的记录add end
|
||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
|
||||
flash[:notice] = l(:label_comment_added)
|
||||
end
|
||||
|
||||
redirect_to news_url(@news)
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
else
|
||||
redirect_to news_url(@news)
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
|
@ -20,11 +20,11 @@ class IssuesController < ApplicationController
|
|||
default_search_scope :issues
|
||||
|
||||
before_filter :authorize1, :only => [:show]
|
||||
before_filter :find_issue, :only => [:show, :edit, :update]
|
||||
before_filter :find_issue, :only => [:show, :edit, :update,:add_journal]
|
||||
before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :destroy]
|
||||
before_filter :find_project, :only => [:new, :create, :update_form]
|
||||
#before_filter :authorize, :except => [:index, :show]
|
||||
before_filter :authorize, :except => [:index]
|
||||
before_filter :authorize, :except => [:index,:add_journal]
|
||||
|
||||
before_filter :find_optional_project, :only => [:index]
|
||||
before_filter :check_for_default_issue_status, :only => [:new, :create]
|
||||
|
@ -383,6 +383,18 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def add_journal
|
||||
jour = Journal.new
|
||||
jour.user_id = User.current.id
|
||||
jour.notes = params[:notes]
|
||||
jour.journalized = @issue
|
||||
jour.save
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_project
|
||||
|
|
|
@ -177,6 +177,7 @@ class MessagesController < ApplicationController
|
|||
@reply.board = @board
|
||||
@reply.safe_attributes = params[:reply]
|
||||
@reply.content = @quote + @reply.content
|
||||
@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
@topic.children << @reply
|
||||
#@topic.update_attribute(:updated_on, Time.now)
|
||||
if !@reply.new_record?
|
||||
|
@ -185,41 +186,18 @@ class MessagesController < ApplicationController
|
|||
update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE
|
||||
end
|
||||
|
||||
# 与我相关动态的记录add start
|
||||
if(@board && @board.course) #项目的先不管
|
||||
notifyto_arr = {}
|
||||
notifyto_arr[@topic.author_id] = @topic.author_id
|
||||
if( params[:parent_topic] != nil && params[:parent_topic] != '')
|
||||
parent_topic = Message.find(params[:parent_topic])
|
||||
notifyto_arr[parent_topic.author_id] = parent_topic.author_id
|
||||
end
|
||||
notifyto_arr.each do |k,user_id|
|
||||
if(user_id != User.current.id)
|
||||
notify = ActivityNotify.new()
|
||||
if(@board.course)
|
||||
notify.activity_container_id = @board.course_id
|
||||
notify.activity_container_type = 'Course'
|
||||
else
|
||||
notify.activity_container_id = @board.project_id
|
||||
notify.activity_container_type = 'Project'
|
||||
end
|
||||
notify.activity_id = @reply.id
|
||||
notify.activity_type = 'Message'
|
||||
notify.notify_to = user_id
|
||||
notify.is_read = 0
|
||||
notify.save()
|
||||
end
|
||||
end
|
||||
end
|
||||
# 与我相关动态的记录add end
|
||||
|
||||
call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
|
||||
attachments = Attachment.attach_files(@reply, params[:attachments])
|
||||
render_attachment_warning_if_needed(@reply)
|
||||
else
|
||||
#render file: 'messages#show', layout: 'base_courses'
|
||||
end
|
||||
if params[:is_board]
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
elsif params[:is_board]
|
||||
if @project
|
||||
redirect_to project_boards_path(@project)
|
||||
elsif @course
|
||||
|
|
|
@ -720,9 +720,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
|
||||
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
||||
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','poll')"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
|
||||
init_KindEditor_data(<%= @user_activity_id%>);
|
|
@ -0,0 +1,3 @@
|
|||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
|
||||
|
||||
init_KindEditor_data(<%= @user_activity_id%>);
|
|
@ -0,0 +1,6 @@
|
|||
<%if @project%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||
<%elsif @course%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||
<%end%>
|
||||
init_KindEditor_data(<%= @user_activity_id%>);
|
|
@ -21,17 +21,10 @@
|
|||
</div>
|
||||
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
|
||||
作业描述:<%= activity.description.html_safe %>
|
||||
</div>
|
||||
<!--<p style="display: none" id="activity_message_<%#= user_activity.id%>">
|
||||
<a id="expend_more_information<%#= user_activity.id%>" href="javascript:void(0)" style="color: #0781b4;" onclick="show_more_reply('#activity_description_<%#=user_activity.id%>','#expend_more_information<%#= user_activity.id%>','#arrow<%#=user_activity.id%>');" value="show_more">[展开]</a>
|
||||
<span class="g-arr-down">
|
||||
<img id="arrow<%#=user_activity.id%>" src="/images/jiantou.jpg" width="12" height="6" />
|
||||
</span>
|
||||
|
||||
</p>-->
|
||||
<div class="homepagePostSetting" style="visibility: hidden" id="act-<%=user_activity.id %>">
|
||||
<div class="homepagePostSetting" style="visibility: hidden" id="act-<%=user_activity_id %>">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief"> <!-- onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"-->
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
|
@ -12,7 +12,6 @@
|
|||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course), :class => "newsBlue ml15 mr5"%>
|
||||
<%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
|
@ -26,14 +25,14 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">帖子描述:
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= activity.content.to_s.html_safe%>
|
||||
<% else %>
|
||||
<%= activity.parent.content.to_s.html_safe%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
@ -61,26 +60,33 @@
|
|||
)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity.id%>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
点击展开更多回复(<%= count.to_s%>)
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<!--<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" nhname='reply_ex_btn' class="replyGrey">点击展开更多回复</a>
|
||||
</div>-->
|
||||
</div>
|
||||
<!--<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
|
||||
</div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
|
||||
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">发送</a>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity:activity.parent%>
|
||||
<% replies_all_i = 0 %>
|
||||
<% unless activity.children.empty? %>
|
||||
<div id="reply_div_<%= user_activity.id %>">
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply|%>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="resources mt10">
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
|
@ -18,9 +18,9 @@
|
|||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_date(activity.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id %>">通知描述:<%= activity.description.html_safe %></div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">通知描述:<%= activity.description.html_safe %></div>
|
||||
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<div class="homepagePostSetting none" id="act-<%= user_activity_id %>">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
@ -40,30 +40,27 @@
|
|||
<div class="homepagePostReplyBannerCount">回复(<%= count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity.id%>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<% end %>
|
||||
<!--
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
|
||||
</div>-->
|
||||
</div>
|
||||
<%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%>
|
||||
|
||||
<!--<div class="homepagePostReplyInputContainer">
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => activity}, :id => "add_reply_form") do %>
|
||||
<textarea id="new_reply" class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
|
||||
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">发送</a>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostReplyCancel">
|
||||
<a href="javascript:void(0);" class="postReplyCancel" onclick="$('#new_reply').value('');">取消</a>
|
||||
</div>
|
||||
<div class="homepagePostReplySubmit">
|
||||
<a href="javascript:void(0);" class="postReplySubmit" onclick="$('#add_reply_form').submit();">发送</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>-->
|
||||
<% replies_all_i = 0 %>
|
||||
<% unless activity.comments.empty? %>
|
||||
<div id="reply_div_<%= user_activity.id %>">
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
@ -79,9 +76,6 @@
|
|||
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(comment.created_on) %>
|
||||
<%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word"><%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_date(activity.published_at) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="resources mt10">
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id %>">缺陷描述:
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">缺陷描述:
|
||||
<% if activity.description? %>
|
||||
<%= textAreailizable activity, :description, :attachments => activity.attachments %>
|
||||
<% end %>
|
||||
|
@ -55,13 +55,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--<div class="mt10">
|
||||
<a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span>
|
||||
</div>-->
|
||||
<div class="homepagePostSetting" id="act-<%=user_activity.id %>" style="visibility: hidden">
|
||||
<div class="homepagePostSetting" id="act-<%=user_activity_id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
@ -83,24 +77,28 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<% if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= user_activity.id %>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">点击展开更多回复(<%= count.to_s %>
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">点击展开更多回复(<%= count.to_s %>
|
||||
)</a></div>
|
||||
<% end %>
|
||||
<!--<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
|
||||
</div>-->
|
||||
</div>
|
||||
<!--<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
|
||||
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">发送</a>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% unless activity.journals.empty? %>
|
||||
<div id="reply_div_<%= user_activity.id %>">
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals.reorder("created_on desc").each do |reply| %>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="resources mt10">
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
|
@ -26,14 +26,14 @@
|
|||
<div class="homepagePostDate">
|
||||
时间:<%= format_date(activity.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
|
||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">帖子描述:
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= activity.content.to_s.html_safe%>
|
||||
<% else %>
|
||||
<%= activity.parent.content.to_s.html_safe%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
|
@ -60,26 +60,29 @@
|
|||
)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>2 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity.id%>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||
<% end %>
|
||||
<!--<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" nhname='reply_ex_btn' class="replyGrey">点击展开更多回复</a>
|
||||
</div>-->
|
||||
</div>
|
||||
<!--<div class="homepagePostReplyInputContainer">
|
||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
|
||||
</div>
|
||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
|
||||
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">发送</a>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||
<% replies_all_i = 0 %>
|
||||
<% unless activity.children.empty? %>
|
||||
<div id="reply_div_<%= user_activity.id %>">
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply| %>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -1,51 +1,20 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
</style>
|
||||
<% user_activities.each do |user_activity|
|
||||
unless user_activities.nil? %>
|
||||
if user_activities %>
|
||||
<script>
|
||||
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
|
||||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
/*$(function(){
|
||||
function nh_show_btn(){
|
||||
if($("#activity_message_<%#= user_activity.id%>").is(':hidden')){
|
||||
if($("#activity_description_<%#= user_activity.id%>").height()>120){
|
||||
$("#activity_description_<%#= user_activity.id%>").toggleClass("activity_description_maxHeight");
|
||||
$("#activity_message_<%#= user_activity.id%>").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
var div = $("#activity_description_<%#= user_activity.id%>");
|
||||
var imgs = $('img',div);
|
||||
var lens = imgs.length;
|
||||
function nh_load_img_end(){
|
||||
nh_show_btn();
|
||||
}
|
||||
if(lens > 0){
|
||||
$('img',div).load(function(){
|
||||
nh_load_img_end();
|
||||
});
|
||||
}
|
||||
nh_show_btn();
|
||||
});*/
|
||||
/*function show_more_reply(contentid, id2, id3) {
|
||||
$(contentid).toggleClass("activity_description_maxHeight");
|
||||
$(contentid).toggleClass("course_description_none");
|
||||
var information = $(id2);
|
||||
var arrow = $(id3);
|
||||
var val = information.attr("value");
|
||||
if (val == "show_more") {
|
||||
$(id2).text("[收起]");
|
||||
information.attr("value", "hide_more");
|
||||
arrow.attr("src", "/images/jiantouup.jpg")
|
||||
}
|
||||
else {
|
||||
$(id2).text("[展开]");
|
||||
information.attr("value", "show_more");
|
||||
arrow.attr("src", "/images/jiantou.jpg")
|
||||
}
|
||||
}*/
|
||||
function expand_reply(container,btnid){
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
//var jumpobj = $("#reply_div_<%#= activity.id %>");
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('收起回复('+btn.data('count')+')');
|
||||
|
@ -58,6 +27,10 @@
|
|||
target.eq(1).show();
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
init_KindEditor_data(<%= user_activity.id%>);
|
||||
});
|
||||
</script>
|
||||
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
||||
<% case user_activity.container_type.to_s %>
|
||||
|
@ -65,38 +38,22 @@
|
|||
<% if act %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'HomeworkCommon' %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% when 'News' %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% when 'Message'%>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Course'%>
|
||||
<%#= render :partial => 'course_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Attachment' %>
|
||||
<%#= render :partial => 'course_attachment', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<%# when 'JournalsForMessage' %>
|
||||
<%#= render :partial => 'course_journalsformessage', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% when 'Poll' %>
|
||||
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% when 'Project' %>
|
||||
<% if act %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'Issue' %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Journal' %>
|
||||
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'News' %>
|
||||
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Document' %>
|
||||
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Attachment' %>
|
||||
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'ProjectCreateInfo' %>
|
||||
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<!--<div class="top_new">-->
|
||||
<!--<span class="<%#= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>-->
|
||||
<!--<%# if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>-->
|
||||
<!--<a href="<%#= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>-->
|
||||
<!--<%# end %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","user" %>
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
|
@ -13,17 +8,7 @@
|
|||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
.fr.cr{ clear: right}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
|
||||
<!--<div id="RSide" class="fl">-->
|
||||
<!--<div class="users_r_top">-->
|
||||
<!--<h2 class="users_r_h2">用户留言</h2>-->
|
||||
<!--</div>-->
|
||||
<div >
|
||||
<div class="resources mb10">
|
||||
<div class="homepageRightBanner">
|
||||
|
|
|
@ -544,6 +544,9 @@ RedmineApp::Application.routes.draw do
|
|||
match 'bulk_edit', :via => [:get, :post]
|
||||
post 'bulk_update'
|
||||
end
|
||||
member do
|
||||
post 'add_journal'
|
||||
end
|
||||
resources :time_entries, :controller => 'timelog' do
|
||||
collection do
|
||||
get 'report'
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
function init_KindEditor_data(id){
|
||||
KindEditor.ready(function (K) {
|
||||
$("div[nhname='new_message_" + id + "']").each(function () {
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form", params.div_form);
|
||||
if (params.form == undefined || params.form.length == 0) {
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn_" + id);
|
||||
params.submit_btn = $("#new_message_submit_btn_" + id);
|
||||
|
||||
if (params.textarea.data('init') == undefined) {
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function () {
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.submit_btn.click(function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.data('init', 1);
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
|
@ -1,74 +1,5 @@
|
|||
//个人动态
|
||||
$(function(){
|
||||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
|
@ -167,110 +98,4 @@ $(function(){
|
|||
});
|
||||
});
|
||||
});
|
||||
function init_list_more_div(params){
|
||||
var p=params;
|
||||
p.exbtn.click(function(){
|
||||
var isclose = p.container.data('isclose');
|
||||
var hasmore = p.container.data('hasmore');
|
||||
if(isclose == '1'){
|
||||
$("div[nhname='rec']",p.container).show();
|
||||
p.container.data('isclose','0');
|
||||
change_status_4_list_more_div(params);
|
||||
return;
|
||||
}
|
||||
if(hasmore == '0'){
|
||||
change_status_4_list_more_div(params,'get');
|
||||
return;
|
||||
}
|
||||
var url = p.container.data('url');
|
||||
if($("div[nhname='rec']",p.container).length > 0){
|
||||
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
|
||||
url += "?lastid="+lastid;
|
||||
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
|
||||
if(lasttime != undefined){
|
||||
url += "&lasttime="+lasttime;
|
||||
}
|
||||
}
|
||||
$.ajax( {url:url,dataType:'text',success:function(data){
|
||||
var html = $("<div>"+data+"</div>");
|
||||
var lens = $("div[nhname='rec']",html).length;
|
||||
if(lens < p.size){
|
||||
p.container.data('hasmore','0');
|
||||
}
|
||||
if(lens>0){
|
||||
var currpage = parseInt(p.container.data('currpage'))+1;
|
||||
p.container.data('currpage',currpage);
|
||||
p.container.append(html.html())
|
||||
}
|
||||
change_status_4_list_more_div(params,'get');
|
||||
p.div.show();
|
||||
}} );
|
||||
});
|
||||
p.clbtn.click(function(){
|
||||
var i=0;
|
||||
$("div[nhname='rec']",p.container).each(function(){
|
||||
i++;
|
||||
if(i> p.size){
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
p.container.data('isclose','1');
|
||||
change_status_4_list_more_div(params);
|
||||
});
|
||||
p.exbtn.click();
|
||||
}
|
||||
function change_status_4_list_more_div(params,opt){
|
||||
var p=params;
|
||||
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
|
||||
p.exbtn.click();
|
||||
return;
|
||||
}
|
||||
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
|
||||
if( show_lens > p.size ){
|
||||
p.clbtn.show();
|
||||
}else{
|
||||
p.clbtn.hide();
|
||||
}
|
||||
if($("div[nhname='rec']",p.container).length == 0){
|
||||
p.exbtn.html(p.nodatamsg);
|
||||
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
|
||||
p.exbtn.html('点击展开更多');
|
||||
}else{
|
||||
p.exbtn.html('没有更多了');
|
||||
}
|
||||
}
|
||||
function init_list_more_div_params(div){
|
||||
var params = {};
|
||||
params.div = div;
|
||||
params.container = $("div[nhname='container']",div);
|
||||
params.exbtn = $("a[nhname='expand']",div);
|
||||
params.clbtn = $("a[nhname='close']",div);
|
||||
params.size = params.container.data('pagesize');
|
||||
params.nodatamsg = params.container.data('nodatamsg');
|
||||
if( params.size == undefined ){
|
||||
params.size = 13;
|
||||
}
|
||||
return params;
|
||||
}
|
||||
$(function(){
|
||||
$("div[nhname='list_more_div']").each(function(){
|
||||
var params = init_list_more_div_params($(this));
|
||||
init_list_more_div(params)
|
||||
});
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$(".newsType").mouseover(function(){
|
||||
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
|
||||
});
|
||||
$(".newsType").mouseout(function(){
|
||||
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
|
||||
});
|
||||
$(".resourcesSelected").mouseover(function(){
|
||||
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
|
||||
});
|
||||
$(".resourcesSelected").mouseout(function(){
|
||||
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
|
||||
});
|
||||
});
|
||||
//个人动态 end
|
|
@ -31,7 +31,7 @@ table{ background:#fff;}
|
|||
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
|
||||
.db {display:block;}
|
||||
/* font & color */
|
||||
h2{ font-size:18px; color:#15bccf;}
|
||||
h2{ font-size:18px; color:#269ac9;}
|
||||
h3{ font-size:14px; color:#e8770d;}
|
||||
h4{ font-size:14px; color:#3b3b3b;}
|
||||
.f12{font-size:12px; font-weight:normal;}
|
||||
|
@ -136,7 +136,7 @@ a.c_lorange{color:#ff9900;}
|
|||
a:hover.c_lorange{color:#fff;}
|
||||
a.c_blue{ color:#269ac9;}
|
||||
a.c_dblue{ color:#09658c;}
|
||||
a:hover.c_dblue{ color:#15bccf;}
|
||||
a:hover.c_dblue{ color:#297fb8;}
|
||||
a.c_white{ color:#fff;}
|
||||
input.c_white { color:#fff}
|
||||
a.c_dorange{ color:#fd6e2a;}
|
||||
|
@ -160,7 +160,7 @@ a.c_green{ color:#28be6c;}
|
|||
.c_dark{ color:#2d2d2d;}
|
||||
.c_lorange{ color:#ff9900;}
|
||||
.c_purple{color: #6883b6;}
|
||||
.c_blue{ color:#15bccf;}
|
||||
.c_blue{ color:#269ac9;}
|
||||
.c_red{ color:#F00;}
|
||||
.c_green{ color:#28be6c;}
|
||||
.c_dblue{ color:#09658c;}
|
||||
|
@ -247,36 +247,6 @@ a:hover.bgreen_n_btn{background:#08a384;}
|
|||
/*框架主类容*/
|
||||
#Container{ width:1000px; margin:0 auto; }
|
||||
|
||||
/*头部导航*/
|
||||
#Header{ margin:10px 0; background:#269ac9; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; position: relative;}
|
||||
.logo{ margin:5px 10px; }
|
||||
#TopNav{}
|
||||
#TopNav ul li{ margin-top:8px;}
|
||||
.topnav_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;}
|
||||
.topnav_a a:hover{color: #a1ebff;}
|
||||
#userInfo {float:right; display:inline-block; width:130px; padding-top:5px;}
|
||||
.userInfoRow2 {margin-top:-5px;}
|
||||
.myPractice {display:inline-block;}
|
||||
a.parent {background: url(../images/arrowList.png) -30px 3px no-repeat; width:95px; padding-right:50px;}
|
||||
a.parent:hover {background: url(../images/arrowList.png) -30px -14px no-repeat; width:95px; padding-right:50px; color:#fe7d68;}
|
||||
a.linkToOrange:hover {color:#fe7d68;}
|
||||
#userInfo ul li {positon: relative;}
|
||||
#userInfo ul li ul {display:none;}
|
||||
#userInfo ul li:hover ul {display:block; position:absolute;}
|
||||
#userInfo ul li:hover ul li ul {display:none;}
|
||||
#userInfo ul li:hover ul li:hover ul {display:block; position:absolute; left:110px; top:6px; width:148px; border:1px solid #15bccf; background-color:#ffffff; padding:5px 0px;}
|
||||
#userInfo ul li:hover ul li:hover ul li {max-width:148px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block; padding: 0 10px; line-height:1.5; color:#15bccf;}
|
||||
#TopUser{}
|
||||
#TopUser ul li{ margin-top:8px;}
|
||||
.topuser_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;}
|
||||
.topuser_a a:hover{color: #a1ebff;}
|
||||
#TopUser02{ }
|
||||
#TopUser02 li{ float: left;}
|
||||
#TopUser02 li a{ margin-right:10px;color: #FFF;text-align: center;}
|
||||
#TopUser02 li a:hover{color: #a1ebff;}
|
||||
#TopUser02 div{ position: absolute;visibility: hidden;background:#fff;border: 1px solid #15bccf;}
|
||||
#TopUser02 div a{position: relative;display: block;white-space: nowrap;text-align: left; line-height:1.9; margin-left:5px;background: #fff;color:#15bccf; font-weight:normal;}
|
||||
#TopUser02 div a:hover{ color:#e8770d; font-weight: bold;}
|
||||
|
||||
/*myctrip*/
|
||||
.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;}
|
||||
|
@ -305,9 +275,9 @@ a.topnav_login_box:hover {color:#a1ebff;}
|
|||
.search{ margin-top:8px; margin-left:71px;}
|
||||
.search_form{margin-top:8px;margin-left:72px;}
|
||||
.topbar_info{ width:350px; color:#5c5c5c; font-size:16px; margin-right:50px; line-height:1.3; padding-left:100px;}
|
||||
a.search_btn{ display:block; background:#15bccf; color:#fff; width:60px; height:24px; text-align:center; padding-top:3px;}
|
||||
a.search_btn{ display:block; background:#269ac9; color:#fff; width:60px; height:24px; text-align:center; padding-top:3px;}
|
||||
a:hover.search_btn{ background: #0fa9bb;}
|
||||
.search_text{ border:1px solid #15bccf; background:#fff; width:220px; height:25px; padding-left:5px; }
|
||||
.search_text{ border:1px solid #269ac9; background:#fff; width:220px; height:25px; padding-left:5px; }
|
||||
|
||||
|
||||
/*资源库*/
|
||||
|
@ -588,7 +558,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
|
||||
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
|
||||
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
|
||||
.homepagePostReplyInputContainer {width:670px; margin:0px auto;}
|
||||
.homepagePostReplyInputContainer {width:670px; margin: 10px auto 0 auto;}
|
||||
.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;}
|
||||
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;}
|
||||
.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#269ac9;}
|
||||
|
@ -853,17 +823,17 @@ div.flash.warning, .conflict {
|
|||
|
||||
/*弹出框*/
|
||||
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
|
||||
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:200px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.newhwork_content{ display:none;position:fixed;top:15%;left:30%;width:600px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
|
||||
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #269ac9;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:200px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #269ac9;background-color:white;z-index:1002;overflow:auto;}
|
||||
.newhwork_content{ display:none;position:fixed;top:15%;left:30%;width:600px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #269ac9;background-color:white;z-index:1002;overflow:auto;}
|
||||
.floatbox{ width:420px; border:3px solid #269ac9; background:#fff; padding:5px;}
|
||||
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
|
||||
a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||
|
||||
/*个人主页头像*/
|
||||
.white_content_users{display:none;position:fixed;top:45%;left:45%;width:210px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content_users{display:none;position:fixed;top:45%;left:45%;width:210px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #269ac9;background-color:white;z-index:1002;overflow:auto;}
|
||||
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||
.box_h3{ color:#15bccf; font-size:16px;}
|
||||
.box_h3{ color:#269ac9; font-size:16px;}
|
||||
.uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;}
|
||||
.showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;}
|
||||
.mr15{ margin-right:15px;}
|
||||
|
@ -874,8 +844,8 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
|||
.HomeWork {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;}
|
||||
.RightBanner {width:708px; height:34px; border-bottom:1px solid #e9e9e9;}
|
||||
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
|
||||
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtn{ background:#15bccf; color:#fff;}
|
||||
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
|
||||
.W440{ width:440px;}
|
||||
.W120{ width:110px;}
|
||||
.W700{ width:700px;max-width: 700px;min-width: 700px;}
|
||||
|
@ -883,11 +853,11 @@ a:hover.BlueCirBtn{ background:#15bccf; color:#fff;}
|
|||
.w712{width:712px;max-width:712px;min-width: 712px;}
|
||||
.w720{width:721px;}
|
||||
a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||
a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#15bccf;}
|
||||
a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#269ac9;}
|
||||
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#15bccf;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#15bccf; color:#fff;}
|
||||
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
|
||||
a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
|
||||
a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;}
|
||||
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
|
||||
|
@ -958,6 +928,29 @@ img.ui-datepicker-trigger {
|
|||
.is_public{display: none !important;}
|
||||
.ui-corner-left{background: #64bdd9;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
.fr.cr{ clear: right}
|
||||
|
||||
blockquote {
|
||||
/* font-style: italic; */
|
||||
border-left: 1px solid #e0e0e0;
|
||||
border-right: 1px solid #e0e0e0;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
padding-left: 0.6em;
|
||||
padding-top: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
padding-bottom: 0.6em;
|
||||
margin-left: 1.4em;
|
||||
margin-right: 0.4em;
|
||||
border-radius: 4px;
|
||||
font-family: "Microsoft YaHei";
|
||||
background: url('../images/requirements/reference.jpg');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue