Merge branch 'develop' into hjq_beidou

This commit is contained in:
huang 2016-05-25 09:11:55 +08:00
commit 4280d79eab
21 changed files with 244 additions and 239 deletions

View File

@ -320,7 +320,7 @@ class UsersController < ApplicationController
case params[:agree]
when 'Y'
ar.update_column('status', 2)
@msg.update_attributes(:apply_result => 1, :viewed => 1)
@msg.update_attributes(:apply_result => 1, :viewed => 1)
ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 2, :status => 1)
when 'N'
ar.update_column('status', 3)
@ -534,28 +534,28 @@ class UsersController < ApplicationController
end
def student_homeworks
if User.current == @user
@page = params[:page] ? params[:page].to_i + 1 : 0
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
if User.current == @user
@page = params[:page] ? params[:page].to_i + 1 : 0
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
#判断当前用户在当前课程的身份
visibleCourse = @user.courses.empty? ? [] : @user.courses.where("is_delete = 0").visible
homework_ids = []
visibleCourse.each do |course|
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
end
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
@is_in_course = params[:is_in_course].to_i || 0
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
end
else
render_403
#判断当前用户在当前课程的身份
visibleCourse = @user.courses.empty? ? [] : @user.courses.where("is_delete = 0").visible
homework_ids = []
visibleCourse.each do |course|
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
end
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
@is_in_course = params[:is_in_course].to_i || 0
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
end
else
render_403
end
end
def choose_user_course
@ -1017,34 +1017,20 @@ class UsersController < ApplicationController
#用户从资源库导入资源到作业
def user_import_resource
if User.current.id.to_i != params[:id].to_i
render_403
return
end
@resource_id = params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id]
@resource_type = params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project"
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
@score = @b_sort == "desc" ? "asc" : "desc"
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id}
if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
elsif (params[:type].blank? ||params[:type] == "6") # 公共资源
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
@status = params[:status]
@user = User.current
user_course_ids = @user.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
@attachments = Attachment.where("(author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc")
@type = params[:type]
@homework_id = params[:homework_id]
@limit = 10
@limit = 7
@is_remote = true
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,10
@attachments = paginateHelper @attachments,7
respond_to do |format|
format.js
end
@ -1052,10 +1038,10 @@ class UsersController < ApplicationController
#引入资源列表根据类型过滤
def user_resource_type
# if User.current.id.to_i != params[:id].to_i
# render_403
# return
# end
if User.current.id.to_i != params[:id].to_i
render_403
return
end
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
# user_org_ids = User.current.organizations.map {|o| o.id}
@ -1104,27 +1090,22 @@ class UsersController < ApplicationController
#引入资源列表根据关键词过滤
def user_ref_resource_search
if User.current.id.to_i != params[:id].to_i
render_403
return
end
@resource_id = params[:mul_id]
@resource_type = params[:mul_type]
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
@score = @b_sort == "desc" ? "asc" : "desc"
@user = User.current
@switch_search = params[:search].nil? ? " " : params[:search]
search = "%#{@switch_search.strip.downcase}%"
# 别人的资源库是没有权限去看的
if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
search = params[:search].to_s.strip.downcase
if(params[:type].blank? || params[:type] == "1") #全部
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 取交集并查询
@attachments = Attachment.where("((author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
" or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))) and (filename like '%#{search}%') ").order("created_on desc")
elsif params[:type] == "2" #课程资源
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
# user_org_ids = User.current.organizations.map {|o| o.id}
@attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search)
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
@attachments = Attachment.where("(author_id = #{params[:id]} and container_type = 'Course') or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})) and (filename like '%#{search}%') ").order("created_on desc")
elsif params[:type] == "3" #项目资源
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Project' and (filename like '%#{search}%')").order("created_on desc")
elsif params[:type] == "4" #附件
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Project','Issue','Document','Message','News','StudentWorkScore','HomewCommon') and (filename like '%#{search}%')").order("created_on desc")
elsif params[:type] == "5" #用户资源
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal' and (filename like '%#{search}%')").order("created_on desc")
elsif params[:type] == "6" #公共资源
@attachments = Attachment.where("(is_public =1 and is_publish = 1 and container_id is not null)" + "or (author_id = #{params[:id]} and is_publish = 0)").order("created_on desc")
end
@type = params[:type]
@limit = 7
@ -1134,7 +1115,7 @@ class UsersController < ApplicationController
@offset ||= @atta_pages.offset
@seleted_resources = session[:seleted_resource_ids].nil? ? [] : session[:seleted_resource_ids]
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments, 7
@attachments = paginateHelper @attachments,7
respond_to do |format|
format.js
end
@ -2072,18 +2053,18 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
end
@type = params[:type]
@limit = 25
@ -2225,18 +2206,18 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
end
@status = params[:status]
@type = params[:type]
@ -2366,18 +2347,18 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
end
@type = params[:type]
@limit = 25
@ -2739,7 +2720,7 @@ class UsersController < ApplicationController
# 获取我的课程资源
def get_course_resources author_id, user_course_ids, order, score
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
end
@ -2773,7 +2754,7 @@ class UsersController < ApplicationController
# 获取我的项目资源
def get_project_resources author_id, user_project_ids, order, score
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}")
end
@ -2877,18 +2858,18 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
# elsif params[:type] == "2" # 私有资源
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
# elsif params[:type] == "2" # 私有资源
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
end
@status = params[:status]
@type = params[:type]
@ -3066,21 +3047,21 @@ class UsersController < ApplicationController
@attachments = get_principal_resources_public_search(@order, @score, search)
else
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
end
# elsif params[:type] == "2" # 私有资源
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search)
# @attachments
# elsif params[:type] == "2" # 私有资源
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search)
# @attachments
end
@status = params[:status]
@type = params[:type]

