diff --git a/.rspec b/.rspec index 8c18f1abd..83e16f804 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,2 @@ ---format documentation --color +--require spec_helper diff --git a/Gemfile b/Gemfile index d3fb6de22..c53c60bba 100644 --- a/Gemfile +++ b/Gemfile @@ -23,41 +23,26 @@ gem "builder", "3.0.0" gem 'acts-as-taggable-on', '2.4.1' gem 'spreadsheet' gem 'ruby-ole' -gem 'redis' -gem 'redis-store' gem 'rails_kindeditor',path:'lib/rails_kindeditor' +#gem "rmagick", ">= 2.0.0" + group :development do gem 'grape-swagger' - #gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' - gem 'puma' if RbConfig::CONFIG['host_os'] =~ /linux/ - gem 'pry-rails' - if RUBY_VERSION >= '2.0.0' - gem 'pry-byebug' - else - # gem 'pry-debugger' - end - gem 'pry-stack_explorer' gem 'better_errors', '~> 1.1.0' gem 'rack-mini-profiler', '~> 0.9.3' end -group :test do - gem "shoulda", "~> 3.5.0" - gem "mocha", "~> 1.1.0" - gem 'capybara', '~> 2.4.1' - gem 'nokogiri', '~> 1.6.3' - gem 'factory_girl', '~> 4.4.0' - gem 'selenium-webdriver', '~> 2.42.0' +group :development, :test do + unless RUBY_PLATFORM =~ /w32/ + gem 'pry-rails' + if RUBY_VERSION >= '2.0.0' + gem 'pry-byebug' + end + gem 'pry-stack_explorer' + end - gem "faker" - # platforms :mri, :mingw do - # group :rmagick do - # # RMagick 2 supports ruby 1.9 - # # RMagick 1 would be fine for ruby 1.8 but Bundler does not support - # # different requirements for the same gem on different platforms - # gem "rmagick", ">= 2.0.0" - # end - #end + gem 'rspec-rails', '~> 3.0' + gem 'factory_girl_rails' end # Gems used only for assets and not required diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index ce02f4249..73d1e357c 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -168,6 +168,30 @@ module Mobile present :status, 0 end + desc "设置教辅" + params do + requires :token,type:String + requires :user_id,type:Integer,desc: '用户id' + requires :course_id,type:Integer,desc:'课程id' + end + get 'set_user_as_assitant' do + cs = CoursesService.new + cs.set_as_assitant_teacher params + present :status, 0 + end + + desc "删除教辅" + params do + requires :token,type:String + requires :user_id,type:Integer,desc: '用户id' + requires :course_id,type:Integer,desc:'课程id' + end + get 'del_user_as_assitant' do + cs = CoursesService.new + cs.del_assitant_teacher params + present :status, 0 + end + desc "返回单个课程" params do requires :id, type: Integer @@ -179,7 +203,7 @@ module Mobile course = cs.show_course(params,(current_user.nil? ? User.find(2):current_user)) #course = Course.find(params[:id]) present :data, course, with: Mobile::Entities::Course - present :status, 0 + { status: 0} end end @@ -232,14 +256,61 @@ module Mobile params do requires :token, type: String requires :course_id,type: Integer,desc: '课程id' + optional :name,type:String,desc:'课件名称可能包含的字符' end - get ":course_id/attachments" do + post ":course_id/attachments" do cs = CoursesService.new count = cs.course_attachments params present :data, count, with: Mobile::Entities::Attachment present :status, 0 end + desc '课程学生' + params do + requires :token,type:String + requires :course_id,type:Integer,desc: '课程id' + optional :name,type:String,desc:'学生的姓名或者昵称或者学号可能包含的字符' + end + get ":course_id/members" do + cs = CoursesService.new + count = cs.course_members params + # 我如果在学生当中,那么我将放在第一位 + count.each do |m| + if m.user.id == current_user.id + count.delete m + count.unshift m + end + end + present :data, count, with: Mobile::Entities::Member + present :status, 0 + end + + desc '查看用户历次作业成绩' + params do + requires :token,type:String + requires :member_id,type:Integer,desc:'课程member_id' + optional :homeworkName,type:String,desc:'作业名称以及作业名称可能包含的字符' + end + get '/show_member_score/:member_id' do + cs = CoursesService.new + homeworkscore = cs.show_member_score params + present :data,homeworkscore,with: Mobile::Entities::Homeworkscore + present :status,0 + end + + desc '发布课程通知' + params do + requires :token,type:String + requires :course_id,type:Integer,desc:'课程id' + requires :title,type:String,desc:'通知标题' + requires :desc,type:String,desc:'通知描述' + end + post ':course_id/create_course_notice' do + cs = CoursesService.new + news = cs.create_course_notice params,current_user + present :data,news,with:Mobile::Entities::News + present :status,0 + end end end end diff --git a/app/api/mobile/apis/homeworks.rb b/app/api/mobile/apis/homeworks.rb index 7a8c87987..5bf454e32 100644 --- a/app/api/mobile/apis/homeworks.rb +++ b/app/api/mobile/apis/homeworks.rb @@ -96,6 +96,21 @@ module Mobile present :status, 0 end + desc '创建作业' + params do + requires :token,type:String + requires :work_name,type:String,desc:'作业名称' + requires :work_desc,type:String,desc:'作业描述' + requires :work_deadline,type:String,desc:'截止日期' + requires :is_blind_appr,type:Integer,desc:'是否匿评' + requires :blind_appr_num,type:Integer,desc:'匿评分配数' + requires :course_id,type:Integer,desc: '课程id' + end + post 'create_home_work' do + Homeworks.get_service.create_home_work params,current_user + present :status, 0 + end + end end diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 063cfafae..675ad33c5 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -83,6 +83,9 @@ module Mobile params do requires :name, type: String, desc: '用户名关键字' requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱,3 昵称和姓名' + optional :is_search_assitant,type:Integer,desc:'是否搜索注册用户来作为助教' + optional :course_id,type:Integer,desc: '课程id,搜索注册用户不为该课程教师的其他用户' + optional :user_id,type:Integer,desc:'用户id' end get 'search/search_user' do us = UsersService.new @@ -91,6 +94,31 @@ module Mobile present :status, 0 end + desc "用户留言" + params do + requires :token, type: String + requires :user_id, type: Integer,desc: '被留言的用户id' + end + get ':user_id/messages' do + us = UsersService.new + jours = us.get_all_messages params + present :data,jours,with:Mobile::Entities::Jours + present :status,0 + end + + desc "给用户留言或回复用户留言" + params do + requires :token, type: String + requires :user_id, type: Integer,desc: '被留言的用户id' + requires :content,type:String,desc:'留言内容' + optional :refer_user_id,type:Integer,desc:'被回复的用户id' + end + post ':user_id/leave_message' do + us = UsersService.new + jours = us.leave_messages params,current_user + present :status,0 + end + end end end diff --git a/app/api/mobile/entities/course.rb b/app/api/mobile/entities/course.rb index 520f73384..50812b349 100644 --- a/app/api/mobile/entities/course.rb +++ b/app/api/mobile/entities/course.rb @@ -46,6 +46,7 @@ module Mobile course_expose :term course_expose :time course_expose :updated_at + course_expose :course_student_num expose :teacher, using: Mobile::Entities::User do |c, opt| if c.is_a? ::Course c.teacher diff --git a/app/api/mobile/entities/homework_attach.rb b/app/api/mobile/entities/homework_attach.rb index 690ec8e94..2ad11fe36 100644 --- a/app/api/mobile/entities/homework_attach.rb +++ b/app/api/mobile/entities/homework_attach.rb @@ -37,7 +37,6 @@ module Mobile f.send(:attachments) end end - #homework_attach_expose :user end end end \ No newline at end of file diff --git a/app/api/mobile/entities/homeworkscore.rb b/app/api/mobile/entities/homeworkscore.rb new file mode 100644 index 000000000..e0c501c58 --- /dev/null +++ b/app/api/mobile/entities/homeworkscore.rb @@ -0,0 +1,18 @@ +module Mobile + module Entities + class Homeworkscore < Grape::Entity + include Redmine::I18n + include ApplicationHelper + def self.homeworkscore_expose(field) + expose field do |f,opt| + if f.is_a?(Hash) && f.key?(field) + f[field] + end + end + end + + homeworkscore_expose :name + homeworkscore_expose :score + end + end +end \ No newline at end of file diff --git a/app/api/mobile/entities/member.rb b/app/api/mobile/entities/member.rb new file mode 100644 index 000000000..f9dd1e849 --- /dev/null +++ b/app/api/mobile/entities/member.rb @@ -0,0 +1,34 @@ +module Mobile + module Entities + class Member < Grape::Entity + include ApplicationHelper + include ApiHelper + def self.member_expose(f) + expose f do |u,opt| + if u.is_a?(Hash) && u.key?(f) + u[f] + elsif u.is_a?(::Member) + if u.respond_to?(f) + u.send(f) + else + case f + when :student_id + u.user.user_extensions.student_id + end + end + end + + end + end + + expose :user, using: Mobile::Entities::User do |c, opt| + if c.is_a?(::Member) + c.user + end + end + member_expose :student_id + member_expose :score + member_expose :id + end + end +end \ No newline at end of file diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 6b0064036..aee687dc9 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -9,7 +9,7 @@ module Mobile u[f] elsif u.is_a?(::User) if u.respond_to?(f) - u.send(f) + u.send(f) unless u.user_extensions.nil? else case f when :img_url @@ -17,9 +17,9 @@ module Mobile when :gender u.nil? || u.user_extensions.nil? || u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender when :work_unit - get_user_work_unit u + get_user_work_unit u unless u.user_extensions.nil? when :location - get_user_location u + get_user_location u unless u.user_extensions.nil? when :brief_introduction u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction end diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 22db3d5b4..7976e1aa4 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -31,9 +31,6 @@ class AccountController < ApplicationController else authenticate_user end - rescue AuthSourceException => e - logger.error "An error occured when authenticating #{params[:username]}: #{e.message}" - render_error :message => e.message end # Log out current user and redirect to welcome page @@ -47,6 +44,10 @@ class AccountController < ApplicationController # display the logout form end + def heartbeat + render :json => session[:user_id] + end + # Lets user choose a new password def lost_password (redirect_to(home_url); return) unless Setting.lost_password? @@ -314,7 +315,7 @@ class AccountController < ApplicationController #根据home_url生产正则表达式 eval("code = " + "/^" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index\\\/*.*)?\$/") if (code=~params[:back_url] || params[:back_url].to_s.include?('lost_password')) && last_login_on != '' - redirect_to user_activities_path(user) + redirect_to user_activities_path(user,host: Setting.host_user) else if last_login_on == '' redirect_to my_account_url @@ -329,10 +330,10 @@ class AccountController < ApplicationController end def set_autologin_cookie(user) - token = Token.create(:user => user, :action => 'autologin') + token = Token.get_or_create_permanent_login_token(user) cookie_options = { :value => token.value, - :expires => 7.days.from_now, + :expires => 1.month.from_now, :path => (Redmine::Configuration['autologin_cookie_path'] || '/'), :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), :httponly => true diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 741af2aee..0dc86fb01 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -156,16 +156,16 @@ class ApplicationController < ActionController::Base user end end - def try_to_autologin1 - - # auto-login feature starts a new session - user = User.try_to_autologin(params[:token]) - if user - start_user_session(user) - end - user + def try_to_autologin1 + user = User.try_to_autologin(params[:token]) + if user + logout_user if User.current.id != user.id + start_user_session(user) + end + user end + # Sets the logged in user def logged_user=(user) reset_session @@ -200,7 +200,7 @@ class ApplicationController < ActionController::Base def logout_user if User.current.logged? cookies.delete(autologin_cookie_name) - Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) + # Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) self.logged_user = nil end end diff --git a/app/controllers/avatar_controller.rb b/app/controllers/avatar_controller.rb index 771a14fe8..ef7cdf2f7 100644 --- a/app/controllers/avatar_controller.rb +++ b/app/controllers/avatar_controller.rb @@ -8,23 +8,26 @@ class AvatarController < ApplicationController # Make sure that API users get used to set this content type # as it won't trigger Rails' automatic parsing of the request body for parameters unless request.content_type == 'application/octet-stream' - render :nothing => true, :status => 406 - return - end - - unless request.raw_post.nil? - @source_type = params[:source_type] + @source_type = params[:source_type] @source_id = params[:source_id] - @temp_file = request.raw_post - if @temp_file.size > 0 - if @temp_file.respond_to?(:original_filename) - @image_file = @temp_file.original_filename - #image_file.force_encoding("UTF-8") if filename.respond_to?(:force_encoding) - else - @image_file=params[:filename] - end + @temp_file = params[:avatar][:image] + @image_file = @temp_file.original_filename + else + unless request.raw_post.nil? + @source_type = params[:source_type] + @source_id = params[:source_id] + @temp_file = request.raw_post + if @temp_file.size > 0 + if @temp_file.respond_to?(:original_filename) + @image_file = @temp_file.original_filename + #image_file.force_encoding("UTF-8") if filename.respond_to?(:force_encoding) + else + @image_file=params[:filename] + end + end end end + if @temp_file && (@temp_file.size > 0) diskfile=disk_filename(@source_type,@source_id) @urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file)) @@ -56,27 +59,15 @@ class AvatarController < ApplicationController # self.digest = md5.hexdigest end @temp_file = nil - # @avatar = Avatar.new(:receive_file => request.raw_post) - # @avatar.source_id = User.current.id - # @avatar.image_file = params[:filename].presence || Redmine::Utils.random_hex(16) - # saved = @avatar.save - begin - f = Magick::ImageList.new(diskfile) - # gif格式不再做大小处理 - if f.format != 'GIF' - width = 300.0 - proportion = (width/f[0].columns) - height = (f[0].rows*proportion) - f.resize_to_fill!(width,height) - f.write(diskfile) - end - - rescue Exception => e - logger.error "[Error] avatar : avatar_controller#upload ===> #{e}" - end + image = Trustie::Utils::Image.new(diskfile,true) + image.compress(300) respond_to do |format| + format.json{ + render :inline => "#{@urlfile.to_s}?#{Time.now.to_i}",:content_type => 'text/html' + return + } format.js format.api { if saved diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index b1cca68ed..c98df27d3 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -490,7 +490,7 @@ class BidsController < ApplicationController (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY s_score DESC,created_at ASC) AS table1 - WHERE table1.t_score IS NULL OR table1.t_score = 0") + WHERE table1.t_score IS NULL") @not_batch_homework = true @cur_type = 1 else diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index f6ec09b2a..4a27f02ff 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -27,18 +27,22 @@ class BoardsController < ApplicationController include SortHelper helper :watchers helper :project_score - + helper :attachments def index #modify by nwb @flag = params[:flag] || false if @project - @boards = @project.boards.includes(:last_message => :author).all - @boards = [] << @boards[0] if @boards.any? - if @boards.size == 1 - @board = @boards.first - show and return + if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin? + render_403 + else + @boards = @project.boards.includes(:last_message => :author).all + @boards = [] << @boards[0] if @boards.any? + if @boards.size == 1 + @board = @boards.first + show and return + end + render :layout => false if request.xhr? end - render :layout => false if request.xhr? elsif @course if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course))) @boards = @course.boards.includes(:last_message => :author).all @@ -80,7 +84,7 @@ class BoardsController < ApplicationController includes(:last_reply). limit(@topic_pages.per_page). offset(@topic_pages.offset). - order(sort_clause). + order("last_replies_messages.created_on desc"). preload(:author, {:last_reply => :author}). all elsif @course @@ -88,7 +92,7 @@ class BoardsController < ApplicationController includes(:last_reply). # limit(@topic_pages.per_page). # offset(@topic_pages.offset). - order(sort_clause). + order("last_replies_messages.created_on desc"). preload(:author, {:last_reply => :author}). all : [] @topics = paginateHelper board_topics,10 diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a1e547a84..be69b1777 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -5,6 +5,7 @@ class CoursesController < ApplicationController helper :activities helper :members helper :words + helper :attachments before_filter :auth_login1, :only => [:show, :feedback] menu_item :overview @@ -341,10 +342,15 @@ class CoursesController < ApplicationController def export_course_member_excel @all_members = student_homework_score(0,0,0,"desc") + filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}"; + # 如果是ie11 需要转码 + if(/rv\:11\.0/.match(request.env["HTTP_USER_AGENT"]) != nil) + filename= URI::encode(filename) + end respond_to do |format| format.xls { send_data(member_to_xls(@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present", - :filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}.xls") + :filename => "#{filename}.xls") } end end @@ -851,7 +857,7 @@ class CoursesController < ApplicationController #验证是否显示课程 def can_show_course @first_page = FirstPage.find_by_page_type('project') - if @first_page.show_course == 2 + if @first_page.try(:show_course) == 2 render_404 end end diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 69e7105aa..aa2c9574b 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -23,7 +23,7 @@ class FilesController < ApplicationController before_filter :auth_login1, :only => [:index] before_filter :logged_user_by_apptoken,:only => [:index] before_filter :find_project_by_project_id#, :except => [:getattachtype] - before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search,:search_project,:quote_resource_show_project,:search_tag_attachment] + before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project,:search_tag_attachment] helper :sort include SortHelper @@ -46,6 +46,13 @@ class FilesController < ApplicationController @obj_attachments = paginateHelper @all_attachments,10 end + def searchone4reload + attachment = Attachment.find_by_id(params[:fileid]); + respond_to do |format| + format.html{render :layout => nil,:locals=>{:file=>attachment,:course=>@course}} + end + end + def search sort = "" @sort = "" diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 4982a4b6b..f6b044c63 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -51,7 +51,7 @@ class HomeworkAttachController < ApplicationController order_by = "created_at #{direction}" end all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*, - (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL AND stars > 0 ORDER BY updated_at DESC limit 0,1) AS t_score, + (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY #{order_by}) AS table1 @@ -445,7 +445,8 @@ class HomeworkAttachController < ApplicationController is_teacher = @is_teacher ? 1 : 0 #保存评分@homework.rate(@m_score.to_i,User.current.id,:quality, (@is_teacher ? 1 : 0)) @is_comprehensive_evaluation = @is_teacher ? 1 : (@is_anonymous_comments ? 2 : 3) #判断当前评论是老师评论?匿评?留言 - if @m_score && (@is_teacher || @is_anonymous_comments) + if @is_teacher || @is_anonymous_comments + @m_score ||= 0 rate = @homework.rates(:quality).where(:rater_id => User.current.id, :is_teacher_score => is_teacher).first if rate rate.stars = @m_score @@ -502,7 +503,7 @@ class HomeworkAttachController < ApplicationController get_not_batch_homework_list params[:cur_sort] || "s_socre",params[:cur_direction] || "desc",@homework.bid_id elsif @cur_type == "2" #老师已批列表 @result_homework = HomeworkAttach.find_by_sql("SELECT homework_attaches.*, - (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL AND stars > 0 ORDER BY updated_at DESC limit 0,1) AS t_score, + (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score FROM homework_attaches WHERE id = #{@homework.id}").first elsif @cur_type == "3" #全部作业列表 @@ -629,7 +630,7 @@ class HomeworkAttachController < ApplicationController (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score FROM homework_attaches WHERE bid_id = #{bid_id} ORDER BY #{order_by}) AS table1 - WHERE table1.t_score IS NULL OR table1.t_score = 0 ") + WHERE table1.t_score IS NULL ") @all_homework_list = search_homework_member(@all_homework_list,@search_name.to_s.downcase) if @search_name # @homework_list = paginateHelper @all_homework_list,10 @homework_list = @all_homework_list diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 80be8c5d5..8acca7f81 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -58,7 +58,7 @@ class IssuesController < ApplicationController def index retrieve_query - sort_init(@query.sort_criteria.empty? ? [['updated_on', 'desc']] : @query.sort_criteria) + sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) sort_update(@query.sortable_columns) @query.sort_criteria = sort_criteria.to_a @@ -75,20 +75,19 @@ class IssuesController < ApplicationController else @limit = 10#per_page_option end - + @assign_to_id = params[:assigned_to_id] + @author_id = params[:author_id] + @priority_id = params[:priority_id] + @status_id = params[:status_id] + @subject = params[:subject] @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] @offset ||= @issue_pages.offset @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], - :order => sort_clause, - :offset => @offset, - :limit => @limit) + :order => sort_clause, + :offset => @offset, + :limit => @limit) @issue_count_by_group = @query.issue_count_by_group - - - - - respond_to do |format| format.js format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young @@ -383,7 +382,7 @@ class IssuesController < ApplicationController def retrieve_previous_and_next_issue_ids retrieve_query_from_session if @query - sort_init(@query.sort_criteria.empty? ? [['updated_on', 'desc']] : @query.sort_criteria) + sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) sort_update(@query.sortable_columns, 'issues_index_sort') limit = 500 issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version]) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 436418430..619f91245 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -93,10 +93,27 @@ class MessagesController < ApplicationController end call_hook(:controller_messages_new_after_save, { :params => params, :message => @message}) render_attachment_warning_if_needed(@message) - redirect_to board_message_url(@board, @message) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@board, @message) + end else - layout_file = @project ? 'base_projects' : 'base_courses' - render :action => 'new', :layout => layout_file + if params[:is_board] + if @project + redirect_to project_boards_path(@project, :flag => true) + elsif @course + redirect_to course_boards_path(@course, :flag => true) + end + else + layout_file = @project ? 'base_projects' : 'base_courses' + render :action => 'new', :layout => layout_file + end + end else respond_to do |format| @@ -111,7 +128,15 @@ class MessagesController < ApplicationController # Reply to a topic def reply if params[:reply][:content] == "" - (redirect_to board_message_url(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return) + if params[:is_board] + if @project + (redirect_to project_boards_path(@project), :notice => l(:label_reply_empty);return) + elsif @course + (redirect_to course_boards_path(@course), :notice => l(:label_reply_empty);return) + end + else + (redirect_to board_message_url(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return) + end end @quote = params[:quote][:quote] @reply = Message.new @@ -123,16 +148,24 @@ class MessagesController < ApplicationController #@topic.update_attribute(:updated_on, Time.now) if !@reply.new_record? if params[:asset_id] - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE end call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply}) attachments = Attachment.attach_files(@reply, params[:attachments]) render_attachment_warning_if_needed(@reply) - else + else #render file: 'messages#show', layout: 'base_courses' end - redirect_to board_message_url(@board, @topic, :r => @reply) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@board, @topic, :r => @reply) + end end @@ -144,19 +177,36 @@ class MessagesController < ApplicationController else (render_403; return false) unless @message.course_editable_by?(User.current) end + @message.safe_attributes = params[:message] if request.post? && @message.save attachments = Attachment.attach_files(@message, params[:attachments]) render_attachment_warning_if_needed(@message) flash[:notice] = l(:notice_successful_update) @message.reload - redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + end elsif request.get? - respond_to do |format| - format.html { - layout_file = @project ? 'base_projects' : 'base_courses' - render :layout => layout_file - } + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + respond_to do |format| + format.html { + layout_file = @project ? 'base_projects' : 'base_courses' + render :layout => layout_file + } + end end end end @@ -172,16 +222,20 @@ class MessagesController < ApplicationController @message.destroy # modify by nwb if @project - if @message.parent - redirect_to board_message_url(@board, @message.parent, :r => r) - else + if params[:is_board] redirect_to project_boards_url(@project) + else + redirect_to board_message_url(@board, @topic, :r => @reply) end elsif @course - if @message.parent - redirect_to board_message_url(@board, @message.parent, :r => r) + if params[:is_board] + redirect_to course_boards_url(@course) else - redirect_to course_board_url(@course, @board) + if @message.parent + redirect_to board_message_url(@board, @message.parent, :r => r) + else + redirect_to course_board_url(@course, @board) + end end end end @@ -202,7 +256,7 @@ class MessagesController < ApplicationController render :partial => 'common/preview' end -private + private def find_message return unless find_board @message = @board.messages.find(params[:id], :include => :parent) diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index d42a750a1..69d8bc3a6 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -95,76 +95,46 @@ class MyController < ApplicationController @pref = @user.pref diskfile = disk_filename('User', @user.id) diskfile1 = diskfile + 'temp' - if request.post? - @user.safe_attributes = params[:user] - @user.pref.attributes = params[:pref] - @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') - @user.login = params[:login] - unless @user.user_extensions.nil? - if @user.user_extensions.identity == 2 - @user.firstname = params[:enterprise_name] - end - end - - @se = @user.extensions - if params[:occupation].to_i.to_s == params[:occupation] - @se.school_id = params[:occupation] - else - @se.occupation = params[:occupation] - end - @se.gender = params[:gender] - @se.location = params[:province] if params[:province] - @se.location_city = params[:city] if params[:city] - @se.identity = params[:identity].to_i if params[:identity] - @se.technical_title = params[:technical_title] if params[:technical_title] - @se.student_id = params[:no] if params[:no] - - if @user.save && @se.save - # 头像保存 - if File.exist?(diskfile1) - if File.exist?(diskfile) - File.delete(diskfile) - end - File.open(diskfile1, "rb") do |f| - buffer = f.read(10) - if buffer != "DELETE" - File.open(diskfile1, "rb") do |f1| - File.open(diskfile, "wb") do |f| - buffer = "" - while (buffer = f1.read(8192)) - f.write(buffer) - end - end - end - - # File.rename(diskfile + 'temp',diskfile); - end + begin + if request.post? + @user.safe_attributes = params[:user] + @user.pref.attributes = params[:pref] + @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') + @user.login = params[:login] + unless @user.user_extensions.nil? + if @user.user_extensions.identity == 2 + @user.firstname = params[:enterprise_name] end end - # 确保文件被删除 - if File.exist?(diskfile1) - File.delete(diskfile1) + @se = @user.extensions + if params[:occupation].to_i.to_s == params[:occupation] + @se.school_id = params[:occupation] + else + @se.occupation = params[:occupation] end + @se.gender = params[:gender] + @se.location = params[:province] if params[:province] + @se.location_city = params[:city] if params[:city] + @se.identity = params[:identity].to_i if params[:identity] + @se.technical_title = params[:technical_title] if params[:technical_title] + @se.student_id = params[:no] if params[:no] - @user.pref.save - @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) - set_language_if_valid @user.language - flash[:notice] = l(:notice_account_updated) - redirect_to user_url(@user) - return - else - # 确保文件被删除 - if File.exist?(diskfile1) - File.delete(diskfile1) + if @user.save && @se.save + # 头像保存 + FileUtils.mv diskfile1, diskfile, force: true if File.exist? diskfile1 + @user.pref.save + @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) + set_language_if_valid @user.language + flash[:notice] = l(:notice_account_updated) + redirect_to user_url(@user) + return + else + @user.login = lg end - @user.login = lg - end - else - # 确保文件被删除 - if File.exist?(diskfile1) - File.delete(diskfile1) end + ensure + File.delete(diskfile1) if File.exist?(diskfile1) end end @@ -200,31 +170,20 @@ class MyController < ApplicationController @user = us.change_password params.merge(:current_user_id => @user.id) if @user.errors.full_messages.count <= 0 flash.now[:notice] = l(:notice_account_password_updated) - redirect_to my_account_url + # 修改完密码,让其重新登录,并更新Token + Token.delete_user_all_tokens(@user) + logout_user + redirect_to signin_url(back_url: my_account_path) + else + flash.now[:error] = l(:notice_account_wrong_password) end end rescue Exception => e if e.message == 'wrong password' flash.now[:error] = l(:notice_account_wrong_password) + else + flash.now[:error] = e.message end - # @user = User.current - # unless @user.change_password_allowed? - # flash.now[:error] = l(:notice_can_t_change_password) - # redirect_to my_account_url - # return - # end - # if request.post? - # if @user.check_password?(params[:password]) - # @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] - # - # if @user.save - # flash.now[:notice] = l(:notice_account_password_updated) - # redirect_to my_account_url - # end - # else - # flash.now[:error] = l(:notice_account_wrong_password) - # end - # end end # Create a new feeds key diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 96807d2dc..c79d0862f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -31,7 +31,7 @@ class ProjectsController < ApplicationController before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course] before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches] before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar] - before_filter :file, :statistics, :watcherlist + before_filter :file, :statistics #:watcherlist # 除非项目内人员,不可查看成员, TODO: 完了写报表里去 before_filter :memberAccess, only: :member @@ -417,10 +417,14 @@ class ProjectsController < ApplicationController @members = @project.member_principals.includes(:roles, :principal).all.sort end else - roles = Role.find_all_givable - @subPage_title = l :label_member_list - @members = @project.member_principals.includes(:roles, :principal).joins("LEFT JOIN #{OptionNumber.table_name} ON #{OptionNumber.table_name}.user_id = #{Member.table_name}.user_id and #{OptionNumber.table_name}.score_type = 2 AND #{Member.table_name}.project_id = #{OptionNumber.table_name}.project_id").order("#{OptionNumber.table_name}.total_score DESC").all - @applied_members = appied_project_members(@project, @members) + if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin? + render_403 + else + roles = Role.find_all_givable + @subPage_title = l :label_member_list + @members = @project.member_principals.includes(:roles, :principal).joins("LEFT JOIN #{OptionNumber.table_name} ON #{OptionNumber.table_name}.user_id = #{Member.table_name}.user_id and #{OptionNumber.table_name}.score_type = 2 AND #{Member.table_name}.project_id = #{OptionNumber.table_name}.project_id").order("#{OptionNumber.table_name}.total_score DESC").all + @applied_members = appied_project_members(@project, @members) + end end @members = paginateHelper @members render :layout => 'base_courses' if @project.project_type == 1 @@ -676,11 +680,13 @@ class ProjectsController < ApplicationController true end - # added by huang - def watcherlist - if @watched - @users -= watched.watcher_users + unless @project.nil? + if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin? + render_403 + else + @users -= watched.watcher_users if @watched + end end end diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 5fe953563..d0af82c8c 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -244,12 +244,12 @@ update def show ## TODO: the below will move to filter, done. - # if !User.current.member_of?(@project) - # if @project.hidden_repo - # render_403 - # return -1 - # end - # end + if !User.current.member_of?(@project) + if @project.hidden_repo + render_403 + return -1 + end + end #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index 01bc47a2f..64ad9c83a 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -38,12 +38,13 @@ class TrackersController < ApplicationController @tracker ||= Tracker.new(params[:tracker]) @trackers = Tracker.sorted.all @projects = Project.where("project_type = #{Project::ProjectType_project}").all - @courses = Course.all - @course_activity_count=Hash.new - @courses.each do |course| - @course_activity_count[course.id]=0 - end - @course_activity_count=get_course_activity @courses,@course_activity_count + # 去掉原因,这块代码已经没有用到 + # @courses = Course.all + # @course_activity_count=Hash.new + # @courses.each do |course| + # @course_activity_count[course.id]=0 + # end + # @course_activity_count=get_course_activity @courses,@course_activity_count end def create diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2a10af260..ace4ae903 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -383,6 +383,8 @@ class UsersController < ApplicationController # scope = User.logged.status(@status) # @search_by = params[:search_by] ? params[:search_by][:id] : 0 # scope = scope.like(params[:name],@search_by) if params[:name].present? + @search_by = params[:search_by] ? params[:search_by] : 0 + us = UsersService.new scope = us.search_user params @user_count = scope.count diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index df006c9b4..3da0be4d8 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -58,12 +58,18 @@ class WelcomeController < ApplicationController else case @first_page.sort_type when 0 + @my_projects = find_my_projects + @other_projects = @my_projects.count < 9 ? find_miracle_project( 9 - @my_projects.count, 3,"score desc") : [] @projects = find_miracle_project(10, 3,"created_on desc") #@projects = @projects_all.order("created_on desc") when 1 + @my_projects = find_my_projects + @other_projects = @my_projects.count < 9 ? find_miracle_project( 9 - @my_projects.count, 3,"score desc") : [] @projects = find_miracle_project(10, 3,"score desc") #@projects = @projects_all.order("grade desc") when 2 + @my_projects = find_my_projects + @other_projects = @my_projects.count < 9 ? find_miracle_project( 9 - @my_projects.count, 3,"score desc") : [] @projects = find_miracle_project(10, 3,"watchers_count desc") #@projects = @projects_all.order("watchers_count desc") diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 3d6772ea8..cc6c4f47e 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -85,6 +85,9 @@ class WordsController < ApplicationController elsif @journal_destroyed.jour_type == "Course" @course = Course.find @journal_destroyed.jour_id @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count + elsif @journal_destroyed.jour_type == "Principal" + @user = User.find(@journal_destroyed.jour_id) + @jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count end respond_to do |format| format.js diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 405dc72ed..0836bf307 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -118,11 +118,11 @@ module ApplicationHelper end #if user.active? || (User.current.admin? && user.logged?) - # link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes + # link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => user.css_classes #else # name #end - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => user.css_classes else h(user.to_s) end @@ -131,7 +131,7 @@ module ApplicationHelper def link_to_isuue_user(user, options={}) if user.is_a?(User) name = h(user.name(options[:format])) - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => "pro_info_p" + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "pro_info_p" else h(user.to_s) end @@ -140,7 +140,7 @@ module ApplicationHelper def link_to_settings_user(user, options={}) if user.is_a?(User) name = h(user.name(options[:format])) - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => "w90 c_orange fl" + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "w90 c_orange fl" else h(user.to_s) end @@ -155,7 +155,7 @@ module ApplicationHelper else name = user.login end - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class] + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => options[:class] else h(user.to_s) end @@ -593,6 +593,42 @@ module ApplicationHelper Project.project_tree(projects, &block) end + # 项目版本库可见权限判断 + # 条件:1、modules中设置不可见或项目没有版本库;2、如果项目是私有或者项目版本库隐藏则必须是项目成员才可见 + def visible_repository?(project) + @result = false + unless project.enabled_modules.where("name = 'repository'").empty? || project.repositories.count == 0 + if (project.hidden_repo || !project.is_public?) + if User.current.member_of?(project) + @result = true + end + else + @result = true + end + end + return @result + end + + # 判断当前用户是否为项目管理员 + def is_project_manager?(user_id, project_id) + @result = false + mem = Member.where("user_id = ? and project_id = ?",user_id, project_id) + unless mem.blank? + @result = mem.first.roles.to_s.include?("Manager") ? true : false + end + return @result + end + + # 公开项目资源可以引用,admin和管理员和资源上传者拥有设置公开私有权限 + def authority_pubilic_for_files(project, file) + @result = false + if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id || User.current.admin) && + project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" + @result = true + end + return @result + end + def principals_check_box_tags(name, principals) s = '' principals.each do |principal| @@ -1770,8 +1806,7 @@ module ApplicationHelper def get_memo @new_memo = Memo.new - #@new_memo.subject = "有什么想说的,尽管来咆哮吧~~" - @public_forum = Forum.find(1) + @public_forum = Forum.find(1) rescue ActiveRecord::RecordNotFound end #获取用户未过期的课程 @@ -2066,21 +2101,21 @@ module ApplicationHelper hidden_non_project = Setting.find_by_name("hidden_non_project") visiable = !(hidden_non_project && hidden_non_project.value == "0") - main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_domain} - main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain} - main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.contest_domain} + main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.host_course} + main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.host_name} + main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.host_contest} # course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'} - course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain} + course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.host_course} # courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'} - #users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} + #users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.host_user} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} school_all_school_link = link_to l(:label_school_all), {:controller => 'school', :action => 'index'} - project_new_link = link_to l(:label_project_new), {:controller => 'projects', :action => 'new', :host => Setting.project_domain} - # project_mine_link = link_to l(:label_my_project), {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} + project_new_link = link_to l(:label_project_new), {:controller => 'projects', :action => 'new', :host => Setting.host_name} + # project_mine_link = link_to l(:label_my_project), {:controller => 'users', :action => 'user_projects', :host => Setting.host_name} #@nav_dispaly_project_label nav_list = Array.new diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 801d98b0b..babd8cb12 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -797,4 +797,17 @@ module CoursesHelper end result end + + def zh_course_role role + if role == "TeachingAsistant" + result = l(:label_TA) + elsif role == "Teacher" + result = l(:label_teacher) + elsif role == "Student" + result = l(:label_student) + elsif role == "Manager" + result = l(:field_admin) + end + result + end end diff --git a/app/helpers/gitlab_helper.rb b/app/helpers/gitlab_helper.rb index ceaaf6d21..836a973a9 100644 --- a/app/helpers/gitlab_helper.rb +++ b/app/helpers/gitlab_helper.rb @@ -11,7 +11,7 @@ module GitlabHelper PROJECT_PATH_CUT = 40 # gitlab版本库所在服务器 # 注意REPO_IP_ADDRESS必须以http://开头,暂时只支持HTTP协议,未支持SSH - #REPO_IP_ADDRESS = "http://" + Setting.repository_domain + #REPO_IP_ADDRESS = "http://" + Setting.host_repository REPO_IP_ADDRESS = "http://192.168.137.100" GITLAB_API = "/api/v3" diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index b72a191db..aae150728 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -67,29 +67,33 @@ module IssuesHelper s.html_safe end - #获取跟踪类型 - #REDO:时间紧需要优化,两个方法可以综合成一个 + #获取跟踪类型及样式 + #REDO:时间紧可以优化. def get_issue_type(value) + issuetype = [] if value == "缺陷" || value == 1 - class_type = "red_btn_cir ml10" + issuetype << "red_btn_cir ml10" + issuetype << "缺陷" elsif value == "功能" || value == 2 - class_type = "blue_btn_cir ml10" + issuetype << "blue_btn_cir ml10" + issuetype << "功能" elsif value == "支持" || value == 3 - class_type = "green_btn_cir ml10" + issuetype << "green_btn_cir ml10" + issuetype << "支持" + elsif value == "任务" || value == 4 + issuetype << "orange_btn_cir ml10" + issuetype << "任务" else - class_type = "orange_btn_cir ml10" + issuetype << "bgreen_btn_cir ml10" + issuetype << "周报" end end - def get_issue_typevalue(value) - if value == "缺陷" || value == 1 - assign = "缺陷" - elsif value == "功能" || value == 2 - assign = "功能" - elsif value == "支持" || value == 3 - assign = "支持" + def principals_options_for_isuue_list(project) + if User.current.member_of?(project) + project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0]) else - assign = "任务" + project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给", 0]) end end diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index e1d8c3e12..d9d910a66 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -243,15 +243,15 @@ module QueriesHelper # Retrieve query from session or build a new query def retrieve_query - if !params[:query_id].blank? - cond = "project_id IS NULL" - cond << " OR project_id = #{@project.id}" if @project - @query = IssueQuery.find(params[:query_id], :conditions => cond) - raise ::Unauthorized unless @query.visible? - @query.project = @project - session[:query] = {:id => @query.id, :project_id => @query.project_id} - sort_clear - elsif api_request? || params[:set_filter] || session[:query].nil? || session[:query][:project_id] != (@project ? @project.id : nil) + # if !params[:query_id].blank? + # cond = "project_id IS NULL" + # cond << " OR project_id = #{@project.id}" if @project + # @query = IssueQuery.find(params[:query_id], :conditions => cond) + # raise ::Unauthorized unless @query.visible? + # @query.project = @project + # session[:query] = {:id => @query.id, :project_id => @query.project_id} + # sort_clear + # elsif api_request? || params[:set_filter] || session[:query].nil? || session[:query][:project_id] != (@project ? @project.id : nil) # Give it a name, required to be valid @query = IssueQuery.new(:name => "_") @query.project = @project @@ -268,12 +268,12 @@ module QueriesHelper 'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil? @query.build_from_params(params) #session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names} - else - # retrieve from session - @query = IssueQuery.find_by_id(session[:query][:id]) if session[:query][:id] - @query ||= IssueQuery.new(:name => "_", :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names]) - @query.project = @project - end + # else + # # retrieve from session + # @query = IssueQuery.find_by_id(session[:query][:id]) if session[:query][:id] + # @query ||= IssueQuery.new(:name => "_", :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names]) + # @query.project = @project + # end end def retrieve_query_from_session diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 773560932..5cbc3af5a 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -24,7 +24,7 @@ module RepositoriesHelper ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" end PROJECT_PATH_CUT = 40 - REPO_IP_ADDRESS = Setting.repository_domain + REPO_IP_ADDRESS = Setting.host_repository def format_revision(revision) if revision.respond_to? :format_identifier @@ -232,6 +232,18 @@ module RepositoriesHelper :label => l(:label_git_report_last_commit) )) end + + # 判断项目是否有主版本库 + def judge_main_repository(pro) + if pro.repositories.blank? + return false + else + pro.repositories.sort.each do |rep| + rep.is_default? + return true + end + end + end # def cvs_field_tags(form, repository) # content_tag('p', form.text_field( # :root_url, diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index f6e205e82..4800a949a 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -443,6 +443,10 @@ module WelcomeHelper resultSet.take(limit) end + def find_my_projects + my_projects = User.current.memberships.all(conditions: "projects.project_type = 0") + end + def sort_project_by_hot_rails project_type=0, order_by='score DESC', limit=15 # Project.find_by_sql(" # SELECT p.id, p.name, p.description, p.identifier, t.project_id diff --git a/app/models/token.rb b/app/models/token.rb index c89ff30bc..e0accb59c 100644 --- a/app/models/token.rb +++ b/app/models/token.rb @@ -1,3 +1,4 @@ +#coding=utf-8 # Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # @@ -14,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - +# class Token < ActiveRecord::Base belongs_to :user validates_uniqueness_of :value @@ -27,6 +28,16 @@ class Token < ActiveRecord::Base self.value = Token.generate_token_value end + def self.get_or_create_permanent_login_token(user) + token = Token.get_token_from_user(user, 'autologin') + unless token + token = Token.create(:user => user, :action => 'autologin') + else + token.update_attribute(:created_on, Time.now) + end + token + end + def self.get_token_from_user(user, action) token = Token.where(:action => action, :user_id => user).first unless token @@ -42,7 +53,7 @@ class Token < ActiveRecord::Base # Delete all expired tokens def self.destroy_expired - Token.delete_all ["action NOT IN (?) AND created_on < ?", ['feeds', 'api'], Time.now - @@validity_time] + Token.delete_all ["action NOT IN (?) AND created_on < ?", ['feeds', 'api', 'autologin'], Time.now - @@validity_time] end # Returns the active user who owns the key for the given action @@ -80,6 +91,10 @@ class Token < ActiveRecord::Base Redmine::Utils.random_hex(20) end + def self.delete_user_all_tokens(user) + Token.delete_all(user_id: user.id) + end + private # Removes obsolete tokens (same user and action) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index b992665d3..26d8df16f 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -86,7 +86,7 @@ class CoursesService gender = m.user.user_extensions.gender.nil? ? 0 : m.user.user_extensions.gender work_unit = get_user_work_unit m.user location = get_user_location m.user - users << {:id => m.user.id, :img_url => img_url, :nickname => m.user.login, :gender => gender, :work_unit => work_unit, :mail => m.user.mail, :location => location, :brief_introduction => m.user.user_extensions.brief_introduction} + users << {:id => m.user.id, :img_url => img_url, :nickname => m.user.login, :gender => gender, :work_unit => work_unit, :mail => m.user.mail, :location => location, :brief_introduction => m.user.user_extensions.brief_introduction,:realname=>m.user.realname} end users end @@ -169,7 +169,7 @@ class CoursesService unless (course.is_public == 1 || current_user.member_of_course?(course) || current_user.admin?) raise '403' end - {:course => course,:work_unit => work_unit, :img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)} + {:course => course,:work_unit => work_unit, :img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course),:course_student_num => course ? course.student.count.to_s : 0} end #创建课程 @@ -433,13 +433,104 @@ class CoursesService result = [] @course = Course.find(params[:course_id]) @attachments = @course.attachments.order("created_on desc") - @attachments.each do |atta| - result << {:filename => atta.filename,:description => atta.description,:downloads => atta.downloads,:quotes => atta.quotes.nil? ? 0 :atta.quotes } + if !params[:name].nil? && params[:name] != "" + @attachments.each do |atta| + result << {:filename => atta.filename, + :description => atta.description, + :downloads => atta.downloads, + :quotes => atta.quotes.nil? ? 0 :atta.quotes } if atta.filename.include?(params[:name]) + + end + else + @attachments.each do |atta| + result << {:filename => atta.filename, + :description => atta.description, + :downloads => atta.downloads, + :quotes => atta.quotes.nil? ? 0 :atta.quotes } + + end end result end + # 课程学生列表 + def course_members params + @all_members = searchmember_by_name(student_homework_score(0,params[:course_id], 10,"desc"),params[:name]) + end + + def show_member_score params + @member_score = Member.find(params[:member_id]) if params[:member_id] + atta = @member_score.student_homework_score[0] + result = [] + atta.each do |t| + if !params[:homeworkName].nil? && params[:homeworkName] != "" + result << {:name=>t[:name],:score=>t[:score]} if t[:name].include?(params[:homeworkName]) + else + result << {:name=>t[:name],:score=>t[:score]} + end + + end + result + end + + # 设置人员为课程教辅 + def set_as_assitant_teacher params + members = [] + #找到课程 + course = Course.find(params[:course_id]) + #新建课程人员 + + member = Member.new(:role_ids =>[7], :user_id => params[:user_id],:course_id=>params[:course_id]) + joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,course.id) + joined.each do |join| + join.delete + end + member.course_group_id = 0 + members << member + course.members << members + #将课程人员设置为教辅 + end + + def del_assitant_teacher params + member = Member.where("user_id = ? and course_id = ?",params[:user_id],params[:course_id]) + member.each do |m| + m.destroy + end + user_admin = CourseInfos.where("user_id = ? and course_id = ?",params[:user_id], params[:course_id]) + if user_admin.size > 0 + user_admin.each do |user| + user.destroy + end + end + joined = StudentsForCourse.where('student_id = ? and course_id = ?', params[:user_id],params[:course_id]) + joined.each do |join| + join.delete + end + end + + def create_course_notice params ,current_user + n = News.new(:course_id =>params[:course_id], :author_id => current_user.id,:title =>params[:title],:description=> params[:desc]) + n.save + {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count} + end + private + def searchmember_by_name members, name + #searchPeopleByRoles(project, StudentRoles) + mems = [] + if name != "" + name = name.to_s.downcase + members.each do |m| + username = m.user[:lastname].to_s.downcase + m.user[:firstname].to_s.downcase + if(m.user[:login].to_s.downcase.include?(name) || m.user.user_extensions[:student_id].to_s.downcase.include?(name) || username.include?(name)) + mems << m + end + end + else + mems = members + end + mems + end def show_homework_info course,bid,current_user,is_course_teacher author_real_name = bid.author.lastname + bid.author.firstname many_times = course.homeworks.index(bid) + 1 @@ -476,5 +567,56 @@ class CoursesService end + def student_homework_score(groupid,course_id, nums, score_sort_by) + #teachers = find_course_teachers(@course) + #start_from = start_from * nums + sql_select = "" + if groupid == 0 + if nums == 0 + sql_select = "SELECT members.*, SUM(homework_attaches.score) as score FROM members, homework_attaches + WHERE members.course_id = #{course_id} AND members.user_id in (SELECT students_for_courses.student_id FROM students_for_courses WHERE course_id = #{course_id}) AND members.user_id = homework_attaches.user_id + AND homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id}) GROUP BY members.user_id + UNION all + SELECT members.*, 0 as score FROM members,homework_attaches,students_for_courses WHERE members.course_id = #{course_id} AND + students_for_courses.course_id = #{course_id} and members.user_id = students_for_courses.student_id AND + members.user_id NOT IN (SELECT homework_attaches.user_id FROM homework_attaches WHERE homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id} ) + ) + GROUP BY members.user_id ORDER BY score #{score_sort_by}" + else + sql_select = "SELECT members.*, SUM(homework_attaches.score) as score FROM members, homework_attaches + WHERE members.course_id = #{course_id} AND members.user_id in (SELECT students_for_courses.student_id FROM students_for_courses WHERE course_id = #{course_id}) AND members.user_id = homework_attaches.user_id + AND homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id}) GROUP BY members.user_id + UNION all + SELECT members.*, 0 as score FROM members,homework_attaches,students_for_courses WHERE members.course_id = #{course_id} AND + students_for_courses.course_id = #{course_id} and members.user_id = students_for_courses.student_id AND + members.user_id NOT IN (SELECT homework_attaches.user_id FROM homework_attaches WHERE homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id} ) + ) + GROUP BY members.user_id ORDER BY score #{score_sort_by} " #limit #{start_from}, #{nums}" + + end + else + sql_select = "SELECT members.*, SUM(homework_attaches.score) as score FROM members, homework_attaches + WHERE members.course_id = #{course_id} AND members.user_id in (SELECT students_for_courses.student_id FROM students_for_courses WHERE course_id = #{course_id}) AND members.user_id = homework_attaches.user_id + and members.course_group_id = #{groupid} AND homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id}) + GROUP BY members.user_id + UNION all + SELECT members.*, 0 as score FROM members,homework_attaches,students_for_courses WHERE members.course_id = #{course_id} + and members.course_group_id = #{groupid} AND + students_for_courses.course_id = #{course_id} and members.user_id = students_for_courses.student_id AND + members.user_id NOT IN (SELECT homework_attaches.user_id FROM homework_attaches WHERE homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{course_id} ) + ) + GROUP BY members.user_id ORDER BY score #{score_sort_by}" + end + sql = ActiveRecord::Base.connection() + homework_scores = Member.find_by_sql(sql_select) + sql.close() + + homework_scores + end + + + + + end \ No newline at end of file diff --git a/app/services/homework_service.rb b/app/services/homework_service.rb index d22c62a5a..2e7f59888 100644 --- a/app/services/homework_service.rb +++ b/app/services/homework_service.rb @@ -231,6 +231,29 @@ class HomeworkService anonymous_repy(jour) end end + + # 发布作业 + def create_home_work params,current_user + @bid = Bid.new + @bid.name = params[:work_name] + @bid.description = params[:work_desc] + # @bid.is_evaluation = params[:is_blind_appr] + @bid.evaluation_num = params[:blind_appr_num] + @bid.open_anonymous_evaluation = params[:is_blind_appr] + @bid.reward_type = 3 + @bid.deadline = params[:work_deadline] + @bid.budget = 0 + @bid.author_id = current_user.id + @bid.commit = 0 + @bid.homework_type = 1 + # @bid. + if @bid.save + HomeworkForCourse.create(:course_id => params[:course_id], :bid_id => @bid.id) + unless @bid.watched_by?(current_user) + @bid.add_watcher(current_user) + end + end + end # 学生匿评列表 def student_jour_list params diff --git a/app/services/users_service.rb b/app/services/users_service.rb index 3a92bf8f1..6e566b519 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -4,6 +4,7 @@ class UsersService include AvatarHelper include CoursesHelper include ApiHelper + include WordsHelper #将用户注册的功能函数写这里 #参数约定 #成功返回注册后的User实例,失败直接抛异常 @@ -154,6 +155,25 @@ class UsersService @user end + # 获取某个用户的所有留言信息 + def get_all_messages params + user = User.find(params[:user_id]) + jours = user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') + jours.update_all(:is_readed => true, :status => false) + jours.each do |journal| + fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false) + end + jours + end + + # 给某个用户留言 + def leave_messages params,current_user + user = User.find(params[:user_id]) + user.add_jour(current_user, params[:content], params[:refer_user_id] ||= 0) + unless params[:refer_user_id].nil? || params[:refer_user_id] == 0 || params[:refer_user_id] == User.current.id + User.find(params[:refer_user_id]).add_jour(current_user, params[:content], params[:refer_user_id]) + end + end @@ -205,10 +225,23 @@ class UsersService "show_changesets" => true } scope = User.logged.status(status) - watcher = User.watched_by(params[:user_id]) - watcher.push(params[:user_id]) - search_by = params[:search_by] ? params[:search_by] : "0" - scope = scope.where("id not in (?)",watcher).like(params[:name],search_by) if params[:name].present? + if params[:is_search_assitant].nil? + #modify by yutao 2015/5/18 没有params[:user_id]参数时去掉"id not in (?)"条件(bug:#2270) start + #say by yutao: params[:user_id]这个是指谁发起的搜索么? 如果是 这个值貌似应该从session获取 怪怪的赶脚-_-! + search_by = params[:search_by] ? params[:search_by] : "0" + if params[:name].present? + if !params[:user_id].nil? + watcher = User.watched_by(params[:user_id]) + watcher.push(params[:user_id]) + scope = scope.where("id not in (?)",watcher) + end + scope = scope.like(params[:name],search_by) + end + #modify by yutao 2015/5/18 没有params[:user_id]参数时去掉"id not in (?)"条件 end + else + teachers = searchTeacherAndAssistant(Course.find(params[:course_id])) + scope = scope.where("id not in (?)",teachers.map{|t| t.user_id}).like(params[:name],search_by) if params[:name].present? + end scope end diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 2e8800617..845e2b6a0 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -17,6 +17,7 @@ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> +
<% end %> <% container.saved_attachments.each_with_index do |attachment, i| %> @@ -34,10 +35,12 @@ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> +
<% end %> <% end %> <% project = project %> +
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index 1e81aaf65..b0ab39b5a 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -1,27 +1,31 @@ - + <% if defined?(container) && container && container.saved_attachments %> <% if isReply %> <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :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')%> + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> <% else %> <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - <%= 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')%> - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :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_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> <% end %> @@ -38,12 +42,12 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> -<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> +<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"file#{container.id}.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', + :id => "file#{container.id}", :class => 'file_selector', :multiple => true, - :onchange => 'addInputFiles(this);', + :onchange => "addInputFiles_board(this, '#{container.id}');", :style => 'display:none', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, @@ -56,7 +60,9 @@ :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all) } %> -<%= l(:label_no_file_uploaded)%> + <% if container.nil? %> + <%= l(:label_no_file_uploaded)%> + <% end %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index 9778d3242..d1cdf8cc9 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -1,26 +1,32 @@ - +<% if defined?(container) %> + <% if defined?(container) && container && container.saved_attachments %> <% if isReply %> <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :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')%> - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> <% else %> <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - <%= 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')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :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_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), 'data-containerid'=>"#{container.id}",:method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> @@ -35,15 +41,15 @@ // file.click(); // } - + <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> + <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file#{container.id}.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', + :id => "_file#{container.id}", :class => 'file_selector', :multiple => true, - :onchange => 'addInputFiles(this);', + :onchange => "addInputFiles_board(this, '#{container.id}');", :style => 'display:none', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, @@ -54,12 +60,78 @@ :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) + :delete_all_files => l(:text_are_you_sure_all), + :containerid => "#{container.id}" } %> - <%= l(:label_no_file_uploaded)%> + <%= l(:label_no_file_uploaded)%> +(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) + +<% else %> + +<% if defined?(container) && container && container.saved_attachments %> + <% if isReply %> + <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= 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')%> + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> + <% else %> + <% 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 => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + <%= 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')%> + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> + <% end %> +<% end %> + + + +<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> + + <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => 'file_selector', + :multiple => true, + :onchange => 'addInputFiles(this);', + :style => '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'), + :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) + } %> + <% if defined?(container) %> + <%= l(:label_no_file_uploaded)%> + <% end %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +<% end %> <% content_for :header_tags do %> <%= javascript_include_tag 'attachments' %> <% end %> diff --git a/app/views/attachments/_homework_jour_link.html.erb b/app/views/attachments/_homework_jour_link.html.erb index e0efa211c..8721d41ac 100644 --- a/app/views/attachments/_homework_jour_link.html.erb +++ b/app/views/attachments/_homework_jour_link.html.erb @@ -13,6 +13,6 @@ :target => "_blank"%> <% end %> -
+
<% end %> diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index a18d819da..fe0e9ab97 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -28,7 +28,8 @@
<% is_float ||= false %> <% for attachment in attachments %> -

+

+

<%if is_float%>

<% end%> @@ -50,9 +51,10 @@ :id => attachment, :filename => attachment.filename%> <% end %> - - <%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %> - +
+
+ <%= h(" - #{attachment.description}") unless attachment.description.blank? %> +
( <%= number_to_human_size attachment.filesize %>) diff --git a/app/views/attachments/add_exist_file_to_courses.js.erb b/app/views/attachments/add_exist_file_to_courses.js.erb index eec1e255a..c84a89184 100644 --- a/app/views/attachments/add_exist_file_to_courses.js.erb +++ b/app/views/attachments/add_exist_file_to_courses.js.erb @@ -4,4 +4,5 @@ $("#error_show").html("<%= @message.html_safe %>"); <% else %> closeModal(); + searchone4reload('<%=params[:file_id]%>'); <% end %> diff --git a/app/views/attachments/destroy.js.erb b/app/views/attachments/destroy.js.erb index d2a3a11a1..0b6cee0df 100644 --- a/app/views/attachments/destroy.js.erb +++ b/app/views/attachments/destroy.js.erb @@ -1,8 +1,26 @@ -$('#attachments_<%= j params[:attachment_id] %>').remove(); -var count=$('#attachments_fields>span').length; -if(count<=0){ - $("#upload_file_count").text(<%= l(:label_no_file_uploaded)%>); - $(".remove_all").remove(); +var attachment_html_obj = $('#attachments_<%= j params[:attachment_id] %>'); +//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 start +var containerid=$('.remove-upload',attachment_html_obj).data('containerid'); +if(containerid==undefined){ + $('#attachments_<%= j params[:attachment_id] %>').remove(); + var count=$('#attachments_fields>span').length; + if(count<=0){ + $("#upload_file_count").text('<%= l(:label_no_file_uploaded)%>'); + $(".remove_all").remove(); + }else{ + $("#upload_file_count").html(""+count+""+"个文件"+"已上传"); + } }else{ - $("#upload_file_count").html("已上传"+""+count+""+"个文件"); -} \ No newline at end of file + $('#attachments_<%= j params[:attachment_id] %>').remove(); + var count=$('#attachments_fields'+containerid+'>span').length; + if(count<=0){ + $('#upload_file_count'+containerid).text('<%= l(:label_no_file_uploaded)%>'); + var remove_all_html_obj = $(".remove_all").filter(function(index){ + return $(this).data('containerid')==containerid; + }); + remove_all_html_obj.remove(); + }else{ + $('#upload_file_count'+containerid).html(""+count+""+"个文件"+"已上传"); + } +} +//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end \ No newline at end of file diff --git a/app/views/attachments/upload.js.erb b/app/views/attachments/upload.js.erb index 24256ccab..c3e7fc3ff 100644 --- a/app/views/attachments/upload.js.erb +++ b/app/views/attachments/upload.js.erb @@ -3,14 +3,15 @@ var fileSpan = $('#attachments_<%= j params[:attachment_id] %>'); fileSpan.hide(); alert("<%= escape_javascript @attachment.errors.full_messages.join(', ') %>"); <% else %> -$('', { type: 'hidden', name: 'attachments[<%= j params[:attachment_id] %>][token]' } ).val('<%= j @attachment.token %>').appendTo(fileSpan); fileSpan.find('a.remove-upload') - .attr({ - "data-remote": true, - "data-method": 'delete', - "href": '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>' - }) - .off('click'); + .attr({ + "data-remote": true, + "data-method": 'delete', + "href": '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>' + }) + .off('click'); +$('', { type: 'hidden', name: 'attachments[<%= j params[:attachment_id] %>][token]' } ).val('<%= j @attachment.token %>').appendTo(fileSpan); + //var divattach = fileSpan.find('div.div_attachments'); //divattach.html('<%= j(render :partial => 'tags/tagEx', :locals => {:obj => @attachment, :object_flag => "6"})%>'); <% end %> diff --git a/app/views/avatar/_avatar_form.html.erb b/app/views/avatar/_avatar_form.html.erb index 56f1f130e..632ea5d4d 100644 --- a/app/views/avatar/_avatar_form.html.erb +++ b/app/views/avatar/_avatar_form.html.erb @@ -43,7 +43,7 @@
-<%= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "btn_addPic", :style => "text-decoration:none;" %> +<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "btn_addPic", :style => "text-decoration:none;" %> <%= l(:button_upload_photo) %> @@ -73,4 +73,7 @@ <% content_for :header_tags do %> <%= javascript_include_tag 'avatars' %> <% end %> -
\ No newline at end of file + + + + diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index e341bc83a..64abfbc30 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -7,11 +7,10 @@ :id => nil, :class => 'upload_file', :size => "1", - :multiple => false, - :onchange => 'addInputAvatar(this);', + :multiple => true, :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_file_size => Setting.upload_avatar_max_size, + :max_file_size_message => l(:error_upload_avatar_to_large, :max_size => number_to_human_size(Setting.upload_avatar_max_size.to_i)), :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, :file_type => Redmine::Configuration['pic_types'].to_s, :type_support_message => l(:error_pic_type), @@ -22,6 +21,6 @@ } %> <% content_for :header_tags do %> - <%= javascript_include_tag 'avatars' %> + <%= javascript_include_tag 'jq-upload/jquery.ui.widget', 'jq-upload/jquery.iframe-transport', 'jq-upload/jquery.fileupload', 'jq-upload/upload' %> <% end %> -
\ No newline at end of file +
diff --git a/app/views/avatar/upload.js.erb b/app/views/avatar/upload.js.erb index a7a341f10..1fa90c5a3 100644 --- a/app/views/avatar/upload.js.erb +++ b/app/views/avatar/upload.js.erb @@ -1,4 +1,4 @@ -var imgSpan = $('#avatar_image'); +var imgSpan = jQuery('#avatar_image'); -imgSpan.attr({"src":'<%= @urlfile.to_s << "?" << Time.now.to_s%>'}); +imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'}); diff --git a/app/views/bids/_homework.html.erb b/app/views/bids/_homework.html.erb index 0cb1ff7cc..c3a6cc9d0 100644 --- a/app/views/bids/_homework.html.erb +++ b/app/views/bids/_homework.html.erb @@ -59,6 +59,55 @@ } ); } + +// $(window).scroll(function(){ +// //获取窗口的滚动条的垂直位置 +// var s = $(window).scrollTop(); +// //当窗口的滚动条的垂直位置大于页面的最小高度时,让返回顶部元素渐现,否则渐隐 +// if( s > 600){ +// $("#gotoTop").fadeIn(100); +// }else{ +// $("#gotoTop").fadeOut(200); +// }; +// }); + $(function(){goTopEx();}); + + var Sys = {}; + var ua = navigator.userAgent.toLowerCase(); + var s; + (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : + (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : + (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : + (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : + (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0; + + function goTopEx() { + var obj = document.getElementById("goTopBtn"); + var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; + function getScrollTop() { + var xsun = document.documentElement.scrollTop; + if (Sys.chrome) { + xsun=document.body.scrollTop; + } + return xsun; + } + function setScrollTop(value) { + if (Sys.chrome) { + document.body.scrollTop = value; + } + else { + document.documentElement.scrollTop = value; + } + } + window.onscroll = function () { getScrollTop() > 0 ? obj.style.display = "" : obj.style.display = "none"; }; + obj.onclick = function () { + var goTop = setInterval(scrollMove, 10); + function scrollMove() { + setScrollTop(getScrollTop() / 1.1); + if (getScrollTop() < 1) clearInterval(goTop); + } + } + }
diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index 16f78491b..7a5f628f9 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -35,7 +35,7 @@
  • - + <%= l(:label_evaluation_description)%>

  • diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb new file mode 100644 index 000000000..a380ad67f --- /dev/null +++ b/app/views/boards/_course_new.html.erb @@ -0,0 +1,9 @@ +<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> + + <%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %> +
  • + <%= l(:button_cancel) %> + <%= l(:button_submit)%> +
    +
  • +<% end %> diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index ed2c20448..2a078553c 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -1,28 +1,26 @@ - +
    -

    <%= l(:label_board_plural) %>

    -
    +

    + <% if User.current.language == "zh"%> + <%= h @board.name %> + <% else %> + <%= l(:project_module_boards) %> + <% end %> +

    + <%= l(:label_message_new) %> +
    +
    + +
    +
    +
    +
      + <%= render :partial => 'course_new' %> +
    +
    <% if !User.current.logged?%>
    @@ -31,38 +29,160 @@
    <% end %> -
    -

    - <%= l(:label_totle) %> - <%= @topic_count %> - <%= l(:label_course_momes_count) %> -

    - <%= link_to l(:label_message_new), - new_board_message_path(@board), - :class => 'problem_new_btn fl c_dorange' if User.current.logged? %> -
    -
    +

    讨论区共有<%= @topic_count %>个帖子

    <% if @topics.any? %> <% @topics.each do |topic| %> -
    - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %> -
    - <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s,:class => "problem_tit fl fb c_dblue" %> - <% if topic.sticky? %> - 置顶 - <% end %> -
    -

    由<%= link_to topic.author,user_path(topic.author),:class => "problem_name" %>添加于<%= format_time(topic.created_on) %>

    +
    + <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> +
    + <% author = topic.author.to_s + ":" %> + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %> + +

      <%= h(topic.subject) %>

    + <% if topic.course_editable_by?(User.current) %> + <%= l(:button_edit) %> + <% end %> + + <%= link_to( + l(:button_delete), + {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :class => 'talk_edit fr', + :style => ' margin-right: 10px;' + ) if topic.destroyable_by?(User.current) %> + + <% if topic.sticky? %> + <%= l(:label_board_sticky)%> + <% end %> +
    + + +
    +
    + <%= topic.content.html_safe %> +
    +
    + + + + + <%= link_to_attachments_course topic, :author => false %> + + <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> + +
    + <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %> + +
    + + +
    + - <%=link_to (l(:label_reply) + topic.replies_count.to_s), board_message_path(@board, topic),:class => "talk_btn fr c_white" %> +
    + <% reply = Message.new(:subject => "RE: #{@message.subject}")%> + <% if !topic.locked? && authorize_for('messages', 'reply') %> + +
    + + <% end %> + <% replies_all = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").offset(2). + all %> + <% replies_show = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").limit(2). + all %> + <% unless replies_show.empty? %> + <% reply_count = 0 %> +
    +
      + <% replies_show.each do |message| %> + +
    • + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> +
      + <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> +
      +

      <%= textAreailizable message,:content,:attachments => message.attachments %>

      -
      -
      +
      + <%= format_time(message.created_on) %> + <%= link_to( + + l(:button_delete), + {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :class => ' c_dblue fr' + ) if message.course_destroyable_by?(User.current) %> +
    +
    + + + <% end %> + +
    + + <%if replies_all.first %> + + <% end %> + <% end %> +
    <% end %> <% else %> -

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

    +

    <%= l(:label_no_data) %>

    <% end %>
      <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> diff --git a/app/views/boards/_edit.html.erb b/app/views/boards/_edit.html.erb new file mode 100644 index 000000000..98008d33e --- /dev/null +++ b/app/views/boards/_edit.html.erb @@ -0,0 +1,43 @@ + + <% if topic.project %> + <%#= board_breadcrumb(@message) %> + +
      +
        + <%= form_for topic, { :as => :message, + :url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id}, + :html => {:multipart => true, :name=>'message-form', + :id => 'message-form' + topic.id.to_s, + :method => :post} + } do |f| %> + <%= render :partial => 'form_project', + :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> + <%= l(:button_submit)%> + <%= l(:button_cancel) %> + <%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %> +
      +
      + <% end %> +<% elsif topic.course %> + <%#= course_board_breadcrumb(@message) %> +
      +
        + <%= form_for topic, { + :as => :message, + :url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id}, + :html => {:multipart => true, + :id => 'message-form' + topic.id.to_s, + :method => :post} + } do |f| %> + <%= render :partial => 'form_course', + :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> + <%= l(:button_submit)%> + <%= l(:button_cancel) %> + + <% end %> +
      +
      +<% end %> + + +
      diff --git a/app/views/boards/_form_course.html.erb b/app/views/boards/_form_course.html.erb new file mode 100644 index 000000000..945f58c22 --- /dev/null +++ b/app/views/boards/_form_course.html.erb @@ -0,0 +1,60 @@ +<%= error_messages_for 'message' %> +<% replying ||= false %> +<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %> +<% if replying %> +
    • + + + <%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %> + + +

      +
    • +<% else %> +
    • + + + + <%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %> + +

      +
    • +<% end %> +
    • + <% unless replying %> + <% if @message.safe_attribute? 'sticky' %> + <%= f.check_box :sticky %> + <%= label_tag 'message_sticky', l(:label_board_sticky) %> + <% end %> + <% if @message.safe_attribute? 'locked' %> + <%= f.check_box :locked %> + <%= label_tag 'message_locked', l(:label_board_locked) %> + <% end %> + <% end %> +
      +
    • +
    • +
      + <% unless replying %> + + <% end %> + <%= text_area :quote,:quote,:style => 'display:none' %> + <% if replying%> + <%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %> + <% else %> + <%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %> + <% end %> +
      +

      +
    • +
      +
    • + <% unless replying %> +
      + <%= render :partial => 'attachments/form_course', :locals => {:container => topic,:isReply => @isReply} %> +
      + <% end %> +
    • +
    • +
      +
    • \ No newline at end of file diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb new file mode 100644 index 000000000..b219c466d --- /dev/null +++ b/app/views/boards/_form_project.html.erb @@ -0,0 +1,96 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %> + +<%= error_messages_for 'message' %> +<% replying ||= false %> +<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %> +<% if replying %> +
    • + + + <%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585" }.merge(extra_option) %> + + +

      +
    • +<% else %> +
    • + + + + <%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %> + +

      +
    • +<% end %> +
    • + <% unless replying %> + <% if @message.safe_attribute? 'sticky' %> + <%= f.check_box :sticky %> + <%= label_tag 'message_sticky', l(:label_board_sticky) %> + <% end %> + <% if @message.safe_attribute? 'locked' %> + <%= f.check_box :locked %> + <%= label_tag 'message_locked', l(:label_board_locked) %> + <% end %> + <% end %> +
      +
    • +
    • +
      + <% unless replying %> + + <% end %> + <%= f.text_area :quote,:quote,:style => 'display:none' %> +
      + <% if replying%> + + <%= f.text_area :content, + :width => '89%', + :height => 300, + :id => "message_content#{f.object.id}", + :name => 'content', + :onkeyup => "regexContent('#{f.object.id}');", + :class => 'talk_text fl', + :placeholder => "最多3000个汉字(或6000个英文字符)", + :maxlength => 5000 %> + + <% else %> + <%= f.text_area :content, + :width => '90%', + :height => 300, + :class => 'talk_text fl', + :editor_id => "message_content#{f.object.id}_edit", + :id => "message_content#{f.object.id}", + :onkeyup => "regexContent('#{f.object.id}');", + :class => 'talk_text fl', + :name => 'content', + :placeholder => "最多3000个汉字(或6000个英文字符)", + :maxlength => 5000 %> + + <% end %> +
      +
      +

      +
    • +
      +
    • +<% unless replying %> +
      + <%= render :partial => 'attachments/form_project', :locals => {:container => topic,:isReply => @isReply} %> +
      + <% end %> +
    • +
    • +
      +
    • \ No newline at end of file diff --git a/app/views/boards/_project_new_topic.html.erb b/app/views/boards/_project_new_topic.html.erb new file mode 100644 index 000000000..611a58738 --- /dev/null +++ b/app/views/boards/_project_new_topic.html.erb @@ -0,0 +1,10 @@ +<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form', :name=>'message-form'} do |f| %> + + <%= render :partial => 'form_project', :locals => {:f => f, :topic => @message} %> +
    • + <%= l(:button_cancel) %> + + <%= l(:button_submit)%> +
      +
    • +<% end %> \ No newline at end of file diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 410648c15..9a10d123d 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -1,11 +1,14 @@ -
      -

      +
      +

      <% if User.current.language == "zh"%> <%= h @board.name %> <% else %> <%= l(:project_module_boards) %> <% end %> +

      + <%= l(:label_message_new) %> +
      @@ -16,34 +19,193 @@

      <% end %> - -
      -
      <%= l(:label_project_board_count , :count => @topic_count)%>
      -<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - <%= link_to l(:project_module_boards_post), new_board_message_path(@board), - :class => 'problem_new_btn fl c_dorange', - :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> - <% end %> -
      -
      + +
      +
      +
      +
        + <%= render :partial => 'project_new_topic' %> +
      +
      + +

      讨论区共有<%= @topic_count %>个帖子

      <% if @topics.any? %> <% @topics.each do |topic| %> -
      - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %> -
      - <%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> - <% if topic.sticky? %> - <%= l(:label_board_sticky)%> - <% end %> -
      - <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> -  <%= l(:label_post_by_time)%><%= format_time topic.created_on %> + +
      + <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> +
      + <% author = topic.author.to_s + ":" %> + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %> + +

        <%= h(topic.subject) %>

      + <% if topic.editable_by?(User.current) %> + + <%= l(:button_edit) %> + <% end %> + + <%= link_to( + l(:button_delete), + {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :class => 'talk_edit fr', + :style => ' margin-right: 10px;' + ) if topic.destroyable_by?(User.current) %> + + <% if topic.sticky? %> + <%= l(:label_board_sticky)%> + <% end %> +
      + +
      +
      + <%= topic.content %> +
      +
      + + + + + <%= link_to_attachments_course topic, :author => false %> + + <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> +
      - <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %> + <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => "about_newtalk#{topic.id}",:class => ' c_dblue fr' %> +
      + +
      - <% end %> + + +
      + <% reply = Message.new(:subject => "RE: #{@message.subject}")%> + <% if !topic.locked? && authorize_for('messages', 'reply') %> + +
      + + <% end %> + <% replies_all = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.id asc").offset(2). + all %> + <% replies_show = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.id asc").limit(2). + all %> + <% unless replies_show.empty? %> + <% reply_count = 0 %> +
      +
        + <% replies_show.each do |message| %> + +
      • + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> +
        + <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> +
        +

        <%= textAreailizable message,:content,:attachments => message.attachments %>

        + +
        + <%= format_time(message.created_on) %> + <%= link_to( + + l(:button_delete), + {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :class => ' c_dblue fr' + ) if message.course_destroyable_by?(User.current) %> + <%= link_to( + l(:button_quote), + {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :class => ' c_dblue fr', + :style => 'margin-right: 10px;', + :remote => true, + :method => 'get', + :onclick => "$('#reply#{topic.id}').slideToggle(); return false;", + :focus => "about_newtalk#{topic.id}", + :title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %> +
        +
        + +
      • + <% end %> +
      +
      + + <%if replies_all.first %> + + <% end %> + <% end %> +
      + + <% end %> <% else %>

      <%= l(:label_no_data) %>

      <% end %> @@ -61,3 +223,48 @@ <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> <% end %> +
      + + + \ No newline at end of file diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index c9a8645de..16f2998ce 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -1,4 +1,72 @@ + + + <% if @project %> <%= render :partial => 'project_show', locals: {project: @project} %> <% elsif @course %> diff --git a/app/views/contests/_form_contest.html.erb b/app/views/contests/_form_contest.html.erb index 344d69571..0b9f1469d 100644 --- a/app/views/contests/_form_contest.html.erb +++ b/app/views/contests/_form_contest.html.erb @@ -33,20 +33,21 @@ %>

      -

      +

      <%= f.text_area :description, - :rows => 5, - :class => 'wiki-edit', - :style => "font-size:small;width:490px;margin-left:10px;", + :size => 60, + :rows => 4, + :style => "width:490px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>

      -

      +

      <%= f.text_field :password, :size => 60, - :style => "width:488px;margin-left: 10px;" + :rows => 4, + :style => "width:490px;" %>

      diff --git a/app/views/contests/_new_softapplication.html.erb b/app/views/contests/_new_softapplication.html.erb index 5849132ae..3bba3db41 100644 --- a/app/views/contests/_new_softapplication.html.erb +++ b/app/views/contests/_new_softapplication.html.erb @@ -187,7 +187,7 @@ <%= link_to l(:label_create_new_projects), - new_project_path(:course => 0, :project_type => 0, :host => Setting.project_domain), + new_project_path(:course => 0, :project_type => 0, :host => Setting.host_name), :target => '_blank' %> diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 0e1b5caa6..222d90458 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -56,16 +56,16 @@

      <%= content_tag('span', "#{garble @course.members.count}", :class => "info") %> - <%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %> + <%= content_tag('span', l(:label_x_member, :count => @course.members.count)) %>

      - +

      <%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %> <%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>

      - +
      <% if(course_endTime_timeout? @course) %> diff --git a/app/views/courses/_course_members.html.erb b/app/views/courses/_course_members.html.erb index 88ac405dc..9f15405dc 100644 --- a/app/views/courses/_course_members.html.erb +++ b/app/views/courses/_course_members.html.erb @@ -21,7 +21,7 @@ <%= form_for(@member, {:as => :membership, :url => course_memberships_path(@course), :remote => true, :method => :post}) do |f| %>
    diff --git a/app/views/courses/_course_teacher.html.erb b/app/views/courses/_course_teacher.html.erb index 5571a4546..ef1ffc808 100644 --- a/app/views/courses/_course_teacher.html.erb +++ b/app/views/courses/_course_teacher.html.erb @@ -1,6 +1,7 @@
    加入时间 + 角色
    <% members.each do |member| %> @@ -9,8 +10,9 @@ <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %> <%= l(:label_username)%> - <%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %> + <%= link_to(member.user.show_name, user_path(member.user),:class => "ml10 c_blue02") %> <%= format_date(member.created_on)%> + <%= zh_course_role(h member.roles.sort.collect(&:to_s).first)%>
    <% end%> diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 69e600b94..adbbf4780 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -15,7 +15,7 @@ <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;", :placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250}%> - 取  消 + 取  消 <%= l(:button_leave_meassge)%> diff --git a/app/views/courses/_member.html.erb b/app/views/courses/_member.html.erb index a4b5bae6e..40049f104 100644 --- a/app/views/courses/_member.html.erb +++ b/app/views/courses/_member.html.erb @@ -2,21 +2,21 @@
  • <%= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %> - <%= h member.roles.sort.collect(&:to_s).join(', ') %> + <%= zh_course_role(h member.roles.sort.collect(&:to_s).join(', ')) %> <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), :method => :put, :html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}} ) do |f| %> <% @roles.each do |role| %> -
      +
        <%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> - +
      <% end %> <%= hidden_field_tag 'membership[role_ids][]', '' %> -
      +
      <%= l(:button_change)%> diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 69ce4f5dc..4ca8d3d43 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -23,6 +23,7 @@ +
    • diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 1d2c42457..cc3bb33f1 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -15,12 +15,13 @@   <%= l(:label_new_activity) %>: <%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : - (e.event_type.eql?("bid") ? homework_course_path(@course) : e.event_url),:class => "problem_tit c_dblue fl fb"%> + (e.event_type.eql?("bid") ? homework_course_path(@course) : (e.event_type.eql?("message") || e.event_type.eql?("reply") ? course_boards_path(@course,:topic_id => e.id) : e.event_url)),:class => "problem_tit c_dblue fl fb"%>

      <%= e.event_description.html_safe %>
      <%= l :label_activity_time %> : <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %>

      + <%= link_to_attachments_course(e) if e.is_a?(News) %>
    • @@ -49,4 +50,4 @@
        <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
      -
      \ No newline at end of file +
      diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 1769b1a45..ebccfcaf4 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -1,4 +1,15 @@
      共有 <%=link_to @forum.memos.count %> 个贴子
      <% if memos.any? %> diff --git a/app/views/homework_attach/_addjour.html.erb b/app/views/homework_attach/_addjour.html.erb index 824ddd8ce..7dbaa0017 100644 --- a/app/views/homework_attach/_addjour.html.erb +++ b/app/views/homework_attach/_addjour.html.erb @@ -21,7 +21,9 @@ function submit_jours(is_teacher) { - if(!is_teacher&&$("#stars_value").val() == "0"){alert("您还没有打分");return;} +// if(("#stars_value").val() == "0"){ +// if(confirm('是否确定评分为0分?')){}else{return;} +// } if(!is_teacher&&$("#new_form_user_message").val() == ""){alert("您还没有填写评语");return;} $('#new_form_user_message').parent().submit(); } @@ -57,7 +59,7 @@ 文件: -
      +
      <%= render :partial => 'attachments/form' %>
      diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb index 466444528..973dbc51a 100644 --- a/app/views/homework_attach/_homework.html.erb +++ b/app/views/homework_attach/_homework.html.erb @@ -32,7 +32,7 @@ <% unless is_student_batch_homework %> <%= l(:label_teacher_score)%>: - <%= (homework.t_score.nil? || (homework.t_score && homework.t_score.to_i == 0)) ? l(:label_without_score) : format("%.2f",homework.t_score)%> + <%= (homework.t_score.nil?) ? l(:label_without_score) : format("%.2f",homework.t_score)%>    <% end %> diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index 24ea2190c..c82a729de 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -34,7 +34,11 @@
      <% end %> +
      +
      <% unless homeworks.nil? %> diff --git a/app/views/homework_attach/_review.html.erb b/app/views/homework_attach/_review.html.erb index 876980168..61642c2c6 100644 --- a/app/views/homework_attach/_review.html.erb +++ b/app/views/homework_attach/_review.html.erb @@ -22,11 +22,11 @@ <% end %> - + <%= format_time(review.created_at) %> - <% if review.stars && review.stars.to_i > 0%> + <% if review.stars%> <%= l(:label_work_rating) %>: diff --git a/app/views/homework_attach/_show.html.erb b/app/views/homework_attach/_show.html.erb index 0a94afd59..f18ff8a2c 100644 --- a/app/views/homework_attach/_show.html.erb +++ b/app/views/homework_attach/_show.html.erb @@ -11,6 +11,14 @@ for (var i = num; i >= 0; i--) {$("#star0" + i).css("background-position","-24px 0px");} $("#stars_value").val(num); } + +// function ChoseZero() +// { +// if(confirm('是否确定评分为0分?')) +// { +// ChoseStars(0); +// } +// }
      diff --git a/app/views/homework_attach/_show_star.html.erb b/app/views/homework_attach/_show_star.html.erb index 80f9d7f54..739693938 100644 --- a/app/views/homework_attach/_show_star.html.erb +++ b/app/views/homework_attach/_show_star.html.erb @@ -1,3 +1,4 @@ +零分 diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb index 63c3051aa..16b9d2c7e 100644 --- a/app/views/homework_attach/edit.html.erb +++ b/app/views/homework_attach/edit.html.erb @@ -42,7 +42,7 @@
      • - 修改作业 + 修改作品
      • 成员 @@ -75,16 +75,32 @@ <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字" %>

        -

        -

        + -
        - <%= render :partial => 'attachments/form', :locals => {:container => @homework}%> + + + + +
        + <%= render :partial => 'attachments/form', :locals => {:container => @homework} %>
        -

        -

        + +

        - <%=link_to "#{column_content[4]}#{get_issue_typevalue(column_content[1])}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word" %> + <%=link_to "#{column_content[4]}#{get_issue_type(column_content[1])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>

        @@ -31,5 +31,5 @@

        <% end -%>
          - <%= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => false, :flag => true %> + <%= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => true, :flag => true %>
        \ No newline at end of file diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 5dc6d903c..ebbff0bfb 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -34,31 +34,31 @@ <%#= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%= hidden_field_tag 'set_filter', '1' %>
        - <%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给",0]), - { :include_blank => false,:selected=>0 + <%= select( :issue, :user_id, principals_options_for_isuue_list(@project), + { :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0 }, {:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"v[assigned_to_id]",:class=>"w90"} ) %> <%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@priority_id ? @priority_id : 0 }, {:onchange=>"remote_function();",:id=>"priority_id",:name=>"v[priority_id]",:class=>"w90"} ) %> <%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@status_id ? @status_id : 0 }, {:onchange=>"remote_function();",:id=>"status_id",:name=>"v[status_id]",:class=>"w90"} ) %> <%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@author_id ? @author_id : 0 }, {:onchange=>"remote_function();",:id=>"author_id",:name=>"v[author_id]",:class=>"w90"} ) @@ -66,8 +66,8 @@
        <%# end %> -

        <%= l(:label_issues_sum) %>:<%= @project.issues.count %> - <%= l(:lable_issues_undo) %>:<%= @project.issues.where('status_id in (1,2,4,6)').count %> +

        <%= l(:label_issues_sum) %>:<%= @project.issues.visible.all.count %> + <%= l(:lable_issues_undo) %>:<%= @project.issues.where('status_id in (1,2,4,6)').visible.all.count %>

        diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb index 34d2eb760..012d01c20 100644 --- a/app/views/issues/index.js.erb +++ b/app/views/issues/index.js.erb @@ -1 +1,3 @@ -$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>"); \ No newline at end of file +$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>"); +$("#v_subject").focus(); +$("#v_subject").blur(); \ No newline at end of file diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 62e6947a7..137e203ef 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -2,7 +2,6 @@

        <%= l(:label_issue_new) %>

      <%= call_hook(:view_issues_new_top, {:issue => @issue}) %> - <%= labelled_form_for @issue, :url => project_issues_path(@project), :html => {:id => 'issue-form', :multipart => true} do |f| %> <%= error_messages_for 'issue' %> @@ -16,7 +15,6 @@ <%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %> <% end %> -
      <% content_for :header_tags do %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 8fb63bd10..cff5aae06 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -14,7 +14,7 @@

      <%= @issue.subject %> - <%= get_issue_typevalue(@issue.tracker_id) %> + <%= get_issue_type(@issue.tracker_id)[1] %>


      @@ -46,59 +46,52 @@
      <%= issue_fields_rows do |rows| %> -
        - -
      • * 状态  : 

        - -

        <%= @issue.status.name %>

        -
      • -
        -
      • * 优先级  : 

        - <%= @issue.priority.name %> -
      • -
        +
          +
        •  状态  : 

          <%= @issue.status.name %>

          +
        • +
          <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
        •  指派给  : 

          - <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "-" %> -
        • +
        •  指派给  : 

          <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> +
        • <% end %> -
          - <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> -
        •  目标版本  : 

          - <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "-") %> -
        • +
          +
        +
          +
        •  优先级  : 

          <%= @issue.priority.name %> +
        • +
          + <% unless @issue.disabled_core_fields.include?('done_ratio') %> +
        •  % 完成  : 

          <%= @issue.done_ratio %>% +
        • <% end %> -
          -
        -
          - <% unless @issue.disabled_core_fields.include?('start_date') %> -
        •  开始日期  : 

          +
          +
        -

        <%= format_date(@issue.start_date) %>

        - <% end %> -
        - <% unless @issue.disabled_core_fields.include?('due_date') %> -
      •  计划完成日期  : 

        - <%= format_date(@issue.due_date) %> -
      • +
          + <% unless @issue.disabled_core_fields.include?('start_date') %> +
        •  开始  : 

          <%= format_date(@issue.start_date) %>

          +
        • <% end %> -
          +
          <% unless @issue.disabled_core_fields.include?('estimated_hours') %> - -
        •  预期时间  : 

          - <%= l_hours(@issue.estimated_hours) %> -
        • - +
        •  周期  : 

          <%= l_hours(@issue.estimated_hours) %> +
        • <% end %> -
          - <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
        •  % 完成  : 

          - <%= @issue.done_ratio %>% -
        • +
          +
        +
          + <% unless @issue.disabled_core_fields.include?('due_date') %> +
        •  计划完成  : 

          <%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %> +
        • <% end %> -
          -
        - <% end %> +
        + <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> +
      •  目标版本  : 

        <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %> +
      • + <% end %> +
        +
      + <% end %> <%#= render_custom_fields_rows(@issue) %> <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
      diff --git a/app/views/layouts/_base_development_group.html.erb b/app/views/layouts/_base_development_group.html.erb deleted file mode 100644 index 6550ed874..000000000 --- a/app/views/layouts/_base_development_group.html.erb +++ /dev/null @@ -1,52 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - - <% end %> - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %> - - <% end %> - - - - \ No newline at end of file diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 98a7bb160..d9bd5e376 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -169,6 +169,7 @@ function cookieget(n)
      <% get_memo %> + <% if @public_forum %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> @@ -176,6 +177,7 @@ function cookieget(n) <%= l(:label_submit)%> <% end %> + <% end %>
      <%= l(:label_technical_support) %>白   羽 diff --git a/app/views/layouts/_base_friend_group.html.erb b/app/views/layouts/_base_friend_group.html.erb deleted file mode 100644 index 16ccc09e5..000000000 --- a/app/views/layouts/_base_friend_group.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end %> \ No newline at end of file diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 9eaf7f6ed..7a25819ab 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -27,13 +27,13 @@ <% end %> <%= render :partial => 'layouts/user_project_list', :locals => {:hasCourse => hasCourse} %>
    • - <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%> + <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
  • <%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', - { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, + { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.host_user }, {:class => 'my-message'} if User.current.logged?%>
  • diff --git a/app/views/layouts/_base_research_team.html.erb b/app/views/layouts/_base_research_team.html.erb deleted file mode 100644 index 17bf65b15..000000000 --- a/app/views/layouts/_base_research_team.html.erb +++ /dev/null @@ -1,40 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - - <% end %> - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end%> \ No newline at end of file diff --git a/app/views/layouts/_bootstrap_base_header.html.erb b/app/views/layouts/_bootstrap_base_header.html.erb index a968ace94..b93d27f49 100644 --- a/app/views/layouts/_bootstrap_base_header.html.erb +++ b/app/views/layouts/_bootstrap_base_header.html.erb @@ -67,17 +67,17 @@ end <%=User.current%> diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb index 83352de9d..35d8f87ef 100644 --- a/app/views/layouts/_join_exit_project.html.erb +++ b/app/views/layouts/_join_exit_project.html.erb @@ -20,5 +20,4 @@ !Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %> <%= exit_project_link(@project) %> <% end %> -
    diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index 489612c9a..e4d2658b1 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -18,15 +18,15 @@ <% if User.current.logged? -%>
  • - <%= link_to "#{User.current.login}".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.user_domain}, :class => "uses_name"%> + <%= link_to "#{User.current.login}".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, :class => "uses_name"%>
  • diff --git a/app/views/layouts/_point_browser.html.erb b/app/views/layouts/_point_browser.html.erb index 9d19f0474..14b324fea 100644 --- a/app/views/layouts/_point_browser.html.erb +++ b/app/views/layouts/_point_browser.html.erb @@ -3,7 +3,6 @@ 升级浏览器 - "];Z(c)||(c=[c]);m(c,function(a,b){b&&e.push('')});d&&e.push("");e.push("");return e.join("\n")}function pa(a,b){if(a.hasVal()){if(b===i){var c=a.val();return c=c.replace(/(<(?:p|p\s[^>]*)>) *(<\/p>)/ig,"")}return a.val(b)}return a.html(b)}function qa(a){this.init(a)}function Ab(a){return new qa(a)}function Bb(a,b){var c=this.get(a);c&&!c.hasClass("ke-disabled")&&b(c)}function Da(a){this.init(a)}function Cb(a){return new Da(a)}function ra(a){this.init(a)}function $a(a){return new ra(a)}function sa(a){this.init(a)}function Db(a){return new sa(a)} +function ab(a){this.init(a)}function ta(a){this.init(a)}function Eb(a){return new ta(a)}function bb(a,b){var c=document.getElementsByTagName("head")[0]||(P?document.body:document.documentElement),d=document.createElement("script");c.appendChild(d);d.src=a;d.charset="utf-8";d.onload=d.onreadystatechange=function(){if(!this.readyState||this.readyState==="loaded")b&&b(),d.onload=d.onreadystatechange=null,c.removeChild(d)}}function Fb(a){var b=a.indexOf("?");return b>0?a.substr(0,b):a}function cb(a){for(var b= +document.getElementsByTagName("head")[0]||(P?document.body:document.documentElement),c=document.createElement("link"),d=Fb(ia(a,"absolute")),e=f('link[rel="stylesheet"]',b),g=0,h=e.length;gc))c=this.width});d.length>0&&d[0].title=="-";)d.shift();for(;d.length>0&&d[d.length-1].title=="-";)d.pop();var e=null;m(d,function(a){this.title=="-"&&e.title=="-"&&delete d[a];e=this});if(d.length>0){b.preventDefault();var g=f(a.edit.iframe).pos(),h=$a({x:g.x+b.clientX,y:g.y+b.clientY,width:c,css:{visibility:"hidden"},shadowMode:a.shadowMode});m(d,function(){this.title&& +h.addItem(this)});var g=G(h.doc),j=h.div.height();b.clientY+j>=g.clientHeight-100&&h.pos(h.x,t(h.y)-j);h.div.css("visibility","visible");a.menu=h}}}else b.preventDefault()})}function bc(){function a(a){for(a=f(a.commonAncestor());a;){if(a.type==1&&!a.isStyle())break;a=a.parent()}return a.name}var b=this,c=b.edit.doc,d=b.newlineTag;if(!(o&&d!=="br")&&(!Y||!(A<3&&d!=="p"))&&!(Pa&&A<9)){var e=u("h1,h2,h3,h4,h5,h6,pre,li"),g=u("p,h1,h2,h3,h4,h5,h6,pre,li,blockquote");f(c).keydown(function(f){if(!(f.which!= +13||f.shiftKey||f.ctrlKey||f.altKey)){b.cmd.selection();var j=a(b.cmd.range);j=="marquee"||j=="select"||(d==="br"&&!e[j]?(f.preventDefault(),b.insertHtml("
    "+(o&&A<9?"":"\u200b"))):g[j]||Q(c,"formatblock","

    "))}});f(c).keyup(function(e){if(!(e.which!=13||e.shiftKey||e.ctrlKey||e.altKey)&&d!="br")if(Y){var e=b.cmd.commonAncestor("p"),j=b.cmd.commonAncestor("a");j&&j.text()==""&&(j.remove(!0),b.cmd.range.selectNodeContents(e[0]).collapse(!0),b.cmd.select())}else if(b.cmd.selection(),e=a(b.cmd.range), +!(e=="marquee"||e=="select"))if(g[e]||Q(c,"formatblock","

    "),e=b.cmd.commonAncestor("div")){for(var j=f("

    "),k=e[0].firstChild;k;){var n=k.nextSibling;j.append(k);k=n}e.before(j);e.remove();b.cmd.range.selectNodeContents(j[0]);b.cmd.select()}})}}function cc(){var a=this,b=a.edit.doc;f(b).keydown(function(c){if(c.which==9)if(c.preventDefault(),a.afterTab)a.afterTab.call(a,c);else{var c=a.cmd,d=c.range;d.shrink();d.collapsed&&d.startContainer.nodeType==1&&(d.insertNode(f("@ ",b)[0]),c.select()); +a.insertHtml("    ")}})}function dc(){var a=this;f(a.edit.textarea[0],a.edit.win).focus(function(b){a.afterFocus&&a.afterFocus.call(a,b)}).blur(function(b){a.afterBlur&&a.afterBlur.call(a,b)})}function T(a){return B(a.replace(/]*id="?__kindeditor_bookmark_\w+_\d+__"?[^>]*><\/span>/ig,""))}function Fa(a){return a.replace(/]+class="?__kindeditor_paste__"?[^>]*>[\s\S]*?<\/div>/ig,"")}function Jb(a,b){if(a.length===0)a.push(b);else{var c=a[a.length-1];T(b.html)!==T(c.html)&& +a.push(b)}}function Kb(a,b){var c=this.edit,d=c.doc.body,e,g;if(a.length===0)return this;c.designMode?(e=this.cmd.range,g=e.createBookmark(!0),g.html=d.innerHTML):g={html:d.innerHTML};Jb(b,g);var h=a.pop();T(g.html)===T(h.html)&&a.length>0&&(h=a.pop());c.designMode?(c.html(h.html),h.start&&(e.moveToBookmark(h),this.select())):f(d).html(T(h.html));return this}function ua(a){function b(a,b){ua.prototype[a]===i&&(c[a]=b);c.options[a]=b}var c=this;c.options={};m(a,function(c){b(c,a[c])});m(f.options, +function(a,d){c[a]===i&&b(a,d)});var d=f(c.srcElement||"').css("width","100%");c.tabIndex=isNaN(parseInt(a.tabIndex,10))?c.srcElement.attr("tabindex"):parseInt(a.tabIndex,10);c.iframe.attr("tabindex",c.tabIndex);c.textarea.attr("tabindex",c.tabIndex);c.width&&c.setWidth(c.width);c.height&&c.setHeight(c.height);c.designMode?c.textarea.hide():c.iframe.hide(); +j&&c.iframe.bind("load",function(){c.iframe.unbind("load");o?b():setTimeout(b,0)});c.div.append(c.iframe);c.div.append(c.textarea);c.srcElement.hide();!j&&b()},setWidth:function(a){this.width=a=s(a);this.div.css("width",a);return this},setHeight:function(a){this.height=a=s(a);this.div.css("height",a);this.iframe.css("height",a);if(o&&A<8||P)a=s(t(a)-2);this.textarea.css("height",a);return this},remove:function(){var a=this.doc;f(a.body).unbind();f(a).unbind();f(this.win).unbind();this._mousedownHandler&& +f(document).unbind("mousedown",this._mousedownHandler);pa(this.srcElement,this.html());this.srcElement.show();a.write("");this.iframe.unbind();this.textarea.unbind();qa.parent.remove.call(this)},html:function(a,b){var c=this.doc;if(this.designMode){c=c.body;if(a===i)return a=b?""+c.parentNode.innerHTML+"":c.innerHTML,this.beforeGetHtml&&(a=this.beforeGetHtml(a)),Y&&a=="
    "&&(a=""),a;this.beforeSetHtml&&(a=this.beforeSetHtml(a));o&&A>=9&&(a=a.replace(/(<.*?checked=")checked(".*>)/ig, +"$1$2"));f(c).html(a);this.afterSetHtml&&this.afterSetHtml();return this}if(a===i)return this.textarea.val();this.textarea.val(a);return this},design:function(a){if(a===i?!this.designMode:a){if(!this.designMode)a=this.html(),this.designMode=!0,this.html(a),this.textarea.hide(),this.iframe.show()}else if(this.designMode)a=this.html(),this.designMode=!1,this.html(a),this.iframe.hide(),this.textarea.show();return this.focus()},focus:function(){this.designMode?this.win.focus():this.textarea[0].focus(); +return this},blur:function(){if(o){var a=f('',this.div);this.div.append(a);a[0].focus();a.remove()}else this.designMode?this.win.blur():this.textarea[0].blur();return this},afterChange:function(a){function b(b){setTimeout(function(){a(b)},1)}var c=this.doc,d=c.body;f(c).keyup(function(b){!b.ctrlKey&&!b.altKey&&db[b.which]&&a(b)});f(c).mouseup(a).contextmenu(a);f(this.win).blur(a);f(d).bind("paste",b);f(d).bind("cut", +b);return this}});f.EditClass=qa;f.edit=Ab;f.iframeDoc=Xa;E(Da,S,{init:function(a){function b(a){a=f(a);if(a.hasClass("ke-outline"))return a;if(a.hasClass("ke-toolbar-icon"))return a.parent()}function c(a,c){var d=b(a.target);if(d&&!d.hasClass("ke-disabled")&&!d.hasClass("ke-selected"))d[c]("ke-on")}var d=this;Da.parent.init.call(d,a);d.disableMode=l(a.disableMode,!1);d.noDisableItemMap=u(l(a.noDisableItems,[]));d._itemMap={};d.div.addClass("ke-toolbar").bind("contextmenu,mousedown,mousemove",function(a){a.preventDefault()}).attr("unselectable", +"on");d.div.mouseover(function(a){c(a,"addClass")}).mouseout(function(a){c(a,"removeClass")}).click(function(a){var c=b(a.target);c&&!c.hasClass("ke-disabled")&&d.options.click.call(this,a,c.attr("data-name"))})},get:function(a){if(this._itemMap[a])return this._itemMap[a];return this._itemMap[a]=f("span.ke-icon-"+a,this.div).parent()},select:function(a){Bb.call(this,a,function(a){a.addClass("ke-selected")});return self},unselect:function(a){Bb.call(this,a,function(a){a.removeClass("ke-selected").removeClass("ke-on")}); +return self},enable:function(a){if(a=a.get?a:this.get(a))a.removeClass("ke-disabled"),a.opacity(1);return this},disable:function(a){if(a=a.get?a:this.get(a))a.removeClass("ke-selected").addClass("ke-disabled"),a.opacity(0.5);return this},disableAll:function(a,b){var c=this,d=c.noDisableItemMap;b&&(d=u(b));(a===i?!c.disableMode:a)?(f("span.ke-outline",c.div).each(function(){var a=f(this),b=a[0].getAttribute("data-name",2);d[b]||c.disable(a)}),c.disableMode=!0):(f("span.ke-outline",c.div).each(function(){var a= +f(this),b=a[0].getAttribute("data-name",2);d[b]||c.enable(a)}),c.disableMode=!1);return c}});f.ToolbarClass=Da;f.toolbar=Cb;E(ra,S,{init:function(a){a.z=a.z||811213;ra.parent.init.call(this,a);this.centerLineMode=l(a.centerLineMode,!0);this.div.addClass("ke-menu").bind("click,mousedown",function(a){a.stopPropagation()}).attr("unselectable","on")},addItem:function(a){if(a.title==="-")this.div.append(f('
    '));else{var b=f('
    '), +c=f('
    '),d=f('
    '),e=s(a.height),g=l(a.iconClass,"");this.div.append(b);e&&(b.css("height",e),d.css("line-height",e));var h;this.centerLineMode&&(h=f('
    '),e&&h.css("height",e));b.mouseover(function(){f(this).addClass("ke-menu-item-on");h&&h.addClass("ke-menu-item-center-on")}).mouseout(function(){f(this).removeClass("ke-menu-item-on");h&&h.removeClass("ke-menu-item-center-on")}).click(function(b){a.click.call(f(this)); +b.stopPropagation()}).append(c);h&&b.append(h);b.append(d);a.checked&&(g="ke-icon-checked");g!==""&&c.html('');d.html(a.title);return this}},remove:function(){this.options.beforeRemove&&this.options.beforeRemove.call(this);f(".ke-menu-item",this.div[0]).unbind();ra.parent.remove.call(this);return this}});f.MenuClass=ra;f.menu=$a;E(sa,S,{init:function(a){a.z=a.z||811213;sa.parent.init.call(this,a);var b=a.colors||[["#E53333", +"#E56600","#FF9900","#64451D","#DFC5A4","#FFE500"],["#009900","#006600","#99BB00","#B8D100","#60D978","#00D5FF"],["#337FE5","#003399","#4C33E5","#9933E5","#CC33E5","#EE33EE"],["#FFFFFF","#CCCCCC","#999999","#666666","#333333","#000000"]];this.selectedColor=(a.selectedColor||"").toLowerCase();this._cells=[];this.div.addClass("ke-colorpicker").bind("click,mousedown",function(a){a.stopPropagation()}).attr("unselectable","on");a=this.doc.createElement("table");this.div.append(a);a.className="ke-colorpicker-table"; +a.cellPadding=0;a.cellSpacing=0;a.border=0;var c=a.insertRow(0),d=c.insertCell(0);d.colSpan=b[0].length;this._addAttr(d,"","ke-colorpicker-cell-top");for(var e=0;e
    ').css("background-color",b)):a.html(d.options.noColor);f(a).attr("unselectable","on");d._cells.push(a)},remove:function(){m(this._cells,function(){this.unbind()});sa.parent.remove.call(this);return this}});f.ColorPickerClass=sa;f.colorpicker=Db;E(ab,{init:function(a){var b=f(a.button),c=a.fieldName|| +"file",d=a.url||"",e=b.val(),g=a.extraParams||{},h=b[0].className||"",j=a.target||"kindeditor_upload_iframe_"+(new Date).getTime();a.afterError=a.afterError||function(a){alert(a)};var k=[],i;for(i in g)k.push('');c=['
    ',a.target?"":'',a.form?'
    ':'
    ','',k.join(""),'',"",'',a.form?"
    ":"","
    "].join("");c=f(c,b.doc);b.hide();b.before(c);this.div=c;this.button=b;this.iframe=a.target?f('iframe[name="'+j+'"]'):f("iframe",c);this.form=a.form?f(a.form):f("form",c);this.fileBox=f(".ke-upload-file",c);b=a.width||f(".ke-button-common",c).width(); +f(".ke-upload-area",c).width(b);this.options=a},submit:function(){var a=this,b=a.iframe;b.bind("load",function(){b.unbind();var c=document.createElement("form");a.fileBox.before(c);f(c).append(a.fileBox);c.reset();f(c).remove(!0);var c=f.iframeDoc(b),d=c.getElementsByTagName("pre")[0],e="",g,e=d?d.innerHTML:c.body.innerHTML,e=fa(e);b[0].src="javascript:false";try{g=f.json(e)}catch(h){a.options.afterError.call(a,""+c.body.parentNode.innerHTML+"")}g&&a.options.afterUpload.call(a, +g)});a.form[0].submit();return a},remove:function(){this.fileBox&&this.fileBox.unbind();this.iframe.remove();this.div.remove();this.button.show();return this}});f.UploadButtonClass=ab;f.uploadbutton=function(a){return new ab(a)};E(ta,S,{init:function(a){var b=l(a.shadowMode,!0);a.z=a.z||811213;a.shadowMode=!1;a.autoScroll=l(a.autoScroll,!0);ta.parent.init.call(this,a);var c=a.title,d=f(a.body,this.doc),e=a.previewBtn,g=a.yesBtn,h=a.noBtn,j=a.closeBtn,k=l(a.showMask,!0);this.div.addClass("ke-dialog").bind("click,mousedown", +function(a){a.stopPropagation()});var i=f('
    ').appendTo(this.div);o&&A<7?this.iframeMask=f('').appendTo(this.div):b&&f('
    ').appendTo(this.div);b=f('
    ');i.append(b);b.html(c);this.closeIcon=f('').click(j.click);b.append(this.closeIcon);this.draggable({clickEl:b,beforeDrag:a.beforeDrag}); +a=f('
    ');i.append(a);a.append(d);var q=f('');(e||g||h)&&i.append(q);m([{btn:e,name:"preview"},{btn:g,name:"yes"},{btn:h,name:"no"}],function(){if(this.btn){var a=this.btn,a=a||{},b=a.name||"",c=f(''),b=f('');a.click&&b.click(a.click);c.append(b);c.addClass("ke-dialog-"+this.name);q.append(c)}}); +this.height&&a.height(t(this.height)-b.height()-q.height());this.div.width(this.div.width());this.div.height(this.div.height());this.mask=null;if(k)d=G(this.doc),this.mask=Ya({x:0,y:0,z:this.z-1,cls:"ke-dialog-mask",width:Math.max(d.scrollWidth,d.clientWidth),height:Math.max(d.scrollHeight,d.clientHeight)});this.autoPos(this.div.width(),this.div.height());this.footerDiv=q;this.bodyDiv=a;this.headerDiv=b;this.isLoading=!1},setMaskIndex:function(a){this.mask.div.css("z-index",a)},showLoading:function(a){var a= +l(a,""),b=this.bodyDiv;this.loading=f('
    '+a+"
    ").width(b.width()).height(b.height()).css("top",this.headerDiv.height()+"px");b.css("visibility","hidden").after(this.loading);this.isLoading=!0;return this},hideLoading:function(){this.loading&&this.loading.remove();this.bodyDiv.css("visibility","visible");this.isLoading=!1;return this},remove:function(){this.options.beforeRemove&& +this.options.beforeRemove.call(this);this.mask&&this.mask.remove();this.iframeMask&&this.iframeMask.remove();this.closeIcon.unbind();f("input",this.div).unbind();f("button",this.div).unbind();this.footerDiv.unbind();this.bodyDiv.unbind();this.headerDiv.unbind();f("iframe",this.div).each(function(){f(this).remove()});ta.parent.remove.call(this);return this}});f.DialogClass=ta;f.dialog=Eb;f.tabs=function(a){var b=Ya(a),c=b.remove,d=a.afterSelect,a=b.div,e=[];a.addClass("ke-tabs").bind("contextmenu,mousedown,mousemove", +function(a){a.preventDefault()});var g=f('
      ');a.append(g);b.add=function(a){var b=f('
    • '+a.title+"
    • ");b.data("tab",a);e.push(b);g.append(b)};b.selectedIndex=0;b.select=function(a){b.selectedIndex=a;m(e,function(c,d){d.unbind();c===a?(d.addClass("ke-tabs-li-selected"),f(d.data("tab").panel).show("")):(d.removeClass("ke-tabs-li-selected").removeClass("ke-tabs-li-on").mouseover(function(){f(this).addClass("ke-tabs-li-on")}).mouseout(function(){f(this).removeClass("ke-tabs-li-on")}).click(function(){b.select(c)}), +f(d.data("tab").panel).hide())});d&&d.call(b,a)};b.remove=function(){m(e,function(){this.remove()});g.remove();c.call(b)};return b};f.loadScript=bb;f.loadStyle=cb;f.ajax=function(a,b,c,d,e){var c=c||"GET",e=e||"json",g=w.XMLHttpRequest?new w.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");g.open(c,a,!0);g.onreadystatechange=function(){if(g.readyState==4&&g.status==200&&b){var a=B(g.responseText);e=="json"&&(a=eb(a));b(a)}};if(c=="POST"){var f=[];m(d,function(a,b){f.push(encodeURIComponent(a)+ +"="+encodeURIComponent(b))});try{g.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(j){}g.send(f.join("&"))}else g.send(null)};var N={},O={};ua.prototype={lang:function(a){return Ib(a,this.langType)},loadPlugin:function(a,b){var c=this;if(N[a]){if(!wa(N[a]))return setTimeout(function(){c.loadPlugin(a,b)},100),c;N[a].call(c,KindEditor);b&&b.call(c);return c}N[a]="loading";bb(c.pluginsPath+a+"/"+a+".js?ver="+encodeURIComponent(f.DEBUG?Ga:Ha),function(){setTimeout(function(){N[a]&& +c.loadPlugin(a,b)},0)});return c},handler:function(a,b){var c=this;c._handlers[a]||(c._handlers[a]=[]);if(wa(b))return c._handlers[a].push(b),c;m(c._handlers[a],function(){b=this.call(c,b)});return b},clickToolbar:function(a,b){var c=this,d="clickToolbar"+a;if(b===i){if(c._handlers[d])return c.handler(d);c.loadPlugin(a,function(){c.handler(d)});return c}return c.handler(d,b)},updateState:function(){var a=this;m("justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,insertunorderedlist,subscript,superscript,bold,italic,underline,strikethrough".split(","), +function(b,c){a.cmd.state(c)?a.toolbar.select(c):a.toolbar.unselect(c)});return a},addContextmenu:function(a){this._contextmenus.push(a);return this},afterCreate:function(a){return this.handler("afterCreate",a)},beforeRemove:function(a){return this.handler("beforeRemove",a)},beforeGetHtml:function(a){return this.handler("beforeGetHtml",a)},beforeSetHtml:function(a){return this.handler("beforeSetHtml",a)},afterSetHtml:function(a){return this.handler("afterSetHtml",a)},create:function(){function a(){k.height()=== +0?setTimeout(a,100):b.resize(d,e,!1)}var b=this,c=b.fullscreenMode;if(b.isCreated)return b;if(b.srcElement.data("kindeditor"))return b;b.srcElement.data("kindeditor","true");c?G().style.overflow="hidden":G().style.overflow="";var d=c?G().clientWidth+"px":b.width,e=c?G().clientHeight+"px":b.height;if(o&&A<8||P)e=s(t(e)+2);var g=b.container=f(b.layout);c?f(document.body).append(g):b.srcElement.before(g);var h=f(".toolbar",g),j=f(".edit",g),k=b.statusbar=f(".statusbar",g);g.removeClass("container").addClass("ke-container ke-container-"+ +b.themeType).css("width",d);if(c){g.css({position:"absolute",left:0,top:0,"z-index":811211});if(!Y)b._scrollPos=ca();w.scrollTo(0,0);f(document.body).css({height:"1px",overflow:"hidden"});f(document.body.parentNode).css("overflow","hidden");b._fullscreenExecuted=!0}else b._fullscreenExecuted&&(f(document.body).css({height:"",overflow:""}),f(document.body.parentNode).css("overflow","")),b._scrollPos&&w.scrollTo(b._scrollPos.x,b._scrollPos.y);var i=[];f.each(b.items,function(a,c){c=="|"?i.push(''): +c=="/"?i.push('
      '):(i.push(''),i.push(''))});var h=b.toolbar=Cb({src:h,html:i.join(""),noDisableItems:b.noDisableItems,click:function(a,c){a.stop();if(b.menu){var d=b.menu.name;b.hideMenu();if(d===c)return}b.clickToolbar(c)}}),l=t(e)-h.div.height(),m=b.edit=Ab({height:l>0&&t(e)>b.minHeight?l:b.minHeight, +src:j,srcElement:b.srcElement,designMode:b.designMode,themesPath:b.themesPath,bodyClass:b.bodyClass,cssPath:b.cssPath,cssData:b.cssData,beforeGetHtml:function(a){a=b.beforeGetHtml(a);a=T(Fa(a));return U(a,b.filterMode?b.htmlTags:null,b.urlType,b.wellFormatMode,b.indentChar)},beforeSetHtml:function(a){a=U(a,b.filterMode?b.htmlTags:null,"",!1);return b.beforeSetHtml(a)},afterSetHtml:function(){b.edit=m=this;b.afterSetHtml()},afterCreate:function(){b.edit=m=this;b.cmd=m.cmd;b._docMousedownFn=function(){b.menu&& +b.hideMenu()};f(m.doc,document).mousedown(b._docMousedownFn);ac.call(b);bc.call(b);cc.call(b);dc.call(b);m.afterChange(function(){m.designMode&&(b.updateState(),b.addBookmark(),b.options.afterChange&&b.options.afterChange.call(b))});m.textarea.keyup(function(a){!a.ctrlKey&&!a.altKey&&Ob[a.which]&&b.options.afterChange&&b.options.afterChange.call(b)});b.readonlyMode&&b.readonly();b.isCreated=!0;if(b.initContent==="")b.initContent=b.html();if(b._undoStack.length>0){var a=b._undoStack.pop();a.start&& +(b.html(a.html),m.cmd.range.moveToBookmark(a),b.select())}b.afterCreate();b.options.afterCreate&&b.options.afterCreate.call(b)}});k.removeClass("statusbar").addClass("ke-statusbar").append('').append('');if(b._fullscreenResizeHandler)f(w).unbind("resize",b._fullscreenResizeHandler),b._fullscreenResizeHandler=null;a();c?(b._fullscreenResizeHandler=function(){b.isCreated&&b.resize(G().clientWidth, +G().clientHeight,!1)},f(w).bind("resize",b._fullscreenResizeHandler),h.select("fullscreen"),k.first().css("visibility","hidden"),k.last().css("visibility","hidden")):(Y&&f(w).bind("scroll",function(){b._scrollPos=ca()}),b.resizeType>0?Wa({moveEl:g,clickEl:k,moveFn:function(a,c,d,e,g,f){e+=f;b.resize(null,e)}}):k.first().css("visibility","hidden"),b.resizeType===2?Wa({moveEl:g,clickEl:k.last(),moveFn:function(a,c,d,e,g,f){d+=g;e+=f;b.resize(d,e)}}):k.last().css("visibility","hidden"));return b},remove:function(){var a= +this;if(!a.isCreated)return a;a.beforeRemove();a.srcElement.data("kindeditor","");a.menu&&a.hideMenu();m(a.dialogs,function(){a.hideDialog()});f(document).unbind("mousedown",a._docMousedownFn);a.toolbar.remove();a.edit.remove();a.statusbar.last().unbind();a.statusbar.unbind();a.container.remove();a.container=a.toolbar=a.edit=a.menu=null;a.dialogs=[];a.isCreated=!1;return a},resize:function(a,b,c){c=l(c,!0);if(a&&(/%/.test(a)||(a=t(a),a=a/ig,"").replace(/ /ig," ")):this.html(C(a))},isEmpty:function(){return B(this.text().replace(/\r\n|\n|\r/,""))===""},isDirty:function(){return B(this.initContent.replace(/\r\n|\n|\r|t/g,""))!==B(this.html().replace(/\r\n|\n|\r|t/g,""))},selectedHtml:function(){var a=this.isCreated?this.cmd.range.html():"";return a=T(Fa(a))},count:function(a){a=(a||"html").toLowerCase();if(a==="html")return this.html().length; +if(a==="text")return this.text().replace(/<(?:img|embed).*?>/ig,"K").replace(/\r\n|\n|\r/g,"").length;return 0},exec:function(a){var a=a.toLowerCase(),b=this.cmd,c=J(a,"selectall,copy,paste,print".split(","))<0;c&&this.addBookmark(!1);b[a].apply(b,Ja(arguments,1));c&&(this.updateState(),this.addBookmark(!1),this.options.afterChange&&this.options.afterChange.call(this));return this},insertHtml:function(a,b){if(!this.isCreated)return this;a=this.beforeSetHtml(a);this.exec("inserthtml",a,b);return this}, +appendHtml:function(a){this.html(this.html()+a);if(this.isCreated)a=this.cmd,a.range.selectNodeContents(a.doc.body).collapse(!1),a.select();return this},sync:function(){pa(this.srcElement,this.html());return this},focus:function(){this.isCreated?this.edit.focus():this.srcElement[0].focus();return this},blur:function(){this.isCreated?this.edit.blur():this.srcElement[0].blur();return this},addBookmark:function(a){var a=l(a,!0),b=this.edit,c=b.doc.body,d=Fa(c.innerHTML);if(a&&this._undoStack.length> +0&&Math.abs(d.length-T(this._undoStack[this._undoStack.length-1].html).length)0){var c=b.dialogs[b.dialogs.length-1];b.dialogs[0].setMaskIndex(c.z+2);a.z=c.z+3;a.showMask=!1}a=Eb(a);b.dialogs.push(a);return a},hideDialog:function(){this.dialogs.length>0&&this.dialogs.pop().remove();this.dialogs.length>0&&this.dialogs[0].setMaskIndex(this.dialogs[this.dialogs.length- +1].z-1);return this},errorDialog:function(a){var b=this.createDialog({width:750,title:this.lang("uploadError"),body:'
      '}),b=f("iframe",b.div),c=f.iframeDoc(b);c.open();c.write(a);c.close();f(c.body).css("background-color","#FFF");b[0].contentWindow.focus();return this}};_instances=[];f.remove=function(a){va(a,function(a){this.remove();_instances.splice(a,1)})};f.sync=function(a){va(a,function(){this.sync()})}; +f.html=function(a,b){va(a,function(){this.html(b)})};f.insertHtml=function(a,b){va(a,function(){this.insertHtml(b)})};f.appendHtml=function(a,b){va(a,function(){this.appendHtml(b)})};o&&A<7&&Q(document,"BackgroundImageCache",!0);f.EditorClass=ua;f.editor=function(a){return new ua(a)};f.create=Lb;f.instances=_instances;f.plugin=Gb;f.lang=Ib;Gb("core",function(a){var b=this,c={undo:"Z",redo:"Y",bold:"B",italic:"I",underline:"U",print:"P",selectall:"A"};b.afterSetHtml(function(){b.options.afterChange&& +b.options.afterChange.call(b)});b.afterCreate(function(){if(b.syncType=="form"){for(var c=a(b.srcElement),d=!1;c=c.parent();)if(c.name=="form"){d=!0;break}if(d){c.bind("submit",function(){b.sync();a(w).bind("unload",function(){b.edit.textarea.remove()})});var f=a('[type="reset"]',c);f.click(function(){b.html(b.initContent);b.cmd.selection()});b.beforeRemove(function(){c.unbind();f.unbind()})}}});b.clickToolbar("source",function(){b.edit.designMode?(b.toolbar.disableAll(!0),b.edit.design(!1),b.toolbar.select("source")): +(b.toolbar.disableAll(!1),b.edit.design(!0),b.toolbar.unselect("source"),Y?setTimeout(function(){b.cmd.selection()},0):b.cmd.selection());b.designMode=b.edit.designMode});b.afterCreate(function(){b.designMode||b.toolbar.disableAll(!0).select("source")});b.clickToolbar("fullscreen",function(){b.fullscreen()});if(b.fullscreenShortcut){var d=!1;b.afterCreate(function(){a(b.edit.doc,b.edit.textarea).keyup(function(a){a.which==27&&setTimeout(function(){b.fullscreen()},0)});if(d){if(o&&!b.designMode)return; +b.focus()}d||(d=!0)})}m("undo,redo".split(","),function(a,d){c[d]&&b.afterCreate(function(){Ka(this.edit.doc,c[d],function(){b.clickToolbar(d)})});b.clickToolbar(d,function(){b[d]()})});b.clickToolbar("formatblock",function(){var a=b.lang("formatblock.formatBlock"),c={h1:28,h2:24,h3:18,H4:14,p:12},d=b.cmd.val("formatblock"),f=b.createMenu({name:"formatblock",width:b.langType=="en"?200:150});m(a,function(a,e){var i="font-size:"+c[a]+"px;";a.charAt(0)==="h"&&(i+="font-weight:bold;");f.addItem({title:''+e+"",height:c[a]+12,checked:d===a||d===e,click:function(){b.select().exec("formatblock","<"+a+">").hideMenu()}})})});b.clickToolbar("fontname",function(){var a=b.cmd.val("fontname"),c=b.createMenu({name:"fontname",width:150});m(b.lang("fontname.fontName"),function(d,f){c.addItem({title:''+f+"",checked:a===d.toLowerCase()||a===f.toLowerCase(),click:function(){b.exec("fontname",d).hideMenu()}})})});b.clickToolbar("fontsize", +function(){var a=b.cmd.val("fontsize"),c=b.createMenu({name:"fontsize",width:150});m(b.fontSizeTable,function(d,f){c.addItem({title:''+f+"",height:t(f)+12,checked:a===f,click:function(){b.exec("fontsize",f).hideMenu()}})})});m("forecolor,hilitecolor".split(","),function(a,c){b.clickToolbar(c,function(){b.createMenu({name:c,selectedColor:b.cmd.val(c)||"default",colors:b.colorTable,click:function(a){b.exec(c,a).hideMenu()}})})});m("cut,copy,paste".split(","), +function(a,c){b.clickToolbar(c,function(){b.focus();try{b.exec(c,null)}catch(a){alert(b.lang(c+"Error"))}})});b.clickToolbar("about",function(){var a='
      KindEditor '+Ha+'
      Copyright © kindsoft.net All rights reserved.
      ';b.createDialog({name:"about",width:350,title:b.lang("about"),body:a})});b.plugin.getSelectedLink=function(){return b.cmd.commonAncestor("a")};b.plugin.getSelectedImage=function(){return Ea(b.edit.cmd.range, +function(a){return!/^ke-\w+$/i.test(a[0].className)})};b.plugin.getSelectedFlash=function(){return Ea(b.edit.cmd.range,function(a){return a[0].className=="ke-flash"})};b.plugin.getSelectedMedia=function(){return Ea(b.edit.cmd.range,function(a){return a[0].className=="ke-media"||a[0].className=="ke-rm"})};b.plugin.getSelectedAnchor=function(){return Ea(b.edit.cmd.range,function(a){return a[0].className=="ke-anchor"})};m("link,image,flash,media,anchor".split(","),function(a,c){var d=c.charAt(0).toUpperCase()+ +c.substr(1);m("edit,delete".split(","),function(a,e){b.addContextmenu({title:b.lang(e+d),click:function(){b.loadPlugin(c,function(){b.plugin[c][e]();b.hideMenu()})},cond:b.plugin["getSelected"+d],width:150,iconClass:e=="edit"?"ke-icon-"+c:i})});b.addContextmenu({title:"-"})});b.plugin.getSelectedTable=function(){return b.cmd.commonAncestor("table")};b.plugin.getSelectedRow=function(){return b.cmd.commonAncestor("tr")};b.plugin.getSelectedCell=function(){return b.cmd.commonAncestor("td")};m("prop,cellprop,colinsertleft,colinsertright,rowinsertabove,rowinsertbelow,rowmerge,colmerge,rowsplit,colsplit,coldelete,rowdelete,insert,delete".split(","), +function(a,c){var d=J(c,["prop","delete"])<0?b.plugin.getSelectedCell:b.plugin.getSelectedTable;b.addContextmenu({title:b.lang("table"+c),click:function(){b.loadPlugin("table",function(){b.plugin.table[c]();b.hideMenu()})},cond:d,width:170,iconClass:"ke-icon-table"+c})});b.addContextmenu({title:"-"});m("selectall,justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,insertunorderedlist,indent,outdent,subscript,superscript,hr,print,bold,italic,underline,strikethrough,removeformat,unlink".split(","), +function(a,d){c[d]&&b.afterCreate(function(){Ka(this.edit.doc,c[d],function(){b.cmd.selection();b.clickToolbar(d)})});b.clickToolbar(d,function(){b.focus().exec(d,null)})});b.afterCreate(function(){function c(){f.range.moveToBookmark(j);f.select();X&&(a("div."+l,i).each(function(){a(this).after("
      ").remove(!0)}),a("span.Apple-style-span",i).remove(!0),a("span.Apple-tab-span",i).remove(!0),a("span[style]",i).each(function(){a(this).css("white-space")=="nowrap"&&a(this).remove(!0)}),a("meta",i).remove()); +var d=i[0].innerHTML;i.remove();d!==""&&(X&&(d=d.replace(/(
      )\1/ig,"$1")),b.pasteType===2&&(d=d.replace(/(<(?:p|p\s[^>]*)>) *(<\/p>)/ig,""),/schemas-microsoft-com|worddocument|mso-\w+/i.test(d)?d=nb(d,b.filterMode?b.htmlTags:a.options.htmlTags):(d=U(d,b.filterMode?b.htmlTags:null),d=b.beforeSetHtml(d))),b.pasteType===1&&(d=d.replace(/ /ig," "),d=d.replace(/\n\s*\n/g,"\n"),d=d.replace(/]*>/ig,"\n"),d=d.replace(/<\/p>]*>/ig,"\n"),d=d.replace(/<[^>]+>/g,""),d=d.replace(/ {2}/g,"  "), +b.newlineTag=="p"?/\n/.test(d)&&(d=d.replace(/^/,"

      ").replace(/$/,"

      ").replace(/\n/g,"

      ")):d=d.replace(/\n/g,"
      $&")),b.insertHtml(d,!0))}var d=b.edit.doc,f,j,i,l="__kindeditor_paste__",m=!1;a(d.body).bind("paste",function(p){if(b.pasteType===0)p.stop();else if(!m){m=!0;a("div."+l,d).remove();f=b.cmd.selection();j=f.range.createBookmark();i=a('

      ',d).css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",left:"-1981px",top:a(j.start).pos().y+ +"px","white-space":"nowrap"});a(d.body).append(i);if(o){var s=f.range.get(!0);s.moveToElementText(i[0]);s.select();s.execCommand("paste");p.preventDefault()}else f.range.selectNodeContents(i[0]),f.select();setTimeout(function(){c();m=!1},0)}})});b.beforeGetHtml(function(a){o&&A<=8&&(a=a.replace(/]*data-ke-input-tag="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig,function(a,b){return unescape(b)}),a=a.replace(/(]*)?>)/ig,function(a,b,c){if(!/\s+type="[^"]+"/i.test(a))return b+' type="text"'+ +c;return a}));return a.replace(/(<(?:noscript|noscript\s[^>]*)>)([\s\S]*?)(<\/noscript>)/ig,function(a,b,c,d){return b+fa(c).replace(/\s+/g," ")+d}).replace(/]*class="?ke-(flash|rm|media)"?[^>]*>/ig,function(a){var a=I(a),b=ba(a.style||""),c=pb(a["data-ke-tag"]),d=l(b.width,""),b=l(b.height,"");/px/i.test(d)&&(d=t(d));/px/i.test(b)&&(b=t(b));c.width=l(a.width,d);c.height=l(a.height,b);return Ma(c)}).replace(/]*class="?ke-anchor"?[^>]*>/ig,function(a){a=I(a);return''}).replace(/]*data-ke-script-attr="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig,function(a,b,c){return""+unescape(c)+"<\/script>"}).replace(/]*data-ke-noscript-attr="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig,function(a,b,c){return""+unescape(c)+""}).replace(/(<[^>]*)data-ke-src="([^"]*)"([^>]*>)/ig,function(a,b,c){a=a.replace(/(\s+(?:href|src)=")[^"]*(")/i,function(a,b,d){return b+fa(c)+d});return a=a.replace(/\s+data-ke-src="[^"]*"/i, +"")}).replace(/(<[^>]+\s)data-ke-(on\w+="[^"]*"[^>]*>)/ig,function(a,b,c){return b+c})});b.beforeSetHtml(function(a){o&&A<=8&&(a=a.replace(/]*>|<(select|button)[^>]*>[\s\S]*?<\/\1>/ig,function(a){var b=I(a);if(ba(b.style||"").display=="none")return'
      ';return a}));return a.replace(/]*type="([^"]+)"[^>]*>(?:<\/embed>)?/ig,function(a){a=I(a);a.src=l(a.src,"");a.width=l(a.width,0);a.height=l(a.height,0);return qb(b.themesPath+ +"common/blank.gif",a)}).replace(/]*name="([^"]+)"[^>]*>(?:<\/a>)?/ig,function(a){var c=I(a);if(c.href!==i)return a;return''}).replace(/]*)>([\s\S]*?)<\/script>/ig,function(a,b,c){return'
      '+escape(c)+"
      "}).replace(/]*)>([\s\S]*?)<\/noscript>/ig,function(a,b,c){return'
      '+escape(c)+"
      "}).replace(/(<[^>]*)(href|src)="([^"]*)"([^>]*>)/ig,function(a,b,c,d,e){if(a.match(/\sdata-ke-src="[^"]*"/i))return a;return a=b+c+'="'+d+'" data-ke-src="'+C(d)+'"'+e}).replace(/(<[^>]+\s)(on\w+="[^"]*"[^>]*>)/ig,function(a,b,c){return b+"data-ke-"+c}).replace(/]*\s+border="0"[^>]*>/ig,function(a){if(a.indexOf("ke-zeroborder")>=0)return a;return Sb(a,"ke-zeroborder")})})})}})(window); diff --git a/public/assets/kindeditor/plugins/paste/paste.js b/public/assets/kindeditor/plugins/paste/paste.js new file mode 100644 index 000000000..f2d080dcf --- /dev/null +++ b/public/assets/kindeditor/plugins/paste/paste.js @@ -0,0 +1,379 @@ +// Generated by CoffeeScript 1.9.0 + +/* +paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks. +https://github.com/layerssss/paste.js + */ + +(function() { + var $, Paste, createHiddenEditable, dataURLtoBlob; + + $ = window.jQuery; + + $.paste = function(pasteContainer) { + var pm; + if (typeof console !== "undefined" && console !== null) { + console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead."); + } + pm = Paste.mountNonInputable(pasteContainer); + return pm._container; + }; + + $.fn.pastableNonInputable = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountNonInputable(el); + } + return this; + }; + + $.fn.pastableTextarea = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountTextarea(el); + } + return this; + }; + + $.fn.pastableContenteditable = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountContenteditable(el); + } + return this; + }; + + dataURLtoBlob = function(dataURL, sliceSize) { + var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, slice, _ref; + if (sliceSize == null) { + sliceSize = 512; + } + if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) { + return null; + } + _ref = m, m = _ref[0], contentType = _ref[1], b64Data = _ref[2]; + byteCharacters = atob(b64Data); + byteArrays = []; + offset = 0; + while (offset < byteCharacters.length) { + slice = byteCharacters.slice(offset, offset + sliceSize); + byteNumbers = new Array(slice.length); + i = 0; + while (i < slice.length) { + byteNumbers[i] = slice.charCodeAt(i); + i++; + } + byteArray = new Uint8Array(byteNumbers); + byteArrays.push(byteArray); + offset += sliceSize; + } + return new Blob(byteArrays, { + type: contentType + }); + }; + + createHiddenEditable = function() { + return $(document.createElement('div')).attr('contenteditable', true).css({ + width: 1, + height: 1, + position: 'fixed', + left: -100, + overflow: 'hidden' + }); + }; + + Paste = (function() { + Paste.prototype._target = null; + + Paste.prototype._container = null; + + Paste.mountNonInputable = function(nonInputable) { + var paste; + paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable); + $(nonInputable).on('click', (function(_this) { + return function() { + return paste._container.focus(); + }; + })(this)); + paste._container.on('focus', (function(_this) { + return function() { + return $(nonInputable).addClass('pastable-focus'); + }; + })(this)); + return paste._container.on('blur', (function(_this) { + return function() { + return $(nonInputable).removeClass('pastable-focus'); + }; + })(this)); + }; + + Paste.mountTextarea = function(textarea) { + var ctlDown, paste; + if (-1 !== navigator.userAgent.toLowerCase().indexOf('chrome')) { + return this.mountContenteditable(textarea); + } + paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea); + ctlDown = false; + $(textarea).on('keyup', function(ev) { + var _ref; + if ((_ref = ev.keyCode) === 17 || _ref === 224) { + return ctlDown = false; + } + }); + $(textarea).on('keydown', function(ev) { + var _ref; + if ((_ref = ev.keyCode) === 17 || _ref === 224) { + ctlDown = true; + } + if (ctlDown && ev.keyCode === 86) { + return paste._container.focus(); + } + }); + $(paste._target).on('pasteImage', (function(_this) { + return function() { + return $(textarea).focus(); + }; + })(this)); + $(paste._target).on('pasteText', (function(_this) { + return function() { + return $(textarea).focus(); + }; + })(this)); + $(textarea).on('focus', (function(_this) { + return function() { + return $(textarea).addClass('pastable-focus'); + }; + })(this)); + return $(textarea).on('blur', (function(_this) { + return function() { + return $(textarea).removeClass('pastable-focus'); + }; + })(this)); + }; + + Paste.mountContenteditable = function(contenteditable) { + var paste; + paste = new Paste(contenteditable, contenteditable); + $(contenteditable).on('focus', (function(_this) { + return function() { + return $(contenteditable).addClass('pastable-focus'); + }; + })(this)); + return $(contenteditable).on('blur', (function(_this) { + return function() { + return $(contenteditable).removeClass('pastable-focus'); + }; + })(this)); + }; + + function Paste(_at__container, _at__target) { + this._container = _at__container; + this._target = _at__target; + this._container = $(this._container); + this._target = $(this._target).addClass('pastable'); + this._container.on('paste', (function(_this) { + return function(ev) { + var clipboardData, file, item, reader, text, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _results; + if (((_ref = ev.originalEvent) != null ? _ref.clipboardData : void 0) != null) { + clipboardData = ev.originalEvent.clipboardData; + if (clipboardData.items) { + _ref1 = clipboardData.items; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + item = _ref1[_i]; + if (item.type.match(/^image\//)) { + reader = new FileReader(); + reader.onload = function(event) { + return _this._handleImage(event.target.result); + }; + reader.readAsDataURL(item.getAsFile()); + } + if (item.type === 'text/plain') { + item.getAsString(function(string) { + return _this._target.trigger('pasteText', { + text: string + }); + }); + } + } + } else { + if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) { + text = clipboardData.getData('Text'); + _this._target.trigger('pasteText', { + text: text + }); + } + _this._checkImagesInContainer(function(src) { + return _this._handleImage(src); + }); + } + } + if (clipboardData = window.clipboardData) { + if ((_ref2 = (text = clipboardData.getData('Text'))) != null ? _ref2.length : void 0) { + return _this._target.trigger('pasteText', { + text: text + }); + } else { + _ref3 = clipboardData.files; + _results = []; + for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { + file = _ref3[_j]; + _this._handleImage(URL.createObjectURL(file)); + _results.push(_this._checkImagesInContainer(function() {})); + } + return _results; + } + } + }; + })(this)); + } + + Paste.prototype._handleImage = function(src) { + var loader; + loader = new Image(); + loader.onload = (function(_this) { + return function() { + var blob, canvas, ctx, dataURL; + canvas = document.createElement('canvas'); + canvas.width = loader.width; + canvas.height = loader.height; + ctx = canvas.getContext('2d'); + ctx.drawImage(loader, 0, 0, canvas.width, canvas.height); + dataURL = null; + try { + dataURL = canvas.toDataURL('image/png'); + blob = dataURLtoBlob(dataURL); + } catch (_error) {} + if (dataURL) { + return _this._target.trigger('pasteImage', { + blob: blob, + dataURL: dataURL, + width: loader.width, + height: loader.height + }); + } + }; + })(this); + return loader.src = src; + }; + + Paste.prototype._checkImagesInContainer = function(cb) { + var img, timespan, _i, _len, _ref; + timespan = Math.floor(1000 * Math.random()); + _ref = this._container.find('img'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + img = _ref[_i]; + img["_paste_marked_" + timespan] = true; + } + return setTimeout((function(_this) { + return function() { + var _j, _len1, _ref1, _results; + _ref1 = _this._container.find('img'); + _results = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + img = _ref1[_j]; + if (!img["_paste_marked_" + timespan]) { + cb(img.src); + } + _results.push($(img).remove()); + } + return _results; + }; + })(this), 1); + }; + + return Paste; + + })(); + +}).call(this); + +KindEditor.plugin('paste', function(K) { + var editor = this, + name = 'paste'; + var contentWindow = document.getElementsByTagName('iframe')[0].contentWindow; + var nodeBody = contentWindow.document.getElementsByTagName('body')[0]; + console.log(nodeBody); + $(nodeBody).pastableContenteditable(); + + dataURItoBlob = function(dataURI) { + // convert base64/URLEncoded data component to raw binary data held in a string + var byteString; + if (dataURI.split(',')[0].indexOf('base64') >= 0) + byteString = atob(dataURI.split(',')[1]); + else + byteString = unescape(dataURI.split(',')[1]); + + // separate out the mime component + var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; + + // write the bytes of the string to a typed array + var ia = new Uint8Array(byteString.length); + for (var i = 0; i < byteString.length; i++) { + ia[i] = byteString.charCodeAt(i); + } + + return new Blob([ia], {type:mimeString}); + }; + + $(nodeBody).on('pasteImage', function(ev, data) { + console.log('pasteImage'); + console.log("dataURL: " + data.dataURL); + console.log("width: " + data.width); + console.log("height: " + data.height); + console.log(data.blob); + var blob = dataURItoBlob(data.dataURL); + if (data.blob !== null) { + var data = new FormData(); + data.append("imgFile",blob, "imageFilename.png"); + console.log(data); + $.ajax({ + url: '/kindeditor/upload?dir=image', + contentType: false, + type: 'POST', + data: data, + processData: false, + success: function(data) { + editor.exec('insertimage', JSON.parse(data).url); + } + }); + } + + }); + return; + contentWindow.document.getElementsByTagName('body')[0].onpaste = function(event) { + // use event.originalEvent.clipboard for newer chrome versions + var items = (event.clipboardData || event.originalEvent.clipboardData).items; + console.log(JSON.stringify(items)); // will give you the mime types + // find pasted image among pasted items + var blob = null; + for (var i = 0; i < items.length; i++) { + if (items[i].type.indexOf("image") === 0) { + blob = items[i].getAsFile(); + } + } + // load image if there is a pasted image + if (blob !== null) { + var reader = new FileReader(); + reader.onload = function(event) { + console.log(event.target.result); // data url! + var data = new FormData(); + data.append("imgFile", blob, "imageFilename.png"); + console.log(blob); + $.ajax({ + url: '/kindeditor/upload?dir=image', + contentType: false, + type: 'POST', + data: data, + processData: false, + success: function(data) { + editor.exec('insertimage', JSON.parse(data).url); + } + }); + }; + reader.readAsDataURL(blob); + } + } +}); diff --git a/public/images/course/to_top.png b/public/images/course/to_top.png new file mode 100644 index 000000000..1621b3510 Binary files /dev/null and b/public/images/course/to_top.png differ diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 4e5b5591e..828be910d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1,914 +1,921 @@ -//= require_directory ./rateable -//= require jquery.min -//= require jquery.infinitescroll - -/* Redmine - project management software - Copyright (C) 2006-2013 Jean-Philippe Lang */ - -function cleanArray (actual){ - var newArray = new Array(); - for (var i = 0; i< actual.length; i++){ - if (actual[i]){ - newArray.push(actual[i]); - } - } - return newArray; -} - -function checkAll(id, checked) { - if (checked) { - $('#'+id).find('input[type=checkbox]').attr('checked', true); - } else { - $('#'+id).find('input[type=checkbox]').removeAttr('checked'); - } -} - -function toggleCheckboxesBySelector(selector) { - var all_checked = true; - $(selector).each(function(index) { - if (!$(this).is(':checked')) { all_checked = false; } - }); - $(selector).attr('checked', !all_checked); -} - -function showAndScrollTo(id, focus) { - $('#'+id).show(); - if (focus !== null) { - $('#'+focus).focus(); - } - $('html, body').animate({scrollTop: $('#'+id).offset().top}, 400); -} - -function toggleRowGroup(el) { - var tr = $(el).parents('tr').first(); - var n = tr.next(); - tr.toggleClass('open'); - while (n.length && !n.hasClass('group')) { - n.toggle(); - n = n.next('tr'); - } -} - -function collapseAllRowGroups(el) { - var tbody = $(el).parents('tbody').first(); - tbody.children('tr').each(function(index) { - if ($(this).hasClass('group')) { - $(this).removeClass('open'); - } else { - $(this).hide(); - } - }); -} - -function expandAllRowGroups(el) { - var tbody = $(el).parents('tbody').first(); - tbody.children('tr').each(function(index) { - if ($(this).hasClass('group')) { - $(this).addClass('open'); - } else { - $(this).show(); - } - }); -} - -function toggleAllRowGroups(el) { - var tr = $(el).parents('tr').first(); - if (tr.hasClass('open')) { - collapseAllRowGroups(el); - } else { - expandAllRowGroups(el); - } -} - -function toggleFieldset(el) { - var fieldset = $(el).parents('fieldset').first(); - fieldset.toggleClass('collapsed'); - fieldset.children('div').toggle(); -} - -function hideFieldset(el) { - var fieldset = $(el).parents('fieldset').first(); - fieldset.toggleClass('collapsed'); - fieldset.children('div').hide(); -} - -function initFilters(){ - $('#add_filter_select').change(function(){ - addFilter($(this).val(), '', []); - }); - $('#filters-table td.field input[type=checkbox]').each(function(){ - toggleFilter($(this).val()); - }); - $('#filters-table td.field input[type=checkbox]').live('click',function(){ - toggleFilter($(this).val()); - }); - $('#filters-table .toggle-multiselect').live('click',function(){ - toggleMultiSelect($(this).siblings('select')); - }); - $('#filters-table input[type=text]').live('keypress', function(e){ - if (e.keyCode == 13) submit_query_form("query_form"); - }); -} - -function addFilter(field, operator, values) { - var fieldId = field.replace('.', '_'); - var tr = $('#tr_'+fieldId); - if (tr.length > 0) { - tr.show(); - } else { - buildFilterRow(field, operator, values); - } - $('#cb_'+fieldId).attr('checked', true); - toggleFilter(field); - $('#add_filter_select').val('').children('option').each(function(){ - if ($(this).attr('value') == field) { - $(this).attr('disabled', true); - } - }); -} - -function buildFilterRow(field, operator, values) { - var fieldId = field.replace('.', '_'); - var filterTable = $("#filters-table"); - var filterOptions = availableFilters[field]; - var operators = operatorByType[filterOptions['type']]; - var filterValues = filterOptions['values']; - var i, select; - - var tr = $('').attr('id', 'tr_'+fieldId).html( - '' + - '' + - ' 复选/multi-select' - ); - select = tr.find('td.values select'); - if (values.length > 1) { select.attr('multiple', true); } - for (i=0;i'); - if ($.isArray(filterValue)) { - option.val(filterValue[1]).text(filterValue[0]); - if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);} - } else { - option.val(filterValue).text(filterValue); - if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);} - } - select.append(option); - } - break; - case "date": - case "date_past": - tr.find('td.values').append( - '' + - ' ' + - ' '+labelDayPlural+'' - ); - $('#values_'+fieldId+'_1').val(values[0]).datepicker(datepickerOptions); - $('#values_'+fieldId+'_2').val(values[1]).datepicker(datepickerOptions); - $('#values_'+fieldId).val(values[0]); - break; - case "string": - case "text": - tr.find('td.values').append( - '' - ); - $('#values_'+fieldId).val(values[0]); - break; - case "relation": - tr.find('td.values').append( - '' + - '' - ); - $('#values_'+fieldId).val(values[0]); - select = tr.find('td.values select'); - for (i=0;i'); - option.val(filterValue[1]).text(filterValue[0]); - if (values[0] == filterValue[1]) { option.attr('selected', true); } - select.append(option); - } - case "integer": - case "float": - tr.find('td.values').append( - '' + - ' ' - ); - $('#values_'+fieldId+'_1').val(values[0]); - $('#values_'+fieldId+'_2').val(values[1]); - break; - } -} - -function toggleFilter(field) { - var fieldId = field.replace('.', '_'); - if ($('#cb_' + fieldId).is(':checked')) { - $("#operators_" + fieldId).show().removeAttr('disabled'); - toggleOperator(field); - } else { - $("#operators_" + fieldId).hide().attr('disabled', true); - enableValues(field, []); - } -} - -function enableValues(field, indexes) { - var fieldId = field.replace('.', '_'); - $('#tr_'+fieldId+' td.values .value').each(function(index) { - if ($.inArray(index, indexes) >= 0) { - $(this).removeAttr('disabled'); - $(this).parents('span').first().show(); - } else { - $(this).val(''); - $(this).attr('disabled', true); - $(this).parents('span').first().hide(); - } - - if ($(this).hasClass('group')) { - $(this).addClass('open'); - } else { - $(this).show(); - } - }); -} - -function toggleOperator(field) { - var fieldId = field.replace('.', '_'); - var operator = $("#operators_" + fieldId); - switch (operator.val()) { - case "!*": - case "*": - case "t": - case "ld": - case "w": - case "lw": - case "l2w": - case "m": - case "lm": - case "y": - case "o": - case "c": - enableValues(field, []); - break; - case "><": - enableValues(field, [0,1]); - break; - case "t+": - case ">t-": - case "0) { - lis.eq(i-1).show(); - } -} - -function displayTabsButtons() { - var lis; - var tabsWidth = 0; - var el; - $('div.tabs').each(function() { - el = $(this); - lis = el.find('ul').children(); - lis.each(function(){ - if ($(this).is(':visible')) { - tabsWidth += $(this).width() + 6; - } - }); - if ((tabsWidth < el.width() - 60) && (lis.first().is(':visible'))) { - el.find('div.tabs-buttons').hide(); - } else { - el.find('div.tabs-buttons').show(); - } - }); -} - -function setPredecessorFieldsVisibility() { - var relationType = $('#relation_relation_type'); - if (relationType.val() == "precedes" || relationType.val() == "follows") { - $('#predecessor_fields').show(); - } else { - $('#predecessor_fields').hide(); - } -} - -function showModal(id, width) { - var el = $('#'+id).first(); - if (el.length === 0 || el.is(':visible')) {return;} - var title = el.find('h3.title').text(); - el.dialog({ - width: width, - modal: true, - resizable: false, - dialogClass: 'modal', - title: title - }); - el.find("input[type=text], input[type=submit]").first().focus(); -} - -function hideModal(el) { - var modal; - if (el) { - modal = $(el).parents('.ui-dialog-content'); - } else { - modal = $('#ajax-modal'); - } - modal.dialog("close"); -} - -function submitPreview(url, form, target) { - $.ajax({ - url: url, - type: 'post', - data: $('#'+form).serialize(), - success: function(data){ - $('#'+target).html(data); - } - }); -} - -function collapseScmEntry(id) { - $('.'+id).each(function() { - if ($(this).hasClass('open')) { - collapseScmEntry($(this).attr('id')); - } - $(this).hide(); - }); - $('#'+id).removeClass('open'); -} - -function expandScmEntry(id) { - $('.'+id).each(function() { - $(this).show(); - if ($(this).hasClass('loaded') && !$(this).hasClass('collapsed')) { - expandScmEntry($(this).attr('id')); - } - }); - $('#'+id).addClass('open'); -} - -function scmEntryClick(id, url) { - el = $('#'+id); - if (el.hasClass('open')) { - collapseScmEntry(id); - el.addClass('collapsed'); - return false; - } else if (el.hasClass('loaded')) { - expandScmEntry(id); - el.removeClass('collapsed'); - return false; - } - if (el.hasClass('loading')) { - return false; - } - el.addClass('loading'); - $.ajax({ - url: url, - success: function(data){ - el.after(data); - el.addClass('open').addClass('loaded').removeClass('loading'); - } - }); - return true; -} - -function randomKey(size) { - var chars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); - var key = ''; - for (i = 0; i < size; i++) { - key += chars[Math.floor(Math.random() * chars.length)]; - } - return key; -} - -// Can't use Rails' remote select because we need the form data -function updateIssueFrom(url) { - $.ajax({ - url: url, - type: 'post', - data: $('#issue-form').serialize() - }); -} - -function updateBulkEditFrom(url) { - $.ajax({ - url: url, - type: 'post', - data: $('#bulk_edit_form').serialize() - }); -} - -function clearMessage(id) { - $('#'+id).val(""); -} - - -function observeAutocompleteField(fieldId, url, options) { - $(document).ready(function() { - $('#'+fieldId).autocomplete($.extend({ - source: url, - select: function(e,ui){self.location="/issues/"+ui.item.value;}, - minLength: 1, - search: function(){$('#'+fieldId).addClass('ajax-loading');}, - response: function(){$('#'+fieldId).removeClass('ajax-loading'); - } - }, options)); - $('#'+fieldId).addClass('autocomplete'); - - }); - -} - -function observeSearchfield(fieldId, targetId, url) { - $('#'+fieldId).each(function() { - var $this = $(this); - $this.addClass('autocomplete'); - $this.attr('data-value-was', $this.val()); - var check = function() { - var val = $this.val(); - if ($this.attr('data-value-was') != val){ - $this.attr('data-value-was', val); - $.ajax({ - url: url, - type: 'get', - data: {q: $this.val()}, - success: function(data){ if(targetId) $('#'+targetId).html(data); }, - beforeSend: function(){ $this.addClass('ajax-loading'); }, - complete: function(){ $this.removeClass('ajax-loading'); } - }); - } - }; - var reset = function() { - if (timer) { - clearInterval(timer); - timer = setInterval(check, 300); - } - }; - var timer = setInterval(check, 300); - $this.bind('keyup click mousemove', reset); - }); -} - -function observeProjectModules() { - var f = function() { - /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ - if ($('#project_enabled_module_names_issue_tracking').attr('checked')) { - $('#project_trackers').show(); - }else{ - $('#project_trackers').hide(); - } - }; - - $(window).load(f); - $('#project_enabled_module_names_issue_tracking').change(f); -} - -function initMyPageSortable(list, url) { - $('#list-'+list).sortable({ - connectWith: '.block-receiver', - tolerance: 'pointer', - update: function(){ - $.ajax({ - url: url, - type: 'post', - data: {'blocks': $.map($('#list-'+list).children(), function(el){return $(el).attr('id');})} - }); - } - }); - $("#list-top, #list-left, #list-right").disableSelection(); -} - -var warnLeavingUnsavedMessage; -function warnLeavingUnsaved(message) { - warnLeavingUnsavedMessage = message; - - $('form').submit(function(){ - $('textarea').removeData('changed'); - }); - $('textarea').change(function(){ - $(this).data('changed', 'changed'); - }); - window.onbeforeunload = function(){ - var warn = false; - $('textarea').blur().each(function(){ - if ($(this).data('changed')) { - warn = true; - } - }); - if (warn) {return warnLeavingUnsavedMessage;} - }; -} - -function setupAjaxIndicator() { - - $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { - - if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { - $('#ajax-indicator').show(); - } - }); - - $('#ajax-indicator').bind('ajaxStop', function() { - $('#ajax-indicator').hide(); - }); -} - -function hideOnLoad() { - $('.hol').hide(); -} - -function addFormObserversForDoubleSubmit() { - $('form[method=post]').each(function() { - if (!$(this).hasClass('multiple-submit')) { - $(this).submit(function(form_submission) { - if ($(form_submission.target).attr('data-submitted')) { - form_submission.preventDefault(); - } else { - $(form_submission.target).attr('data-submitted', true); - } - }); - } - }); -} - -function blockEventPropagation(event) { - event.stopPropagation(); - event.preventDefault(); -} - -function toggleAndSettingWordsVal(parent_widget, text_widget, value){ - text_widget.val(value) - parent_widget.slideToggle(400) -} -function transpotUrl (scope) { - $(scope).each(function(){ - var tmpContent = $(this).html(); - tmpContent = tmpContent.replace(/(^|[^\"\'])(http|ftp|mms|rstp|news|https)(\:\/\/[^<\s\+,,]+)/gi,"$1$2$3<\/a>"); - // tmpContent = tmpContent.replace(/(^|[^\/])(www\.[^<\s\+,,]+)/gi,"$1$2"); - $(this).html(tmpContent); - }); -} - -$(document).ready(setupAjaxIndicator); -$(document).ready(hideOnLoad); -$(document).ready(addFormObserversForDoubleSubmit); - -function img_thumbnails() { - $('.thumbnails a').colorbox({rel:'nofollow'}); - $('.attachments').find('a').each(function(index, element) { - var href_value = $(element).attr('href'); - if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) { - $(element).colorbox({rel:'nofollow'}); - } - }); - $('.for_img_thumbnails').find('a').each(function(index, element) { - var href_value = $(element).attr('href'); - if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) { - $(element).colorbox({rel:'nofollow'}); - } - }); -} -$(document).ready(img_thumbnails); - -function TimeClose(dateText, inst) { - if(inst.id=="issue_start_date"){ - time=dateText; - } -} -var time=new Date(); -function TimeBeforeShow(input){ - if(input.id=="issue_due_date"){ - //var minDate = $(input).datepicker('option', 'minDate'); - var tempdata=$("#issue_start_date").attr("value"); - - $(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/"))); - //$('.selector').datepicker('option', 'minDate', '12/25/2012'); - } -} - -function SetMinValue(){ - /// var tempdata=$("#issue_start_date").attr("value"); - //$('.selector').datepicker('option', 'minDate', '12/25/2012'); - //alert(tempdata); - //$("#issue_due_date").datepicker({ - // minDate: new Date(2014,08,23) - //var datepickerOptions= - //{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; - //alert( $('.issue_due_date').length); - //$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23)); - //$("#issue_due_date").datepicker(datepickerOptions); - //$("##{issue_due_date}").datepicker(datepickerOptions); - //$("#issue_due_date").datepicker( - // {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true} - //) - //}); -} -function PrecentChange(obj){ - var _v= obj; - if(_v==100) - { - //var select=$("select[id='issue_status_id']"); - $("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); - } - else if(_v==0) - { - //alert(1); - $("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); - } - else if(_v!=100&&_v!=0) - { - // alert(2); - $("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); - } -} - -//added by lizanle 日期選擇js -function HS_DateAdd(interval,number,date){ - number = parseInt(number); - if (typeof(date)=="string"){var date = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2])} - if (typeof(date)=="object"){var date = date} - switch(interval){ - case "y":return new Date(date.getFullYear()+number,date.getMonth(),date.getDate()); break; - case "m":return new Date(date.getFullYear(),date.getMonth()+number,checkDate(date.getFullYear(),date.getMonth()+number,date.getDate())); break; - case "d":return new Date(date.getFullYear(),date.getMonth(),date.getDate()+number); break; - case "w":return new Date(date.getFullYear(),date.getMonth(),7*number+date.getDate()); break; - } -} -function checkDate(year,month,date){ - var enddate = ["31","28","31","30","31","30","31","31","30","31","30","31"]; - var returnDate = ""; - if (year%4==0){enddate[1]="29"} - if (date>enddate[month]){returnDate = enddate[month]}else{returnDate = date} - return returnDate; -} - -function WeekDay(date){ - var theDate; - if (typeof(date)=="string"){theDate = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2]);} - if (typeof(date)=="object"){theDate = date} - return theDate.getDay(); -} -function HS_calender(){ - var lis = ""; - var style = ""; - /*可以把下面的css剪切出去独立一个css文件*/ - style +=""; - - var now; - if (typeof(arguments[0])=="string"){ - selectDate = arguments[0].split("-"); - var year = selectDate[0]; - var month = parseInt(selectDate[1])-1+""; - var date = selectDate[2]; - now = new Date(year,month,date); - }else if (typeof(arguments[0])=="object"){ - now = arguments[0]; - } - var lastMonthEndDate = HS_DateAdd("d","-1",now.getFullYear()+"-"+now.getMonth()+"-01").getDate(); - var lastMonthDate = WeekDay(now.getFullYear()+"-"+now.getMonth()+"-01"); - var thisMonthLastDate = HS_DateAdd("d","-1",now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString()+"-01"); - var thisMonthEndDate = thisMonthLastDate.getDate(); - var thisMonthEndDay = thisMonthLastDate.getDay(); - var todayObj = new Date(); - today = todayObj.getFullYear()+"-"+todayObj.getMonth()+"-"+todayObj.getDate(); - - for (i=0; i" + lis; - lastMonthEndDate--; - } - for (i=1; i<=thisMonthEndDate; i++){ // Current Month's Date - - if(today == now.getFullYear()+"-"+now.getMonth()+"-"+i){ - var todayString = now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString()+"-"+i; - lis += "
    • "+i+"
    • "; - }else{ - lis += "
    • "+i+"
    • "; - } - - } - var j=1; - for (i=thisMonthEndDay; i<6; i++){ // Next Month's Date - lis += "
    • "+j+"
    • "; - j++; - } - lis += style; - - var CalenderTitle = "»"; - CalenderTitle += "«"; - CalenderTitle += ""+now.getFullYear()+""+(parseInt(now.getMonth())+1).toString()+"月"; - - if (arguments.length>1){ - arguments[1].parentNode.parentNode.getElementsByTagName("ul")[1].innerHTML = lis; - arguments[1].parentNode.innerHTML = CalenderTitle; - - }else{ - var CalenderBox = style+"
      "+CalenderTitle+"
        "+lis+"
      "; - return CalenderBox; - } -} -function _selectThisDay(d){ - var boxObj = d.parentNode.parentNode.parentNode.parentNode.parentNode; - boxObj.targetObj.value = d.title; - boxObj.parentNode.removeChild(boxObj); -} -function closeCalender(d){ - var boxObj = d.parentNode.parentNode.parentNode; - boxObj.parentNode.removeChild(boxObj); -} - -function CalenderselectYear(obj){ - var opt = ""; - var thisYear = obj.innerHTML; - for (i=1970; i<=2020; i++){ - if (i==thisYear){ - opt += ""; - }else{ - opt += ""; - } - } - opt = ""; - obj.parentNode.innerHTML = opt; -} - -function selectThisYear(obj){ - HS_calender(obj.value+"-"+obj.parentNode.parentNode.getElementsByTagName("span")[1].getElementsByTagName("a")[0].innerHTML+"-1",obj.parentNode); -} - -function CalenderselectMonth(obj){ - var opt = ""; - var thisMonth = obj.innerHTML; - for (i=1; i<=12; i++){ - if (i==thisMonth){ - opt += ""; - }else{ - opt += ""; - } - } - opt = ""; - obj.parentNode.innerHTML = opt; -} -function selectThisMonth(obj){ - HS_calender(obj.parentNode.parentNode.getElementsByTagName("span")[0].getElementsByTagName("a")[0].innerHTML+"-"+obj.value+"-1",obj.parentNode); -} -function HS_setDate(inputObj){ - var calenderObj = document.createElement("span"); - calenderObj.innerHTML = HS_calender(new Date()); - calenderObj.style.position = "absolute"; - calenderObj.targetObj = inputObj; - inputObj.parentNode.insertBefore(calenderObj,inputObj.nextSibling); -} -//lizanle 刷新函数 -function redo() { - window.location.reload() -} - - -//// 作业附件删除 -$(function(){ - $('.attachments a.delete-homework-icon').bind('ajax:complete', //this will work - function(event, data, status, xhr) { //note parametes - $(this).parent('p').remove(); - console.log("delete complete."); - }); - - $('a.tb_all').bind('ajax:complete', function (event, data, status, xhr) { - if(status == 'success'){ - var res = JSON.parse(data.responseText); - if(res.length<1){ - return; - } - - if(res.length==1){ - location.href = '/zipdown/download?file='+res[0].file;return; - } - - document.getElementById('light').style.display='block'; - $container = $('#light .upload_box_ul'); - $container.empty(); - for(var i = 0; i 1){ - des = '第'+res[i].index+'-'+(res[i].count+res[i].index-1)+'个学生的作品下载'; - } else { - des = '第'+res[i].index+'个学生的作品下载'; - } - $('
    • '+(i+1)+'. '+des+'  (共'+res[i].size+'M)
    • ').appendTo($container); - - } - } - - }) -}); - - -//firefox的pre标签换行 -$(document).ready(function () { - var userAgent = navigator.userAgent.toLowerCase(); - var browser = { - version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1], - safari: /webkit/.test(userAgent), - opera: /opera/.test(userAgent), - msie: /msie/.test(userAgent) && !/opera/.test(userAgent), - mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) - }; - if (browser.mozilla || browser.opera){ - $("pre").addClass("break_word_firefox"); - } - else{ - $("pre").addClass("break_word"); - } -}); +//= require_directory ./rateable +//= require jquery.min +//= require jquery.infinitescroll + +/* Redmine - project management software + Copyright (C) 2006-2013 Jean-Philippe Lang */ + +function cleanArray (actual){ + var newArray = new Array(); + for (var i = 0; i< actual.length; i++){ + if (actual[i]){ + newArray.push(actual[i]); + } + } + return newArray; +} + +function checkAll(id, checked) { + if (checked) { + $('#'+id).find('input[type=checkbox]').attr('checked', true); + } else { + $('#'+id).find('input[type=checkbox]').removeAttr('checked'); + } +} + +function toggleCheckboxesBySelector(selector) { + var all_checked = true; + $(selector).each(function(index) { + if (!$(this).is(':checked')) { all_checked = false; } + }); + $(selector).attr('checked', !all_checked); +} + +function showAndScrollTo(id, focus) { + $('#'+id).show(); + if (focus !== null) { + $('#'+focus).focus(); + } + $('html, body').animate({scrollTop: $('#'+id).offset().top}, 400); +} + +function toggleRowGroup(el) { + var tr = $(el).parents('tr').first(); + var n = tr.next(); + tr.toggleClass('open'); + while (n.length && !n.hasClass('group')) { + n.toggle(); + n = n.next('tr'); + } +} + +function collapseAllRowGroups(el) { + var tbody = $(el).parents('tbody').first(); + tbody.children('tr').each(function(index) { + if ($(this).hasClass('group')) { + $(this).removeClass('open'); + } else { + $(this).hide(); + } + }); +} + +function expandAllRowGroups(el) { + var tbody = $(el).parents('tbody').first(); + tbody.children('tr').each(function(index) { + if ($(this).hasClass('group')) { + $(this).addClass('open'); + } else { + $(this).show(); + } + }); +} + +function toggleAllRowGroups(el) { + var tr = $(el).parents('tr').first(); + if (tr.hasClass('open')) { + collapseAllRowGroups(el); + } else { + expandAllRowGroups(el); + } +} + +function toggleFieldset(el) { + var fieldset = $(el).parents('fieldset').first(); + fieldset.toggleClass('collapsed'); + fieldset.children('div').toggle(); +} + +function hideFieldset(el) { + var fieldset = $(el).parents('fieldset').first(); + fieldset.toggleClass('collapsed'); + fieldset.children('div').hide(); +} + +function initFilters(){ + $('#add_filter_select').change(function(){ + addFilter($(this).val(), '', []); + }); + $('#filters-table td.field input[type=checkbox]').each(function(){ + toggleFilter($(this).val()); + }); + $('#filters-table td.field input[type=checkbox]').live('click',function(){ + toggleFilter($(this).val()); + }); + $('#filters-table .toggle-multiselect').live('click',function(){ + toggleMultiSelect($(this).siblings('select')); + }); + $('#filters-table input[type=text]').live('keypress', function(e){ + if (e.keyCode == 13) submit_query_form("query_form"); + }); +} + +function addFilter(field, operator, values) { + var fieldId = field.replace('.', '_'); + var tr = $('#tr_'+fieldId); + if (tr.length > 0) { + tr.show(); + } else { + buildFilterRow(field, operator, values); + } + $('#cb_'+fieldId).attr('checked', true); + toggleFilter(field); + $('#add_filter_select').val('').children('option').each(function(){ + if ($(this).attr('value') == field) { + $(this).attr('disabled', true); + } + }); +} + +function buildFilterRow(field, operator, values) { + var fieldId = field.replace('.', '_'); + var filterTable = $("#filters-table"); + var filterOptions = availableFilters[field]; + var operators = operatorByType[filterOptions['type']]; + var filterValues = filterOptions['values']; + var i, select; + + var tr = $('').attr('id', 'tr_'+fieldId).html( + '' + + '' + + ' 复选/multi-select' + ); + select = tr.find('td.values select'); + if (values.length > 1) { select.attr('multiple', true); } + for (i=0;i'); + if ($.isArray(filterValue)) { + option.val(filterValue[1]).text(filterValue[0]); + if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);} + } else { + option.val(filterValue).text(filterValue); + if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);} + } + select.append(option); + } + break; + case "date": + case "date_past": + tr.find('td.values').append( + '' + + ' ' + + ' '+labelDayPlural+'' + ); + $('#values_'+fieldId+'_1').val(values[0]).datepicker(datepickerOptions); + $('#values_'+fieldId+'_2').val(values[1]).datepicker(datepickerOptions); + $('#values_'+fieldId).val(values[0]); + break; + case "string": + case "text": + tr.find('td.values').append( + '' + ); + $('#values_'+fieldId).val(values[0]); + break; + case "relation": + tr.find('td.values').append( + '' + + '' + ); + $('#values_'+fieldId).val(values[0]); + select = tr.find('td.values select'); + for (i=0;i'); + option.val(filterValue[1]).text(filterValue[0]); + if (values[0] == filterValue[1]) { option.attr('selected', true); } + select.append(option); + } + case "integer": + case "float": + tr.find('td.values').append( + '' + + ' ' + ); + $('#values_'+fieldId+'_1').val(values[0]); + $('#values_'+fieldId+'_2').val(values[1]); + break; + } +} + +function toggleFilter(field) { + var fieldId = field.replace('.', '_'); + if ($('#cb_' + fieldId).is(':checked')) { + $("#operators_" + fieldId).show().removeAttr('disabled'); + toggleOperator(field); + } else { + $("#operators_" + fieldId).hide().attr('disabled', true); + enableValues(field, []); + } +} + +function enableValues(field, indexes) { + var fieldId = field.replace('.', '_'); + $('#tr_'+fieldId+' td.values .value').each(function(index) { + if ($.inArray(index, indexes) >= 0) { + $(this).removeAttr('disabled'); + $(this).parents('span').first().show(); + } else { + $(this).val(''); + $(this).attr('disabled', true); + $(this).parents('span').first().hide(); + } + + if ($(this).hasClass('group')) { + $(this).addClass('open'); + } else { + $(this).show(); + } + }); +} + +function toggleOperator(field) { + var fieldId = field.replace('.', '_'); + var operator = $("#operators_" + fieldId); + switch (operator.val()) { + case "!*": + case "*": + case "t": + case "ld": + case "w": + case "lw": + case "l2w": + case "m": + case "lm": + case "y": + case "o": + case "c": + enableValues(field, []); + break; + case "><": + enableValues(field, [0,1]); + break; + case "t+": + case ">t-": + case "0) { + lis.eq(i-1).show(); + } +} + +function displayTabsButtons() { + var lis; + var tabsWidth = 0; + var el; + $('div.tabs').each(function() { + el = $(this); + lis = el.find('ul').children(); + lis.each(function(){ + if ($(this).is(':visible')) { + tabsWidth += $(this).width() + 6; + } + }); + if ((tabsWidth < el.width() - 60) && (lis.first().is(':visible'))) { + el.find('div.tabs-buttons').hide(); + } else { + el.find('div.tabs-buttons').show(); + } + }); +} + +function setPredecessorFieldsVisibility() { + var relationType = $('#relation_relation_type'); + if (relationType.val() == "precedes" || relationType.val() == "follows") { + $('#predecessor_fields').show(); + } else { + $('#predecessor_fields').hide(); + } +} + +function showModal(id, width) { + var el = $('#'+id).first(); + if (el.length === 0 || el.is(':visible')) {return;} + var title = el.find('h3.title').text(); + el.dialog({ + width: width, + modal: true, + resizable: false, + dialogClass: 'modal', + title: title + }); + el.find("input[type=text], input[type=submit]").first().focus(); +} + +function hideModal(el) { + var modal; + if (el) { + modal = $(el).parents('.ui-dialog-content'); + } else { + modal = $('#ajax-modal'); + } + modal.dialog("close"); +} + +function submitPreview(url, form, target) { + $.ajax({ + url: url, + type: 'post', + data: $('#'+form).serialize(), + success: function(data){ + $('#'+target).html(data); + } + }); +} + +function collapseScmEntry(id) { + $('.'+id).each(function() { + if ($(this).hasClass('open')) { + collapseScmEntry($(this).attr('id')); + } + $(this).hide(); + }); + $('#'+id).removeClass('open'); +} + +function expandScmEntry(id) { + $('.'+id).each(function() { + $(this).show(); + if ($(this).hasClass('loaded') && !$(this).hasClass('collapsed')) { + expandScmEntry($(this).attr('id')); + } + }); + $('#'+id).addClass('open'); +} + +function scmEntryClick(id, url) { + el = $('#'+id); + if (el.hasClass('open')) { + collapseScmEntry(id); + el.addClass('collapsed'); + return false; + } else if (el.hasClass('loaded')) { + expandScmEntry(id); + el.removeClass('collapsed'); + return false; + } + if (el.hasClass('loading')) { + return false; + } + el.addClass('loading'); + $.ajax({ + url: url, + success: function(data){ + el.after(data); + el.addClass('open').addClass('loaded').removeClass('loading'); + } + }); + return true; +} + +function randomKey(size) { + var chars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); + var key = ''; + for (i = 0; i < size; i++) { + key += chars[Math.floor(Math.random() * chars.length)]; + } + return key; +} + +// Can't use Rails' remote select because we need the form data +function updateIssueFrom(url) { + $.ajax({ + url: url, + type: 'post', + data: $('#issue-form').serialize() + }); +} + +function updateBulkEditFrom(url) { + $.ajax({ + url: url, + type: 'post', + data: $('#bulk_edit_form').serialize() + }); +} + +function clearMessage(id) { + $('#'+id).val(""); +} + + +function observeAutocompleteField(fieldId, url, options) { + $(document).ready(function() { + $('#'+fieldId).autocomplete($.extend({ + source: url, + select: function(e,ui){self.location="/issues/"+ui.item.value;}, + minLength: 1, + search: function(){$('#'+fieldId).addClass('ajax-loading');}, + response: function(){$('#'+fieldId).removeClass('ajax-loading'); + } + }, options)); + $('#'+fieldId).addClass('autocomplete'); + + }); + +} + +function observeSearchfield(fieldId, targetId, url) { + $('#'+fieldId).each(function() { + var $this = $(this); + $this.addClass('autocomplete'); + $this.attr('data-value-was', $this.val()); + var check = function() { + var val = $this.val(); + if ($this.attr('data-value-was') != val){ + $this.attr('data-value-was', val); + $.ajax({ + url: url, + type: 'get', + data: {q: $this.val()}, + success: function(data){ if(targetId) $('#'+targetId).html(data); }, + beforeSend: function(){ $this.addClass('ajax-loading'); }, + complete: function(){ $this.removeClass('ajax-loading'); } + }); + } + }; + var reset = function() { + if (timer) { + clearInterval(timer); + timer = setInterval(check, 300); + } + }; + var timer = setInterval(check, 300); + $this.bind('keyup click mousemove', reset); + }); +} + +function observeProjectModules() { + var f = function() { + /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ + if ($('#project_enabled_module_names_issue_tracking').attr('checked')) { + $('#project_trackers').show(); + }else{ + $('#project_trackers').hide(); + } + }; + + $(window).load(f); + $('#project_enabled_module_names_issue_tracking').change(f); +} + +function initMyPageSortable(list, url) { + $('#list-'+list).sortable({ + connectWith: '.block-receiver', + tolerance: 'pointer', + update: function(){ + $.ajax({ + url: url, + type: 'post', + data: {'blocks': $.map($('#list-'+list).children(), function(el){return $(el).attr('id');})} + }); + } + }); + $("#list-top, #list-left, #list-right").disableSelection(); +} + +var warnLeavingUnsavedMessage; +function warnLeavingUnsaved(message) { + warnLeavingUnsavedMessage = message; + + $('form').submit(function(){ + $('textarea').removeData('changed'); + }); + $('textarea').change(function(){ + $(this).data('changed', 'changed'); + }); + window.onbeforeunload = function(){ + var warn = false; + $('textarea').blur().each(function(){ + if ($(this).data('changed')) { + warn = true; + } + }); + if (warn) {return warnLeavingUnsavedMessage;} + }; +} + +function setupHeartBeat(){ + var time = 60*1000*30; // 30 mins + setInterval(function(){$.getJSON('/account/heartbeat');},time); +} + +function setupAjaxIndicator() { + $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { + if(settings && settings.url && settings.url.match(/account\/heartbeat$/)){ + return; + } + if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { + $('#ajax-indicator').show(); + } + }); + + $('#ajax-indicator').bind('ajaxStop', function() { + $('#ajax-indicator').hide(); + }); +} + +function hideOnLoad() { + $('.hol').hide(); +} + +function addFormObserversForDoubleSubmit() { + $('form[method=post]').each(function() { + if (!$(this).hasClass('multiple-submit')) { + $(this).submit(function(form_submission) { + if ($(form_submission.target).attr('data-submitted')) { + form_submission.preventDefault(); + } else { + $(form_submission.target).attr('data-submitted', true); + } + }); + } + }); +} + +function blockEventPropagation(event) { + event.stopPropagation(); + event.preventDefault(); +} + +function toggleAndSettingWordsVal(parent_widget, text_widget, value){ + text_widget.val(value) + parent_widget.slideToggle(400) +} +function transpotUrl (scope) { + $(scope).each(function(){ + var tmpContent = $(this).html(); + tmpContent = tmpContent.replace(/(^|[^\"\'])(http|ftp|mms|rstp|news|https)(\:\/\/[^<\s\+,,]+)/gi,"$1$2$3<\/a>"); + // tmpContent = tmpContent.replace(/(^|[^\/])(www\.[^<\s\+,,]+)/gi,"$1$2"); + $(this).html(tmpContent); + }); +} + +$(document).ready(setupAjaxIndicator); +$(document).ready(setupHeartBeat); +$(document).ready(hideOnLoad); +$(document).ready(addFormObserversForDoubleSubmit); + +function img_thumbnails() { + $('.thumbnails a').colorbox({rel:'nofollow'}); + $('.attachments').find('a').each(function(index, element) { + var href_value = $(element).attr('href'); + if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) { + $(element).colorbox({rel:'nofollow'}); + } + }); + $('.for_img_thumbnails').find('a').each(function(index, element) { + var href_value = $(element).attr('href'); + if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) { + $(element).colorbox({rel:'nofollow'}); + } + }); +} +$(document).ready(img_thumbnails); + +function TimeClose(dateText, inst) { + if(inst.id=="issue_start_date"){ + time=dateText; + } +} +var time=new Date(); +function TimeBeforeShow(input){ + if(input.id=="issue_due_date"){ + //var minDate = $(input).datepicker('option', 'minDate'); + var tempdata=$("#issue_start_date").attr("value"); + + $(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/"))); + //$('.selector').datepicker('option', 'minDate', '12/25/2012'); + } +} + +function SetMinValue(){ + /// var tempdata=$("#issue_start_date").attr("value"); + //$('.selector').datepicker('option', 'minDate', '12/25/2012'); + //alert(tempdata); + //$("#issue_due_date").datepicker({ + // minDate: new Date(2014,08,23) + //var datepickerOptions= + //{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; + //alert( $('.issue_due_date').length); + //$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23)); + //$("#issue_due_date").datepicker(datepickerOptions); + //$("##{issue_due_date}").datepicker(datepickerOptions); + //$("#issue_due_date").datepicker( + // {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true} + //) + //}); +} +function PrecentChange(obj){ + var _v= obj; + if(_v==100) + { + //var select=$("select[id='issue_status_id']"); + $("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); + } + else if(_v==0) + { + //alert(1); + $("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); + } + else if(_v!=100&&_v!=0) + { + // alert(2); + $("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); + } +} + +//added by lizanle 日期選擇js +function HS_DateAdd(interval,number,date){ + number = parseInt(number); + if (typeof(date)=="string"){var date = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2])} + if (typeof(date)=="object"){var date = date} + switch(interval){ + case "y":return new Date(date.getFullYear()+number,date.getMonth(),date.getDate()); break; + case "m":return new Date(date.getFullYear(),date.getMonth()+number,checkDate(date.getFullYear(),date.getMonth()+number,date.getDate())); break; + case "d":return new Date(date.getFullYear(),date.getMonth(),date.getDate()+number); break; + case "w":return new Date(date.getFullYear(),date.getMonth(),7*number+date.getDate()); break; + } +} +function checkDate(year,month,date){ + var enddate = ["31","28","31","30","31","30","31","31","30","31","30","31"]; + var returnDate = ""; + if (year%4==0){enddate[1]="29"} + if (date>enddate[month]){returnDate = enddate[month]}else{returnDate = date} + return returnDate; +} + +function WeekDay(date){ + var theDate; + if (typeof(date)=="string"){theDate = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2]);} + if (typeof(date)=="object"){theDate = date} + return theDate.getDay(); +} +function HS_calender(){ + var lis = ""; + var style = ""; + /*可以把下面的css剪切出去独立一个css文件*/ + style +=""; + + var now; + if (typeof(arguments[0])=="string"){ + selectDate = arguments[0].split("-"); + var year = selectDate[0]; + var month = parseInt(selectDate[1])-1+""; + var date = selectDate[2]; + now = new Date(year,month,date); + }else if (typeof(arguments[0])=="object"){ + now = arguments[0]; + } + var lastMonthEndDate = HS_DateAdd("d","-1",now.getFullYear()+"-"+now.getMonth()+"-01").getDate(); + var lastMonthDate = WeekDay(now.getFullYear()+"-"+now.getMonth()+"-01"); + var thisMonthLastDate = HS_DateAdd("d","-1",now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString()+"-01"); + var thisMonthEndDate = thisMonthLastDate.getDate(); + var thisMonthEndDay = thisMonthLastDate.getDay(); + var todayObj = new Date(); + today = todayObj.getFullYear()+"-"+todayObj.getMonth()+"-"+todayObj.getDate(); + + for (i=0; i" + lis; + lastMonthEndDate--; + } + for (i=1; i<=thisMonthEndDate; i++){ // Current Month's Date + + if(today == now.getFullYear()+"-"+now.getMonth()+"-"+i){ + var todayString = now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString()+"-"+i; + lis += "
    • "+i+"
    • "; + }else{ + lis += "
    • "+i+"
    • "; + } + + } + var j=1; + for (i=thisMonthEndDay; i<6; i++){ // Next Month's Date + lis += "
    • "+j+"
    • "; + j++; + } + lis += style; + + var CalenderTitle = "»"; + CalenderTitle += "«"; + CalenderTitle += ""+now.getFullYear()+""+(parseInt(now.getMonth())+1).toString()+"月"; + + if (arguments.length>1){ + arguments[1].parentNode.parentNode.getElementsByTagName("ul")[1].innerHTML = lis; + arguments[1].parentNode.innerHTML = CalenderTitle; + + }else{ + var CalenderBox = style+"
      "+CalenderTitle+"
        "+lis+"
      "; + return CalenderBox; + } +} +function _selectThisDay(d){ + var boxObj = d.parentNode.parentNode.parentNode.parentNode.parentNode; + boxObj.targetObj.value = d.title; + boxObj.parentNode.removeChild(boxObj); +} +function closeCalender(d){ + var boxObj = d.parentNode.parentNode.parentNode; + boxObj.parentNode.removeChild(boxObj); +} + +function CalenderselectYear(obj){ + var opt = ""; + var thisYear = obj.innerHTML; + for (i=1970; i<=2020; i++){ + if (i==thisYear){ + opt += ""; + }else{ + opt += ""; + } + } + opt = ""; + obj.parentNode.innerHTML = opt; +} + +function selectThisYear(obj){ + HS_calender(obj.value+"-"+obj.parentNode.parentNode.getElementsByTagName("span")[1].getElementsByTagName("a")[0].innerHTML+"-1",obj.parentNode); +} + +function CalenderselectMonth(obj){ + var opt = ""; + var thisMonth = obj.innerHTML; + for (i=1; i<=12; i++){ + if (i==thisMonth){ + opt += ""; + }else{ + opt += ""; + } + } + opt = ""; + obj.parentNode.innerHTML = opt; +} +function selectThisMonth(obj){ + HS_calender(obj.parentNode.parentNode.getElementsByTagName("span")[0].getElementsByTagName("a")[0].innerHTML+"-"+obj.value+"-1",obj.parentNode); +} +function HS_setDate(inputObj){ + var calenderObj = document.createElement("span"); + calenderObj.innerHTML = HS_calender(new Date()); + calenderObj.style.position = "absolute"; + calenderObj.targetObj = inputObj; + inputObj.parentNode.insertBefore(calenderObj,inputObj.nextSibling); +} +//lizanle 刷新函数 +function redo() { + window.location.reload() +} + + +//// 作业附件删除 +$(function(){ + $('.attachments a.delete-homework-icon').bind('ajax:complete', //this will work + function(event, data, status, xhr) { //note parametes + $(this).parent('p').remove(); + console.log("delete complete."); + }); + + $('a.tb_all').bind('ajax:complete', function (event, data, status, xhr) { + if(status == 'success'){ + var res = JSON.parse(data.responseText); + if(res.length<1){ + return; + } + + if(res.length==1){ + location.href = '/zipdown/download?file='+res[0].file;return; + } + + document.getElementById('light').style.display='block'; + $container = $('#light .upload_box_ul'); + $container.empty(); + for(var i = 0; i 1){ + des = '第'+res[i].index+'-'+(res[i].count+res[i].index-1)+'个学生的作品下载'; + } else { + des = '第'+res[i].index+'个学生的作品下载'; + } + $('
    • '+(i+1)+'. '+des+'  (共'+res[i].size+'M)
    • ').appendTo($container); + + } + } + + }) +}); + + +//firefox的pre标签换行 +$(document).ready(function () { + var userAgent = navigator.userAgent.toLowerCase(); + var browser = { + version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1], + safari: /webkit/.test(userAgent), + opera: /opera/.test(userAgent), + msie: /msie/.test(userAgent) && !/opera/.test(userAgent), + mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) + }; + if (browser.mozilla || browser.opera){ + $("pre").addClass("break_word_firefox"); + } + else{ + $("pre").addClass("break_word"); + } +}); diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 2c10d28e4..3df755a7f 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -1,10 +1,10 @@ /* Redmine - project management software - Copyright (C) 2006-2013 Jean-Philippe Lang */ + Copyright (C) 2006-2013 Jean-Philippe Lang */ function postUpMsg(attachmentId) { $.ajax({ - url: '/attachments/renderTag', + url: '/attachments/renderTag', type: "GET", data: { attachmentId: attachmentId @@ -23,172 +23,242 @@ function reload(fileSpan) { } +function addFile_board(inputEl, file, eagerUpload, id) { + + var attachments_frame = '#attachments_fields' + id; + if ($(attachments_frame).children().length < 30) { + deleteallfiles = $(inputEl).data('deleteAllFiles'); + var attachmentId = addFile.nextAttachmentId++; + + var fileSpan = $('', { 'id': 'attachments_' + attachmentId, 'class':'attachment' }); + + fileSpan.append( + $('', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name), + $('', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('descriptionPlaceholder') } ).toggle(!eagerUpload), + $(''+$(inputEl).data('fieldIsPublic')+':').attr({ 'class': 'ispublic-label' }) , + $('', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload), + $(' ').attr({ 'href': "#", 'class': 'remove-upload', 'data-containerid':id }).click(function(){ + if(confirm($(inputEl).data('areYouSure'))){ + removeFile(); + if(!eagerUpload){ + (function(e){ + reload(e); + })(fileSpan); + } + } + + }).toggle(!eagerUpload), + $('
      ', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} ) + ).appendTo(attachments_frame); + + if(eagerUpload) { + ajaxUpload(file, attachmentId, fileSpan, inputEl); + + } + return attachmentId; + } + return null; +} function addFile(inputEl, file, eagerUpload) { - if ($('#attachments_fields').children().length < 30) { - deleteallfiles = $(inputEl).data('deleteAllFiles'); - var attachmentId = addFile.nextAttachmentId++; - - var fileSpan = $('', { 'id': 'attachments_' + attachmentId, 'class':'attachment' }); - - fileSpan.append( - $('', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name), - $('', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('descriptionPlaceholder') } ).toggle(!eagerUpload), - $(''+$(inputEl).data('fieldIsPublic')+':').attr({ 'class': 'ispublic-label' }) , - $('', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload), - $(' ').attr({ 'href': "#", 'class': 'remove-upload' }).click(function(){ - if(confirm($(inputEl).data('areYouSure'))){ - removeFile(); - if(!eagerUpload){ - (function(e){ - reload(e); - })(fileSpan); + var attachments_frame = '#attachments_fields'; + if ($(attachments_frame).children().length < 30) { + deleteallfiles = $(inputEl).data('deleteAllFiles'); + var attachmentId = addFile.nextAttachmentId++; + + var fileSpan = $('', { 'id': 'attachments_' + attachmentId, 'class':'attachment' }); + + fileSpan.append( + $('', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name), + $('', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('descriptionPlaceholder') } ).toggle(!eagerUpload), + $(''+$(inputEl).data('fieldIsPublic')+':').attr({ 'class': 'ispublic-label' }) , + $('', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload), + $(' ').attr({ 'href': "#", 'class': 'remove-upload' }).click(function(){ + if(confirm($(inputEl).data('areYouSure'))){ + removeFile(); + if(!eagerUpload){ + (function(e){ + reload(e); + })(fileSpan); + } } - } - }).toggle(!eagerUpload), - $('
      ', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} ) - ).appendTo('#attachments_fields'); + }).toggle(!eagerUpload), + $('
      ', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} ) + ).appendTo('#attachments_fields'); - if(eagerUpload) { - ajaxUpload(file, attachmentId, fileSpan, inputEl); + if(eagerUpload) { + ajaxUpload(file, attachmentId, fileSpan, inputEl); + } + return attachmentId; } - return attachmentId; - } - return null; + return null; } - addFile.nextAttachmentId = 1; function ajaxUpload(file, attachmentId, fileSpan, inputEl) { - function onLoadstart(e) { - fileSpan.removeClass('ajax-waiting'); - fileSpan.addClass('ajax-loading'); - $('input:submit', $(this).parents('form')).attr('disabled', 'disabled'); - } - - function onProgress(e) { - if(e.lengthComputable) { - this.progressbar( 'value', e.loaded * 100 / e.total ); + function onLoadstart(e) { + fileSpan.removeClass('ajax-waiting'); + fileSpan.addClass('ajax-loading'); + $('input:submit', $(this).parents('form')).attr('disabled', 'disabled'); } - } - - function actualUpload(file, attachmentId, fileSpan, inputEl) { - - ajaxUpload.uploading++; - - uploadBlob(file, $(inputEl).data('upload-path'), attachmentId, { - loadstartEventHandler: onLoadstart.bind(progressSpan), - progressEventHandler: onProgress.bind(progressSpan) - }) - .done(function(result) { - progressSpan.progressbar( 'value', 100 ).remove(); - fileSpan.find('input.description, a').css('display', 'inline-block'); - fileSpan.find('input.is_public_checkbox, a').css('display', 'inline-block'); - }) - .fail(function(result) { - progressSpan.text(result.statusText); - if($("#network_issue")) - { - $("#network_issue").show(); + + function onProgress(e) { + if(e.lengthComputable) { + this.progressbar( 'value', e.loaded * 100 / e.total ); } - }).always(function() { - ajaxUpload.uploading--; - fileSpan.removeClass('ajax-loading'); - var form = fileSpan.parents('form'); - if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) { - $('input:submit', form).removeAttr('disabled'); + } + + function actualUpload(file, attachmentId, fileSpan, inputEl) { + + ajaxUpload.uploading++; + + uploadBlob(file, $(inputEl).data('upload-path'), attachmentId, { + loadstartEventHandler: onLoadstart.bind(progressSpan), + progressEventHandler: onProgress.bind(progressSpan) + }) + .done(function(result) { + progressSpan.progressbar( 'value', 100 ).remove(); + fileSpan.find('input.description, a').css('display', 'inline-block'); + fileSpan.find('input.is_public_checkbox, a').css('display', 'inline-block'); + }) + .fail(function(result) { + progressSpan.text(result.statusText); + if($("#network_issue")) + { + $("#network_issue").show(); + } + }).always(function() { + ajaxUpload.uploading--; + fileSpan.removeClass('ajax-loading'); + var form = fileSpan.parents('form'); + if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) { + $('input:submit', form).removeAttr('disabled'); + } + form.dequeue('upload'); + }); + + //gcm files count and add delete_all link + + //modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ start + var containerid=$(inputEl).data('containerid'); + if(containerid==undefined){ + var count=$('#attachments_fields>span').length; + $('#upload_file_count').html(""+count+""+$(inputEl).data('fileCount')); + if(count>=1){ + var add_attachs=$('.add_attachment'); + var delete_all=$('.remove_all'); + if(delete_all.length<1){ + add_attachs.append($(" ").attr({"href":"javascript:void(0)", 'class': 'remove_all',"onclick": "removeAll()"})); + } + } + }else{ + var count=$('#attachments_fields'+containerid+'>span').length; + $('#upload_file_count'+containerid).html(""+count+""+$(inputEl).data('fileCount')); + if(count>=1){ + var add_attachs=$('.add_attachment').filter(function(index){ + return $(this).data('containerid')==containerid; + }); + var delete_all=$('.remove_all').filter(function(index){ + return $(this).data('containerid')==containerid; + }); + if(delete_all.length<1){ + add_attachs.append($(" ").attr({ + "href":"javascript:void(0)", + 'class': 'remove_all', + 'data-containerid': containerid, + "onclick": "removeAll('"+containerid+"')" + })); + } + } + //modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ end } - form.dequeue('upload'); - }); - - //gcm files count and add delete_all link - - var count=$('#attachments_fields>span').length; - $('#upload_file_count').html(""+count+""+$(inputEl).data('fileCount')); - if(count>=1){ - var add_attachs=$('.add_attachment'); - var delete_all=$('.remove_all'); - if(delete_all.length<1){ - add_attachs.append($(" ").attr({"href":"javascript:void(0)", 'class': 'remove_all',"onclick": "removeAll()"})); - } - } - - //gcm - - } - - var progressSpan = $('
      ').insertAfter(fileSpan.find('input.filename')); - progressSpan.progressbar(); - fileSpan.addClass('ajax-waiting'); - - var maxSyncUpload = $(inputEl).data('max-concurrent-uploads'); - - if(maxSyncUpload == null || maxSyncUpload <= 0 || ajaxUpload.uploading < maxSyncUpload) - actualUpload(file, attachmentId, fileSpan, inputEl); - else - $(inputEl).parents('form').queue('upload', actualUpload.bind(this, file, attachmentId, fileSpan, inputEl)); + + //gcm + + } + + var progressSpan = $('
      ').insertAfter(fileSpan.find('input.filename')); + progressSpan.progressbar(); + fileSpan.addClass('ajax-waiting'); + + var maxSyncUpload = $(inputEl).data('max-concurrent-uploads'); + + if(maxSyncUpload == null || maxSyncUpload <= 0 || ajaxUpload.uploading < maxSyncUpload) + actualUpload(file, attachmentId, fileSpan, inputEl); + else + $(inputEl).parents('form').queue('upload', actualUpload.bind(this, file, attachmentId, fileSpan, inputEl)); } ajaxUpload.uploading = 0; function removeFile() { - $(this).parent('span').remove(); - return false; + $(this).parent('span').remove(); + return false; } //gcm delete all file -function removeAll(){ - if(confirm(deleteallfiles)){ - $(".remove-upload").removeAttr("data-confirm"); - $(".remove-upload").click(); - } +//modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ start +function removeAll(containerid){ + if(confirm(deleteallfiles)){ + if(containerid==undefined){ + $(".remove-upload").removeAttr("data-confirm"); + $(".remove-upload").click(); + }else{ + var arr = $(".remove-upload").filter(function(){ + return $(this).data('containerid')==containerid; + }); + arr.removeAttr("data-confirm"); + arr.click(); + } + } // return false; } +//modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ end //gcm function uploadBlob(blob, uploadUrl, attachmentId, options) { - var actualOptions = $.extend({ - loadstartEventHandler: $.noop, - progressEventHandler: $.noop - }, options); - if(uploadUrl.indexOf('?') > 0){ - uploadUrl = uploadUrl + '&attachment_id=' + attachmentId; - }else{ - uploadUrl = uploadUrl + '?attachment_id=' + attachmentId; - } - if (blob instanceof window.File) { - uploadUrl += '&filename=' + encodeURIComponent(blob.name); - } - - return $.ajax(uploadUrl, { - type: 'POST', - contentType: 'application/octet-stream', - beforeSend: function(jqXhr) { - jqXhr.setRequestHeader('Accept', 'application/js'); - }, - xhr: function() { - var xhr = $.ajaxSettings.xhr(); - xhr.upload.onloadstart = actualOptions.loadstartEventHandler; - xhr.upload.onprogress = actualOptions.progressEventHandler; - return xhr; - }, - data: blob, - cache: false, - processData: false - }); + var actualOptions = $.extend({ + loadstartEventHandler: $.noop, + progressEventHandler: $.noop + }, options); + if(uploadUrl.indexOf('?') > 0){ + uploadUrl = uploadUrl + '&attachment_id=' + attachmentId; + }else{ + uploadUrl = uploadUrl + '?attachment_id=' + attachmentId; + } + if (blob instanceof window.File) { + uploadUrl += '&filename=' + encodeURIComponent(blob.name); + } + + return $.ajax(uploadUrl, { + type: 'POST', + contentType: 'application/octet-stream', + beforeSend: function(jqXhr) { + jqXhr.setRequestHeader('Accept', 'application/js'); + }, + xhr: function() { + var xhr = $.ajaxSettings.xhr(); + xhr.upload.onloadstart = actualOptions.loadstartEventHandler; + xhr.upload.onprogress = actualOptions.progressEventHandler; + return xhr; + }, + data: blob, + cache: false, + processData: false + }); } function addInputFiles(inputEl) { - // var clearedFileInput = $(inputEl).clone().val(''); + // var clearedFileInput = $(inputEl).clone().val(''); if (inputEl.files) { // upload files using ajax uploadAndAttachFiles(inputEl.files, inputEl); - // $(inputEl).remove(); + // $(inputEl).remove(); } else { // browser not supporting the file API, upload on form submission var attachmentId; @@ -202,56 +272,115 @@ function addInputFiles(inputEl) { //clearedFileInput.insertAfter('#attachments_fields'); } +function addInputFiles_board(inputEl, id) { + // var clearedFileInput = $(inputEl).clone().val(''); + + if (inputEl.files) { + // upload files using ajax + uploadAndAttachFiles_board(inputEl.files, inputEl, id); + // $(inputEl).remove(); + } else { + // browser not supporting the file API, upload on form submission + var attachmentId; + var aFilename = inputEl.value.split(/\/|\\/); + attachmentId = addFile_board(inputEl, { name: aFilename[ aFilename.length - 1 ] }, false, id); + if (attachmentId) { + $(inputEl).attr({ name: 'attachments[' + attachmentId + '][file]'}).hide(); + $('#upload_file_count').html(""+count+""+$(inputEl).data('fileCount')); + } + } + //clearedFileInput.insertAfter('#attachments_fields'); +} function uploadAndAttachFiles(files, inputEl) { - var maxFileSize = $(inputEl).data('max-file-size'); - var maxFileSizeExceeded = $(inputEl).data('max-file-size-message'); - - var sizeExceeded = false; - $.each(files, function() { - if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;} - }); - if (sizeExceeded) { - window.alert(maxFileSizeExceeded); - } else { - $.each(files, function() {addFile(inputEl, this, true);}); - } + var maxFileSize = $(inputEl).data('max-file-size'); + var maxFileSizeExceeded = $(inputEl).data('max-file-size-message'); + + var sizeExceeded = false; + $.each(files, function() { + if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;} + }); + if (sizeExceeded) { + window.alert(maxFileSizeExceeded); + } else { + $.each(files, function() {addFile(inputEl, this, true);}); + } } +function uploadAndAttachFiles_board(files, inputEl, id) { + var maxFileSize = $(inputEl).data('max-file-size'); + var maxFileSizeExceeded = $(inputEl).data('max-file-size-message'); + + var sizeExceeded = false; + $.each(files, function() { + if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;} + }); + if (sizeExceeded) { + window.alert(maxFileSizeExceeded); + } else { + $.each(files, function() {addFile_board(inputEl, this, true, id);}); + } +} function handleFileDropEvent(e) { - $(this).removeClass('fileover'); - blockEventPropagation(e); + $(this).removeClass('fileover'); + blockEventPropagation(e); - if ($.inArray('Files', e.dataTransfer.types) > -1) { - uploadAndAttachFiles(e.dataTransfer.files, $('input:file.file_selector')); - } + if ($.inArray('Files', e.dataTransfer.types) > -1) { + uploadAndAttachFiles(e.dataTransfer.files, $('input:file.file_selector')); + } } function dragOverHandler(e) { - $(this).addClass('fileover'); - blockEventPropagation(e); + $(this).addClass('fileover'); + blockEventPropagation(e); } function dragOutHandler(e) { - $(this).removeClass('fileover'); - blockEventPropagation(e); + $(this).removeClass('fileover'); + blockEventPropagation(e); } function setupFileDrop() { - if (window.File && window.FileList && window.ProgressEvent && window.FormData) { + if (window.File && window.FileList && window.ProgressEvent && window.FormData) { - $.event.fixHooks.drop = { props: [ 'dataTransfer' ] }; + $.event.fixHooks.drop = { props: [ 'dataTransfer' ] }; - $('form div.box').has('input:file').each(function() { - $(this).on({ - dragover: dragOverHandler, - dragleave: dragOutHandler, - drop: handleFileDropEvent - }); - }); - } + $('form div.box').has('input:file').each(function() { + $(this).on({ + dragover: dragOverHandler, + dragleave: dragOutHandler, + drop: handleFileDropEvent + }); + }); + } } $(document).ready(setupFileDrop); +$(function(){ + $(".file_selector").each(function() { + deleteallfiles = $(this).data('deleteAllFiles'); + var containerid = $(this).data('containerid'); + if (containerid == undefined)containerid = ''; + var count = $('#attachments_fields' + containerid + '>span').length; + if (count >= 1) { + $('#upload_file_count' + containerid).html("" + count + "" + $(this).data('fileCount')); + var add_attachs = $('.add_attachment').filter(function (index) { + return $(this).data('containerid') == containerid; + }); + var delete_all = $('.remove_all').filter(function (index) { + return $(this).data('containerid') == containerid; + }); + if (delete_all.length < 1) { + add_attachs.append($(" ").attr({ + "href": "javascript:void(0)", + 'class': 'remove_all', + 'data-containerid': containerid, + "onclick": "removeAll('" + containerid + "')" + })); + } + + } + }); +}); \ No newline at end of file diff --git a/public/javascripts/avatars.js b/public/javascripts/avatars.js index 3d8420dc0..571ea4982 100644 --- a/public/javascripts/avatars.js +++ b/public/javascripts/avatars.js @@ -52,13 +52,14 @@ function ajaxUpload(file, fileSpan, inputEl) { fileSpan.removeClass('ajax-loading'); var form = fileSpan.parents('form'); - if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) { - $('input:submit', form).removeAttr('disabled'); - } - form.dequeue('upload'); + // if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) { + // $('input:submit', form).removeAttr('disabled'); + // } + // form.dequeue('upload'); }); } + var progressSpan = $('#upload_progressbar'); progressSpan.progressbar(); fileSpan.addClass('ajax-waiting'); @@ -190,6 +191,9 @@ function dragOutHandler(e) { } function setupFileDrop() { + $('#avatar_image').on('click', function(){ + console.log("click"); + }); if (window.File && window.FileList && window.ProgressEvent && window.FormData) { $.event.fixHooks.drop = { props: [ 'dataTransfer' ] }; diff --git a/public/javascripts/cookie.js b/public/javascripts/cookie.js new file mode 100644 index 000000000..9e14ed810 --- /dev/null +++ b/public/javascripts/cookie.js @@ -0,0 +1,39 @@ +//保存cookie +//n:cookie的名字 +//v:cookie的值 +//mins:时间(分钟) +//dn: +//path:保存路径 +function cookiesave(n, v, mins, dn, path) +{ + if(n) + { + + if(!mins) mins = 365 * 24 * 60; + if(!path) path = "/"; + var date = new Date(); + + date.setTime(date.getTime() + (mins * 60 * 1000)); + + var expires = "; expires=" + date.toGMTString(); + + if(dn) dn = "domain=" + dn + "; "; + document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; + + } +} + +//获取cookie +function cookieget(n) +{ + var name = n + "="; + var ca = document.cookie.split(';'); + for(var i=0;i + options.maxNumberOfFiles) { + file.error = settings.i18n('maxNumberOfFiles'); + } else if (options.acceptFileTypes && + !(options.acceptFileTypes.test(file.type) || + options.acceptFileTypes.test(file.name))) { + file.error = settings.i18n('acceptFileTypes'); + } else if (fileSize > options.maxFileSize) { + file.error = settings.i18n('maxFileSize'); + } else if ($.type(fileSize) === 'number' && + fileSize < options.minFileSize) { + file.error = settings.i18n('minFileSize'); + } else { + delete file.error; + } + if (file.error || data.files.error) { + data.files.error = true; + dfd.rejectWith(this, [data]); + } else { + dfd.resolveWith(this, [data]); + } + return dfd.promise(); + } + + } + + }); + +})); diff --git a/public/javascripts/jq-upload/jquery.fileupload.js b/public/javascripts/jq-upload/jquery.fileupload.js new file mode 100644 index 000000000..9819d10ec --- /dev/null +++ b/public/javascripts/jq-upload/jquery.fileupload.js @@ -0,0 +1,1467 @@ +/* + * jQuery File Upload Plugin 5.42.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, document, location, Blob, FormData */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'jquery.ui.widget' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./vendor/jquery.ui.widget') + ); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Detect file input support, based on + // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ + $.support.fileInput = !(new RegExp( + // Handle devices which give false positives for the feature detection: + '(Android (1\\.[0156]|2\\.[01]))' + + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + + '|(w(eb)?OSBrowser)|(webOS)' + + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' + ).test(window.navigator.userAgent) || + // Feature detection for all other devices: + $('').prop('disabled')); + + // The FileReader API is not actually used, but works as feature detection, + // as some Safari versions (5?) support XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads. + // window.XMLHttpRequestUpload is not available on IE10, so we check for + // window.ProgressEvent instead to detect XHR2 file upload capability: + $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); + $.support.xhrFormDataFileUpload = !!window.FormData; + + // Detect support for Blob slicing (required for chunked uploads): + $.support.blobSlice = window.Blob && (Blob.prototype.slice || + Blob.prototype.webkitSlice || Blob.prototype.mozSlice); + + // Helper function to create drag handlers for dragover/dragenter/dragleave: + function getDragHandler(type) { + var isDragOver = type === 'dragover'; + return function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var dataTransfer = e.dataTransfer; + if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && + this._trigger( + type, + $.Event(type, {delegatedEvent: e}) + ) !== false) { + e.preventDefault(); + if (isDragOver) { + dataTransfer.dropEffect = 'copy'; + } + } + }; + } + + // The fileupload widget listens for change events on file input fields defined + // via fileInput setting and paste or drop events of the given dropZone. + // In addition to the default jQuery Widget methods, the fileupload widget + // exposes the "add" and "send" methods, to add or directly send files using + // the fileupload API. + // By default, files added via file input selection, paste, drag & drop or + // "add" method are uploaded immediately, but it is possible to override + // the "add" callback option to queue file uploads. + $.widget('blueimp.fileupload', { + + options: { + // The drop target element(s), by the default the complete document. + // Set to null to disable drag & drop support: + dropZone: $(document), + // The paste target element(s), by the default undefined. + // Set to a DOM node or jQuery object to enable file pasting: + pasteZone: undefined, + // The file input field(s), that are listened to for change events. + // If undefined, it is set to the file input fields inside + // of the widget element on plugin initialization. + // Set to null to disable the change listener. + fileInput: undefined, + // By default, the file input field is replaced with a clone after + // each input field change event. This is required for iframe transport + // queues and allows change events to be fired for the same file + // selection, but can be disabled by setting the following option to false: + replaceFileInput: true, + // The parameter name for the file form data (the request argument name). + // If undefined or empty, the name property of the file input field is + // used, or "files[]" if the file input name property is also empty, + // can be a string or an array of strings: + paramName: undefined, + // By default, each file of a selection is uploaded using an individual + // request for XHR type uploads. Set to false to upload file + // selections in one request each: + singleFileUploads: true, + // To limit the number of files uploaded with one XHR request, + // set the following option to an integer greater than 0: + limitMultiFileUploads: undefined, + // The following option limits the number of files uploaded with one + // XHR request to keep the request size under or equal to the defined + // limit in bytes: + limitMultiFileUploadSize: undefined, + // Multipart file uploads add a number of bytes to each uploaded file, + // therefore the following option adds an overhead for each file used + // in the limitMultiFileUploadSize configuration: + limitMultiFileUploadSizeOverhead: 512, + // Set the following option to true to issue all file upload requests + // in a sequential order: + sequentialUploads: false, + // To limit the number of concurrent uploads, + // set the following option to an integer greater than 0: + limitConcurrentUploads: undefined, + // Set the following option to true to force iframe transport uploads: + forceIframeTransport: false, + // Set the following option to the location of a redirect url on the + // origin server, for cross-domain iframe transport uploads: + redirect: undefined, + // The parameter name for the redirect url, sent as part of the form + // data and set to 'redirect' if this option is empty: + redirectParamName: undefined, + // Set the following option to the location of a postMessage window, + // to enable postMessage transport uploads: + postMessage: undefined, + // By default, XHR file uploads are sent as multipart/form-data. + // The iframe transport is always using multipart/form-data. + // Set to false to enable non-multipart XHR uploads: + multipart: true, + // To upload large files in smaller chunks, set the following option + // to a preferred maximum chunk size. If set to 0, null or undefined, + // or the browser does not support the required Blob API, files will + // be uploaded as a whole. + maxChunkSize: undefined, + // When a non-multipart upload or a chunked multipart upload has been + // aborted, this option can be used to resume the upload by setting + // it to the size of the already uploaded bytes. This option is most + // useful when modifying the options object inside of the "add" or + // "send" callbacks, as the options are cloned for each file upload. + uploadedBytes: undefined, + // By default, failed (abort or error) file uploads are removed from the + // global progress calculation. Set the following option to false to + // prevent recalculating the global progress data: + recalculateProgress: true, + // Interval in milliseconds to calculate and trigger progress events: + progressInterval: 100, + // Interval in milliseconds to calculate progress bitrate: + bitrateInterval: 500, + // By default, uploads are started automatically when adding files: + autoUpload: true, + + // Error and info messages: + messages: { + uploadedBytes: 'Uploaded bytes exceed file size' + }, + + // Translation function, gets the message key to be translated + // and an object with context specific data as arguments: + i18n: function (message, context) { + message = this.messages[message] || message.toString(); + if (context) { + $.each(context, function (key, value) { + message = message.replace('{' + key + '}', value); + }); + } + return message; + }, + + // Additional form data to be sent along with the file uploads can be set + // using this option, which accepts an array of objects with name and + // value properties, a function returning such an array, a FormData + // object (for XHR file uploads), or a simple object. + // The form of the first fileInput is given as parameter to the function: + formData: function (form) { + return form.serializeArray(); + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop, paste or add API call). + // If the singleFileUploads option is enabled, this callback will be + // called once for each file in the selection for XHR file uploads, else + // once for each file selection. + // + // The upload starts when the submit method is invoked on the data parameter. + // The data object contains a files property holding the added files + // and allows you to override plugin options as well as define ajax settings. + // + // Listeners for this callback can also be bound the following way: + // .bind('fileuploadadd', func); + // + // data.submit() returns a Promise object and allows to attach additional + // handlers using jQuery's Deferred callbacks: + // data.submit().done(func).fail(func).always(func); + add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + if (data.autoUpload || (data.autoUpload !== false && + $(this).fileupload('option', 'autoUpload'))) { + data.process().done(function () { + data.submit(); + }); + } + }, + + // Other callbacks: + + // Callback for the submit event of each file upload: + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); + + // Callback for the start of each file upload request: + // send: function (e, data) {}, // .bind('fileuploadsend', func); + + // Callback for successful uploads: + // done: function (e, data) {}, // .bind('fileuploaddone', func); + + // Callback for failed (abort or error) uploads: + // fail: function (e, data) {}, // .bind('fileuploadfail', func); + + // Callback for completed (success, abort or error) requests: + // always: function (e, data) {}, // .bind('fileuploadalways', func); + + // Callback for upload progress events: + // progress: function (e, data) {}, // .bind('fileuploadprogress', func); + + // Callback for global upload progress events: + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); + + // Callback for uploads start, equivalent to the global ajaxStart event: + // start: function (e) {}, // .bind('fileuploadstart', func); + + // Callback for uploads stop, equivalent to the global ajaxStop event: + // stop: function (e) {}, // .bind('fileuploadstop', func); + + // Callback for change events of the fileInput(s): + // change: function (e, data) {}, // .bind('fileuploadchange', func); + + // Callback for paste events to the pasteZone(s): + // paste: function (e, data) {}, // .bind('fileuploadpaste', func); + + // Callback for drop events of the dropZone(s): + // drop: function (e, data) {}, // .bind('fileuploaddrop', func); + + // Callback for dragover events of the dropZone(s): + // dragover: function (e) {}, // .bind('fileuploaddragover', func); + + // Callback for the start of each chunk upload request: + // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); + + // Callback for successful chunk uploads: + // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); + + // Callback for failed (abort or error) chunk uploads: + // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); + + // Callback for completed (success, abort or error) chunk upload requests: + // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); + + // The plugin options are used as settings object for the ajax calls. + // The following are jQuery ajax settings required for the file uploads: + processData: false, + contentType: false, + cache: false + }, + + // A list of options that require reinitializing event listeners and/or + // special initialization code: + _specialOptions: [ + 'fileInput', + 'dropZone', + 'pasteZone', + 'multipart', + 'forceIframeTransport' + ], + + _blobSlice: $.support.blobSlice && function () { + var slice = this.slice || this.webkitSlice || this.mozSlice; + return slice.apply(this, arguments); + }, + + _BitrateTimer: function () { + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); + this.loaded = 0; + this.bitrate = 0; + this.getBitrate = function (now, loaded, interval) { + var timeDiff = now - this.timestamp; + if (!this.bitrate || !interval || timeDiff > interval) { + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; + this.loaded = loaded; + this.timestamp = now; + } + return this.bitrate; + }; + }, + + _isXHRUpload: function (options) { + return !options.forceIframeTransport && + ((!options.multipart && $.support.xhrFileUpload) || + $.support.xhrFormDataFileUpload); + }, + + _getFormData: function (options) { + var formData; + if ($.type(options.formData) === 'function') { + return options.formData(options.form); + } + if ($.isArray(options.formData)) { + return options.formData; + } + if ($.type(options.formData) === 'object') { + formData = []; + $.each(options.formData, function (name, value) { + formData.push({name: name, value: value}); + }); + return formData; + } + return []; + }, + + _getTotal: function (files) { + var total = 0; + $.each(files, function (index, file) { + total += file.size || 1; + }); + return total; + }, + + _initProgressObject: function (obj) { + var progress = { + loaded: 0, + total: 0, + bitrate: 0 + }; + if (obj._progress) { + $.extend(obj._progress, progress); + } else { + obj._progress = progress; + } + }, + + _initResponseObject: function (obj) { + var prop; + if (obj._response) { + for (prop in obj._response) { + if (obj._response.hasOwnProperty(prop)) { + delete obj._response[prop]; + } + } + } else { + obj._response = {}; + } + }, + + _onProgress: function (e, data) { + if (e.lengthComputable) { + var now = ((Date.now) ? Date.now() : (new Date()).getTime()), + loaded; + if (data._time && data.progressInterval && + (now - data._time < data.progressInterval) && + e.loaded !== e.total) { + return; + } + data._time = now; + loaded = Math.floor( + e.loaded / e.total * (data.chunkSize || data._progress.total) + ) + (data.uploadedBytes || 0); + // Add the difference from the previously loaded state + // to the global loaded counter: + this._progress.loaded += (loaded - data._progress.loaded); + this._progress.bitrate = this._bitrateTimer.getBitrate( + now, + this._progress.loaded, + data.bitrateInterval + ); + data._progress.loaded = data.loaded = loaded; + data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( + now, + loaded, + data.bitrateInterval + ); + // Trigger a custom progress event with a total data property set + // to the file size(s) of the current upload and a loaded data + // property calculated accordingly: + this._trigger( + 'progress', + $.Event('progress', {delegatedEvent: e}), + data + ); + // Trigger a global progress event for all current file uploads, + // including ajax calls queued for sequential file uploads: + this._trigger( + 'progressall', + $.Event('progressall', {delegatedEvent: e}), + this._progress + ); + } + }, + + _initProgressListener: function (options) { + var that = this, + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + // Accesss to the native XHR object is required to add event listeners + // for the upload progress event: + if (xhr.upload) { + $(xhr.upload).bind('progress', function (e) { + var oe = e.originalEvent; + // Make sure the progress event properties get copied over: + e.lengthComputable = oe.lengthComputable; + e.loaded = oe.loaded; + e.total = oe.total; + that._onProgress(e, options); + }); + options.xhr = function () { + return xhr; + }; + } + }, + + _isInstanceOf: function (type, obj) { + // Cross-frame instanceof check + return Object.prototype.toString.call(obj) === '[object ' + type + ']'; + }, + + _initXHRData: function (options) { + var that = this, + formData, + file = options.files[0], + // Ignore non-multipart setting if not supported: + multipart = options.multipart || !$.support.xhrFileUpload, + paramName = $.type(options.paramName) === 'array' ? + options.paramName[0] : options.paramName; + options.headers = $.extend({}, options.headers); + if (options.contentRange) { + options.headers['Content-Range'] = options.contentRange; + } + if (!multipart || options.blob || !this._isInstanceOf('File', file)) { + options.headers['Content-Disposition'] = 'attachment; filename="' + + encodeURI(file.name) + '"'; + } + if (!multipart) { + options.contentType = file.type || 'application/octet-stream'; + options.data = options.blob || file; + } else if ($.support.xhrFormDataFileUpload) { + if (options.postMessage) { + // window.postMessage does not allow sending FormData + // objects, so we just add the File/Blob objects to + // the formData array and let the postMessage window + // create the FormData object out of this array: + formData = this._getFormData(options); + if (options.blob) { + formData.push({ + name: paramName, + value: options.blob + }); + } else { + $.each(options.files, function (index, file) { + formData.push({ + name: ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + value: file + }); + }); + } + } else { + if (that._isInstanceOf('FormData', options.formData)) { + formData = options.formData; + } else { + formData = new FormData(); + $.each(this._getFormData(options), function (index, field) { + formData.append(field.name, field.value); + }); + } + if (options.blob) { + formData.append(paramName, options.blob, file.name); + } else { + $.each(options.files, function (index, file) { + // This check allows the tests to run with + // dummy objects: + if (that._isInstanceOf('File', file) || + that._isInstanceOf('Blob', file)) { + formData.append( + ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + file, + file.uploadName || file.name + ); + } + }); + } + } + options.data = formData; + } + // Blob reference is not needed anymore, free memory: + options.blob = null; + }, + + _initIframeSettings: function (options) { + var targetHost = $('').prop('href', options.url).prop('host'); + // Setting the dataType to iframe enables the iframe transport: + options.dataType = 'iframe ' + (options.dataType || ''); + // The iframe transport accepts a serialized array as form data: + options.formData = this._getFormData(options); + // Add redirect url to form data on cross-domain uploads: + if (options.redirect && targetHost && targetHost !== location.host) { + options.formData.push({ + name: options.redirectParamName || 'redirect', + value: options.redirect + }); + } + }, + + _initDataSettings: function (options) { + if (this._isXHRUpload(options)) { + if (!this._chunkedUpload(options, true)) { + if (!options.data) { + this._initXHRData(options); + } + this._initProgressListener(options); + } + if (options.postMessage) { + // Setting the dataType to postmessage enables the + // postMessage transport: + options.dataType = 'postmessage ' + (options.dataType || ''); + } + } else { + this._initIframeSettings(options); + } + }, + + _getParamName: function (options) { + var fileInput = $(options.fileInput), + paramName = options.paramName; + if (!paramName) { + paramName = []; + fileInput.each(function () { + var input = $(this), + name = input.prop('name') || 'files[]', + i = (input.prop('files') || [1]).length; + while (i) { + paramName.push(name); + i -= 1; + } + }); + if (!paramName.length) { + paramName = [fileInput.prop('name') || 'files[]']; + } + } else if (!$.isArray(paramName)) { + paramName = [paramName]; + } + return paramName; + }, + + _initFormSettings: function (options) { + // Retrieve missing options from the input field and the + // associated form, if available: + if (!options.form || !options.form.length) { + options.form = $(options.fileInput.prop('form')); + // If the given file input doesn't have an associated form, + // use the default widget file input's form: + if (!options.form.length) { + options.form = $(this.options.fileInput.prop('form')); + } + } + options.paramName = this._getParamName(options); + if (!options.url) { + options.url = options.form.prop('action') || location.href; + } + // The HTTP request method must be "POST" or "PUT": + options.type = (options.type || + ($.type(options.form.prop('method')) === 'string' && + options.form.prop('method')) || '' + ).toUpperCase(); + if (options.type !== 'POST' && options.type !== 'PUT' && + options.type !== 'PATCH') { + options.type = 'POST'; + } + if (!options.formAcceptCharset) { + options.formAcceptCharset = options.form.attr('accept-charset'); + } + }, + + _getAJAXSettings: function (data) { + var options = $.extend({}, this.options, data); + this._initFormSettings(options); + this._initDataSettings(options); + return options; + }, + + // jQuery 1.6 doesn't provide .state(), + // while jQuery 1.8+ removed .isRejected() and .isResolved(): + _getDeferredState: function (deferred) { + if (deferred.state) { + return deferred.state(); + } + if (deferred.isResolved()) { + return 'resolved'; + } + if (deferred.isRejected()) { + return 'rejected'; + } + return 'pending'; + }, + + // Maps jqXHR callbacks to the equivalent + // methods of the given Promise object: + _enhancePromise: function (promise) { + promise.success = promise.done; + promise.error = promise.fail; + promise.complete = promise.always; + return promise; + }, + + // Creates and returns a Promise object enhanced with + // the jqXHR methods abort, success, error and complete: + _getXHRPromise: function (resolveOrReject, context, args) { + var dfd = $.Deferred(), + promise = dfd.promise(); + context = context || this.options.context || promise; + if (resolveOrReject === true) { + dfd.resolveWith(context, args); + } else if (resolveOrReject === false) { + dfd.rejectWith(context, args); + } + promise.abort = dfd.promise; + return this._enhancePromise(promise); + }, + + // Adds convenience methods to the data callback argument: + _addConvenienceMethods: function (e, data) { + var that = this, + getPromise = function (args) { + return $.Deferred().resolveWith(that, args).promise(); + }; + data.process = function (resolveFunc, rejectFunc) { + if (resolveFunc || rejectFunc) { + data._processQueue = this._processQueue = + (this._processQueue || getPromise([this])).pipe( + function () { + if (data.errorThrown) { + return $.Deferred() + .rejectWith(that, [data]).promise(); + } + return getPromise(arguments); + } + ).pipe(resolveFunc, rejectFunc); + } + return this._processQueue || getPromise([this]); + }; + data.submit = function () { + if (this.state() !== 'pending') { + data.jqXHR = this.jqXHR = + (that._trigger( + 'submit', + $.Event('submit', {delegatedEvent: e}), + this + ) !== false) && that._onSend(e, this); + } + return this.jqXHR || that._getXHRPromise(); + }; + data.abort = function () { + if (this.jqXHR) { + return this.jqXHR.abort(); + } + this.errorThrown = 'abort'; + that._trigger('fail', null, this); + return that._getXHRPromise(false); + }; + data.state = function () { + if (this.jqXHR) { + return that._getDeferredState(this.jqXHR); + } + if (this._processQueue) { + return that._getDeferredState(this._processQueue); + } + }; + data.processing = function () { + return !this.jqXHR && this._processQueue && that + ._getDeferredState(this._processQueue) === 'pending'; + }; + data.progress = function () { + return this._progress; + }; + data.response = function () { + return this._response; + }; + }, + + // Parses the Range header from the server response + // and returns the uploaded bytes: + _getUploadedBytes: function (jqXHR) { + var range = jqXHR.getResponseHeader('Range'), + parts = range && range.split('-'), + upperBytesPos = parts && parts.length > 1 && + parseInt(parts[1], 10); + return upperBytesPos && upperBytesPos + 1; + }, + + // Uploads a file in multiple, sequential requests + // by splitting the file up in multiple blob chunks. + // If the second parameter is true, only tests if the file + // should be uploaded in chunks, but does not invoke any + // upload requests: + _chunkedUpload: function (options, testOnly) { + options.uploadedBytes = options.uploadedBytes || 0; + var that = this, + file = options.files[0], + fs = file.size, + ub = options.uploadedBytes, + mcs = options.maxChunkSize || fs, + slice = this._blobSlice, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + upload; + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || + options.data) { + return false; + } + if (testOnly) { + return true; + } + if (ub >= fs) { + file.error = options.i18n('uploadedBytes'); + return this._getXHRPromise( + false, + options.context, + [null, 'error', file.error] + ); + } + // The chunk upload method: + upload = function () { + // Clone the options object for each chunk upload: + var o = $.extend({}, options), + currentLoaded = o._progress.loaded; + o.blob = slice.call( + file, + ub, + ub + mcs, + file.type + ); + // Store the current chunk size, as the blob itself + // will be dereferenced after data processing: + o.chunkSize = o.blob.size; + // Expose the chunk bytes position range: + o.contentRange = 'bytes ' + ub + '-' + + (ub + o.chunkSize - 1) + '/' + fs; + // Process the upload data (the blob and potential form data): + that._initXHRData(o); + // Add progress listeners for this chunk upload: + that._initProgressListener(o); + jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || + that._getXHRPromise(false, o.context)) + .done(function (result, textStatus, jqXHR) { + ub = that._getUploadedBytes(jqXHR) || + (ub + o.chunkSize); + // Create a progress event if no final progress event + // with loaded equaling total has been triggered + // for this chunk: + if (currentLoaded + o.chunkSize - o._progress.loaded) { + that._onProgress($.Event('progress', { + lengthComputable: true, + loaded: ub - o.uploadedBytes, + total: ub - o.uploadedBytes + }), o); + } + options.uploadedBytes = o.uploadedBytes = ub; + o.result = result; + o.textStatus = textStatus; + o.jqXHR = jqXHR; + that._trigger('chunkdone', null, o); + that._trigger('chunkalways', null, o); + if (ub < fs) { + // File upload not yet complete, + // continue with the next chunk: + upload(); + } else { + dfd.resolveWith( + o.context, + [result, textStatus, jqXHR] + ); + } + }) + .fail(function (jqXHR, textStatus, errorThrown) { + o.jqXHR = jqXHR; + o.textStatus = textStatus; + o.errorThrown = errorThrown; + that._trigger('chunkfail', null, o); + that._trigger('chunkalways', null, o); + dfd.rejectWith( + o.context, + [jqXHR, textStatus, errorThrown] + ); + }); + }; + this._enhancePromise(promise); + promise.abort = function () { + return jqXHR.abort(); + }; + upload(); + return promise; + }, + + _beforeSend: function (e, data) { + if (this._active === 0) { + // the start callback is triggered when an upload starts + // and no other uploads are currently running, + // equivalent to the global ajaxStart event: + this._trigger('start'); + // Set timer for global bitrate progress calculation: + this._bitrateTimer = new this._BitrateTimer(); + // Reset the global progress values: + this._progress.loaded = this._progress.total = 0; + this._progress.bitrate = 0; + } + // Make sure the container objects for the .response() and + // .progress() methods on the data object are available + // and reset to their initial state: + this._initResponseObject(data); + this._initProgressObject(data); + data._progress.loaded = data.loaded = data.uploadedBytes || 0; + data._progress.total = data.total = this._getTotal(data.files) || 1; + data._progress.bitrate = data.bitrate = 0; + this._active += 1; + // Initialize the global progress values: + this._progress.loaded += data.loaded; + this._progress.total += data.total; + }, + + _onDone: function (result, textStatus, jqXHR, options) { + var total = options._progress.total, + response = options._response; + if (options._progress.loaded < total) { + // Create a progress event if no final progress event + // with loaded equaling total has been triggered: + this._onProgress($.Event('progress', { + lengthComputable: true, + loaded: total, + total: total + }), options); + } + response.result = options.result = result; + response.textStatus = options.textStatus = textStatus; + response.jqXHR = options.jqXHR = jqXHR; + this._trigger('done', null, options); + }, + + _onFail: function (jqXHR, textStatus, errorThrown, options) { + var response = options._response; + if (options.recalculateProgress) { + // Remove the failed (error or abort) file upload from + // the global progress calculation: + this._progress.loaded -= options._progress.loaded; + this._progress.total -= options._progress.total; + } + response.jqXHR = options.jqXHR = jqXHR; + response.textStatus = options.textStatus = textStatus; + response.errorThrown = options.errorThrown = errorThrown; + this._trigger('fail', null, options); + }, + + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { + // jqXHRorResult, textStatus and jqXHRorError are added to the + // options object via done and fail callbacks + this._trigger('always', null, options); + }, + + _onSend: function (e, data) { + if (!data.submit) { + this._addConvenienceMethods(e, data); + } + var that = this, + jqXHR, + aborted, + slot, + pipe, + options = that._getAJAXSettings(data), + send = function () { + that._sending += 1; + // Set timer for bitrate progress calculation: + options._bitrateTimer = new that._BitrateTimer(); + jqXHR = jqXHR || ( + ((aborted || that._trigger( + 'send', + $.Event('send', {delegatedEvent: e}), + options + ) === false) && + that._getXHRPromise(false, options.context, aborted)) || + that._chunkedUpload(options) || $.ajax(options) + ).done(function (result, textStatus, jqXHR) { + that._onDone(result, textStatus, jqXHR, options); + }).fail(function (jqXHR, textStatus, errorThrown) { + that._onFail(jqXHR, textStatus, errorThrown, options); + }).always(function (jqXHRorResult, textStatus, jqXHRorError) { + that._onAlways( + jqXHRorResult, + textStatus, + jqXHRorError, + options + ); + that._sending -= 1; + that._active -= 1; + if (options.limitConcurrentUploads && + options.limitConcurrentUploads > that._sending) { + // Start the next queued upload, + // that has not been aborted: + var nextSlot = that._slots.shift(); + while (nextSlot) { + if (that._getDeferredState(nextSlot) === 'pending') { + nextSlot.resolve(); + break; + } + nextSlot = that._slots.shift(); + } + } + if (that._active === 0) { + // The stop callback is triggered when all uploads have + // been completed, equivalent to the global ajaxStop event: + that._trigger('stop'); + } + }); + return jqXHR; + }; + this._beforeSend(e, options); + if (this.options.sequentialUploads || + (this.options.limitConcurrentUploads && + this.options.limitConcurrentUploads <= this._sending)) { + if (this.options.limitConcurrentUploads > 1) { + slot = $.Deferred(); + this._slots.push(slot); + pipe = slot.pipe(send); + } else { + this._sequence = this._sequence.pipe(send, send); + pipe = this._sequence; + } + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe.abort = function () { + aborted = [undefined, 'abort', 'abort']; + if (!jqXHR) { + if (slot) { + slot.rejectWith(options.context, aborted); + } + return send(); + } + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + } + return send(); + }, + + _onAdd: function (e, data) { + var that = this, + result = true, + options = $.extend({}, this.options, data), + files = data.files, + filesLength = files.length, + limit = options.limitMultiFileUploads, + limitSize = options.limitMultiFileUploadSize, + overhead = options.limitMultiFileUploadSizeOverhead, + batchSize = 0, + paramName = this._getParamName(options), + paramNameSet, + paramNameSlice, + fileSet, + i, + j = 0; + if (limitSize && (!filesLength || files[0].size === undefined)) { + limitSize = undefined; + } + if (!(options.singleFileUploads || limit || limitSize) || + !this._isXHRUpload(options)) { + fileSet = [files]; + paramNameSet = [paramName]; + } else if (!(options.singleFileUploads || limitSize) && limit) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i += limit) { + fileSet.push(files.slice(i, i + limit)); + paramNameSlice = paramName.slice(i, i + limit); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + } + } else if (!options.singleFileUploads && limitSize) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i = i + 1) { + batchSize += files[i].size + overhead; + if (i + 1 === filesLength || + ((batchSize + files[i + 1].size + overhead) > limitSize) || + (limit && i + 1 - j >= limit)) { + fileSet.push(files.slice(j, i + 1)); + paramNameSlice = paramName.slice(j, i + 1); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + j = i + 1; + batchSize = 0; + } + } + } else { + paramNameSet = paramName; + } + data.originalFiles = files; + $.each(fileSet || files, function (index, element) { + var newData = $.extend({}, data); + newData.files = fileSet ? element : [element]; + newData.paramName = paramNameSet[index]; + that._initResponseObject(newData); + that._initProgressObject(newData); + that._addConvenienceMethods(e, newData); + result = that._trigger( + 'add', + $.Event('add', {delegatedEvent: e}), + newData + ); + return result; + }); + return result; + }, + + _replaceFileInput: function (data) { + var input = data.fileInput, + inputClone = input.clone(true); + // Add a reference for the new cloned file input to the data argument: + data.fileInputClone = inputClone; + $('
      ').append(inputClone)[0].reset(); + // Detaching allows to insert the fileInput on another form + // without loosing the file input value: + input.after(inputClone).detach(); + // Avoid memory leaks with the detached file input: + $.cleanData(input.unbind('remove')); + // Replace the original file input element in the fileInput + // elements set with the clone, which has been copied including + // event handlers: + this.options.fileInput = this.options.fileInput.map(function (i, el) { + if (el === input[0]) { + return inputClone[0]; + } + return el; + }); + // If the widget has been initialized on the file input itself, + // override this.element with the file input clone: + if (input[0] === this.element[0]) { + this.element = inputClone; + } + }, + + _handleFileTreeEntry: function (entry, path) { + var that = this, + dfd = $.Deferred(), + errorHandler = function (e) { + if (e && !e.entry) { + e.entry = entry; + } + // Since $.when returns immediately if one + // Deferred is rejected, we use resolve instead. + // This allows valid files and invalid items + // to be returned together in one set: + dfd.resolve([e]); + }, + successHandler = function (entries) { + that._handleFileTreeEntries( + entries, + path + entry.name + '/' + ).done(function (files) { + dfd.resolve(files); + }).fail(errorHandler); + }, + readEntries = function () { + dirReader.readEntries(function (results) { + if (!results.length) { + successHandler(entries); + } else { + entries = entries.concat(results); + readEntries(); + } + }, errorHandler); + }, + dirReader, entries = []; + path = path || ''; + if (entry.isFile) { + if (entry._file) { + // Workaround for Chrome bug #149735 + entry._file.relativePath = path; + dfd.resolve(entry._file); + } else { + entry.file(function (file) { + file.relativePath = path; + dfd.resolve(file); + }, errorHandler); + } + } else if (entry.isDirectory) { + dirReader = entry.createReader(); + readEntries(); + } else { + // Return an empy list for file system items + // other than files or directories: + dfd.resolve([]); + } + return dfd.promise(); + }, + + _handleFileTreeEntries: function (entries, path) { + var that = this; + return $.when.apply( + $, + $.map(entries, function (entry) { + return that._handleFileTreeEntry(entry, path); + }) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _getDroppedFiles: function (dataTransfer) { + dataTransfer = dataTransfer || {}; + var items = dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry || + items[0].getAsEntry)) { + return this._handleFileTreeEntries( + $.map(items, function (item) { + var entry; + if (item.webkitGetAsEntry) { + entry = item.webkitGetAsEntry(); + if (entry) { + // Workaround for Chrome bug #149735: + entry._file = item.getAsFile(); + } + return entry; + } + return item.getAsEntry(); + }) + ); + } + return $.Deferred().resolve( + $.makeArray(dataTransfer.files) + ).promise(); + }, + + _getSingleFileInputFiles: function (fileInput) { + fileInput = $(fileInput); + var entries = fileInput.prop('webkitEntries') || + fileInput.prop('entries'), + files, + value; + if (entries && entries.length) { + return this._handleFileTreeEntries(entries); + } + files = $.makeArray(fileInput.prop('files')); + if (!files.length) { + value = fileInput.prop('value'); + if (!value) { + return $.Deferred().resolve([]).promise(); + } + // If the files property is not available, the browser does not + // support the File API and we add a pseudo File object with + // the input value as name with path information removed: + files = [{name: value.replace(/^.*\\/, '')}]; + } else if (files[0].name === undefined && files[0].fileName) { + // File normalization for Safari 4 and Firefox 3: + $.each(files, function (index, file) { + file.name = file.fileName; + file.size = file.fileSize; + }); + } + return $.Deferred().resolve(files).promise(); + }, + + _getFileInputFiles: function (fileInput) { + if (!(fileInput instanceof $) || fileInput.length === 1) { + return this._getSingleFileInputFiles(fileInput); + } + return $.when.apply( + $, + $.map(fileInput, this._getSingleFileInputFiles) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _onChange: function (e) { + var that = this, + data = { + fileInput: $(e.target), + form: $(e.target.form) + }; + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + if (that.options.replaceFileInput) { + that._replaceFileInput(data); + } + if (that._trigger( + 'change', + $.Event('change', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + }, + + _onPaste: function (e) { + var items = e.originalEvent && e.originalEvent.clipboardData && + e.originalEvent.clipboardData.items, + data = {files: []}; + if (items && items.length) { + $.each(items, function (index, item) { + var file = item.getAsFile && item.getAsFile(); + if (file) { + data.files.push(file); + } + }); + if (this._trigger( + 'paste', + $.Event('paste', {delegatedEvent: e}), + data + ) !== false) { + this._onAdd(e, data); + } + } + }, + + _onDrop: function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var that = this, + dataTransfer = e.dataTransfer, + data = {}; + if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { + e.preventDefault(); + this._getDroppedFiles(dataTransfer).always(function (files) { + data.files = files; + if (that._trigger( + 'drop', + $.Event('drop', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + } + }, + + _onDragOver: getDragHandler('dragover'), + + _onDragEnter: getDragHandler('dragenter'), + + _onDragLeave: getDragHandler('dragleave'), + + _initEventHandlers: function () { + if (this._isXHRUpload(this.options)) { + this._on(this.options.dropZone, { + dragover: this._onDragOver, + drop: this._onDrop, + // event.preventDefault() on dragenter is required for IE10+: + dragenter: this._onDragEnter, + // dragleave is not required, but added for completeness: + dragleave: this._onDragLeave + }); + this._on(this.options.pasteZone, { + paste: this._onPaste + }); + } + if ($.support.fileInput) { + this._on(this.options.fileInput, { + change: this._onChange + }); + } + }, + + _destroyEventHandlers: function () { + this._off(this.options.dropZone, 'dragenter dragleave dragover drop'); + this._off(this.options.pasteZone, 'paste'); + this._off(this.options.fileInput, 'change'); + }, + + _setOption: function (key, value) { + var reinit = $.inArray(key, this._specialOptions) !== -1; + if (reinit) { + this._destroyEventHandlers(); + } + this._super(key, value); + if (reinit) { + this._initSpecialOptions(); + this._initEventHandlers(); + } + }, + + _initSpecialOptions: function () { + var options = this.options; + if (options.fileInput === undefined) { + options.fileInput = this.element.is('input[type="file"]') ? + this.element : this.element.find('input[type="file"]'); + } else if (!(options.fileInput instanceof $)) { + options.fileInput = $(options.fileInput); + } + if (!(options.dropZone instanceof $)) { + options.dropZone = $(options.dropZone); + } + if (!(options.pasteZone instanceof $)) { + options.pasteZone = $(options.pasteZone); + } + }, + + _getRegExp: function (str) { + var parts = str.split('/'), + modifiers = parts.pop(); + parts.shift(); + return new RegExp(parts.join('/'), modifiers); + }, + + _isRegExpOption: function (key, value) { + return key !== 'url' && $.type(value) === 'string' && + /^\/.*\/[igm]{0,3}$/.test(value); + }, + + _initDataAttributes: function () { + var that = this, + options = this.options, + data = this.element.data(); + // Initialize options set via HTML5 data-attributes: + $.each( + this.element[0].attributes, + function (index, attr) { + var key = attr.name.toLowerCase(), + value; + if (/^data-/.test(key)) { + // Convert hyphen-ated key to camelCase: + key = key.slice(5).replace(/-[a-z]/g, function (str) { + return str.charAt(1).toUpperCase(); + }); + value = data[key]; + if (that._isRegExpOption(key, value)) { + value = that._getRegExp(value); + } + options[key] = value; + } + } + ); + }, + + _create: function () { + this._initDataAttributes(); + this._initSpecialOptions(); + this._slots = []; + this._sequence = this._getXHRPromise(true); + this._sending = this._active = 0; + this._initProgressObject(this); + this._initEventHandlers(); + }, + + // This method is exposed to the widget API and allows to query + // the number of active uploads: + active: function () { + return this._active; + }, + + // This method is exposed to the widget API and allows to query + // the widget upload progress. + // It returns an object with loaded, total and bitrate properties + // for the running uploads: + progress: function () { + return this._progress; + }, + + // This method is exposed to the widget API and allows adding files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('add', {files: filesList}); + add: function (data) { + var that = this; + if (!data || this.options.disabled) { + return; + } + if (data.fileInput && !data.files) { + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + that._onAdd(null, data); + }); + } else { + data.files = $.makeArray(data.files); + this._onAdd(null, data); + } + }, + + // This method is exposed to the widget API and allows sending files + // using the fileupload API. The data parameter accepts an object which + // must have a files or fileInput property and can contain additional options: + // .fileupload('send', {files: filesList}); + // The method returns a Promise object for the file upload call. + send: function (data) { + if (data && !this.options.disabled) { + if (data.fileInput && !data.files) { + var that = this, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + aborted; + promise.abort = function () { + aborted = true; + if (jqXHR) { + return jqXHR.abort(); + } + dfd.reject(null, 'abort', 'abort'); + return promise; + }; + this._getFileInputFiles(data.fileInput).always( + function (files) { + if (aborted) { + return; + } + if (!files.length) { + dfd.reject(); + return; + } + data.files = files; + jqXHR = that._onSend(null, data); + jqXHR.then( + function (result, textStatus, jqXHR) { + dfd.resolve(result, textStatus, jqXHR); + }, + function (jqXHR, textStatus, errorThrown) { + dfd.reject(jqXHR, textStatus, errorThrown); + } + ); + } + ); + return this._enhancePromise(promise); + } + data.files = $.makeArray(data.files); + if (data.files.length) { + return this._onSend(null, data); + } + } + return this._getXHRPromise(false, data && data.context); + } + + }); + +})); diff --git a/public/javascripts/jq-upload/jquery.iframe-transport.js b/public/javascripts/jq-upload/jquery.iframe-transport.js new file mode 100644 index 000000000..b7581f23f --- /dev/null +++ b/public/javascripts/jq-upload/jquery.iframe-transport.js @@ -0,0 +1,217 @@ +/* + * jQuery Iframe Transport Plugin 1.8.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/* global define, require, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory(require('jquery')); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Helper variable to create unique names for the transport iframes: + var counter = 0; + + // The iframe transport accepts four additional options: + // options.fileInput: a jQuery collection of file input fields + // options.paramName: the parameter name for the file form data, + // overrides the name property of the file input field(s), + // can be a string or an array of strings. + // options.formData: an array of objects with name and value properties, + // equivalent to the return data of .serializeArray(), e.g.: + // [{name: 'a', value: 1}, {name: 'b', value: 2}] + // options.initialIframeSrc: the URL of the initial iframe src, + // by default set to "javascript:false;" + $.ajaxTransport('iframe', function (options) { + if (options.async) { + // javascript:false as initial iframe src + // prevents warning popups on HTTPS in IE6: + /*jshint scripturl: true */ + var initialIframeSrc = options.initialIframeSrc || 'javascript:false;', + /*jshint scripturl: false */ + form, + iframe, + addParamChar; + return { + send: function (_, completeCallback) { + form = $('
      '); + form.attr('accept-charset', options.formAcceptCharset); + addParamChar = /\?/.test(options.url) ? '&' : '?'; + // XDomainRequest only supports GET and POST: + if (options.type === 'DELETE') { + options.url = options.url + addParamChar + '_method=DELETE'; + options.type = 'POST'; + } else if (options.type === 'PUT') { + options.url = options.url + addParamChar + '_method=PUT'; + options.type = 'POST'; + } else if (options.type === 'PATCH') { + options.url = options.url + addParamChar + '_method=PATCH'; + options.type = 'POST'; + } + // IE versions below IE8 cannot set the name property of + // elements that have already been added to the DOM, + // so we set the name along with the iframe HTML markup: + counter += 1; + iframe = $( + '' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + window.setTimeout(function () { + // Removing the form in a setTimeout call + // allows Chrome's developer tools to display + // the response result + form.remove(); + }, 0); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + // Remove the HTML5 form attribute from the input(s): + options.fileInput.removeAttr('form'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + // Restore the original name and form properties: + $(input) + .prop('name', clone.prop('name')) + .attr('form', clone.attr('form')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', initialIframeSrc); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, xml + // and script. + // Please note that the Content-Type for JSON responses has to be text/plain + // or text/html, if the browser doesn't include application/json in the + // Accept header, else IE will show a download dialog. + // The Content-Type for XML responses on the other hand has to be always + // application/xml or text/xml, so IE properly parses the XML response. + // See also + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return iframe && $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return iframe && $.parseJSON($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return iframe && $(iframe[0].body).html(); + }, + 'iframe xml': function (iframe) { + var xmlDoc = iframe && iframe[0]; + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || + $(xmlDoc.body).html()); + }, + 'iframe script': function (iframe) { + return iframe && $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/public/javascripts/jq-upload/jquery.ui.widget.js b/public/javascripts/jq-upload/jquery.ui.widget.js new file mode 100644 index 000000000..5ac2ed5a5 --- /dev/null +++ b/public/javascripts/jq-upload/jquery.ui.widget.js @@ -0,0 +1,563 @@ +/*! jQuery UI - v1.11.1+CommonJS - 2014-09-17 +* http://jqueryui.com +* Includes: widget.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + + } else if (typeof exports === "object") { + // Node/CommonJS: + factory(require("jquery")); + + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { +/*! + * jQuery UI Widget 1.11.1 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ + + +var widget_uuid = 0, + widget_slice = Array.prototype.slice; + +$.cleanData = (function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + orig( elems ); + }; +})( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widget_slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = widget_slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( options === "instance" ) { + returnValue = instance; + return false; + } + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
      ", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widget_uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled", !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + } + + return this; + }, + + enable: function() { + return this._setOptions({ disabled: false }); + }, + disable: function() { + return this._setOptions({ disabled: true }); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +var widget = $.widget; + + + +})); diff --git a/public/javascripts/jq-upload/upload.js b/public/javascripts/jq-upload/upload.js new file mode 100644 index 000000000..985450648 --- /dev/null +++ b/public/javascripts/jq-upload/upload.js @@ -0,0 +1,52 @@ +$(function() { + var $upload_file = $('.upload_file'); + + function endsWith(str, suffix) { + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + var validateImage = function(file) { + var types = $upload_file.attr('data-file-type').split(","); + var check = false; + $.each(types, function(n, e) { + if (endsWith(file.name, e)) { + check = true; + } + }); + if (!check) { + alert($upload_file.attr("data-type-support-message") + $upload_file.attr("data-file-type")); + return false; + } + if (file.size && file.size > parseInt($upload_file.attr('data-max-file-size'))) { + alert($upload_file.attr("data-max-file-size-message")); + return false; + } + return true; + }; + $('.upload_file').fileupload({ + url: '/upload_avatar.json?source_type=' + $('.upload_file').attr('data-source-type') + + '&source_id=' + $('.upload_file').attr('data-source-id'), + add: function(e, data) { + if (!validateImage(data.files[0])) { + return false; + } + data.submit(); + }, + formData: function(form) { + var data = form.serializeArray(); + var auth = null; + for (var key in data) { + if (data[key].name == "authenticity_token") { + auth = data[key]; + break; + } + } + return [auth]; + }, + done: function(e, data) { + var imgSpan = jQuery('#avatar_image'); + imgSpan.attr({ + "src": data.result.text ? data.result.text() : data.result + }); + } + }); +}); diff --git a/public/javascripts/paste.js b/public/javascripts/paste.js new file mode 100644 index 000000000..961a29acb --- /dev/null +++ b/public/javascripts/paste.js @@ -0,0 +1,292 @@ +// Generated by CoffeeScript 1.9.0 + +/* +paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks. + +https://github.com/layerssss/paste.js + */ + +(function() { + var $, Paste, createHiddenEditable, dataURLtoBlob; + + $ = window.jQuery; + + $.paste = function(pasteContainer) { + var pm; + if (typeof console !== "undefined" && console !== null) { + console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead."); + } + pm = Paste.mountNonInputable(pasteContainer); + return pm._container; + }; + + $.fn.pastableNonInputable = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountNonInputable(el); + } + return this; + }; + + $.fn.pastableTextarea = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountTextarea(el); + } + return this; + }; + + $.fn.pastableContenteditable = function() { + var el, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + el = this[_i]; + Paste.mountContenteditable(el); + } + return this; + }; + + dataURLtoBlob = function(dataURL, sliceSize) { + var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, slice, _ref; + if (sliceSize == null) { + sliceSize = 512; + } + if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) { + return null; + } + _ref = m, m = _ref[0], contentType = _ref[1], b64Data = _ref[2]; + byteCharacters = atob(b64Data); + byteArrays = []; + offset = 0; + while (offset < byteCharacters.length) { + slice = byteCharacters.slice(offset, offset + sliceSize); + byteNumbers = new Array(slice.length); + i = 0; + while (i < slice.length) { + byteNumbers[i] = slice.charCodeAt(i); + i++; + } + byteArray = new Uint8Array(byteNumbers); + byteArrays.push(byteArray); + offset += sliceSize; + } + return new Blob(byteArrays, { + type: contentType + }); + }; + + createHiddenEditable = function() { + return $(document.createElement('div')).attr('contenteditable', true).css({ + width: 1, + height: 1, + position: 'fixed', + left: -100, + overflow: 'hidden' + }); + }; + + Paste = (function() { + Paste.prototype._target = null; + + Paste.prototype._container = null; + + Paste.mountNonInputable = function(nonInputable) { + var paste; + paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable); + $(nonInputable).on('click', (function(_this) { + return function() { + return paste._container.focus(); + }; + })(this)); + paste._container.on('focus', (function(_this) { + return function() { + return $(nonInputable).addClass('pastable-focus'); + }; + })(this)); + return paste._container.on('blur', (function(_this) { + return function() { + return $(nonInputable).removeClass('pastable-focus'); + }; + })(this)); + }; + + Paste.mountTextarea = function(textarea) { + var ctlDown, paste; + if (-1 !== navigator.userAgent.toLowerCase().indexOf('chrome')) { + return this.mountContenteditable(textarea); + } + paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea); + ctlDown = false; + $(textarea).on('keyup', function(ev) { + var _ref; + if ((_ref = ev.keyCode) === 17 || _ref === 224) { + return ctlDown = false; + } + }); + $(textarea).on('keydown', function(ev) { + var _ref; + if ((_ref = ev.keyCode) === 17 || _ref === 224) { + ctlDown = true; + } + if (ctlDown && ev.keyCode === 86) { + return paste._container.focus(); + } + }); + $(paste._target).on('pasteImage', (function(_this) { + return function() { + return $(textarea).focus(); + }; + })(this)); + $(paste._target).on('pasteText', (function(_this) { + return function() { + return $(textarea).focus(); + }; + })(this)); + $(textarea).on('focus', (function(_this) { + return function() { + return $(textarea).addClass('pastable-focus'); + }; + })(this)); + return $(textarea).on('blur', (function(_this) { + return function() { + return $(textarea).removeClass('pastable-focus'); + }; + })(this)); + }; + + Paste.mountContenteditable = function(contenteditable) { + var paste; + paste = new Paste(contenteditable, contenteditable); + $(contenteditable).on('focus', (function(_this) { + return function() { + return $(contenteditable).addClass('pastable-focus'); + }; + })(this)); + return $(contenteditable).on('blur', (function(_this) { + return function() { + return $(contenteditable).removeClass('pastable-focus'); + }; + })(this)); + }; + + function Paste(_at__container, _at__target) { + this._container = _at__container; + this._target = _at__target; + this._container = $(this._container); + this._target = $(this._target).addClass('pastable'); + this._container.on('paste', (function(_this) { + return function(ev) { + var clipboardData, file, item, reader, text, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _results; + if (((_ref = ev.originalEvent) != null ? _ref.clipboardData : void 0) != null) { + clipboardData = ev.originalEvent.clipboardData; + if (clipboardData.items) { + _ref1 = clipboardData.items; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + item = _ref1[_i]; + if (item.type.match(/^image\//)) { + reader = new FileReader(); + reader.onload = function(event) { + return _this._handleImage(event.target.result); + }; + reader.readAsDataURL(item.getAsFile()); + } + if (item.type === 'text/plain') { + item.getAsString(function(string) { + return _this._target.trigger('pasteText', { + text: string + }); + }); + } + } + } else { + if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) { + text = clipboardData.getData('Text'); + _this._target.trigger('pasteText', { + text: text + }); + } + _this._checkImagesInContainer(function(src) { + return _this._handleImage(src); + }); + } + } + if (clipboardData = window.clipboardData) { + if ((_ref2 = (text = clipboardData.getData('Text'))) != null ? _ref2.length : void 0) { + return _this._target.trigger('pasteText', { + text: text + }); + } else { + _ref3 = clipboardData.files; + _results = []; + for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { + file = _ref3[_j]; + _this._handleImage(URL.createObjectURL(file)); + _results.push(_this._checkImagesInContainer(function() {})); + } + return _results; + } + } + }; + })(this)); + } + + Paste.prototype._handleImage = function(src) { + var loader; + loader = new Image(); + loader.onload = (function(_this) { + return function() { + var blob, canvas, ctx, dataURL; + canvas = document.createElement('canvas'); + canvas.width = loader.width; + canvas.height = loader.height; + ctx = canvas.getContext('2d'); + ctx.drawImage(loader, 0, 0, canvas.width, canvas.height); + dataURL = null; + try { + dataURL = canvas.toDataURL('image/png'); + blob = dataURLtoBlob(dataURL); + } catch (_error) {} + if (dataURL) { + return _this._target.trigger('pasteImage', { + blob: blob, + dataURL: dataURL, + width: loader.width, + height: loader.height + }); + } + }; + })(this); + return loader.src = src; + }; + + Paste.prototype._checkImagesInContainer = function(cb) { + var img, timespan, _i, _len, _ref; + timespan = Math.floor(1000 * Math.random()); + _ref = this._container.find('img'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + img = _ref[_i]; + img["_paste_marked_" + timespan] = true; + } + return setTimeout((function(_this) { + return function() { + var _j, _len1, _ref1, _results; + _ref1 = _this._container.find('img'); + _results = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + img = _ref1[_j]; + if (!img["_paste_marked_" + timespan]) { + cb(img.src); + } + _results.push($(img).remove()); + } + return _results; + }; + })(this), 1); + }; + + return Paste; + + })(); + +}).call(this); diff --git a/public/javascripts/project.js b/public/javascripts/project.js index c2c4ab784..481755410 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -33,9 +33,10 @@ function expand_tools_expand(content) { $("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); } else { - $("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); - $("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); - $("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); +// $("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); +// $("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); +// $("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); + $("#navContent").toggle(500); } // 修改数字控制速度, slideUp(500)控制卷起速度 @@ -58,68 +59,143 @@ function show_more_msg() { arrow.attr("src", "/images/jiantou.jpg") } } - +function show_more_reply(contentid, id2, id3) { + $(contentid).toggleClass("course_description_none"); + var information = $(id2); + var arrow = $(id3); + var val = information.attr("value"); + if (val == "show_more") { + $(id2).text("[收起]"); + information.attr("value", "hide_more"); + arrow.attr("src", "/images/jiantouup.jpg") + } + else { + $(id2).text("[展开]"); + information.attr("value", "show_more"); + arrow.attr("src", "/images/jiantou.jpg") + } +} //项目版本库git帮助文档显示 -function showhelpAndScrollTo(id, focus) { +function showhelpAndScrollTo(id) { + $('#' + id).toggle(); + if(cookieget("repositories_visiable") == "true") + { + cookiesave("repositories_visiable", false,'','',''); + } + else + { + cookiesave("repositories_visiable", true,'','',''); + } var information = $("#showgithelp"); var val = information.attr("value"); - if (val == "show_help") { + if(val=="show_help") + { $("#showgithelp").text("收起Git操作指南"); information.attr("value", "hide_help"); - $('#' + id).show(); - if (focus !== null) { - $('#' + focus).focus(); - } - $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400); } - else { - $("#showgithelp").text("显示Git操作指南"); + else + { + $("#showgithelp").text("展开Git操作指南"); + information.attr("value", "show_help"); + } +} +function showhelpAndScrollToMessage(id, id1, count) { + $('#' + id).toggle(); + if(cookieget("repositories_visiable") == "true") + { + cookiesave("repositories_visiable", false,'','',''); + } + else + { + cookiesave("repositories_visiable", true,'','',''); + } + var information = $(id1); + var val = information.attr("value"); + if(val=="show_help") + { + $(id1).text("收起回复(" + count + ")" ); + information.attr("value", "hide_help"); + } + else + { + $(id1).text("展开回复(" + count + ")"); information.attr("value", "show_help"); - $('#' + id).hide(); } } +$(function(){ + var information = $("#showgithelp"); + var val = information.attr("value"); + if(cookieget("repositories_visiable") == "true") + { + $('#repos_git_more').hide(); + } + else + { + $('#repos_git_more').show(); + $("#showgithelp").text("收起Git操作指南"); + information.attr("value", "hide_help"); + } +}); + + /////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////项目讨论区 -function regexSubject() { - var content = $.trim($("#message_subject").val()); +function regexSubject(id) { + + var subjectid = "#message_subject" + id ; + var content = $.trim($(subjectid).val()); + var message = "#subject_span" + id; if (content.length == 0) { - $("#subject_span").text("主题不能为空"); - $("#subject_span").css('color', '#ff0000'); + $(message).text("主题不能为空"); + $(message).css('color', '#ff0000'); return false; } else { - $("#subject_span").text("填写正确"); - $("#subject_span").css('color', '#008000'); + $(message).text("填写正确"); + $(message).css('color', '#008000'); return true; } return false; } -function regexContent() { - var content = $.trim($("#message_content").val()); +function regexContent(){ +} +function regexContentxx(id) { + + var contentid = "#message_content" + id; + var message = "#message_content_span"+ id; + var ps=document.getElementById('message_content' + id).previousElementSibling.children[1].children[0]; + alert(ps); + document.getElementById('message_content' + id).value = ps.value; + var content = $.trim($(contentid).val()); + alert(content); if (content.length == 0) { - $("#message_content_span").text("描述不能为空"); - $("#message_content_span").css('color', '#ff0000'); + + $(message).text("描述不能为空"); + $(message).css('color', '#ff0000'); return false; } else { - $("#message_content_span").text("填写正确"); - $("#message_content_span").css('color', '#008000'); + + $(message).text("填写正确"); + $(message).css('color', '#008000'); return true; } return false; } // 项目讨论区编辑和提交 -function submitProjectsBoard() { - if (regexSubject() && regexContent()) { - $("#message-form").submit(); +function submitProjectsBoard(id) { + var formid = "#message-form" + id; + + if (regexSubject(id) && regexContent(id)) { + + $(formid).submit(); } } - // 提交新闻 function regexTitle() { var name = $("#news_title").val(); @@ -315,4 +391,45 @@ function submitProjectBoard() { $("#message-form").submit(); } -} \ No newline at end of file +} + +//cookie记忆html区块 显示/隐藏 的代码 start +$(function(){ + var personalized_expand_key = "personalized_expand"; + function personalized_init(){ + var personalized_map = cookieget(personalized_expand_key); + if(personalized_map!=false){ + personalized_map = JSON.parse(personalized_map); + $("*[nhtype='toggle4cookie']").each(function(){ + var personalized_id=$(this).data('id'); + var val = personalized_map[personalized_id]; + if(val!=undefined && val!=$(this).data('val')){ + personalized_click($(this),0); + } + }); + } + } + function personalized_click(obj,timeout){ + var target = $(obj.data('target')); + var oldval = obj.data('val'); + var val=''; + if(oldval=='expand'){val='retract';}else{val='expand';} + obj.data('val',val); + var personalized_map = cookieget(personalized_expand_key); + if(personalized_map == false){ + personalized_map={}; + }else{ + personalized_map = JSON.parse(personalized_map); + } + var personalized_id=obj.data('id'); + personalized_map[personalized_id]=val; + cookiesave(personalized_expand_key,JSON.stringify(personalized_map)); + target.toggle(timeout); + } + $("*[nhtype='toggle4cookie']").click(function(){ + personalized_click($(this),500); + }); + + personalized_init(); +}); +//cookie记忆html区块 显示/隐藏 的代码 end \ No newline at end of file diff --git a/public/statistics/trustie2/gitstats.css b/public/statistics/trustie2/gitstats.css index 2e401fe1f..2abdaf858 100644 --- a/public/statistics/trustie2/gitstats.css +++ b/public/statistics/trustie2/gitstats.css @@ -1,154 +1,154 @@ -/** - * GitStats - default style - */ -body { - color: black; - background-color: #fff; -} - -dt { - font-size: 12px; - font-weight: bold; - float: left; - margin-right: 1em; - margin-left: 10px; -} - -dt:after { - content: ': '; -} - -dd { - font-size: 11px; - display: block; - clear: left; -} - -table { - border: 1px solid black; - border-collapse: collapse; - font-size: 70%; - margin-bottom: 1em; -} - -table.noborders { - border: none; -} - -table.noborders td { - border: none; -} - -.vtable { - float: right; - clear: both; -} - -table.tags td { - vertical-align: top; -} - -th { - background-color: #ddf; -} - -th a { - text-decoration: none; -} - -tr:hover { - background-color: #ddf; -} - -td { - border: 1px solid black; - padding: 0.2em; - padding-left: 0.3em; - padding-right: 0.2em; -} - -/* Navigation bar; tabbed style */ -.nav { - height: 2em; margin-bottom:1.2em; position:relative; overflow:hidden;margin-top: -10px; -} - -.nav ul { - margin:0; position:absolute; bottom:0; padding-left:0.5em; -} - -.nav li { - float:left; - list-style-type:none; - white-space:nowrap; - margin-right:0px; - background:#fff; - position:relative; - margin-bottom:5px; -} - -.nav li a { - font-size: 0.8em; - text-decoration:none; - line-height:1.3em; - padding:2px 6px 2px 6px; - border: 1px solid #ccc; - border-bottom: 1px solid #bbbbbb; - background-color:#FFFFFF; - color:#999; - font-weight:bold; - border-top-left-radius:3px; - border-top-right-radius:3px; -} - -.nav li a:hover { - background-color: #cacbcb; - text-decoration:none; -} - -img { - border: 1px solid black; - padding: 0.5em; - background-color: white; -} - -th img { - border: 0px; - padding: 0px; - background-color: #ddf; -} - -h1 a, h2 a { - color: black; - text-decoration: none; -} - -h1:hover a:after, -h2:hover a:after { - color: #555; -} - -h1 { - font-size: x-large; -} - -h2 { - background-color: #C6E9F1; - border: 1px solid #C6E9F1; - padding-left: 0.5em; - padding-right: 0.5em; - color: black; - font-size: 0.8em; - clear: both; -} - -h2 a { - color: black; -} - -p{ - font-size: 0.7em; -} - -.moreauthors { - font-size: 70%; -} +/** + * GitStats - default style + */ +body { + color: black; + background-color: #fff; +} + +dt { + font-size: 12px; + font-weight: bold; + float: left; + margin-right: 1em; + margin-left: 10px; +} + +dt:after { + content: ': '; +} + +dd { + font-size: 11px; + display: block; + clear: left; +} + +table { + border: 1px solid black; + border-collapse: collapse; + font-size: 70%; + margin-bottom: 1em; +} + +table.noborders { + border: none; +} + +table.noborders td { + border: none; +} + +.vtable { + float: right; + clear: both; +} + +table.tags td { + vertical-align: top; +} + +th { + background-color: #ddf; +} + +th a { + text-decoration: none; +} + +tr:hover { + background-color: #ddf; +} + +td { + border: 1px solid black; + padding: 0.2em; + padding-left: 0.3em; + padding-right: 0.2em; +} + +/* Navigation bar; tabbed style */ +.nav { + height: 2em; margin-bottom:1.2em; position:relative; overflow:hidden;margin-top: -10px; +} + +.nav ul { + margin:0; position:absolute; bottom:0; padding-left:0.5em; +} + +.nav li { + float:left; + list-style-type:none; + white-space:nowrap; + margin-right:0px; + background:#fff; + position:relative; + margin-bottom:5px; +} + +.nav li a { + font-size: 0.8em; + text-decoration:none; + line-height:1.3em; + padding:2px 6px 2px 6px; + border: 1px solid #ccc; + border-bottom: 1px solid #bbbbbb; + background-color:#FFFFFF; + color:#999; + font-weight:bold; + border-top-left-radius:3px; + border-top-right-radius:3px; +} + +.nav li a:hover { + background-color: #cacbcb; + text-decoration:none; +} + +img { + border: 1px solid black; + padding: 0.5em; + background-color: white; +} + +th img { + border: 0px; + padding: 0px; + background-color: #ddf; +} + +h1 a, h2 a { + color: black; + text-decoration: none; +} + +h1:hover a:after, +h2:hover a:after { + color: #555; +} + +h1 { + font-size: x-large; +} + +h2 { + background-color: #C6E9F1; + border: 1px solid #C6E9F1; + padding-left: 0.5em; + padding-right: 0.5em; + color: black; + font-size: 0.8em; + clear: both; +} + +h2 a { + color: black; +} + +p{ + font-size: 0.7em; +} + +.moreauthors { + font-size: 70%; +} diff --git a/public/statistics/trustie2/index.html b/public/statistics/trustie2/index.html index 950f664bc..7b6e32f0d 100644 --- a/public/statistics/trustie2/index.html +++ b/public/statistics/trustie2/index.html @@ -1,20 +1,20 @@ - - - - - - - - - - - -

      项目信息(Project Information)

      -
      项目名(Project name)
      trustie2
      统计时段(Report Period)
      2013-08-01 02:33:49 to 2013-08-23 22:41:30
      项目活跃时段(Project Active Period)
      2013-08-01 02:33:49 to 2013-08-09 09:24:38 (9 days)
      -

      代码文件信息(Files Information of Code)

      - -
      文件类型(File Type)文件数(Files Number)代码行数(Lines Number of Code)
      .rb67759777
      .erb42310688
      .js1093891
      .yml7752743
      .css235820
      .py1196
      .c00
      .html5334
      .php2700
      代码文件总数(Total files number of Code)
      1317
      代码总数(Total Lines number of Code)
      134149
      修改代码总数(Total Modified Lines Number of Code)
      3197 (5961 added, 2764 removed)
      -

      作者信息(Authors Information)

      - -
      作者名(Author Name)提交次数及占百分比(Commits)(%)增加代码行数(+ lines)删除代码行数(- lines)首次提交日期(First commit)最后一次提交日期(Last commit)活跃年龄(Age)活跃天数(Active days)#提交排名(# by commits)
      zhangyang27 (26.73%)6533592013-08-012013-08-076 days, 2:35:4271
      huangjingquan21 (20.79%)8385082013-08-012013-08-098 days, 4:34:4882
      nieguanghui20 (19.80%)11695682013-08-012013-08-097 days, 21:52:0673
      fanqiang17 (16.83%)246715952013-08-012013-08-097 days, 20:37:3894
      william9 (8.91%)16141692013-08-012013-08-087 days, 1:46:5445
      kaizheng6 (5.94%)809682013-08-012013-08-097 days, 20:04:0146
      wanglinchun1 (0.99%)742013-08-072013-08-070:00:0017
      作者总数(Authors Number)
      7
      提交总数(Total Commits Number)
      101 (average 11.2 commits per active day, 11.2 per all days)
      + + + + + + + + + + + +

      项目信息(Project Information)

      +
      项目名(Project name)
      trustie2
      统计时段(Report Period)
      2013-08-01 02:33:49 to 2013-08-23 22:41:30
      项目活跃时段(Project Active Period)
      2013-08-01 02:33:49 to 2013-08-09 09:24:38 (9 days)
      +

      代码文件信息(Files Information of Code)

      + +
      文件类型(File Type)文件数(Files Number)代码行数(Lines Number of Code)
      .rb67759777
      .erb42310688
      .js1093891
      .yml7752743
      .css235820
      .py1196
      .c00
      .html5334
      .php2700
      代码文件总数(Total files number of Code)
      1317
      代码总数(Total Lines number of Code)
      134149
      修改代码总数(Total Modified Lines Number of Code)
      3197 (5961 added, 2764 removed)
      +

      作者信息(Authors Information)

      + +
      作者名(Author Name)提交次数及占百分比(Commits)(%)增加代码行数(+ lines)删除代码行数(- lines)首次提交日期(First commit)最后一次提交日期(Last commit)活跃年龄(Age)活跃天数(Active days)#提交排名(# by commits)
      zhangyang27 (26.73%)6533592013-08-012013-08-076 days, 2:35:4271
      huangjingquan21 (20.79%)8385082013-08-012013-08-098 days, 4:34:4882
      nieguanghui20 (19.80%)11695682013-08-012013-08-097 days, 21:52:0673
      fanqiang17 (16.83%)246715952013-08-012013-08-097 days, 20:37:3894
      william9 (8.91%)16141692013-08-012013-08-087 days, 1:46:5445
      kaizheng6 (5.94%)809682013-08-012013-08-097 days, 20:04:0146
      wanglinchun1 (0.99%)742013-08-072013-08-070:00:0017
      作者总数(Authors Number)
      7
      提交总数(Total Commits Number)
      101 (average 11.2 commits per active day, 11.2 per all days)
      \ No newline at end of file diff --git a/public/statistics/trustie2/sortable.js b/public/statistics/trustie2/sortable.js index 89477324a..a4dead800 100644 --- a/public/statistics/trustie2/sortable.js +++ b/public/statistics/trustie2/sortable.js @@ -1,324 +1,324 @@ -/* -Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. -Based on a script from http://www.kryogenix.org/code/browser/sorttable/. -Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . - -Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk. - -Version 1.5.7 -*/ - -/* You can change these values */ -var image_path = ""; -var image_up = "arrow-up.gif"; -var image_down = "arrow-down.gif"; -var image_none = "arrow-none.gif"; -var europeandate = true; -var alternate_row_colors = true; - -/* Don't change anything below this unless you know what you're doing */ -addEvent(window, "load", sortables_init); - -var SORT_COLUMN_INDEX; -var thead = false; - -function sortables_init() { - // Find all tables with class sortable and make them sortable - if (!document.getElementsByTagName) return; - tbls = document.getElementsByTagName("table"); - for (ti=0;ti 0) { - if (t.tHead && t.tHead.rows.length > 0) { - var firstRow = t.tHead.rows[t.tHead.rows.length-1]; - thead = true; - } else { - var firstRow = t.rows[0]; - } - } - if (!firstRow) return; - - // We have a first row: assume it's the header, and make its contents clickable links - for (var i=0;i'+txt+'  ↓'; - } - } - if (alternate_row_colors) { - alternate(t); - } -} - -function ts_getInnerText(el) { - if (typeof el == "string") return el; - if (typeof el == "undefined") { return el }; - if (el.innerText) return el.innerText; //Not needed but it is faster - var str = ""; - - var cs = el.childNodes; - var l = cs.length; - for (var i = 0; i < l; i++) { - switch (cs[i].nodeType) { - case 1: //ELEMENT_NODE - str += ts_getInnerText(cs[i]); - break; - case 3: //TEXT_NODE - str += cs[i].nodeValue; - break; - } - } - return str; -} - -function ts_resortTable(lnk, clid) { - var span; - for (var ci=0;ci'; - newRows.reverse(); - span.setAttribute('sortdir','up'); - } else { - ARROW = '  ↑'; - span.setAttribute('sortdir','down'); - } - // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones - // don't do sortbottom rows - for (i=0; i'; - } - } - } - span.innerHTML = ARROW; - alternate(t); -} - -function getParent(el, pTagName) { - if (el == null) { - return null; - } else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) { - return el; - } else { - return getParent(el.parentNode, pTagName); - } -} - -function sort_date(date) { - // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX - dt = "00000000"; - if (date.length == 11) { - mtstr = date.substr(3,3); - mtstr = mtstr.toLowerCase(); - switch(mtstr) { - case "jan": var mt = "01"; break; - case "feb": var mt = "02"; break; - case "mar": var mt = "03"; break; - case "apr": var mt = "04"; break; - case "may": var mt = "05"; break; - case "jun": var mt = "06"; break; - case "jul": var mt = "07"; break; - case "aug": var mt = "08"; break; - case "sep": var mt = "09"; break; - case "oct": var mt = "10"; break; - case "nov": var mt = "11"; break; - case "dec": var mt = "12"; break; - // default: var mt = "00"; - } - dt = date.substr(7,4)+mt+date.substr(0,2); - return dt; - } else if (date.length == 10) { - if (europeandate == false) { - dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2); - return dt; - } else { - dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2); - return dt; - } - } else if (date.length == 8) { - yr = date.substr(6,2); - if (parseInt(yr) < 50) { - yr = '20'+yr; - } else { - yr = '19'+yr; - } - if (europeandate == true) { - dt = yr+date.substr(3,2)+date.substr(0,2); - return dt; - } else { - dt = yr+date.substr(0,2)+date.substr(3,2); - return dt; - } - } - return dt; -} - -function ts_sort_date(a,b) { - dt1 = sort_date(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); - dt2 = sort_date(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); - - if (dt1==dt2) { - return 0; - } - if (dt1 0) { + if (t.tHead && t.tHead.rows.length > 0) { + var firstRow = t.tHead.rows[t.tHead.rows.length-1]; + thead = true; + } else { + var firstRow = t.rows[0]; + } + } + if (!firstRow) return; + + // We have a first row: assume it's the header, and make its contents clickable links + for (var i=0;i'+txt+'  ↓'; + } + } + if (alternate_row_colors) { + alternate(t); + } +} + +function ts_getInnerText(el) { + if (typeof el == "string") return el; + if (typeof el == "undefined") { return el }; + if (el.innerText) return el.innerText; //Not needed but it is faster + var str = ""; + + var cs = el.childNodes; + var l = cs.length; + for (var i = 0; i < l; i++) { + switch (cs[i].nodeType) { + case 1: //ELEMENT_NODE + str += ts_getInnerText(cs[i]); + break; + case 3: //TEXT_NODE + str += cs[i].nodeValue; + break; + } + } + return str; +} + +function ts_resortTable(lnk, clid) { + var span; + for (var ci=0;ci'; + newRows.reverse(); + span.setAttribute('sortdir','up'); + } else { + ARROW = '  ↑'; + span.setAttribute('sortdir','down'); + } + // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones + // don't do sortbottom rows + for (i=0; i'; + } + } + } + span.innerHTML = ARROW; + alternate(t); +} + +function getParent(el, pTagName) { + if (el == null) { + return null; + } else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) { + return el; + } else { + return getParent(el.parentNode, pTagName); + } +} + +function sort_date(date) { + // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX + dt = "00000000"; + if (date.length == 11) { + mtstr = date.substr(3,3); + mtstr = mtstr.toLowerCase(); + switch(mtstr) { + case "jan": var mt = "01"; break; + case "feb": var mt = "02"; break; + case "mar": var mt = "03"; break; + case "apr": var mt = "04"; break; + case "may": var mt = "05"; break; + case "jun": var mt = "06"; break; + case "jul": var mt = "07"; break; + case "aug": var mt = "08"; break; + case "sep": var mt = "09"; break; + case "oct": var mt = "10"; break; + case "nov": var mt = "11"; break; + case "dec": var mt = "12"; break; + // default: var mt = "00"; + } + dt = date.substr(7,4)+mt+date.substr(0,2); + return dt; + } else if (date.length == 10) { + if (europeandate == false) { + dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2); + return dt; + } else { + dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2); + return dt; + } + } else if (date.length == 8) { + yr = date.substr(6,2); + if (parseInt(yr) < 50) { + yr = '20'+yr; + } else { + yr = '19'+yr; + } + if (europeandate == true) { + dt = yr+date.substr(3,2)+date.substr(0,2); + return dt; + } else { + dt = yr+date.substr(0,2)+date.substr(3,2); + return dt; + } + } + return dt; +} + +function ts_sort_date(a,b) { + dt1 = sort_date(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); + dt2 = sort_date(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); + + if (dt1==dt2) { + return 0; + } + if (dt1legend { padding-left: 16px; background:url(../images/arrow_collapsed.png) no-repeat 0% 40%; cursor:pointer; } -fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_expanded.png); } +fieldset.collapsible { border-width: 1px 0 0 0; font-size: 0.9em; } +fieldset.collapsible>legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; } +fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_collapsed.png); } fieldset#date-range p { margin: 2px 0 2px 0; } fieldset#filters table { border-collapse: collapse; } @@ -1921,7 +1636,7 @@ fieldset#filters td.field { width:230px; } fieldset#filters td.operator { width:180px; } fieldset#filters td.operator select {max-width:170px;} fieldset#filters td.values { white-space:nowrap; } -fieldset#filters td.values select {min-width:130px;max-width: 100px;} +fieldset#filters td.values select {min-width:130px;} fieldset#filters td.values input {height:1em;} fieldset#filters td.add-filter { text-align: right; vertical-align: top; } @@ -2012,8 +1727,8 @@ ul.projects li {list-style-type:none; #projects-index ul.projects div.root a.project {font-family:'微软雅黑', "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 14px; margin: 0 0 10px 0; } .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; } -#notified-projects ul{max-height:250px; overflow-y:auto;} -#tracker_project_ids ul {max-height:250px; /*overflow-y:auto;*/} +#notified-projects ul, #tracker_project_ids ul {max-height:250px; overflow-y:auto;} + #related-issues li img {vertical-align:middle;} ul.properties {padding:0; font-size: 0.9em; color: #777;} @@ -2052,22 +1767,6 @@ input#content_comments {width: 99%} p.pagination {margin-top:8px; font-size: 90%} - -ul.courses {margin:0px; padding-left:0em;} -ul.courses ul {padding-left:1.6em;} -ul.courses.root {margin:0; padding:0;} - -ul.courses li {list-style-type:none;} - -ul.courses li {list-style-type:none;} -#courses-index ul.courses ul.courses { border-left: 3px solid #e0e0e0; padding-left:1em;} -#courses-index ul.courses li.root {margin-bottom: 1em;} -#courses-index ul.courses li.child {margin-top: 1em;} -#courses-index ul.courses div.root a.course {font-family:'微软雅黑', "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 14px; margin: 0 0 10px 0; } -.my-course { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; } - - - /***** Tabular forms ******/ .tabular p{ margin: 0; @@ -2098,17 +1797,6 @@ html>body .tabular p {overflow:hidden;} font-size: 12px; } -.role label{ - font-weight: bold; - float: left; - text-align: right; - /* width of left column */ - margin-left: -60px; - /* width of labels. Should be smaller than left column to create some right margin */ - width: 175px; - font-size: 12px; -} - .tabular label.floating{ font-weight: normal; margin-left: 0px; @@ -2145,7 +1833,7 @@ input#time_entry_comments { width: 90%;} .tabular.settings p{ padding-left: 300px; } .tabular.settings label{ margin-left: -300px; width: 295px; } -.tabular.settings textarea { width: 85%; } +.tabular.settings textarea { width: 99%; } .settings.enabled_scm table {width:100%} .settings.enabled_scm td.scm_name{ font-weight: bold; } @@ -2153,12 +1841,10 @@ input#time_entry_comments { width: 90%;} fieldset.settings label { display: block; } fieldset#notified_events .parent { padding-left: 20px; } -span.required {color: #bb0000; margin-right: 2px;} - +span.required {color: #bb0000;} .summary {font-style: italic;} #attachments_fields input.description {margin-left:4px; width:100px; } -#attachments_fields span {display:block; white-space:nowrap;} #attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} #attachments_fields input.filename {border:0; height:1.8em; width:150px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;}/*Modified by young*/ #attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} @@ -2166,8 +1852,6 @@ span.required {color: #bb0000; margin-right: 2px;} #attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block; padding-left:16px;} a.remove-upload:hover {text-decoration:none !important;} -#attachments_fields input.is_public_checkbox {width:20px;} -#attachments_fields span.ispublic-label {display:inline-block;width:30px;margin-left:10px; } /*gcm upload file count and deleteall*/ #upload_file_count #count {color:red; font-size:1.5em;} @@ -2220,6 +1904,18 @@ input.autocomplete.ajax-loading { background-image: url(../images/loading.gif); } +.private_project { + position: relative; + bottom: 2px; + text-transform: uppercase; + background: #d22; + color: #fff; + font-weight: bold; + padding: 0px 2px 0px 2px; + font-size: 60%; + margin-right: 2px; + border-radius: 2px; +} /***** Flash & error messages ****/ #errorExplanation, div.flash, .nodata, .warning, .conflict { padding: 4px 4px 4px 30px; @@ -2275,7 +1971,7 @@ width:20%; font-weight:bold; text-align:center; padding:0.6em; -z-index:100000; +z-index:100; opacity: 0.5; } @@ -2322,9 +2018,15 @@ color:#505050; } img.ui-datepicker-trigger { - cursor: pointer; - vertical-align: middle; - margin-left: 4px; + display: block; + background: url(../images/public_icon.png) -31px 0 no-repeat; + cursor: pointer; + vertical-align: middle; + margin-left: 5px; + margin-top: 5px; + width: 16px; + height: 15px; + float: left; } /***** Progress bar *****/ @@ -2347,7 +2049,7 @@ p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;} #roadmap table.progress td { height: 1.2em; } /***** Tabs *****/ #content .tabs {height: 2.6em; margin-bottom:1.2em; position:relative; overflow:hidden;} -#content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; width:2000px; border-bottom: 1px solid #15BCCF;} +#content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; font-family: 14px; width:2000px; border-bottom: 1px solid #15BCCF;} #content .tabs ul li { float:left; list-style-type:none; @@ -2434,7 +2136,7 @@ button.tab-right { padding-bottom: 2px; text-align: center; border: 1px solid #15BCCF; - border-bottom: 1px solid #15BCCF; + /*border-bottom: 0px solid #15BCCF;*/ color:#606060; font-weight:bold; @@ -2451,7 +2153,7 @@ button.tab-right { } #content .tabs_new ul li a.selected { - background-color: #1C9EC7; + background-color: rgba(28, 158, 199, 0.68); border: 1px solid #15BCCF; border-bottom: 1px solid #fff; color:#FFF; @@ -2649,8 +2351,6 @@ button.tabs_new_enterprise-right { background-color:#f6f6f6; color:#505050; border: 1px solid #e4e4e4; - word-break: break-all; - word-wrap: break-word; } /***** Wiki *****/ @@ -2807,14 +2507,6 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');} padding-top: 2px; padding-bottom: 3px; } -#sidebar #attachemnt_.icon { - background-position: 0% 50%; - background-repeat: no-repeat; - font-family: '微软雅黑'; /*modify by men*/ - padding-left: 20px; - padding-top: 2px; - padding-bottom: 3px; -} .icon_enterprise { background-position: 0% 50%; background-repeat: no-repeat; @@ -2839,7 +2531,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');} .icon-user { background-image: url(../images/user.png); } .icon-projects { background-image: url(../images/projects.png); } .icon-help { background-image: url(../images/help.png); } -.icon-attachment { background-image: url(../images/attachment.png); } +.icon-attachment { background-image: url(../images/attachment.png);padding-left: 20px !important; } .icon-history { background-image: url(../images/history.png); } .icon-time { background-image: url(../images/time.png); } .icon-time-add { background-image: url(../images/time_add.png); } @@ -3062,7 +2754,8 @@ div.repos_explain{ /* new linchun compitition */ .contest_underline{ - margin:1px; + margin:1; + padding:1; width:900px; height:0.5px; background-color:#aaa; @@ -3100,100 +2793,4 @@ div.repos_explain{ padding-top: 20px; padding-bottom: 20px; } - -.button-canel{ - padding-bottom: 5px; - width: auto; - height: 25px; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 12px; - color: #ffffff; - padding: 3px 9px; - background: #15bccf; - border-radius: 4px; - border: 1px solid #15bccf; - 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; -} - -.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;} - -.projects-index{min-height: 350px} -.school-index{min-height: 400px} -#membership_project_id option -{ - width: 190px; -} - -input[class~='ButtonClolr'],.ButtonColor{ - - color: #fffbff !important; - /*padding: 5px;*/ - width: auto; - height: 24px ; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 15px; - text-align: center; - background: #15bccf !important; - border: 0px solid #15bccf ; - display:inline-block -} - -input[class~='m3p10'], .m3p10 { - margin-top: 5px; - padding: 5px 10px; - height: 20px; - display: inline-block; - color: #ffffff; - cursor:pointer; -} - -/*pre标签换行*/ -.break_word{word-break: break-all;word-wrap: break-word;} -.break_word_firefox{white-space: pre-wrap;word-break: break-all;} - -/*日历选择图*/ -img.ui-datepicker-trigger { - display:block; - background:url(/images/public_icon.png) -31px 0 no-repeat; - cursor: pointer; - vertical-align: middle; - margin-left: 5px; - margin-top: 5px; - width:16px; - height:15px; - float:left; -} - -/*lizanle 日誌搜索結果樣式*/ -.search_results { - color: red; -} -/*lizanle 分页样式 -.pagination ul li a, .pagination ul li span{ - background-color: #FFFFFF; - border-color: #DDDDDD; - border-image: none; - border-style: solid; - border-width: 1px 1px 1px 1px; - float: left; - line-height: 20px; - padding: 4px 12px; - text-decoration: none; -} -.pagination ul a { - color: #9B9B9B; -} -.pagination ul li a:hover, .pagination ul li a:focus, .pagination ul .active a, .pagination ul .active span{ - background-color: #ffc02f; - border: 1px solid #ffc02f; -} -.pagination ul li{ - float: left; - margin-right: 3px; - list-style: none outside none; - -} -*/ - +.upload_img img{max-width: 100%;} diff --git a/public/stylesheets/bootstrap/bootstrap-theme.min.css b/public/stylesheets/bootstrap/bootstrap-theme.min.css index c7b6d39b4..de3f6229e 100644 --- a/public/stylesheets/bootstrap/bootstrap-theme.min.css +++ b/public/stylesheets/bootstrap/bootstrap-theme.min.css @@ -1,7 +1,7 @@ -/*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - +/*! + * Bootstrap v3.0.3 (http://getbootstrap.com) + * Copyright 2013 Twitter, Inc. + * Licensed under http://www.apache.org/licenses/LICENSE-2.0 + */ + .btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe0e0e0',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);background-repeat:repeat-x;border-color:#2b669a;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff2d6ca2',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);background-repeat:repeat-x;border-color:#3e8f3e;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c',endColorstr='#ff419641',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);background-repeat:repeat-x;border-color:#e38d13;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e',endColorstr='#ffeb9316',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);background-repeat:repeat-x;border-color:#b92c28;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f',endColorstr='#ffc12e2a',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);background-repeat:repeat-x;border-color:#28a4c9;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2aabd2',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#ffe8e8e8',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#357ebd;background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff8f8f8',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb',endColorstr='#fff3f3f3',GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.075);box-shadow:inset 0 3px 9px rgba(0,0,0,0.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,0.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff282828',GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.25);box-shadow:inset 0 3px 9px rgba(0,0,0,0.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border-color:#b2dba1;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8',endColorstr='#ffc8e5bc',GradientType=0)}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;border-color:#9acfea;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7',endColorstr='#ffb9def0',GradientType=0)}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;border-color:#f5e79e;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3',endColorstr='#fff8efc0',GradientType=0)}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;border-color:#dca7a7;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffe7c3c3',GradientType=0)}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb',endColorstr='#fff5f5f5',GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3071a9',GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c',endColorstr='#ff449d44',GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff31b0d5',GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e',endColorstr='#ffec971f',GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f',endColorstr='#ffc9302c',GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;border-color:#3278b3;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff3278b3',GradientType=0)}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#ffe8e8e8',GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8',endColorstr='#ffd0e9c6',GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7',endColorstr='#ffc4e3f3',GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3',endColorstr='#fffaf2cc',GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffebcccc',GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;border-color:#dcdcdc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8',endColorstr='#fff5f5f5',GradientType=0);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1)} \ No newline at end of file diff --git a/public/stylesheets/bootstrap/bootstrap.min.css b/public/stylesheets/bootstrap/bootstrap.min.css index c547283bb..aac1a349f 100644 --- a/public/stylesheets/bootstrap/bootstrap.min.css +++ b/public/stylesheets/bootstrap/bootstrap.min.css @@ -1,7 +1,7 @@ -/*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - +/*! + * Bootstrap v3.0.3 (http://getbootstrap.com) + * Copyright 2013 Twitter, Inc. + * Licensed under http://www.apache.org/licenses/LICENSE-2.0 + */ + /*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-primary:hover{color:#3071a9}.text-warning{color:#8a6d3b}.text-warning:hover{color:#66512c}.text-danger{color:#a94442}.text-danger:hover{color:#843534}.text-success{color:#3c763d}.text-success:hover{color:#2b542c}.text-info{color:#31708f}.text-info:hover{color:#245269}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.list-inline>li:first-child{padding-left:0}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small,blockquote .small{display:block;line-height:1.428571429;color:#999}blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small,blockquote.pull-right .small{text-align:right}blockquote.pull-right small:before,blockquote.pull-right .small:before{content:''}blockquote.pull-right small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.428571429}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}@media(min-width:768px){.container{width:750px}}@media(min-width:992px){.container{width:970px}}@media(min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666666666666%}.col-xs-10{width:83.33333333333334%}.col-xs-9{width:75%}.col-xs-8{width:66.66666666666666%}.col-xs-7{width:58.333333333333336%}.col-xs-6{width:50%}.col-xs-5{width:41.66666666666667%}.col-xs-4{width:33.33333333333333%}.col-xs-3{width:25%}.col-xs-2{width:16.666666666666664%}.col-xs-1{width:8.333333333333332%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666666666666%}.col-xs-pull-10{right:83.33333333333334%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666666666666%}.col-xs-pull-7{right:58.333333333333336%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666666666667%}.col-xs-pull-4{right:33.33333333333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.666666666666664%}.col-xs-pull-1{right:8.333333333333332%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666666666666%}.col-xs-push-10{left:83.33333333333334%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666666666666%}.col-xs-push-7{left:58.333333333333336%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666666666667%}.col-xs-push-4{left:33.33333333333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.666666666666664%}.col-xs-push-1{left:8.333333333333332%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666666666666%}.col-xs-offset-10{margin-left:83.33333333333334%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666666666666%}.col-xs-offset-7{margin-left:58.333333333333336%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666666666667%}.col-xs-offset-4{margin-left:33.33333333333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.666666666666664%}.col-xs-offset-1{margin-left:8.333333333333332%}.col-xs-offset-0{margin-left:0}@media(min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666666666666%}.col-sm-10{width:83.33333333333334%}.col-sm-9{width:75%}.col-sm-8{width:66.66666666666666%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-4{width:33.33333333333333%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666666666666%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666666666666%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-0{margin-left:0}}@media(min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666666666666%}.col-md-10{width:83.33333333333334%}.col-md-9{width:75%}.col-md-8{width:66.66666666666666%}.col-md-7{width:58.333333333333336%}.col-md-6{width:50%}.col-md-5{width:41.66666666666667%}.col-md-4{width:33.33333333333333%}.col-md-3{width:25%}.col-md-2{width:16.666666666666664%}.col-md-1{width:8.333333333333332%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666666666666%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666666666666%}.col-md-push-10{left:83.33333333333334%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666666666666%}.col-md-push-7{left:58.333333333333336%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666666666667%}.col-md-push-4{left:33.33333333333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.666666666666664%}.col-md-push-1{left:8.333333333333332%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666666666666%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-0{margin-left:0}}@media(min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666666666666%}.col-lg-10{width:83.33333333333334%}.col-lg-9{width:75%}.col-lg-8{width:66.66666666666666%}.col-lg-7{width:58.333333333333336%}.col-lg-6{width:50%}.col-lg-5{width:41.66666666666667%}.col-lg-4{width:33.33333333333333%}.col-lg-3{width:25%}.col-lg-2{width:16.666666666666664%}.col-lg-1{width:8.333333333333332%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666666666666%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666666666666%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>.active,.table>tbody>tr>.active,.table>tfoot>tr>.active,.table>thead>.active>td,.table>tbody>.active>td,.table>tfoot>.active>td,.table>thead>.active>th,.table>tbody>.active>th,.table>tfoot>.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>.active:hover,.table-hover>tbody>.active:hover>td,.table-hover>tbody>.active:hover>th{background-color:#e8e8e8}.table>thead>tr>.success,.table>tbody>tr>.success,.table>tfoot>tr>.success,.table>thead>.success>td,.table>tbody>.success>td,.table>tfoot>.success>td,.table>thead>.success>th,.table>tbody>.success>th,.table>tfoot>.success>th{background-color:#dff0d8}.table-hover>tbody>tr>.success:hover,.table-hover>tbody>.success:hover>td,.table-hover>tbody>.success:hover>th{background-color:#d0e9c6}.table>thead>tr>.danger,.table>tbody>tr>.danger,.table>tfoot>tr>.danger,.table>thead>.danger>td,.table>tbody>.danger>td,.table>tfoot>.danger>td,.table>thead>.danger>th,.table>tbody>.danger>th,.table>tfoot>.danger>th{background-color:#f2dede}.table-hover>tbody>tr>.danger:hover,.table-hover>tbody>.danger:hover>td,.table-hover>tbody>.danger:hover>th{background-color:#ebcccc}.table>thead>tr>.warning,.table>tbody>tr>.warning,.table>tfoot>tr>.warning,.table>thead>.warning>td,.table>tbody>.warning>td,.table>tfoot>.warning>td,.table>thead>.warning>th,.table>tbody>.warning>th,.table>tfoot>.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>.warning:hover,.table-hover>tbody>.warning:hover>td,.table-hover>tbody>.warning:hover>th{background-color:#faf2cc}@media(max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}output{display:block;padding-top:7px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline select.form-control{width:auto}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-control-static{padding-top:7px}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#fff}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.glyphicon:empty{width:1em}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn:first-child>.btn{margin-right:-1px}.input-group-btn:last-child>.btn{margin-left:-1px}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:768px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media(min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media(min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media(min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form select.form-control{width:auto}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media(min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{display:block;height:auto;max-width:100%;margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child th,.panel>.table>tbody:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:last-child>th,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:last-child>td,.panel>.table-responsive>.table-bordered>thead>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;z-index:1050;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;outline:0;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicons-chevron-left,.carousel-control .glyphicons-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,tr.visible-xs,th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}table.visible-xs.visible-sm{display:table}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}table.visible-xs.visible-md{display:table}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}table.visible-xs.visible-lg{display:table}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm,tr.visible-sm,th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}table.visible-sm.visible-xs{display:table}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}table.visible-sm.visible-md{display:table}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}table.visible-sm.visible-lg{display:table}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md,tr.visible-md,th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}table.visible-md.visible-xs{display:table}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}table.visible-md.visible-sm{display:table}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}table.visible-md.visible-lg{display:table}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg,tr.visible-lg,th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}table.visible-lg.visible-xs{display:table}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}table.visible-lg.visible-sm{display:table}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}table.visible-lg.visible-md{display:table}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}table.hidden-xs{display:table}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs,tr.hidden-xs,th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm,tr.hidden-xs.hidden-sm,th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md,tr.hidden-xs.hidden-md,th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg,tr.hidden-xs.hidden-lg,th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}table.hidden-sm{display:table}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs,tr.hidden-sm.hidden-xs,th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-sm,tr.hidden-sm,th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md,tr.hidden-sm.hidden-md,th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg,tr.hidden-sm.hidden-lg,th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}table.hidden-md{display:table}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs,tr.hidden-md.hidden-xs,th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-md.hidden-sm,tr.hidden-md.hidden-sm,th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md,tr.hidden-md,th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg,tr.hidden-md.hidden-lg,th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}table.hidden-lg{display:table}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs,tr.hidden-lg.hidden-xs,th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm,tr.hidden-lg.hidden-sm,th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md,tr.hidden-lg.hidden-md,th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg,tr.hidden-lg,th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print,tr.visible-print,th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print,tr.hidden-print,th.hidden-print,td.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/stylesheets/bootstrap_custom.css b/public/stylesheets/bootstrap_custom.css index ff2e1ee10..4d4e71d49 100644 --- a/public/stylesheets/bootstrap_custom.css +++ b/public/stylesheets/bootstrap_custom.css @@ -1,110 +1,110 @@ -/* 应用bootstrap之后,定制化的css, less是个问题 -*******************************************************************************/ -* { - font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif !important; -} -body{ - padding-top: 70px; -} - -.float-left{ float: left; } -.float-right{ float: right; } -.clearfix { - width: 100%; - height: 0px; - clear: both; - display: block; -} -.ul-style-none{ - list-style-type: none; -} - -.block-inline{ - display: inline-block; -} - -.border-box { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -box-sizing: border-box; -} - -.div-inline { - display: inline-block; -} - -/*文字不换行*/ -.text_nowrap { - word-break: keep-all; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -/*字体 斜体*/ -.font-italic { - font-style: italic; -} - -/*字体加粗*/ -.font-bolder { - font-weight: bolder; -} - -.text-center { - text-align: center; -} - -.clear-both { - clear: both; -} - -.full-width-layouts{ - padding: 0 15px; -} -/* block 未定义宽度时候 居中 */ -.center { - width: auto; - display: table; - margin-left: auto; - margin-right: auto; -} -.text-center { - text-align: center; -} - -/*颜色*/ -.muted{ - color: #999999; -} - - - - - - - - - - - - - - - - - - - - - - - - -/* footer */ -#footer{ - margin-top: 50px; -} -#footer .desc a{ - margin: 0px 5px; -} +/* 应用bootstrap之后,定制化的css, less是个问题 +*******************************************************************************/ +* { + font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif !important; +} +body{ + padding-top: 70px; +} + +.float-left{ float: left; } +.float-right{ float: right; } +.clearfix { + width: 100%; + height: 0px; + clear: both; + display: block; +} +.ul-style-none{ + list-style-type: none; +} + +.block-inline{ + display: inline-block; +} + +.border-box { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -box-sizing: border-box; +} + +.div-inline { + display: inline-block; +} + +/*文字不换行*/ +.text_nowrap { + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/*字体 斜体*/ +.font-italic { + font-style: italic; +} + +/*字体加粗*/ +.font-bolder { + font-weight: bolder; +} + +.text-center { + text-align: center; +} + +.clear-both { + clear: both; +} + +.full-width-layouts{ + padding: 0 15px; +} +/* block 未定义宽度时候 居中 */ +.center { + width: auto; + display: table; + margin-left: auto; + margin-right: auto; +} +.text-center { + text-align: center; +} + +/*颜色*/ +.muted{ + color: #999999; +} + + + + + + + + + + + + + + + + + + + + + + + + +/* footer */ +#footer{ + margin-top: 50px; +} +#footer .desc a{ + margin: 0px 5px; +} diff --git a/public/stylesheets/buglist-div-use.css b/public/stylesheets/buglist-div-use.css index 8ee6af1e8..9b7443344 100644 --- a/public/stylesheets/buglist-div-use.css +++ b/public/stylesheets/buglist-div-use.css @@ -1,65 +1,65 @@ - .mask{ - position: relative; - overflow: hidden; - margin: 0px 0 0 0; - width: 970px; - - - } - .header2{ - float: left; - width: 100%; - background-color: #f4f4f4 - } - .colleft{ - position: relative; - width: 100%; - right: 50%; - background-color: #000000 - - } - .col1{ - position: relative; - overflow: hidden; - float: left; - width: 470px; - left: 100%; - - } - .col2{ - position: relative; - overflow: hidden; - float: left; - width: 440px; - left: 2%; - - } - -a:hover, a:active { -color: #c61a1a; -text-decoration: underline; - -} - -#tag { - background: url("../images/issue_tag.png") no-repeat scroll right -19px rgba(0, 0, 0, 0); - border-radius: 3px; - color: #3A587D !important; - cursor: pointer; - display: inline-block; - font-size: 13px; - margin: 3px; - padding: 1px 4px 2px; - text-decoration: none; -} - -#buglist -{ - overflow: hidden; -overflow-x: hidden; -overflow-y: hidden; -white-space: nowrap; -text-overflow: ellipsis; --o-text-overflow: ellipsis; -} - + .mask{ + position: relative; + overflow: hidden; + margin: 0px 0 0 0; + width: 970px; + + + } + .header2{ + float: left; + width: 100%; + background-color: #f4f4f4 + } + .colleft{ + position: relative; + width: 100%; + right: 50%; + background-color: #000000 + + } + .col1{ + position: relative; + overflow: hidden; + float: left; + width: 470px; + left: 100%; + + } + .col2{ + position: relative; + overflow: hidden; + float: left; + width: 440px; + left: 2%; + + } + +a:hover, a:active { +color: #c61a1a; +text-decoration: underline; + +} + +#tag { + background: url("../images/issue_tag.png") no-repeat scroll right -19px rgba(0, 0, 0, 0); + border-radius: 3px; + color: #3A587D !important; + cursor: pointer; + display: inline-block; + font-size: 13px; + margin: 3px; + padding: 1px 4px 2px; + text-decoration: none; +} + +#buglist +{ + overflow: hidden; +overflow-x: hidden; +overflow-y: hidden; +white-space: nowrap; +text-overflow: ellipsis; +-o-text-overflow: ellipsis; +} + diff --git a/public/stylesheets/buglist-ichart.css b/public/stylesheets/buglist-ichart.css index 9bf74fc1f..96cd826e6 100644 --- a/public/stylesheets/buglist-ichart.css +++ b/public/stylesheets/buglist-ichart.css @@ -1,74 +1,74 @@ -@CHARSET "utf-8"; -/*body { - padding:0px; - margin:0px; - margin-top:10px; - text-align: left; - font-family:'微软雅黑',Trebuchet MS,Verdana,Helvetica,Arial,sans-serif; -}*/ -.ichartjs_btn{ - padding:2px 5px; - line-height:25px; - color:#0b2946; - cursor: pointer; - text-align:center; - font-size:12px; - /*border:1px solid #98adc1;*/ - -webkit-box-shadow:0px 0px 2px #375073; - -moz-box-shadow:0px 0px 2px #375073; - box-shadow:0px 0px 2px #375073; - /*-moz-border-radius:5px;*/ - /*-webkit-border-radius:5px;*/ - /*-khtml-border-radius:5px;*/ - /*border-radius:0px*/ -} -.ichartjs_author{ - position: absolute; - font-size:12px; - right: 20px; - top: 0px; -} -.ichartjs_author a{ - color:#113659; -} - -.ichartjs_info{ - position:relative; - margin:10px; - padding:5px; - color:#1b4267; -} -.ichartjs_sm{ - margin:10px 0px; - font-size: 13px; - font-weight: 60; -} -.ichartjs_details{ - padding:0px; - text-indent:2em; - font-size: 12px; - line-height:20px; -} -#ichartjs_code{ - display:none; -} -#ichartjs_result{ - position: absolute; - left: 20px; - bottom: 20px; - padding:8px; - color:#fefefe; - font-size:20px; - font-weight:600; - background-color:#6d869f; - cursor: pointer; - text-align:center; - /*border:1px solid #6a869d;*/ - -webkit-box-shadow:0px 0px 2px #375073; - -moz-box-shadow:0px 0px 2px #375073; - box-shadow:0px 0px 2px #375073; - /*-moz-border-radius:10px;*/ - /*-webkit-border-radius:10px;*/ - /*-khtml-border-radius:0px;*/ - /*border-radius:10px*/ +@CHARSET "utf-8"; +/*body { + padding:0px; + margin:0px; + margin-top:10px; + text-align: left; + font-family:'微软雅黑',Trebuchet MS,Verdana,Helvetica,Arial,sans-serif; +}*/ +.ichartjs_btn{ + padding:2px 5px; + line-height:25px; + color:#0b2946; + cursor: pointer; + text-align:center; + font-size:12px; + /*border:1px solid #98adc1;*/ + -webkit-box-shadow:0px 0px 2px #375073; + -moz-box-shadow:0px 0px 2px #375073; + box-shadow:0px 0px 2px #375073; + /*-moz-border-radius:5px;*/ + /*-webkit-border-radius:5px;*/ + /*-khtml-border-radius:5px;*/ + /*border-radius:0px*/ +} +.ichartjs_author{ + position: absolute; + font-size:12px; + right: 20px; + top: 0px; +} +.ichartjs_author a{ + color:#113659; +} + +.ichartjs_info{ + position:relative; + margin:10px; + padding:5px; + color:#1b4267; +} +.ichartjs_sm{ + margin:10px 0px; + font-size: 13px; + font-weight: 60; +} +.ichartjs_details{ + padding:0px; + text-indent:2em; + font-size: 12px; + line-height:20px; +} +#ichartjs_code{ + display:none; +} +#ichartjs_result{ + position: absolute; + left: 20px; + bottom: 20px; + padding:8px; + color:#fefefe; + font-size:20px; + font-weight:600; + background-color:#6d869f; + cursor: pointer; + text-align:center; + /*border:1px solid #6a869d;*/ + -webkit-box-shadow:0px 0px 2px #375073; + -moz-box-shadow:0px 0px 2px #375073; + box-shadow:0px 0px 2px #375073; + /*-moz-border-radius:10px;*/ + /*-webkit-border-radius:10px;*/ + /*-khtml-border-radius:0px;*/ + /*border-radius:10px*/ } \ No newline at end of file diff --git a/public/stylesheets/buglist.css b/public/stylesheets/buglist.css index 49e816581..2a8aa3515 100644 --- a/public/stylesheets/buglist.css +++ b/public/stylesheets/buglist.css @@ -1,73 +1,73 @@ -@charset utf-8; - -.li_list { -clear:both; -padding:0 0 0 0px; - -} - - -.li_time { -padding:0 7px 0 0; -list-style-type: square; -} - - -ol.linenums { -margin:0 0 0 20px; - -} - -ol.linenums li { -color:#959595; -line-height:15px; -padding:0 5px; -} - - -*,div.pages .next a,div.pages .prev a { -margin:0; -padding:0; -} - -.li_list a:hover,.created a:hover { -background-color:#105DB5; -color:#FFF; -text-decoration:none; - -} - -.li_list li,.na_list li { -clear:both; -height:18px; -list-style-type:square; -padding:2px; -overflow: hidden; -overflow-x: hidden; -overflow-y: hidden; -white-space: nowrap; -text-overflow: ellipsis; --o-text-overflow: ellipsis; -} - - -.fixed,.clear { -clear:both; -} - - -h1,h2 { -font-size:18px; -} - -div.pages .break,.created a { -color:#999; -} - -.tag_fouse { - font-family: "Microsoft YaHei"; - font-size: 15px; - font-weight: bold; - padding-bottom: 3px; - padding-top: 3px; +@charset utf-8; + +.li_list { +clear:both; +padding:0 0 0 0px; + +} + + +.li_time { +padding:0 7px 0 0; +list-style-type: square; +} + + +ol.linenums { +margin:0 0 0 20px; + +} + +ol.linenums li { +color:#959595; +line-height:15px; +padding:0 5px; +} + + +*,div.pages .next a,div.pages .prev a { +margin:0; +padding:0; +} + +.li_list a:hover,.created a:hover { +background-color:#105DB5; +color:#FFF; +text-decoration:none; + +} + +.li_list li,.na_list li { +clear:both; +height:18px; +list-style-type:square; +padding:2px; +overflow: hidden; +overflow-x: hidden; +overflow-y: hidden; +white-space: nowrap; +text-overflow: ellipsis; +-o-text-overflow: ellipsis; +} + + +.fixed,.clear { +clear:both; +} + + +h1,h2 { +font-size:18px; +} + +div.pages .break,.created a { +color:#999; +} + +.tag_fouse { + font-family: "Microsoft YaHei"; + font-size: 15px; + font-weight: bold; + padding-bottom: 3px; + padding-top: 3px; } \ No newline at end of file diff --git a/public/stylesheets/context_menu.css b/public/stylesheets/context_menu.css index 1d02ebfba..65e30fe60 100644 --- a/public/stylesheets/context_menu.css +++ b/public/stylesheets/context_menu.css @@ -1,52 +1,52 @@ -#context-menu { position: absolute; z-index: 40; font-size: 0.9em;} - -#context-menu ul, #context-menu li, #context-menu a { - display:block; - margin:0; - padding:0; - border:0; -} - -#context-menu ul { - width:150px; - border: 1px solid #ccc; - background:white; - list-style:none; - padding:2px; - border-radius:2px; -} - -#context-menu li { - position:relative; - padding:1px; - z-index:39; - border:1px solid white; -} -#context-menu li.folder ul { position:absolute; left:168px; /* IE6 */ top:-2px; max-height:300px; overflow:hidden; overflow-y: auto; } -#context-menu li.folder>ul { left:148px; } - -#context-menu.reverse-y li.folder>ul { top:auto; bottom:0; } -#context-menu.reverse-x li.folder ul { left:auto; right:168px; /* IE6 */ } -#context-menu.reverse-x li.folder>ul { right:148px; } - -#context-menu a { - text-decoration:none !important; - background-repeat: no-repeat; - background-position: 1px 50%; - padding: 2px 0px 2px 20px; - width:100%; /* IE */ -} -#context-menu li>a { width:auto; } /* others */ -#context-menu a.disabled, #context-menu a.disabled:hover {color: #aaa;} -#context-menu li a.submenu { padding-right:16px; background:url("../images/bullet_arrow_right.png") right no-repeat; } -#context-menu li:hover { border:1px solid #628db6; background-color:#eef5fd; border-radius:3px; } -#context-menu a:hover {color:#2A5685;} -#context-menu li.folder:hover { z-index:40; } -#context-menu ul ul, #context-menu li:hover ul ul { display:none; } -#context-menu li:hover ul, #context-menu li:hover li:hover ul { display:block; } -#context-menu a.icon-checked {background: url(../images/toggle_check.png) no-repeat 3px 40%;} - -/* selected element */ -.context-menu-selection { background-color:#507AAA !important; color:#f8f8f8 !important; } -.context-menu-selection a, .context-menu-selection a:hover { color:#f8f8f8 !important; } -.context-menu-selection:hover { background-color:#507AAA !important; color:#f8f8f8 !important; } +#context-menu { position: absolute; z-index: 40; font-size: 0.9em;} + +#context-menu ul, #context-menu li, #context-menu a { + display:block; + margin:0; + padding:0; + border:0; +} + +#context-menu ul { + width:150px; + border: 1px solid #ccc; + background:white; + list-style:none; + padding:2px; + border-radius:2px; +} + +#context-menu li { + position:relative; + padding:1px; + z-index:39; + border:1px solid white; +} +#context-menu li.folder ul { position:absolute; left:168px; /* IE6 */ top:-2px; max-height:300px; overflow:hidden; overflow-y: auto; } +#context-menu li.folder>ul { left:148px; } + +#context-menu.reverse-y li.folder>ul { top:auto; bottom:0; } +#context-menu.reverse-x li.folder ul { left:auto; right:168px; /* IE6 */ } +#context-menu.reverse-x li.folder>ul { right:148px; } + +#context-menu a { + text-decoration:none !important; + background-repeat: no-repeat; + background-position: 1px 50%; + padding: 2px 0px 2px 20px; + width:100%; /* IE */ +} +#context-menu li>a { width:auto; } /* others */ +#context-menu a.disabled, #context-menu a.disabled:hover {color: #aaa;} +#context-menu li a.submenu { padding-right:16px; background:url("../images/bullet_arrow_right.png") right no-repeat; } +#context-menu li:hover { border:1px solid #628db6; background-color:#eef5fd; border-radius:3px; } +#context-menu a:hover {color:#2A5685;} +#context-menu li.folder:hover { z-index:40; } +#context-menu ul ul, #context-menu li:hover ul ul { display:none; } +#context-menu li:hover ul, #context-menu li:hover li:hover ul { display:block; } +#context-menu a.icon-checked {background: url(../images/toggle_check.png) no-repeat 3px 40%;} + +/* selected element */ +.context-menu-selection { background-color:#507AAA !important; color:#f8f8f8 !important; } +.context-menu-selection a, .context-menu-selection a:hover { color:#f8f8f8 !important; } +.context-menu-selection:hover { background-color:#507AAA !important; color:#f8f8f8 !important; } diff --git a/public/stylesheets/context_menu_rtl.css b/public/stylesheets/context_menu_rtl.css index 205bb9184..da227449f 100644 --- a/public/stylesheets/context_menu_rtl.css +++ b/public/stylesheets/context_menu_rtl.css @@ -1,9 +1,9 @@ -#context-menu li.folder ul { left:auto; right:168px; } -#context-menu li.folder>ul { left:auto; right:148px; } -#context-menu li a.submenu { background:url("../images/bullet_arrow_left.png") left no-repeat; } - -#context-menu a { - background-position: 100% 40%; - padding-right: 20px; - padding-left: 0px; -} +#context-menu li.folder ul { left:auto; right:168px; } +#context-menu li.folder>ul { left:auto; right:148px; } +#context-menu li a.submenu { background:url("../images/bullet_arrow_left.png") left no-repeat; } + +#context-menu a { + background-position: 100% 40%; + padding-right: 20px; + padding-left: 0px; +} diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index d93bc8519..5333b91a7 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -83,8 +83,8 @@ a:hover.talk_edit{ color:#ff5722;} .talkpage_text{ border:1px solid #64bdd9; width:600px; color:#7d7d7d; padding:5px; margin:10px 0 10px 50px; background:#fff;} /****新建讨论***/ .talk_new{ color:#4c4c4c;} -.talk_input{ border:1px solid #64bdd9; height:16px; width:585px; background:#fff; margin-bottom:10px; padding:5px;} -.talk_text{ border:1px solid #64bdd9; height:100px;width:585px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} +.talk_input{ border:1px solid #64bdd9; height:16px; width:550px; background:#fff; margin-bottom:10px; padding:5px;} +.talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} .talk_new ul li{ } .sb{width:70px; height:26px; color:#606060; cursor:pointer;} a.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;} @@ -174,7 +174,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;} .wzan a{ display: block;} a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;} a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} -.msg_box{ width:670px; height:205px; border-bottom:1px dashed #CCC; padding-top:10px;} +.msg_box{ width:670px; height:225px; border-bottom:1px dashed #CCC; padding-top:10px;} .msg_box h4{ } .msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } @@ -364,6 +364,23 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} .reply_btn:hover{ background:#999; color:#fff; } #attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } + +.attachments_fields input.description {margin-left:4px; width:100px; } +.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} +.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +a.remove-upload:hover {text-decoration:none !important;} +.attachments_fields input.is_public_checkbox {width:20px;} + + +.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} +a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;} +.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;} +span.add_attachment {font-size: 80%;line-height: 2.5em;} +.attachments_fields span {display: block;white-space: nowrap;} +.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} +.attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +.attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ui-widget { font-family: Verdana, sans-serif; font-size: 1.1em; @@ -437,6 +454,7 @@ a.link_file_board{ background:url(../images/pic_file.png) 0 3px no-repeat !impor /*上传图片处理*/ .upload_img img{max-width: 100%;} +blockquote img{max-width: 100%;} /* The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill @@ -469,6 +487,7 @@ blockquote { border-radius: 4px; font-family: "Microsoft YaHei"; background: url('../images/requirements/reference.jpg'); + background-size: 100% 100%; } a.member_search_edit {width: 43px;background: #15bccf;color: #fff;text-align: center;text-decoration: none;padding: 2px;} .min_search_edit {width: 150px;height: 20px;border: 1px solid #d0d0d0 !important;color: #666;} @@ -480,13 +499,13 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col /*日历选择图*/ img.ui-datepicker-trigger { display:block; - background:url(/images/public_icon.png) -31px 0 no-repeat; + background:url(../images/public_icon.png) -31px 0 no-repeat; cursor: pointer; vertical-align: middle; margin-left: 5px; margin-top: 5px; - width:16px; - height:15px; + width:16px; + height:15px; float:left; } @@ -530,6 +549,41 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px 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 #64bdd9; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;} +/* 20150505讨论区*/ +.w664{ width:664px;} +.w140{ width:140px;} +.talklist_box{ } +.talkmain_box{ width:670px; border-bottom:1px dashed #d9d9d9; margin-bottom:20px; margin-top: 10px;} +.talkmain_pic{} +a.talkmain_pic{ display:block; width:42px; height:42px; padding:2px; border:1px solid #e3e3e3;} +a:hover.talkmain_pic{border:1px solid #64bdd9;} +.talkmain_txt{ width:610px; margin-left:10px; color:#333;} +a.talkmain_name{ color:#ff5722;} +a:hover.talkmain_name{ color:#d33503;} +.talkmain_tit{ color:#0781b4; width:450px; display:block; } +.talklist_main{ } +.talkWrapArrow{ display:block; float:right; margin-right:10px;background:url(../images/arrow.png) 0 0 no-repeat; height:7px; width:13px;} +.talkConIpt{ background:#f2f2f2; } +.talkWrapBox{ width:610px; margin-left:60px; } +.inputFeint{ border:1px solid #d9d9d9; background:#fff; width:583px; height:50px; margin:10px; margin-bottom:5px;color:#666;} +.inputFeint02{ border:1px solid #d9d9d9; background:#fff; width:535px; height:30px; margin:5px 0 5px 50px; color:#666;} +.inputFeint03{ border:1px solid #d9d9d9; background:#fff; width:490px; height:30px; margin:5px 0 5px 0px; color:#666;} +.talkWrapMsg{ background:#f2f2f2; padding:10px;} +a.Msg_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid #e3e3e3; float:left;} +a:hover.Msg_pic{border:1px solid #64bdd9;} +a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px solid #e3e3e3; float:left;} +a:hover.Reply_pic{border:1px solid #64bdd9;} +.Msg_txt{ float:left; width:540px; margin-left:10px;} +.Msg_txt p{ } +.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} +.talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; } +.Replybox{ float:left; width:495px; margin-left:5px;} +.talk_nextpage{ border:none; width:410px; margin:0 auto;} +.newtalk { margin-top:8px; margin-right:8px;} +/*.talk_new{ border-bottom:1px dashed #d9d9d9; padding-bottom:10px;}*/ +#about_newtalk{ display:none;} + + diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index 3ef981910..ebb290597 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -86,7 +86,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} .ping_con h2{ font-size:14px; color:#444443; margin-bottom:10px; } .ping_con p{ color:#777777; font-size:12px; border-bottom:1px dashed #CCC; padding-bottom:5px;} .ping_con p span a{ color:#777777;} -.ping_star{ width:165px; color:#333; font-weight:bold; margin-bottom:5px;} +.ping_star{ width:195px; color:#333; font-weight:bold; margin-bottom:5px;} .ping_star span a{ float:right; width:20px; height:20px; background:url(images/star.png);background-repeat: no-repeat; margin-right:3px;} .ping_con textarea{ height:76px; border:1px solid #15bccf; margin-bottom:5px; color:#666; font-size:12px;} a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;} @@ -175,6 +175,7 @@ a.member_search {width: 43px;height: 22px;background: #15bccf;color: #fff;text-a /*上传图片处理*/ .upload_img img{max-width: 100%;} +.to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;} diff --git a/public/stylesheets/hubspot/messenger-theme-flat.css b/public/stylesheets/hubspot/messenger-theme-flat.css index df8d35aeb..7795e5f3b 100644 --- a/public/stylesheets/hubspot/messenger-theme-flat.css +++ b/public/stylesheets/hubspot/messenger-theme-flat.css @@ -1,462 +1,462 @@ -@-webkit-keyframes ui-spinner-rotate-right { - /* line 64, ../../src/sass/messenger-spinner.scss */ - 0% { - -webkit-transform: rotate(0deg); - } - - /* line 65, ../../src/sass/messenger-spinner.scss */ - 25% { - -webkit-transform: rotate(180deg); - } - - /* line 66, ../../src/sass/messenger-spinner.scss */ - 50% { - -webkit-transform: rotate(180deg); - } - - /* line 67, ../../src/sass/messenger-spinner.scss */ - 75% { - -webkit-transform: rotate(360deg); - } - - /* line 68, ../../src/sass/messenger-spinner.scss */ - 100% { - -webkit-transform: rotate(360deg); - } -} - -@-webkit-keyframes ui-spinner-rotate-left { - /* line 72, ../../src/sass/messenger-spinner.scss */ - 0% { - -webkit-transform: rotate(0deg); - } - - /* line 73, ../../src/sass/messenger-spinner.scss */ - 25% { - -webkit-transform: rotate(0deg); - } - - /* line 74, ../../src/sass/messenger-spinner.scss */ - 50% { - -webkit-transform: rotate(180deg); - } - - /* line 75, ../../src/sass/messenger-spinner.scss */ - 75% { - -webkit-transform: rotate(180deg); - } - - /* line 76, ../../src/sass/messenger-spinner.scss */ - 100% { - -webkit-transform: rotate(360deg); - } -} - -@-moz-keyframes ui-spinner-rotate-right { - /* line 80, ../../src/sass/messenger-spinner.scss */ - 0% { - -moz-transform: rotate(0deg); - } - - /* line 81, ../../src/sass/messenger-spinner.scss */ - 25% { - -moz-transform: rotate(180deg); - } - - /* line 82, ../../src/sass/messenger-spinner.scss */ - 50% { - -moz-transform: rotate(180deg); - } - - /* line 83, ../../src/sass/messenger-spinner.scss */ - 75% { - -moz-transform: rotate(360deg); - } - - /* line 84, ../../src/sass/messenger-spinner.scss */ - 100% { - -moz-transform: rotate(360deg); - } -} - -@-moz-keyframes ui-spinner-rotate-left { - /* line 88, ../../src/sass/messenger-spinner.scss */ - 0% { - -moz-transform: rotate(0deg); - } - - /* line 89, ../../src/sass/messenger-spinner.scss */ - 25% { - -moz-transform: rotate(0deg); - } - - /* line 90, ../../src/sass/messenger-spinner.scss */ - 50% { - -moz-transform: rotate(180deg); - } - - /* line 91, ../../src/sass/messenger-spinner.scss */ - 75% { - -moz-transform: rotate(180deg); - } - - /* line 92, ../../src/sass/messenger-spinner.scss */ - 100% { - -moz-transform: rotate(360deg); - } -} - -@keyframes ui-spinner-rotate-right { - /* line 96, ../../src/sass/messenger-spinner.scss */ - 0% { - transform: rotate(0deg); - } - - /* line 97, ../../src/sass/messenger-spinner.scss */ - 25% { - transform: rotate(180deg); - } - - /* line 98, ../../src/sass/messenger-spinner.scss */ - 50% { - transform: rotate(180deg); - } - - /* line 99, ../../src/sass/messenger-spinner.scss */ - 75% { - transform: rotate(360deg); - } - - /* line 100, ../../src/sass/messenger-spinner.scss */ - 100% { - transform: rotate(360deg); - } -} - -@keyframes ui-spinner-rotate-left { - /* line 104, ../../src/sass/messenger-spinner.scss */ - 0% { - transform: rotate(0deg); - } - - /* line 105, ../../src/sass/messenger-spinner.scss */ - 25% { - transform: rotate(0deg); - } - - /* line 106, ../../src/sass/messenger-spinner.scss */ - 50% { - transform: rotate(180deg); - } - - /* line 107, ../../src/sass/messenger-spinner.scss */ - 75% { - transform: rotate(180deg); - } - - /* line 108, ../../src/sass/messenger-spinner.scss */ - 100% { - transform: rotate(360deg); - } -} - -/* line 116, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner { - position: relative; - border-radius: 100%; -} -/* line 120, ../../src/sass/messenger-spinner.scss */ -ul.messenger.messenger-spinner-active .messenger-spinner .messenger-spinner { - display: block; -} -/* line 124, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side { - width: 50%; - height: 100%; - overflow: hidden; - position: absolute; -} -/* line 130, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - border-radius: 999px; - position: absolute; - width: 100%; - height: 100%; - -webkit-animation-iteration-count: infinite; - -moz-animation-iteration-count: infinite; - -ms-animation-iteration-count: infinite; - -o-animation-iteration-count: infinite; - animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; - -moz-animation-timing-function: linear; - -ms-animation-timing-function: linear; - -o-animation-timing-function: linear; - animation-timing-function: linear; -} -/* line 140, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-left { - left: 0; -} -/* line 143, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-left .messenger-spinner-fill { - left: 100%; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - -webkit-animation-name: ui-spinner-rotate-left; - -moz-animation-name: ui-spinner-rotate-left; - -ms-animation-name: ui-spinner-rotate-left; - -o-animation-name: ui-spinner-rotate-left; - animation-name: ui-spinner-rotate-left; - -webkit-transform-origin: 0 50%; - -moz-transform-origin: 0 50%; - -ms-transform-origin: 0 50%; - -o-transform-origin: 0 50%; - transform-origin: 0 50%; -} -/* line 152, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-right { - left: 50%; -} -/* line 155, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-right .messenger-spinner-fill { - left: -100%; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - -webkit-animation-name: ui-spinner-rotate-right; - -moz-animation-name: ui-spinner-rotate-right; - -ms-animation-name: ui-spinner-rotate-right; - -o-animation-name: ui-spinner-rotate-right; - animation-name: ui-spinner-rotate-right; - -webkit-transform-origin: 100% 50%; - -moz-transform-origin: 100% 50%; - -ms-transform-origin: 100% 50%; - -o-transform-origin: 100% 50%; - transform-origin: 100% 50%; -} - -/* line 15, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - -moz-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; - background: #404040; -} -/* line 20, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat.messenger-empty { - display: none; -} -/* line 23, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message { - -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; - -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; - box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - -ms-border-radius: 0px; - -o-border-radius: 0px; - border-radius: 0px; - position: relative; - border: 0px; - margin-bottom: 0px; - font-size: 13px; - background: transparent; - color: #f0f0f0; - font-weight: 500; - padding: 10px 30px 13px 65px; -} -/* line 35, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-close { - position: absolute; - top: 0px; - right: 0px; - color: #888888; - opacity: 1; - font-weight: bold; - display: block; - font-size: 20px; - line-height: 20px; - padding: 8px 10px 7px 7px; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -/* line 51, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-close:hover { - color: #bbbbbb; -} -/* line 54, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-close:active { - color: #777777; -} -/* line 57, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-actions { - float: none; - margin-top: 10px; -} -/* line 61, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-actions a { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - text-decoration: none; - color: #aaaaaa; - background: #2e2e2e; - display: inline-block; - padding: 10px; - margin-right: 10px; - padding: 4px 11px 6px; - text-transform: capitalize; -} -/* line 72, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-actions a:hover { - color: #f0f0f0; - background: #2e2e2e; -} -/* line 76, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-actions a:active { - background: #292929; - color: #aaaaaa; -} -/* line 80, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-actions .messenger-phrase { - display: none; -} -/* line 83, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message .messenger-message-inner:before { - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - -ms-border-radius: 50%; - -o-border-radius: 50%; - border-radius: 50%; - position: absolute; - left: 17px; - display: block; - content: " "; - top: 50%; - margin-top: -8px; - height: 13px; - width: 13px; - z-index: 20; -} -/* line 95, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message.alert-success .messenger-message-inner:before { - background: #5fca4a; -} -/* line 98, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message.alert-info .messenger-message-inner:before { - background: #61c4b8; -} -/* line 103, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message.alert-error .messenger-message-inner:before { - background: #dd6a45; -} -/* line 32, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner { - width: 32px; - height: 32px; - background: transparent; -} -/* line 37, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - background: #dd6a45; - -webkit-animation-duration: 20s; - -moz-animation-duration: 20s; - -ms-animation-duration: 20s; - -o-animation-duration: 20s; - animation-duration: 20s; - opacity: 1; -} -/* line 45, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner:after { - content: ""; - background: #292929; - position: absolute; - width: 26px; - height: 26px; - border-radius: 50%; - top: 3px; - left: 3px; - display: block; -} -/* line 32, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner { - width: 32px; - height: 32px; - background: transparent; -} -/* line 37, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - background: #dd6a45; - -webkit-animation-duration: 600s; - -moz-animation-duration: 600s; - -ms-animation-duration: 600s; - -o-animation-duration: 600s; - animation-duration: 600s; - opacity: 1; -} -/* line 45, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner:after { - content: ""; - background: #292929; - position: absolute; - width: 26px; - height: 26px; - border-radius: 50%; - top: 3px; - left: 3px; - display: block; -} -/* line 114, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message-slot.messenger-last .messenger-message { - -webkit-border-radius: 4px 4px 0px 0px; - -moz-border-radius: 4px 4px 0px 0px; - -ms-border-radius: 4px 4px 0px 0px; - -o-border-radius: 4px 4px 0px 0px; - border-radius: 4px 4px 0px 0px; - -webkit-box-shadow: inset 48px 0px 0px #292929; - -moz-box-shadow: inset 48px 0px 0px #292929; - box-shadow: inset 48px 0px 0px #292929; -} -/* line 118, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message-slot.messenger-first .messenger-message { - -webkit-border-radius: 0px 0px 4px 4px; - -moz-border-radius: 0px 0px 4px 4px; - -ms-border-radius: 0px 0px 4px 4px; - -o-border-radius: 0px 0px 4px 4px; - border-radius: 0px 0px 4px 4px; - -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; - -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; - box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; -} -/* line 122, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-message-slot.messenger-first.messenger-last .messenger-message { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 48px 0px 0px #292929; - -moz-box-shadow: inset 48px 0px 0px #292929; - box-shadow: inset 48px 0px 0px #292929; -} -/* line 126, ../../src/sass/messenger-theme-flat.sass */ -ul.messenger-theme-flat .messenger-spinner { - display: block; - position: absolute; - left: 7px; - top: 50%; - margin-top: -18px; - z-index: 999; - height: 32px; - width: 32px; - z-index: 10; -} +@-webkit-keyframes ui-spinner-rotate-right { + /* line 64, ../../src/sass/messenger-spinner.scss */ + 0% { + -webkit-transform: rotate(0deg); + } + + /* line 65, ../../src/sass/messenger-spinner.scss */ + 25% { + -webkit-transform: rotate(180deg); + } + + /* line 66, ../../src/sass/messenger-spinner.scss */ + 50% { + -webkit-transform: rotate(180deg); + } + + /* line 67, ../../src/sass/messenger-spinner.scss */ + 75% { + -webkit-transform: rotate(360deg); + } + + /* line 68, ../../src/sass/messenger-spinner.scss */ + 100% { + -webkit-transform: rotate(360deg); + } +} + +@-webkit-keyframes ui-spinner-rotate-left { + /* line 72, ../../src/sass/messenger-spinner.scss */ + 0% { + -webkit-transform: rotate(0deg); + } + + /* line 73, ../../src/sass/messenger-spinner.scss */ + 25% { + -webkit-transform: rotate(0deg); + } + + /* line 74, ../../src/sass/messenger-spinner.scss */ + 50% { + -webkit-transform: rotate(180deg); + } + + /* line 75, ../../src/sass/messenger-spinner.scss */ + 75% { + -webkit-transform: rotate(180deg); + } + + /* line 76, ../../src/sass/messenger-spinner.scss */ + 100% { + -webkit-transform: rotate(360deg); + } +} + +@-moz-keyframes ui-spinner-rotate-right { + /* line 80, ../../src/sass/messenger-spinner.scss */ + 0% { + -moz-transform: rotate(0deg); + } + + /* line 81, ../../src/sass/messenger-spinner.scss */ + 25% { + -moz-transform: rotate(180deg); + } + + /* line 82, ../../src/sass/messenger-spinner.scss */ + 50% { + -moz-transform: rotate(180deg); + } + + /* line 83, ../../src/sass/messenger-spinner.scss */ + 75% { + -moz-transform: rotate(360deg); + } + + /* line 84, ../../src/sass/messenger-spinner.scss */ + 100% { + -moz-transform: rotate(360deg); + } +} + +@-moz-keyframes ui-spinner-rotate-left { + /* line 88, ../../src/sass/messenger-spinner.scss */ + 0% { + -moz-transform: rotate(0deg); + } + + /* line 89, ../../src/sass/messenger-spinner.scss */ + 25% { + -moz-transform: rotate(0deg); + } + + /* line 90, ../../src/sass/messenger-spinner.scss */ + 50% { + -moz-transform: rotate(180deg); + } + + /* line 91, ../../src/sass/messenger-spinner.scss */ + 75% { + -moz-transform: rotate(180deg); + } + + /* line 92, ../../src/sass/messenger-spinner.scss */ + 100% { + -moz-transform: rotate(360deg); + } +} + +@keyframes ui-spinner-rotate-right { + /* line 96, ../../src/sass/messenger-spinner.scss */ + 0% { + transform: rotate(0deg); + } + + /* line 97, ../../src/sass/messenger-spinner.scss */ + 25% { + transform: rotate(180deg); + } + + /* line 98, ../../src/sass/messenger-spinner.scss */ + 50% { + transform: rotate(180deg); + } + + /* line 99, ../../src/sass/messenger-spinner.scss */ + 75% { + transform: rotate(360deg); + } + + /* line 100, ../../src/sass/messenger-spinner.scss */ + 100% { + transform: rotate(360deg); + } +} + +@keyframes ui-spinner-rotate-left { + /* line 104, ../../src/sass/messenger-spinner.scss */ + 0% { + transform: rotate(0deg); + } + + /* line 105, ../../src/sass/messenger-spinner.scss */ + 25% { + transform: rotate(0deg); + } + + /* line 106, ../../src/sass/messenger-spinner.scss */ + 50% { + transform: rotate(180deg); + } + + /* line 107, ../../src/sass/messenger-spinner.scss */ + 75% { + transform: rotate(180deg); + } + + /* line 108, ../../src/sass/messenger-spinner.scss */ + 100% { + transform: rotate(360deg); + } +} + +/* line 116, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner { + position: relative; + border-radius: 100%; +} +/* line 120, ../../src/sass/messenger-spinner.scss */ +ul.messenger.messenger-spinner-active .messenger-spinner .messenger-spinner { + display: block; +} +/* line 124, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side { + width: 50%; + height: 100%; + overflow: hidden; + position: absolute; +} +/* line 130, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + border-radius: 999px; + position: absolute; + width: 100%; + height: 100%; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + -moz-animation-timing-function: linear; + -ms-animation-timing-function: linear; + -o-animation-timing-function: linear; + animation-timing-function: linear; +} +/* line 140, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-left { + left: 0; +} +/* line 143, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-left .messenger-spinner-fill { + left: 100%; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + -webkit-animation-name: ui-spinner-rotate-left; + -moz-animation-name: ui-spinner-rotate-left; + -ms-animation-name: ui-spinner-rotate-left; + -o-animation-name: ui-spinner-rotate-left; + animation-name: ui-spinner-rotate-left; + -webkit-transform-origin: 0 50%; + -moz-transform-origin: 0 50%; + -ms-transform-origin: 0 50%; + -o-transform-origin: 0 50%; + transform-origin: 0 50%; +} +/* line 152, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-right { + left: 50%; +} +/* line 155, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-right .messenger-spinner-fill { + left: -100%; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + -webkit-animation-name: ui-spinner-rotate-right; + -moz-animation-name: ui-spinner-rotate-right; + -ms-animation-name: ui-spinner-rotate-right; + -o-animation-name: ui-spinner-rotate-right; + animation-name: ui-spinner-rotate-right; + -webkit-transform-origin: 100% 50%; + -moz-transform-origin: 100% 50%; + -ms-transform-origin: 100% 50%; + -o-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} + +/* line 15, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; + background: #404040; +} +/* line 20, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat.messenger-empty { + display: none; +} +/* line 23, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message { + -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; + -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; + box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + -ms-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; + position: relative; + border: 0px; + margin-bottom: 0px; + font-size: 13px; + background: transparent; + color: #f0f0f0; + font-weight: 500; + padding: 10px 30px 13px 65px; +} +/* line 35, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-close { + position: absolute; + top: 0px; + right: 0px; + color: #888888; + opacity: 1; + font-weight: bold; + display: block; + font-size: 20px; + line-height: 20px; + padding: 8px 10px 7px 7px; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +/* line 51, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-close:hover { + color: #bbbbbb; +} +/* line 54, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-close:active { + color: #777777; +} +/* line 57, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-actions { + float: none; + margin-top: 10px; +} +/* line 61, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-actions a { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + text-decoration: none; + color: #aaaaaa; + background: #2e2e2e; + display: inline-block; + padding: 10px; + margin-right: 10px; + padding: 4px 11px 6px; + text-transform: capitalize; +} +/* line 72, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-actions a:hover { + color: #f0f0f0; + background: #2e2e2e; +} +/* line 76, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-actions a:active { + background: #292929; + color: #aaaaaa; +} +/* line 80, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-actions .messenger-phrase { + display: none; +} +/* line 83, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message .messenger-message-inner:before { + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 17px; + display: block; + content: " "; + top: 50%; + margin-top: -8px; + height: 13px; + width: 13px; + z-index: 20; +} +/* line 95, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message.alert-success .messenger-message-inner:before { + background: #5fca4a; +} +/* line 98, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message.alert-info .messenger-message-inner:before { + background: #61c4b8; +} +/* line 103, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message.alert-error .messenger-message-inner:before { + background: #dd6a45; +} +/* line 32, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner { + width: 32px; + height: 32px; + background: transparent; +} +/* line 37, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + background: #dd6a45; + -webkit-animation-duration: 20s; + -moz-animation-duration: 20s; + -ms-animation-duration: 20s; + -o-animation-duration: 20s; + animation-duration: 20s; + opacity: 1; +} +/* line 45, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner:after { + content: ""; + background: #292929; + position: absolute; + width: 26px; + height: 26px; + border-radius: 50%; + top: 3px; + left: 3px; + display: block; +} +/* line 32, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner { + width: 32px; + height: 32px; + background: transparent; +} +/* line 37, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + background: #dd6a45; + -webkit-animation-duration: 600s; + -moz-animation-duration: 600s; + -ms-animation-duration: 600s; + -o-animation-duration: 600s; + animation-duration: 600s; + opacity: 1; +} +/* line 45, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner:after { + content: ""; + background: #292929; + position: absolute; + width: 26px; + height: 26px; + border-radius: 50%; + top: 3px; + left: 3px; + display: block; +} +/* line 114, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message-slot.messenger-last .messenger-message { + -webkit-border-radius: 4px 4px 0px 0px; + -moz-border-radius: 4px 4px 0px 0px; + -ms-border-radius: 4px 4px 0px 0px; + -o-border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0px 0px; + -webkit-box-shadow: inset 48px 0px 0px #292929; + -moz-box-shadow: inset 48px 0px 0px #292929; + box-shadow: inset 48px 0px 0px #292929; +} +/* line 118, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message-slot.messenger-first .messenger-message { + -webkit-border-radius: 0px 0px 4px 4px; + -moz-border-radius: 0px 0px 4px 4px; + -ms-border-radius: 0px 0px 4px 4px; + -o-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; + -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; + -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; + box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929; +} +/* line 122, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-message-slot.messenger-first.messenger-last .messenger-message { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 48px 0px 0px #292929; + -moz-box-shadow: inset 48px 0px 0px #292929; + box-shadow: inset 48px 0px 0px #292929; +} +/* line 126, ../../src/sass/messenger-theme-flat.sass */ +ul.messenger-theme-flat .messenger-spinner { + display: block; + position: absolute; + left: 7px; + top: 50%; + margin-top: -18px; + z-index: 999; + height: 32px; + width: 32px; + z-index: 10; +} diff --git a/public/stylesheets/hubspot/messenger-theme-future.css b/public/stylesheets/hubspot/messenger-theme-future.css index 640a56823..f3c7bc8de 100644 --- a/public/stylesheets/hubspot/messenger-theme-future.css +++ b/public/stylesheets/hubspot/messenger-theme-future.css @@ -1,496 +1,496 @@ -@-webkit-keyframes ui-spinner-rotate-right { - /* line 64, ../../src/sass/messenger-spinner.scss */ - 0% { - -webkit-transform: rotate(0deg); - } - - /* line 65, ../../src/sass/messenger-spinner.scss */ - 25% { - -webkit-transform: rotate(180deg); - } - - /* line 66, ../../src/sass/messenger-spinner.scss */ - 50% { - -webkit-transform: rotate(180deg); - } - - /* line 67, ../../src/sass/messenger-spinner.scss */ - 75% { - -webkit-transform: rotate(360deg); - } - - /* line 68, ../../src/sass/messenger-spinner.scss */ - 100% { - -webkit-transform: rotate(360deg); - } -} - -@-webkit-keyframes ui-spinner-rotate-left { - /* line 72, ../../src/sass/messenger-spinner.scss */ - 0% { - -webkit-transform: rotate(0deg); - } - - /* line 73, ../../src/sass/messenger-spinner.scss */ - 25% { - -webkit-transform: rotate(0deg); - } - - /* line 74, ../../src/sass/messenger-spinner.scss */ - 50% { - -webkit-transform: rotate(180deg); - } - - /* line 75, ../../src/sass/messenger-spinner.scss */ - 75% { - -webkit-transform: rotate(180deg); - } - - /* line 76, ../../src/sass/messenger-spinner.scss */ - 100% { - -webkit-transform: rotate(360deg); - } -} - -@-moz-keyframes ui-spinner-rotate-right { - /* line 80, ../../src/sass/messenger-spinner.scss */ - 0% { - -moz-transform: rotate(0deg); - } - - /* line 81, ../../src/sass/messenger-spinner.scss */ - 25% { - -moz-transform: rotate(180deg); - } - - /* line 82, ../../src/sass/messenger-spinner.scss */ - 50% { - -moz-transform: rotate(180deg); - } - - /* line 83, ../../src/sass/messenger-spinner.scss */ - 75% { - -moz-transform: rotate(360deg); - } - - /* line 84, ../../src/sass/messenger-spinner.scss */ - 100% { - -moz-transform: rotate(360deg); - } -} - -@-moz-keyframes ui-spinner-rotate-left { - /* line 88, ../../src/sass/messenger-spinner.scss */ - 0% { - -moz-transform: rotate(0deg); - } - - /* line 89, ../../src/sass/messenger-spinner.scss */ - 25% { - -moz-transform: rotate(0deg); - } - - /* line 90, ../../src/sass/messenger-spinner.scss */ - 50% { - -moz-transform: rotate(180deg); - } - - /* line 91, ../../src/sass/messenger-spinner.scss */ - 75% { - -moz-transform: rotate(180deg); - } - - /* line 92, ../../src/sass/messenger-spinner.scss */ - 100% { - -moz-transform: rotate(360deg); - } -} - -@keyframes ui-spinner-rotate-right { - /* line 96, ../../src/sass/messenger-spinner.scss */ - 0% { - transform: rotate(0deg); - } - - /* line 97, ../../src/sass/messenger-spinner.scss */ - 25% { - transform: rotate(180deg); - } - - /* line 98, ../../src/sass/messenger-spinner.scss */ - 50% { - transform: rotate(180deg); - } - - /* line 99, ../../src/sass/messenger-spinner.scss */ - 75% { - transform: rotate(360deg); - } - - /* line 100, ../../src/sass/messenger-spinner.scss */ - 100% { - transform: rotate(360deg); - } -} - -@keyframes ui-spinner-rotate-left { - /* line 104, ../../src/sass/messenger-spinner.scss */ - 0% { - transform: rotate(0deg); - } - - /* line 105, ../../src/sass/messenger-spinner.scss */ - 25% { - transform: rotate(0deg); - } - - /* line 106, ../../src/sass/messenger-spinner.scss */ - 50% { - transform: rotate(180deg); - } - - /* line 107, ../../src/sass/messenger-spinner.scss */ - 75% { - transform: rotate(180deg); - } - - /* line 108, ../../src/sass/messenger-spinner.scss */ - 100% { - transform: rotate(360deg); - } -} - -/* line 116, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner { - position: relative; - border-radius: 100%; -} -/* line 120, ../../src/sass/messenger-spinner.scss */ -ul.messenger.messenger-spinner-active .messenger-spinner .messenger-spinner { - display: block; -} -/* line 124, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side { - width: 50%; - height: 100%; - overflow: hidden; - position: absolute; -} -/* line 130, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - border-radius: 999px; - position: absolute; - width: 100%; - height: 100%; - -webkit-animation-iteration-count: infinite; - -moz-animation-iteration-count: infinite; - -ms-animation-iteration-count: infinite; - -o-animation-iteration-count: infinite; - animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; - -moz-animation-timing-function: linear; - -ms-animation-timing-function: linear; - -o-animation-timing-function: linear; - animation-timing-function: linear; -} -/* line 140, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-left { - left: 0; -} -/* line 143, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-left .messenger-spinner-fill { - left: 100%; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - -webkit-animation-name: ui-spinner-rotate-left; - -moz-animation-name: ui-spinner-rotate-left; - -ms-animation-name: ui-spinner-rotate-left; - -o-animation-name: ui-spinner-rotate-left; - animation-name: ui-spinner-rotate-left; - -webkit-transform-origin: 0 50%; - -moz-transform-origin: 0 50%; - -ms-transform-origin: 0 50%; - -o-transform-origin: 0 50%; - transform-origin: 0 50%; -} -/* line 152, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-right { - left: 50%; -} -/* line 155, ../../src/sass/messenger-spinner.scss */ -.messenger-spinner .messenger-spinner-side-right .messenger-spinner-fill { - left: -100%; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - -webkit-animation-name: ui-spinner-rotate-right; - -moz-animation-name: ui-spinner-rotate-right; - -ms-animation-name: ui-spinner-rotate-right; - -o-animation-name: ui-spinner-rotate-right; - animation-name: ui-spinner-rotate-right; - -webkit-transform-origin: 100% 50%; - -moz-transform-origin: 100% 50%; - -ms-transform-origin: 100% 50%; - -o-transform-origin: 100% 50%; - transform-origin: 100% 50%; -} - -/* line 15, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future { - -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); - -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); - box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - -moz-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5c5b5b), color-stop(100%, #353535)); - background-image: -webkit-linear-gradient(#5c5b5b, #353535); - background-image: -moz-linear-gradient(#5c5b5b, #353535); - background-image: -o-linear-gradient(#5c5b5b, #353535); - background-image: linear-gradient(#5c5b5b, #353535); - background-color: #5c5b5b; - border: 1px solid rgba(0, 0, 0, 0.5); -} -/* line 23, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message { - -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - -ms-border-radius: 0px; - -o-border-radius: 0px; - border-radius: 0px; - position: relative; - border: 0px; - margin-bottom: 0px; - font-size: 13px; - background: transparent; - color: #f0f0f0; - text-shadow: 0px 1px #111111; - font-weight: 500; - padding: 10px 30px 13px 65px; -} -/* line 36, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message a { - color: #5599ff; -} -/* line 39, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-close { - position: absolute; - top: 0px; - right: 0px; - color: #888888; - text-shadow: 0px 1px black; - opacity: 1; - font-weight: bold; - display: block; - font-size: 20px; - line-height: 20px; - padding: 8px 10px 7px 7px; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -/* line 56, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-close:hover { - color: #bbbbbb; -} -/* line 59, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-close:active { - color: #777777; -} -/* line 62, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-actions { - float: none; - margin-top: 10px; -} -/* line 66, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-actions a { - -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); - -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); - box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - text-decoration: none; - display: inline-block; - padding: 10px; - color: #aaaaaa; - text-shadow: 0px 1px #222222; - margin-right: 10px; - padding: 3px 10px 5px; - text-transform: capitalize; -} -/* line 78, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-actions a:hover { - -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); - -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); - box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); - color: #f0f0f0; -} -/* line 82, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-actions a:active { - -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); - box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); - background: rgba(0, 0, 0, 0.04); - color: #aaaaaa; -} -/* line 87, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-actions .messenger-phrase { - display: none; -} -/* line 90, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message .messenger-message-inner:before { - -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); - box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - -ms-border-radius: 50%; - -o-border-radius: 50%; - border-radius: 50%; - position: absolute; - left: 17px; - display: block; - content: " "; - top: 50%; - margin-top: -8px; - height: 13px; - width: 13px; - z-index: 20; -} -/* line 103, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message.alert-success .messenger-message-inner:before { - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5fca4a), color-stop(100%, #098d38)); - background-image: -webkit-linear-gradient(top, #5fca4a, #098d38); - background-image: -moz-linear-gradient(top, #5fca4a, #098d38); - background-image: -o-linear-gradient(top, #5fca4a, #098d38); - background-image: linear-gradient(top, #5fca4a, #098d38); - background-color: #5fca4a; -} -/* line 107, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message.alert-info .messenger-message-inner:before { - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #61c4b8), color-stop(100%, #1992a3)); - background-image: -webkit-linear-gradient(top, #61c4b8, #1992a3); - background-image: -moz-linear-gradient(top, #61c4b8, #1992a3); - background-image: -o-linear-gradient(top, #61c4b8, #1992a3); - background-image: linear-gradient(top, #61c4b8, #1992a3); - background-color: #61c4b8; -} -/* line 113, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message.alert-error .messenger-message-inner:before { - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dd6a45), color-stop(100%, #91361a)); - background-image: -webkit-linear-gradient(top, #dd6a45, #91361a); - background-image: -moz-linear-gradient(top, #dd6a45, #91361a); - background-image: -o-linear-gradient(top, #dd6a45, #91361a); - background-image: linear-gradient(top, #dd6a45, #91361a); - background-color: #dd6a45; -} -/* line 32, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner { - width: 32px; - height: 32px; - background: transparent; -} -/* line 37, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - background: #dd6a45; - -webkit-animation-duration: 20s; - -moz-animation-duration: 20s; - -ms-animation-duration: 20s; - -o-animation-duration: 20s; - animation-duration: 20s; - opacity: 1; -} -/* line 45, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner:after { - content: ""; - background: #333333; - position: absolute; - width: 26px; - height: 26px; - border-radius: 50%; - top: 3px; - left: 3px; - display: block; -} -/* line 32, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner { - width: 32px; - height: 32px; - background: transparent; -} -/* line 37, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { - background: #dd6a45; - -webkit-animation-duration: 600s; - -moz-animation-duration: 600s; - -ms-animation-duration: 600s; - -o-animation-duration: 600s; - animation-duration: 600s; - opacity: 1; -} -/* line 45, ../../src/sass/messenger-spinner.scss */ -ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner:after { - content: ""; - background: #333333; - position: absolute; - width: 26px; - height: 26px; - border-radius: 50%; - top: 3px; - left: 3px; - display: block; -} -/* line 125, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message-slot.messenger-last .messenger-message { - -webkit-border-radius: 4px 4px 0px 0px; - -moz-border-radius: 4px 4px 0px 0px; - -ms-border-radius: 4px 4px 0px 0px; - -o-border-radius: 4px 4px 0px 0px; - border-radius: 4px 4px 0px 0px; -} -/* line 128, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message-slot.messenger-first .messenger-message { - -webkit-border-radius: 0px 0px 4px 4px; - -moz-border-radius: 0px 0px 4px 4px; - -ms-border-radius: 0px 0px 4px 4px; - -o-border-radius: 0px 0px 4px 4px; - border-radius: 0px 0px 4px 4px; - -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); -} -/* line 132, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-message-slot.messenger-first.messenger-last .messenger-message { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - -moz-box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); - box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); -} -/* line 136, ../../src/sass/messenger-theme-future.sass */ -ul.messenger-theme-future .messenger-spinner { - display: block; - position: absolute; - left: 7px; - top: 50%; - margin-top: -18px; - z-index: 999; - height: 32px; - width: 32px; - z-index: 10; -} +@-webkit-keyframes ui-spinner-rotate-right { + /* line 64, ../../src/sass/messenger-spinner.scss */ + 0% { + -webkit-transform: rotate(0deg); + } + + /* line 65, ../../src/sass/messenger-spinner.scss */ + 25% { + -webkit-transform: rotate(180deg); + } + + /* line 66, ../../src/sass/messenger-spinner.scss */ + 50% { + -webkit-transform: rotate(180deg); + } + + /* line 67, ../../src/sass/messenger-spinner.scss */ + 75% { + -webkit-transform: rotate(360deg); + } + + /* line 68, ../../src/sass/messenger-spinner.scss */ + 100% { + -webkit-transform: rotate(360deg); + } +} + +@-webkit-keyframes ui-spinner-rotate-left { + /* line 72, ../../src/sass/messenger-spinner.scss */ + 0% { + -webkit-transform: rotate(0deg); + } + + /* line 73, ../../src/sass/messenger-spinner.scss */ + 25% { + -webkit-transform: rotate(0deg); + } + + /* line 74, ../../src/sass/messenger-spinner.scss */ + 50% { + -webkit-transform: rotate(180deg); + } + + /* line 75, ../../src/sass/messenger-spinner.scss */ + 75% { + -webkit-transform: rotate(180deg); + } + + /* line 76, ../../src/sass/messenger-spinner.scss */ + 100% { + -webkit-transform: rotate(360deg); + } +} + +@-moz-keyframes ui-spinner-rotate-right { + /* line 80, ../../src/sass/messenger-spinner.scss */ + 0% { + -moz-transform: rotate(0deg); + } + + /* line 81, ../../src/sass/messenger-spinner.scss */ + 25% { + -moz-transform: rotate(180deg); + } + + /* line 82, ../../src/sass/messenger-spinner.scss */ + 50% { + -moz-transform: rotate(180deg); + } + + /* line 83, ../../src/sass/messenger-spinner.scss */ + 75% { + -moz-transform: rotate(360deg); + } + + /* line 84, ../../src/sass/messenger-spinner.scss */ + 100% { + -moz-transform: rotate(360deg); + } +} + +@-moz-keyframes ui-spinner-rotate-left { + /* line 88, ../../src/sass/messenger-spinner.scss */ + 0% { + -moz-transform: rotate(0deg); + } + + /* line 89, ../../src/sass/messenger-spinner.scss */ + 25% { + -moz-transform: rotate(0deg); + } + + /* line 90, ../../src/sass/messenger-spinner.scss */ + 50% { + -moz-transform: rotate(180deg); + } + + /* line 91, ../../src/sass/messenger-spinner.scss */ + 75% { + -moz-transform: rotate(180deg); + } + + /* line 92, ../../src/sass/messenger-spinner.scss */ + 100% { + -moz-transform: rotate(360deg); + } +} + +@keyframes ui-spinner-rotate-right { + /* line 96, ../../src/sass/messenger-spinner.scss */ + 0% { + transform: rotate(0deg); + } + + /* line 97, ../../src/sass/messenger-spinner.scss */ + 25% { + transform: rotate(180deg); + } + + /* line 98, ../../src/sass/messenger-spinner.scss */ + 50% { + transform: rotate(180deg); + } + + /* line 99, ../../src/sass/messenger-spinner.scss */ + 75% { + transform: rotate(360deg); + } + + /* line 100, ../../src/sass/messenger-spinner.scss */ + 100% { + transform: rotate(360deg); + } +} + +@keyframes ui-spinner-rotate-left { + /* line 104, ../../src/sass/messenger-spinner.scss */ + 0% { + transform: rotate(0deg); + } + + /* line 105, ../../src/sass/messenger-spinner.scss */ + 25% { + transform: rotate(0deg); + } + + /* line 106, ../../src/sass/messenger-spinner.scss */ + 50% { + transform: rotate(180deg); + } + + /* line 107, ../../src/sass/messenger-spinner.scss */ + 75% { + transform: rotate(180deg); + } + + /* line 108, ../../src/sass/messenger-spinner.scss */ + 100% { + transform: rotate(360deg); + } +} + +/* line 116, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner { + position: relative; + border-radius: 100%; +} +/* line 120, ../../src/sass/messenger-spinner.scss */ +ul.messenger.messenger-spinner-active .messenger-spinner .messenger-spinner { + display: block; +} +/* line 124, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side { + width: 50%; + height: 100%; + overflow: hidden; + position: absolute; +} +/* line 130, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + border-radius: 999px; + position: absolute; + width: 100%; + height: 100%; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + -moz-animation-timing-function: linear; + -ms-animation-timing-function: linear; + -o-animation-timing-function: linear; + animation-timing-function: linear; +} +/* line 140, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-left { + left: 0; +} +/* line 143, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-left .messenger-spinner-fill { + left: 100%; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + -webkit-animation-name: ui-spinner-rotate-left; + -moz-animation-name: ui-spinner-rotate-left; + -ms-animation-name: ui-spinner-rotate-left; + -o-animation-name: ui-spinner-rotate-left; + animation-name: ui-spinner-rotate-left; + -webkit-transform-origin: 0 50%; + -moz-transform-origin: 0 50%; + -ms-transform-origin: 0 50%; + -o-transform-origin: 0 50%; + transform-origin: 0 50%; +} +/* line 152, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-right { + left: 50%; +} +/* line 155, ../../src/sass/messenger-spinner.scss */ +.messenger-spinner .messenger-spinner-side-right .messenger-spinner-fill { + left: -100%; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + -webkit-animation-name: ui-spinner-rotate-right; + -moz-animation-name: ui-spinner-rotate-right; + -ms-animation-name: ui-spinner-rotate-right; + -o-animation-name: ui-spinner-rotate-right; + animation-name: ui-spinner-rotate-right; + -webkit-transform-origin: 100% 50%; + -moz-transform-origin: 100% 50%; + -ms-transform-origin: 100% 50%; + -o-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} + +/* line 15, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future { + -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); + -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); + box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5c5b5b), color-stop(100%, #353535)); + background-image: -webkit-linear-gradient(#5c5b5b, #353535); + background-image: -moz-linear-gradient(#5c5b5b, #353535); + background-image: -o-linear-gradient(#5c5b5b, #353535); + background-image: linear-gradient(#5c5b5b, #353535); + background-color: #5c5b5b; + border: 1px solid rgba(0, 0, 0, 0.5); +} +/* line 23, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message { + -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 0px -1px rgba(0, 0, 0, 0.23), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + -ms-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; + position: relative; + border: 0px; + margin-bottom: 0px; + font-size: 13px; + background: transparent; + color: #f0f0f0; + text-shadow: 0px 1px #111111; + font-weight: 500; + padding: 10px 30px 13px 65px; +} +/* line 36, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message a { + color: #5599ff; +} +/* line 39, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-close { + position: absolute; + top: 0px; + right: 0px; + color: #888888; + text-shadow: 0px 1px black; + opacity: 1; + font-weight: bold; + display: block; + font-size: 20px; + line-height: 20px; + padding: 8px 10px 7px 7px; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +/* line 56, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-close:hover { + color: #bbbbbb; +} +/* line 59, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-close:active { + color: #777777; +} +/* line 62, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-actions { + float: none; + margin-top: 10px; +} +/* line 66, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-actions a { + -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); + -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); + box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.1); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + text-decoration: none; + display: inline-block; + padding: 10px; + color: #aaaaaa; + text-shadow: 0px 1px #222222; + margin-right: 10px; + padding: 3px 10px 5px; + text-transform: capitalize; +} +/* line 78, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-actions a:hover { + -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); + -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); + box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2), inset 0px 1px rgba(255, 255, 255, 0.2); + color: #f0f0f0; +} +/* line 82, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-actions a:active { + -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.28), inset 0px 1px rgba(0, 0, 0, 0.1); + background: rgba(0, 0, 0, 0.04); + color: #aaaaaa; +} +/* line 87, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-actions .messenger-phrase { + display: none; +} +/* line 90, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message .messenger-message-inner:before { + -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); + -moz-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.6), 0px 0px 0px 1px rgba(0, 0, 0, 0.2); + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 17px; + display: block; + content: " "; + top: 50%; + margin-top: -8px; + height: 13px; + width: 13px; + z-index: 20; +} +/* line 103, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message.alert-success .messenger-message-inner:before { + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5fca4a), color-stop(100%, #098d38)); + background-image: -webkit-linear-gradient(top, #5fca4a, #098d38); + background-image: -moz-linear-gradient(top, #5fca4a, #098d38); + background-image: -o-linear-gradient(top, #5fca4a, #098d38); + background-image: linear-gradient(top, #5fca4a, #098d38); + background-color: #5fca4a; +} +/* line 107, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message.alert-info .messenger-message-inner:before { + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #61c4b8), color-stop(100%, #1992a3)); + background-image: -webkit-linear-gradient(top, #61c4b8, #1992a3); + background-image: -moz-linear-gradient(top, #61c4b8, #1992a3); + background-image: -o-linear-gradient(top, #61c4b8, #1992a3); + background-image: linear-gradient(top, #61c4b8, #1992a3); + background-color: #61c4b8; +} +/* line 113, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message.alert-error .messenger-message-inner:before { + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dd6a45), color-stop(100%, #91361a)); + background-image: -webkit-linear-gradient(top, #dd6a45, #91361a); + background-image: -moz-linear-gradient(top, #dd6a45, #91361a); + background-image: -o-linear-gradient(top, #dd6a45, #91361a); + background-image: linear-gradient(top, #dd6a45, #91361a); + background-color: #dd6a45; +} +/* line 32, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner { + width: 32px; + height: 32px; + background: transparent; +} +/* line 37, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + background: #dd6a45; + -webkit-animation-duration: 20s; + -moz-animation-duration: 20s; + -ms-animation-duration: 20s; + -o-animation-duration: 20s; + animation-duration: 20s; + opacity: 1; +} +/* line 45, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-soon .messenger-spinner:after { + content: ""; + background: #333333; + position: absolute; + width: 26px; + height: 26px; + border-radius: 50%; + top: 3px; + left: 3px; + display: block; +} +/* line 32, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner { + width: 32px; + height: 32px; + background: transparent; +} +/* line 37, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner .messenger-spinner-side .messenger-spinner-fill { + background: #dd6a45; + -webkit-animation-duration: 600s; + -moz-animation-duration: 600s; + -ms-animation-duration: 600s; + -o-animation-duration: 600s; + animation-duration: 600s; + opacity: 1; +} +/* line 45, ../../src/sass/messenger-spinner.scss */ +ul.messenger-theme-future .messenger-message.alert-error.messenger-retry-later .messenger-spinner:after { + content: ""; + background: #333333; + position: absolute; + width: 26px; + height: 26px; + border-radius: 50%; + top: 3px; + left: 3px; + display: block; +} +/* line 125, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message-slot.messenger-last .messenger-message { + -webkit-border-radius: 4px 4px 0px 0px; + -moz-border-radius: 4px 4px 0px 0px; + -ms-border-radius: 4px 4px 0px 0px; + -o-border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0px 0px; +} +/* line 128, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message-slot.messenger-first .messenger-message { + -webkit-border-radius: 0px 0px 4px 4px; + -moz-border-radius: 0px 0px 4px 4px; + -ms-border-radius: 0px 0px 4px 4px; + -o-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; + -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); +} +/* line 132, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-message-slot.messenger-first.messenger-last .messenger-message { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + -moz-box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); + box-shadow: inset 48px 0px 0px rgba(0, 0, 0, 0.3), inset 46px 0px 0px rgba(255, 255, 255, 0.07); +} +/* line 136, ../../src/sass/messenger-theme-future.sass */ +ul.messenger-theme-future .messenger-spinner { + display: block; + position: absolute; + left: 7px; + top: 50%; + margin-top: -18px; + z-index: 999; + height: 32px; + width: 32px; + z-index: 10; +} diff --git a/public/stylesheets/hubspot/messenger.css b/public/stylesheets/hubspot/messenger.css index 9fc58c936..3b24aa16c 100644 --- a/public/stylesheets/hubspot/messenger.css +++ b/public/stylesheets/hubspot/messenger.css @@ -1,101 +1,101 @@ -/* line 4, ../../src/sass/messenger.sass */ -ul.messenger { - margin: 0; - padding: 0; -} -/* line 8, ../../src/sass/messenger.sass */ -ul.messenger > li { - list-style: none; - margin: 0; - padding: 0; -} -/* line 14, ../../src/sass/messenger.sass */ -ul.messenger.messenger-empty { - display: none; -} -/* line 17, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message { - overflow: hidden; - *zoom: 1; -} -/* line 20, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message.messenger-hidden { - display: none; -} -/* line 23, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message .messenger-phrase, ul.messenger .messenger-message .messenger-actions a { - padding-right: 5px; -} -/* line 26, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message .messenger-actions { - float: right; -} -/* line 29, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message .messenger-actions a { - cursor: pointer; - text-decoration: underline; -} -/* line 33, ../../src/sass/messenger.sass */ -ul.messenger .messenger-message ul, ul.messenger .messenger-message ol { - margin: 10px 18px 0; -} -/* line 36, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed { - position: fixed; - z-index: 10000; -} -/* line 40, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed .messenger-message { - min-width: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -/* line 45, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed .message .messenger-actions { - float: left; -} -/* line 48, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-top { - top: 20px; -} -/* line 51, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-bottom { - bottom: 20px; -} -/* line 54, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { - left: 50%; - width: 800px; - margin-left: -400px; -} -@media (max-width: 960px) { - /* line 54, ../../src/sass/messenger.sass */ - ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { - left: 10%; - width: 80%; - margin-left: 0px; - } -} -/* line 64, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-top.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-right { - right: 20px; - left: auto; -} -/* line 68, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-top.messenger-on-left, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-left { - left: 20px; - margin-left: 0px; -} -/* line 72, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-left { - width: 350px; -} -/* line 75, ../../src/sass/messenger.sass */ -ul.messenger.messenger-fixed.messenger-on-right .messenger-actions, ul.messenger.messenger-fixed.messenger-on-left .messenger-actions { - float: left; -} -/* line 78, ../../src/sass/messenger.sass */ -ul.messenger .messenger-spinner { - display: none; -} +/* line 4, ../../src/sass/messenger.sass */ +ul.messenger { + margin: 0; + padding: 0; +} +/* line 8, ../../src/sass/messenger.sass */ +ul.messenger > li { + list-style: none; + margin: 0; + padding: 0; +} +/* line 14, ../../src/sass/messenger.sass */ +ul.messenger.messenger-empty { + display: none; +} +/* line 17, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message { + overflow: hidden; + *zoom: 1; +} +/* line 20, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message.messenger-hidden { + display: none; +} +/* line 23, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message .messenger-phrase, ul.messenger .messenger-message .messenger-actions a { + padding-right: 5px; +} +/* line 26, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message .messenger-actions { + float: right; +} +/* line 29, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message .messenger-actions a { + cursor: pointer; + text-decoration: underline; +} +/* line 33, ../../src/sass/messenger.sass */ +ul.messenger .messenger-message ul, ul.messenger .messenger-message ol { + margin: 10px 18px 0; +} +/* line 36, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed { + position: fixed; + z-index: 10000; +} +/* line 40, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed .messenger-message { + min-width: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/* line 45, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed .message .messenger-actions { + float: left; +} +/* line 48, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-top { + top: 20px; +} +/* line 51, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-bottom { + bottom: 20px; +} +/* line 54, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { + left: 50%; + width: 800px; + margin-left: -400px; +} +@media (max-width: 960px) { + /* line 54, ../../src/sass/messenger.sass */ + ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { + left: 10%; + width: 80%; + margin-left: 0px; + } +} +/* line 64, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-top.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-right { + right: 20px; + left: auto; +} +/* line 68, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-top.messenger-on-left, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-left { + left: 20px; + margin-left: 0px; +} +/* line 72, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-left { + width: 350px; +} +/* line 75, ../../src/sass/messenger.sass */ +ul.messenger.messenger-fixed.messenger-on-right .messenger-actions, ul.messenger.messenger-fixed.messenger-on-left .messenger-actions { + float: left; +} +/* line 78, ../../src/sass/messenger.sass */ +ul.messenger .messenger-spinner { + display: none; +} diff --git a/public/stylesheets/jquery/jquery-ui-1.9.2.css b/public/stylesheets/jquery/jquery-ui-1.9.2.css index 090d220d5..94aa65d24 100644 --- a/public/stylesheets/jquery/jquery-ui-1.9.2.css +++ b/public/stylesheets/jquery/jquery-ui-1.9.2.css @@ -1,5 +1,5 @@ -/*! jQuery UI - v1.9.2 - 2012-12-26 -* http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=759fcf&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=628db6&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=628db6&iconColorDefault=759fcf&bgColorHover=eef5fd&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=628db6&fcHover=628db6&iconColorHover=759fcf&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=628db6&fcActive=628db6&iconColorActive=759fcf&bgColorHighlight=759fcf&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=628db6&fcHighlight=363636&iconColorHighlight=759fcf&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px -* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}* html .ui-autocomplete{width:1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0em}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #628db6;background:#759fcf url(images/ui-bg_gloss-wave_35_759fcf_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#628db6;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #628db6;background:#eef5fd url(images/ui-bg_glass_100_eef5fd_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#628db6;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #628db6;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#628db6;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #628db6;background:#759fcf url(images/ui-bg_highlight-soft_75_759fcf_1x100.png) 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffd27a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px} +/*! jQuery UI - v1.9.2 - 2012-12-26 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=759fcf&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=628db6&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=628db6&iconColorDefault=759fcf&bgColorHover=eef5fd&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=628db6&fcHover=628db6&iconColorHover=759fcf&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=628db6&fcActive=628db6&iconColorActive=759fcf&bgColorHighlight=759fcf&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=628db6&fcHighlight=363636&iconColorHighlight=759fcf&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}* html .ui-autocomplete{width:1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0em}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #628db6;background:#759fcf url(images/ui-bg_gloss-wave_35_759fcf_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#628db6;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #628db6;background:#eef5fd url(images/ui-bg_glass_100_eef5fd_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#628db6;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #628db6;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#628db6}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#628db6;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #628db6;background:#759fcf url(images/ui-bg_highlight-soft_75_759fcf_1x100.png) 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_759fcf_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffd27a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px} diff --git a/public/stylesheets/jstoolbar.css b/public/stylesheets/jstoolbar.css index 6fb07f974..2cc00b4a3 100644 --- a/public/stylesheets/jstoolbar.css +++ b/public/stylesheets/jstoolbar.css @@ -1,102 +1,101 @@ -.jstEditor { - - padding-left: 0px; -} -.jstEditor textarea, .jstEditor iframe { - margin: 0 ; - margin-left: 80px; -} - -.jstHandle { - height: 10px; - font-size: 0.1em; - cursor: s-resize; - /*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/ -} - -.jstElements { - padding: 3px 3px 3px 0px;/*by young*/ -} - -.jstElements button { - margin-right: 4px; - width : 24px; - height: 24px; - padding: 4px; - border-style: solid; - border-width: 1px; - border-color: #ddd; - background-color : #f7f7f7; - background-position : 50% 50%; - background-repeat: no-repeat; -} -.jstElements button:hover { - border-color: #bbb; - background-color: #e5e5e5; -} -.jstElements button span { - display : none; -} -.jstElements span { - display : inline; -} - -.jstSpacer { - width : 0px; - font-size: 1px; - margin-right: 6px; -} - -.jstElements .help { float: right; margin-right: 0.5em; padding-top: 8px; font-size: 0.9em; } -.jstElements .help a {padding: 2px 0 2px 20px; background: url(../images/help.png) no-repeat 0 50%;} - -/* Buttons --------------------------------------------------------- */ -.jstb_strong { - background-image: url(../images/jstoolbar/bt_strong.png); -} -.jstb_em { - background-image: url(../images/jstoolbar/bt_em.png); -} -.jstb_ins { - background-image: url(../images/jstoolbar/bt_ins.png); -} -.jstb_del { - background-image: url(../images/jstoolbar/bt_del.png); -} -.jstb_code { - background-image: url(../images/jstoolbar/bt_code.png); -} -.jstb_h1 { - background-image: url(../images/jstoolbar/bt_h1.png); -} -.jstb_h2 { - background-image: url(../images/jstoolbar/bt_h2.png); -} -.jstb_h3 { - background-image: url(../images/jstoolbar/bt_h3.png); -} -.jstb_ul { - background-image: url(../images/jstoolbar/bt_ul.png); -} -.jstb_ol { - background-image: url(../images/jstoolbar/bt_ol.png); -} -.jstb_bq { - background-image: url(../images/jstoolbar/bt_bq.png); -} -.jstb_unbq { - background-image: url(../images/jstoolbar/bt_bq_remove.png); -} -.jstb_pre { - background-image: url(../images/jstoolbar/bt_pre.png); -} -.jstb_link { - background-image: url(../images/jstoolbar/bt_link.png); -} -.jstb_img { - background-image: url(../images/jstoolbar/bt_img.png); -} -.jstb_help { - background-image: url(../images/help.png); -} +.jstEditor { + padding-left: 0px; +} +.jstEditor textarea, .jstEditor iframe { + margin: 0; + margin-left: 80px; +} + +.jstHandle { + height: 10px; + font-size: 0.1em; + cursor: s-resize; + /*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/ +} + +.jstElements { + padding: 3px 3px 3px 10px;/*by young*/ +} + +.jstElements button { + margin-right: 4px; + width : 24px; + height: 24px; + padding: 4px; + border-style: solid; + border-width: 1px; + border-color: #ddd; + background-color : #f7f7f7; + background-position : 50% 50%; + background-repeat: no-repeat; +} +.jstElements button:hover { + border-color: #bbb; + background-color: #e5e5e5; +} +.jstElements button span { + display : none; +} +.jstElements span { + display : inline; +} + +.jstSpacer { + width : 0px; + font-size: 1px; + margin-right: 6px; +} + +.jstElements .help { float: right; margin-right: 0.5em; padding-top: 8px; font-size: 0.9em; } +.jstElements .help a {padding: 2px 0 2px 20px; background: url(../images/help.png) no-repeat 0 50%;} + +/* Buttons +-------------------------------------------------------- */ +.jstb_strong { + background-image: url(../images/jstoolbar/bt_strong.png); +} +.jstb_em { + background-image: url(../images/jstoolbar/bt_em.png); +} +.jstb_ins { + background-image: url(../images/jstoolbar/bt_ins.png); +} +.jstb_del { + background-image: url(../images/jstoolbar/bt_del.png); +} +.jstb_code { + background-image: url(../images/jstoolbar/bt_code.png); +} +.jstb_h1 { + background-image: url(../images/jstoolbar/bt_h1.png); +} +.jstb_h2 { + background-image: url(../images/jstoolbar/bt_h2.png); +} +.jstb_h3 { + background-image: url(../images/jstoolbar/bt_h3.png); +} +.jstb_ul { + background-image: url(../images/jstoolbar/bt_ul.png); +} +.jstb_ol { + background-image: url(../images/jstoolbar/bt_ol.png); +} +.jstb_bq { + background-image: url(../images/jstoolbar/bt_bq.png); +} +.jstb_unbq { + background-image: url(../images/jstoolbar/bt_bq_remove.png); +} +.jstb_pre { + background-image: url(../images/jstoolbar/bt_pre.png); +} +.jstb_link { + background-image: url(../images/jstoolbar/bt_link.png); +} +.jstb_img { + background-image: url(../images/jstoolbar/bt_img.png); +} +.jstb_help { + background-image: url(../images/help.png); +} diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 6020903d3..c7905fb80 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -45,6 +45,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index a6dfe3f90..6c046d62c 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -1190,7 +1190,8 @@ div.pagination { text-align: left; font-size: 13px; } - +.pagination li a{margin-top: 10px;} +.pagination li span{margin-top: 10px;} .m5p5 { display: inline-block; height: auto; diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index baca16c9c..6554db7ec 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -49,6 +49,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 019ffa57a..d6bef6524 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -76,7 +76,7 @@ a.problem_name{ color:#ff5722; } a:hover.problem_name{ color:#d33503;} a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;} -.problem_tit_div{ color:#0781b4; font-weight:bold;width:400px; } +.problem_tit_div{ color:#0781b4; font-weight:bold;max-width:400px; } a.problem_tit_a{ color:#0781b4; } .problem_tit_a:hover{ color:#09658c; } a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } @@ -87,11 +87,11 @@ a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;} .pro_page_top{ font-size:14px; border-bottom:2px solid #64bdd9; margin-bottom:10px; padding-bottom:5px;} .pro_page_tit{color:#3e4040; font-weight:bold;width:480px; float:left; font-size:14px; margin-bottom:5px;} .pro_pic_box{ margin-left:60px; } -.pro_pic{ width:100px; height:75px;line-height:73px;border:2px solid #CCC; margin:10px 0; text-align: center;} -.pro_info_box{ margin-left:60px; background:#f0fbff; height:80px; padding:10px 0;} +.pro_pic{ width:100px; border:2px solid #CCC; margin:10px 0;} +.pro_info_box{ margin-left:60px; border:1px dashed #CCC; height:45px; padding:10px 0;} .pro_info_box ul{} -.pro_info_box ul li{ margin-bottom:10px;} -.pro_info_p{ color:#0781b4 !important; float:left; width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;padding-top:2.5px;} +.pro_info_box ul li{ height:24px;} +.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } @@ -123,8 +123,8 @@ a:hover.talk_edit{ color:#ff5722;} .recall_con{ float:left;color:#777777; width:520px; margin-left:10px; } /****新建讨论***/ .talk_new{ color:#4c4c4c;} -.talk_input{ border:1px solid #64bdd9; height:16px; width:585px; background:#fff; margin-bottom:10px; padding:5px;} -.talk_text{ border:1px solid #64bdd9; height:100px;width:585px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} +.talk_input{ border:1px solid #64bdd9; height:16px; width:550px; background:#fff; margin-bottom:10px; padding:5px;} +.talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} .talk_new ul li{ } .sb{width:70px; height:26px; color:#606060; cursor:pointer;} /*a.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}*/ @@ -180,6 +180,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col /* 版本库展示Git操作文档 */ .repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;} .lh23{line-height: 23px;} +.repos_git_more{display: none;} /* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */ .alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;} @@ -253,7 +254,21 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } +.attachments_fields input.description {margin-left:4px; width:100px; } +.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} +.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +a.remove-upload:hover {text-decoration:none !important;} +.attachments_fields input.is_public_checkbox {width:20px;} + +.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} +a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;} +.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;} +span.add_attachment {font-size: 80%;line-height: 2.5em;} +.attachments_fields span {display: block;white-space: nowrap;} +.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} +.attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +.attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .ui-widget { font-family: Verdana, sans-serif; @@ -339,6 +354,9 @@ a:hover.st_add{ color:#ff8e15;} .newpro_box textarea{ height:150px; float:left; margin-bottom:10px;} .newpro_box select{ height:29px; float:left; margin-bottom:10px;} /*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/ +.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;} +.label03{ width:70px; text-align:right; display:block; float:left;} +.collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; } .icon-reload { background-image: url(../images/reload.png); } .icon { background-position: 0% 50%; @@ -370,6 +388,7 @@ blockquote { border-radius: 4px; font-family: "Microsoft YaHei"; background: url(http://test.forge.trustie.net/images/requirements/xreference.jpg.pagespeed.ic.h4inUJNyH0.jpg); + background-size: 100% 100%; } /*上传项目图片*/ .upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} @@ -691,3 +710,38 @@ tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png); .icon-file.application-pdf { background-image: url(../images/files/pdf.png); } .icon-file.application-zip { background-image: url(../images/files/zip.png); } .icon-file.application-x-gzip { background-image: url(../images/files/zip.png); } + +/* 20150505讨论区*/ +.w664{ width:664px;} +.w140{ width:140px;} +.talklist_box{ } +.talkmain_box{ width:670px; border-bottom:1px dashed #d9d9d9; margin-bottom:20px; margin-top: 10px;} +.talkmain_pic{} +a.talkmain_pic{ display:block; width:42px; height:42px; padding:2px; border:1px solid #e3e3e3;} +a:hover.talkmain_pic{border:1px solid #64bdd9;} +.talkmain_txt{ width:610px; margin-left:10px; color:#333;} +a.talkmain_name{ color:#ff5722;} +a:hover.talkmain_name{ color:#d33503;} +.talkmain_tit{ color:#0781b4; width:450px; display:block; } +.talklist_main{ } +.talkWrapArrow{ display:block; float:right; margin-right:10px;background:url(../images/arrow.png) 0 0 no-repeat; height:7px; width:13px;} +.talkConIpt{ background:#f2f2f2; } +.talkWrapBox{ width:610px; margin-left:60px; } +.inputFeint{ border:1px solid #d9d9d9; background:#fff; width:583px; height:50px; margin:10px; margin-bottom:5px;color:#666;} +.inputFeint02{ border:1px solid #d9d9d9; background:#fff; width:535px; height:30px; margin:5px 0 5px 50px; color:#666;} +.inputFeint03{ border:1px solid #d9d9d9; background:#fff; width:490px; height:30px; margin:5px 0 5px 0px; color:#666;} +.talkWrapMsg{ background:#f2f2f2; padding:10px;} +a.Msg_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid #e3e3e3; float:left;} +a:hover.Msg_pic{border:1px solid #64bdd9;} +a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px solid #e3e3e3; float:left;} +a:hover.Reply_pic{border:1px solid #64bdd9;} +.Msg_txt{ float:left; width:540px; margin-left:10px;} +.Msg_txt p{ } +.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} +.talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; } +.Replybox{ float:left; width:495px; margin-left:5px;} +.talk_nextpage{ border:none; width:410px; margin:0 auto;} +.newtalk { margin-top:8px; margin-right:8px;} + +#about_newtalk{ display:none;} + diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4f65a17c1..586704d16 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -56,7 +56,6 @@ h4{ font-size:14px; color:#3b3b3b;} .ml10{ margin-left:10px;} .ml15{ margin-left:15px;} .ml20{ margin-left:20px;} -.ml25{ margin-left:25px;} .ml40{ margin-left:40px;} .ml45{ margin-left:45px;} .ml55{ margin-left:55px;} @@ -64,23 +63,28 @@ h4{ font-size:14px; color:#3b3b3b;} .ml60{ margin-left:60px;} .ml80{ margin-left:80px;} .ml90{ margin-left:90px;} +.ml100{ margin-left:100px;} .ml110{ margin-left:110px;} .mr5{ margin-right:5px;} .mr10{ margin-right:10px;} .mr20{ margin-right:20px;} .mr30{ margin-right:30px;} .mr40{ margin-right:40px;} +.mr50{margin-right: 50px;} +.mr55{margin-right: 55px;} +.mr70{margin-right: 70px;} .mt3{ margin-top:3px;} .mt5{ margin-top:5px;} .mt8{ margin-top:8px;} .mt10{ margin-top:10px;} -.mt13{ margin-top:13px;} -.mt43{ margin-top:43px;} -.mt40{ margin-top:40px;} .mb5{ margin-bottom:5px;} .mb10{ margin-bottom:10px;} -.mb13{ margin-bottom:13px;} +.mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} +.w20{ width:20px;} +.w45{ width: 45px;} +.w60{ width:60px;} +.w70{ width:70px;} .w90{ width:90px;} .w210{ width:210px;} .w150{ width:150px;} @@ -93,8 +97,10 @@ h4{ font-size:14px; color:#3b3b3b;} .w350{ width:350px;} .w610{ width:610px;} .w600{ width:600px;} +.h22{ height:22px;} .h26{ height:26px;} .h50{ height:50px;} +.h70{ height:70px;} .h150{ height:150px;} /* Font & background Color */ @@ -171,6 +177,7 @@ a:hover.blue_u_btn{background:#64bdd9; color:#fff;} .green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} .blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} .orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} /* commonpic */ .pic_date{ display:block; background:url(../images/new_project/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;} .pic_add{ display:block; background:url(../images/new_project/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;} @@ -416,3 +423,5 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} /*文本左对齐*/ .tl{text-align: left;} +img{max-width: 100%;} +.attachments {clear: both;} diff --git a/public/stylesheets/rtl.css b/public/stylesheets/rtl.css index eb047794f..0eb73f392 100644 --- a/public/stylesheets/rtl.css +++ b/public/stylesheets/rtl.css @@ -1,94 +1,94 @@ -body, #wrapper { direction: rtl;} - -#quick-search { float: left; } -#main-menu { margin-left: -500px; left: auto; right: 6px; margin-right: 0px;} -#main-menu li { float: right; } -#top-menu ul { float: right; } -#account { float: left; } -#top-menu #loggedas { float: left; } -#top-menu li { float: right; } -.tabular label.floating -{ - margin-right: 0; - margin-left: auto; - text-align: right; -} -.tabular label -{ - float: right; - margin-left: auto; -} -.tabular p -{ - clear: right; -} -.tabular label.block { text-align: right; } -.icon -{ - background-position: 100% 40%; - padding-right: 20px; - padding-left: 0px; -} -div#activity dt, #search-results dt -{ - background-position: 100% 50%; - padding-right: 20px; - padding-left: 0px; -} -#content .tabs ul li { float: right; } -#content .tabs ul { padding-left: auto; padding-right: 1em; } -table.progress { float: right; } -.contextual { float: left; } -.icon22 { background-position: 100% 40%; padding-right: 26px; padding-left: auto; } -h3, .wiki h2 { padding: 10px 2px 1px 0; } -.tooltip span.tip { text-align: right; } -tr.issue td.subject { text-align: right; } -tr.time-entry td.subject, tr.time-entry td.comments { text-align: right; } -#sidebar { float: left; } -#main.nosidebar #content { border-width: 1px; border-style: solid; border-color: #D7D7D7 #BBBBBB #BBBBBB #D7D7D7;} -.tabular.settings label { margin-left: auto; } -.splitcontentleft { float: right; } -.splitcontentright { float: left; } -p.progress-info { clear: right; } -table.list td.buttons a { padding-right: 20px; } -.filecontent { direction: ltr; } -.entries { direction: ltr; } -.changeset-changes { direction: ltr; padding-left: 2em } -.changesets { direction: ltr; } -div#issue-changesets { float: left; margin-right: 1em; margin-left: 0 } -div#issue-changesets div.wiki { direction: ltr; padding-left: 2em } -#activity dt, .journal { clear: right; } -.journal-link { float: left; } -div.wiki pre { direction: ltr; } - -ul.projects { padding-right: 1em; padding-left: 0; } -ul.projects ul.projects { border-right: 3px solid #e0e0e0; border-left: 0; } -.my-project { padding-right: 18px; padding-left: 0; background-position: 100% 50%; } - -#admin-menu a { background-position: 100% 40%; padding-right: 20px; padding-left: 0;} -input#openid_url { background-position: 100% 50%; padding-right: 18px; padding-left: 0; } - -tr.project.idnt td.name span { background: url(../images/bullet_arrow_left.png) no-repeat 100% 50%; padding-right: 16px; padding-left: 0; } -tr.project.idnt-1 td.name { padding-right: 0.5em; } -tr.project.idnt-2 td.name { padding-right: 2em; } -tr.project.idnt-3 td.name { padding-right: 3.5em; } -tr.project.idnt-4 td.name { padding-right: 5em; } -tr.project.idnt-5 td.name { padding-right: 6.5em; } -tr.project.idnt-6 td.name { padding-right: 8em; } -tr.project.idnt-7 td.name { padding-right: 9.5em; } -tr.project.idnt-8 td.name { padding-right: 11em; } -tr.project.idnt-9 td.name { padding-right: 12.5em; } - -tr.issue.idnt td.subject a { background: url(../images/bullet_arrow_left.png) no-repeat 100% 50%; padding-right: 16px; padding-left: 0; } -tr.issue.idnt-1 td.subject { padding-right: 0.5em; } -tr.issue.idnt-2 td.subject { padding-right: 2em; } -tr.issue.idnt-3 td.subject { padding-right: 3.5em; } -tr.issue.idnt-4 td.subject { padding-right: 5em; } -tr.issue.idnt-5 td.subject { padding-right: 6.5em; } -tr.issue.idnt-6 td.subject { padding-right: 8em; } -tr.issue.idnt-7 td.subject { padding-right: 9.5em; } -tr.issue.idnt-8 td.subject { padding-right: 11em; } -tr.issue.idnt-9 td.subject { padding-right: 12.5em; } - -div.wiki ul.toc { margin-right: 0; margin-left: 12px; } -div.wiki ul.toc li li { margin-right: 1.5em; margin-left: 0; } +body, #wrapper { direction: rtl;} + +#quick-search { float: left; } +#main-menu { margin-left: -500px; left: auto; right: 6px; margin-right: 0px;} +#main-menu li { float: right; } +#top-menu ul { float: right; } +#account { float: left; } +#top-menu #loggedas { float: left; } +#top-menu li { float: right; } +.tabular label.floating +{ + margin-right: 0; + margin-left: auto; + text-align: right; +} +.tabular label +{ + float: right; + margin-left: auto; +} +.tabular p +{ + clear: right; +} +.tabular label.block { text-align: right; } +.icon +{ + background-position: 100% 40%; + padding-right: 20px; + padding-left: 0px; +} +div#activity dt, #search-results dt +{ + background-position: 100% 50%; + padding-right: 20px; + padding-left: 0px; +} +#content .tabs ul li { float: right; } +#content .tabs ul { padding-left: auto; padding-right: 1em; } +table.progress { float: right; } +.contextual { float: left; } +.icon22 { background-position: 100% 40%; padding-right: 26px; padding-left: auto; } +h3, .wiki h2 { padding: 10px 2px 1px 0; } +.tooltip span.tip { text-align: right; } +tr.issue td.subject { text-align: right; } +tr.time-entry td.subject, tr.time-entry td.comments { text-align: right; } +#sidebar { float: left; } +#main.nosidebar #content { border-width: 1px; border-style: solid; border-color: #D7D7D7 #BBBBBB #BBBBBB #D7D7D7;} +.tabular.settings label { margin-left: auto; } +.splitcontentleft { float: right; } +.splitcontentright { float: left; } +p.progress-info { clear: right; } +table.list td.buttons a { padding-right: 20px; } +.filecontent { direction: ltr; } +.entries { direction: ltr; } +.changeset-changes { direction: ltr; padding-left: 2em } +.changesets { direction: ltr; } +div#issue-changesets { float: left; margin-right: 1em; margin-left: 0 } +div#issue-changesets div.wiki { direction: ltr; padding-left: 2em } +#activity dt, .journal { clear: right; } +.journal-link { float: left; } +div.wiki pre { direction: ltr; } + +ul.projects { padding-right: 1em; padding-left: 0; } +ul.projects ul.projects { border-right: 3px solid #e0e0e0; border-left: 0; } +.my-project { padding-right: 18px; padding-left: 0; background-position: 100% 50%; } + +#admin-menu a { background-position: 100% 40%; padding-right: 20px; padding-left: 0;} +input#openid_url { background-position: 100% 50%; padding-right: 18px; padding-left: 0; } + +tr.project.idnt td.name span { background: url(../images/bullet_arrow_left.png) no-repeat 100% 50%; padding-right: 16px; padding-left: 0; } +tr.project.idnt-1 td.name { padding-right: 0.5em; } +tr.project.idnt-2 td.name { padding-right: 2em; } +tr.project.idnt-3 td.name { padding-right: 3.5em; } +tr.project.idnt-4 td.name { padding-right: 5em; } +tr.project.idnt-5 td.name { padding-right: 6.5em; } +tr.project.idnt-6 td.name { padding-right: 8em; } +tr.project.idnt-7 td.name { padding-right: 9.5em; } +tr.project.idnt-8 td.name { padding-right: 11em; } +tr.project.idnt-9 td.name { padding-right: 12.5em; } + +tr.issue.idnt td.subject a { background: url(../images/bullet_arrow_left.png) no-repeat 100% 50%; padding-right: 16px; padding-left: 0; } +tr.issue.idnt-1 td.subject { padding-right: 0.5em; } +tr.issue.idnt-2 td.subject { padding-right: 2em; } +tr.issue.idnt-3 td.subject { padding-right: 3.5em; } +tr.issue.idnt-4 td.subject { padding-right: 5em; } +tr.issue.idnt-5 td.subject { padding-right: 6.5em; } +tr.issue.idnt-6 td.subject { padding-right: 8em; } +tr.issue.idnt-7 td.subject { padding-right: 9.5em; } +tr.issue.idnt-8 td.subject { padding-right: 11em; } +tr.issue.idnt-9 td.subject { padding-right: 12.5em; } + +div.wiki ul.toc { margin-right: 0; margin-left: 12px; } +div.wiki ul.toc li li { margin-right: 1.5em; margin-left: 0; } diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css index 1bc0ed804..054b0bf99 100644 --- a/public/stylesheets/scm.css +++ b/public/stylesheets/scm.css @@ -97,9 +97,7 @@ table.annotate td.author { background: inherit; } - -table.annotate td.line-code { background-color: #fafafa; word-break: break-all;} - +table.annotate td.line-code { background-color: #fafafa; } div.action_M { background: #fd8 } div.action_D { background: #f88 } diff --git a/public/stylesheets/sec-analysis.css b/public/stylesheets/sec-analysis.css index f3f2989b1..2f84aade2 100644 --- a/public/stylesheets/sec-analysis.css +++ b/public/stylesheets/sec-analysis.css @@ -1,41 +1,41 @@ - .mask{ - position: relative; - overflow: hidden; - margin: 0px 0 0 0; - width: 690px; - - } - .header2{ - float: left; - width: 100%; - background-color: #f4f4f4 - } - .colleft{ - position: relative; - width: 100%; - right: 50%; - background-color: #000000 - } - .col1{ - position: relative; - overflow: hidden; - float: left; - width: 50%; - left: 100%; - - } - .col2{ - position: relative; - overflow: hidden; - float: left; - width: 50%; - left: 1%; - } - -a:hover, a:active { -color: #c61a1a; -text-decoration: underline; -} - - - + .mask{ + position: relative; + overflow: hidden; + margin: 0px 0 0 0; + width: 690px; + + } + .header2{ + float: left; + width: 100%; + background-color: #f4f4f4 + } + .colleft{ + position: relative; + width: 100%; + right: 50%; + background-color: #000000 + } + .col1{ + position: relative; + overflow: hidden; + float: left; + width: 50%; + left: 100%; + + } + .col2{ + position: relative; + overflow: hidden; + float: left; + width: 50%; + left: 1%; + } + +a:hover, a:active { +color: #c61a1a; +text-decoration: underline; +} + + + diff --git a/public/themes/README b/public/themes/README index 1af3d1992..e1e922958 100644 --- a/public/themes/README +++ b/public/themes/README @@ -1 +1 @@ -Put your Redmine themes here. +Put your Redmine themes here. diff --git a/public/themes/redpenny-master/README.md b/public/themes/redpenny-master/README.md index de6729e45..73e33a09c 100644 --- a/public/themes/redpenny-master/README.md +++ b/public/themes/redpenny-master/README.md @@ -1,12 +1,12 @@ -## Red Penny - Redmine Theme. - -### Installation -To install, just clone Red Penny files to your Redmine theme directory "public/themes" - -zsh$ cd /path/to/redmine/public/themes - -zsh$ git clone http://github.com/themondays/redpenny.git redpenny - -### Additional thank for amazing fonts: -Dave Gandy (@byscuits) +## Red Penny - Redmine Theme. + +### Installation +To install, just clone Red Penny files to your Redmine theme directory "public/themes" + +zsh$ cd /path/to/redmine/public/themes + +zsh$ git clone http://github.com/themondays/redpenny.git redpenny + +### Additional thank for amazing fonts: +Dave Gandy (@byscuits) Paul D. Hunt \ No newline at end of file diff --git a/public/themes/redpenny-master/stylesheets/font/fontawesome-webfont.svg b/public/themes/redpenny-master/stylesheets/font/fontawesome-webfont.svg index 10a1e1bbf..f05f93c29 100644 --- a/public/themes/redpenny-master/stylesheets/font/fontawesome-webfont.svg +++ b/public/themes/redpenny-master/stylesheets/font/fontawesome-webfont.svg @@ -1,339 +1,339 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/script/about b/script/about index cfec3b406..281fc2d0d 100644 --- a/script/about +++ b/script/about @@ -1,6 +1,6 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= "production" -require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -puts -puts Redmine::Info.environment +#!/usr/bin/env ruby + +ENV["RAILS_ENV"] ||= "production" +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") +puts +puts Redmine::Info.environment diff --git a/script/rails b/script/rails index f8da2cffd..4276b365d 100644 --- a/script/rails +++ b/script/rails @@ -1,6 +1,6 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/spec/controllers/enterprises_controller_spec.rb b/spec/controllers/enterprises_controller_spec.rb deleted file mode 100644 index 49ca325bf..000000000 --- a/spec/controllers/enterprises_controller_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'spec_helper' - -describe EnterprisesController do - - describe "GET 'index'" do - it "returns http success" do - get 'index' - response.should be_success - end - end - -end diff --git a/spec/factories/courses.rb b/spec/factories/courses.rb new file mode 100644 index 000000000..f17f614d1 --- /dev/null +++ b/spec/factories/courses.rb @@ -0,0 +1,15 @@ +#coding=utf-8 +# +FactoryGirl.define do + factory :course do + name 'name' + time '2015' + term 'term' + class_period 1 + password '111' + description 'description' + is_public 1 + open_student 1 + association :teacher, factory: :user + end +end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 369e60f48..2c695b920 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,10 +1,9 @@ -require 'faker' FactoryGirl.define do factory :user do - login "ExampleUser" + login "factoryuser" mail "user@example.com" - password "foobar" - password_confirmation "foobar" + password "foobar111" + password_confirmation "foobar111" end -end \ No newline at end of file +end diff --git a/spec/fixtures/hah.txt b/spec/fixtures/hah.txt new file mode 100644 index 000000000..b7f13a714 --- /dev/null +++ b/spec/fixtures/hah.txt @@ -0,0 +1,5 @@ + + + + + diff --git a/spec/fixtures/test.jpg b/spec/fixtures/test.jpg new file mode 100644 index 000000000..f912467d9 Binary files /dev/null and b/spec/fixtures/test.jpg differ diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 000000000..0661be9c9 --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,50 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV['RAILS_ENV'] ||= 'test' +require 'spec_helper' +require File.expand_path('../../config/environment', __FILE__) +require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# +# The following line is provided for convenience purposes. It has the downside +# of increasing the boot-up time by auto-requiring all files in the support +# directory. Alternatively, in the individual `*_spec.rb` files, manually +# require only the support files necessary. +# +# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } + +RSpec.configure do |config| + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + config.before(:suite) do + require_relative "seeds" + end + + # RSpec Rails can automatically mix in different behaviours to your tests + # based on their file location, for example enabling you to call `get` and + # `post` in specs under `spec/controllers`. + # + # You can disable this behaviour by removing the line below, and instead + # explicitly tag your specs with their type, e.g.: + # + # RSpec.describe UsersController, :type => :controller do + # # ... + # end + # + # The different available types are documented in the features, such as in + # https://relishapp.com/rspec/rspec-rails/docs + config.infer_spec_type_from_file_location! +end diff --git a/spec/requests/account_request_spec.rb b/spec/requests/account_request_spec.rb new file mode 100644 index 000000000..8b45ea096 --- /dev/null +++ b/spec/requests/account_request_spec.rb @@ -0,0 +1,87 @@ +require 'rails_helper' +require 'shared_account_spec' + +RSpec.describe "Account request", :type => :request do + + describe "注册用户" do + include_context "create user" + it "正常注册可以成功" do + shared_register + expect(response).to redirect_to(my_account_url) + end + + it "修改用户资料" do + shared_register + shared_update_user + expect(response).to redirect_to(user_url(session[:user_id])) + end + end + + describe "用户登录" do + let(:user){FactoryGirl.create(:user)} + + it "未登录访问需要登录页面会自动跳入登录页" do + get 'my/page' + expect(response).to redirect_to(signin_path) + end + + context "正常登录" do + before{ post signin_path, username: user.login, password: user.password } + it "登录成功,正常跳转" do + expect(response).to redirect_to(my_account_url) + end + + it "登录成功,session正确" do + expect(user.id).to eq(session[:user_id]) + end + + it "正常登录后可以访问需要认证的页面" do + get 'my/account' + expect(response).to have_http_status(:success) + expect(response.body).to include(user.login) + end + end + + context "登录失败" do + before{post signin_path, username: user.login, password: 'wrong password'} + it {expect(response).to render_template('account/login')} + it "跳加登录页面" do + get 'my/page' + expect(response).to redirect_to(signin_path) + end + end + + context "自动登录" do + before{ + post signin_path, username: user.login, password: user.password, autologin: 1 + } + it "登录成功跳转到个人首页" do + expect(response).to redirect_to(my_account_url) + end + + it "验证token" do + token = Token.first + expect(token).not_to be_nil + expect(user.id).to eq(token.user.id) + expect(token.action).to eq('autologin') + expect(user.id).to eq(session[:user_id]) + expect(token.value).to eq(cookies['autologin']) + end + + it 'session 失效后,可以用token自动重新登录' do + token = Token.first + reset! + User.current = nil + get my_account_url + expect(response).to redirect_to(signin_url) + cookies[:autologin] = token.value + get my_account_url + expect(response).to have_http_status(:success) + expect(response.body).to include(user.login) + end + + end + + end +end + diff --git a/spec/requests/course_request_spec.rb b/spec/requests/course_request_spec.rb new file mode 100644 index 000000000..d58df398e --- /dev/null +++ b/spec/requests/course_request_spec.rb @@ -0,0 +1,48 @@ +require 'rails_helper' +require 'shared_account_spec' + +RSpec.describe "课程", :type => :request do + let(:course){FactoryGirl.attributes_for(:course)} + describe "创建课程" do + include_context "create user" + before { + shared_register + shared_update_user + } + context "参数正确,成功创建课程" do + before{ + # uu = current_user + # allow(User).to receive(:current).and_return(uu) + # allow(uu).to receive(:allowed_to?).and_return(123) + post courses_path, + "course[name]"=> course[:name], + "class_period"=> course[:class_period], + "time"=> course[:time], + "term"=> course[:term], + "course[password]"=>course[:password], + "course[description]"=> course[:description], + "course[is_public]"=> course[:is_public], + "course[open_student]"=> course[:open_student] + } + it{expect(assigns(:course)).to be_instance_of(Course)} + it{expect(response).to redirect_to(settings_course_url(assigns(:course), course_type: 1))} + end + end + + describe "配置课程" do + let (:course) {FactoryGirl.create(:course)} + + context "修改课程图片" do + include Rack::Test::Methods + let(:avatar) {Rack::Test::UploadedFile.new("#{Rails.root}/spec/fixtures/test.jpg",'image/jpg')} + context "正常图片上传成功" do + subject(:resp) {post upload_avatar_path(source_type: 'Course', source_id: course.id, format: :json),"avatar"=>{image: avatar}} + it{ expect(subject).to be_ok } + it{ expect(subject.body).not_to be_empty } + end + + it "不是图片,上传失败" + end + end + +end diff --git a/spec/requests/zipdown_request_spec.rb b/spec/requests/zipdown_request_spec.rb new file mode 100644 index 000000000..eb179f104 --- /dev/null +++ b/spec/requests/zipdown_request_spec.rb @@ -0,0 +1,6 @@ +require 'rails_helper' + +RSpec.describe "作业打包下载", :type => :request do + describe "单独下载某学生作业" do + end +end diff --git a/spec/seeds.rb b/spec/seeds.rb new file mode 100644 index 000000000..60727530a --- /dev/null +++ b/spec/seeds.rb @@ -0,0 +1,18 @@ +if Role.count <= 0 +ActiveRecord::Base.connection.execute( + +%Q{ +INSERT INTO `roles` (`id`, `name`, `position`, `assignable`, `builtin`, `permissions`, `issues_visibility`) +VALUES + (1,'Non member',1,1,1,'---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :add_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n','default'), + (2,'Anonymous',2,1,2,'---\n- :memos_attachments_download\n- :view_course_files\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n','default'), + (3,'Manager',3,1,0,'---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :edit_project\n- :close_project\n- :select_project_modules\n- :manage_members\n- :manage_versions\n- :add_subprojects\n- :is_manager\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :quote_project\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :view_code_review\n- :add_code_review\n- :edit_code_review\n- :delete_code_review\n- :assign_code_review\n- :code_review_setting\n- :add_documents\n- :edit_documents\n- :delete_documents\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :delete_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_news\n- :comment_news\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n- :log_time\n- :view_time_entries\n- :edit_time_entries\n- :edit_own_time_entries\n- :manage_project_activities\n- :manage_wiki\n- :rename_wiki_pages\n- :delete_wiki_pages\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n- :protect_wiki_pages\n','all'), + (4,'Developer',4,1,0,'---\n- :add_project\n- :manage_members\n- :manage_versions\n- :projects_attachments_download\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :paret_in_homework\n- :select_contest_modules\n- :quote_project\n- :contest_attachments_download\n- :manage_contestnotifications\n- :notificationcomment_contestnotifications\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :do_dts\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_news\n- :comment_news\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n- :log_time\n- :view_time_entries\n- :edit_own_time_entries\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :protect_wiki_pages\n','default'), + (5,'Reporter',5,1,0,'---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :view_code_review\n- :add_documents\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :add_issue_notes\n- :edit_own_issue_notes\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :log_time\n- :view_time_entries\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n','default'), + (7,'TeachingAsistant',6,1,0,'---\n- :add_project\n- :edit_project\n- :manage_members\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :add_issue_notes\n- :save_queries\n- :manage_news\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n','default'), + (9,'Teacher',7,1,0,'---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :edit_project\n- :close_project\n- :select_project_modules\n- :manage_members\n- :manage_versions\n- :add_subprojects\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :add_documents\n- :edit_documents\n- :delete_documents\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :delete_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_news\n- :comment_news\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n- :log_time\n- :view_time_entries\n- :edit_time_entries\n- :edit_own_time_entries\n- :manage_project_activities\n- :manage_wiki\n- :rename_wiki_pages\n- :delete_wiki_pages\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n- :protect_wiki_pages\n','default'), + (10,'Student',8,1,0,'---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :projects_attachments_download\n- :as_student\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :paret_in_homework\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :add_issue_notes\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n','default'); +} + +) +end diff --git a/spec/shared_account_spec.rb b/spec/shared_account_spec.rb new file mode 100644 index 000000000..046aa2392 --- /dev/null +++ b/spec/shared_account_spec.rb @@ -0,0 +1,42 @@ +require 'rails_helper' + +RSpec.shared_context "create user" do + let(:user) {FactoryGirl.attributes_for(:user)} + def shared_register + post register_path, user: user + end + + def shared_update_user + post my_account_url, + login: user[:login], + identity: 0, + technical_title: "教授", + no: '', + "user[lastname]" => 'lastname', + "user[firstname]" => 'firstname', + enterprise_name: '', + gender: 1, + province: '', + occupation: "", + "user[mail]" => user[:mail], + "user[language]" => "zh", + province: '', + city: '', + "user[mail_notification]" => "all", + "user_extensions[birthday]" => '', + "user_extensions[gender]" => 1, + "user_extensions[brief_introduction]" => '', + "user_extensions[location]" => '', + "user_extensions[occupation]" => '', + "user_extensions[work_experience]" => '', + "user_extensions[zip_code]" => '' + end + + def shared_login + post signin_path, username: user[:login], password: user[:password] + end + + def current_user + User.find(session[:user_id]) + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d2cbea7d9..e62c66829 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,38 +1,91 @@ -# This file is copied to spec/ when you run 'rails generate rspec:install' -ENV["RAILS_ENV"] ||= 'test' -require File.expand_path("../../config/environment", __FILE__) -require 'rspec/rails' -require 'rspec/autorun' - -# Requires supporting ruby files with custom matchers and macros, etc, -# in spec/support/ and its subdirectories. -Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } +require 'rubygems' +require 'rspec/core' +# require_relative 'support/spork_patch' +# This file was generated by the `rails generate rspec:install` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need +# it. +# +# The `.rspec` file also contains a few flags that are not defaults but that +# users commonly want. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| - # ## Mock Framework - # - # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: - # - # config.mock_with :mocha - # config.mock_with :flexmock - # config.mock_with :rr - - # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::Rails.root}/spec/fixtures" - - # If you're not using ActiveRecord, or you'd prefer not to run each of your - # examples within a transaction, remove the following line or assign false - # instead of true. - config.use_transactional_fixtures = true - - # If true, the base class of anonymous controllers will be inferred - # automatically. This will be the default behavior in future versions of - # rspec-rails. - config.infer_base_class_for_anonymous_controllers = false + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end + + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end + +# The settings below are suggested to provide a good initial experience +# with RSpec, but feel free to customize to your heart's content. +=begin + # These two settings work together to allow you to limit a spec run + # to individual examples or groups you care about by tagging them with + # `:focus` metadata. When nothing is tagged with `:focus`, all examples + # get run. + config.filter_run :focus + config.run_all_when_everything_filtered = true + + # Limits the available syntax to the non-monkey patched syntax that is + # recommended. For more details, see: + # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax + # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching + config.disable_monkey_patching! + + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = 'doc' + end + + # Print the 10 slowest examples and example groups at the + # end of the spec run, to help surface which specs are running + # particularly slow. + config.profile_examples = 10 # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 - config.order = "random" + config.order = :random + + # Seed global randomization in this process using the `--seed` CLI option. + # Setting this allows you to use `--seed` to deterministically reproduce + # test failures related to randomization by passing the same `--seed` value + # as the one that triggered the failure. + Kernel.srand config.seed +=end end diff --git a/spec/support/spork_patch.rb b/spec/support/spork_patch.rb new file mode 100644 index 000000000..1da921a36 --- /dev/null +++ b/spec/support/spork_patch.rb @@ -0,0 +1,22 @@ +# https://stackoverflow.com/questions/24030907/spork-0-9-2-and-rspec-3-0-0-uninitialized-constant-rspeccorecommandline-n/24085168#24085168 +# https://github.com/manafire/spork/commit/38c79dcedb246daacbadb9f18d09f50cc837de51#diff-937afaa19ccfee172d722a05112a7c6fL6 + + class Spork::TestFramework::RSpec + def run_tests(argv, stderr, stdout) + if rspec1? + ::Spec::Runner::CommandLine.run( + ::Spec::Runner::OptionParser.parse(argv, stderr, stdout) + ) + elsif rspec3? + options = ::RSpec::Core::ConfigurationOptions.new(argv) + ::RSpec::Core::Runner.new(options).run(stderr, stdout) + else + ::RSpec::Core::CommandLine.new(argv).run(stderr, stdout) + end + end + + def rspec3? + return false if !defined?(::RSpec::Core::Version::STRING) + ::RSpec::Core::Version::STRING =~ /^3\./ + end +end diff --git a/test/fixtures/activities.yml b/test/fixtures/activities.yml index 2a7842517..2786c4e14 100644 --- a/test/fixtures/activities.yml +++ b/test/fixtures/activities.yml @@ -1,7 +1,6 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html one: - act_id: act_type: MyString user_id: @@ -10,14 +9,3 @@ two: act_id: act_type: MyString user_id: - - id: 1 - act_id: 1 - act_type: JournalsForMessage - user_id: 5 - -two: - act_id: 2 - act_type: JournalsForMessage - user_id: 5 - diff --git a/test/fixtures/applied_projects.yml b/test/fixtures/applied_projects.yml index 90f1c8883..c476ef34b 100644 --- a/test/fixtures/applied_projects.yml +++ b/test/fixtures/applied_projects.yml @@ -1,9 +1,9 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - project_id: 1 - user_id: 1 - -two: - project_id: 1 - user_id: 1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + project_id: 1 + user_id: 1 + +two: + project_id: 1 + user_id: 1 diff --git a/test/fixtures/apply_project_masters.yml b/test/fixtures/apply_project_masters.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/apply_project_masters.yml +++ b/test/fixtures/apply_project_masters.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/attachmentstypes.yml b/test/fixtures/attachmentstypes.yml index 429b31b4b..8dc3df16a 100644 --- a/test/fixtures/attachmentstypes.yml +++ b/test/fixtures/attachmentstypes.yml @@ -1,9 +1,9 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - typeId: - typeName: - -two: - typeId: - typeName: +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + typeId: + typeName: + +two: + typeId: + typeName: diff --git a/test/fixtures/bug_to_osps.yml b/test/fixtures/bug_to_osps.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/bug_to_osps.yml +++ b/test/fixtures/bug_to_osps.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/contesting_softapplications.yml b/test/fixtures/contesting_softapplications.yml index 4b64c8b03..8cdde9d08 100644 --- a/test/fixtures/contesting_softapplications.yml +++ b/test/fixtures/contesting_softapplications.yml @@ -1,13 +1,13 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - softapplication_id: 1 - contest_id: 1 - user_id: 1 - description: MyString - -two: - softapplication_id: 1 - contest_id: 1 - user_id: 1 - description: MyString +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + softapplication_id: 1 + contest_id: 1 + user_id: 1 + description: MyString + +two: + softapplication_id: 1 + contest_id: 1 + user_id: 1 + description: MyString diff --git a/test/fixtures/contestnotifications.yml b/test/fixtures/contestnotifications.yml index 6409a5f71..1bffa73a2 100644 --- a/test/fixtures/contestnotifications.yml +++ b/test/fixtures/contestnotifications.yml @@ -1,17 +1,17 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - contest_id: 1 - title: MyString - summary: MyString - description: MyString - author_id: 1 - comments_count: 1 - -two: - contest_id: 1 - title: MyString - summary: MyString - description: MyString - author_id: 1 - comments_count: 1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + contest_id: 1 + title: MyString + summary: MyString + description: MyString + author_id: 1 + comments_count: 1 + +two: + contest_id: 1 + title: MyString + summary: MyString + description: MyString + author_id: 1 + comments_count: 1 diff --git a/test/fixtures/course_infos.yml b/test/fixtures/course_infos.yml index 97356bfb1..067ad888d 100644 --- a/test/fixtures/course_infos.yml +++ b/test/fixtures/course_infos.yml @@ -1,6 +1,5 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html -<<<<<<< HEAD one: typeId: 1 typeName: MyString @@ -8,18 +7,3 @@ one: two: typeId: 1 typeName: MyString -======= -courses_001_infos: - id: 1 - course_id: 1 - user_id: 20 - created_at: 2013-09-30 15:36:00 - updated_at: 2014-04-19 01:50:41 -courses_002_infos: - id: 2 - course_id: 2 - user_id: 20 - created_at: 2013-09-30 15:36:00 - updated_at: 2014-04-19 01:50:41 - ->>>>>>> a09a3dc378c45f43f5c4b090479fa292a846f4f0 diff --git a/test/fixtures/course_statuses.yml b/test/fixtures/course_statuses.yml index 22f1276f0..7bffa0a08 100644 --- a/test/fixtures/course_statuses.yml +++ b/test/fixtures/course_statuses.yml @@ -1,16 +1,11 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html -<<<<<<< HEAD one: -======= -courses_001_statuses: ->>>>>>> a09a3dc378c45f43f5c4b090479fa292a846f4f0 changesets_count: 1 watchers_count: 1 course_id: 1 grade: 1.5 course_ac_para: 1 -<<<<<<< HEAD two: changesets_count: 1 @@ -18,16 +13,3 @@ two: course_id: 1 grade: 1.5 course_ac_para: 1 -======= - created_at: 2013-09-30 15:36:00 - updated_at: 2014-04-19 01:50:41 - -courses_002_statuses: - changesets_count: 1 - watchers_count: 1 - course_id: 2 - grade: 1.5 - course_ac_para: 1 - created_at: 2013-09-30 15:36:00 - updated_at: 2014-04-19 01:50:41 ->>>>>>> a09a3dc378c45f43f5c4b090479fa292a846f4f0 diff --git a/test/fixtures/files/japanese-utf-8.txt b/test/fixtures/files/japanese-utf-8.txt index c77dbef7f..0c39d0e1e 100644 --- a/test/fixtures/files/japanese-utf-8.txt +++ b/test/fixtures/files/japanese-utf-8.txt @@ -1 +1 @@ -日本語 +日本語 diff --git a/test/fixtures/forums.yml b/test/fixtures/forums.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/forums.yml +++ b/test/fixtures/forums.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/homework_users.yml b/test/fixtures/homework_users.yml index bec69e598..7855d84d9 100644 --- a/test/fixtures/homework_users.yml +++ b/test/fixtures/homework_users.yml @@ -1,9 +1,9 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - homework_attach_id: MyString - user_id: MyString - -two: - homework_attach_id: MyString - user_id: MyString +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + homework_attach_id: MyString + user_id: MyString + +two: + homework_attach_id: MyString + user_id: MyString diff --git a/test/fixtures/join_in_contests.yml b/test/fixtures/join_in_contests.yml index 3e5279b38..36a398708 100644 --- a/test/fixtures/join_in_contests.yml +++ b/test/fixtures/join_in_contests.yml @@ -1,9 +1,9 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - user_id: 1 - bid_id: 1 - -two: - user_id: 1 - bid_id: 1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + user_id: 1 + bid_id: 1 + +two: + user_id: 1 + bid_id: 1 diff --git a/test/fixtures/journal_replies.yml b/test/fixtures/journal_replies.yml index 1a8bb39c1..6ba0dc080 100644 --- a/test/fixtures/journal_replies.yml +++ b/test/fixtures/journal_replies.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - journal_id: 1 - user_id: 1 - reply_id: 1 - -two: - journal_id: 1 - user_id: 1 - reply_id: 1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + journal_id: 1 + user_id: 1 + reply_id: 1 + +two: + journal_id: 1 + user_id: 1 + reply_id: 1 diff --git a/test/fixtures/memos.yml b/test/fixtures/memos.yml index 9517e345b..0d472e114 100644 --- a/test/fixtures/memos.yml +++ b/test/fixtures/memos.yml @@ -1,22 +1,22 @@ ---- -one: - parent_id: 1 - forum_id: 1 - subject: MyString - content: MyText - author_id: 1 - replies_count: 1 - last_reply_id: 1 - lock: false - sticky: false - -two: - parent_id: 1 - forum_id: 1 - subject: MyString - content: MyText - author_id: 1 - replies_count: 1 - last_reply_id: 1 - lock: false - sticky: false +--- +one: + parent_id: 1 + forum_id: 1 + subject: MyString + content: MyText + author_id: 1 + replies_count: 1 + last_reply_id: 1 + lock: false + sticky: false + +two: + parent_id: 1 + forum_id: 1 + subject: MyString + content: MyText + author_id: 1 + replies_count: 1 + last_reply_id: 1 + lock: false + sticky: false diff --git a/test/fixtures/no_uses.yml b/test/fixtures/no_uses.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/no_uses.yml +++ b/test/fixtures/no_uses.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/notificationcomments.yml b/test/fixtures/notificationcomments.yml index 54c42b849..ab1232426 100644 --- a/test/fixtures/notificationcomments.yml +++ b/test/fixtures/notificationcomments.yml @@ -1,13 +1,13 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - notificationcommented_type: MyString - notificationcommented_id: 1 - author_id: 1 - notificationcomments: MyText - -two: - notificationcommented_type: MyString - notificationcommented_id: 1 - author_id: 1 - notificationcomments: MyText +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + notificationcommented_type: MyString + notificationcommented_id: 1 + author_id: 1 + notificationcomments: MyText + +two: + notificationcommented_type: MyString + notificationcommented_id: 1 + author_id: 1 + notificationcomments: MyText diff --git a/test/fixtures/open_source_projects.yml b/test/fixtures/open_source_projects.yml index a95f1d28f..04ae50ea2 100644 --- a/test/fixtures/open_source_projects.yml +++ b/test/fixtures/open_source_projects.yml @@ -1,7 +1,7 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - String: - -two: - String: +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + String: + +two: + String: diff --git a/test/fixtures/relative_memo_to_open_source_projects.yml b/test/fixtures/relative_memo_to_open_source_projects.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/relative_memo_to_open_source_projects.yml +++ b/test/fixtures/relative_memo_to_open_source_projects.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/relative_memos.yml b/test/fixtures/relative_memos.yml index c63aac0b6..8ca764781 100644 --- a/test/fixtures/relative_memos.yml +++ b/test/fixtures/relative_memos.yml @@ -1,11 +1,11 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/schools.yml b/test/fixtures/schools.yml index 2c5dd365e..5ae349b47 100644 --- a/test/fixtures/schools.yml +++ b/test/fixtures/schools.yml @@ -1,6 +1,5 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html -<<<<<<< HEAD one: name: province: MyString @@ -8,16 +7,3 @@ one: two: name: province: MyString -======= -school_117: - id: 117 - name: 国防科学技术大学 - province: 湖南省 - logo_link: - -school_001: - id: 1 - name: 摧毁地球人学校 - province: 火星 - logo_link: ->>>>>>> a09a3dc378c45f43f5c4b090479fa292a846f4f0 diff --git a/test/fixtures/softapplications.yml b/test/fixtures/softapplications.yml index 0ab48299f..a543afb59 100644 --- a/test/fixtures/softapplications.yml +++ b/test/fixtures/softapplications.yml @@ -1,17 +1,17 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - name: MyString - description: MyString - app_type_id: 1 - app_type_name: MyString - android_min_version_available: MyString - user_id: 1 - -two: - name: MyString - description: MyString - app_type_id: 1 - app_type_name: MyString - android_min_version_available: MyString - user_id: 1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + name: MyString + description: MyString + app_type_id: 1 + app_type_name: MyString + android_min_version_available: MyString + user_id: 1 + +two: + name: MyString + description: MyString + app_type_id: 1 + app_type_name: MyString + android_min_version_available: MyString + user_id: 1 diff --git a/test/fixtures/user_extensions.yml b/test/fixtures/user_extensions.yml index 904db0483..8fc6cb59a 100644 --- a/test/fixtures/user_extensions.yml +++ b/test/fixtures/user_extensions.yml @@ -1,4 +1,3 @@ -<<<<<<< HEAD # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html person_one_extra: @@ -37,63 +36,4 @@ person_mao_extra: student_id: nil teacher_realname: nil student_realname: nil - location_city: nil -======= -user_extension_006: - id: 6 - user_id: 6 - birthday: - brief_introduction: - gender: 0 - location: - occupation: - work_experience: - zip_code: - created_at: 2014-07-29 02:54:09 - updated_at: 2014-07-29 02:54:09 - technical_title: - identity: 0 - student_id: - teacher_realname: - student_realname: - location_city: - school_id: -user_extension_020: - id: 20 - user_id: 20 - birthday: - brief_introduction: 哈尔 - gender: 0 - location: 黑龙江 - occupation: kylinos-cloud - work_experience: - zip_code: - created_at: 2014-07-29 02:54:09 - updated_at: 2014-07-29 02:54:09 - technical_title: 助教 - identity: 0 - student_id: - teacher_realname: - student_realname: - location_city: 哈尔滨 - school_id: -user_extension_025: - id: 25 - user_id: 25 - birthday: - brief_introduction: 哈尔 - gender: 0 - location: 黑龙江 - occupation: kylinos-cloud - work_experience: - zip_code: - created_at: 2014-07-29 02:54:09 - updated_at: 2014-07-29 02:54:09 - technical_title: 助教 - identity: 1 #student - student_id: 10060342 - teacher_realname: - student_realname: 'ue_realname' - location_city: 哈尔滨 - school_id: 117 ->>>>>>> a09a3dc378c45f43f5c4b090479fa292a846f4f0 + location_city: nil \ No newline at end of file diff --git a/test/fixtures/user_score_details.yml b/test/fixtures/user_score_details.yml index ac8da802d..3e98003c3 100644 --- a/test/fixtures/user_score_details.yml +++ b/test/fixtures/user_score_details.yml @@ -1,27 +1,27 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -one: - current_user_id: 1 - target_user_id: 1 - score_type: MyString - score_action: MyString - user_id: 1 - old_score: 1 - new_score: 1 - current_user_level: 1 - target_user_level: 1 - score_changeable_obj_id: 1 - score_changeable_obj_type: MyString - -two: - current_user_id: 1 - target_user_id: 1 - score_type: MyString - score_action: MyString - user_id: 1 - old_score: 1 - new_score: 1 - current_user_level: 1 - target_user_level: 1 - score_changeable_obj_id: 1 - score_changeable_obj_type: MyString +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + current_user_id: 1 + target_user_id: 1 + score_type: MyString + score_action: MyString + user_id: 1 + old_score: 1 + new_score: 1 + current_user_level: 1 + target_user_level: 1 + score_changeable_obj_id: 1 + score_changeable_obj_type: MyString + +two: + current_user_id: 1 + target_user_id: 1 + score_type: MyString + score_action: MyString + user_id: 1 + old_score: 1 + new_score: 1 + current_user_level: 1 + target_user_level: 1 + score_changeable_obj_id: 1 + score_changeable_obj_type: MyString diff --git a/test/functional/applied_project_controller_test.rb b/test/functional/applied_project_controller_test.rb index 7c73908ce..265ddda23 100644 --- a/test/functional/applied_project_controller_test.rb +++ b/test/functional/applied_project_controller_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class AppliedProjectControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class AppliedProjectControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/apply_project_masters_controller_test.rb b/test/functional/apply_project_masters_controller_test.rb index 3cad8dca6..e04ac7a33 100644 --- a/test/functional/apply_project_masters_controller_test.rb +++ b/test/functional/apply_project_masters_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class ApplyProjectMastersControllerTest < ActionController::TestCase - setup do - @apply_project_master = apply_project_masters(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:apply_project_masters) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create apply_project_master" do - assert_difference('ApplyProjectMaster.count') do - post :create, apply_project_master: { } - end - - assert_redirected_to apply_project_master_path(assigns(:apply_project_master)) - end - - test "should show apply_project_master" do - get :show, id: @apply_project_master - assert_response :success - end - - test "should get edit" do - get :edit, id: @apply_project_master - assert_response :success - end - - test "should update apply_project_master" do - put :update, id: @apply_project_master, apply_project_master: { } - assert_redirected_to apply_project_master_path(assigns(:apply_project_master)) - end - - test "should destroy apply_project_master" do - assert_difference('ApplyProjectMaster.count', -1) do - delete :destroy, id: @apply_project_master - end - - assert_redirected_to apply_project_masters_path - end -end +require 'test_helper' + +class ApplyProjectMastersControllerTest < ActionController::TestCase + setup do + @apply_project_master = apply_project_masters(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:apply_project_masters) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create apply_project_master" do + assert_difference('ApplyProjectMaster.count') do + post :create, apply_project_master: { } + end + + assert_redirected_to apply_project_master_path(assigns(:apply_project_master)) + end + + test "should show apply_project_master" do + get :show, id: @apply_project_master + assert_response :success + end + + test "should get edit" do + get :edit, id: @apply_project_master + assert_response :success + end + + test "should update apply_project_master" do + put :update, id: @apply_project_master, apply_project_master: { } + assert_redirected_to apply_project_master_path(assigns(:apply_project_master)) + end + + test "should destroy apply_project_master" do + assert_difference('ApplyProjectMaster.count', -1) do + delete :destroy, id: @apply_project_master + end + + assert_redirected_to apply_project_masters_path + end +end diff --git a/test/functional/attachment_type_edit_controller_test.rb b/test/functional/attachment_type_edit_controller_test.rb index d71c8407f..6cafbefcc 100644 --- a/test/functional/attachment_type_edit_controller_test.rb +++ b/test/functional/attachment_type_edit_controller_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class AttachmentTypeEditControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class AttachmentTypeEditControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/contestnotifications_controller_test.rb b/test/functional/contestnotifications_controller_test.rb index 948955a87..2873cceeb 100644 --- a/test/functional/contestnotifications_controller_test.rb +++ b/test/functional/contestnotifications_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class ContestnotificationsControllerTest < ActionController::TestCase - setup do - @contestnotification = contestnotifications(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:contestnotifications) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create contestnotification" do - assert_difference('Contestnotification.count') do - post :create, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title } - end - - assert_redirected_to contestnotification_path(assigns(:contestnotification)) - end - - test "should show contestnotification" do - get :show, id: @contestnotification - assert_response :success - end - - test "should get edit" do - get :edit, id: @contestnotification - assert_response :success - end - - test "should update contestnotification" do - put :update, id: @contestnotification, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title } - assert_redirected_to contestnotification_path(assigns(:contestnotification)) - end - - test "should destroy contestnotification" do - assert_difference('Contestnotification.count', -1) do - delete :destroy, id: @contestnotification - end - - assert_redirected_to contestnotifications_path - end -end +require 'test_helper' + +class ContestnotificationsControllerTest < ActionController::TestCase + setup do + @contestnotification = contestnotifications(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:contestnotifications) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create contestnotification" do + assert_difference('Contestnotification.count') do + post :create, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title } + end + + assert_redirected_to contestnotification_path(assigns(:contestnotification)) + end + + test "should show contestnotification" do + get :show, id: @contestnotification + assert_response :success + end + + test "should get edit" do + get :edit, id: @contestnotification + assert_response :success + end + + test "should update contestnotification" do + put :update, id: @contestnotification, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title } + assert_redirected_to contestnotification_path(assigns(:contestnotification)) + end + + test "should destroy contestnotification" do + assert_difference('Contestnotification.count', -1) do + delete :destroy, id: @contestnotification + end + + assert_redirected_to contestnotifications_path + end +end diff --git a/test/functional/forums_controller_test.rb b/test/functional/forums_controller_test.rb index 9b0438bd2..168be1a6c 100644 --- a/test/functional/forums_controller_test.rb +++ b/test/functional/forums_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class ForumsControllerTest < ActionController::TestCase - setup do - @forum = forums(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:forums) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create forum" do - assert_difference('Forum.count') do - post :create, forum: { } - end - - assert_redirected_to forum_path(assigns(:forum)) - end - - test "should show forum" do - get :show, id: @forum - assert_response :success - end - - test "should get edit" do - get :edit, id: @forum - assert_response :success - end - - test "should update forum" do - put :update, id: @forum, forum: { } - assert_redirected_to forum_path(assigns(:forum)) - end - - test "should destroy forum" do - assert_difference('Forum.count', -1) do - delete :destroy, id: @forum - end - - assert_redirected_to forums_path - end -end +require 'test_helper' + +class ForumsControllerTest < ActionController::TestCase + setup do + @forum = forums(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:forums) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create forum" do + assert_difference('Forum.count') do + post :create, forum: { } + end + + assert_redirected_to forum_path(assigns(:forum)) + end + + test "should show forum" do + get :show, id: @forum + assert_response :success + end + + test "should get edit" do + get :edit, id: @forum + assert_response :success + end + + test "should update forum" do + put :update, id: @forum, forum: { } + assert_redirected_to forum_path(assigns(:forum)) + end + + test "should destroy forum" do + assert_difference('Forum.count', -1) do + delete :destroy, id: @forum + end + + assert_redirected_to forums_path + end +end diff --git a/test/functional/memos_controller_test.rb b/test/functional/memos_controller_test.rb index 76c0e3748..07d6655e4 100644 --- a/test/functional/memos_controller_test.rb +++ b/test/functional/memos_controller_test.rb @@ -1,11 +1,11 @@ -require 'test_helper' - -class MemosControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end - def test_memo_create_fail - memo = Memo.create(:subject => nil) - assert true - end -end +require 'test_helper' + +class MemosControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end + def test_memo_create_fail + memo = Memo.create(:subject => nil) + assert true + end +end diff --git a/test/functional/no_uses_controller_test.rb b/test/functional/no_uses_controller_test.rb index 255b03dc4..fdcfbb767 100644 --- a/test/functional/no_uses_controller_test.rb +++ b/test/functional/no_uses_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class NoUsesControllerTest < ActionController::TestCase - setup do - @no_use = no_uses(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:no_uses) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create no_use" do - assert_difference('NoUse.count') do - post :create, no_use: { } - end - - assert_redirected_to no_use_path(assigns(:no_use)) - end - - test "should show no_use" do - get :show, id: @no_use - assert_response :success - end - - test "should get edit" do - get :edit, id: @no_use - assert_response :success - end - - test "should update no_use" do - put :update, id: @no_use, no_use: { } - assert_redirected_to no_use_path(assigns(:no_use)) - end - - test "should destroy no_use" do - assert_difference('NoUse.count', -1) do - delete :destroy, id: @no_use - end - - assert_redirected_to no_uses_path - end -end +require 'test_helper' + +class NoUsesControllerTest < ActionController::TestCase + setup do + @no_use = no_uses(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:no_uses) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create no_use" do + assert_difference('NoUse.count') do + post :create, no_use: { } + end + + assert_redirected_to no_use_path(assigns(:no_use)) + end + + test "should show no_use" do + get :show, id: @no_use + assert_response :success + end + + test "should get edit" do + get :edit, id: @no_use + assert_response :success + end + + test "should update no_use" do + put :update, id: @no_use, no_use: { } + assert_redirected_to no_use_path(assigns(:no_use)) + end + + test "should destroy no_use" do + assert_difference('NoUse.count', -1) do + delete :destroy, id: @no_use + end + + assert_redirected_to no_uses_path + end +end diff --git a/test/functional/notificationcomments_controller_test.rb b/test/functional/notificationcomments_controller_test.rb index 21496467e..2e4ed3350 100644 --- a/test/functional/notificationcomments_controller_test.rb +++ b/test/functional/notificationcomments_controller_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class NotificationcommentsControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class NotificationcommentsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/open_source_projects_controller_test.rb b/test/functional/open_source_projects_controller_test.rb index 9b33a8b1f..ea6fe181a 100644 --- a/test/functional/open_source_projects_controller_test.rb +++ b/test/functional/open_source_projects_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class OpenSourceProjectsControllerTest < ActionController::TestCase - setup do - @open_source_project = open_source_projects(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:open_source_projects) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create open_source_project" do - assert_difference('OpenSourceProject.count') do - post :create, open_source_project: { String: @open_source_project.String } - end - - assert_redirected_to open_source_project_path(assigns(:open_source_project)) - end - - test "should show open_source_project" do - get :show, id: @open_source_project - assert_response :success - end - - test "should get edit" do - get :edit, id: @open_source_project - assert_response :success - end - - test "should update open_source_project" do - put :update, id: @open_source_project, open_source_project: { String: @open_source_project.String } - assert_redirected_to open_source_project_path(assigns(:open_source_project)) - end - - test "should destroy open_source_project" do - assert_difference('OpenSourceProject.count', -1) do - delete :destroy, id: @open_source_project - end - - assert_redirected_to open_source_projects_path - end -end +require 'test_helper' + +class OpenSourceProjectsControllerTest < ActionController::TestCase + setup do + @open_source_project = open_source_projects(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:open_source_projects) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create open_source_project" do + assert_difference('OpenSourceProject.count') do + post :create, open_source_project: { String: @open_source_project.String } + end + + assert_redirected_to open_source_project_path(assigns(:open_source_project)) + end + + test "should show open_source_project" do + get :show, id: @open_source_project + assert_response :success + end + + test "should get edit" do + get :edit, id: @open_source_project + assert_response :success + end + + test "should update open_source_project" do + put :update, id: @open_source_project, open_source_project: { String: @open_source_project.String } + assert_redirected_to open_source_project_path(assigns(:open_source_project)) + end + + test "should destroy open_source_project" do + assert_difference('OpenSourceProject.count', -1) do + delete :destroy, id: @open_source_project + end + + assert_redirected_to open_source_projects_path + end +end diff --git a/test/functional/softapplications_controller_test.rb b/test/functional/softapplications_controller_test.rb index 8c5611cb9..b3f7a76ed 100644 --- a/test/functional/softapplications_controller_test.rb +++ b/test/functional/softapplications_controller_test.rb @@ -1,49 +1,49 @@ -require 'test_helper' - -class SoftapplicationsControllerTest < ActionController::TestCase - setup do - @softapplication = softapplications(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:softapplications) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create softapplication" do - assert_difference('Softapplication.count') do - post :create, softapplication: { android_min_version_available: @softapplication.android_min_version_available, app_type_id: @softapplication.app_type_id, app_type_name: @softapplication.app_type_name, description: @softapplication.description, name: @softapplication.name, user_id: @softapplication.user_id } - end - - assert_redirected_to softapplication_path(assigns(:softapplication)) - end - - test "should show softapplication" do - get :show, id: @softapplication - assert_response :success - end - - test "should get edit" do - get :edit, id: @softapplication - assert_response :success - end - - test "should update softapplication" do - put :update, id: @softapplication, softapplication: { android_min_version_available: @softapplication.android_min_version_available, app_type_id: @softapplication.app_type_id, app_type_name: @softapplication.app_type_name, description: @softapplication.description, name: @softapplication.name, user_id: @softapplication.user_id } - assert_redirected_to softapplication_path(assigns(:softapplication)) - end - - test "should destroy softapplication" do - assert_difference('Softapplication.count', -1) do - delete :destroy, id: @softapplication - end - - assert_redirected_to softapplications_path - end -end +require 'test_helper' + +class SoftapplicationsControllerTest < ActionController::TestCase + setup do + @softapplication = softapplications(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:softapplications) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create softapplication" do + assert_difference('Softapplication.count') do + post :create, softapplication: { android_min_version_available: @softapplication.android_min_version_available, app_type_id: @softapplication.app_type_id, app_type_name: @softapplication.app_type_name, description: @softapplication.description, name: @softapplication.name, user_id: @softapplication.user_id } + end + + assert_redirected_to softapplication_path(assigns(:softapplication)) + end + + test "should show softapplication" do + get :show, id: @softapplication + assert_response :success + end + + test "should get edit" do + get :edit, id: @softapplication + assert_response :success + end + + test "should update softapplication" do + put :update, id: @softapplication, softapplication: { android_min_version_available: @softapplication.android_min_version_available, app_type_id: @softapplication.app_type_id, app_type_name: @softapplication.app_type_name, description: @softapplication.description, name: @softapplication.name, user_id: @softapplication.user_id } + assert_redirected_to softapplication_path(assigns(:softapplication)) + end + + test "should destroy softapplication" do + assert_difference('Softapplication.count', -1) do + delete :destroy, id: @softapplication + end + + assert_redirected_to softapplications_path + end +end diff --git a/test/functional/system_log_controller_test.rb b/test/functional/system_log_controller_test.rb index 0d8f6a181..12e288a07 100644 --- a/test/functional/system_log_controller_test.rb +++ b/test/functional/system_log_controller_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class SystemLogControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class UserScoreControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/test_controller_test.rb b/test/functional/test_controller_test.rb index c262ffe53..b701604eb 100644 --- a/test/functional/test_controller_test.rb +++ b/test/functional/test_controller_test.rb @@ -1,13 +1,13 @@ -require 'test_helper' - -class TestControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end - test "get test index error" do - @request.env["REQUEST_URI"] = "" - get :index - assert_template :index - # assert_template layout: "layouts/base", partial: ["layouts/base_header","_base_header", 'layouts/base_footer', "_base_footer",] - end -end +require 'test_helper' + +class TestControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end + test "get test index error" do + @request.env["REQUEST_URI"] = "" + get :index + assert_template :index + # assert_template layout: "layouts/base", partial: ["layouts/base_header","_base_header", 'layouts/base_footer', "_base_footer",] + end +end diff --git a/test/functional/zipdown_controller_test.rb b/test/functional/zipdown_controller_test.rb new file mode 100644 index 000000000..0d21770f3 --- /dev/null +++ b/test/functional/zipdown_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ZipdownControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb index 7562bcf7c..994368a28 100644 --- a/test/integration/account_test.rb +++ b/test/integration/account_test.rb @@ -29,7 +29,7 @@ class AccountTest < ActionController::IntegrationTest # Replace this with your real tests. def test_login get "my/page" - assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fmy%2Fpage" + assert_redirected_to "/login" log_user('jsmith', 'jsmith') get "my/account" @@ -44,7 +44,7 @@ class AccountTest < ActionController::IntegrationTest # User logs in with 'autologin' checked post '/login', :username => user.login, :password => 'admin', :autologin => 1 - assert_redirected_to '/my/page' + assert_redirected_to '/users/1' token = Token.first assert_not_nil token assert_equal user, token.user @@ -73,6 +73,7 @@ class AccountTest < ActionController::IntegrationTest Redmine::Configuration.stubs(:[]).with('autologin_cookie_name').returns('custom_autologin') Redmine::Configuration.stubs(:[]).with('autologin_cookie_path').returns('/') Redmine::Configuration.stubs(:[]).with('autologin_cookie_secure').returns(false) + Redmine::Configuration.stubs(:[]).with('max_concurrent_ajax_uploads').returns(2) with_settings :autologin => '7' do assert_difference 'Token.count' do @@ -85,12 +86,10 @@ class AccountTest < ActionController::IntegrationTest # Session is cleared reset! cookies['custom_autologin'] = token - get '/my/page' + get '/my/account' assert_response :success - assert_difference 'Token.count', -1 do - post '/logout' - end + post '/logout' assert cookies['custom_autologin'].blank? end end diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb index 3fea27b91..d93cdda03 100644 --- a/test/performance/browsing_test.rb +++ b/test/performance/browsing_test.rb @@ -1,12 +1,12 @@ -require 'test_helper' -require 'rails/performance_test_help' - -class BrowsingTest < ActionDispatch::PerformanceTest - # Refer to the documentation for all available options - # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] - # :output => 'tmp/performance', :formats => [:flat] } - - def test_homepage - get '/' - end -end +require 'test_helper' +require 'rails/performance_test_help' + +class BrowsingTest < ActionDispatch::PerformanceTest + # Refer to the documentation for all available options + # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] + # :output => 'tmp/performance', :formats => [:flat] } + + def test_homepage + get '/' + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb index 9b1a4f158..b7d786704 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,22 +1,22 @@ require 'rubygems' -require 'spork' +# require 'spork' #uncomment the following line to use spork with the debugger #require 'spork/ext/ruby-debug' -Spork.prefork do - # Loading more in this block will cause your tests to run faster. However, - # if you change any configuration or code from libraries loaded here, you'll - # need to restart spork for it take effect. - ENV["RAILS_ENV"] = "test" - require File.expand_path('../../config/environment', __FILE__) - require 'rails/test_help' - -end - -Spork.each_run do - # This code will be run each time you run your specs. - -end +# Spork.prefork do +# # Loading more in this block will cause your tests to run faster. However, +# # if you change any configuration or code from libraries loaded here, you'll +# # need to restart spork for it take effect. +# ENV["RAILS_ENV"] = "test" +# require File.expand_path('../../config/environment', __FILE__) +# require 'rails/test_help' +# +# end +# +# Spork.each_run do +# # This code will be run each time you run your specs. +# +# end # --- Instructions --- # Sort the contents of this file into a Spork.prefork and a Spork.each_run @@ -50,471 +50,472 @@ end -# Redmine - project management software -# Copyright (C) 2006-2013 Jean-Philippe Lang -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -#require 'shoulda' -ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -require 'rails/test_help' -require Rails.root.join('test', 'mocks', 'open_id_authentication_mock.rb').to_s - -require File.expand_path(File.dirname(__FILE__) + '/object_helpers') -include ObjectHelpers - -class ActiveSupport::TestCase - include ActionDispatch::TestProcess - - self.use_transactional_fixtures = true - self.use_instantiated_fixtures = false - - def log_user(login, password) - User.anonymous - get "/login" - assert_equal nil, session[:user_id] - assert_response :success - assert_template "account/login" - post "/login", :username => login, :password => password - assert_equal login, User.find(session[:user_id]).login - end - - def uploaded_test_file(name, mime) - fixture_file_upload("files/#{name}", mime, true) - end - - def credentials(user, password=nil) - {'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user)} - end - - # Mock out a file - def self.mock_file - file = 'a_file.png' - file.stubs(:size).returns(32) - file.stubs(:original_filename).returns('a_file.png') - file.stubs(:content_type).returns('image/png') - file.stubs(:read).returns(false) - file - end - - def mock_file - self.class.mock_file - end - - def mock_file_with_options(options={}) - file = '' - file.stubs(:size).returns(32) - original_filename = options[:original_filename] || nil - file.stubs(:original_filename).returns(original_filename) - content_type = options[:content_type] || nil - file.stubs(:content_type).returns(content_type) - file.stubs(:read).returns(false) - file - end - - # Use a temporary directory for attachment related tests - def set_tmp_attachments_directory - Dir.mkdir "#{Rails.root}/tmp/test" unless File.directory?("#{Rails.root}/tmp/test") - unless File.directory?("#{Rails.root}/tmp/test/attachments") - Dir.mkdir "#{Rails.root}/tmp/test/attachments" - end - Attachment.storage_path = "#{Rails.root}/tmp/test/attachments" - end - - def set_fixtures_attachments_directory - Attachment.storage_path = "#{Rails.root}/test/fixtures/files" - end - - def with_settings(options, &block) - saved_settings = options.keys.inject({}) do |h, k| - h[k] = case Setting[k] - when Symbol, false, true, nil - Setting[k] - else - Setting[k].dup - end - h - end - options.each {|k, v| Setting[k] = v} - yield - ensure - saved_settings.each {|k, v| Setting[k] = v} if saved_settings - end - - # Yields the block with user as the current user - def with_current_user(user, &block) - saved_user = User.current - User.current = user - yield - ensure - User.current = saved_user - end - - def change_user_password(login, new_password) - user = User.first(:conditions => {:login => login}) - user.password, user.password_confirmation = new_password, new_password - user.save! - end - - def self.ldap_configured? - @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) - return @test_ldap.bind - rescue Exception => e - # LDAP is not listening - return nil - end - - def self.convert_installed? - Redmine::Thumbnail.convert_available? - end - - # Returns the path to the test +vendor+ repository - def self.repository_path(vendor) - Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s - end - - # Returns the url of the subversion test repository - def self.subversion_repository_url - path = repository_path('subversion') - path = '/' + path unless path.starts_with?('/') - "file://#{path}" - end - - # Returns true if the +vendor+ test repository is configured - def self.repository_configured?(vendor) - File.directory?(repository_path(vendor)) - end - - def repository_path_hash(arr) - hs = {} - hs[:path] = arr.join("/") - hs[:param] = arr.join("/") - hs - end - - def assert_save(object) - saved = object.save - message = "#{object.class} could not be saved" - errors = object.errors.full_messages.map {|m| "- #{m}"} - message << ":\n#{errors.join("\n")}" if errors.any? - assert_equal true, saved, message - end - - def assert_error_tag(options={}) - assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) - end - - def assert_include(expected, s, message=nil) - assert s.include?(expected), (message || "\"#{expected}\" not found in \"#{s}\"") - end - - def assert_not_include(expected, s) - assert !s.include?(expected), "\"#{expected}\" found in \"#{s}\"" - end - - def assert_select_in(text, *args, &block) - d = HTML::Document.new(CGI::unescapeHTML(String.new(text))).root - assert_select(d, *args, &block) - end - - def assert_mail_body_match(expected, mail) - if expected.is_a?(String) - assert_include expected, mail_body(mail) - else - assert_match expected, mail_body(mail) - end - end - - def assert_mail_body_no_match(expected, mail) - if expected.is_a?(String) - assert_not_include expected, mail_body(mail) - else - assert_no_match expected, mail_body(mail) - end - end - - def mail_body(mail) - mail.parts.first.body.encoded - end -end - -module Redmine - module ApiTest - # Base class for API tests - class Base < ActionDispatch::IntegrationTest - # Test that a request allows the three types of API authentication - # - # * HTTP Basic with username and password - # * HTTP Basic with an api key for the username - # * Key based with the key=X parameter - # - # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) - # @param [String] url the request url - # @param [optional, Hash] parameters additional request parameters - # @param [optional, Hash] options additional options - # @option options [Symbol] :success_code Successful response code (:success) - # @option options [Symbol] :failure_code Failure response code (:unauthorized) - def self.should_allow_api_authentication(http_method, url, parameters={}, options={}) - should_allow_http_basic_auth_with_username_and_password(http_method, url, parameters, options) - should_allow_http_basic_auth_with_key(http_method, url, parameters, options) - should_allow_key_based_auth(http_method, url, parameters, options) - end - - # Test that a request allows the username and password for HTTP BASIC - # - # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) - # @param [String] url the request url - # @param [optional, Hash] parameters additional request parameters - # @param [optional, Hash] options additional options - # @option options [Symbol] :success_code Successful response code (:success) - # @option options [Symbol] :failure_code Failure response code (:unauthorized) - def self.should_allow_http_basic_auth_with_username_and_password(http_method, url, parameters={}, options={}) - success_code = options[:success_code] || :success - failure_code = options[:failure_code] || :unauthorized - - context "should allow http basic auth using a username and password for #{http_method} #{url}" do - context "with a valid HTTP authentication" do - setup do - @user = User.generate! do |user| - user.admin = true - user.password = 'my_password' - end - send(http_method, url, parameters, credentials(@user.login, 'my_password')) - end - - should_respond_with success_code - should_respond_with_content_type_based_on_url(url) - should "login as the user" do - assert_equal @user, User.current - end - end - - context "with an invalid HTTP authentication" do - setup do - @user = User.generate! - send(http_method, url, parameters, credentials(@user.login, 'wrong_password')) - end - - should_respond_with failure_code - should_respond_with_content_type_based_on_url(url) - should "not login as the user" do - assert_equal User.anonymous, User.current - end - end - - context "without credentials" do - setup do - send(http_method, url, parameters) - end - - should_respond_with failure_code - should_respond_with_content_type_based_on_url(url) - should "include_www_authenticate_header" do - assert @controller.response.headers.has_key?('WWW-Authenticate') - end - end - end - end - - # Test that a request allows the API key with HTTP BASIC - # - # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) - # @param [String] url the request url - # @param [optional, Hash] parameters additional request parameters - # @param [optional, Hash] options additional options - # @option options [Symbol] :success_code Successful response code (:success) - # @option options [Symbol] :failure_code Failure response code (:unauthorized) - def self.should_allow_http_basic_auth_with_key(http_method, url, parameters={}, options={}) - success_code = options[:success_code] || :success - failure_code = options[:failure_code] || :unauthorized - - context "should allow http basic auth with a key for #{http_method} #{url}" do - context "with a valid HTTP authentication using the API token" do - setup do - @user = User.generate! do |user| - user.admin = true - end - @token = Token.create!(:user => @user, :action => 'api') - send(http_method, url, parameters, credentials(@token.value, 'X')) - end - should_respond_with success_code - should_respond_with_content_type_based_on_url(url) - should_be_a_valid_response_string_based_on_url(url) - should "login as the user" do - assert_equal @user, User.current - end - end - - context "with an invalid HTTP authentication" do - setup do - @user = User.generate! - @token = Token.create!(:user => @user, :action => 'feeds') - send(http_method, url, parameters, credentials(@token.value, 'X')) - end - should_respond_with failure_code - should_respond_with_content_type_based_on_url(url) - should "not login as the user" do - assert_equal User.anonymous, User.current - end - end - end - end - - # Test that a request allows full key authentication - # - # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) - # @param [String] url the request url, without the key=ZXY parameter - # @param [optional, Hash] parameters additional request parameters - # @param [optional, Hash] options additional options - # @option options [Symbol] :success_code Successful response code (:success) - # @option options [Symbol] :failure_code Failure response code (:unauthorized) - def self.should_allow_key_based_auth(http_method, url, parameters={}, options={}) - success_code = options[:success_code] || :success - failure_code = options[:failure_code] || :unauthorized - - context "should allow key based auth using key=X for #{http_method} #{url}" do - context "with a valid api token" do - setup do - @user = User.generate! do |user| - user.admin = true - end - @token = Token.create!(:user => @user, :action => 'api') - # Simple url parse to add on ?key= or &key= - request_url = if url.match(/\?/) - url + "&key=#{@token.value}" - else - url + "?key=#{@token.value}" - end - send(http_method, request_url, parameters) - end - should_respond_with success_code - should_respond_with_content_type_based_on_url(url) - should_be_a_valid_response_string_based_on_url(url) - should "login as the user" do - assert_equal @user, User.current - end - end - - context "with an invalid api token" do - setup do - @user = User.generate! do |user| - user.admin = true - end - @token = Token.create!(:user => @user, :action => 'feeds') - # Simple url parse to add on ?key= or &key= - request_url = if url.match(/\?/) - url + "&key=#{@token.value}" - else - url + "?key=#{@token.value}" - end - send(http_method, request_url, parameters) - end - should_respond_with failure_code - should_respond_with_content_type_based_on_url(url) - should "not login as the user" do - assert_equal User.anonymous, User.current - end - end - end - - context "should allow key based auth using X-Redmine-API-Key header for #{http_method} #{url}" do - setup do - @user = User.generate! do |user| - user.admin = true - end - @token = Token.create!(:user => @user, :action => 'api') - send(http_method, url, parameters, {'X-Redmine-API-Key' => @token.value.to_s}) - end - should_respond_with success_code - should_respond_with_content_type_based_on_url(url) - should_be_a_valid_response_string_based_on_url(url) - should "login as the user" do - assert_equal @user, User.current - end - end - end - - # Uses should_respond_with_content_type based on what's in the url: - # - # '/project/issues.xml' => should_respond_with_content_type :xml - # '/project/issues.json' => should_respond_with_content_type :json - # - # @param [String] url Request - def self.should_respond_with_content_type_based_on_url(url) - case - when url.match(/xml/i) - should "respond with XML" do - assert_equal 'application/xml', @response.content_type - end - when url.match(/json/i) - should "respond with JSON" do - assert_equal 'application/json', @response.content_type - end - else - raise "Unknown content type for should_respond_with_content_type_based_on_url: #{url}" - end - end - - # Uses the url to assert which format the response should be in - # - # '/project/issues.xml' => should_be_a_valid_xml_string - # '/project/issues.json' => should_be_a_valid_json_string - # - # @param [String] url Request - def self.should_be_a_valid_response_string_based_on_url(url) - case - when url.match(/xml/i) - should_be_a_valid_xml_string - when url.match(/json/i) - should_be_a_valid_json_string - else - raise "Unknown content type for should_be_a_valid_response_based_on_url: #{url}" - end - end - - # Checks that the response is a valid JSON string - def self.should_be_a_valid_json_string - should "be a valid JSON string (or empty)" do - assert(response.body.blank? || ActiveSupport::JSON.decode(response.body)) - end - end - - # Checks that the response is a valid XML string - def self.should_be_a_valid_xml_string - should "be a valid XML string" do - assert REXML::Document.new(response.body) - end - end - - def self.should_respond_with(status) - should "respond with #{status}" do - assert_response status - end - end - end - end -end - -# URL helpers do not work with config.threadsafe! -# https://github.com/rspec/rspec-rails/issues/476#issuecomment-4705454 -ActionView::TestCase::TestController.instance_eval do - helper Rails.application.routes.url_helpers -end -ActionView::TestCase::TestController.class_eval do - def _routes - Rails.application.routes - end -end +# Redmine - project management software +# Copyright (C) 2006-2013 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#require 'shoulda' +ENV["RAILS_ENV"] = "test" +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") +require 'rails/test_help' +require Rails.root.join('test', 'mocks', 'open_id_authentication_mock.rb').to_s + +require File.expand_path(File.dirname(__FILE__) + '/object_helpers') +include ObjectHelpers + +class ActiveSupport::TestCase + include ActionDispatch::TestProcess + + self.use_transactional_fixtures = true + self.use_instantiated_fixtures = false + + def log_user(login, password) + User.anonymous + get "/login" + assert_equal nil, session[:user_id] + puts response.response_code() + assert_response :success + assert_template "account/login" + post "/login", :username => login, :password => password + assert_equal login, User.find(session[:user_id]).login + end + + def uploaded_test_file(name, mime) + fixture_file_upload("files/#{name}", mime, true) + end + + def credentials(user, password=nil) + {'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user)} + end + + # Mock out a file + def self.mock_file + file = 'a_file.png' + file.stubs(:size).returns(32) + file.stubs(:original_filename).returns('a_file.png') + file.stubs(:content_type).returns('image/png') + file.stubs(:read).returns(false) + file + end + + def mock_file + self.class.mock_file + end + + def mock_file_with_options(options={}) + file = '' + file.stubs(:size).returns(32) + original_filename = options[:original_filename] || nil + file.stubs(:original_filename).returns(original_filename) + content_type = options[:content_type] || nil + file.stubs(:content_type).returns(content_type) + file.stubs(:read).returns(false) + file + end + + # Use a temporary directory for attachment related tests + def set_tmp_attachments_directory + Dir.mkdir "#{Rails.root}/tmp/test" unless File.directory?("#{Rails.root}/tmp/test") + unless File.directory?("#{Rails.root}/tmp/test/attachments") + Dir.mkdir "#{Rails.root}/tmp/test/attachments" + end + Attachment.storage_path = "#{Rails.root}/tmp/test/attachments" + end + + def set_fixtures_attachments_directory + Attachment.storage_path = "#{Rails.root}/test/fixtures/files" + end + + def with_settings(options, &block) + saved_settings = options.keys.inject({}) do |h, k| + h[k] = case Setting[k] + when Symbol, false, true, nil + Setting[k] + else + Setting[k].dup + end + h + end + options.each {|k, v| Setting[k] = v} + yield + ensure + saved_settings.each {|k, v| Setting[k] = v} if saved_settings + end + + # Yields the block with user as the current user + def with_current_user(user, &block) + saved_user = User.current + User.current = user + yield + ensure + User.current = saved_user + end + + def change_user_password(login, new_password) + user = User.first(:conditions => {:login => login}) + user.password, user.password_confirmation = new_password, new_password + user.save! + end + + def self.ldap_configured? + @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) + return @test_ldap.bind + rescue Exception => e + # LDAP is not listening + return nil + end + + def self.convert_installed? + Redmine::Thumbnail.convert_available? + end + + # Returns the path to the test +vendor+ repository + def self.repository_path(vendor) + Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s + end + + # Returns the url of the subversion test repository + def self.subversion_repository_url + path = repository_path('subversion') + path = '/' + path unless path.starts_with?('/') + "file://#{path}" + end + + # Returns true if the +vendor+ test repository is configured + def self.repository_configured?(vendor) + File.directory?(repository_path(vendor)) + end + + def repository_path_hash(arr) + hs = {} + hs[:path] = arr.join("/") + hs[:param] = arr.join("/") + hs + end + + def assert_save(object) + saved = object.save + message = "#{object.class} could not be saved" + errors = object.errors.full_messages.map {|m| "- #{m}"} + message << ":\n#{errors.join("\n")}" if errors.any? + assert_equal true, saved, message + end + + def assert_error_tag(options={}) + assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) + end + + def assert_include(expected, s, message=nil) + assert s.include?(expected), (message || "\"#{expected}\" not found in \"#{s}\"") + end + + def assert_not_include(expected, s) + assert !s.include?(expected), "\"#{expected}\" found in \"#{s}\"" + end + + def assert_select_in(text, *args, &block) + d = HTML::Document.new(CGI::unescapeHTML(String.new(text))).root + assert_select(d, *args, &block) + end + + def assert_mail_body_match(expected, mail) + if expected.is_a?(String) + assert_include expected, mail_body(mail) + else + assert_match expected, mail_body(mail) + end + end + + def assert_mail_body_no_match(expected, mail) + if expected.is_a?(String) + assert_not_include expected, mail_body(mail) + else + assert_no_match expected, mail_body(mail) + end + end + + def mail_body(mail) + mail.parts.first.body.encoded + end +end + +module Redmine + module ApiTest + # Base class for API tests + class Base < ActionDispatch::IntegrationTest + # Test that a request allows the three types of API authentication + # + # * HTTP Basic with username and password + # * HTTP Basic with an api key for the username + # * Key based with the key=X parameter + # + # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) + # @param [String] url the request url + # @param [optional, Hash] parameters additional request parameters + # @param [optional, Hash] options additional options + # @option options [Symbol] :success_code Successful response code (:success) + # @option options [Symbol] :failure_code Failure response code (:unauthorized) + def self.should_allow_api_authentication(http_method, url, parameters={}, options={}) + should_allow_http_basic_auth_with_username_and_password(http_method, url, parameters, options) + should_allow_http_basic_auth_with_key(http_method, url, parameters, options) + should_allow_key_based_auth(http_method, url, parameters, options) + end + + # Test that a request allows the username and password for HTTP BASIC + # + # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) + # @param [String] url the request url + # @param [optional, Hash] parameters additional request parameters + # @param [optional, Hash] options additional options + # @option options [Symbol] :success_code Successful response code (:success) + # @option options [Symbol] :failure_code Failure response code (:unauthorized) + def self.should_allow_http_basic_auth_with_username_and_password(http_method, url, parameters={}, options={}) + success_code = options[:success_code] || :success + failure_code = options[:failure_code] || :unauthorized + + context "should allow http basic auth using a username and password for #{http_method} #{url}" do + context "with a valid HTTP authentication" do + setup do + @user = User.generate! do |user| + user.admin = true + user.password = 'my_password' + end + send(http_method, url, parameters, credentials(@user.login, 'my_password')) + end + + should_respond_with success_code + should_respond_with_content_type_based_on_url(url) + should "login as the user" do + assert_equal @user, User.current + end + end + + context "with an invalid HTTP authentication" do + setup do + @user = User.generate! + send(http_method, url, parameters, credentials(@user.login, 'wrong_password')) + end + + should_respond_with failure_code + should_respond_with_content_type_based_on_url(url) + should "not login as the user" do + assert_equal User.anonymous, User.current + end + end + + context "without credentials" do + setup do + send(http_method, url, parameters) + end + + should_respond_with failure_code + should_respond_with_content_type_based_on_url(url) + should "include_www_authenticate_header" do + assert @controller.response.headers.has_key?('WWW-Authenticate') + end + end + end + end + + # Test that a request allows the API key with HTTP BASIC + # + # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) + # @param [String] url the request url + # @param [optional, Hash] parameters additional request parameters + # @param [optional, Hash] options additional options + # @option options [Symbol] :success_code Successful response code (:success) + # @option options [Symbol] :failure_code Failure response code (:unauthorized) + def self.should_allow_http_basic_auth_with_key(http_method, url, parameters={}, options={}) + success_code = options[:success_code] || :success + failure_code = options[:failure_code] || :unauthorized + + context "should allow http basic auth with a key for #{http_method} #{url}" do + context "with a valid HTTP authentication using the API token" do + setup do + @user = User.generate! do |user| + user.admin = true + end + @token = Token.create!(:user => @user, :action => 'api') + send(http_method, url, parameters, credentials(@token.value, 'X')) + end + should_respond_with success_code + should_respond_with_content_type_based_on_url(url) + should_be_a_valid_response_string_based_on_url(url) + should "login as the user" do + assert_equal @user, User.current + end + end + + context "with an invalid HTTP authentication" do + setup do + @user = User.generate! + @token = Token.create!(:user => @user, :action => 'feeds') + send(http_method, url, parameters, credentials(@token.value, 'X')) + end + should_respond_with failure_code + should_respond_with_content_type_based_on_url(url) + should "not login as the user" do + assert_equal User.anonymous, User.current + end + end + end + end + + # Test that a request allows full key authentication + # + # @param [Symbol] http_method the HTTP method for request (:get, :post, :put, :delete) + # @param [String] url the request url, without the key=ZXY parameter + # @param [optional, Hash] parameters additional request parameters + # @param [optional, Hash] options additional options + # @option options [Symbol] :success_code Successful response code (:success) + # @option options [Symbol] :failure_code Failure response code (:unauthorized) + def self.should_allow_key_based_auth(http_method, url, parameters={}, options={}) + success_code = options[:success_code] || :success + failure_code = options[:failure_code] || :unauthorized + + context "should allow key based auth using key=X for #{http_method} #{url}" do + context "with a valid api token" do + setup do + @user = User.generate! do |user| + user.admin = true + end + @token = Token.create!(:user => @user, :action => 'api') + # Simple url parse to add on ?key= or &key= + request_url = if url.match(/\?/) + url + "&key=#{@token.value}" + else + url + "?key=#{@token.value}" + end + send(http_method, request_url, parameters) + end + should_respond_with success_code + should_respond_with_content_type_based_on_url(url) + should_be_a_valid_response_string_based_on_url(url) + should "login as the user" do + assert_equal @user, User.current + end + end + + context "with an invalid api token" do + setup do + @user = User.generate! do |user| + user.admin = true + end + @token = Token.create!(:user => @user, :action => 'feeds') + # Simple url parse to add on ?key= or &key= + request_url = if url.match(/\?/) + url + "&key=#{@token.value}" + else + url + "?key=#{@token.value}" + end + send(http_method, request_url, parameters) + end + should_respond_with failure_code + should_respond_with_content_type_based_on_url(url) + should "not login as the user" do + assert_equal User.anonymous, User.current + end + end + end + + context "should allow key based auth using X-Redmine-API-Key header for #{http_method} #{url}" do + setup do + @user = User.generate! do |user| + user.admin = true + end + @token = Token.create!(:user => @user, :action => 'api') + send(http_method, url, parameters, {'X-Redmine-API-Key' => @token.value.to_s}) + end + should_respond_with success_code + should_respond_with_content_type_based_on_url(url) + should_be_a_valid_response_string_based_on_url(url) + should "login as the user" do + assert_equal @user, User.current + end + end + end + + # Uses should_respond_with_content_type based on what's in the url: + # + # '/project/issues.xml' => should_respond_with_content_type :xml + # '/project/issues.json' => should_respond_with_content_type :json + # + # @param [String] url Request + def self.should_respond_with_content_type_based_on_url(url) + case + when url.match(/xml/i) + should "respond with XML" do + assert_equal 'application/xml', @response.content_type + end + when url.match(/json/i) + should "respond with JSON" do + assert_equal 'application/json', @response.content_type + end + else + raise "Unknown content type for should_respond_with_content_type_based_on_url: #{url}" + end + end + + # Uses the url to assert which format the response should be in + # + # '/project/issues.xml' => should_be_a_valid_xml_string + # '/project/issues.json' => should_be_a_valid_json_string + # + # @param [String] url Request + def self.should_be_a_valid_response_string_based_on_url(url) + case + when url.match(/xml/i) + should_be_a_valid_xml_string + when url.match(/json/i) + should_be_a_valid_json_string + else + raise "Unknown content type for should_be_a_valid_response_based_on_url: #{url}" + end + end + + # Checks that the response is a valid JSON string + def self.should_be_a_valid_json_string + should "be a valid JSON string (or empty)" do + assert(response.body.blank? || ActiveSupport::JSON.decode(response.body)) + end + end + + # Checks that the response is a valid XML string + def self.should_be_a_valid_xml_string + should "be a valid XML string" do + assert REXML::Document.new(response.body) + end + end + + def self.should_respond_with(status) + should "respond with #{status}" do + assert_response status + end + end + end + end +end + +# URL helpers do not work with config.threadsafe! +# https://github.com/rspec/rspec-rails/issues/476#issuecomment-4705454 +ActionView::TestCase::TestController.instance_eval do + helper Rails.application.routes.url_helpers +end +ActionView::TestCase::TestController.class_eval do + def _routes + Rails.application.routes + end +end diff --git a/test/unit/attachmentstype_test.rb b/test/unit/attachmentstype_test.rb index 0dcee4479..3c97e99d0 100644 --- a/test/unit/attachmentstype_test.rb +++ b/test/unit/attachmentstype_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class AttachmentstypeTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class AttachmentstypeTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/contesting_softapplication_test.rb b/test/unit/contesting_softapplication_test.rb index 0c1364caa..a805392f0 100644 --- a/test/unit/contesting_softapplication_test.rb +++ b/test/unit/contesting_softapplication_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class ContestingSoftapplicationTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class ContestingSoftapplicationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/contestnotification_test.rb b/test/unit/contestnotification_test.rb index 22b8113c7..efff724e9 100644 --- a/test/unit/contestnotification_test.rb +++ b/test/unit/contestnotification_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class ContestnotificationTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class ContestnotificationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/course_infos_test.rb b/test/unit/course_infos_test.rb index f20a519db..9e91da1ae 100644 --- a/test/unit/course_infos_test.rb +++ b/test/unit/course_infos_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class CourseInfosTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class CourseInfosTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/course_status_test.rb b/test/unit/course_status_test.rb index 6c8fc11be..6ef9d4591 100644 --- a/test/unit/course_status_test.rb +++ b/test/unit/course_status_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class CourseStatusTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class CourseStatusTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/forum_test.rb b/test/unit/forum_test.rb index a6f90e493..a1891bcd2 100644 --- a/test/unit/forum_test.rb +++ b/test/unit/forum_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class ForumTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class ForumTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/helpers/applied_project_helper_test.rb b/test/unit/helpers/applied_project_helper_test.rb index 6ed46c9d2..836e5366d 100644 --- a/test/unit/helpers/applied_project_helper_test.rb +++ b/test/unit/helpers/applied_project_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class AppliedProjectHelperTest < ActionView::TestCase -end +require 'test_helper' + +class AppliedProjectHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/apply_project_masters_helper_test.rb b/test/unit/helpers/apply_project_masters_helper_test.rb index f1fbe853b..8af91755e 100644 --- a/test/unit/helpers/apply_project_masters_helper_test.rb +++ b/test/unit/helpers/apply_project_masters_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class ApplyProjectMastersHelperTest < ActionView::TestCase -end +require 'test_helper' + +class ApplyProjectMastersHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/attachment_type_edit_helper_test.rb b/test/unit/helpers/attachment_type_edit_helper_test.rb index d54aa165a..ae3015a6e 100644 --- a/test/unit/helpers/attachment_type_edit_helper_test.rb +++ b/test/unit/helpers/attachment_type_edit_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class AttachmentTypeEditHelperTest < ActionView::TestCase -end +require 'test_helper' + +class AttachmentTypeEditHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/contestnotifications_helper_test.rb b/test/unit/helpers/contestnotifications_helper_test.rb index d79755d82..e4dc64783 100644 --- a/test/unit/helpers/contestnotifications_helper_test.rb +++ b/test/unit/helpers/contestnotifications_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class ContestnotificationsHelperTest < ActionView::TestCase -end +require 'test_helper' + +class ContestnotificationsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/courses_helper_test.rb b/test/unit/helpers/courses_helper_test.rb index 829ae701e..4c1e60785 100644 --- a/test/unit/helpers/courses_helper_test.rb +++ b/test/unit/helpers/courses_helper_test.rb @@ -1,12 +1,12 @@ -require File.expand_path('../../../test_helper', __FILE__) - -class CoursesHelperTest < ActionView::TestCase - include CoursesHelper - # test "test truth" do - # @project = Project.find_by_id 6834 - # teacherNum = teacherCount @project - # studentNum = studentCount @project - # assert_equal 1, teacherNum - # assert_equal 5, studentNum - # end -end +require File.expand_path('../../../test_helper', __FILE__) + +class CoursesHelperTest < ActionView::TestCase + include CoursesHelper + # test "test truth" do + # @project = Project.find_by_id 6834 + # teacherNum = teacherCount @project + # studentNum = studentCount @project + # assert_equal 1, teacherNum + # assert_equal 5, studentNum + # end +end diff --git a/test/unit/helpers/forums_helper_test.rb b/test/unit/helpers/forums_helper_test.rb index deebfb03b..36fdf1b4f 100644 --- a/test/unit/helpers/forums_helper_test.rb +++ b/test/unit/helpers/forums_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class ForumsHelperTest < ActionView::TestCase -end +require 'test_helper' + +class ForumsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/memos_helper_test.rb b/test/unit/helpers/memos_helper_test.rb index 44a7038ef..35f934f37 100644 --- a/test/unit/helpers/memos_helper_test.rb +++ b/test/unit/helpers/memos_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class MemosHelperTest < ActionView::TestCase -end +require 'test_helper' + +class MemosHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/no_uses_helper_test.rb b/test/unit/helpers/no_uses_helper_test.rb index 405921005..e2c3bfe8e 100644 --- a/test/unit/helpers/no_uses_helper_test.rb +++ b/test/unit/helpers/no_uses_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class NoUsesHelperTest < ActionView::TestCase -end +require 'test_helper' + +class NoUsesHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/notificationcomments_helper_test.rb b/test/unit/helpers/notificationcomments_helper_test.rb index ecec0cbde..6caa00ba6 100644 --- a/test/unit/helpers/notificationcomments_helper_test.rb +++ b/test/unit/helpers/notificationcomments_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class NotificationcommentsHelperTest < ActionView::TestCase -end +require 'test_helper' + +class NotificationcommentsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/open_source_projects_helper_test.rb b/test/unit/helpers/open_source_projects_helper_test.rb index 8ecd58615..2cf724164 100644 --- a/test/unit/helpers/open_source_projects_helper_test.rb +++ b/test/unit/helpers/open_source_projects_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class OpenSourceProjectsHelperTest < ActionView::TestCase -end +require 'test_helper' + +class OpenSourceProjectsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/school_helper_test.rb b/test/unit/helpers/school_helper_test.rb index d571ccae9..92c7717c1 100644 --- a/test/unit/helpers/school_helper_test.rb +++ b/test/unit/helpers/school_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class SchoolHelperTest < ActionView::TestCase -end +require 'test_helper' + +class SchoolHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/softapplications_helper_test.rb b/test/unit/helpers/softapplications_helper_test.rb index ad8173602..b1bdc5d35 100644 --- a/test/unit/helpers/softapplications_helper_test.rb +++ b/test/unit/helpers/softapplications_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class SoftapplicationsHelperTest < ActionView::TestCase -end +require 'test_helper' + +class SoftapplicationsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/stores_helper_test.rb b/test/unit/helpers/stores_helper_test.rb index 01b1643a7..e4e4978d4 100644 --- a/test/unit/helpers/stores_helper_test.rb +++ b/test/unit/helpers/stores_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class StoresHelperTest < ActionView::TestCase -end +require 'test_helper' + +class StoresHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/test_helper_test.rb b/test/unit/helpers/test_helper_test.rb index 158276d03..d52b57cb2 100644 --- a/test/unit/helpers/test_helper_test.rb +++ b/test/unit/helpers/test_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class TestHelperTest < ActionView::TestCase -end +require 'test_helper' + +class TestHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/zipdown_helper_test.rb b/test/unit/helpers/zipdown_helper_test.rb index ca30cb362..ea7e54cfb 100644 --- a/test/unit/helpers/zipdown_helper_test.rb +++ b/test/unit/helpers/zipdown_helper_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' - -class ZipdownHelperTest < ActionView::TestCase -end +require 'test_helper' + +class ZipdownHelperTest < ActionView::TestCase +end diff --git a/test/unit/join_in_contest_test.rb b/test/unit/join_in_contest_test.rb index 3d27c1a90..9d0d6b6f0 100644 --- a/test/unit/join_in_contest_test.rb +++ b/test/unit/join_in_contest_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class JoinInContestTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class JoinInContestTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/journal_reply_test.rb b/test/unit/journal_reply_test.rb index 500f11a6f..5e696a520 100644 --- a/test/unit/journal_reply_test.rb +++ b/test/unit/journal_reply_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class JournalReplyTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class JournalReplyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/memo_test.rb b/test/unit/memo_test.rb index 659a1585b..2eb11fab2 100644 --- a/test/unit/memo_test.rb +++ b/test/unit/memo_test.rb @@ -1,17 +1,17 @@ -# encoding: utf-8 -require 'test_helper' - -class MemoTest < ActiveSupport::TestCase - test "the truth" do - assert true - end - - def test_the_truth - assert true - end - - test "should not save memo without content" do - memo = Memo.new - assert !memo.save, "assert, save memo without content." - end -end +# encoding: utf-8 +require 'test_helper' + +class MemoTest < ActiveSupport::TestCase + test "the truth" do + assert true + end + + def test_the_truth + assert true + end + + test "should not save memo without content" do + memo = Memo.new + assert !memo.save, "assert, save memo without content." + end +end diff --git a/test/unit/no_use_test.rb b/test/unit/no_use_test.rb index 4e4e903de..bcb664109 100644 --- a/test/unit/no_use_test.rb +++ b/test/unit/no_use_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class NoUseTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class NoUseTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/notificationcomments_test.rb b/test/unit/notificationcomments_test.rb index 798084efb..1a3dc1c4f 100644 --- a/test/unit/notificationcomments_test.rb +++ b/test/unit/notificationcomments_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class NotificationcommentsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class NotificationcommentsTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/open_source_project_test.rb b/test/unit/open_source_project_test.rb index db44aad6e..cfb15f13d 100644 --- a/test/unit/open_source_project_test.rb +++ b/test/unit/open_source_project_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class OpenSourceProjectTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class OpenSourceProjectTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/poll_answers_test.rb b/test/unit/poll_answers_test.rb index ce8f558f4..1814af84b 100644 --- a/test/unit/poll_answers_test.rb +++ b/test/unit/poll_answers_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class PollAnswersTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class ApplyProjectMasterTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/poll_questions_test.rb b/test/unit/poll_questions_test.rb index bbe79ea40..c03331c04 100644 --- a/test/unit/poll_questions_test.rb +++ b/test/unit/poll_questions_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class PollQuestionsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class AppliedProjectTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/poll_user_test.rb b/test/unit/poll_user_test.rb index 7dab4b63f..397e4b75f 100644 --- a/test/unit/poll_user_test.rb +++ b/test/unit/poll_user_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class PollUserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class BugToOspTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/polls_test.rb b/test/unit/polls_test.rb index 5217817bb..8fa69767b 100644 --- a/test/unit/polls_test.rb +++ b/test/unit/polls_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class PollsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class SchoolControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/relative_memo_test.rb b/test/unit/relative_memo_test.rb index 5f835a2a8..ffcfd75fc 100644 --- a/test/unit/relative_memo_test.rb +++ b/test/unit/relative_memo_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class RelativeMemoTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class RelativeMemoTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/relative_memo_to_open_source_project_test.rb b/test/unit/relative_memo_to_open_source_project_test.rb new file mode 100644 index 000000000..5f8d21ecc --- /dev/null +++ b/test/unit/relative_memo_to_open_source_project_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class RelativeMemoToOpenSourceProjectTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/school_test.rb b/test/unit/school_test.rb index e86105ea2..b727f63fb 100644 --- a/test/unit/school_test.rb +++ b/test/unit/school_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class SchoolTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class SchoolTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/softapplication_test.rb b/test/unit/softapplication_test.rb index b3872eec5..7aba49a42 100644 --- a/test/unit/softapplication_test.rb +++ b/test/unit/softapplication_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class SoftapplicationTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class SoftapplicationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/user_score_details_test.rb b/test/unit/user_score_details_test.rb index 657a9c2f7..1791c56b7 100644 --- a/test/unit/user_score_details_test.rb +++ b/test/unit/user_score_details_test.rb @@ -1,7 +1,7 @@ -require 'test_helper' - -class UserScoreDetailsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end +require 'test_helper' + +class UserScoreDetailsTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/tmp/plugins/README b/tmp/plugins/README new file mode 100644 index 000000000..51e6629f2 --- /dev/null +++ b/tmp/plugins/README @@ -0,0 +1 @@ +Put your Redmine plugins here.