diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 2b44d51de..be6543be2 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -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 diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 27e0d472f..4181090a5 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -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 diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index e0cb8af8e..0ffa334c2 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -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] diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 284ee8c43..2e8b98a2d 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -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) diff --git a/app/models/forum.rb b/app/models/forum.rb index 530639f81..9fa1b7dfd 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -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 diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb index 353d19dab..e31eea960 100644 --- a/app/views/files/_course_list.html.erb +++ b/app/views/files/_course_list.html.erb @@ -3,13 +3,13 @@

共有 <%= all_attachments.count%> 个资源

<% 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 %>

diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb index 9db34ece4..b2c7ab79f 100644 --- a/app/views/files/_tag_yun.html.erb +++ b/app/views/files/_tag_yun.html.erb @@ -3,7 +3,7 @@ <% if tag_name && tag_name == k%> <%= k%>×<%= v%> <% else%> - <%= k%>×<%= v%> + <%= k%>×<%= v%> <% end%> <% end%> <% end%> \ No newline at end of file diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index fa15c1fc7..489c0357d 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -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(''); + width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100 + domEle.html(''); 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); diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb new file mode 100644 index 000000000..030c8ff0e --- /dev/null +++ b/app/views/forums/_file_form.html.erb @@ -0,0 +1,79 @@ + +
+ +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= 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;") %><%= l(:field_is_public) %>: + <%= 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}" %> + +
+ <% end %> + <% container.saved_attachments.each_with_index do |attachment, i| %> + + <%= 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;") %> + <%= l(:field_is_public) %>: + <%= 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}" %> + +
+ <% end %> +<% end %> +
+ <% project = project %> +
+ + <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> + + <%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'AnnexBtn fl mt3' %> + 上传附件 + <%= 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) + } %> + + + + + <%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %> + + + + <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
\ No newline at end of file diff --git a/app/views/forums/_form_edit_mode.html.erb b/app/views/forums/_form_edit_mode.html.erb index a9bb05f79..9c0ec27bd 100644 --- a/app/views/forums/_form_edit_mode.html.erb +++ b/app/views/forums/_form_edit_mode.html.erb @@ -1,49 +1,26 @@ - - -
- <%= labelled_form_for(@forum) do |f| %> - <% if @forum.errors.any? %> - - <% end %> -
-
- <%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%> -
-
- <% 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 %> +
+ <%= labelled_form_for(@forum) do |f| %> + +
+ +
+
+ +
+
+ + +
+
<% end %>
-
-

- <%= f.kindeditor :description, :required => true,:owner_id => @forum.id,:owner_type => 2 %> -

- -

- (<%= l(:label_forums_max_length) %>) -

-
-
- <%= submit_tag l(:button_submit) %> - <%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %> -
- <% end %> -
+
\ No newline at end of file diff --git a/app/views/forums/_forum_form.html.erb b/app/views/forums/_forum_form.html.erb new file mode 100644 index 000000000..9888b674e --- /dev/null +++ b/app/views/forums/_forum_form.html.erb @@ -0,0 +1,15 @@ +
贴吧图片 + 上传图片 +
+
+
+ +
+
+ +
+
+
确定
+
取消
+
+
\ No newline at end of file diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index ac27235eb..fbbe023a0 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -1,57 +1,38 @@ - -
+ <% if forums.any? %> <% forums.each do |forum| %> -
-
- <%= 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)) %> -
-
- - - - - - - - - - -
-

- <%= link_to h(forum.name), forum_path(forum) %> -

-
-

- <%= textAreailizable forum.description%> -

-
-

- <%= authoring forum.created_at, forum.creator %> -