View File

@ -178,7 +178,6 @@ class WechatsController < ActionController::Base
openid: openid,
user: user
)
request.reply.text "欢迎加入Trustie创新实践社区"
render :json => {status:0, msg: "绑定成功"}
rescue Exception=>e
render :json => {status: -1, msg: e.message}

View File

@ -5,7 +5,7 @@ class WechatService
data = {
touser:openid,
template_id:template_id,
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
topcolor:"#FF0000",
data:{
first: {
@ -44,7 +44,6 @@ class WechatService
end
Rails.logger.info "send over. #{req}"
end
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
end
def topic_publish_template(user_id, type, id, first, key1, key2, key3, remark="")
@ -59,7 +58,6 @@ class WechatService
end
Rails.logger.info "send over. #{req}"
end
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
end
def comment_template(user_id,type, id, first, key1, key2, key3, remark="")
@ -74,7 +72,6 @@ class WechatService
end
Rails.logger.info "send over. #{req}"
end
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
end
def message_update_template(user_id, type, id, first, key1, key2, remark="")
@ -83,7 +80,7 @@ class WechatService
data = {
touser:uw.openid,
template_id:"YTyNPZnQD8uZFBFq-Q6cCOWaq5LA9vL6RFlF2JuD5Cg",
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
topcolor:"#FF0000",
data:{
first: {
@ -112,6 +109,5 @@ class WechatService
end
Rails.logger.info "send over. #{req}"
end
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
end
end

View File

@ -69,7 +69,7 @@
document.oncontextmenu = function() {return true;}
line.children().css("background-color",'white');
id = line.children().last().html();
user_id = line.children().eq(6).html();
user_id = line.children().eq(5).html();
allow = line.children().eq(13).html();
if( allow == 0){
alert('您无权发送私有资源')

View File

@ -1,7 +1,7 @@
<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
:mul_id => @resource_id,
:mul_type => @resource_type}),
:method => 'post', :id => 'resource_import_container_form') do %>
:mul_id => @resource_id,
:mul_type => @resource_type}),
:method => 'post', :id => 'resource_import_container_form') do %>
<% @attachments.each do |attach| %>
<ul class="subjectRow">
<li class="subjectName fl hidden">

View File

@ -1,6 +1,6 @@
<div id="users_setting">
<div id="upload_private_resource">
<%= render :partial => "show_new_upload", :locals => {:type => @type, :status => @status} %>
<%= render :partial => "show_new_upload", :locals => {:type => @type, :status => @status} %>
</div>
<div id="search_div">
<%= render :partial => 'users/resource_search_form',:locals => {:user => @user, :type => @type, :order => @order, :sort => @score, :status => @status} %>
@ -232,7 +232,7 @@
}
}
//发送至按钮控制
//发送至按钮控制
$("input[name='checkbox1[]']").click(function(){
if($("input[name='checkbox1[]']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border");

View File

@ -8,11 +8,11 @@
}
$(document).ready(function(){
$(".resource-switch").click(function(){
$(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active");
});
$(".resource-switch").click(function(){
$(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active");
});
});
function remote_search(){
$("#resource_search_form").submit();
}
@ -56,7 +56,7 @@
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab" id="my_resource_list" data-remote="true">我的资源</a>
</li>
<!--<li class="fl resource-switch">-->
<!--<a href="<%#= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">申请资源</a>-->
<!--<a href="<%#= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">申请资源</a>-->
<!--</li>-->
<li class="fl w680 border-bottom h34">&nbsp;</li>
<li class="fr resource-banner-li border-bottom h34">

View File

@ -1,3 +1,4 @@
#coding=utf-8
#!/usr/bin/env ruby
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')

View File

@ -23,15 +23,15 @@
<span class="mr15">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
<span class="c-grey f12 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f12 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -50,15 +50,15 @@
<div class="post-content c-grey2 mt10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -77,15 +77,15 @@
<div class="post-content c-grey2 mt10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -122,15 +122,15 @@
<span class="mr15">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15">优先级:{{act.issue_detail.issue_priority}}</span> <br />
<span class="mr15">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15">完成度:{{act.issue_detail.done_ratio}}%</span>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -150,15 +150,15 @@
<div class="post-content c-grey2">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -192,14 +192,14 @@
<div class="post-content c-grey2 mt5">
<p class="post-all-content" ng-bind-html="act.description|safeHtml"></p>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>
@ -219,14 +219,14 @@
<div class="post-content c-grey2">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div>
<span class="c-grey f13 fl">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span></a>
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><span class="reply-icon"></span>{{act.reply_count}}</a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
<div class="cl"></div>
</div>
</div>

View File

@ -36,7 +36,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -42,7 +42,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -42,7 +42,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addNoticeReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -48,7 +48,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment"></textarea>
</div>
<button ng-click="addHomeworkReply(formData)" ng-disabled="formData.disabled" value="回复" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -46,7 +46,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addIssueReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -34,7 +34,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addJournalReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

View File

@ -42,7 +42,8 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -128,6 +128,7 @@ app.factory('common', function($http, auth, $routeParams){
openid: auth.openid()
};
//回复按钮禁用
data.disabled = true;
$http({
@ -136,6 +137,7 @@ app.factory('common', function($http, auth, $routeParams){
data: userInfo
}).then(function successCallback(response) {
alert("提交成功");
//数据提交完成,回复按钮启用
data.disabled = false;
if(typeof cb === 'function'){
cb();
@ -410,31 +412,46 @@ app.filter('safeHtml', function ($sce) {
}
});
app.directive('textAutoHeight', function($timeout){
return {
//app.directive('textAutoHeight', function($timeout){
// return {
// restrict: 'A',
// scope: {},
// link: function(scope, element, attr){
// scope.text = '点击展开';
// $timeout(function(){
// var e = element.parent().children().eq(5);
// var height = e[0].scrollHeight;
// if(height>90){
// element.css('display', 'block');
// element.on('click', function(){
// if(element.text() == "点击展开"){
// e.css("height", height+'px');
// element.text("点击隐藏");
// } else {
// e.css("height", '90px');
// element.text("点击展开");
// }
//
// });
// }
// }, false);
//
// }
// }
//});
app.directive('inputAuto',function(){
return{
restrict: 'A',
scope: {},
link: function(scope, element, attr){
scope.text = '点击展开';
$timeout(function(){
var e = element.parent().children().eq(5);
var height = e[0].scrollHeight;
if(height>90){
element.css('display', 'block');
element.on('click', function(){
if(element.text() == "点击展开"){
e.css("height", height+'px');
element.text("点击隐藏");
} else {
e.css("height", '90px');
element.text("点击展开");
}
});
}
}, false);
}
link: function(scope, element){
var copyContainer = element.parent().children().eq(0);
element.on('input',function(){
copyContainer.html(element[0].value);
var textHeight = copyContainer[0].scrollHeight;
element.css('height', textHeight + 'px');
});
}
}
});
@ -442,7 +459,7 @@ app.directive('loadingSpinner', function ($http) {
return {
restrict: 'A',
replace: true,
template: '<div class="loading-bg"><div class="loading-box"><img src="/images/wechat/loading.gif" alt=""/><span>加载中...</span></div></div>',
template: '<div class="loading-bg"><div class="loading-box"><img src="/images/loading.gif" alt=""/><span>加载中...</span></div></div>',
link: function (scope, element, attrs) {
scope.$watch('activeCalls', function (newVal, oldVal) {
@ -495,7 +512,7 @@ app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProv
redirectTo: '/activities'
});
//监听异步请求
//监听异步请求,实现加载中显隐标记
$httpProvider.interceptors.push(function ($q, $rootScope) {
if ($rootScope.activeCalls == undefined) {
$rootScope.activeCalls = 0;

View File

@ -8,6 +8,7 @@ h1,h2,h3,h4,h5,p {padding:0px; margin:0px;}
.f13 {font-size:13px;}
.f15 {font-size:15px;}
.fb {font-weight:bold;}
.mt2 {margin-top:2px;}
.mt5 {margin-top:5px;}
.mt10 {margin-top:10px;}
.mb5 {margin-bottom:5px;}
@ -16,6 +17,8 @@ h1,h2,h3,h4,h5,p {padding:0px; margin:0px;}
.mr10 {margin-right:10px;}
.ml15 {margin-left:15px;}
.mr15 {margin-right:15px;}
.mr20 {margin-right:20px;}
.mr25 {margin-right:25px;}
.ml55 {margin-left:55px;}
.mr55 {margin-right:55px;}
.c-blue {color:#269ac9;}
@ -66,11 +69,12 @@ a.underline {text-decoration:underline;}
.post-reply-content img {max-width:100%;}
.post-reply-date, .post-reply-trigger {font-size:13px;}
.post-input-container {padding-right:2px;}
.post-reply-input {width:100%; height:28px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px;}
.copy-input {width:100%; height:28px; line-height:28px; border-radius:3px; position:absolute; left:-9999em;}
.post-reply-input {width:100%; height:28px; max-height:84px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px; overflow-y:hidden; resize:none;}
.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
.reply-icon {background:url(/images/wechat/wechat_icon.png) -100px 1px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
.praise-icon {background:url(/images/wechat/wechat_icon.png) -100px -38px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
.praised-icon {background:url(/images/wechat/wechat_icon.png) -100px -76px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
.reply-icon {background:url(/images/wechat/wechat_icon.gif) -100px 1px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
.praise-icon {background:url(/images/wechat/wechat_icon.gif) -100px -38px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
.praised-icon {background:url(/images/wechat/wechat_icon.gif) -100px -76px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
/* loading 弹框*/
.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}