Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
6433d223c6
|
@ -7,7 +7,7 @@ class ForumsController < ApplicationController
|
|||
before_filter :find_forum_if_available
|
||||
before_filter :authenticate_user_edit, :only => [:edit, :update]
|
||||
before_filter :authenticate_user_destroy, :only => [:destroy]
|
||||
before_filter :require_login, :only => [:new, :create]
|
||||
before_filter :require_login, :only => [:new, :create,:destroy,:update,:edit]
|
||||
|
||||
helper :sort
|
||||
include SortHelper
|
||||
|
@ -97,7 +97,24 @@ class ForumsController < ApplicationController
|
|||
|
||||
def index
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@forums_all = Forum.reorder("sticky DESC")
|
||||
if(params[:reorder_complex])
|
||||
@type="reorder_complex"
|
||||
@str=params[:reorder_complex]
|
||||
@forums_all = Forum.reorder("topic_count #{params[:reorder_complex]},updated_at #{params[:reorder_complex]}")
|
||||
elsif(params[:reorder_popu])
|
||||
@type="reorder_popu"
|
||||
@str=params[:reorder_popu]
|
||||
@forums_all = Forum.reorder("topic_count #{params[:reorder_popu]}")
|
||||
elsif(params[:reorder_time])
|
||||
@type="reorder_time"
|
||||
@str=params[:reorder_time]
|
||||
@forums_all = Forum.reorder("updated_at #{params[:reorder_time]}")
|
||||
else
|
||||
params[:reorder_complex] = "desc"
|
||||
@type="reorder_complex"
|
||||
@str=params[:reorder_complex]
|
||||
@forums_all = Forum.reorder("topic_count desc,updated_at desc")
|
||||
end
|
||||
@forums_count = @forums_all.count
|
||||
@forums_pages = Paginator.new @forums_count, @limit, params['page']
|
||||
|
||||
|
@ -106,6 +123,7 @@ class ForumsController < ApplicationController
|
|||
#@forums = Forum.all
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.js
|
||||
format.json { render json: @forums }
|
||||
end
|
||||
end
|
||||
|
@ -113,11 +131,25 @@ class ForumsController < ApplicationController
|
|||
# GET /forums/1
|
||||
# GET /forums/1.json
|
||||
def show
|
||||
sort_init 'updated_at', 'desc'
|
||||
sort_update 'created_at' => "#{Memo.table_name}.created_at",
|
||||
'replies' => "#{Memo.table_name}.replies_count",
|
||||
'updated_at' => "COALESCE (last_replies_memos.created_at, #{Memo.table_name}.created_at)"
|
||||
|
||||
# sort_init 'updated_at', 'desc'
|
||||
# sort_update 'created_at' => "#{Memo.table_name}.created_at",
|
||||
# 'replies' => "#{Memo.table_name}.replies_count",
|
||||
# 'updated_at' => "COALESCE (last_replies_memos.created_at, #{Memo.table_name}.created_at)"
|
||||
order = ""
|
||||
@order_str = ""
|
||||
if(params[:reorder_complex])
|
||||
order = " last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}"
|
||||
@order_str = "reorder_complex="+params[:reorder_complex]
|
||||
elsif(params[:reorder_popu])
|
||||
order = "replies_count #{params[:reorder_popu]}"
|
||||
@order_str = "reorder_popu="+params[:reorder_popu]
|
||||
elsif(params[:reorder_time])
|
||||
order = "#{Memo.table_name}.updated_at #{params[:reorder_time]}"
|
||||
@order_str = "reorder_time="+params[:reorder_time]
|
||||
else
|
||||
order = "last_replies_memos.created_at desc, #{Memo.table_name}.created_at desc"
|
||||
@order_str = "reorder_complex=desc"
|
||||
end
|
||||
@memo = Memo.new(:forum => @forum)
|
||||
@topic_count = @forum.topics.count
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
|
@ -126,19 +158,15 @@ class ForumsController < ApplicationController
|
|||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
order(sort_clause).
|
||||
reorder(order).
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
@memos
|
||||
# @offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
# @forum = Forum.find(params[:id])
|
||||
# @memos_all = @forum.topics
|
||||
# @topic_count = @memos_all.count
|
||||
# @topic_pages = Paginator.new @topic_count, @limit, params['page']
|
||||
|
||||
# @offset ||= @topic_pages.offset
|
||||
# @memos = @memos_all.offset(@offset).limit(@limit).all
|
||||
@my_topic_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is null").count
|
||||
@my_replies_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is not null").count
|
||||
@errors = params[:errors]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {
|
||||
render :layout => 'base_forums'
|
||||
}# show.html.erb
|
||||
|
@ -172,20 +200,23 @@ class ForumsController < ApplicationController
|
|||
# Author lizanle
|
||||
# Description after save后需要进行资源记录的更新
|
||||
# owner_type = 2 对应的是 forum
|
||||
@save_flag=true
|
||||
if params[:asset_id]
|
||||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids ,@forum.id,OwnerTypeHelper::FORUM
|
||||
end
|
||||
#end
|
||||
respond_to do |format|
|
||||
|
||||
format.js
|
||||
format.html { redirect_to @forum, notice: l(:label_forum_create_succ) }
|
||||
format.json { render json: @forum, status: :created, location: @forum }
|
||||
end
|
||||
|
||||
else
|
||||
@save_flag=false
|
||||
respond_to do |format|
|
||||
flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}"
|
||||
format.js
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
||||
end
|
||||
|
@ -199,10 +230,12 @@ class ForumsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
if @forum.update_attributes(params[:forum])
|
||||
format.js {render :text=> true}
|
||||
format.html { redirect_to @forum, notice: l(:label_forum_update_succ) }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
flash.now[:error] = "#{l :label_forum_update_fail}: #{@forum.errors.full_messages[0]}"
|
||||
format.js { render :text=> false}
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
||||
end
|
||||
|
@ -261,6 +294,47 @@ class ForumsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#检查forum的名字
|
||||
def check_forum_name
|
||||
forum_name_exist = Forum.where("name = '#{params[:forum_name]}'").count >= 1 ? true : false
|
||||
render :text => forum_name_exist
|
||||
end
|
||||
|
||||
#添加论坛tag
|
||||
def add_forum_tag
|
||||
@forum = Forum.find(params[:id])
|
||||
unless @forum.nil?
|
||||
@forum.tag_list.add(params[:tag_str].split(','))
|
||||
@forum.save
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js {render :delete_forum_tag}
|
||||
end
|
||||
end
|
||||
|
||||
#删除forum的tag
|
||||
def delete_forum_tag
|
||||
@tag_id = (ActsAsTaggableOn::Tag.find_by_name(params[:tag_name])).id
|
||||
#forum的taggable_type = 5
|
||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,params[:id],'Forum')
|
||||
|
||||
unless @taggings.nil?
|
||||
@taggings.delete
|
||||
end
|
||||
|
||||
# 是否还有其他记录 引用了 tag_id
|
||||
@tagging = ActsAsTaggableOn::Tagging.find_by_tag_id(@tag_id)
|
||||
# 如果taggings表中记录已经不存在 ,那么检查tags表 作删除动作
|
||||
if @tagging.nil?
|
||||
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
|
||||
@tag.delete unless @tag.nil?
|
||||
end
|
||||
@forum = Forum.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_forum_if_available
|
||||
|
|
|
@ -11,7 +11,7 @@ class MemosController < ApplicationController
|
|||
include AttachmentsHelper
|
||||
include ApplicationHelper
|
||||
|
||||
layout 'base_memos'
|
||||
# layout 'base_memos'
|
||||
|
||||
def quote
|
||||
@subject = @memo.subject
|
||||
|
@ -73,41 +73,14 @@ class MemosController < ApplicationController
|
|||
end
|
||||
end
|
||||
#end
|
||||
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
|
||||
format.json { render json: @memo, status: :created, location: @memo }
|
||||
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
|
||||
format.json { render json: @memo, status: :created, location: @memo }
|
||||
else
|
||||
flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
|
||||
# back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
|
||||
pre_count = REPLIES_PER_PAGE
|
||||
|
||||
@memo_new = @memo.dup
|
||||
@memo = @memo.root # 取出楼主,防止输入帖子id让回复作为主贴显示
|
||||
unless @memo.new_record?
|
||||
@memo.update_column(:viewed_count, (@memo.viewed_count.to_i + 1))
|
||||
end
|
||||
|
||||
|
||||
page = params[:page]
|
||||
if params[:r] && page.nil?
|
||||
offset = @memo.children.where("#{Memo.table_name}.id < ?", params[:r].to_i).count
|
||||
page = 1 + offset / pre_count
|
||||
else
|
||||
|
||||
end
|
||||
@reply_count = @memo.children.count
|
||||
@reply_pages = Paginator.new @reply_count, pre_count, page
|
||||
@replies = @memo.children.
|
||||
includes(:author, :attachments).
|
||||
reorder("#{Memo.table_name}.created_at DESC").
|
||||
limit(@reply_pages.per_page).
|
||||
offset(@reply_pages.offset).
|
||||
all
|
||||
if @memo.new_record?
|
||||
format.html { render :new,:layout=>'base'}
|
||||
else
|
||||
format.html { render action: :show }
|
||||
format.js
|
||||
format.html { redirect_to( forum_path(Forum.find(params[:forum_id]),:errors=>@memo.errors.full_messages[0])) }
|
||||
format.json { render json: @memo.errors, status: :unprocessable_entity }
|
||||
end
|
||||
#end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -115,6 +88,7 @@ class MemosController < ApplicationController
|
|||
|
||||
REPLIES_PER_PAGE = 20 unless const_defined?(:REPLIES_PER_PAGE)
|
||||
def show
|
||||
|
||||
# 更新贴吧帖子留言对应的memo_messages的viewed字段
|
||||
unless @memo.children.blank?
|
||||
@memo.children.each do |child|
|
||||
|
@ -154,21 +128,27 @@ class MemosController < ApplicationController
|
|||
|
||||
@memo_new = Memo.new
|
||||
|
||||
|
||||
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count
|
||||
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
|
||||
# @memo = Memo.find_by_id(params[:id])
|
||||
# @forum = Forum.find(params[:forum_id])
|
||||
# @replies = @memo.replies
|
||||
# @mome_new = Memo.new
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.html {render :layout=> 'base_forums'}#:layout=> 'base_forums',
|
||||
format.json { render json: @memo }
|
||||
format.xml { render xml: @memo }
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count
|
||||
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
|
||||
@replying = false
|
||||
respond_to do |format|
|
||||
format.html {render :layout=>'base_forums'}
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
|
@ -176,7 +156,8 @@ class MemosController < ApplicationController
|
|||
if( #@memo.update_column(:subject, params[:memo][:subject]) &&
|
||||
@memo.update_column(:content, params[:memo][:content]) &&
|
||||
@memo.update_column(:sticky, params[:memo][:sticky]) &&
|
||||
@memo.update_column(:lock, params[:memo][:lock]))
|
||||
@memo.update_column(:lock, params[:memo][:lock]) &&
|
||||
@memo.update_column(:subject,params[:memo][:subject]))
|
||||
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
|
||||
@memo.save
|
||||
# @memo.root.update_attribute(:updated_at, @memo.updated_at)
|
||||
|
@ -227,7 +208,7 @@ class MemosController < ApplicationController
|
|||
end
|
||||
|
||||
def back_memo_url
|
||||
forum_memo_path(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id))
|
||||
forum_memo_path(@forum, (@memo.root.nil? ? @memo : @memo.root))
|
||||
end
|
||||
|
||||
def back_memo_or_forum_url
|
||||
|
|
|
@ -160,7 +160,7 @@ class MessagesController < ApplicationController
|
|||
@reply.safe_attributes = params[:reply]
|
||||
@reply.content = @quote + @reply.content
|
||||
@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
@reply.reply_id = @message.author
|
||||
# @reply.reply_id = params[:id]
|
||||
@topic.children << @reply
|
||||
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first
|
||||
user_activity.updated_at = Time.now
|
||||
|
|
|
@ -15,6 +15,7 @@ class TagsController < ApplicationController
|
|||
include ContestsHelper
|
||||
include ActsAsTaggableOn::TagsHelper
|
||||
include TagsHelper
|
||||
include FilesHelper
|
||||
helper :projects
|
||||
helper :courses
|
||||
helper :tags
|
||||
|
@ -236,47 +237,91 @@ class TagsController < ApplicationController
|
|||
@rename_tag_name = params[:renameName]
|
||||
@taggable_id = params[:taggableId]
|
||||
@taggable_type = numbers_to_object_type(params[:taggableType])
|
||||
|
||||
@course_id = params[:courseId]
|
||||
|
||||
@rename_tag = (ActsAsTaggableOn::Tag.find_by_name(@rename_tag_name)) #查找重命名后的tag
|
||||
@tag_id = (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).id #重命名前的tag_id
|
||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
|
||||
@obj = get_object(@taggable_id,params[:taggableType])
|
||||
if(@rename_tag.nil?) #这次命名的是新的tag
|
||||
|
||||
# 是否还有其他记录 引用了 tag_id
|
||||
@tagging = ActsAsTaggableOn::Tagging.where("tag_id = #{@tag_id}")
|
||||
# 如果taggings表中记录为 1 ,那么改变@tag_id对应的tag的名字
|
||||
if @tagging.count == 1
|
||||
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
|
||||
@tag.update_attributes({:name=>@rename_tag_name})
|
||||
else #如果tagging表中的记录大于1,那么就要新增tag记录
|
||||
|
||||
unless @obj.nil?
|
||||
@obj.tag_list.add(@rename_tag_name.split(","))
|
||||
@obj.save
|
||||
end
|
||||
#删除原来的对应的taggings的记录
|
||||
unless @taggings.nil?
|
||||
@taggings.delete
|
||||
end
|
||||
end
|
||||
else #这是已有的tag
|
||||
# 更改taggings记录里的tag_id
|
||||
unless @taggings.nil?
|
||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type) unless @taggable_id.blank?
|
||||
@obj = get_object(@taggable_id,params[:taggableType]) unless @taggable_id.blank?
|
||||
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
|
||||
#看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
|
||||
if @rename_tag
|
||||
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
|
||||
@taggings.update_attributes({:tag_id=>@rename_tag.id})
|
||||
else #如果不存在,那么就直接更新该tag名称为新的名称
|
||||
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
|
||||
end
|
||||
else
|
||||
if(@rename_tag.nil?) #这次命名的是新的tag
|
||||
|
||||
# 是否还有其他记录 引用了 tag_id
|
||||
@tagging = ActsAsTaggableOn::Tagging.where("tag_id = #{@tag_id}")
|
||||
# 如果taggings表中记录为 1 ,那么改变@tag_id对应的tag的名字
|
||||
if @tagging.count == 1
|
||||
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
|
||||
@tag.update_attributes({:name=>@rename_tag_name})
|
||||
else #如果tagging表中的记录大于1,那么就要新增tag记录
|
||||
|
||||
unless @obj.nil?
|
||||
@obj.tag_list.add(@rename_tag_name.split(","))
|
||||
@obj.save
|
||||
end
|
||||
#删除原来的对应的taggings的记录
|
||||
unless @taggings.nil?
|
||||
@taggings.delete
|
||||
end
|
||||
end
|
||||
else #这是已有的tag
|
||||
# 更改taggings记录里的tag_id
|
||||
unless @taggings.nil?
|
||||
@taggings.update_attributes({:tag_id=>@rename_tag.id})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@obj_flag = params[:taggableType]
|
||||
if @obj && @obj_flag == '6' && @obj.container.kind_of?(Course)
|
||||
@course = @obj.container
|
||||
@tag_list = @tag_list = get_course_tag_list @course
|
||||
elsif @course_id
|
||||
@course = Course.find(@course_id)
|
||||
@tag_list = get_course_tag_list @course
|
||||
|
||||
#这里要引用FilesController里的逻辑了。将资源库当前的文件列表刷新一遍。
|
||||
@flag = params[:flag] || false
|
||||
sort = ""
|
||||
@sort = ""
|
||||
@order = ""
|
||||
@is_remote = false
|
||||
@isproject = false
|
||||
|
||||
sort = "#{Attachment.table_name}.created_on desc"
|
||||
|
||||
@containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)]
|
||||
|
||||
show_attachments @containers
|
||||
elsif @obj && @obj_flag == '5'
|
||||
@forum = @obj
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def show_attachments obj
|
||||
@attachments = []
|
||||
obj.each do |container|
|
||||
@attachments += container.attachments
|
||||
end
|
||||
@all_attachments = User.current.admin? ? @attachments : visable_attachemnts(@attachments)
|
||||
@limit = 10
|
||||
@feedback_count = @all_attachments.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@offset ||= @feedback_pages.offset
|
||||
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
||||
@obj_attachments = paginateHelper @all_attachments,10
|
||||
end
|
||||
|
||||
def tag_save
|
||||
@select_tag_name = params[:tag_for_save][:tag_name]
|
||||
@tags = params[:tag_for_save][:name]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module TagsHelper
|
||||
include StoresHelper
|
||||
include CoursesHelper
|
||||
# 通过 id和type获取对象
|
||||
def get_object(obj_id,obj_type)
|
||||
@obj = nil
|
||||
|
@ -62,6 +63,27 @@ module TagsHelper
|
|||
|
||||
end
|
||||
|
||||
#判断课程course中是否包含课件attachment,course中引用了attachment也算作包含
|
||||
def course_contains_attachment? course,attachment
|
||||
course.attachments.each do |att|
|
||||
if att.id == attachment.id || (!att.copy_from.nil? && !attachment.copy_from.nil? && att.copy_from == attachment.copy_from) || att.copy_from == attachment.id || att.id == attachment.copy_from
|
||||
return true
|
||||
end
|
||||
end
|
||||
false
|
||||
end
|
||||
|
||||
#判断用户是否拥有不包含当前资源的课程,需用户在该课程中角色为教师且该课程属于当前学期或下一学期
|
||||
def has_course? user,file
|
||||
result = false
|
||||
user.courses.each do |course|
|
||||
if !course_contains_attachment?(course,file) && is_course_teacher(User.current,course) && course_in_current_or_next_term(course)
|
||||
return true
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
# 判断用户是否是贴吧的管理员
|
||||
# add by chenmin
|
||||
def is_forum_manager?(user_id,forum_id)
|
||||
|
|
|
@ -14,7 +14,7 @@ class Forum < ActiveRecord::Base
|
|||
'sticky',
|
||||
'locked'
|
||||
validates_presence_of :name, :creator_id, :description
|
||||
validates_length_of :name, maximum: 50
|
||||
validates_length_of :name, maximum: 160
|
||||
#validates_length_of :description, maximum: 255
|
||||
validates :name, :uniqueness => true
|
||||
after_destroy :delete_kindeditor_assets
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<p class="f_l c_blue f_b f_14">共有 <%= all_attachments.count%> 个资源</p>
|
||||
<p class="f_r" style="color: #808080">
|
||||
<% if order == "asc" %>
|
||||
按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
|
||||
按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
|
||||
<% else %>
|
||||
按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
|
||||
按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% if tag_name && tag_name == k%>
|
||||
<a href="javascript:void(0);" class="files_tag_select"><%= k%>×<%= v%></a>
|
||||
<% else%>
|
||||
<a href="javascript:void(0);" class="files_tag_icon" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"><%= k%>×<%= v%></a>
|
||||
<a href="javascript:void(0);" class="files_tag_icon" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<% end%>
|
|
@ -229,6 +229,9 @@
|
|||
var ele; //当前双击的链接
|
||||
var tagId; //标签的id
|
||||
var taggableType; //被标签的类型
|
||||
//这里renameTag有两种情况,一种是改变某个资源的tag名称。如果其他资源也有这个tag。则新增一个改变后的tag名
|
||||
//第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。
|
||||
//目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id,就是第一种情况。如果没有id。就是第二种情况
|
||||
function rename_tag(domEle,name,id,type){
|
||||
if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
|
||||
return;
|
||||
|
@ -239,7 +242,8 @@
|
|||
ele = domEle;
|
||||
tagId = id;
|
||||
taggableType = type;
|
||||
domEle.html('<input name="" id="renameTagName" style="width: 100px;" value="'+name+'"/>');
|
||||
width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100
|
||||
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:'+width +'px;" value="'+name+'"/>');
|
||||
domEle.parent().css("border","1px solid #ffffff");
|
||||
$("#renameTagName").focus();
|
||||
}
|
||||
|
@ -256,14 +260,10 @@
|
|||
|
||||
}else{ //否则就要更新tag名称了
|
||||
if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){
|
||||
$.post(
|
||||
'<%= update_tag_name_path %>',
|
||||
{"taggableId":tagId,"taggableType":taggableType,"tagName":tagName,"renameName":$("#renameTagName").val().trim()}
|
||||
// function(data){
|
||||
// ele.parent().css("border","");
|
||||
// ele.parent().html(tagNameHtml);
|
||||
// }
|
||||
)
|
||||
$.post(
|
||||
'<%= update_tag_name_path %>',
|
||||
{"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
|
||||
)
|
||||
}else{
|
||||
ele.parent().css("border","");
|
||||
ele.parent().html(tagNameHtml);
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
<style type="text/css">
|
||||
input.is_public,input.is_public_checkbox{height:12px;}
|
||||
input.is_public_checkbox{margin-left:4px;margin-right:4px;}
|
||||
</style>
|
||||
<div class="fl">
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %><%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %><span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% project = project %>
|
||||
<div class="cl"></div>
|
||||
<!--<span class="add_attachment" style="font-weight:normal;">-->
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'AnnexBtn fl mt3' %>
|
||||
<a href="javascript:void(0);" onclick="$('#_file').click();" class="AnnexBtn fl mr15">上传附件</a>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js', :project => project),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<!--<span id="upload_file_count">-->
|
||||
<!--<%#= l(:label_no_file_uploaded) %>-->
|
||||
<!--</span>-->
|
||||
<!--(<%#= l(:label_max_size) %>:-->
|
||||
<%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>
|
||||
<!--)-->
|
||||
<!--</span>-->
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,49 +1,26 @@
|
|||
<!-- added by fq -->
|
||||
<!-- %= form_for(@forum) do |f| % -->
|
||||
|
||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<% if @forum.errors.any? %>
|
||||
<!--<div id="error_explanation">
|
||||
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||
<div class="homepageContentContainer mb10">
|
||||
<div class="homepageContent">
|
||||
<div class="pageBanner mt15"><div class="NewsBannerName">编辑贴吧</div></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<ul>
|
||||
<#% @forum.errors.full_messages.each do |msg| %>
|
||||
<li><#%= msg %></li>
|
||||
<#% end %>
|
||||
</ul>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
<% if @forum.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @forum.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<div class="postContainer">
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<div id="error" style="display: none;color: red;">
|
||||
</div>
|
||||
<div>
|
||||
<textarea type="text" id="forum_name" name="forum[name]" class="postCreateInput" placeholder="对应贴吧名称" ><%= @forum.name.html_safe%></textarea>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<textarea type="text" id="forum_desc" name="forum[description]" class="postCreateInput" placeholder="对应贴吧描述" ><%= @forum.description.html_safe%></textarea>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit($(this));">确定</a></div>
|
||||
<div class="fr"><a href="<%= forum_path(@forum)%>" class="linkGrey2 mr10" >取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<p style="max-width:680px">
|
||||
<%= f.kindeditor :description, :required => true,:owner_id => @forum.id,:owner_type => 2 %>
|
||||
</p>
|
||||
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,15 @@
|
|||
<div><img src="images/post_portrait.jpg" width="75" height="75" alt="贴吧图片" id="forum_image" class="mr10 fl" />
|
||||
<a href="javascript:void(0)" class="upImg linkGrey2 fl" onclick="open_upload_diaglog();">上传图片</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<input type="text" name="postName" class="postCreateInput" placeholder="输入贴吧名称" />
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<input type="text" name="postName" class="postCreateInput" placeholder="输入贴吧描述" />
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn">确定</a></div>
|
||||
<div class="fr"><a href="javascript:void(0);" class="linkGrey2 mr10" onclick="$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();">取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -1,57 +1,38 @@
|
|||
<!-- added by fq -->
|
||||
<div class="forums-list">
|
||||
|
||||
<% if forums.any? %>
|
||||
<% forums.each do |forum| %>
|
||||
<div class="forums-index">
|
||||
<div class="forums-inex-avatar">
|
||||
<%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
|
||||
</div>
|
||||
<div class="forums-index-content">
|
||||
<table class="content-text-list" style="table-layout: fixed;">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %><%= forum.locked? ? 'locked' : '' %>" style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= link_to h(forum.name), forum_path(forum) %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;" class="upload_img">
|
||||
<p>
|
||||
<%= textAreailizable forum.description%>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= authoring forum.created_at, forum.creator %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="forums-index-count">
|
||||
<table class="forums-count-color">
|
||||
<tr class="forums-count-color" align="center">
|
||||
<td>
|
||||
<%= link_to (forum.memo_count), forum_path(forum) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to (forum.topic_count), forum_path(forum) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td>回答</td>
|
||||
<td>帖子</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="postRow">
|
||||
<div class="postPortrait"><a href="javascript:void(0);" class="linkGrey2">
|
||||
<%= link_to image_tag(url_to_avatar(forum.creator),:width=>75,:height => 75 ),user_path( forum.creator) %>
|
||||
</div>
|
||||
<div class="postWrap">
|
||||
<div class="postTitle">
|
||||
<!--<a href="javascript:void(0);" class="f16 linkBlue">新手讨论吧</a>-->
|
||||
<%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %>
|
||||
</div>
|
||||
<div class="postDes"><%= textAreailizable forum.description%></div>
|
||||
<div class="postCreater">创建者:<a href="<%= user_path( forum.creator)%>" class="linkGrey2" target="_blank"><%= forum.creator.name %></a></div>
|
||||
<div class="postDate">创建时间:<%= format_date(forum.created_at) %></div>
|
||||
</div>
|
||||
<div class="postStatics">
|
||||
<div>
|
||||
<!--<a href="javascript:void(0);" class="linkGrey5 fb">280</a>-->
|
||||
<%= link_to ( forum.topic_count), forum_path(forum),:class=>"linkGrey5 fb" %>
|
||||
</div>
|
||||
<div>帖子</div>
|
||||
</div>
|
||||
<div class="slice"></div>
|
||||
<div class="postStatics mr20">
|
||||
<div>
|
||||
<!--<a href="javascript:void(0);" class="linkGrey5 fb">335</a>-->
|
||||
<%= link_to (forum.memo_count), forum_path(forum),:class=>"linkGrey5 fb" %>
|
||||
</div>
|
||||
<div>回答</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination" style="margin-top: 10px;">
|
||||
<%= pagination_links_full @forums_pages, @forums_count %>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => "layouts/no_content" %>
|
||||
<% end %>
|
|
@ -0,0 +1,8 @@
|
|||
<% forum.tag_list.each do |tag|%>
|
||||
<span class="postlabel mr10">
|
||||
<a href="javascript:void(0);" ondblclick="rename_tag($(this),<%= tag %>,<%= forum.id%>,5);" class="fontGrey2 mr5"><%= tag %></a>
|
||||
<%if forum.creator.id == User.current.id%>
|
||||
<a href="javascript:void(0);" class="fontGrey2" onclick="delete_forum_tag($(this));">×</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
|
||||
<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a>
|
||||
<% if order_type=='reorder_complex' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_complex' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a>
|
||||
<% if order_type=='reorder_popu' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_popu' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a>
|
||||
<% if order_type=='reorder_time' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_time' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_time" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="creatPost">
|
||||
<a href="javascript:void(0);" id="create_btn" class="c_white db creatPostIcon bBlue"
|
||||
onclick="$('#error').hide();clear_form();$('#new_forum_div').slideToggle();$(this).parent().slideToggle();">新建贴吧</a></div>
|
||||
<div class="cl"></div>
|
|
@ -1,47 +1,31 @@
|
|||
<script>$(function(){$("img").removeAttr("alt");});</script>
|
||||
<div class="borad-topic-count">共有 <%=link_to @forum.memos.count %> 个贴子</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
<% memos.each do |topic| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" style="width: 50px;">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
</td>
|
||||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回答</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %>
|
||||
<span class="font_description2">
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
<% if author%>
|
||||
最后回复:<%=link_to_user author %>
|
||||
<% end%>
|
||||
</span>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="postDetailRow">
|
||||
<div class="postDetailPortrait">
|
||||
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>-->
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :width => 50,:height => 50,:alt => '贴吧图片'), user_path(topic.author) if topic.author%>
|
||||
</div>
|
||||
<div class="postDetailWrap">
|
||||
<div class="postDetailTitle"><a href="<%= forum_memo_path(topic.forum, topic) %>" class="f14 linkGrey4 fb"><%=topic.subject%></a></div>
|
||||
<div class="postDetailDes"><%= topic.content.html_safe%>
|
||||
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
|
||||
</div>
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
<% if author%>
|
||||
<div class="postDetailCreater">最后回复:<a href="<%= user_path(author) %>" class="linkBlue2" target="_blank"><%= author.name%></a></div>
|
||||
<div class="postDetailDate"><%= format_date(topic.last_reply.created_at)%></div>
|
||||
<% end%>
|
||||
|
||||
</div>
|
||||
<div class="postDetailReply">
|
||||
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
|
||||
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
||||
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<%if @save_flag%>
|
||||
$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
$('#reorder_time').click();
|
||||
<%else%>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
|
@ -0,0 +1,2 @@
|
|||
$("#forum_tag_list").html("<%= escape_javascript( render :partial=>'forum_tag_list',:locals=>{:forum=>@forum}) %>");
|
||||
$('#add_tag01').hide();
|
|
@ -1,4 +1,72 @@
|
|||
<!-- added by fq -->
|
||||
<h1>编辑讨论区</h1>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'new_user' %>
|
||||
<script>
|
||||
$(function(){
|
||||
document.getElementById('forum_name').onkeydown = function()
|
||||
{
|
||||
var n = 0;
|
||||
var str = this.value;
|
||||
for (i = 0; i < str.length; i++) {
|
||||
var leg = str.charCodeAt(i);//ASCII码
|
||||
if (leg > 255) {
|
||||
n += 2;
|
||||
} else {
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
if(n >= 160)
|
||||
event.returnValue = false;
|
||||
}
|
||||
})
|
||||
|
||||
function check_and_submit(doc){
|
||||
$("#error").html('').hide();
|
||||
check_forum_name();
|
||||
if(check_pass == false){
|
||||
return;
|
||||
}
|
||||
if( $("textarea[name='forum[name]']").val().trim() == "" && $("textarea[name='forum[description]']").val().trim() != "" ){
|
||||
$("#error").html("名称不能为空").show();
|
||||
return;
|
||||
} else if( $("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() != "" ){
|
||||
$("#error").html("描述不能为空").show();
|
||||
return;
|
||||
}else if($("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() == ""){
|
||||
$("#error").html("名称和描述不能为空").show();
|
||||
return;
|
||||
}
|
||||
else{
|
||||
doc.parent().parent().parent().submit();
|
||||
}
|
||||
}
|
||||
var check_pass = true;
|
||||
function check_forum_name(){
|
||||
check_pass = true;
|
||||
name = $("textarea[name='forum[name]']").val().trim();
|
||||
if(name == '<%= @forum.name%>'){
|
||||
return;
|
||||
}
|
||||
if( name != ""){
|
||||
$.get(
|
||||
'<%= check_forum_name_forums_path %>',
|
||||
{"forum_name":name},
|
||||
function(data){
|
||||
|
||||
if( data == 'true'){
|
||||
$("#error").html("贴吧名称已经存在").show();
|
||||
check_pass = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
}else{
|
||||
check_pass = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%= render 'form_edit_mode' %>
|
||||
<script>
|
||||
var textarea = document.getElementById('forum_name');
|
||||
autoTextarea(textarea);
|
||||
var textarea1 = document.getElementById('forum_desc');
|
||||
autoTextarea(textarea1);
|
||||
</script>
|
|
@ -1,48 +1,170 @@
|
|||
<% @nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
@nav_dispaly_main_contest_label = 1 %>
|
||||
<!-- added by fq -->
|
||||
<div class="top-content">
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf">公共贴吧 </td>
|
||||
<td class="location-list">
|
||||
<strong>
|
||||
<%= l(:label_user_location) %> :
|
||||
</strong>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
<%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="2" width="250px" >
|
||||
<div class="top-content-search">
|
||||
<%#= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
|
||||
<%#= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<%# end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px">
|
||||
<a>
|
||||
<%= link_to request.host()+"/forums", forums_path %>
|
||||
</a>
|
||||
</td>
|
||||
<td >
|
||||
<%= link_to l(:field_homepage), home_path %> >
|
||||
<%= link_to "公共贴吧", forums_path %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% if @forums.size > 0 %>
|
||||
<%= render :partial => 'forums/forum_list', :locals => {:forums => @forums} %>
|
||||
<% else %>
|
||||
<%= render :partial => "layouts/no_content" %>
|
||||
<% end %>
|
||||
<%= javascript_include_tag 'new_user' %>
|
||||
<%= stylesheet_link_tag 'public'%>
|
||||
<script>
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path %>' + '.js?' + id + '=asc&page='+<%= @forums_pages.page%>
|
||||
|
||||
<%html_title l(:label_forum)%>
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path %>' + '.js?' + id + '=desc&page='+<%= @forums_pages.page%>
|
||||
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path %>' + '.js?' + id + '=desc&page='+<%= @forums_pages.page%>
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#complex").click(function(){
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_complex");
|
||||
});
|
||||
$("#popu").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_popu");
|
||||
});
|
||||
$("#time").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_time");
|
||||
});
|
||||
document.getElementById('forum_name').onkeydown = function()
|
||||
{
|
||||
var n = 0;
|
||||
var str = this.value;
|
||||
for (i = 0; i < str.length; i++) {
|
||||
var leg = str.charCodeAt(i);//ASCII码
|
||||
if (leg > 255) {//大于255的都是中文
|
||||
n += 2;//如果是中文就是2个字节
|
||||
} else {
|
||||
n += 1;//英文,不多说了
|
||||
}
|
||||
}
|
||||
if(n >= 160 && event.keyCode != 8)
|
||||
event.returnValue = false;
|
||||
}
|
||||
});
|
||||
function check_and_submit(doc){
|
||||
$("#error").html('').hide();
|
||||
check_forum_name();
|
||||
if( $("textarea[name='forum[name]']").val().trim() == "" && $("textarea[name='forum[description]']").val().trim() != "" ){
|
||||
$("#error").html("名称不能为空").show();
|
||||
return;
|
||||
} else if( $("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() != "" ){
|
||||
$("#error").html("描述不能为空").show();
|
||||
return;
|
||||
}else if($("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() == ""){
|
||||
$("#error").html("名称和描述不能为空").show();
|
||||
return;
|
||||
}
|
||||
else{
|
||||
doc.parent().parent().submit();
|
||||
}
|
||||
}
|
||||
var check_pass = true;
|
||||
function check_forum_name(){
|
||||
check_pass = true;
|
||||
name = $("textarea[name='forum[name]']").val().trim();
|
||||
if( name != ""){
|
||||
$.get(
|
||||
'<%= check_forum_name_forums_path %>',
|
||||
{"forum_name":name},
|
||||
function(data){
|
||||
|
||||
if( data == 'true'){
|
||||
$("#error").html("贴吧名称已经存在").show();
|
||||
check_pass = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
}else{
|
||||
check_pass = false;
|
||||
}
|
||||
if(check_pass == false){
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
function hideError(){
|
||||
$("#error").html("").hide();
|
||||
}
|
||||
|
||||
function create_cancle(){
|
||||
$('#error').hide();
|
||||
$('#new_forum_div').slideToggle();
|
||||
$('#create_btn').parent().slideToggle();
|
||||
clear_form();
|
||||
}
|
||||
function clear_form(){
|
||||
$("#forum_name").val('');
|
||||
$("#forum_desc").val('');
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="homepageContentContainer mb10">
|
||||
<div class="homepageContent">
|
||||
<div class="postContainer">
|
||||
<div id="new_forum_div" class="mb5" style="display: none">
|
||||
<div class="red fl mb10" id="error" style="display: none">error</div>
|
||||
<%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
|
||||
<div class="mt15">
|
||||
<textarea type="text" name="forum[name]" id="forum_name" class="postCreateInput" onfocus="hideError();" onblur="check_forum_name();" placeholder="输入贴吧名称" ></textarea>
|
||||
<script>
|
||||
var textarea = document.getElementById('forum_name');
|
||||
autoTextarea(textarea);
|
||||
</script>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<textarea type="text" name="forum[description]" id="forum_desc" class="postCreateInput" placeholder="输入贴吧描述"></textarea>
|
||||
<script>
|
||||
var textarea1 = document.getElementById('forum_desc');
|
||||
autoTextarea(textarea1);
|
||||
</script>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit($(this));">确定</a></div>
|
||||
<div class="fr"><a href="javascript:void(0);" class="linkGrey2 mr10" onclick="create_cancle();">取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postBanner" id="postBanner">
|
||||
<%= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str}%>
|
||||
<!--<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a><a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveD"></a></div>-->
|
||||
<!--<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a><a href="javascript:void(0)" id="reorder_popu" ></a></div>-->
|
||||
<!--<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a><a href="javascript:void(0)" id="reorder_time" ></a></div>-->
|
||||
<!--<div class="creatPost"><a href="javascript:void(0);" id="create_btn" class="c_white db creatPostIcon bBlue" onclick="$('#error').hide();$('#new_forum_div').slideToggle();$(this).parent().slideToggle();">新建贴吧</a></div>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
|
||||
</div>
|
||||
<div id="forum_list">
|
||||
<%= render :partial => 'forum_list',:locals => {:forums=>@forums}%>
|
||||
</div>
|
||||
<ul class="wlist fr" id="pages" style="margin-top: 10px;">
|
||||
<%= pagination_links_full @forums_pages, @forums_count ,:per_page_links => true,:remote =>true,:flag=>true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
//$("#postBanner").html("<%#= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str }%>");
|
||||
$("#forum_list").html("<%= escape_javascript(render :partial => 'forum_list',:locals => {:forums=>@forums}) %>");
|
||||
//这里出现一个问题竟然是单双引号引起的。注意!!
|
||||
$("#pages").html('<%= pagination_links_full @forums_pages, @forums_count,:per_page_links => false,:remote =>true,:flag=>true%>');
|
|
@ -1,42 +1,144 @@
|
|||
<!-- added by fq -->
|
||||
<div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;">
|
||||
<h3>
|
||||
<%=l(:label_memo_new)%>
|
||||
</h3>
|
||||
<% if User.current.logged? %>
|
||||
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
||||
<div class="actions" style="max-width:680px">
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<p>
|
||||
<%= f.text_field :subject, :required => true, :maxlength => 50%>
|
||||
</p>
|
||||
<p style="max-width:680px">
|
||||
<%= f.kindeditor :content, :required => true %>
|
||||
</p>
|
||||
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>-->
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_memos_max_length) %>)
|
||||
</p>
|
||||
<p class="fl" style="margin-top: 5px;">
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<%= f.submit :value => l(:label_memo_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= javascript_include_tag 'new_user' %>
|
||||
<script>
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=asc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#complex").click(function(){
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_complex");
|
||||
});
|
||||
$("#popu").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_popu");
|
||||
});
|
||||
$("#time").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_time");
|
||||
});
|
||||
<% if @errors %>
|
||||
$('#create_memo_div').slideToggle();$('#create_memo_btn').slideToggle();
|
||||
$("#error").html('<%= @errors.html_safe %>').show();
|
||||
<% end %>
|
||||
});
|
||||
|
||||
function check_and_submit(){
|
||||
if(!check_memo_name()){
|
||||
return;
|
||||
}
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
||||
$("#new_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
||||
$("#error").html("主题不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() == ""){
|
||||
$("#error").html("内容不能为空").show();
|
||||
}
|
||||
}
|
||||
|
||||
function check_memo_name(){
|
||||
if($("#memo_subject").val().trim().length > 50){
|
||||
$("#error").html("主题 过长(最长为 50 个字符)").show();
|
||||
return false;
|
||||
}
|
||||
if($("#memo_content").val().trim().length > 5000){
|
||||
$("#error").html("内容 过长(最长为 5000 个字符)").show();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function create_cancle(){
|
||||
$('#create_memo_div').slideToggle();
|
||||
$('#create_memo_btn').slideToggle();
|
||||
$('#memo_subject').val('');
|
||||
$('#memo_content').val('')
|
||||
$('#error').html('').hide();
|
||||
}
|
||||
</script>
|
||||
<div class="postRightContainer">
|
||||
<div id="create_memo_div" style="display: none">
|
||||
<div id="error" class="red fl mb10" style="display: none">error</div>
|
||||
<%= labelled_form_for(@memo, :url => forum_memos_path(@forum)) do |f| %>
|
||||
<div>
|
||||
<textarea type="text" name="memo[subject]" id="memo_subject" onblur="check_memo_name();" onfocus="$('#error').hide();" onmouseover="this.style.borderColor='#d9d9d9'" class="postDetailInput" placeholder="输入帖子标题" ></textarea>
|
||||
<script>
|
||||
var textarea1 = document.getElementById('memo_subject');
|
||||
autoTextarea(textarea1);
|
||||
</script>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<textarea type="text" name="memo[content]" id="memo_content" onfocus="$('#error').hide();" onmouseover="this.style.borderColor='#d9d9d9'" class="postDetailInput" placeholder="输入帖子内容" /></textarea>
|
||||
<script>
|
||||
var textarea = document.getElementById('memo_content');
|
||||
autoTextarea(textarea);
|
||||
</script>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>-->
|
||||
<%= render :partial => 'file_form', :locals => {:container => @memo} %>
|
||||
<div class="fr">
|
||||
<a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit();">确定</a>
|
||||
</div>
|
||||
<div class="fr"><a href="javascript:void(0);" class="linkGrey2 mr10" onclick="create_cancle();">取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailBanner">
|
||||
<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a><a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveD"></a><!--<a href="javascript:void(0);" class="sortArrowActiveD"></a>--></div>
|
||||
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a><a href="javascript:void(0);" id="reorder_popu" class=""></a></div>
|
||||
<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a><a href="javascript:void(0);" id="reorder_time" class=""></a></div>
|
||||
<div class="creatPost" id="create_memo_btn"><a href="javascript:void(0);" class="c_white db creatPostIcon bBlue" onclick="$('#error').hide();$('#create_memo_div').slideToggle();$(this).parent().slideToggle();">发布新帖</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="topics_list">
|
||||
<%= render :partial => 'show_topics',:locals => {:memos=>@memos}%>
|
||||
</div>
|
||||
<ul class="wlist" id="pages" style="float: right;margin-top: 10px;">
|
||||
<%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %>
|
||||
</ul>
|
||||
|
||||
<!--<div class="pageRoll">-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="linkBlue">上一页</a></div>-->
|
||||
<!--<div class="pageCell pageCellActive"><a href="javascript:void(0);" class="c_white">1</a></div>-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="fontBlue">2</a></div>-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="fontBlue">3</a></div>-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="fontBlue">...</a></div>-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="fontBlue">14</a></div>-->
|
||||
<!--<div class="pageCell"><a href="javascript:void(0);" class="linkBlue">下一页</a></div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
</div>
|
||||
<!--modified by huang-->
|
||||
<span class="contextual-borad">
|
||||
<%= link_to(image_tag('edit.png')+l(:label_forum_edit),{:action => 'edit', :id => @forum}, :method => 'get', :title => l(:button_edit)) if @forum.editable_by?(User.current) %>
|
||||
<%= link_to(image_tag('delete.png')+'删除讨论区', {:action => 'destroy', :id => @forum}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete)
|
||||
) if @forum.destroyable_by?(User.current) %>
|
||||
</span>
|
||||
<span>
|
||||
<%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
|
||||
</div>
|
|
@ -0,0 +1,2 @@
|
|||
$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>")
|
||||
$("#pages").html('<%= pagination_links_full @topic_pages, @topic_count,:per_page_links => false,:remote =>true%>');
|
|
@ -5,7 +5,7 @@
|
|||
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||
<li class="fl"><a href="<%= forums_path %>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||
<li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application','prettify', 'nyan', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', 'nyan','leftside', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'prettify' %>
|
||||
|
@ -15,7 +15,114 @@
|
|||
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||
<%= stylesheet_link_tag 'base','header','new_user', :media => 'all'%>
|
||||
<script>
|
||||
var desc;
|
||||
function edit_desc(){
|
||||
if(<%=@forum.creator.id == User.current.id%>) {
|
||||
desc = $("#forum_desc_span").html();
|
||||
$("#forum_desc_span").html("<textarea id='forum_desc_input' onblur='change_forum_desc();' class='homepageSignatureTextarea'>" + desc + "</textarea>");
|
||||
$("#forum_desc_input").focus();
|
||||
}
|
||||
}
|
||||
|
||||
function change_forum_desc(){
|
||||
$.ajax({
|
||||
url: '<%= forums_path + '/'+@forum.id.to_s+".js" %>',
|
||||
type: 'PUT',
|
||||
dataType: 'json',
|
||||
data:{"forum[description]":$("#forum_desc_input").val().trim()},
|
||||
success:function(data){
|
||||
if(data == true){
|
||||
$("#forum_desc_span").html($("#forum_desc_input").val().trim());
|
||||
}else{
|
||||
$("#forum_desc_span").html(desc);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delete_forum_tag(doc){
|
||||
tag_name = doc.parent().children().eq(0).html().trim();
|
||||
$.ajax(
|
||||
"<%= delete_forum_tag_forum_path(@forum)+ '.js?tag_name='%>"+tag_name,
|
||||
{},
|
||||
function(data){
|
||||
alert(data == true)
|
||||
if(data == true){
|
||||
doc.parent().remove();
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function addTag(){
|
||||
if(<%=@forum.creator.id == User.current.id%>) {
|
||||
if ($("input[name='addTag']").val().trim() != "" ) {
|
||||
if($("input[name='addTag']").val().trim().length <= 14) {
|
||||
$.get(
|
||||
'<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(),
|
||||
{}
|
||||
);
|
||||
$("input[name='addTag']").val('');
|
||||
}else{
|
||||
alert("标签名字长度不能超过14个字符");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var tagNameHtml; //当前双击的链接的父节点的html
|
||||
var tagName; //标签的值
|
||||
var parentCssBorder; //当前双击的链接的父节点
|
||||
var ele; //当前双击的链接
|
||||
var taggableId; //标签的id
|
||||
var taggableType; //被标签的类型
|
||||
//这里renameTag有两种情况,一种是改变某个资源的tag名称。如果其他资源也有这个tag。则新增一个改变后的tag名
|
||||
//第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。
|
||||
//目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id,就是第一种情况。如果没有id。就是第二种情况
|
||||
function rename_tag(domEle,name,id,type){
|
||||
if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
|
||||
return;
|
||||
}
|
||||
tagNameHtml = domEle.parent().html()
|
||||
tagName = name;
|
||||
parentCssBorder = domEle.parent().css("border");
|
||||
ele = domEle;
|
||||
taggableId = id;
|
||||
taggableType = type;
|
||||
width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100
|
||||
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:'+width+'px;" value="'+name+'"/>');
|
||||
domEle.parent().css("border","1px solid #ffffff");
|
||||
$("#renameTagName").focus();
|
||||
}
|
||||
//监听所有的单击事件
|
||||
$(document).click(function(e){
|
||||
node = document.elementFromPoint(e.clientX, e.clientY);
|
||||
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
|
||||
return;
|
||||
}
|
||||
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
|
||||
if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
|
||||
ele.parent().css("border","");
|
||||
ele.parent().html(tagNameHtml);
|
||||
|
||||
}else{ //否则就要更新tag名称了
|
||||
if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){
|
||||
$.post(
|
||||
'<%= update_tag_name_path %>',
|
||||
{"taggableId": taggableId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim()}
|
||||
)
|
||||
}else{
|
||||
ele.parent().css("border","");
|
||||
ele.parent().html(tagNameHtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="<%= h body_css_classes %>">
|
||||
|
||||
|
@ -28,82 +135,77 @@
|
|||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
<div class="homepageLeft">
|
||||
<div class="postDetailContainer">
|
||||
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %>
|
||||
<!--<div class="homepageEditProfile"><a href="javascript:void(0);" class="homepageEditProfileIcon"></a></div>-->
|
||||
</div>
|
||||
<div class="fl">
|
||||
<div class="f16 fontBlue mb10"><a href="<%= forums_path+"/"+@forum.id.to_s%>" style="word-break: break-all; word-wrap:break-word;"><%= @forum.name%></a></div>
|
||||
<div class="fontGrey2 mb8">吧主:<a href="<%= user_path(@forum.creator)%>" class="linkBlue"><%= @forum.creator.name%></a></div>
|
||||
<div class="fontGrey3">回答:<a href="javascript:void(0);" class="linkOrange mr5" style="cursor: default"><%= @forum.memo_count %></a> 帖子:<a href="javascript:void(0);" class="linkOrange" style="cursor: default"><%=@forum.topic_count%></a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description%></span>
|
||||
<%if @forum.creator.id == User.current.id%>
|
||||
<a href="javascript:void(0);" onclick="edit_desc();">
|
||||
<!--<img src="<%#= Rails.root%>/images/signature_edit.png" width="12" height="12" />-->
|
||||
<%= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
|
||||
</a>
|
||||
<%end%>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<div id="forum_tag_list">
|
||||
<%= render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum}%>
|
||||
</div>
|
||||
<% if(@forum.creator.id == User.current.id)%>
|
||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a>
|
||||
<% end %>
|
||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<input type="text" name="addTag" size="20" class="isTxt w90 f_l" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" />
|
||||
<input type="button" class="submit f_l" onclick="addTag();" />
|
||||
</span></div>
|
||||
<div class="cl"></div>
|
||||
<%if @forum.creator.id == User.current.id%>
|
||||
<span class="postEdit">
|
||||
</span>
|
||||
<a href="<%= edit_forum_path(@forum) %>" class="linkGrey3">编辑贴吧</a>
|
||||
<a href="<%= forum_path(@forum)%>" data-method="delete" onclick="return confirm('您确定要删除么?');" class="fr linkGrey3">删除贴吧</a>
|
||||
<span class="postDelete"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailContainer mt10">
|
||||
<div class="fl mr10"><%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path( User.current) %></div>
|
||||
<div class="fl f16 fontGrey2">我在贴吧</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt8">
|
||||
<div class="homepageImageBlock" style="width: 68px !important;">
|
||||
<div><a href="javascript:void(0);" class="homepageImageNumber" style="cursor: default"><%= @my_replies_count%></a></div>
|
||||
<div class="homepageImageText">回答</div>
|
||||
</div>
|
||||
<div class="homepageVerDiv"></div>
|
||||
<div class="homepageImageBlock" style="width: 68px !important;">
|
||||
<div><a href="javascript:void(0);" class="homepageImageNumber" style="cursor: default"><%= @my_topic_count%></a></div>
|
||||
<div class="homepageImageText">发帖</div>
|
||||
</div>
|
||||
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<div id="main">
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
<%#= form_tag(:controller => 'forums', :action => "search_memo", :id => params[:id], :method => :get) do %>
|
||||
<%#= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%#= hidden_field_tag 'forum_id', params[:id] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<%# end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%= link_to request.host()+"/forums", forums_path %></td>
|
||||
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="sidebar">
|
||||
<!--informations-->
|
||||
<div class="sidebar-forums">
|
||||
<div class="forums-line">
|
||||
<div class="forums-title"><%= @forum.name %></div>
|
||||
<div class="forums-description upload_img"><%= @forum.description.html_safe %></div>
|
||||
</div>
|
||||
<!--informations-->
|
||||
<div class="formus-first-title" >创建人信息</div>
|
||||
<div class="forums-info">
|
||||
<div style="padding-top: 20px" >
|
||||
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class =>'vatar-size') %></span>
|
||||
<span class="forums-avatar-right">
|
||||
<% unless @forum.creator.nil? %>
|
||||
<%=link_to @forum.creator.name, user_path(@forum.creator) %>
|
||||
<div>
|
||||
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>
|
||||
<%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@forum.creator.watcher_users(@forum.creator.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist", :id => @forum.creator.id %>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--tags-->
|
||||
<% if User.current.logged? || User.current.admin? %>
|
||||
<div class="forums-tags"><%= render :partial => 'tags/tag', :locals => {:obj => @forum,:object_flag => "5"}%></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<%#= render_flash_messages %>-->
|
||||
<%= yield %>
|
||||
<%#= call_hook :view_layouts_base_content %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
|
||||
</div>
|
||||
<%#= render :partial => 'layouts/base_footer'%>
|
||||
</div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
<%#= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application', 'nyan','prettify', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "jquery.leanModal.min" ,'prettify'%>
|
||||
<%= javascript_include_tag "jquery.leanModal.min" ,'prettify','avatars'%>
|
||||
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||
<%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
|
||||
</head>
|
||||
<body>
|
||||
<div class="cl"></div>
|
||||
|
@ -29,27 +29,27 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<%#=render :partial => 'layouts/base_header'%>
|
||||
<div id="main" class="nosidebar">
|
||||
<div id="content_">
|
||||
<!--<div id="wrapper">-->
|
||||
<!--<div id="wrapper2">-->
|
||||
<!--<div id="wrapper3">-->
|
||||
<!--<%#=render :partial => 'layouts/base_header'%>-->
|
||||
<!--<div id="main" class="nosidebar">-->
|
||||
<!--<div id="content_">-->
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<div class="mt10 fl" >
|
||||
<% for attachment in attachments %>
|
||||
<!--<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">-->
|
||||
<!--<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">-->
|
||||
<!--<span title="<%#= attachment.filename%>" id = "attachment_">-->
|
||||
<% if options[:length] %>
|
||||
<span class="pic_files fl "></span>
|
||||
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true,:length => options[:length] -%>
|
||||
<a class="fl FilesName02"> (<%= number_to_human_size attachment.filesize , :precision => 0 %>)</a>
|
||||
<% if options[:deletable] %>
|
||||
<%#= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete',
|
||||
#:remote => true,
|
||||
#:id => "attachments_" + attachment.id.to_s,
|
||||
:title => l(:button_delete) %>
|
||||
<span class="pic_del fl "> <a href="<%=attachment_path(attachment) %>" onclick="confirm(<%=l(:text_are_you_sure) %>)" data-method="delete"> </a></span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<span class="pic_files fl "></span>
|
||||
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 32 -%>
|
||||
<a href="javascript:void(0);" class="fl FilesName02"> (<%= number_to_human_size attachment.filesize , :precision => 0 %>)</a>
|
||||
<% if options[:deletable] %>
|
||||
<%#= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete',
|
||||
#:remote => true,
|
||||
#:id => "attachments_" + attachment.id.to_s,
|
||||
:title => l(:button_delete) %>
|
||||
<a href="<%=attachment_path(attachment) %>" onclick="confirm(<%=l(:text_are_you_sure) %>)" data-method="delete"> <span class="pic_del fl "></span> </a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<%# if attachment.is_text? %>
|
||||
<%#= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
:action => 'show',
|
||||
:id => attachment,
|
||||
:filename => attachment.filename%>
|
||||
<%# end %>
|
||||
<!--<span title="<%#= attachment.description%>">-->
|
||||
<!--<%#= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>-->
|
||||
<!--</span>-->
|
||||
|
||||
<!--<%# if options[:wrap] %>-->
|
||||
<!--<br/>-->
|
||||
<!-- -->
|
||||
<!--<%# end %>-->
|
||||
<!--<%# if options[:author] %>-->
|
||||
<!--<span class="author" title="<%#= attachment.author%>">-->
|
||||
<%#= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>
|
||||
<!--<%#= format_time(attachment.created_on) %>-->
|
||||
<!--</span>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</p>-->
|
||||
<% end %>
|
||||
<% if defined?(thumbnails) && thumbnails %>
|
||||
<% images = attachments.select(&:thumbnailable?) %>
|
||||
<% if images.any? %>
|
||||
<div class="pro_pic mb10" width="100" height="73">
|
||||
<% images.each do |attachment| %>
|
||||
<div><%= thumbnail_tag(attachment) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,36 @@
|
|||
<!-- get_praise_num(obj,1)函数中 1代表返回顶得次数 0返回踩的次数 -->
|
||||
<% if User.current.logged? %>
|
||||
<% if horizontal %>
|
||||
<!-- 横排 -->
|
||||
<div id="praise_tread_<%= obj.id %>" style="float:right;">
|
||||
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
||||
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
||||
<% @flag = @is_valuate.first.praise_or_tread %>
|
||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if user_id == obj.author_id %>
|
||||
|
||||
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
|
||||
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
||||
|
||||
<% else %>
|
||||
<!-- 积分少于2分不能踩帖 -->
|
||||
<%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
||||
|
||||
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
||||
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
|
||||
<!--<%# else %>-->
|
||||
|
||||
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
|
||||
<!--:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>-->
|
||||
<!--<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%#= l(:label_issue_praise)%>" target="_blank"> <%#= get_praise_num(obj)%></a>-->
|
||||
|
||||
<!--<%# end %>-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,55 +1,47 @@
|
|||
<!-- <h1>New memo</h1> -->
|
||||
<% @replying = !@memo.parent.nil? %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<h3><%=l(:label_memo_edit)%></h3>
|
||||
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
|
||||
<% if @memo.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2>
|
||||
<%= pluralize(@memo.errors.count, "error") %>
|
||||
prohibited this memo from being saved:
|
||||
</h2>
|
||||
<ul>
|
||||
<% @memo.errors.full_messages.each do |msg| %>
|
||||
<li>
|
||||
<%= msg %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="actions">
|
||||
<p>
|
||||
<% if @memo.parent.nil? && @memo.children.first.nil? %>
|
||||
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
|
||||
<% else %>
|
||||
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if User.current.admin?%>
|
||||
<p>
|
||||
<% unless @replying %>
|
||||
<% if @memo.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'memo_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @memo.safe_attribute? 'lock' %>
|
||||
<%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= f.kindeditor :content, :required => true, :size => 80,:owner_id => @memo.id,:owner_type => 1 %>
|
||||
</p>
|
||||
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
<p style="float: left;margin-top: 5px;">
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<br/>
|
||||
<div class="cl"></div>
|
||||
<%= f.submit :value => l(:button_change) %> <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%>
|
||||
<%= javascript_include_tag 'new_user'%>
|
||||
<script>
|
||||
$(function(){
|
||||
limitStrsize('memo_subject',50);
|
||||
limitStrsize('memo_content',5000);
|
||||
});
|
||||
function check_and_submit(){
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
||||
$("#edit_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
||||
$("#error").html("主题不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() == ""){
|
||||
$("#error").html("内容不能为空").show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="homepageRightBanner mt15">
|
||||
<div class="NewsBannerName">编辑帖子</div>
|
||||
</div>
|
||||
<div class="postRightContainer" style="margin-top: 15px">
|
||||
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo),:html=>{:id=>'edit_memo'}) do |f| %>
|
||||
<div id="error" style="display: none">
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<textarea type="text" id="memo_subject" name="memo[subject]" class="postDetailInput" placeholder="对应帖子标题" ><%= @memo.subject%></textarea>
|
||||
<script>
|
||||
var ta = document.getElementById('memo_subject')
|
||||
autoTextarea(ta)
|
||||
</script>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="mt15">
|
||||
<textarea type="text" id="memo_content" name="memo[content]" class="postDetailInput" placeholder="对应帖子内容" ><%= @memo.content.html_safe%></textarea>
|
||||
<script>
|
||||
var ta1 = document.getElementById('memo_content')
|
||||
autoTextarea(ta1)
|
||||
</script>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">对应附件名称</a>-->
|
||||
<%= render :partial => 'forums/file_form', :locals => {:container => @memo} %>
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit();">确定</a></div>
|
||||
<div class="fr"><a href="<%= forum_memo_path(@memo.forum,@memo)%>" class="linkGrey2 mr10">取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,188 +1,117 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
|
||||
<style type="text/css">
|
||||
.reply_content p {
|
||||
margin-top: 13px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
/*回复框*/
|
||||
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;}
|
||||
.ke-inline-block{display: none;}
|
||||
div.ke-container{float:left;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="lz">
|
||||
<!-- 在这里添加赞和踩-->
|
||||
<span id="praise_tread" style="float: right">
|
||||
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||
</span>
|
||||
<div class="lz-left">
|
||||
<div>
|
||||
<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
|
||||
</div>
|
||||
<p class="clearfix">
|
||||
<%=link_to @memo.author.name, user_path(@memo.author) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="memo-section">
|
||||
<div class="contextual-borad">
|
||||
<!-- <%#= link_to(
|
||||
image_tag('comment.png'),
|
||||
{:action => 'quote', :id => @memo},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)
|
||||
)if !@memo.locked? && User.current.logged? %> -->
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:action => 'quote', :id => @memo},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)
|
||||
)if !@memo.locked? && User.current.logged? %>
|
||||
|
||||
<%= link_to(
|
||||
#image_tag('edit.png'),
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => @memo},
|
||||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @memo.editable_by?(User.current) %>
|
||||
<!-- <%#= link_to(
|
||||
image_tag('delete.png'),
|
||||
{:action => 'destroy', :id => @memo},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @memo.destroyable_by?(User.current) %> -->
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => @memo},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @memo.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
|
||||
<div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>"
|
||||
style="word-break: break-all;word-wrap: break-word;">
|
||||
<%= label_tag l(:field_subject) %>:
|
||||
<%=h @memo.subject %>
|
||||
</div>
|
||||
<div class="memo-content" id="memo-content_div">
|
||||
<%= @memo.content.html_safe %>
|
||||
<p>
|
||||
<% if @memo.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="memo-timestamp">
|
||||
<%= authoring @memo.created_at, @memo.author %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="replies">
|
||||
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)</h3>
|
||||
<% pages_count = @reply_pages.offset %>
|
||||
<% @replies.each do |reply| %>
|
||||
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
||||
<p class="font_lighter"><!--<span style="display: inline"><%#= pages_count += 1 %>楼 :</span>--></p>
|
||||
<div class="contextual-borad">
|
||||
<!-- <%#= link_to(
|
||||
image_tag('comment.png'),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)
|
||||
)if !@memo.locked? && User.current.logged? %> -->
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)
|
||||
)if !@memo.locked? && User.current.logged? %>
|
||||
|
||||
<%= link_to(
|
||||
#image_tag('edit.png'),
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => reply},
|
||||
:title => l(:button_edit)
|
||||
) if reply.editable_by?(User.current) %>
|
||||
<!-- <%#= link_to(
|
||||
image_tag('delete.png'),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.destroyable_by?(User.current) %> -->
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.destroyable_by?(User.current) %>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<table class="borad-text-list" style="table-layout: fixed;">
|
||||
<tr>
|
||||
<td rowspan="3" valign="top" width="60px">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
|
||||
</td>
|
||||
<td class="comments" style="word-wrap: break-word;word-break: break-all;">
|
||||
<div class="reply_content" >
|
||||
<%=h sanitize(reply.content.html_safe) %>
|
||||
</div>
|
||||
<p>
|
||||
<% if reply.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font_lighter" style="float:right">
|
||||
<%= authoring reply.created_at, reply.author %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if User.current.login? %>
|
||||
<div class="reply-box" style="">
|
||||
<%= render :partial => 'reply_box' %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
transpotUrl('.lz');
|
||||
transpotUrl('.replies');
|
||||
<script>
|
||||
function expand_reply(container,btnid){
|
||||
var target = $(container).children();
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('收起回复('+btn.data('count')+')');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('展开更多('+btn.data('count')+')');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
init_activity_KindEditor_data(<%= @memo.id%>,null,"87%");
|
||||
});
|
||||
window.onready = function() {
|
||||
var maxwidth = $("#memo-content_div").width();
|
||||
$("#memo-content_div").children().each(function(){
|
||||
if($(this).width()>maxwidth)
|
||||
{
|
||||
$(this).width(maxwidth);
|
||||
}
|
||||
});
|
||||
};
|
||||
$("img").removeAttr("align");
|
||||
</script>
|
||||
<div class="postRightContainer">
|
||||
<div class="postThemeContainer">
|
||||
<div class="postDetailPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<% if @memo.author.id == User.current.id%>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb">主题: <%= @memo.subject%></a></div>
|
||||
<div class="postDetailCreater"><a href="javascript:void(0);" class="linkBlue2" target="_blank"><%= @memo.author.name%></a></div>
|
||||
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
||||
<span id="praise_tread" style="float: right">
|
||||
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<div class="fl fontGrey3" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;">
|
||||
<%= @memo.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10 fl">
|
||||
<% if @memo.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%= @memo.id%>" onclick="expand_reply('#reply_div_<%= @memo.id %>','#reply_btn_<%= @memo.id%>')" data-count="<%= @reply_count %>" data-init="0" >点击展开更多回复</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @memo.id %>">
|
||||
<% @replies.each_with_index do |reply,i| %>
|
||||
<div class="homepagePostReplyContainer" style="display: <%= i >= 2 ? 'none':''%>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
||||
<div class="homepagePostReplyContent"><%= reply.content.html_safe%></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @memo.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= @memo.id%>' style="display:none;">
|
||||
<%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%>
|
||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
|
||||
<div nhname='toolbar_container_<%= @memo.id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @memo.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,9 @@
|
|||
|
||||
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
||||
render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
||||
)%>');
|
||||
<% if @obj_type == 'Memo'%>
|
||||
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
||||
render :partial => "/memos/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
||||
)%>');
|
||||
<% else %>
|
||||
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
||||
render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
||||
)%>');
|
||||
<% end %>
|
||||
|
|
|
@ -14,24 +14,34 @@ $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project
|
|||
$('#tags_name2').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
<%if @course%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
|
||||
<% if @obj %>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
|
||||
$("#tags_name_<%=@obj.id%>").val("");
|
||||
$("#add_tag_<%=@obj.id%>").hide();
|
||||
<% else %>
|
||||
$("#course_list").html("<%= escape_javascript(render :partial => 'files/course_list',
|
||||
:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments}) %>");
|
||||
<% end %>
|
||||
$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
|
||||
<%else%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
<%end%>
|
||||
|
||||
$("#tags_name_<%=@obj.id%>").val("");
|
||||
$("#add_tag_<%=@obj.id%>").hide();
|
||||
<%end%>
|
||||
|
||||
|
||||
<% elsif @obj_flag == '9'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name').val("");
|
||||
<% elsif @obj_flag == '10'%>
|
||||
//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
|
||||
<% elsif @obj_flag == '5'%>
|
||||
$('#forum_tag_list').html('<%= escape_javascript(render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum})%>')
|
||||
<% else%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
|
|
|
@ -354,10 +354,20 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "StudentWorksScore" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% if ma.course_message.reviewer_role == 3 %>
|
||||
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
|
||||
<% else %>
|
||||
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<% if ma.course_message.reviewer_role == 3 %>
|
||||
匿名用户
|
||||
<% else %>
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<% end %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
||||
</span>
|
||||
|
|
|
@ -223,12 +223,14 @@ RedmineApp::Application.routes.draw do
|
|||
resources :forums do
|
||||
collection do
|
||||
match 'search_forum', :via => [:get, :post]
|
||||
|
||||
match 'check_forum_name',:via => [:get]
|
||||
end
|
||||
member do
|
||||
post 'create_memo'
|
||||
post 'create_feedback'
|
||||
match 'search_memo', :via => [:get, :post]
|
||||
match 'delete_forum_tag',:via =>[:get]
|
||||
match 'add_forum_tag',:via=>[:get]
|
||||
end
|
||||
resources :memos do
|
||||
collection do
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,101 @@
|
|||
$(function(){
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent().parent('div');
|
||||
params.div_form = $("div[nhname='div_form']",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='memo[content]']",params.div_form);
|
||||
//params.textarea.prev('div').css("height","60px");
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
|
||||
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
|
||||
params.height = 30;
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
});
|
||||
params.submit_btn.click(function(){
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
});
|
||||
|
||||
$("a[nhname='sub_reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent().parent('div');
|
||||
params.div_form = $("div[nhname='sub_div_form']",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
//params.textarea.prev('div').css("height","60px");
|
||||
params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("a[nhname='sub_cancel_btn']",params.div_form);
|
||||
params.submit_btn = $("a[nhname='sub_submit_btn']",params.div_form);
|
||||
params.height = 30;
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
});
|
||||
params.submit_btn.click(function(){
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").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']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn");
|
||||
params.submit_btn = $("#new_message_submit_btn");
|
||||
params.height = 30;
|
||||
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();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
|
@ -336,24 +336,24 @@ var autoTextarea = function (elem, extra, maxHeight) {
|
|||
change();
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////创建项目
|
||||
//验证项目名称是不是为空
|
||||
function regex_project_name(){
|
||||
var name = $.trim($("#project_name").val());
|
||||
if(name=="")
|
||||
function limitStrsize(id,length){
|
||||
document.getElementById(id).onkeydown = function()
|
||||
{
|
||||
$("#project_name_error_msg").text("项目名称不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_error_msg").text("");
|
||||
return true;
|
||||
var n = 0;
|
||||
var str = this.value;
|
||||
for (i = 0; i < str.length; i++) {
|
||||
var leg = str.charCodeAt(i);//ASCII码
|
||||
if (leg > 255) {//大于255的都是中文
|
||||
n += 2;//如果是中文就是2个字节
|
||||
} else {
|
||||
n += 1;//英文,不多说了
|
||||
}
|
||||
}
|
||||
|
||||
if(n >= length && event.keyCode !== 8)
|
||||
event.returnValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
//验证项目名称是否重复---项目名称可以重复。。。。
|
||||
function regex_project_name_same(){
|
||||
var name = $.trim($("#project_name").val());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -613,7 +613,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px
|
|||
.vi_zan{color:#28be6c;}
|
||||
.newwork_btn a{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; display:block; text-align:center; float:right;}
|
||||
.newwork_btn a:hover{ background:#329cbd;}
|
||||
.files_tag{ width:670px; height:22px; overflow:hidden; margin-bottom:10px;}
|
||||
.files_tag{ width:670px; min-height:22px;margin-bottom:10px;}/* overflow:hidden; */
|
||||
a.files_tag_icon{ background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px; }
|
||||
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;}
|
||||
|
||||
|
|
|
@ -1,117 +1,117 @@
|
|||
/*新个人主页框架css*/
|
||||
.navContainer {width:100%; background-color:#269ac9;}
|
||||
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
|
||||
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
|
||||
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
|
||||
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
|
||||
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;}
|
||||
.navHomepageMenu:hover {background-color:#297fb8;}
|
||||
.navHomepageSearchBoxcontainer {margin-top:11px; }
|
||||
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
|
||||
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none !important; float:left;padding: 0 0 0 5px !important; margin:0;}
|
||||
.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
|
||||
a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
|
||||
#navSearchAlert {display:none;}
|
||||
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
|
||||
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
|
||||
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
|
||||
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
|
||||
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
|
||||
.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
|
||||
/*.navHomepageProfile ul li ul {display:none;}
|
||||
.navHomepageProfile ul li:hover ul {display:block;}*/
|
||||
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
|
||||
.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;}
|
||||
.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;}
|
||||
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;}
|
||||
.homepagePortraitImage:hover {border:1px solid #15bccf;}
|
||||
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
||||
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
|
||||
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
|
||||
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
|
||||
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;}
|
||||
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
|
||||
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
|
||||
.homepageImageNumber {font-size:12px; color:#484848;}
|
||||
a.homepageImageNumber:hover {color:#15bccf;}
|
||||
.homepageImageText {font-size:12px; color:#888888;}
|
||||
.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;}
|
||||
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
|
||||
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
|
||||
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
|
||||
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
|
||||
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
|
||||
a.coursesLineGrey {color:#808080; display:block;}
|
||||
a.coursesLineGrey:hover {color:#ffffff;}
|
||||
.homepageLeftMenuMore {height:18px;}
|
||||
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}
|
||||
.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;}
|
||||
.homepageMenuSetting {display:inline-block; margin-right: 17px; margin-top: 18px;}
|
||||
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
||||
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
|
||||
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
|
||||
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
|
||||
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;}
|
||||
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
|
||||
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
|
||||
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
|
||||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
|
||||
a.homepageWhite {color:#ffffff !important;}
|
||||
a.homepageWhite:hover {color:#a1ebff !important;}
|
||||
a.newsGrey {color:#4b4b4b;}
|
||||
a.newsGrey:hover {color:#000000;}
|
||||
a.replyGrey {color:#888888; display:inline-block;}
|
||||
a.replyGrey:hover {color:#4b4b4b;}
|
||||
a.replyGrey1 {color:#888888;}
|
||||
a.replyGrey1:hover {color:#4b4b4b;}
|
||||
a.newsBlue {color:#15bccf;}
|
||||
a.newsBlue:hover {color:#0781b4;}
|
||||
a.menuGrey {color:#808080 !important;}
|
||||
a.menuGrey:hover {color:#fe7d68 !important;}
|
||||
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
|
||||
#navSearchAlert {display:none;}
|
||||
.none{display: none;}
|
||||
.db {display:block !important;}
|
||||
|
||||
/*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;}
|
||||
a.topnav_login_a{color:#fff; display:inline-block;}
|
||||
a.topnav_login_a:hover {color:#a1ebff;}
|
||||
a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;}
|
||||
a.topnav_login_mes:hover {color:#a1ebff;}
|
||||
a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;}
|
||||
.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;}
|
||||
li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;}
|
||||
a.topnav_login_box:hover {color:#a1ebff;}
|
||||
.navRow1 {margin:0; padding:0;}
|
||||
.navRow2 {margin:0; padding:0;}
|
||||
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px; font-size: 12px;}
|
||||
.topnav_login_list a{color:#269ac9;}
|
||||
.topnav_login_list li{ }
|
||||
.portraitRadius {border-radius: 3px;}
|
||||
|
||||
/*底部*/
|
||||
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
|
||||
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
|
||||
.footerAbout{ width:485px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px;}
|
||||
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
|
||||
.departments{ width:950px; margin:5px auto 0 auto;height:30px;line-height:30px;}
|
||||
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}
|
||||
a.f_grey {color:#666666 !important;}
|
||||
a.f_grey:hover {color:#000000 !important;}
|
||||
.mr30 {margin-right: 30px;}
|
||||
|
||||
|
||||
/*注册登陆页面*/
|
||||
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginSignButton:hover {background-color:#297fb8;}
|
||||
#loginInButton:hover {background-color:#297fb8;}
|
||||
/*新个人主页框架css*/
|
||||
.navContainer {width:100%; background-color:#269ac9;}
|
||||
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
|
||||
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
|
||||
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
|
||||
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
|
||||
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;}
|
||||
.navHomepageMenu:hover {background-color:#297fb8;}
|
||||
.navHomepageSearchBoxcontainer {margin-top:11px; }
|
||||
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
|
||||
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none !important; float:left;padding: 0 0 0 5px !important; margin:0;}
|
||||
.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
|
||||
a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
|
||||
#navSearchAlert {display:none;}
|
||||
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
|
||||
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
|
||||
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
|
||||
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
|
||||
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
|
||||
.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
|
||||
/*.navHomepageProfile ul li ul {display:none;}
|
||||
.navHomepageProfile ul li:hover ul {display:block;}*/
|
||||
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
|
||||
.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;}
|
||||
.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;}
|
||||
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;}
|
||||
.homepagePortraitImage:hover {border:1px solid #15bccf;}
|
||||
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
||||
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
|
||||
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
|
||||
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
|
||||
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;}
|
||||
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
|
||||
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
|
||||
.homepageImageNumber {font-size:12px; color:#484848;}
|
||||
a.homepageImageNumber:hover {color:#15bccf;}
|
||||
.homepageImageText {font-size:12px; color:#888888;}
|
||||
.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;}
|
||||
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
|
||||
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
|
||||
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
|
||||
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
|
||||
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
|
||||
a.coursesLineGrey {color:#808080; display:block;}
|
||||
a.coursesLineGrey:hover {color:#ffffff;}
|
||||
.homepageLeftMenuMore {height:18px;}
|
||||
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}
|
||||
.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;}
|
||||
.homepageMenuSetting {display:inline-block; margin-right: 17px; margin-top: 18px;}
|
||||
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
||||
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
|
||||
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
|
||||
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
|
||||
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left; margin-top:4px;}
|
||||
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
|
||||
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
|
||||
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
|
||||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
|
||||
a.homepageWhite {color:#ffffff !important;}
|
||||
a.homepageWhite:hover {color:#a1ebff !important;}
|
||||
a.newsGrey {color:#4b4b4b;}
|
||||
a.newsGrey:hover {color:#000000;}
|
||||
a.replyGrey {color:#888888; display:inline-block;}
|
||||
a.replyGrey:hover {color:#4b4b4b;}
|
||||
a.replyGrey1 {color:#888888;}
|
||||
a.replyGrey1:hover {color:#4b4b4b;}
|
||||
a.newsBlue {color:#15bccf;}
|
||||
a.newsBlue:hover {color:#0781b4;}
|
||||
a.menuGrey {color:#808080 !important;}
|
||||
a.menuGrey:hover {color:#fe7d68 !important;}
|
||||
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
|
||||
#navSearchAlert {display:none;}
|
||||
.none{display: none;}
|
||||
.db {display:block !important;}
|
||||
|
||||
/*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;}
|
||||
a.topnav_login_a{color:#fff; display:inline-block;}
|
||||
a.topnav_login_a:hover {color:#a1ebff;}
|
||||
a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;}
|
||||
a.topnav_login_mes:hover {color:#a1ebff;}
|
||||
a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;}
|
||||
.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;}
|
||||
li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;}
|
||||
a.topnav_login_box:hover {color:#a1ebff;}
|
||||
.navRow1 {margin:0; padding:0;}
|
||||
.navRow2 {margin:0; padding:0;}
|
||||
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px; font-size: 12px;}
|
||||
.topnav_login_list a{color:#269ac9;}
|
||||
.topnav_login_list li{ }
|
||||
.portraitRadius {border-radius: 3px;}
|
||||
|
||||
/*底部*/
|
||||
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
|
||||
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
|
||||
.footerAbout{ width:485px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px;}
|
||||
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
|
||||
.departments{ width:950px; margin:5px auto 0 auto;height:30px;line-height:30px;}
|
||||
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}
|
||||
a.f_grey {color:#666666 !important;}
|
||||
a.f_grey:hover {color:#000000 !important;}
|
||||
.mr30 {margin-right: 30px;}
|
||||
|
||||
|
||||
/*注册登陆页面*/
|
||||
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginSignButton:hover {background-color:#297fb8;}
|
||||
#loginInButton:hover {background-color:#297fb8;}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
|
@ -177,6 +177,13 @@ a.c_green{ color:#28be6c;}
|
|||
.b_green{background:#28be6c;}
|
||||
.b_w{ background:#fff;}
|
||||
|
||||
/****翻页***/
|
||||
.wlist{float:right;}
|
||||
.wlist li{float:left;}
|
||||
.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;}
|
||||
.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;}
|
||||
.wlist_select a { background-color:#48aac9; color:#fff;}
|
||||
|
||||
/*add by Tim*/
|
||||
a.linkBlue {color:#269ac9;}
|
||||
a.linkBlue:hover {color:#297fb8;}
|
||||
|
@ -185,6 +192,25 @@ a.buttonBlue:hover {background-color:#297fb8;}
|
|||
a.linkGrey {color:#484848;}
|
||||
a.linkGrey:hover {color:#269ac9;}
|
||||
|
||||
a.bBlue {background-color:#3498db;}
|
||||
a.bBlue:hover {background-color:#297fb8;}
|
||||
.fontGrey {color:#cecece;}
|
||||
.fontGrey2 {color:#888888;}
|
||||
a.linkBlue2 {color:#3498db;}
|
||||
a.linkBlue2:hover {color:#297fb8;}
|
||||
a.linkOrange {color:#ff7143;}
|
||||
a.linkGrey2 {color:#888888;}
|
||||
a.linkGrey2:hover {color:#484848;}
|
||||
a.linkGrey4 {color:#484848;}
|
||||
a.linkGrey5 {color:#484848;}
|
||||
a.linkGrey5:hover {color:#3498db;}
|
||||
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
|
||||
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
|
||||
input.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
|
||||
input.submit_btn:hover {background-color:#3498db; color:#ffffff;}
|
||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||
|
||||
|
||||
/* commonBtn */
|
||||
.grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;}
|
||||
a.grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;}
|
||||
|
@ -494,7 +520,7 @@ a:hover.UsersApBtn{border:1px solid #888888; }
|
|||
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 0px;}
|
||||
.homepageSignature {font-size:12px; color:#888888; margin:10px 0; width:208px;}
|
||||
.homepageImageBlock {margin:0 auto; width:68px; float:left; text-align:center; display:inline-block;}
|
||||
a.homepageImageNumber {font-size:12px; color:#484848; font-weight: bold;}
|
||||
a.homepageImageNumber {font-size:12px; font-weight: bold;} /*color:#484848;*/
|
||||
a.homepageImageNumber:hover {color:#269ac9;}
|
||||
.homepageImageText {font-size:12px; color:#888888;}
|
||||
.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;}
|
||||
|
@ -601,7 +627,7 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
|
||||
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
|
||||
.homepagePostReplyPortrait {float:left; width:33px;}
|
||||
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
||||
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
|
||||
|
@ -699,6 +725,60 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
|
|||
.AgreementTxt{text-indent:2em; margin-bottom:15px;}
|
||||
.AgreementImg{ margin:0px auto; width:619px;}
|
||||
|
||||
|
||||
/*创建贴吧样式*/
|
||||
.postContainer {width:968px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; margin-top:15px;}
|
||||
.postBanner {height:30px; width:970px; border-bottom:1px solid #efefef;}
|
||||
.postSort {width:40px; float:left; margin-top:5px; padding-left:5px;}
|
||||
a.sortArrowDown {background:url(images/post_image_list.png) 0px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
|
||||
a.sortArrowUp {background:url(images/post_image_list.png) -17px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
|
||||
a.sortArrowActiveD {background:url(images/post_image_list.png) -0px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
|
||||
a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;}
|
||||
.creatPost {width:80px; height:25px; border-radius:3px; color:#ffffff; text-align:center; float:right; line-height:25px; vertical-align:middle; margin-top:2px;}
|
||||
.creatPostIcon {background:url(images/post_image_list.png) -40px -54px no-repeat; width:70px; height:25px; padding-left:10px; border-radius:3px;}
|
||||
.postRow {width:970px; border-bottom:1px solid #efefef; padding:15px 0;}
|
||||
.postPortrait {width:75px; height:75px; float:left; margin-right:15px;}
|
||||
.postWrap {width:690px; float:left; margin-right:95px;}
|
||||
.postTitle {width:690px; max-width:690px; margin-bottom:5px;word-break: break-all; word-wrap:break-word; }
|
||||
.postDes {width:690px; max-width:690px; margin-bottom:6px; color:#484848;}
|
||||
.postCreater {color:#888888; font-size:12px; float:left; margin-right:40px;}
|
||||
.postDate {color:#888888; font-size:12px;}
|
||||
.postStatics { margin-top:28px; color:#888888; float:right;}
|
||||
.slice {width:1px; height:25px; background-color:#d1d1d1; float:right; margin-top:35px; margin-right:20px;}
|
||||
.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;}
|
||||
.pageCell {border:1px solid #dddddd; border-width:1px 1px 1px 0px; padding:5px 12px; float:left; border-spacing:0px;}
|
||||
.pageCellActive {background-color:#3498db;}
|
||||
.postCreateInput {width:963px; height:28px; border:1px solid #d9d9d9 !important; outline:none;}
|
||||
.upImg {padding:1px 6px; border: 1px solid #dddddd; margin-top:53px;}
|
||||
|
||||
/*贴吧内部样式*/
|
||||
.postDetailContainer {padding:15px; border:1px solid #dddddd; background-color:#ffffff;}
|
||||
.postlabel {background-color:#edf1f2; color:#888888; padding:2px 5px; float:left; margin-bottom:5px;}
|
||||
.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left;} /* margin-top:15px;*/
|
||||
.postDetailBanner {height:30px; width:720px; border-bottom:1px solid #efefef;}
|
||||
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
|
||||
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
|
||||
.postDetailWrap {width:580px; float:left;}
|
||||
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
|
||||
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;}
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
.postDetailReply { margin-top:28px; color:#888888; float:right;}
|
||||
a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left;}
|
||||
a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat;}
|
||||
.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;}
|
||||
.postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;}
|
||||
.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
|
||||
.postThemeContainer {width:720px;}
|
||||
.postThemeWrap {width:655px; float:left;position: relative}
|
||||
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px;}
|
||||
.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
|
||||
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
|
||||
.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;}
|
||||
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
|
||||
.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
|
||||
.homepagePostReplyInput {width:543px; height:33px; max-width:543px; max-height:33px; border:1px solid #d9d9d9; outline:none;}
|
||||
/*底部*/
|
||||
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
|
||||
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
|
||||
|
@ -880,6 +960,8 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
|
|||
.w720{width:721px;}
|
||||
.w709{width: 709px;}
|
||||
.w701{width: 701px;}
|
||||
/*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:#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:#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;}
|
||||
|
@ -896,8 +978,8 @@ a:hover.BlueCirBtn{ background:#3598db; color:#fff;}
|
|||
.W440{ width:440px;}
|
||||
.W120{ width:110px;}
|
||||
.W700{ width:700px;}
|
||||
a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:50px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||
a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;}
|
||||
/*a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}*/
|
||||
/*a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;}*/
|
||||
a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:38px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||
a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
|
|
|
@ -534,7 +534,7 @@ a.sendButtonBlue:hover {color:#ffffff;}
|
|||
outline:none;
|
||||
}
|
||||
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
|
||||
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;}
|
||||
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left; margin-top:4px;}
|
||||
a.resourcesTypeAll {background:url(images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;}
|
||||
a.resourcesTypeAtt {background:url(images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;}
|
||||
.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;}
|
||||
|
@ -794,4 +794,4 @@ div.flash.warning, .conflict {
|
|||
.AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;}
|
||||
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;}
|
||||
.AgreementTxt{text-indent: 2em; margin-bottom: 15px;}
|
||||
.AgreementImg{margin: 0px auto;}
|
||||
.AgreementImg{margin: 0px auto;}
|
||||
|
|
|
@ -848,16 +848,16 @@ p.breadcrumb
|
|||
text-indent:15px
|
||||
}
|
||||
|
||||
input[type="text"],input[type="password"],textarea,select
|
||||
{
|
||||
padding:2px;
|
||||
border:1px solid #039ea0
|
||||
}
|
||||
/*input[type="text"],input[type="password"],textarea,select*/
|
||||
/*{*/
|
||||
/*padding:2px;*/
|
||||
/*border:1px solid #039ea0*/
|
||||
/*}*/
|
||||
|
||||
input[type="text"],input[type="password"]
|
||||
{
|
||||
padding:3px
|
||||
}
|
||||
/*input[type="text"],input[type="password"]*/
|
||||
/*{*/
|
||||
/*padding:3px*/
|
||||
/*}*/
|
||||
|
||||
input[type="text"]:focus,input[type="password"]:focus,textarea:focus,select:focus
|
||||
{
|
||||
|
@ -1719,57 +1719,57 @@ a.enterprise {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
input.enterprise[type="button"] {
|
||||
padding-bottom: 5px;
|
||||
width: 55px;
|
||||
height: 25px;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 0px;
|
||||
background: #15bccf;
|
||||
border: 1px solid #15bccf;
|
||||
}
|
||||
input.enterprise[type="submit"] {
|
||||
padding-bottom: 5px;
|
||||
width: 55px;
|
||||
height: 25px;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 0px;
|
||||
background: #15bccf;
|
||||
border: 1px solid #15bccf;
|
||||
/*input.enterprise[type="button"] {*/
|
||||
/*padding-bottom: 5px;*/
|
||||
/*width: 55px;*/
|
||||
/*height: 25px;*/
|
||||
/*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/
|
||||
/*font-size: 12px;*/
|
||||
/*color: #fff;*/
|
||||
/*padding: 0px;*/
|
||||
/*background: #15bccf;*/
|
||||
/*border: 1px solid #15bccf;*/
|
||||
/*}*/
|
||||
/*input.enterprise[type="submit"] {*/
|
||||
/*padding-bottom: 5px;*/
|
||||
/*width: 55px;*/
|
||||
/*height: 25px;*/
|
||||
/*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/
|
||||
/*font-size: 12px;*/
|
||||
/*color: #fff;*/
|
||||
/*padding: 0px;*/
|
||||
/*background: #15bccf;*/
|
||||
/*border: 1px solid #15bccf;*/
|
||||
|
||||
}
|
||||
/*}*/
|
||||
/*end*/
|
||||
input[type="submit"] {
|
||||
width: auto;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: rgb(5, 5, 5);
|
||||
padding: 0px;
|
||||
background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
|
||||
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);
|
||||
cursor: pointer;
|
||||
}
|
||||
/*input[type="submit"] {*/
|
||||
/*width: auto;*/
|
||||
/*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/
|
||||
/*font-size: 12px;*/
|
||||
/*color: rgb(5, 5, 5);*/
|
||||
/*padding: 0px;*/
|
||||
/*background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;*/
|
||||
/*border-radius: 4px;*/
|
||||
/*border: 1px solid rgb(148, 148, 148);*/
|
||||
/*box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;*/
|
||||
/*text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);*/
|
||||
/*cursor: pointer;*/
|
||||
/*}*/
|
||||
|
||||
input[type="button"] {
|
||||
width: auto;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: rgb(5, 5, 5);
|
||||
padding: 0px;
|
||||
background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
|
||||
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);
|
||||
cursor: pointer;
|
||||
}
|
||||
/*input[type="button"] {*/
|
||||
/*width: auto;*/
|
||||
/*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/
|
||||
/*font-size: 12px;*/
|
||||
/*color: rgb(5, 5, 5);*/
|
||||
/*padding: 0px;*/
|
||||
/*background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;*/
|
||||
/*border-radius: 4px;*/
|
||||
/*border: 1px solid rgb(148, 148, 148);*/
|
||||
/*box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;*/
|
||||
/*text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);*/
|
||||
/*cursor: pointer;*/
|
||||
/*}*/
|
||||
/*by fanqiang*/
|
||||
img.avatar3 {
|
||||
width: 50px;
|
||||
|
|
Loading…
Reference in New Issue