-
-
-
- - - - - - - - - -
- <%= link_to (forum.memo_count), forum_path(forum) %> - - <%= link_to (forum.topic_count), forum_path(forum) %> -
回答帖子
-
-
+
+ + +
+
+ + <%= link_to ( forum.topic_count), forum_path(forum),:class=>"linkGrey5 fb" %> +
+
帖子
+
+
+
+
+ + <%= link_to (forum.memo_count), forum_path(forum),:class=>"linkGrey5 fb" %> +
+
回答
+
+
+
<% end %> - + <% else %> -<% end %> -
\ No newline at end of file + <%= render :partial => "layouts/no_content" %> +<% end %> \ No newline at end of file diff --git a/app/views/forums/_forum_tag_list.html.erb b/app/views/forums/_forum_tag_list.html.erb new file mode 100644 index 000000000..2a0257d63 --- /dev/null +++ b/app/views/forums/_forum_tag_list.html.erb @@ -0,0 +1,8 @@ +<% forum.tag_list.each do |tag|%> + + <%= tag %> + <%if forum.creator.id == User.current.id%> + × + <% end %> + +<% end %> \ No newline at end of file diff --git a/app/views/forums/_post_banner.html.erb b/app/views/forums/_post_banner.html.erb new file mode 100644 index 000000000..797b43245 --- /dev/null +++ b/app/views/forums/_post_banner.html.erb @@ -0,0 +1,33 @@ + + +
综合 + <% if order_type=='reorder_complex' && order_str == 'desc' %> + + <% elsif order_type=='reorder_complex' && order_str == 'asc' %> + + <% else %> + + <% end %> +
+
人气 + <% if order_type=='reorder_popu' && order_str == 'desc' %> + + <% elsif order_type=='reorder_popu' && order_str == 'asc' %> + + <% else %> + + <% end %> +
+
时间 + <% if order_type=='reorder_time' && order_str == 'desc' %> + + <% elsif order_type=='reorder_time' && order_str == 'asc' %> + + <% else %> + + <% end %> +
+
+ 新建贴吧
+
\ No newline at end of file diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index f8679cefa..d6e3f607b 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,47 +1,31 @@ - -
共有 <%=link_to @forum.memos.count %> 个贴子
<% if memos.any? %> <% memos.each do |topic| %> - - - - - -
- <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%> - - - - - - - - - - - - -
<%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %> - - - - - - - -
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %>
回答
<%= authoring topic.created_at, topic.author %> - - <% author = topic.last_reply.try(:author)%> - <% if author%> - 最后回复:<%=link_to_user author %> - <% end%> - -
-
-
+
+
+ + <%= link_to image_tag(url_to_avatar(topic.author), :width => 50,:height => 50,:alt => '贴吧图片'), user_path(topic.author) if topic.author%> +
+
+ +
<%= topic.content.html_safe%> + +
+ <% author = topic.last_reply.try(:author)%> + <% if author%> +
最后回复:<%= author.name%>
+
<%= format_date(topic.last_reply.created_at)%>
+ <% end%> + +
+
+ + <%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %> +
+
+
<% end %> - + <% else %>

<%= l(:label_no_data) %>

<% end %> diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb new file mode 100644 index 000000000..be99d724a --- /dev/null +++ b/app/views/forums/create.js.erb @@ -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 %> \ No newline at end of file diff --git a/app/views/forums/delete_forum_tag.js.erb b/app/views/forums/delete_forum_tag.js.erb new file mode 100644 index 000000000..5080b3bdd --- /dev/null +++ b/app/views/forums/delete_forum_tag.js.erb @@ -0,0 +1,2 @@ +$("#forum_tag_list").html("<%= escape_javascript( render :partial=>'forum_tag_list',:locals=>{:forum=>@forum}) %>"); +$('#add_tag01').hide(); \ No newline at end of file diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb index 0a40120c7..24130e727 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -1,4 +1,72 @@ - -

编辑讨论区

-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> + +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'new_user' %> + <%= render 'form_edit_mode' %> + \ No newline at end of file diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 85cab957a..8f5cb15cc 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -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 %> - -
- - - - - - - - - - - -
公共贴吧 - - <%= l(:label_user_location) %> : - - - <% if User.current.logged? %> - <%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %> - <% end %> - - -
- - <%= link_to request.host()+"/forums", forums_path %> - - - <%= link_to l(:field_homepage), home_path %> > - <%= link_to "公共贴吧", forums_path %> -
-
-<% 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'%> + + +
+
+
+ +
+ <%= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str}%> + + + + + + +
+
+ <%= render :partial => 'forum_list',:locals => {:forums=>@forums}%> +
+
    + <%= pagination_links_full @forums_pages, @forums_count ,:per_page_links => true,:remote =>true,:flag=>true%> +
+
+
+
+
diff --git a/app/views/forums/index.js.erb b/app/views/forums/index.js.erb new file mode 100644 index 000000000..642c3c20a --- /dev/null +++ b/app/views/forums/index.js.erb @@ -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%>'); \ No newline at end of file diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 24aa74c23..34c7d6e64 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,42 +1,144 @@ - -
-

- <%=l(:label_memo_new)%> -

- <% if User.current.logged? %> - <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %> -
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> -

- <%= f.text_field :subject, :required => true, :maxlength => 50%> -

-

- <%= f.kindeditor :content, :required => true %> -

- -

- (<%= l(:label_memos_max_length) %>) -

-

- <%= l(:label_attachment_plural) %> -
- <%= render :partial => 'attachments/form', :locals => {:container => @memo} %> -

-
- <%= f.submit :value => l(:label_memo_create) %> - <%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %> -
- <% end %> - <% end %> +<%= javascript_include_tag 'new_user' %> + +
+ + +
+ <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%> +
+
    + <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %> +
+ + + + + + + + + + +
- - - <%= 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) %> - - - <%= 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? %> - -<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %> +
\ No newline at end of file diff --git a/app/views/forums/show.js.erb b/app/views/forums/show.js.erb new file mode 100644 index 000000000..9e36215ac --- /dev/null +++ b/app/views/forums/show.js.erb @@ -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%>'); \ No newline at end of file diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 812873045..752853c60 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -5,7 +5,7 @@
  • 服务协议|
  • <%= l(:label_surpport_group)%>|
  • -
  • <%= l(:label_forums)%>
  • +
  • <%= l(:label_forums)%>
  • diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index c68e917f5..0a377b1e5 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -7,7 +7,7 @@ <%= 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'%> + @@ -28,82 +135,77 @@ <% end%>
    +
    +
    +
    +
    +
    <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %> + +
    + +
    +
    <%= @forum.description%> + <%if @forum.creator.id == User.current.id%> + + + <%= image_tag('signature_edit.png',{:width=>12,:height=>12})%> + + <%end%> +
    +
    +
    + <%= render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum}%> +
    + <% if(@forum.creator.id == User.current.id)%> + + 添加标签 + <% end %> +
    +
    + <%if @forum.creator.id == User.current.id%> + + + 编辑贴吧 + 删除贴吧 + + <% end %> +
    +
    +
    <%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path( User.current) %>
    +
    我在贴吧
    +
    +
    + +
    +
    + +
    发帖
    +
    -
    -
    -
    -
    -
    - - - - - - - - - - -
    <%= l(:label_projects_community)%><%= l(:label_user_location) %> : - -
    <%= link_to request.host()+"/forums", forums_path %>

    <%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %>

    -
    - -
    +
    +
    +
    +
    + + <%= yield %> + <%#= call_hook :view_layouts_base_content %> +
    +
    +
    - <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
    - -
    - <%#= render :partial => 'layouts/base_footer'%> -
    - - -
    -
    -
    <%= render :partial => 'layouts/footer' %>
    - <%= call_hook :view_layouts_base_body_bottom %> + <%#= call_hook :view_layouts_base_body_bottom %> diff --git a/app/views/layouts/users_base.html.erb b/app/views/layouts/users_base.html.erb index 0caa5e39b..6c1edbd1b 100644 --- a/app/views/layouts/users_base.html.erb +++ b/app/views/layouts/users_base.html.erb @@ -7,16 +7,16 @@ <%= 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 %> <%= yield :header_tags -%> - <%= stylesheet_link_tag 'base','header', :media => 'all'%> + <%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
    @@ -29,27 +29,27 @@
    -
    -
    -
    - <%#=render :partial => 'layouts/base_header'%> -
    -
    + + + + + + <%= render_flash_messages %> <%= yield %> <%= call_hook :view_layouts_base_content %>
    -
    + -
    -
    + + -
    -
    + +
    <%= render :partial => 'layouts/footer' %> diff --git a/app/views/memos/_attachments_links.html.erb b/app/views/memos/_attachments_links.html.erb new file mode 100644 index 000000000..15473e6e7 --- /dev/null +++ b/app/views/memos/_attachments_links.html.erb @@ -0,0 +1,71 @@ +
    + <% for attachment in attachments %> + + + + <% if options[:length] %> + + <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true,:length => options[:length] -%> + (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + <% 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) %> + + <% end %> +
    + <% else %> + + <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 32 -%> + (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + <% 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) %> + + <% end %> +
    + <% end %> + + <%# if attachment.is_text? %> + <%#= link_to image_tag('magnifier.png'), + :controller => 'attachments', + :action => 'show', + :id => attachment, + :filename => attachment.filename%> + <%# end %> + + + + + + + + + + + <%#= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %> + + + + + <% end %> + <% if defined?(thumbnails) && thumbnails %> + <% images = attachments.select(&:thumbnailable?) %> + <% if images.any? %> +
    + <% images.each do |attachment| %> +
    <%= thumbnail_tag(attachment) %>
    + <% end %> +
    + <% end %> + <% end %> +
    diff --git a/app/views/memos/_praise_tread.html.erb b/app/views/memos/_praise_tread.html.erb new file mode 100644 index 000000000..17af4b090 --- /dev/null +++ b/app/views/memos/_praise_tread.html.erb @@ -0,0 +1,36 @@ + + <% if User.current.logged? %> + <% if horizontal %> + +
    + <% @is_valuate = is_praise_or_tread(obj,user_id)%> + <% if @is_valuate.size > 0 %> + <% @flag = @is_valuate.first.praise_or_tread %> + <% if @flag == 1 %> + <%= get_praise_num(obj)%> + <% end %> + <% else %> + <% if user_id == obj.author_id %> + + + <%= get_praise_num(obj)%> + + <% else %> + + <%# 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 %> + <%= get_praise_num(obj)%> + + + + + + + + <% end %> + <% end %> +
    + <% end %> + <% end %> diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 487d923b5..0efa57ccc 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,55 +1,47 @@ - -<% @replying = !@memo.parent.nil? %> -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> -

    <%=l(:label_memo_edit)%>

    -<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> - <% if @memo.errors.any? %> -
    -

    - <%= pluralize(@memo.errors.count, "error") %> - prohibited this memo from being saved: -

    - -
    - <% end %> -
    -

    - <% 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 %> -

    - <% if User.current.admin?%> -

    - <% 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 %> -

    - <% end %> -

    - <%= f.kindeditor :content, :required => true, :size => 80,:owner_id => @memo.id,:owner_type => 1 %> -

    - -

    - <%= l(:label_attachment_plural) %> -
    - <%= render :partial => 'attachments/form', :locals => {:container => @memo} %> -

    -
    -
    - <%= f.submit :value => l(:button_change) %>  <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%> +<%= javascript_include_tag 'new_user'%> + +
    +
    编辑帖子
    +
    +
    + <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo),:html=>{:id=>'edit_memo'}) do |f| %> + +
    + +
    -<% end %> +
    + + +
    +
    + + <%= render :partial => 'forums/file_form', :locals => {:container => @memo} %> + + +
    +
    + <% end %> +
    \ No newline at end of file diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 586279504..81758ff97 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -1,188 +1,117 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %> -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> -
    - - - <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> - -
    -
    - <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %> -
    -

    - <%=link_to @memo.author.name, user_path(@memo.author) %> -

    -
    -
    -
    - - <%= 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( - 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) %> -
    - -
     
    - -
    - <%= label_tag l(:field_subject) %>: - <%=h @memo.subject %> -
    -
    - <%= @memo.content.html_safe %> -

    - <% 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 %> -

    -
    -
    -
    - <%= authoring @memo.created_at, @memo.author %> -
    - -
    -
    -
    -
    -

    <%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)

    - <% pages_count = @reply_pages.offset %> - <% @replies.each do |reply| %> -
    "> -

    -
    - - <%= 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( - 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) %> - -
    -
    - - - - - - - - -
    - <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> - -
    - <%=h sanitize(reply.content.html_safe) %> -
    -

    - <% 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 %> -

    -
    - <%= authoring reply.created_at, reply.author %> -
    -
    - <% end %> - -
    - -<% if User.current.login? %> -
    - <%= render :partial => 'reply_box' %> -
    -<% else %> -
    - <%= l(:label_user_login_tips) %> - <%= link_to l(:label_user_login_new), signin_path %> -
    -
    -<% end %> - - - +
    +
    +
    + <%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %> +
    +
    + <% if @memo.author.id == User.current.id%> +
    + +
    + <%end%> + + +
    <%= format_date( @memo.created_at)%>
    + + <%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> + +
    +
    + <%= @memo.content.html_safe%> +
    +
    +
    + <% 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 %> +
    +
    +
    +
    +
    +
    +
    +
    回复(<%=@reply_count %>)
    +
    + +
    +
    + <% @replies.each_with_index do |reply,i| %> +
    +
    + <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %> +
    +
    +
    <%= reply.author.name%><%= format_date(reply.created_at) %>
    +
    <%= reply.content.html_safe%>
    +
    +
    +
    + <% end %> +
    +
    +
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
    +
    +
    + <%= 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' %> + +
    + +
    +

    + <% end%> +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/praise_tread/praise_plus.js.erb b/app/views/praise_tread/praise_plus.js.erb index d56ff0e68..30a53723e 100644 --- a/app/views/praise_tread/praise_plus.js.erb +++ b/app/views/praise_tread/praise_plus.js.erb @@ -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 %> diff --git a/app/views/tags/update_tag_name.js.erb b/app/views/tags/update_tag_name.js.erb index b72b0c33f..ec81e7cbc 100644 --- a/app/views/tags/update_tag_name.js.erb +++ b/app/views/tags/update_tag_name.js.erb @@ -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}) %>'); diff --git a/config/routes.rb b/config/routes.rb index ba6d161c2..81dadb7c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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 diff --git a/public/images/post_portrait.jpg b/public/images/post_portrait.jpg new file mode 100644 index 000000000..91ea62146 Binary files /dev/null and b/public/images/post_portrait.jpg differ diff --git a/public/javascripts/forum.js b/public/javascripts/forum.js new file mode 100644 index 000000000..8401df10f --- /dev/null +++ b/public/javascripts/forum.js @@ -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(); + } + }); + }); +}); \ No newline at end of file diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 86456bd8a..5e0fdef90 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -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; } diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 754112b52..3a7e8d6e3 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -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;} diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css index 998ae6fbd..986f9a6b8 100644 --- a/public/stylesheets/header.css +++ b/public/stylesheets/header.css @@ -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;} diff --git a/public/stylesheets/images/homepage_icon2.png b/public/stylesheets/images/homepage_icon2.png new file mode 100644 index 000000000..127f12e92 Binary files /dev/null and b/public/stylesheets/images/homepage_icon2.png differ diff --git a/public/stylesheets/images/post_image_list.png b/public/stylesheets/images/post_image_list.png new file mode 100644 index 000000000..07636288d Binary files /dev/null and b/public/stylesheets/images/post_image_list.png differ diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index b77b95f21..116169bd8 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -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;} diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css index 2d39e75ea..ddf117c14 100644 --- a/public/stylesheets/public_new.css +++ b/public/stylesheets/public_new.css @@ -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;} \ No newline at end of file +.AgreementImg{margin: 0px auto;} diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 93ad4c008..5a9ea3830 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -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;