diff --git a/1234567 b/1234567 deleted file mode 100644 index 08de77ab4..000000000 --- a/1234567 +++ /dev/null @@ -1 +0,0 @@ -{"access_token":"bFlabz0uBcoIBfWL7nBJkgpl26aOWDy-dyCOvH_MjUo_hMOOKG83WV1cCL1MG6H-AE-6eMI0iyLoOoAMv9Y3pFFsLYD-GAGr3UH9fT8OqeHMDlFhXyRTvHv9l2QPHGpcARUcCGANEH","expires_in":7200,"got_token_at":1462934760} \ No newline at end of file diff --git a/Gemfile.lock~ b/Gemfile.lock~ new file mode 100644 index 000000000..7d6563465 --- /dev/null +++ b/Gemfile.lock~ @@ -0,0 +1,386 @@ +GIT + remote: http://github.com/guange2015/wechat.git + revision: a18c3d6603cb1aa7bd1fe887b17f67426be01f35 + specs: + wechat (0.7.1) + activerecord (>= 3.2, < 5.1.x) + http (~> 1.0, >= 1.0.1) + nokogiri (>= 1.6.0) + thor + +PATH + remote: lib/gitlab-cli + specs: + gitlab (3.2.0) + httparty + terminal-table + +PATH + remote: lib/grack + specs: + grack (2.0.2) + rack (~> 1.4.5) + +PATH + remote: lib/rails_kindeditor + specs: + rails_kindeditor (0.4.5) + carrierwave + mini_magick + +GEM + remote: https://ruby.taobao.org/ + specs: + actionmailer (3.2.22.2) + actionpack (= 3.2.22.2) + mail (~> 2.5.4) + actionpack (3.2.22.2) + activemodel (= 3.2.22.2) + activesupport (= 3.2.22.2) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.5) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.2.1) + activemodel (3.2.22.2) + activesupport (= 3.2.22.2) + builder (~> 3.0.0) + activerecord (3.2.22.2) + activemodel (= 3.2.22.2) + activesupport (= 3.2.22.2) + arel (~> 3.0.2) + tzinfo (~> 0.3.29) + activeresource (3.2.22.2) + activemodel (= 3.2.22.2) + activesupport (= 3.2.22.2) + activesupport (3.2.22.2) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + acts-as-taggable-on (2.4.1) + rails (>= 3, < 5) + addressable (2.4.0) + ansi (1.5.0) + arel (3.0.3) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + better_errors (1.1.0) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + builder (3.0.0) + byebug (8.2.2) + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + chinese_pinyin (1.0.0) + climate_control (0.0.3) + activesupport (>= 3.0) + cocaine (0.5.8) + climate_control (>= 0.0.3, < 1.0) + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + daemons (1.2.3) + debug_inspector (0.0.2) + delayed_job (4.1.1) + activesupport (>= 3.0, < 5.0) + delayed_job_active_record (4.1.0) + activerecord (>= 3.0, < 5) + delayed_job (>= 3.0, < 5) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + diff-lcs (1.2.5) + domain_name (0.5.20160216) + unf (>= 0.0.5, < 1.0.0) + elasticsearch (1.0.15) + elasticsearch-api (= 1.0.15) + elasticsearch-transport (= 1.0.15) + elasticsearch-api (1.0.15) + multi_json + elasticsearch-model (0.1.8) + activesupport (> 3) + elasticsearch (> 0.4) + hashie + elasticsearch-rails (0.1.8) + elasticsearch-transport (1.0.15) + faraday + multi_json + equalizer (0.0.11) + erubis (2.7.0) + execjs (2.6.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + fastercsv (1.5.5) + grape (0.9.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + grape-swagger (0.10.4) + grape (>= 0.8.0) + grape-entity (< 0.5.0) + hashie (3.4.3) + hike (1.2.3) + htmlentities (4.3.4) + http (1.0.2) + addressable (~> 2.3) + http-cookie (~> 1.0) + http-form_data (~> 1.0.1) + http_parser.rb (~> 0.6.0) + http-cookie (1.0.2) + domain_name (~> 0.5) + http-form_data (1.0.1) + http_parser.rb (0.6.0) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + i18n (0.6.11) + ice_nine (0.11.2) + iconv (1.0.4) + journey (1.0.4) + jquery-rails (2.0.3) + railties (>= 3.1.0, < 5.0) + thor (~> 0.14) + json (1.8.3) + kaminari (0.16.3) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + libv8 (3.16.14.13) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + method_source (0.8.2) + mime-types (1.25.1) + mini_magick (4.4.0) + mini_portile2 (2.0.0) + multi_json (1.11.2) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.18) + net-ldap (0.3.1) + netrc (0.11.0) + nokogiri (1.6.7.2) + mini_portile2 (~> 2.0.0.rc2) + paperclip (3.5.4) + activemodel (>= 3.0.0) + activesupport (>= 3.0.0) + cocaine (~> 0.5.3) + mime-types + polyglot (0.3.5) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-byebug (3.3.0) + byebug (~> 8.0) + pry (~> 0.10) + pry-rails (0.3.4) + pry (>= 0.9.10) + pry-stack_explorer (0.4.9.2) + binding_of_caller (>= 0.7) + pry (>= 0.9.11) + rack (1.4.7) + rack-accept (0.4.5) + rack (>= 0.4) + rack-cache (1.6.1) + rack (>= 0.4) + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-openid (1.4.2) + rack (>= 1.1.0) + ruby-openid (>= 2.1.8) + rack-raw-upload (1.1.1) + multi_json + rack-ssl (1.3.4) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (3.2.22.2) + actionmailer (= 3.2.22.2) + actionpack (= 3.2.22.2) + activerecord (= 3.2.22.2) + activeresource (= 3.2.22.2) + activesupport (= 3.2.22.2) + bundler (~> 1.0) + railties (= 3.2.22.2) + railties (3.2.22.2) + actionpack (= 3.2.22.2) + activesupport (= 3.2.22.2) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (>= 0.14.6, < 2.0) + rake (10.5.0) + rdoc (3.12.2) + json (~> 1.4) + redis (3.2.2) + redis-actionpack (3.2.4) + actionpack (~> 3.2.0) + redis-rack (~> 1.4.4) + redis-store (~> 1.1.4) + redis-activesupport (3.2.5) + activesupport (~> 3.2.0) + redis-store (~> 1.1.0) + redis-rack (1.4.4) + rack (~> 1.4.0) + redis-store (~> 1.1.4) + redis-rails (3.2.4) + redis-actionpack (~> 3.2.4) + redis-activesupport (~> 3.2.4) + redis-store (~> 1.1.4) + redis-store (1.1.7) + redis (>= 2.2) + ref (2.0.0) + rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) + rich (1.4.6) + jquery-rails + kaminari + mime-types + paperclip + rack-raw-upload + rails (>= 3.2.0) + sass-rails + rspec-core (3.4.3) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-mocks (3.4.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-rails (3.4.2) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) + ruby-ole (1.2.12) + ruby-openid (2.1.8) + rubyzip (1.2.0) + sass (3.4.21) + sass-rails (3.2.6) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) + seems_rateable (1.0.13) + jquery-rails + rails + slop (3.6.0) + spreadsheet (1.1.1) + ruby-ole (>= 1.0) + sprockets (2.2.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + terminal-table (1.5.2) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref + thor (0.19.1) + thread_safe (0.3.5) + tilt (1.4.1) + treetop (1.4.15) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.46) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + +PLATFORMS + ruby + +DEPENDENCIES + acts-as-taggable-on (= 2.4.1) + ansi + better_errors (~> 1.1.0) + binding_of_caller + builder (= 3.0.0) + chinese_pinyin + coderay (~> 1.1.0) + coffee-rails (~> 3.2.1) + daemons + delayed_job_active_record + elasticsearch-model + elasticsearch-rails + factory_girl_rails + fastercsv (~> 1.5.0) + gitlab! + grack! + grape (~> 0.9.0) + grape-entity + grape-swagger + htmlentities + i18n (~> 0.6.0) + iconv + jquery-rails (~> 2.0.2) + kaminari + mysql2 (= 0.3.18) + net-ldap (~> 0.3.1) + paperclip (~> 3.5.4) + pry-byebug + pry-rails + pry-stack_explorer + rack-cors + rack-openid + rails (~> 3.2) + rails_kindeditor! + redis-rails + rest-client + rich (= 1.4.6) + rspec-rails (~> 3.0) + ruby-ole + ruby-openid (~> 2.1.4) + rubyzip + sass-rails (~> 3.2.3) + seems_rateable (~> 1.0.13) + spreadsheet + therubyracer + uglifier (>= 1.0.3) + wechat! + +BUNDLED WITH + 1.10.6 diff --git a/Gemfile~ b/Gemfile~ new file mode 100644 index 000000000..24869e72b --- /dev/null +++ b/Gemfile~ @@ -0,0 +1,112 @@ +source 'http://rubygems.org/' +### 这里执行bundle config mirror.https://rubygems.org https://gems.ruby-china.org 切换到ruby-china源 + +unless RUBY_PLATFORM =~ /w32/ + # unix-like only + gem 'iconv' +end + +gem 'certified' + +gem 'wechat',path: 'lib/wechat' +gem 'grack', path:'lib/grack' +gem 'gitlab', path: 'lib/gitlab-cli' +gem 'rest-client' +gem "mysql2", "= 0.3.18" +gem 'redis-rails' +gem 'rubyzip' +gem 'delayed_job_active_record'#, :group => :production +gem 'daemons' +gem 'grape', '~> 0.9.0' +gem 'grape-entity' +gem 'rack-cors', :require => 'rack/cors' +gem 'seems_rateable', '~> 1.0.13' +gem 'rails', '~> 3.2' +gem "jquery-rails", "~> 2.0.2" +gem "i18n", "~> 0.6.0" +gem 'coderay', '~> 1.1.0' +gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] +gem "builder", "3.0.0" +gem 'acts-as-taggable-on', '2.4.1' +gem 'spreadsheet' +gem 'ruby-ole' +gem 'rails_kindeditor',path:'lib/rails_kindeditor' +#gem "rmagick", ">= 2.0.0" +gem 'binding_of_caller' +gem 'chinese_pinyin' +# gem 'sunspot_rails', '~> 1.3.3' +# gem 'sunspot_solr' +# gem 'sunspot' +# gem 'progress_bar' +gem 'ansi' + +gem 'kaminari' +gem 'elasticsearch-model' +gem 'elasticsearch-rails' + + +### profile +#gem 'oneapm_rpm' + +group :development do + gem 'grape-swagger' + gem 'better_errors', '~> 1.1.0' + # gem "query_reviewer" + # gem 'rack-mini-profiler', '~> 0.9.3' + if RUBY_PLATFORM =~ /w32/ + gem 'win32console' + end +end + +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' + if RUBY_PLATFORM =~ /darwin/ + gem 'puma' + end + end + + gem 'rspec-rails', '~> 3.0' + gem 'factory_girl_rails' +end + +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + + # See https://github.com/sstephenson/execjs#readme for more supported runtimes + gem 'therubyracer', :platforms => :ruby + + gem 'uglifier', '>= 1.0.3' +end + +# Optional gem for LDAP authentication +group :ldap do + gem "net-ldap", "~> 0.3.1" +end + + +# Optional gem for OpenID authentication +group :openid do + gem "ruby-openid", "~> 2.1.4", :require => "openid" + gem "rack-openid" +end + + +database_file = File.join(File.dirname(__FILE__), "config/database.yml") +if File.exist?(database_file) +else + warn("Please configure your config/database.yml first") +end + +# Load plugins' Gemfiles +Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| + puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(file) +end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 3eab332a7..3ba82bcb9 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -84,7 +84,7 @@ module Mobile elsif ac.container_type == "Project" case ac.act_type when "Issue" - "椤圭洰缂洪櫡" + "椤圭洰闂" when "Message" "椤圭洰璁ㄨ鍖" when "Project" diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb index fe16385f4..5b29565ad 100644 --- a/app/controllers/at_controller.rb +++ b/app/controllers/at_controller.rb @@ -68,7 +68,7 @@ class AtController < ApplicationController end def find_project(id) - return [] if id<0 + return [] if id.to_i<0 at_persons = Project.find(id).users at_persons.delete_if { |u| u.id == User.current.id } end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 1478bceae..17f62f18c 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -341,7 +341,7 @@ class CoursesController < ApplicationController def export_course_member_excel @all_members = student_homework_score(0,0,0,"desc") - @homeworks = @course.homework_commons.order("created_at asc") + @homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at asc") filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}"; respond_to do |format| @@ -1177,7 +1177,7 @@ class CoursesController < ApplicationController AND homework_commons.course_id = #{@course.id} AND student_works.user_id = members.user_id ) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 + - resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id + resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id ) AS act_score FROM members JOIN students_for_courses @@ -1191,7 +1191,7 @@ class CoursesController < ApplicationController AND homework_commons.course_id = #{@course.id} AND student_works.user_id = members.user_id ) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 + - resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id + resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id ) AS act_score FROM members JOIN students_for_courses diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index cf94da8d9..7ec796b61 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -256,6 +256,13 @@ class FilesController < ApplicationController @order = "" @is_remote = false if params[:project_id] + # 鏇存柊璧勬簮鐢宠娑堟伅涓哄凡璇 + # ar_ids = ApplyResource.where("user_id =? and container_id =? and container_type =?", User.current.id, params[:project_id].to_i, "Project").map{|ar| ar.id} + # cms = CourseMessage.where("course_message_type =? and user_id =? and course_message_id in (#{ar_ids.empty? ? '0': ar_ids.join(',')})", "ApplyResource", User.current.id) + # cms.each do |cm| + # cm.update_column(:viewed, true) + # end + # over @page = params[:page] ? params[:page].to_i + 1 : 2 @container_type = 0 if params[:sort] diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb index c6047d227..02e74237a 100644 --- a/app/controllers/org_document_comments_controller.rb +++ b/app/controllers/org_document_comments_controller.rb @@ -102,13 +102,15 @@ class OrgDocumentCommentsController < ApplicationController end def destroy - @org_document_comment = OrgDocumentComment.find(params[:id]) - org = @org_document_comment.organization - if @org_document_comment.id == org.home_id - org.update_attributes(:home_id => nil) - end - if @org_document_comment.destroy - end + @org_document_comment = SubDocumentComment.find(params[:id]) + @sub_domain = @org_document_comment.sub_domain + @org_subfield = @sub_domain.org_subfield + # org = @org_document_comment.organization + # if @org_document_comment.id == org.home_id + # org.update_attributes(:home_id => nil) + # end + @org_document_comment.destroy + # end respond_to do |format| format.js end diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 1946378ef..3ab62bbea 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -164,7 +164,7 @@ class OrganizationsController < ApplicationController return end q = params[:search].nil? ? "" : "#{params[:search].strip}" - @field = OrgSubfield.find(params[:org_subfield_id]) + @field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id]) @type = params[:type] if @type == "courses" || @type.nil? @org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 1d7b4117d..e4cf31f55 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -423,9 +423,13 @@ class PollController < ApplicationController # 灏嗗叾浠栧湴鏂圭殑闂嵎瀵煎嚭鏉 def other_poll # 鏌ヤ綔鑰呮槸鎴戯紝鎴栬呬綔鑰呮槸褰撳墠璇剧▼鐨勮佸笀锛屼笖涓嶅湪褰撳墠璇剧▼鍐呯殑闂嵎 杩涜瀵煎叆 - tea_ids = '(' - tea_ids << Course.find(params[:polls_group_id]).tea_id.to_s << ','<< User.current.id.to_s << ')' - @polls = Poll.where("user_id in #{tea_ids} and polls_type = 'course' and polls_group_id != #{params[:polls_group_id]}") + courses = User.current.courses.select { |course| User.current.allowed_to?(:as_teacher,course)} + course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")" + none_courses = User.current.courses.where("is_delete = 1 or #{Course.table_name}.id = #{params[:polls_group_id].to_i}") + none_course_ids = none_courses.empty? ? "(-1)" : "(" + none_courses.map { |course| course.id}.join(',') + ")" + #tea_ids = '(' + #tea_ids << Course.find(params[:polls_group_id]).tea_id.to_s << ','<< User.current.id.to_s << ')' + @polls = Poll.where("(user_id = #{User.current.id} or polls_group_id in #{course_ids}) and polls_type = 'course' and polls_group_id not in #{none_course_ids}") @polls_group_id = params[:polls_group_id] respond_to do |format| format.js diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 4a148bb8b..531f0cb90 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -362,6 +362,8 @@ update # project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT # ip = RepositoriesHelper::REPO_IP_ADDRESS gitlab_address = Redmine::Configuration['gitlab_address'] + # REDO:闇浼樺寲锛屼粎娴嬭瘯鐢 + @zip_path = gitlab_address.to_s + "/api/v3/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=YTyCv4978MXmdL2B9C62" if @repository.type.to_s == "Repository::Gitlab" @repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git" else diff --git a/app/controllers/ssos_controller.rb b/app/controllers/ssos_controller.rb index 1e1bd932b..9a5042c50 100644 --- a/app/controllers/ssos_controller.rb +++ b/app/controllers/ssos_controller.rb @@ -27,8 +27,10 @@ class SsosController < ApplicationController ## 鍔犲叆缁勭粐 @organization = Organization.find(82) unless @organization.org_members.exists?(user_id: sso.user_id) - member = OrgMember.new(:user_id => sso.user_id) + member = OrgMember.create(:user_id => sso.user_id, :created_at => Time.now) + # member = OrgMember.new(:user_id => sso.user_id) @organization.org_members << member + OrgMemberRole.create(:org_member_id => member.id, :role_id => 12) end ## 閫夋嫨鎬ц烦杞 @@ -55,10 +57,7 @@ class SsosController < ApplicationController end def parse(auth) - crypted_str = Base64.decode64(base64_safe(auth)) - pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key"))) - content = pkey.private_decrypt(crypted_str,OpenSSL::PKey::RSA::PKCS1_PADDING) - # content = pkey.private_decrypt(crypted_str) + content = decrypt(auth) ActiveSupport::JSON.decode(content) end @@ -68,4 +67,20 @@ class SsosController < ApplicationController sso end + def decrypt(auth) + crypted_str = Base64.decode64(base64_safe(auth)) + pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key"))) + + #to large + max_dec_len = 1024/8 + size = (crypted_str.size + max_dec_len-1) / max_dec_len + + content = '' + size.times do |time| + tmps = crypted_str[time*max_dec_len, max_dec_len] + content += pkey.private_decrypt(tmps,OpenSSL::PKey::RSA::PKCS1_PADDING) + end + content + end + end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index c3d7dbbc6..f518f81da 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -81,6 +81,7 @@ class StudentWorkController < ApplicationController #鏍规嵁浼犲叆鐨則Index纭畾鏄鍑犳娴嬭瘯 #涔嬪悗濡傛灉瑙夊緱寰堝崱 鍙互鏀规垚灏嗙粨鏋滀紶鍥濲S鍐嶄互鍙傛暟褰㈠紡浼犲洖鏉 def program_test_ex + tStarttime = Time.now is_test = params[:is_test] == 'true' @@ -106,106 +107,123 @@ class StudentWorkController < ApplicationController tEndtime = Time.now tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 logger.debug "program_test_ex user wait time = #{tUsedtime} 姣" - - #status 0:绛旀姝g‘ -3http瓒呮椂 -2:缂栬瘧閿欒 -1:绛旀閿欒 2:绋嬪簭杩愯瓒呮椂 + #status 0:绛旀姝g‘ -5program_test_ex 鍑芥暟鍑洪敊 -4judge浠g爜鍑洪敊 -3http瓒呮椂 -2:缂栬瘧閿欒 -1:绛旀閿欒 2:绋嬪簭杩愯瓒呮椂 + resultObj[:status] = -3 CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id) - - end - if result["status"].to_i != -2 - #result["results"].first['output'] = result["results"].first['output'].gsub(" ","鈻") - #result["results"].first['result'] = result["results"].first['result'].gsub(" ","鈻") - space_replace_1(result["results"].first['output']) - space_replace_1(result["results"].first['result']) + rescue + #-4 judge浠g爜 鍑洪敊 + logger.debug "program_test_error 1" + resultObj[:status] = -4 + tmpstatus = -4 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id) end - logger.debug result + begin + if resultObj[:status] != -3 && resultObj[:status] != -4 + if result["status"].to_i != -2 + #result["results"].first['output'] = result["results"].first['output'].gsub(" ","鈻") + #result["results"].first['result'] = result["results"].first['result'].gsub(" ","鈻") + space_replace_1(result["results"].first['output']) + space_replace_1(result["results"].first['result']) + end - #-1 榛樿鍊 0鍏ㄩ儴姝g‘骞剁粨鏉 2 瓒呮椂 -2 缂栬瘧閿欒 - resultObj[:status] = -1 - resultObj[:results] = result["results"].first #鏈娴嬭瘯缁撴灉 - result["error_msg"] = result["error_msg"][0..2047] - resultObj[:error_msg] = result["error_msg"] #缂栬瘧閿欒鏃剁殑淇℃伅 + logger.debug result - #璇ョ姸鎬佺敤浜庡瓨鍏odeTests - tmpstatus = -1 - if result["status"].to_i == -2 #缂栬瘧閿欒 - resultObj[:results] = result["error_msg"] - resultObj[:status] = -2 - tmpstatus = -2 - elsif result["results"][0]["status"].to_i == 2 - resultObj[:status] = 2 - tmpstatus = 2 - end + #-1 榛樿鍊 0鍏ㄩ儴姝g‘骞剁粨鏉 2 瓒呮椂 -2 缂栬瘧閿欒 + resultObj[:status] = -1 + resultObj[:results] = result["results"].first #鏈娴嬭瘯缁撴灉 + if result["status"].to_i == -2 #缂栬瘧閿欒 + result["error_msg"] = result["error_msg"][0..2047] + end + resultObj[:error_msg] = result["error_msg"] #缂栬瘧閿欒鏃剁殑淇℃伅 - if result["status"] == 0 - tmpstatus = 0 - end + #璇ョ姸鎬佺敤浜庡瓨鍏odeTests + tmpstatus = -1 + if result["status"].to_i == -2 #缂栬瘧閿欒 + resultObj[:results] = result["error_msg"] + resultObj[:status] = -2 + tmpstatus = -2 + elsif result["results"][0]["status"].to_i == 2 + resultObj[:status] = 2 + tmpstatus = 2 + end - unless student_work.save - resultObj[:status] = 200 - else - student_work.name = params[:title] - student_work.description = params[:src] + if result["status"] == 0 + tmpstatus = 0 + end - if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = @homework.late_penalty - else - student_work.late_penalty = 0 - end + unless student_work.save + resultObj[:status] = 200 + else + student_work.name = params[:title] + student_work.description = params[:src] - #姣忔浠庢暟鎹簱鍙栧嚭涓婃鐨勭粨鏋滃姞涓婃湰娆$殑缁撴灉鍐嶅瓨鍏ユ暟鎹簱 - if result["status"].to_i != -2 - result["results"].first['user_wait'] = tUsedtime + if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") + student_work.late_penalty = @homework.late_penalty + else + student_work.late_penalty = 0 + end - if result["results"][0]["status"].to_i == 2 - result["status"] = 2 + #姣忔浠庢暟鎹簱鍙栧嚭涓婃鐨勭粨鏋滃姞涓婃湰娆$殑缁撴灉鍐嶅瓨鍏ユ暟鎹簱 + if result["status"].to_i != -2 + result["results"].first['user_wait'] = tUsedtime + + if result["results"][0]["status"].to_i == 2 + result["status"] = 2 + end + end + + status = result["status"] + if index == 1 + student_work_test = student_work.student_work_tests.build(status: status, + results: [resultObj[:results]],src: params[:src]) + student_work_test.save! + resultObj[:testid] = student_work_test.id + else + #鍏堜粠鏁版嵁搴撳彇鍑簉esult + student_work_test = StudentWorkTest.find(params[:testid]) + results = student_work_test.results + results << resultObj[:results] + student_work_test.results = results + student_work_test.status = (result["status"] != 0 ? result["status"] : student_work_test.status) + student_work_test.save! + status = student_work_test.status + resultObj[:testid] = student_work_test.id + end + + #瓒呮椂鎴栫紪璇戦敊璇垯鐩存帴杩斿洖浜嗗苟瀛樺叆鏁版嵁搴 + if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size + if status == 0 + resultObj[:status] = 0 + end + student_work.save! + resultObj[:time] = student_work_test.created_at.to_s(:db) + resultObj[:index] = student_work.student_work_tests.count + end + + #灏嗘瘡娆$敤鎴风瓑寰呮椂闂撮兘瀛樿捣鏉ヤ互渚跨鐞嗙晫闈㈡樉绀虹敤 + tEndtime = Time.now + tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 + logger.debug "program_test_ex user wait time = #{tUsedtime} 姣" + + time_used = 0 + if result["status"].to_i != -2 + #鑷冲皯涓姣 + time_used = result["results"].first['time_used'] == 0 ? 1:result["results"].first['time_used'] + end + #0:绛旀姝g‘ -3http瓒呮椂 -2:缂栬瘧閿欒 -1:绛旀閿欒 2:绋嬪簭杩愯瓒呮椂 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>time_used,:wait_time=>tUsedtime,:student_work_id=>student_work.id) end end - - status = result["status"] - if index == 1 - student_work_test = student_work.student_work_tests.build(status: status, - results: [resultObj[:results]],src: params[:src]) - student_work_test.save! - resultObj[:testid] = student_work_test.id - else - #鍏堜粠鏁版嵁搴撳彇鍑簉esult - student_work_test = StudentWorkTest.find(params[:testid]) - results = student_work_test.results - results << resultObj[:results] - student_work_test.results = results - student_work_test.status = (result["status"] != 0 ? result["status"] : student_work_test.status) - student_work_test.save! - status = student_work_test.status - resultObj[:testid] = student_work_test.id - end - - #瓒呮椂鎴栫紪璇戦敊璇垯鐩存帴杩斿洖浜嗗苟瀛樺叆鏁版嵁搴 - if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size - if status == 0 - resultObj[:status] = 0 - end - student_work.save! - resultObj[:time] = student_work_test.created_at.to_s(:db) - resultObj[:index] = student_work.student_work_tests.count - end - - #灏嗘瘡娆$敤鎴风瓑寰呮椂闂撮兘瀛樿捣鏉ヤ互渚跨鐞嗙晫闈㈡樉绀虹敤 - tEndtime = Time.now - tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 - logger.debug "program_test_ex user wait time = #{tUsedtime} 姣" - - time_used = 0 - if result["status"].to_i != -2 - #鑷冲皯涓姣 - time_used = result["results"].first['time_used'] == 0 ? 1:result["results"].first['time_used'] - end - #0:绛旀姝g‘ -3http瓒呮椂 -2:缂栬瘧閿欒 -1:绛旀閿欒 2:绋嬪簭杩愯瓒呮椂 - CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>time_used,:wait_time=>tUsedtime,:student_work_id=>student_work.id) - - #娓叉煋杩斿洖缁撴灉 - render :json => resultObj + rescue + #-5 program_test_ex 鍑芥暟鍑洪敊 + logger.debug "program_test_error 2" + resultObj[:status] = -5 + tmpstatus = -5 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id) end + #娓叉煋杩斿洖缁撴灉 + render :json => resultObj end end end @@ -358,6 +376,7 @@ class StudentWorkController < ApplicationController ################################################################################################################## @order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name] || "",params[:group] @homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc") + @all_homework_commons = @course.homework_commons.order("created_at desc") @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #鏄笉鏄尶璇 @show_all = false diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6f3aa6b18..52fdad2e7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -311,6 +311,28 @@ class UsersController < ApplicationController end end + # 澶勭悊璧勬簮寮曠敤璇锋眰 + # status + def deal_with_apply_resource + @msg = CourseMessage.find(params[:msg_id]) + ar = ApplyResource.where("id = ?", @msg.course_message_id).first + unless ar.nil? + case params[:agree] + when 'Y' + ar.update_column('status', 2) + @msg.update_attributes(:apply_result => 1, :viewed => 1) + ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 2, :status => 1) + when 'N' + ar.update_column('status', 3) + @msg.update_attributes(:apply_result => 2, :viewed => 1) + ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 3, :status => 1) + end + end + respond_to do |format| + format.js + end + end + #澶勭悊寮曠敤浣滀笟鐨勮姹 #status 1 鍚屾剰 2 鎷掔粷 def dealwith_apply_homework @@ -419,6 +441,19 @@ class UsersController < ApplicationController end # end + # 璧勬簮鍒嗕韩璇锋眰寮规 + def apply_resource + if User.current.logged? + @attachment = Attachment.find params[:attachment_id] + @state = 2 + else + @state = 1 + end + respond_to do |format| + format.js + end + end + #寮曠敤浣滀笟璇锋眰寮规 def apply_homework if User.current.logged? @@ -432,6 +467,27 @@ class UsersController < ApplicationController end end + # 鐢宠寮曠敤璧勬簮 + def apply_for_resource + if User.current.logged? + @attachment = Attachment.where("id =?", params[:attachment_id].to_i).first + unless @attachment.nil? + ar = ApplyResource.where("user_id = ? and attachment_id = ?", User.current.id, params[:attacment_id].to_i) + if ar.empty? + ApplyResource.create(:user_id => params[:id].to_i, :attachment_id => params[:attachment_id].to_i, :status => true, :container_id => @attachment.container_id, :container_type => @attachment.container_type, :content => params[:content], :apply_user_id => @attachment.author_id) + @state = 2 + else + @state = 3 + end + end + else + @state = 1 + end + respond_to do |format| + format.js + end + end + #鐢宠寮曠敤闈炲叕寮浣滀笟 def apply_for_homework if User.current.logged? @@ -1886,7 +1942,7 @@ class UsersController < ApplicationController # 灏嗚祫婧愬彂閫佸埌瀵瑰簲鐨勮绋,鍒嗕负鍙戦佸崟涓紝鎴栬呮壒閲忓彂閫 def add_exist_file_to_course @flag = true - if params[:send_id].present? + if params[:send_id].present? send_id = params[:send_id] @ori = Attachment.find_by_id(send_id) course_ids = params[:course_ids] @@ -1933,14 +1989,14 @@ class UsersController < ApplicationController end send_ids.each do |send_id| quotes = 0 - ori = Attachment.find_by_id(send_id) + @ori = Attachment.find_by_id(send_id) unless course_ids.nil? course_ids.each do |id| quotes = 0 - next if ori.blank? + next if @ori.blank? @exist = false Course.find(id).attachments.each do |att| #濡傛灉璇剧▼涓寘鍚璧勬簮 - if att.id == ori.id || (!att.copy_from.nil? && !ori.copy_from.nil? && att.copy_from == ori.copy_from) || att.copy_from == ori.id || att.id == ori.copy_from + if att.id == @ori.id || (!att.copy_from.nil? && !@ori.copy_from.nil? && att.copy_from == @ori.copy_from) || att.copy_from == @ori.id || att.id == @ori.copy_from att.created_on = Time.now att.save @exist = true @@ -1948,21 +2004,21 @@ class UsersController < ApplicationController end end next if @exist - attach_copied_obj = ori.copy - attach_copied_obj.tag_list.add(ori.tag_list) # tag鍏宠仈 + attach_copied_obj = @ori.copy + attach_copied_obj.tag_list.add(@ori.tag_list) # tag鍏宠仈 attach_copied_obj.container = Course.find(id) attach_copied_obj.created_on = Time.now attach_copied_obj.author_id = User.current.id attach_copied_obj.is_public = 0 - attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #鍙戦佽娣诲姞copy_from + attach_copied_obj.copy_from = @ori.copy_from.nil? ? @ori.id : @ori.copy_from #鍙戦佽娣诲姞copy_from if attach_copied_obj.attachtype == nil attach_copied_obj.attachtype = 4 end if attach_copied_obj.save # 鏇存柊寮曠敤娆℃暟 - quotes = ori.quotes.to_i + 1 - ori.update_attribute(:quotes, quotes) unless ori.nil? - ori.forwards << Forward.new(:to_type => attach_copied_obj.class.name, :to_id => attach_copied_obj.id,:created_at => Time.now) + quotes = @ori.quotes.to_i + 1 + @ori.update_attribute(:quotes, quotes) unless @ori.nil? + @ori.forwards << Forward.new(:to_type => attach_copied_obj.class.name, :to_id => attach_copied_obj.id,:created_at => Time.now) end @save_message = attach_copied_obj.errors.full_messages end @@ -2002,6 +2058,18 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @type = params[:type] @limit = 25 @@ -2143,6 +2211,18 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @status = params[:status] @type = params[:type] @@ -2272,6 +2352,18 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @type = params[:type] @limit = 25 @@ -2608,19 +2700,16 @@ class UsersController < ApplicationController # 鑾峰彇鍏叡璧勬簮 def get_public_resources user_course_ids, user_project_ids, order, score - attachments = Attachment.where("(is_publish = 1 and is_public =1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) ").order("#{order.nil? ? 'created_on' : order} #{score}") + attachments = Attachment.where("(is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) ").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鍏叡璧勬簮鎼滅储 def get_public_resources_search user_course_ids, user_project_ids, order, score, search - attachments = Attachment.where("is_publish = 1 and is_public = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course') and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + attachments = Attachment.where("is_publish = 1 and is_public = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑璧勬簮 def get_my_resources author_id, user_course_ids, user_project_ids, order, score - unless author_id.to_i.to_s == author_id - author_id = User.find_by_login(author_id).id - end attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('OrgSubfield','Principal','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" + "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") @@ -2628,7 +2717,6 @@ class UsersController < ApplicationController # 鑾峰彇鎴戠殑璧勬簮鏌ヨ缁撴灉 def get_my_resources_search (author_id, user_course_ids, user_project_ids, order, score, search) - author_id = User.find_by_login(author_id).id @attachments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" + "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}") @@ -2636,15 +2724,23 @@ class UsersController < ApplicationController # 鑾峰彇鎴戠殑璇剧▼璧勬簮 def get_course_resources author_id, user_course_ids, order, score - author_id = User.find_by_login(author_id).id attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") end + # 鑾峰彇鎴戠殑绉佹湁璧勬簮鍒嗕韩缁撴灉 + def get_my_private_resources apply_ids, resource_type, order, score + attachments = Attachment.where("id in (#{apply_ids.empty? ? '0': apply_ids.join(',')}) and container_type in(#{resource_type})").order("#{order.nil? ? 'created_on' : order} #{score}") + end + + # 鑾峰彇鎴戠殑绉佹湁璧勬簮鍒嗕韩鎼滅储缁撴灉 + def get_my_private_resources_search apply_ids, resource_type, order, score, search + attachments = Attachment.where("id in (#{apply_ids.empty? ? '0': apply_ids.join(',')}) and container_type in(#{resource_type}) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + end + # 鑾峰彇鎴戠殑璇剧▼璧勬簮涓悳绱㈢粨鏋 def get_course_resources_search author_id, user_course_ids, order, score, search - author_id = User.find_by_login(author_id).id attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") @@ -2652,17 +2748,16 @@ class UsersController < ApplicationController # 鑾峰彇鍏叡璧勬簮涓绋嬭祫婧 def get_course_resources_public user_course_ids, order, score - attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1 and is_public =1)").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1)").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鍏叡璧勬簮涓绋嬭祫婧愭悳绱㈢粨鏋 def get_course_resources_public_search user_course_ids, order, score, search - attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1 and is_public =1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑椤圭洰璧勬簮 def get_project_resources author_id, user_project_ids, order, score - author_id = User.find_by_login(author_id).id attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+ "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}") @@ -2670,7 +2765,6 @@ class UsersController < ApplicationController # 鑾峰彇鎴戠殑椤圭洰璧勬簮鎼滅储 def get_project_resources_search author_id, user_project_ids, order, score, search - author_id = User.find_by_login(author_id).id attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+ "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") @@ -2678,24 +2772,22 @@ class UsersController < ApplicationController # 鑾峰彇鍏叡璧勬簮鐨勯」鐩祫婧 def get_project_resources_public user_project_ids, order, score - attchments = Attachment.where("container_type = 'Project' and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("container_type = 'Project' and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鍏叡璧勬簮鐨勯」鐩祫婧愭悳绱 def get_project_resources_public_search user_project_ids, order, score, search - attchments = Attachment.where("(container_type = 'Project' and container_id is not null and is_public =1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Project' and container_id is not null) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戜笂浼犵殑闄勪欢 def get_attch_resources author_id, order, score - author_id = User.find_by_login(author_id).id attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue', 'Document','Message','News','StudentWorkScore','HomewCommon'))").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戜笂浼犵殑闄勪欢鎼滅储缁撴灉 def get_attch_resources_search author_id, order, score, search - author_id = User.find_by_login(author_id).id attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue', 'Document','Message','News','StudentWorkScore','HomewCommon')) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") end @@ -2703,35 +2795,33 @@ class UsersController < ApplicationController # 鑾峰彇鍏叡璧勬簮涓垜涓婁紶鐨勯檮浠 def get_attch_resources_public order, score attchments = Attachment.where("container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal') - and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鍏叡璧勬簮涓垜涓婁紶鐨勯檮浠 def get_attch_resources_public_search order, score, search attchments = Attachment.where("(container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal') - and container_id is not null and is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + and container_id is not null) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑鐢ㄦ埛绫诲瀷璧勬簮 def get_principal_resources author_id, order, score - author_id = User.find_by_login(author_id).id attchments = Attachment.where("author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal'").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑鐢ㄦ埛绫诲瀷璧勬簮鎼滅储 def get_principal_resources_search author_id, order, score, search - author_id = User.find_by_login(author_id).id attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑鐢ㄦ埛绫诲瀷璧勬簮 def get_principal_resources_public order, score - attchments = Attachment.where("container_type = 'Principal'and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("container_type = 'Principal' and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 鑾峰彇鎴戠殑鐢ㄦ埛绫诲瀷璧勬簮 def get_principal_resources_public_search order, score, search - attchments = Attachment.where("(container_type = 'Principal'and container_id is not null and is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Principal'and container_id is not null) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 璧勬簮搴 鍒嗕负鍏ㄩ儴 璇剧▼璧勬簮 椤圭洰璧勬簮 闄勪欢 @@ -2746,7 +2836,7 @@ class UsersController < ApplicationController user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} - if(params[:type].blank? || params[:type] == "1") # 鎴戠殑璧勬簮 + if( params[:type] == "1") # 鎴戠殑璧勬簮 # 淇锛氭垜鐨勮祫婧愬簱鐨勮瘽锛岄偅涔堝簲璇ユ槸鎴戜笂浼犵殑鎵鏈夎祫婧愬姞涓婏紝鎴戝姞鍏ョ殑璇剧▼銆侀」鐩佺粍缁囩殑鎵鏈夎祫婧 if params[:status] == "2" @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) @@ -2760,7 +2850,7 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) end - elsif params[:type] == "6" # 鍏叡璧勬簮 + elsif (params[:type].blank? || params[:type] == "6") # 鍏叡璧勬簮 if params[:status] == "2" @attachments = get_course_resources_public( user_course_ids, @order, @score) elsif params[:status] == "3" @@ -2773,6 +2863,18 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" # 绉佹湁璧勬簮 + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @status = params[:status] @type = params[:type] @@ -2792,8 +2894,7 @@ class UsersController < ApplicationController # 瀵煎叆璧勬簮 def import_resources # 鍒汉鐨勮祫婧愬簱鏄病鏈夋潈闄愬幓鐪嬬殑 - @user = User.find_by_login(params[:id]) - if User.current != @user + if User.current.id != params[:id].to_i render_403 return end @@ -2953,6 +3054,19 @@ class UsersController < ApplicationController # 鍏叡璧勬簮搴擄細鎵鏈夊叕寮璧勬簮鎴栬呮垜涓婁紶鐨勭鏈夎祫婧 @attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search) end + elsif params[:type] == "2" # 绉佹湁璧勬簮 + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search) + @attachments end @status = params[:status] @type = params[:type] diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index a9e4771e8..39be9cef3 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -166,7 +166,7 @@ class WechatsController < ActionController::Base raise "闈炴硶鎿嶄綔, code涓嶅瓨鍦" unless params[:code] openid = get_openid_from_code(params[:code]) raise "鏃犳硶鑾峰彇鍒皁penid" unless openid - raise "姝ゅ井淇″彿宸茬粦瀹氱敤鎴, 涓嶈兘寰楀缁戝畾" if user_binded?(openid) + raise "姝ゅ井淇″彿宸茬粦瀹氱敤鎴, 涓嶈兘閲嶅缁戝畾" if user_binded?(openid) user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "鐢ㄦ埛鍚嶆垨瀵嗙爜閿欒,璇烽噸鏂扮櫥褰" unless user diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cda3ce53c..8d9c9733e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -34,13 +34,6 @@ module ApplicationHelper def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter - def user_path(resource, parameters = {}) - if Fixnum === resource - resource = User.find(resource) - end - super - end - # def user_blogs_path(resource,parameters={}) # super # end @@ -56,6 +49,21 @@ module ApplicationHelper return result end + # 鍒ゆ柇鏌愪釜璧勬簮鏄惁鍙互鐢宠 + def attach_show_allow attach_id + attachment = Attachment.find(attach_id) + case attachment.container_type + when "Project" + User.current.member_of?(attachment.container) ? true : false + when "Course" + User.current.member_of_course?(attachment.container) ? true : false + when "OrgSubfield" + User.current.member_of_org?(attachment.container) ? true : false + when "Principal" + User.current.id == attachment.author_id ? true : false + end + end + # Time 2015-03-24 15:27:29 # Author lizanle # Description 浠庣‖鐩樹笂鍒犻櫎瀵瑰簲鐨勮祫婧愭枃浠 @@ -95,11 +103,13 @@ module ApplicationHelper # 鑾峰彇缁勭粐鎴愬憳涓枃鍚嶅瓧 def get_org_member_role_name member - case member.roles[0].name - when 'orgManager' - '绠$悊浜哄憳' - when 'orgMember' - '缁勭粐鎴愬憳' + unless member.roles[0].nil? + case member.roles[0].name + when 'orgManager' + '绠$悊浜哄憳' + when 'orgMember' + '缁勭粐鎴愬憳' + end end end @@ -3094,6 +3104,10 @@ def host_with_protocol return Setting.protocol + "://" + Setting.host_name end +def secdomain_with_protocol secdomain + return Setting.protocol + "://" + secdomain + ".trustie.net" +end + #鑾峰彇鍥炲鐨勬墍鏈夌埗鑺傜偣 def get_reply_parents parents_rely, comment diff --git a/app/models/apply_resource.rb b/app/models/apply_resource.rb new file mode 100644 index 000000000..df646166c --- /dev/null +++ b/app/models/apply_resource.rb @@ -0,0 +1,19 @@ +class ApplyResource < ActiveRecord::Base + # status锛1. 绛夊緟鍥炲 2.瀹℃牳閫氳繃 3.宸叉嫆缁 + attr_accessible :attachment_id, :status, :user_id, :container_type, :container_id, :apply_user_id, :content + belongs_to :user + belongs_to :attachment + has_many :course_messages, :class_name => 'CourseMessage', :as => :course_message, :dependent => :destroy + after_create :act_as_apply_resource_message + + def act_as_apply_resource_message + self.course_messages << CourseMessage.new(:user_id => self.apply_user_id, :course_id => -1, :viewed => false, :status => 0, ) + # REDO:鍙戦侀偖浠 + # Mailer.run.apply_for_resource_request(self.container_id, User.current) + end + + def find_attachment attachment_id + Attachment.find(attachment_id) + end + +end diff --git a/app/models/attachment.rb b/app/models/attachment.rb index b3f5ce4ed..b7ec264fd 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -35,6 +35,7 @@ class Attachment < ActiveRecord::Base # end include UserScoreHelper has_many :attachment_histories + has_many :apply_resources, :dependent => :destroy validates :filename, presence: true, length: {maximum: 254} validates :author, presence: true @@ -139,6 +140,11 @@ class Attachment < ActiveRecord::Base } ) end + + def get_apply_resource_status attachment_id, author_id + ApplyResource.where("attachment_id =? and apply_user_id =?", attachment_id, author_id).first.try(:status) + end + # add by nwb # 鍏紑鐨勯」鐩甶d鍒楄〃 def self.public_project_id @@ -536,6 +542,11 @@ class Attachment < ActiveRecord::Base end end + # 鑾峰彇璧勬簮鐢宠鐘舵 + def get_status_by_attach user_id + ApplyResource.where("user_id =? and attachment_id =?", user_id, self.id).first.try(:status) + end + private # Physically deletes the file from the file system diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 703da936b..59fcfe456 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -1,5 +1,7 @@ class CourseMessage < ActiveRecord::Base # status璇存槑锛 status鍦ㄨ绋嬩笉鍚岀殑绫诲瀷锛屽尯鍒嗕笉鍚岀殑鍔熻兘 status = 9 浣滃搧鐨勬彁浜よ褰 + # ApplyResource status: + # 0: 鍙戦佺敵璇 1锛氬洖澶嶅厑璁哥敵璇 2锛氭嫆缁濈敵璇锋秷鎭 # HomeworkCommon锛歴tatus锛 # nil锛氬彂甯冧簡浣滀笟锛 1锛氫綔涓氭埅姝㈡椂闂村埌浜嗘彁閱掞紒锛2:寮鍚尶璇勶紱 3锛氬叧闂尶璇勶紱 4锛氬尶璇勫紑濮嬪け璐ワ紱 5锛氱敵璇峰紩鐢ㄤ綔涓, 6:鐢宠缁撴灉 # apply_user_id: 鐢宠鑰呯殑鐢ㄦ埛id diff --git a/app/models/news.rb b/app/models/news.rb index 1544faf61..a411ccaca 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -174,7 +174,7 @@ class News < ActiveRecord::Base if count == 0 ws = WechatService.new content = strip_html self.author.try(:realname) + " 鍙戝竷浜嗛氱煡锛" + self.title.html_safe, 200 - ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.author.try(:realname) + " 鍙戝竷浜嗛氱煡锛" + content, format_time(self.created_on) + ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", content, format_time(self.created_on) end end end diff --git a/app/models/organization.rb b/app/models/organization.rb index 311a37bf8..c35d0591d 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -30,4 +30,8 @@ class Organization < ActiveRecord::Base def allow_set_teachers self.allow_teacher.to_i == 1 ? true : false end + + def secdomain_name + Secdomain.where("sub_type=2 and pid=?", self.id).first.try(:subname) + end end diff --git a/app/models/sso.rb b/app/models/sso.rb index c6b57cd2d..c987ff933 100644 --- a/app/models/sso.rb +++ b/app/models/sso.rb @@ -1,3 +1,7 @@ +#coding=utf-8 + +require 'base64' + class Sso < ActiveRecord::Base belongs_to :user attr_accessible :email, :name, :openid, :password, :school, :sex, :user, :user_id diff --git a/app/models/user.rb b/app/models/user.rb index 035aff625..44ef54c95 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -109,6 +109,7 @@ class User < Principal has_many :student_works_scores, :dependent => :destroy has_many :student_work_projects, :dependent => :destroy has_many :apply_homeworks, :dependent => :destroy + has_many :apply_resources, :dependent => :destroy #end has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)}, @@ -1103,9 +1104,6 @@ class User < Principal # super end - def to_param - login - end # Salts all existing unsalted passwords # It changes password storage scheme from SHA1(password) to SHA1(salt + SHA1(password)) # This method is used in the SaltPasswords migration and is to be kept as is diff --git a/app/views/admin/code_work_tests.html.erb b/app/views/admin/code_work_tests.html.erb index 64c3a41e1..2013bd322 100644 --- a/app/views/admin/code_work_tests.html.erb +++ b/app/views/admin/code_work_tests.html.erb @@ -24,8 +24,8 @@ 娴嬭瘯瀹屾垚鏃堕棿 - - 绛旈鐘舵 + + 绛旈鐘舵 鑰楁椂 @@ -76,6 +76,10 @@ <%= "浠g爜瓒呮椂" %> <% elsif test.status == -3 %> <%= "璇锋眰瓒呮椂" %> + <% elsif test.status == -4 %> + <%= "judge浠g爜鍑洪敊!" %> + <% elsif test.status == -5 %> + <%= "trustie浠g爜鍑洪敊!" %> <% else %> <%= "绛旈閿欒" %> <% end %> diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index de7f1647d..d3763abf3 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -141,6 +141,7 @@
@@ -215,5 +216,6 @@ var postContent = $("#message_description_<%= @article.id %>").html(); postContent = postContent.replace(/ /g," "); $("#message_description_<%= @article.id %>").html(postContent); + autoUrl('message_description_<%= @article.id %>'); }); diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index f0b082860..dd818fe72 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -43,8 +43,8 @@ <% count=activity.children.count%> <% end %>
  • - 鍙戝笘鏃堕棿锛<%= format_time(activity.created_on) %> - 鏇存柊鏃堕棿锛<%= format_time(activity.updated_on) %> + 鍙戝竷锛<%= format_time(activity.created_on) %> + 鏇存柊锛<%= format_time(activity.updated_on) %>

    <%= count>0 ? "#{count}" :"0" %> 鍥炲 diff --git a/app/views/courses/_show_member_score.html.erb b/app/views/courses/_show_member_score.html.erb index 27b3863b0..80c2ef5cc 100644 --- a/app/views/courses/_show_member_score.html.erb +++ b/app/views/courses/_show_member_score.html.erb @@ -8,19 +8,19 @@ .tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;} - .tscore_box{ width:350px; margin:15px auto;} + .tscore_box{ width:370px; margin:15px auto;} .tscore_box li{ height:25px;}

    <%= @member_score.user.name %> 鍘嗘浣滀笟绉垎

    -
      +
      • 浣滀笟鍚嶇О寰楀垎
      • - <% @member_score.homework_common_list.each do |homework_common| %> + <% @member_score.homework_common_list.each_with_index do |homework_common, index| %>
      • - <%= homework_common.name %> + 浣滀笟<%=index + 1 %>锛<%= homework_common.name %> <% final_score = @member_score.homework_common_score(homework_common).first%> diff --git a/app/views/courses/syllabus.html.erb b/app/views/courses/syllabus.html.erb index 8be245958..66bc8ff9a 100644 --- a/app/views/courses/syllabus.html.erb +++ b/app/views/courses/syllabus.html.erb @@ -120,6 +120,7 @@
        @@ -214,5 +215,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @article.id %>'); }); \ No newline at end of file diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb index ad3ce7a3e..66b68e895 100644 --- a/app/views/files/_org_subfield_list.html.erb +++ b/app/views/files/_org_subfield_list.html.erb @@ -8,7 +8,7 @@ <%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
        -
        +
        <%# 濡傛灉鏈夊巻鍙茬増鏈垯鎻愪緵鍘嗗彶鐗堟湰涓嬭浇 %> <% if file.attachment_histories.count == 0 %> <%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'), diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb index 2ee726d77..831dc0e68 100644 --- a/app/views/files/_project_list.html.erb +++ b/app/views/files/_project_list.html.erb @@ -7,7 +7,7 @@ <%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
        -
        +
        <%# 濡傛灉鏈夊巻鍙茬増鏈垯鎻愪緵鍘嗗彶鐗堟湰涓嬭浇 %> <% if file.attachment_histories.count == 0 %> <%= link_to truncate(file.filename,length: 35, omission: '...'), diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index 20ffb1e50..2a03723ca 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -5,7 +5,7 @@ <%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
        -
        +
        <%# 濡傛灉鏈夊巻鍙茬増鏈垯鎻愪緵鍘嗗彶鐗堟湰涓嬭浇 %> <% if file.attachment_histories.count == 0 %> <%= link_to truncate(file.filename,length: 35, omission: '...'), diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index 08c030f90..ed90453ac 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,6 +1,12 @@
        <% if memos.any? %> <% memos.each do |topic| %> +
        @@ -16,7 +22,7 @@ <%= get_praise_num(topic)%>
        -
        <%= topic.content.html_safe%> +
        <%= topic.content.html_safe%>
        <% author = topic.last_reply.try(:author)%> diff --git a/app/views/issues/_detail.html.erb b/app/views/issues/_detail.html.erb index 92021f728..03c420c99 100644 --- a/app/views/issues/_detail.html.erb +++ b/app/views/issues/_detail.html.erb @@ -28,7 +28,7 @@ <%= render :partial => 'action_menu' %>
        <% if @issue.description? || @issue.attachments.any? -%> -
        +
        <% if @issue.description? %> <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> <%= textAreailizable @issue, :description, :attachments => @issue.attachments %> @@ -43,4 +43,11 @@ <%= render :partial => 'issues/attributes_show' %>
        -
        \ No newline at end of file +
        + + \ No newline at end of file diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb index 4c8dfa1d9..197cd9c02 100644 --- a/app/views/issues/_issue_replies.html.erb +++ b/app/views/issues/_issue_replies.html.erb @@ -3,6 +3,7 @@ <% replies_all_i=replies_all_i + 1 %> @@ -11,7 +12,7 @@ <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "鐢ㄦ埛澶村儚" %>
        -
        +
        <% if reply.try(:user).try(:realname) == ' ' %> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/layouts/base_org2.html.erb b/app/views/layouts/base_org2.html.erb index 9b481fac5..799aaa42b 100644 --- a/app/views/layouts/base_org2.html.erb +++ b/app/views/layouts/base_org2.html.erb @@ -46,7 +46,7 @@ scrollPic.speed = 10; //绉诲姩閫熷害(鍗曚綅姣锛岃秺灏忚秺蹇) scrollPic.space = 10; //姣忔绉诲姩鍍忕礌(鍗曚綅px锛岃秺澶ц秺蹇) - scrollPic.autoPlay = true; //鑷姩鎾斁 + scrollPic.autoPlay = false; //鑷姩鎾斁 scrollPic.autoPlayTime = 3; //鑷姩鎾斁闂撮殧鏃堕棿(绉) scrollPic.initialize(); //鍒濆鍖 @@ -60,13 +60,12 @@
        - <%= render :partial => 'organizations/org_logined_header' %>
        diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 83b90dc93..3524de0c8 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -94,12 +94,12 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
        -
        <%= reply.author.name%><%= format_date(reply.created_at) %>
        +
        <%= reply.author.name%><%= format_date(reply.created_at) %>
        <%= reply.content.html_safe%>
        @@ -147,6 +148,7 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('activity_description_<%= @memo.id %>'); description_show_hide(<%= @memo.id %>); }); \ No newline at end of file diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 33c9d7f8d..443440455 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -109,6 +109,7 @@
        @@ -188,5 +189,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @topic.id %>'); }); diff --git a/app/views/messages/_org_subfield_show.html.erb b/app/views/messages/_org_subfield_show.html.erb index 4d5af61dd..145afcfd7 100644 --- a/app/views/messages/_org_subfield_show.html.erb +++ b/app/views/messages/_org_subfield_show.html.erb @@ -138,6 +138,7 @@
        @@ -210,5 +211,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @topic.id %>'); }); diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index 10046bce2..35b3f8a3c 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -165,6 +165,7 @@
        @@ -245,5 +246,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @topic.id %>'); }); diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index 46346eb71..5908c7593 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -115,6 +115,7 @@
        @@ -210,5 +211,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @news.id %>'); }); diff --git a/app/views/news/_organization_show.html.erb b/app/views/news/_organization_show.html.erb index 640854164..7eecf43ab 100644 --- a/app/views/news/_organization_show.html.erb +++ b/app/views/news/_organization_show.html.erb @@ -97,6 +97,7 @@
        @@ -185,5 +186,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @news.id %>'); }); diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index 6b91c98ed..6b3824222 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -107,6 +107,7 @@
        @@ -195,5 +196,6 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('message_description_<%= @news.id %>'); }); diff --git a/app/views/org_document_comments/destroy.js.erb b/app/views/org_document_comments/destroy.js.erb index 787bd3185..1e830d7bc 100644 --- a/app/views/org_document_comments/destroy.js.erb +++ b/app/views/org_document_comments/destroy.js.erb @@ -1,6 +1,6 @@ //location.reload(); <% if params[:detail_page] %> - window.location.href = '<%= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>'; + window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @sub_domain.id)%>'; <% else %> window.location.reload(); <% end %> \ No newline at end of file diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb index f5b186197..e2967a9ae 100644 --- a/app/views/org_document_comments/show.html.erb +++ b/app/views/org_document_comments/show.html.erb @@ -84,6 +84,7 @@ <% user = User.find(reply.creator_id) %> @@ -158,6 +159,7 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('intro_content_<%= @document.id %>'); }); function expand_reply(container, btnid) { var target = $(container); diff --git a/app/views/organizations/_org_course_create.html.erb b/app/views/organizations/_org_course_create.html.erb index a09246dc7..97bc0e353 100644 --- a/app/views/organizations/_org_course_create.html.erb +++ b/app/views/organizations/_org_course_create.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
        -
        +
        <% if activity.try(:teacher).try(:realname) == ' ' %> <%= link_to activity.try(:teacher), user_url_in_org(activity.tea_id), :class => "newsBlue mr15" %> <% else %> @@ -39,4 +39,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index b4ca46959..d3fe36fe3 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -6,7 +6,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        -
        +
        <% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %> <% else %> @@ -210,9 +210,9 @@
        <% if project.is_public || User.current.member_of?(project) || User.current.admin? %> - <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_url_in_org(project.id),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚" %> + <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_url_in_org(project.id),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚" %> <% else %> - <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚") %> + <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚") %> <% end %> <% com_time = project.project_score.commit_time %> <% time=project.updated_on %> @@ -315,6 +315,7 @@ <% replies_all_i = replies_all_i + 1 %> diff --git a/app/views/organizations/_org_course_message.html.erb b/app/views/organizations/_org_course_message.html.erb index 56dafed08..e68745f7a 100644 --- a/app/views/organizations/_org_course_message.html.erb +++ b/app/views/organizations/_org_course_message.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        -
        +
        <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -100,6 +100,7 @@ <% replies_all_i=replies_all_i+1 %> @@ -108,7 +109,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "鐢ㄦ埛澶村儚" %>
        -
        +
        <% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_org_course_news.html.erb b/app/views/organizations/_org_course_news.html.erb index a6183e891..acf0f0377 100644 --- a/app/views/organizations/_org_course_news.html.erb +++ b/app/views/organizations/_org_course_news.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        -
        +
        <% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -69,6 +69,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -77,7 +78,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
        -
        +
        <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_org_course_poll.html.erb b/app/views/organizations/_org_course_poll.html.erb index cb390f7f5..2958df0ca 100644 --- a/app/views/organizations/_org_course_poll.html.erb +++ b/app/views/organizations/_org_course_poll.html.erb @@ -9,7 +9,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        -
        +
        <% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %> <% else %> diff --git a/app/views/organizations/_org_logined_header.html.erb b/app/views/organizations/_org_logined_header.html.erb index 22cf920e9..74e313f6a 100644 --- a/app/views/organizations/_org_logined_header.html.erb +++ b/app/views/organizations/_org_logined_header.html.erb @@ -1,37 +1,31 @@ <% if User.current.logged? %> -
        -
        - +
      • +
    <% else %> -
    - +
    + 鐧诲綍  |   + 娉ㄥ唽
    <% end %> diff --git a/app/views/organizations/_org_project_issue.html.erb b/app/views/organizations/_org_project_issue.html.erb index 98c1e2df3..9ca10c91d 100644 --- a/app/views/organizations/_org_project_issue.html.erb +++ b/app/views/organizations/_org_project_issue.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -80,6 +80,7 @@ <% replies_all_i=replies_all_i + 1 %> @@ -88,7 +89,7 @@ <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_url_in_org(reply.user_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:user).try(:realname) == ' ' %> <%= link_to reply.try(:user), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_org_subfield_leftM1.html.erb b/app/views/organizations/_org_subfield_leftM1.html.erb index e7481ce0a..ed3bcba7e 100644 --- a/app/views/organizations/_org_subfield_leftM1.html.erb +++ b/app/views/organizations/_org_subfield_leftM1.html.erb @@ -1,4 +1,3 @@ - <% if is_default_field?(field) %> <% case field.name %> <% when 'course' %> @@ -26,7 +25,7 @@
    <%= activity.description.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", activity.name.to_s, student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% elsif act.org_act_type == "Message" %> <% activity = Message.find(act.org_act_id) %> @@ -44,7 +43,7 @@
    <%= activity.content.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% elsif act.org_act_type == "News" %> <% activity = News.find(act.org_act_id) %> @@ -63,7 +62,7 @@
    <%= activity.description.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", activity.title.to_s, news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% elsif act.org_act_type == "Poll" %> <% activity = Poll.find(act.org_act_id) %> @@ -88,7 +87,7 @@
    <%= activity.polls_description.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% end %> <% end %> @@ -119,7 +118,7 @@
    <%= activity.description.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", activity.subject.to_s, issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
  • <% elsif act.org_act_type == "Message" %> <% activity = Message.find(act.org_act_id) %> @@ -137,7 +136,7 @@
    <%= activity.content.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% elsif act.org_act_type == "News" %> <% activity = News.find(act.org_act_id) %> @@ -217,7 +216,7 @@
    <%= content.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% else %>
    @@ -239,9 +238,9 @@
    <% if message.parent_id.nil? %> - <%=link_to "鏌ョ湅鍏ㄦ枃>>", message.subject.to_s.html_safe, board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %> + <%=link_to "鏌ョ湅鍏ㄦ枃>>", board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %> <% else %> - <%=link_to "鏌ョ湅鍏ㄦ枃>>", message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %> + <%=link_to "鏌ョ湅鍏ㄦ枃>>", board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %> <% end %>
    @@ -263,7 +262,7 @@
    <%= news.description.to_s.html_safe %>
    -
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    +
    <%=link_to "鏌ョ湅鍏ㄦ枃>>", news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
    <% end %> <% end %> diff --git a/app/views/organizations/_org_subfield_message.html.erb b/app/views/organizations/_org_subfield_message.html.erb index fc6cc6ee0..61bc5bc7f 100644 --- a/app/views/organizations/_org_subfield_message.html.erb +++ b/app/views/organizations/_org_subfield_message.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -105,6 +105,7 @@ <% replies_all_i=replies_all_i+1 %> @@ -113,7 +114,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_org_subfield_news.html.erb b/app/views/organizations/_org_subfield_news.html.erb index daa81e96c..5d6c38542 100644 --- a/app/views/organizations/_org_subfield_news.html.erb +++ b/app/views/organizations/_org_subfield_news.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -89,6 +89,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -97,7 +98,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_project_create.html.erb b/app/views/organizations/_project_create.html.erb index ef59d154e..9a4f00a9a 100644 --- a/app/views/organizations/_project_create.html.erb +++ b/app/views/organizations/_project_create.html.erb @@ -7,7 +7,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
    -
    +
    <% if user.try(:realname) == ' ' %> <%= link_to user, user_url_in_org(user.id), :class => "newsBlue mr15" %> <% else %> @@ -41,4 +41,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/organizations/_project_message.html.erb b/app/views/organizations/_project_message.html.erb index 26cf3b318..e1b000c70 100644 --- a/app/views/organizations/_project_message.html.erb +++ b/app/views/organizations/_project_message.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -79,6 +79,7 @@ <% replies_all_i=replies_all_i+1 %> @@ -87,7 +88,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/organizations/_show_home_page.html.erb b/app/views/organizations/_show_home_page.html.erb index 63eb1808b..ecb5ebb25 100644 --- a/app/views/organizations/_show_home_page.html.erb +++ b/app/views/organizations/_show_home_page.html.erb @@ -59,6 +59,7 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('intro_content_<%= document.id %>'); function expand_reply(container, btnid) { var target = $(container); var btn = $(btnid); diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index 6012dd0d4..e8f531206 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -88,6 +88,12 @@
      <% reply_id = 0 %> <% comments_for_doc.each do |comment| %> + <% reply_id += 1 %>
    • <%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "鐢ㄦ埛澶村儚"), user_url_in_org(comment.creator_id) %>
      @@ -104,7 +110,7 @@
    <% unless comment.content.blank? %> -
    <%= comment.content.html_safe %>
    +
    <%= comment.content.html_safe %>
    <% end %>
    diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index 2caeee726..0c8af8471 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -109,9 +109,14 @@

    娣诲姞鎴愬憳

    - <%= form_tag url_for(:controller => 'org_member',:action => 'create',:org=>@organization),:id=>'org_member_add_form',:remote=>true do |f|%> + <%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%> - <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> + <%# if @organization.secdomain_name.nil? %> + <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> + <%# else %> + <%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> + <%# end %> +
    <%= find_user_not_in_current_org_by_name(@project) %>
    diff --git a/app/views/organizations/teachers.html.erb b/app/views/organizations/teachers.html.erb index c368adef7..dac36f7a5 100644 --- a/app/views/organizations/teachers.html.erb +++ b/app/views/organizations/teachers.html.erb @@ -9,8 +9,7 @@
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> diff --git a/app/views/projects/_project_create.html.erb b/app/views/projects/_project_create.html.erb index bd118418d..2e7a919d1 100644 --- a/app/views/projects/_project_create.html.erb +++ b/app/views/projects/_project_create.html.erb @@ -7,7 +7,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
    -
    +
    <% if user.try(:realname) == ' ' %> <%= link_to user, user_path(user), :class => "newsBlue mr15" %> <% else %> @@ -41,4 +41,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/projects/_project_news.html.erb b/app/views/projects/_project_news.html.erb index 8756ff26f..6d97b252d 100644 --- a/app/views/projects/_project_news.html.erb +++ b/app/views/projects/_project_news.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -69,6 +69,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -77,7 +78,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> @@ -125,4 +126,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 276283e97..43be57760 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,7 +1,7 @@ <%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    - + ZIP涓嬭浇
    diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 8e7d87302..96e43af46 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -69,16 +69,21 @@
    - <% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %> -
    鎻愪氦鎴鏃堕棿锛<%= @homework.end_time %> 23:59
    - <% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %> -
    鍖胯瘎鎴鏃堕棿锛<%= @homework.homework_detail_manual.evaluation_end %> 23:59
    - <% end %> - <% if @homework.homework_detail_manual.comment_status == 0 %> -
    鍙戝竷鏃堕棿锛<%= @homework.publish_time %> 00:00
    + <% if @homework.end_time && @homework.publish_time %> + <% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %> +
    鎻愪氦鎴鏃堕棿锛<%= @homework.end_time %> 23:59
    + <% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %> +
    鍖胯瘎鎴鏃堕棿锛<%= @homework.homework_detail_manual.evaluation_end %> 23:59
    + <% end %> + <% if @homework.homework_detail_manual.comment_status == 0 %> +
    鍙戝竷鏃堕棿锛<%= @homework.publish_time %> 00:00
    + <% end %> <% end %> <% if @homework.homework_detail_manual%> <% if @homework.homework_detail_manual.comment_status == 1%> diff --git a/app/views/sub_document_comments/show.html.erb b/app/views/sub_document_comments/show.html.erb index 3155c178b..fc35d00cb 100644 --- a/app/views/sub_document_comments/show.html.erb +++ b/app/views/sub_document_comments/show.html.erb @@ -97,6 +97,7 @@ <% user = User.find(reply.creator_id) %> @@ -164,6 +165,7 @@ postContent=postContent.replace(/  /g,"   "); $(this).html(postContent); }); + autoUrl('intro_content_<%= @document.id %>'); var replyCount = $(".homepagePostReplyContainer").size(); if (replyCount >3){ for(var i= 3; i < replyCount+1; i++){ diff --git a/app/views/users/_apply_for_resource.html.erb b/app/views/users/_apply_for_resource.html.erb new file mode 100644 index 000000000..1a0df801b --- /dev/null +++ b/app/views/users/_apply_for_resource.html.erb @@ -0,0 +1,16 @@ +
    +
    +

    + <% if state == 2 %> + 璇锋眰宸插彂閫佽嚦<%= attachment.author.show_name %>锛屽笇鏈涗粬鍚屾剰涓庝綘鍒嗕韩锛氾級 + <% elsif state == 3 %> + 鎮ㄥ凡鍙戦佽繃鍒嗕韩璇锋眰锛岃鍕块噸澶嶅彂閫併 + <% end %> +

    + +
    +
    \ No newline at end of file diff --git a/app/views/users/_apply_resource.html.erb b/app/views/users/_apply_resource.html.erb new file mode 100644 index 000000000..2f5732030 --- /dev/null +++ b/app/views/users/_apply_resource.html.erb @@ -0,0 +1,28 @@ +
    +
    + <%= form_tag(apply_for_resource_user_path(:id => User.current.id, :attachment_id => attachment.id), :multipart => true, :remote => true, :name=>"apply_for_homework_form", :id=>'apply_for_homework_form') do %> +

    鐢宠鍒嗕韩

    +

    + 鐢宠璇存槑锛堝繀閫夛級锛 + +

    + + + <% end %> +
    +
    + \ No newline at end of file diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb new file mode 100644 index 000000000..fd493daf2 --- /dev/null +++ b/app/views/users/_apply_resource_course_message.html.erb @@ -0,0 +1,38 @@ +
  • + +
  • +
  • + <%= link_to ma.course_message.user.show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + ">鐢宠寮曠敤璧勬簮锛 +
  • +
  • + <% content = ma.course_message.content.nil? ? '' : '锛'+ ma.course_message.content.to_s %> + <% show_content = ma.course_message.user.show_name + "鐢宠寮曠敤璧勬簮\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %> + <% if ma.course_message.container_type == "Course" %> + <%= link_to show_content, course_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "Project" %> + <%= link_to show_content, project_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "OrgSubfield" %> + <%= link_to show_content, org_subfield_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% else %> + "> + <%= show_content %> + + <% end %> +
  • + +
  • + + <% if ma.apply_result == 0 || ma.apply_result.nil? %> + <%= link_to '鍚屾剰', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> | + <%= link_to '鎷掔粷', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> + <% elsif ma.apply_result == 1 %> + 鎮ㄥ凡缁忓悓鎰忎簡璇ョ敵璇 + <% elsif ma.apply_result == 2 %> + 鎮ㄥ凡缁忔嫆缁濅簡璇ョ敵璇 + <%end %> + +
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • \ No newline at end of file diff --git a/app/views/users/_apply_resource_course_message_reply.html.erb b/app/views/users/_apply_resource_course_message_reply.html.erb new file mode 100644 index 000000000..2aff99c17 --- /dev/null +++ b/app/views/users/_apply_resource_course_message_reply.html.erb @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/app/views/users/_course_attachment.html.erb b/app/views/users/_course_attachment.html.erb index 63c57f708..4c0856b14 100644 --- a/app/views/users/_course_attachment.html.erb +++ b/app/views/users/_course_attachment.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -43,4 +43,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_course_boardlist.html.erb b/app/views/users/_course_boardlist.html.erb index c92d117ee..bf23d9a97 100644 --- a/app/views/users/_course_boardlist.html.erb +++ b/app/views/users/_course_boardlist.html.erb @@ -45,8 +45,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

    - 鍙戝笘鏃堕棿锛<%= format_time(activity.created_on) %> - 鏇存柊鏃堕棿锛<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> + 鍙戝笘锛<%= format_time(activity.created_on) %> + 鏇存柊锛<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% if activity.parent %> <% count=activity.parent.children.count%> diff --git a/app/views/users/_course_create.html.erb b/app/views/users/_course_create.html.erb index 6b2234337..83c703905 100644 --- a/app/views/users/_course_create.html.erb +++ b/app/views/users/_course_create.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
    -
    +
    <% if activity.try(:teacher).try(:realname) == ' ' %> <%= link_to activity.try(:teacher), user_path(activity.tea_id), :class => "newsBlue mr15" %> <% else %> @@ -39,4 +39,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 28f0f99db..3721244ed 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -6,7 +6,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
    -
    +
    <% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> @@ -216,9 +216,9 @@
    <% if project.is_public || User.current.member_of?(project) || User.current.admin? %> - <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚" %> + <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚" %> <% else %> - <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚") %> + <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"椤圭洰澶村儚") %> <% end %> <% com_time = project.project_score.commit_time %> <% time=project.updated_on %> @@ -321,6 +321,7 @@ <% replies_all_i = replies_all_i + 1 %> diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 1d0c4cba5..aeb7f5e5d 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
    -
    +
    <% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <% else %> @@ -56,6 +56,7 @@ <% replies_all_i = replies_all_i + 1 %> diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 2f790b19b..8b6056309 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> @@ -117,6 +117,7 @@ <% replies_all_i=replies_all_i+1 %> @@ -125,7 +126,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% else %> @@ -179,4 +180,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 403a922ed..19d62b14e 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -94,6 +94,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -102,7 +103,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/users/_course_newslist.html.erb b/app/views/users/_course_newslist.html.erb index ff99e116e..0e5805112 100644 --- a/app/views/users/_course_newslist.html.erb +++ b/app/views/users/_course_newslist.html.erb @@ -33,8 +33,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100} %>

    - 鍙戝竷鏃堕棿锛<%= format_time(activity.created_on) %> - 鏇存柊鏃堕棿锛<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> + 鍙戝竷锛<%= format_time(activity.created_on) %> + 鏇存柊锛<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% count=activity.comments.count %>

    <%= count>0 ? "#{count}" : "0" %>鍥炲|<%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %>

    diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index dab970cdf..4fbb55321 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -9,7 +9,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
    -
    +
    <% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <% else %> diff --git a/app/views/users/_intro_content.html.erb b/app/views/users/_intro_content.html.erb index c18e520ba..04babe100 100644 --- a/app/views/users/_intro_content.html.erb +++ b/app/views/users/_intro_content.html.erb @@ -1,6 +1,6 @@ -
    +
    - <%= content.to_s.html_safe%> + <%= content.to_s.html_safe %>
    \ No newline at end of file diff --git a/app/views/users/_project_attachment.html.erb b/app/views/users/_project_attachment.html.erb index 795432008..ed4f8cfb8 100644 --- a/app/views/users/_project_attachment.html.erb +++ b/app/views/users/_project_attachment.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -43,4 +43,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_project_boardlist.html.erb b/app/views/users/_project_boardlist.html.erb index 55f576db1..25fd675fb 100644 --- a/app/views/users/_project_boardlist.html.erb +++ b/app/views/users/_project_boardlist.html.erb @@ -45,8 +45,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

    - 鍙戝笘鏃堕棿锛<%= format_time(activity.created_on) %> - 鏇存柊鏃堕棿锛<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> + 鍙戝笘锛<%= format_time(activity.created_on) %> + 鏇存柊锛<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% if activity.parent %> <% count=activity.parent.children.count%> diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb index 83bfe3f04..644918ccc 100644 --- a/app/views/users/_project_create.html.erb +++ b/app/views/users/_project_create.html.erb @@ -7,7 +7,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
    -
    +
    <% if user.try(:realname) == ' ' %> <%= link_to user, user_path(user), :class => "newsBlue mr15" %> <% else %> @@ -41,4 +41,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_project_document.html.erb b/app/views/users/_project_document.html.erb index eb3ff2122..5427bd112 100644 --- a/app/views/users/_project_document.html.erb +++ b/app/views/users/_project_document.html.erb @@ -3,7 +3,7 @@
    鐢ㄦ埛澶村儚
    -
    灏规暀鎺 TO + diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index daa7c71c2..4b13850de 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -100,4 +100,4 @@ $(function(){ user_card_show_hide(); }); - \ No newline at end of file + diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb index 5020f67d3..5323b76b6 100644 --- a/app/views/users/_project_issue_reply.html.erb +++ b/app/views/users/_project_issue_reply.html.erb @@ -29,6 +29,7 @@ <% replies_all_i=replies_all_i + 1 %> @@ -37,7 +38,7 @@ <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:user).try(:realname) == ' ' %> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/users/_project_journal.html.erb b/app/views/users/_project_journal.html.erb index 7cf487211..1efbf1c7d 100644 --- a/app/views/users/_project_journal.html.erb +++ b/app/views/users/_project_journal.html.erb @@ -3,7 +3,7 @@
    鐢ㄦ埛澶村儚
    -
    灏规暀鎺 TO + diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 0a41dbbf5..b6e3f9a94 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -112,6 +112,7 @@ <% replies_all_i=replies_all_i+1 %> @@ -120,7 +121,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb index 7f5d185e5..55e2182b5 100644 --- a/app/views/users/_project_news.html.erb +++ b/app/views/users/_project_news.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -91,6 +91,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -99,7 +100,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index b8551f7c5..9dc530c72 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -6,11 +6,38 @@ <% attachments.each do |attach| %>
    • - + <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 && !attach_show_allow(attach) %> + + <% else %> + + <% end %>
    • -
    • + <% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != "2" %> + + <% else %> + <%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %> + <% end %> + <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> + 绉佹湁 + <% end %> +
    • +
    • + <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && !attach_show_allow(attach) %> + <% ah = attach.get_status_by_attach(User.current.id) %> + <% if ah.nil? %> + <%= link_to("璇锋眰鍒嗕韩", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %> + <% elsif ah == 1 %> + 绛夊緟鍥炲 + <% elsif ah == 2 %> + 鍙紩鐢 + <% elsif ah == 3 %> + 宸叉嫆缁 + <% end %> + <% else %> + -- + <% end %>
    • <%= format_date(attach.created_on) %>
    • <%= attach.quotes.nil? ? 0 : attach.quotes %>
    • @@ -20,6 +47,9 @@
    • <%= get_resource_type(attach.container_type)%>
    • +
    • <%= attach.is_public %>
    • +
    • <%= attach.get_apply_resource_status(attach.id, attach.author_id) %>
    • +
    • <%= attach_show_allow(attach) == true ? 0 : 1 %>
    • <%= attach.id %>
    @@ -41,14 +71,15 @@ //鎵归噺鍒犻櫎 function batch_delete(){ var data = $("#resources_list_form").serialize(); - if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){ - alert("鎮ㄥ彧鑳藉垹闄ゆ病鏈夊巻鍙茶褰曠殑璧勬簮锛岃閲嶆柊閫夋嫨鍚庡啀鍒犻櫎銆"); - return; - } if($("input[type=checkbox][data-deleteble=N]:checked").length != 0){ alert("鎮ㄥ彧鑳藉垹闄よ嚜宸变笂浼犵殑璧勬簮锛岃閲嶆柊閫夋嫨鍚庡啀鍒犻櫎銆"); return; } + if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){ + alert("鎮ㄥ彧鑳藉垹闄ゆ病鏈夊巻鍙茶褰曠殑璧勬簮锛岃閲嶆柊閫夋嫨鍚庡啀鍒犻櫎銆"); + return; + } + if(data != "" && confirm('纭瑕佸垹闄よ繖浜涜祫婧愬悧锛')) { $.post( @@ -68,19 +99,28 @@ document.oncontextmenu = function() {return true;} line.children().css("background-color",'white'); id = line.children().last().html(); - if (lastSendType === '2'){ //濡傛灉宸茬粡鍙戦佽繃涓娆′簡锛岄偅涔堝氨搴旇娌跨敤涓婃鍙戦佺殑绫诲瀷銆 - $.ajax({ - type: 'get', - url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>", - data:{send_type:'file'} - }); + is_public = line.children().eq(11).html(); + user_id = line.children().eq(6).html(); + apply_status = line.children().eq(12).html(); + allow = line.children().eq(13).html(); + if(is_public == 0 && user_id != '<%= User.current.id %>' && apply_status != 2 && allow == 1){ + alert('鎮ㄦ棤鏉冨彂閫佺鏈夎祫婧') }else{ - $.ajax({ - type: 'get', - url: '<%= search_user_course_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>", - data:{send_type:'file'} - }); + if (lastSendType === '2'){ //濡傛灉宸茬粡鍙戦佽繃涓娆′簡锛岄偅涔堝氨搴旇娌跨敤涓婃鍙戦佺殑绫诲瀷銆 + $.ajax({ + type: 'get', + url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + }else{ + $.ajax({ + type: 'get', + url: '<%= search_user_course_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + } } + } function batch_send(){ @@ -176,20 +216,22 @@ } line.children().css("background-color", 'white'); id = line.children().last().html(); - user_id = line.children().eq(5).html(); - if(line.children().first().children().data('hasHistory') == 'Y'){ - alert('璇ヨ祫婧愬瓨鍦ㄥ巻鍙茬増鏈紝涓嶈兘鍒犻櫎'); - return; - } + user_id = line.children().eq(6).html(); if(user_id === '<%= User.current.id%>') { + if(line.children().first().children().data('hasHistory') == 'Y'){ + alert('璇ヨ祫婧愬瓨鍦ㄥ巻鍙茬増鏈紝涓嶈兘鍒犻櫎'); + return; + } if (confirm('纭畾瑕佸垹闄よ祫婧"' + line.children().eq(1).children().attr('title').trim() + '"涔?')) { $.ajax({ type: 'post', url: '<%= user_resource_delete_user_path(User.current.id)%>' + '?resource_id=' + id + '&type=<%=@type %>&status=<%=@status %>' }); } + }else{ alert('鎮ㄦ棤娉曞垹闄ゆ璧勬簮锛') } + } diff --git a/app/views/users/_show_new_upload.html.erb b/app/views/users/_show_new_upload.html.erb new file mode 100644 index 000000000..b343aeae1 --- /dev/null +++ b/app/views/users/_show_new_upload.html.erb @@ -0,0 +1,3 @@ +<% if @type != "2" %> + +<% end %> diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb index 74f090344..de5ffc31f 100644 --- a/app/views/users/_user_blog.html.erb +++ b/app/views/users/_user_blog.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
    -
    +
    <% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -16,13 +16,13 @@
    <%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %> + <% if activity.locked%> +       + <% end%> + <% if activity.sticky == 1%> + 缃《 + <% end%>
    - <% if activity.sticky == 1%> - 缃《 - <% end%> - <% if activity.locked%> -        - <% end%>
    @@ -75,6 +75,7 @@ <% replies_all_i = replies_all_i + 1 %> @@ -83,7 +84,7 @@ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "鐢ㄦ埛澶村儚" %>
    -
    +
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> diff --git a/app/views/users/_user_course_list.html.erb b/app/views/users/_user_course_list.html.erb index 8ef0faa9e..5e3f48963 100644 --- a/app/views/users/_user_course_list.html.erb +++ b/app/views/users/_user_course_list.html.erb @@ -28,12 +28,10 @@
  • + + 鏇存柊锛<%= format_time(course.updated_on) %> - 鍒涘缓鏃堕棿锛<%= format_time(course.created_at) %> - - 鏇存柊鏃堕棿锛<%= format_time(course.updated_on) %> - - 寮璇惧鏈:  <%= current_time_and_term course %> + 瀛︽湡:  <%= current_time_and_term course %> <% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %> <% homework_num = course.homework_commons.count %> diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index c0578c042..f81fbabf5 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -5,7 +5,7 @@ <%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
  • -
    +
    <%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%> TO <%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%> @@ -224,9 +224,9 @@
    <% if project.is_public || User.current.member_of?(project) || User.current.admin? %> - <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"椤圭洰澶村儚" %> + <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"椤圭洰澶村儚" %> <% else %> - <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"椤圭洰澶村儚") %> + <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"椤圭洰澶村儚") %> <% end %> <% com_time = project.project_score.commit_time %> <% time=project.updated_on %> @@ -331,6 +331,7 @@ <% replies_all_i = replies_all_i + 1 %> diff --git a/app/views/users/_user_import_resource_list.html.erb b/app/views/users/_user_import_resource_list.html.erb index 38770421d..efae73a3d 100644 --- a/app/views/users/_user_import_resource_list.html.erb +++ b/app/views/users/_user_import_resource_list.html.erb @@ -6,8 +6,22 @@
    • <%= get_resource_type(attach.container_type)%>
    • diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 944477e88..47d5145ac 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -86,6 +86,12 @@
        <% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %> + <% replies_all_i = replies_all_i + 1 %>
      • @@ -115,7 +121,7 @@ <% end %>
      -
      +
      <%= comment.notes.html_safe %>
      diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index d4fbeb234..60d5b6ed8 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -234,6 +234,18 @@ <%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %>
    <% end %> + + <% if ma.course_message_type == "ApplyResource" && ma.status == 0 %> +
      + <%= render :partial => 'apply_resource_course_message', :locals => {:ma => ma} %> +
    + <% end %> + + <% if ma.course_message_type == "ApplyResource" && ma.status == 1 %> +
      + <%= render :partial => 'apply_resource_course_message_reply', :locals => {:ma => ma} %> +
    + <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 %>
    • diff --git a/app/views/users/_user_project_list.html.erb b/app/views/users/_user_project_list.html.erb index 1526da58f..6124b82d8 100644 --- a/app/views/users/_user_project_list.html.erb +++ b/app/views/users/_user_project_list.html.erb @@ -27,8 +27,8 @@
    • - 鍒涘缓鏃堕棿锛<%= format_time(project.created_on) %> - 鏇存柊鏃堕棿锛<%= format_time(project.updated_at) %> + + 鏇存柊锛<%= format_time(project.updated_at) %>

      <%= project.project_score.issue_num %>闂| <%= project.project_score.attach_num %>璧勬簮

    • diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index 58829386c..52a61a7b0 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -1,5 +1,7 @@
      - +
      + <%= render :partial => "show_new_upload", :locals => {:type => @type, :status => @status} %> +
      <%= render :partial => 'users/resource_search_form',:locals => {:user => @user, :type => @type, :order => @order, :sort => @score, :status => @status} %>
      @@ -17,12 +19,13 @@
      - 鍏ㄩ 鍒犻櫎
      + + 鍒犻櫎
    - + + +
    閫夋嫨 0 涓祫婧
    @@ -212,7 +215,7 @@ document.oncontextmenu = function() {return true;} line.children().css("background-color",'white'); id = line.children().last().html(); - user_id = line.children().eq(5).html(); + user_id = line.children().eq(6).html(); if(user_id === '<%= User.current.id %>') { res_name = line.children().eq(1).children().attr('title'); res_link = line.children().eq(1).html(); diff --git a/app/views/users/_user_resource_tip_list.html.erb b/app/views/users/_user_resource_tip_list.html.erb index 5d5876ac8..67fe292ee 100644 --- a/app/views/users/_user_resource_tip_list.html.erb +++ b/app/views/users/_user_resource_tip_list.html.erb @@ -1,6 +1,7 @@
    • 璧勬簮鍚嶇О
    • +
    • 鎿嶄綔
    • <%= link_to "涓婁紶鏃堕棿", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "created_on", :search => " "), :class => "fl", :remote => true %> <% if @order == "created_on" %> diff --git a/app/views/users/_user_resource_type_filter.html.erb b/app/views/users/_user_resource_type_filter.html.erb index 6e5ed51c3..d2aa29eed 100644 --- a/app/views/users/_user_resource_type_filter.html.erb +++ b/app/views/users/_user_resource_type_filter.html.erb @@ -17,7 +17,7 @@ <%#= link_to '鐢ㄦ埛璧勬簮' ,user_resource_user_path(:id=>@user.id,:type=>5), id="resource_type_user", :remote=>true,:method => 'get', :class=>'resourcesTypeUser resourcesGrey' %>
    • - <% if @type != "6" %> + <% unless (@type == "6" || @type == "2") %>
    • 闄勪欢 <%#= link_to '闄勪欢' ,user_resource_user_path(:id=>@user.id,:type=>4), id="resource_type_file", :remote=>true,:method => 'get',:class=>'resourcesTypeAtt resourcesGrey' %> diff --git a/app/views/users/add_exist_file_to_course.js.erb b/app/views/users/add_exist_file_to_course.js.erb index 8db83aefc..880bd2877 100644 --- a/app/views/users/add_exist_file_to_course.js.erb +++ b/app/views/users/add_exist_file_to_course.js.erb @@ -1,7 +1,10 @@ <% if @flag == true%> -$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); +$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user => @user, :type => @type} ) %>'); +$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); $("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); +$("#user_resource_type_filter").html('<%= escape_javascript( render :partial => 'user_resource_type_filter' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); +$("#upload_private_resource").html('<%= escape_javascript( render :partial => 'show_new_upload' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); diff --git a/app/views/users/add_exist_file_to_project.js.erb b/app/views/users/add_exist_file_to_project.js.erb index 4c24f4932..5690a0f88 100644 --- a/app/views/users/add_exist_file_to_project.js.erb +++ b/app/views/users/add_exist_file_to_project.js.erb @@ -1,7 +1,10 @@ <% if @flag == true%> $("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); +$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); $("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); +$("#user_resource_type_filter").html('<%= escape_javascript( render :partial => 'user_resource_type_filter' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); +$("#upload_private_resource").html('<%= escape_javascript( render :partial => 'show_new_upload' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); diff --git a/app/views/users/apply_for_resource.js.erb b/app/views/users/apply_for_resource.js.erb new file mode 100644 index 000000000..7debbcba2 --- /dev/null +++ b/app/views/users/apply_for_resource.js.erb @@ -0,0 +1,15 @@ +<% if @state == 1 %> +hideModal(); +alert("鎮ㄨ繕鏈櫥褰曪紝璇峰厛鐧诲綍"); +<% elsif @state == 2 %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_for_resource', :locals => {:attachment => @attachment, :state => @state}) %>'); +showModal('ajax-modal', '500px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + + ""); +$('#ajax-modal').parent().css("top","30%").css("left","37%").css("position","fixed").css("border","3px solid #269ac9"); +$("#resource_apply_status_<%= @attachment.id %>").html("绛夊緟鍥炲"); +<% elsif @state == 3 %> +hideModal(); +alert("鎮ㄥ凡鐢宠杩囪璧勬簮"); +<% end %> \ No newline at end of file diff --git a/app/views/users/apply_resource.js.erb b/app/views/users/apply_resource.js.erb new file mode 100644 index 000000000..14a795fe5 --- /dev/null +++ b/app/views/users/apply_resource.js.erb @@ -0,0 +1,10 @@ +<% if @state == 1 %> +alert("鎮ㄨ繕鏈櫥褰"); +<% elsif @state == 2 %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_resource', :locals => {:attachment => @attachment}) %>'); +showModal('ajax-modal', '500px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + + ""); +$('#ajax-modal').parent().css("top","30%").css("left","37%").css("position","fixed").css("border","3px solid #269ac9"); +<% end %> \ No newline at end of file diff --git a/app/views/users/deal_with_apply_resource.js.erb b/app/views/users/deal_with_apply_resource.js.erb new file mode 100644 index 000000000..dbf07217c --- /dev/null +++ b/app/views/users/deal_with_apply_resource.js.erb @@ -0,0 +1 @@ +$("#apply_resource_message_<%= @msg.id %>").html('<%= escape_javascript(render :partial => 'users/apply_resource_course_message', :locals => {:ma => @msg}) %>'); \ No newline at end of file diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index 6405ba496..4a7e5cee3 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -92,6 +92,15 @@
      璇蜂娇鐢 <%= @homework.language_name %> 璇█缂栧啓 + <% if @homework.language.to_i == 1 %> + 缂栬瘧鍣ㄤ俊鎭細gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 2 %> + 缂栬瘧鍣ㄤ俊鎭細gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 3 %> + 缂栬瘧鍣ㄤ俊鎭細Python version "2.6.6" + <% elsif @homework.language.to_i == 4 %> + 缂栬瘧鍣ㄤ俊鎭細java version "1.7.0_85" OpenJDK Runtime Environment + <% end %> style="display-hidden" id="data-language">
      diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb index 6df6f2115..1d1d0ef14 100644 --- a/app/views/users/user_commit_homework.html.erb +++ b/app/views/users/user_commit_homework.html.erb @@ -75,6 +75,15 @@
      璇蜂娇鐢 <%= @homework.language_name %> 璇█缂栧啓 + <% if @homework.language.to_i == 1 %> + 缂栬瘧鍣ㄤ俊鎭細gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 2 %> + 缂栬瘧鍣ㄤ俊鎭細gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 3 %> + 缂栬瘧鍣ㄤ俊鎭細Python version "2.6.6" + <% elsif @homework.language.to_i == 4 %> + 缂栬瘧鍣ㄤ俊鎭細java version "1.7.0_85" OpenJDK Runtime Environment + <% end %>
      <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"璇锋鎷綘鐨勪唬鐮佺殑鍔熻兘" %> diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index 80167db56..0bd5724c1 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -55,7 +55,10 @@
    • 鎴戠殑璧勬簮
    • -
    •  
    • +
    • + 绉佹湁璧勬簮 +
    • +
    •  
    • <%= render :partial => 'user_resource_type_filter' %> diff --git a/app/views/users/user_resource.js.erb b/app/views/users/user_resource.js.erb index 2fa0035b2..758b8c2f0 100644 --- a/app/views/users/user_resource.js.erb +++ b/app/views/users/user_resource.js.erb @@ -2,6 +2,7 @@ $("#search_div").html('<%= escape_javascript( render :partial => 'resource_searc $("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' , :locals => { :attachments => @attachments}) %>'); $("#user_resource_type_filter").html('<%= escape_javascript( render :partial => 'user_resource_type_filter' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); +$("#upload_private_resource").html('<%= escape_javascript( render :partial => 'show_new_upload' , :locals => {:user => @user, :type => @type, :status => @status}) %>'); $("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); diff --git a/app/views/users/user_system_messages.html.erb b/app/views/users/user_system_messages.html.erb index 86ae56cc8..57c6eb573 100644 --- a/app/views/users/user_system_messages.html.erb +++ b/app/views/users/user_system_messages.html.erb @@ -7,7 +7,7 @@ <%= image_tag("/images/trustie_logo1.png", :width => "50", :height => "50") %>
      -
      +
      Trustie骞冲彴 鍙戝竷浜嗙郴缁熸秷鎭細 <%= system_message.subject.nil? ? "绯荤粺娑堟伅" : system_message.subject %>
      diff --git a/config/application.rb b/config/application.rb index eb5fdc43d..6f5542a1e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -53,6 +53,11 @@ module RedmineApp # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" + #disable [deprecated] I18n.enforce_available_locales will default to true in the future. + # If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false + # to avoid this message. + #I18n.config.enforce_available_locales = false + # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] diff --git a/config/menu.yml b/config/menu.yml index d129f7aff..3951f836b 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -5,7 +5,7 @@ button: url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/activities?response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" - name: "鎰忚杩旈" + name: "鎰忚鍙嶉" key: "FEEDBACK" - name: "鏇村" diff --git a/config/routes.rb b/config/routes.rb index a123c460b..2863d49a4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -561,6 +561,7 @@ RedmineApp::Application.routes.draw do match 'apply_homework', :to => 'users#apply_homework', :via => :get match 'user_homeworks', :to => 'users#user_homeworks', :via => :get match 'student_homeworks', :to => 'users#student_homeworks', :via => :get + get 'apply_resource' get 'user_import_homeworks' get 'user_search_homeworks' get 'choose_user_course' @@ -622,6 +623,7 @@ RedmineApp::Application.routes.draw do post 'import_resources_to_homework' get 'dealwith_apply_request' get 'dealwith_apply_homework' + get 'deal_with_apply_resource' get 'store_selected_resource' get 'user_organizations' get 'search_user_orgs' @@ -630,6 +632,7 @@ RedmineApp::Application.routes.draw do get 'user_ref_homework_search' get 'show_homework_detail' post 'apply_for_homework' + post 'apply_for_resource' # end end #resources :blogs diff --git a/db/migrate/20160517091224_create_apply_resources.rb b/db/migrate/20160517091224_create_apply_resources.rb new file mode 100644 index 000000000..8e2516966 --- /dev/null +++ b/db/migrate/20160517091224_create_apply_resources.rb @@ -0,0 +1,11 @@ +class CreateApplyResources < ActiveRecord::Migration + def change + create_table :apply_resources do |t| + t.integer :status + t.integer :user_id + t.integer :attachment_id + + t.timestamps + end + end +end diff --git a/db/migrate/20160518031514_add_column_to_apply_resource.rb b/db/migrate/20160518031514_add_column_to_apply_resource.rb new file mode 100644 index 000000000..164bad7b7 --- /dev/null +++ b/db/migrate/20160518031514_add_column_to_apply_resource.rb @@ -0,0 +1,6 @@ +class AddColumnToApplyResource < ActiveRecord::Migration + def change + add_column :apply_resources, :container_id, :integer + add_column :apply_resources, :container_type, :string + end +end diff --git a/db/migrate/20160518060243_add_column_content_to_apply_resource.rb b/db/migrate/20160518060243_add_column_content_to_apply_resource.rb new file mode 100644 index 000000000..e741527e0 --- /dev/null +++ b/db/migrate/20160518060243_add_column_content_to_apply_resource.rb @@ -0,0 +1,6 @@ +class AddColumnContentToApplyResource < ActiveRecord::Migration + def change + add_column :apply_resources, :content, :text + add_column :apply_resources, :apply_user_id, :integer + end +end diff --git a/lib/rails_kindeditor/config/routes.rb b/lib/rails_kindeditor/config/routes.rb index 86b888ad3..e205376d9 100644 --- a/lib/rails_kindeditor/config/routes.rb +++ b/lib/rails_kindeditor/config/routes.rb @@ -2,6 +2,6 @@ Rails.application.routes.draw do namespace :kindeditor do post "/upload" => "assets#create" get "/filemanager" => "assets#list" - get "/uploadpic" => "assets#uploadpic" + post "/uploadpic" => "assets#uploadpic" end end \ No newline at end of file diff --git a/lib/wechat/bin/wechat b/lib/wechat/bin/wechat old mode 100644 new mode 100755 diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 9ae1300e7..a8c17345b 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -2539,7 +2539,7 @@ function _nativeCommand(doc, key, val) { function _nativeCommandValue(doc, key) { var val = ''; try { - val = doc.queryCommandValue(key); + val = doc.query_nativeCommand(self.doc, name, val);Value(key); } catch (e) {} if (typeof val !== 'string') { val = ''; @@ -5694,7 +5694,9 @@ _plugin('core', function(K) { } } else { //alert(data.message); - alert("浠呮敮鎸佸涓嬪浘鐗囨牸寮:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF"); +// alert("浠呮敮鎸佸涓嬪浘鐗囨牸寮:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF"); + var htmlvalue = "
      浠呮敮鎸佸涓嬪浘鐗囨牸寮:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF!

      "; + pop_up_box(htmlvalue,580,30,50); } }, afterError : function(str) { diff --git a/public/assets/kindeditor/pasteimg.js b/public/assets/kindeditor/pasteimg.js index 8831ba300..97d5e33c5 100644 --- a/public/assets/kindeditor/pasteimg.js +++ b/public/assets/kindeditor/pasteimg.js @@ -370,6 +370,9 @@ function df(myself) { else sstr += that.attr("src") + "|"; } + else if (that.attr("src").indexOf("data:image") >= 0){ + that.parents().removeAttr("href"); //鍒犻櫎鎵鏈夌埗鑺傜偣鐨刪ref + } } }); uploadpic(sstr,myself); @@ -397,7 +400,7 @@ function uploadpic(piclist,myself) { $.ajax({ url: "/kindeditor/uploadpic", data:{"pic":piclist}, - type: "GET", + type: "POST", beforeSend: function () { // $("#ajax-indicator span").text("鍥剧墖涓婁紶涓绋嶇瓑..."); keShadow(myself); @@ -416,9 +419,11 @@ function uploadpic(piclist,myself) { that.attr("src", str[tIndex]); that.attr("data-ke-src", str[tIndex]); + //澶嶅埗杩囨潵甯︾殑閾炬帴class绛夐兘瑕佸幓鎺 鍜岃棰戝浘鐗囨湁鍏崇郴 that.removeAttr("class"); that.parent().removeAttr("class"); - that.parent().removeAttr("href"); + that.parents().removeAttr("href"); //鍒犻櫎鎵鏈夌埗鑺傜偣鐨刪ref +// that.parent().removeAttr("href"); that.parent().removeAttr("data-ke-src"); tIndex = tIndex + 1; } diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css index b9c8252e8..65c75d6ea 100644 --- a/public/assets/kindeditor/plugins/code/previewcode.css +++ b/public/assets/kindeditor/plugins/code/previewcode.css @@ -51,5 +51,6 @@ span.at {color:#269ac9;} span.at a{color:#269ac9;text-decoration: none;} /*yk*/ -.ke-content ol li{list-style-type: decimal;margin-left: 20px;} -.ke-content ul li{list-style-type: disc;margin-left: 20px;} \ No newline at end of file +.ke-content ol li{list-style-type: decimal;} +.ke-content ul li{list-style-type: disc;} +.ke-content ol,.ke-content ul{margin-top:0;margin-bottom: 0;} \ No newline at end of file diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index f0f8e9c92..b4e582336 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -17,18 +17,18 @@
      - +
      - 杩熶氦鎵e垎锛歿{act.homework_common_detail.late_penalty}}鍒 鍖胯瘎寮鍚椂闂达細{{act.homework_common_detail.evaluation_start}}
      - 缂鸿瘎鎵e垎锛歿{act.homework_common_detail.absence_penalty}}鍒/浣滃搧 鍖胯瘎鍏抽棴鏃堕棿锛歿{act.homework_common_detail.evaluation_end}} + 杩熶氦鎵e垎锛歿{act.homework_common_detail.late_penalty}}鍒 鍖胯瘎寮鍚椂闂达細{{act.homework_common_detail.evaluation_start}}
      + 缂鸿瘎鎵e垎锛歿{act.homework_common_detail.absence_penalty}}鍒/浣滃搧 鍖胯瘎鍏抽棴鏃堕棿锛歿{act.homework_common_detail.evaluation_end}}
      鐐瑰嚮灞曞紑
      {{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -46,7 +46,7 @@
      - +
      @@ -54,8 +54,8 @@
      {{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -73,7 +73,7 @@
      - +
      @@ -81,8 +81,8 @@
      {{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -98,8 +98,8 @@
      - - + +
      @@ -116,7 +116,7 @@
      - +
      鐘舵侊細{{act.issue_detail.issue_status}} 浼樺厛绾э細{{act.issue_detail.issue_priority}}
      @@ -126,8 +126,8 @@
      {{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -146,7 +146,7 @@
      - +
      @@ -154,8 +154,8 @@
      {{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -170,8 +170,8 @@
      - - + +
      @@ -195,8 +195,8 @@ 鐐瑰嚮灞曞紑
      {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      @@ -215,15 +215,15 @@
      - +
      鐐瑰嚮灞曞紑
      {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
      {{act.praise_count}}
      {{act.praise_count}}
      diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index c1133f955..514a2c94e 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -3,7 +3,7 @@
      -
      {{blog.title}}
      +
      {{blog.title}}      
      {{blog.user.realname}}鍙戣〃鍗氬
      @@ -32,13 +32,13 @@
      -
      +
      - +
      diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index e36fb3e27..d8c50364d 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -44,7 +44,7 @@
      - +
      diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 3b7965733..c426f2794 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -44,7 +44,7 @@
      - +
      diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index fec0c4cff..1af5e185d 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -16,10 +16,10 @@
      - 杩熶氦鎵e垎锛歿{homework.late_penalty}}鍒
      - 缂鸿瘎鎵e垎锛歿{homework.absence_penalty}}鍒/浣滃搧
      - 鍖胯瘎寮鍚椂闂达細{{homework.evaluation_start}}
      - 鍖胯瘎鍏抽棴鏃堕棿锛歿{homework.evaluation_end}}
      + 杩熶氦鎵e垎锛歿{homework.late_penalty}}鍒
      + 缂鸿瘎鎵e垎锛歿{homework.absence_penalty}}鍒/浣滃搧
      + 鍖胯瘎寮鍚椂闂达細{{homework.evaluation_start}}
      + 鍖胯瘎鍏抽棴鏃堕棿锛歿{homework.evaluation_end}}
      {{homework.publish_time}} @@ -50,7 +50,7 @@
      - +
    • diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index f61d803dd..950cbe18e 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -10,7 +10,7 @@ 鏉   婧愶細 - {{issue.project_name}}  |  椤圭洰缂洪櫡 + {{issue.project_name}}  |  椤圭洰闂
      @@ -48,7 +48,7 @@
      - +
    diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 0bc87214b..29660e4fd 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -36,7 +36,7 @@
    - +
    diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 24ed8c9fc..7968ba5d7 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -44,7 +44,7 @@
    - +
    diff --git a/public/javascripts/application.js b/public/javascripts/application.js index b09a8a811..aec0af070 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1045,6 +1045,7 @@ function showNormalImage(id) { $(image).attr('src',_src); return; } + //鏃犳牸寮忕殑鍥剧墖涓嶈鐐瑰嚮鏄剧ず澶у浘锛屾樉绀虹殑璇濅細鏈夐棶棰 var tmpsrc = image.attr('src'); if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) { var element = $("").attr("href", image.attr('src')); @@ -1286,3 +1287,75 @@ function description_showwords_ellipsis(id,num){ $("#intro_content_"+id).show(); } + +//by yk 寮规 value锛歨tml浠g爜鎴栬烦杞叾浠栭〉闈唬鐮 tWidth = 580 tTop=30 tLeft=50 +function pop_up_box(value,tWidth,tTop,tLeft){ + + if(!tWidth){ + var tWidth = 580; + } + + if(!tTop){ + var tTop = 30; + } + + if(!tLeft){ + var tLeft = 50; + } + + $("#ajax-modal").html(value); + showModal('ajax-modal', tWidth + "px"); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before(""); + $('#ajax-modal').parent().css("top", tTop+"%").css("left", tLeft+"%").css("padding-top", "10px").css("position", "fixed"); + $('#ajax-modal').parent().addClass("resourceUploadPopup"); + $('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px"); + + function hideModal(){ + $('#ajax-modal').hide(); + } +} + +//yk 鑷姩璇嗗埆URL 骞跺姞涓婇摼鎺 +function autoUrl(id){ + if ($("#"+id).children().length > 0 ){ + $("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){ + if ($(this).children().length == 0){ + var html = $(this).text(); + html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.銆俔)+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) { + //娌℃湁://鐨勯兘鍔犱笂http:// + var reStr = full; + if (full.length > 0){ + if (full.indexOf("://") >= 0){ + reStr = ""+full+""; + } + else{ + reStr = ""+full+""; + } + } + return reStr ; + }); + $(this).html(html); + } + }); + } + else{ + var html = $("#"+id).text(); + html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.銆俔)+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) { + //娌℃湁://鐨勯兘鍔犱笂http:// + var reStr = full; + if (full.length > 0){ + if (full.indexOf("://") >= 0){ + reStr = ""+full+""; + } + else{ + reStr = ""+full+""; + } + } + return reStr ; + }); + $("#"+id).html(html); + } +} + + diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 391774f0b..45d8de48b 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -11,11 +11,14 @@ $(function(){ var title = $('#program-title').val(); if (!src) { - alert('璇疯緭鍏ユ纭殑浠g爜'); + var htmlvalue = "
    璇疯緭鍏ユ纭殑浠g爜!

    "; + pop_up_box(htmlvalue,580,30,50); + return false; } if (!title) { - alert('璇疯緭鍏ユ爣棰'); + var htmlvalue = "
    璇疯緭鍏ユ爣棰!

    "; + pop_up_box(htmlvalue,580,30,50); return false; } return true; @@ -33,31 +36,6 @@ $(function(){ $('#test-program-btn').show(); return; } - /* - $.post( - '/student_work/program_test_ex', - {homework: homework_id, student_work_id: student_work_id, src: src, title: title, is_test: is_test}, - function(data,status){ - tested = true; - console.log(data); - if(data.index <=0){ - data.index = $('.ProResultTop').length+1; - } - - if (typeof cb == 'function') {cb(data); return;} - - var html=bt('t:result-list',data); - $('.ProResult').prepend(html); - - if (data.status==0 && is_test != 'true') { - var r=confirm("绛旈姝g‘锛屾槸鍚︾珛鍒绘彁浜?"); - if (r) { - $(".HomeWorkCon form").submit(); - } - } - } - ); - */ //鍏堟祴璇曚竴娆″苟杩斿洖娴嬭瘯闆嗕釜鏁板強缁撴灉鍐嶅垽鏂槸鍚﹂渶瑕佺户缁繘琛屾祴璇 var test_post = function(i, testid){ $.post( @@ -66,6 +44,22 @@ $(function(){ src: src, title: title, is_test: is_test,tIndex:i, testid: testid}, function(data,status){ + if (data.status==-4 || data.status==-5 ){ + //寮规 + var root_path = getRootPath(); + var forums_1_path = root_path + "/forums/1" + var htmlvalue = "
    鎮ㄧ殑绋嬪簭寮曞彂浜嗕笉鐭ュ悕寮傚父锛岃鍦ㄥ叕鍏辫创鍚ф彁浜ゆ偍鐨勪唬鐮佽繘琛屾剰瑙佸弽棣堬紝鎴戜滑澶勭悊鍚庝細绔嬪嵆鑱旂郴鎮紝璋㈣阿锛
    "; + pop_up_box(htmlvalue,580,30,50); + + $('#test-program-btn').show(); + return; + } + else if (data.status==-3){ + var htmlvalue = "
    瀵逛笉璧,鏈嶅姟鍣ㄧ箒蹇欒绋嶅悗鍐嶈瘯!

    "; + pop_up_box(htmlvalue,580,30,50); + $('#test-program-btn').show(); + return; + } var tSeq = data.tseq; var tCount = data.tcount; console.log("tSeq="+tSeq); @@ -81,10 +75,8 @@ $(function(){ if (data.status==0 && is_test != 'true') { if (typeof cb == 'function') {cb(data);$('#test-program-btn').show(); return;} - var r=confirm("绛旈姝g‘锛屾槸鍚︾珛鍒绘彁浜?"); - if (r) { - $(".HomeWorkCon form").submit(); - } + var htmlvalue = "
    绛旈姝g‘锛屾槸鍚︾珛鍒绘彁浜?

    "; + pop_up_box(htmlvalue,580,30,50); $('#test-program-btn').show(); return; } @@ -100,9 +92,11 @@ $(function(){ } ).fail(function(xhr, status){ if(status == 'timeout'){ - alert("鎮ㄧ殑绛旀瓒呮椂浜, 璇锋鏌ヤ唬鐮佹槸鍚﹀瓨鍦ㄦ寰幆鐨勯敊璇."); + var htmlvalue = "
    鎮ㄧ殑绛旀瓒呮椂浜, 璇锋鏌ヤ唬鐮佹槸鍚﹀瓨鍦ㄦ寰幆鐨勯敊璇!

    "; + pop_up_box(htmlvalue,580,30,50); } else { - alert("瀵逛笉璧,鏈嶅姟鍣ㄧ箒蹇欒绋嶅悗鍐嶈瘯!"); + var htmlvalue = "
    瀵逛笉璧,鏈嶅姟鍣ㄧ箒蹇欒绋嶅悗鍐嶈瘯!

    "; + pop_up_box(htmlvalue,580,30,50); } $('#test-program-btn').show(); return; @@ -120,20 +114,21 @@ $(function(){ return; } if($('.ProResult .ProResultTop').length<=0){ - var r=confirm("娴嬭瘯鍚庢墠鑳芥彁浜わ紝鏄惁绔嬪埢娴嬭瘯?"); - if (r) { + var htmlvalue = "
    娴嬭瘯鍚庢墠鑳芥彁浜わ紝鏄惁绔嬪埢娴嬭瘯?

    "; + pop_up_box(htmlvalue,580,30,50); + $("#code-test-button").on('click',function(){ test_program(); - } + hideModal(); + }); return; } - if (!tested) { test_program(function(data){ if (data.status!=0) { - var r=confirm("娴嬭瘯涓嶉氳繃锛屾槸鍚﹀己鍒舵彁浜?"); - if (!r) { - return; - } + var htmlvalue = "
    娴嬭瘯涓嶉氳繃锛屾槸鍚﹀己鍒舵彁浜?

    "; + pop_up_box(htmlvalue,580,30,50); + return; + }; $(".HomeWorkCon form").submit(); }); diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 16fa8cf03..da314c5f5 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -128,12 +128,15 @@ app.factory('common', function($http, auth, $routeParams){ openid: auth.openid() }; + data.disabled = true; + $http({ method: 'POST', url: apiUrl+ "new_comment/"+id, data: userInfo }).then(function successCallback(response) { alert("鎻愪氦鎴愬姛"); + data.disabled = false; if(typeof cb === 'function'){ cb(); } @@ -416,7 +419,6 @@ app.directive('textAutoHeight', function($timeout){ $timeout(function(){ var e = element.parent().children().eq(5); var height = e[0].scrollHeight; - var offsetHeight = e[0].offsetHeight; if(height>90){ element.css('display', 'block'); element.on('click', function(){ diff --git a/public/plugin_assets/redmine_code_review/javascripts/code_review.js b/public/plugin_assets/redmine_code_review/javascripts/code_review.js index 4f4d81691..625f376c9 100644 --- a/public/plugin_assets/redmine_code_review/javascripts/code_review.js +++ b/public/plugin_assets/redmine_code_review/javascripts/code_review.js @@ -1,354 +1,354 @@ -/* -# Code Review plugin for Redmine -# Copyright (C) 2009-2013 Haruyuki Iida -# -# 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. - */ - -var topZindex = 1000; -var action_type = ''; -var rev = ''; -var rev_to = ''; -var path = ''; -var urlprefix = ''; -var review_form_dialog = null; -var add_form_title = null; -var review_dialog_title = null; -var repository_id = null; -var filenames = []; - -var ReviewCount = function(total, open, progress){ - this.total = total; - this.open = open; - this.closed = total - open; - this.progress = progress -}; - -var CodeReview = function(id) { - this.id = id; - this.path = ''; - this.line = 0; - this.url = ''; - this.is_closed = false; -}; - -var review_counts = new Array(); -var code_reviews_map = new Array(); -var code_reviews_dialog_map = new Array(); - -function UpdateRepositoryView(title) { - var header = $("table.changesets thead tr:first"); - var th = $(''); - th.html(title); - header.append(th); - $('tr.changeset td.id a').each(function(i){ - var revision = this.getAttribute("href"); - revision = revision.substr(revision.lastIndexOf("/") + 1); - var review = review_counts['revision_' + revision]; - var td = $('',{ - 'class':'progress' - }); - td.html(review.progress); - $(this.parentNode.parentNode).append(td); - }); - } -//add function $.down -if(! $.fn.down) -(function($) { - $.fn.down = function() { - var el = this[0] && this[0].firstChild; - while (el && el.nodeType != 1) - el = el.nextSibling; - return $(el); - }; -})(jQuery); - -function UpdateRevisionView() { - $('li.change').each(function(){ - var li = $(this); - if (li.hasClass('folder')) return; - - var a = li.down('a'); - if (a.size() == 0) return; - var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); - - var reviewlist = code_reviews_map[path]; - if (reviewlist == null) return; - - var ul = $('
      '); - for (var j = 0; j < reviewlist.length; j++) { - var review = reviewlist[j]; - var icon = review.is_closed? 'icon-closed-review': 'icon-review'; - var item = $('
    • ', { - 'class': 'icon ' + icon + ' code_review_summary' - }); - item.html(review.url); - ul.append(item); - } - li.append(ul); - }); -} - -function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ - var filetables = []; - var j = 0; - $('table').each(function(){ - if($(this).hasClass('filecontent')){ - filetables[j++] = this; - } - }); - j = 0; - $('table.filecontent th.filename').each(function(){ - filenames[j] = $.trim($(this).text()); - j++; - }); - addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + - '&rev=' + rev + '&rev_to=' + rev_to + - '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); - if (path != null && path.length > 0) { - addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); - } - var num = 0; - if (is_diff) { - num = 1; - } - var i, l, tl; - for (i = 0, tl = filetables.length; i < tl; i++) { - var table = filetables[i]; - var trs = table.getElementsByTagName('tr'); - - for (j = 0,l = trs.length; j < l; j++) { - var tr = trs[j]; - var ths = tr.getElementsByTagName('th'); - - var th = ths[num]; - if (th == null) { - continue; - } - - var th_html = th.innerHTML; - - var line = th_html.match(/[0-9]+/); - if (line == null) { - continue; - } - - var span_html = ''; - - if (!is_readonly) { - span_html += image_tag; - } - span_html += ''; - th.innerHTML = th_html + span_html; - - var img = th.getElementsByTagName('img')[0]; - if (img != null ) { - img.id = 'add_revew_img_' + line + '_' + i; - $(img).click(clickPencil); - } - } - } - - -} - -function clickPencil(e) -{ -// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); - var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); - var line = result[1]; - var file_count = eval(result[2]); - var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; - - if (path == null || path.length == 0) { - url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; - } - addReview(url); - formPopup(e.pageX, e.pageY); - e.preventDefault(); -} -var addReviewUrl = null; -var showReviewUrl = null; -var showReviewImageTag = null; -var showClosedReviewImageTag = null; - -function setShowReviewButton(line, review_id, is_closed, file_count) { - //alert('file_count = ' + file_count); - var span = $('#review_span_' + line + '_' + file_count); - if (span.size() == 0) { - return; - } - var innerSpan = $('',{id: 'review_' + review_id}); - span.append(innerSpan); - innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); - var div = $('
      ', { - 'class':'draggable', - id: 'show_review_' + review_id - }); - $('#code_review').append(div); - innerSpan.down('img').click(function(e) { - var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; - var span = $('#review_' + review_id); // span element of view review button - var pos = span.offset(); - showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); - }); -} - -function popupReview(review_id) { - var span = $('#review_' + review_id); // span element of view review button - var pos = span.offset(); - $('html,body').animate({ scrollTop: pos.top }, - {duration: 'fast', - complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); - // position and show popup dialog - // create popup dialog - //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); -// win.toFront(); -} - -function showReview(url, review_id, x, y) { - if (code_reviews_dialog_map[review_id] != null) { - var cur_win = code_reviews_dialog_map[review_id]; - cur_win.hide(); - code_reviews_dialog_map[review_id] = null; - } - $('#show_review_' + review_id).load(url, {review_id: review_id}); - var review = getReviewObjById(review_id); - - var win = $('#show_review_' + review_id).dialog({ - show: {effect:'scale'},// ? 'top-left' - //position: [x, y + 5], - width:640, - zIndex: topZindex, - title: review_dialog_title - }); -// win.getContent().style.color = "#484848"; -// win.getContent().style.background = "#ffffff"; - topZindex++; - code_reviews_dialog_map[review_id] = win; - return win -} - -function getReviewObjById(review_id) { - for (var reviewlist in code_reviews_map) { - for (var i = 0; i < reviewlist.length; i++) { - var review = reviewlist[i]; - if (review.id == review_id) { - return review; - } - } - } - return null; -} - -function formPopup(x, y){ - //@see http://docs.jquery.com/UI/Effects/Scale - var win = $('#review-form-frame').dialog({ - show: {effect:'scale', direction: 'both'},// ? 'top-left' -// position: [x, y + 5], - width:640, - zIndex: topZindex, - title: add_form_title - }); -// win.getContent().style.background = "#ffffff"; - if (review_form_dialog != null) { - review_form_dialog.destroy(); - review_form_dialog = null; - } - review_form_dialog = win; - topZindex += 10; - return false; -} - -function hideForm() { - if (review_form_dialog == null) { - return; - } - review_form_dialog.dialog('close'); - review_form_dialog = null; - $('#review-form').html(''); -} -function addReview(url) { - $('#review-form').load(url); -} - -function deleteReview(review_id) { - $('show_review_' + review_id).remove(); - $('review_' + review_id).remove(); - -} - -function changeImage(review_id, is_closed) { - var span = $('review_' + review_id); - var new_image = null; - var dummy = new Element('span'); - if (is_closed) { - dummy.insert(showClosedReviewImageTag); - } - else { - dummy.insert(showReviewImageTag); - } - new_image = dummy.down().getAttribute('src'); - //alert(new_image); - span.down('img').setAttribute('src', new_image); - -} - -function make_addreview_link(project, link) { - var alist = $('#content p a'); - if (alist == null) { - return; - } - var a = alist[0]; - var p = a.parentNode; - p.innerHTML = p.innerHTML + " | " + link; -} - -function call_update_revisions(url) { - var changeset_ids = ''; - var links = $$('table.changesets tbody tr.changeset td.id a'); - for (var i = 0; i < links.length; i++) { - var link = links[i]; - var href = link.getAttribute('href'); - var id = href.replace(/^.*\/revisions\//, ''); - if (i > 0) { - changeset_ids += ','; - } - changeset_ids += id; - } - new Ajax.Updater('code_review_revisions', url, - { - evalScripts:true, - method:'get', - parameters: 'changeset_ids=' + encodeURI(changeset_ids) - }); -} - -$.fn.serialize2json = function() -{ - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name]) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; +/* +# Code Review plugin for Redmine +# Copyright (C) 2009-2013 Haruyuki Iida +# +# 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. + */ + +var topZindex = 1000; +var action_type = ''; +var rev = ''; +var rev_to = ''; +var path = ''; +var urlprefix = ''; +var review_form_dialog = null; +var add_form_title = null; +var review_dialog_title = null; +var repository_id = null; +var filenames = []; + +var ReviewCount = function(total, open, progress){ + this.total = total; + this.open = open; + this.closed = total - open; + this.progress = progress +}; + +var CodeReview = function(id) { + this.id = id; + this.path = ''; + this.line = 0; + this.url = ''; + this.is_closed = false; +}; + +var review_counts = new Array(); +var code_reviews_map = new Array(); +var code_reviews_dialog_map = new Array(); + +function UpdateRepositoryView(title) { + var header = $("table.changesets thead tr:first"); + var th = $(''); + th.html(title); + header.append(th); + $('tr.changeset td.id a').each(function(i){ + var revision = this.getAttribute("href"); + revision = revision.substr(revision.lastIndexOf("/") + 1); + var review = review_counts['revision_' + revision]; + var td = $('',{ + 'class':'progress' + }); + td.html(review.progress); + $(this.parentNode.parentNode).append(td); + }); + } +//add function $.down +if(! $.fn.down) +(function($) { + $.fn.down = function() { + var el = this[0] && this[0].firstChild; + while (el && el.nodeType != 1) + el = el.nextSibling; + return $(el); + }; +})(jQuery); + +function UpdateRevisionView() { + $('li.change').each(function(){ + var li = $(this); + if (li.hasClass('folder')) return; + + var a = li.down('a'); + if (a.size() == 0) return; + var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); + + var reviewlist = code_reviews_map[path]; + if (reviewlist == null) return; + + var ul = $('
        '); + for (var j = 0; j < reviewlist.length; j++) { + var review = reviewlist[j]; + var icon = review.is_closed? 'icon-closed-review': 'icon-review'; + var item = $('
      • ', { + 'class': 'icon ' + icon + ' code_review_summary' + }); + item.html(review.url); + ul.append(item); + } + li.append(ul); + }); +} + +function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ + var filetables = []; + var j = 0; + $('table').each(function(){ + if($(this).hasClass('filecontent')){ + filetables[j++] = this; + } + }); + j = 0; + $('table.filecontent th.filename').each(function(){ + filenames[j] = $.trim($(this).text()); + j++; + }); + addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + + '&rev=' + rev + '&rev_to=' + rev_to + + '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); + if (path != null && path.length > 0) { + addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); + } + var num = 0; + if (is_diff) { + num = 1; + } + var i, l, tl; + for (i = 0, tl = filetables.length; i < tl; i++) { + var table = filetables[i]; + var trs = table.getElementsByTagName('tr'); + + for (j = 0,l = trs.length; j < l; j++) { + var tr = trs[j]; + var ths = tr.getElementsByTagName('th'); + + var th = ths[num]; + if (th == null) { + continue; + } + + var th_html = th.innerHTML; + + var line = th_html.match(/[0-9]+/); + if (line == null) { + continue; + } + + var span_html = ''; + + if (!is_readonly) { + span_html += image_tag; + } + span_html += ''; + th.innerHTML = th_html + span_html; + + var img = th.getElementsByTagName('img')[0]; + if (img != null ) { + img.id = 'add_revew_img_' + line + '_' + i; + $(img).click(clickPencil); + } + } + } + + +} + +function clickPencil(e) +{ +// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); + var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); + var line = result[1]; + var file_count = eval(result[2]); + var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; + + if (path == null || path.length == 0) { + url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; + } + addReview(url); + formPopup(e.pageX, e.pageY); + e.preventDefault(); +} +var addReviewUrl = null; +var showReviewUrl = null; +var showReviewImageTag = null; +var showClosedReviewImageTag = null; + +function setShowReviewButton(line, review_id, is_closed, file_count) { + //alert('file_count = ' + file_count); + var span = $('#review_span_' + line + '_' + file_count); + if (span.size() == 0) { + return; + } + var innerSpan = $('',{id: 'review_' + review_id}); + span.append(innerSpan); + innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); + var div = $('
        ', { + 'class':'draggable', + id: 'show_review_' + review_id + }); + $('#code_review').append(div); + innerSpan.down('img').click(function(e) { + var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; + var span = $('#review_' + review_id); // span element of view review button + var pos = span.offset(); + showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); + }); +} + +function popupReview(review_id) { + var span = $('#review_' + review_id); // span element of view review button + var pos = span.offset(); + $('html,body').animate({ scrollTop: pos.top }, + {duration: 'fast', + complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); + // position and show popup dialog + // create popup dialog + //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); +// win.toFront(); +} + +function showReview(url, review_id, x, y) { + if (code_reviews_dialog_map[review_id] != null) { + var cur_win = code_reviews_dialog_map[review_id]; + cur_win.hide(); + code_reviews_dialog_map[review_id] = null; + } + $('#show_review_' + review_id).load(url, {review_id: review_id}); + var review = getReviewObjById(review_id); + + var win = $('#show_review_' + review_id).dialog({ + show: {effect:'scale'},// ? 'top-left' + //position: [x, y + 5], + width:640, + zIndex: topZindex, + title: review_dialog_title + }); +// win.getContent().style.color = "#484848"; +// win.getContent().style.background = "#ffffff"; + topZindex++; + code_reviews_dialog_map[review_id] = win; + return win +} + +function getReviewObjById(review_id) { + for (var reviewlist in code_reviews_map) { + for (var i = 0; i < reviewlist.length; i++) { + var review = reviewlist[i]; + if (review.id == review_id) { + return review; + } + } + } + return null; +} + +function formPopup(x, y){ + //@see http://docs.jquery.com/UI/Effects/Scale + var win = $('#review-form-frame').dialog({ + show: {effect:'scale', direction: 'both'},// ? 'top-left' +// position: [x, y + 5], + width:640, + zIndex: topZindex, + title: add_form_title + }); +// win.getContent().style.background = "#ffffff"; + if (review_form_dialog != null) { + review_form_dialog.destroy(); + review_form_dialog = null; + } + review_form_dialog = win; + topZindex += 10; + return false; +} + +function hideForm() { + if (review_form_dialog == null) { + return; + } + review_form_dialog.dialog('close'); + review_form_dialog = null; + $('#review-form').html(''); +} +function addReview(url) { + $('#review-form').load(url); +} + +function deleteReview(review_id) { + $('show_review_' + review_id).remove(); + $('review_' + review_id).remove(); + +} + +function changeImage(review_id, is_closed) { + var span = $('review_' + review_id); + var new_image = null; + var dummy = new Element('span'); + if (is_closed) { + dummy.insert(showClosedReviewImageTag); + } + else { + dummy.insert(showReviewImageTag); + } + new_image = dummy.down().getAttribute('src'); + //alert(new_image); + span.down('img').setAttribute('src', new_image); + +} + +function make_addreview_link(project, link) { + var alist = $('#content p a'); + if (alist == null) { + return; + } + var a = alist[0]; + var p = a.parentNode; + p.innerHTML = p.innerHTML + " | " + link; +} + +function call_update_revisions(url) { + var changeset_ids = ''; + var links = $$('table.changesets tbody tr.changeset td.id a'); + for (var i = 0; i < links.length; i++) { + var link = links[i]; + var href = link.getAttribute('href'); + var id = href.replace(/^.*\/revisions\//, ''); + if (i > 0) { + changeset_ids += ','; + } + changeset_ids += id; + } + new Ajax.Updater('code_review_revisions', url, + { + evalScripts:true, + method:'get', + parameters: 'changeset_ids=' + encodeURI(changeset_ids) + }); +} + +$.fn.serialize2json = function() +{ + var o = {}; + var a = this.serializeArray(); + $.each(a, function() { + if (o[this.name]) { + if (!o[this.name].push) { + o[this.name] = [o[this.name]]; + } + o[this.name].push(this.value || ''); + } else { + o[this.name] = this.value || ''; + } + }); + return o; }; \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/activity.css b/public/plugin_assets/redmine_code_review/stylesheets/activity.css index 202ed54e3..e3cdc3d55 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/activity.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/activity.css @@ -1,4 +1,4 @@ - -dt.code_review { - background-image: url(../images/review.png); + +dt.code_review { + background-image: url(../images/review.png); } \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css index e25dc6d72..11939ae79 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css @@ -1,97 +1,97 @@ -/* -# Code Review plugin for Redmine -# Copyright (C) 2009 Haruyuki Iida -# -# 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. -*/ -#review-form-frame { -height: 100%; -} - -.autoscroll table.filecontent th.line-num { - white-space: nowrap; - vertical-align: bottom; - padding-top: 0; - padding-bottom: 0; - text-align:left; -} - -table.filecontent th.line-num img{ - padding: 0; - margin: 0; - cursor: pointer; -} - - -.code-review-form-title { - background-color: #002059; - color: white; - padding-left: 2px; - padding-right: 2px; - cursor: default; -} - - -.code_review_viewer { - - min-width: 300px; - /* - max-width: 60%; - */ - /* max-height: 400px; */ -} - -.code_review_viewer .issue{ - -} - -.code_review_body { - background-color: white; - - padding:2px; - -} - -#code_review_list table.list td { - text-align: center; -} - -#code_review_list table.list td.path { - text-align: left; -} - -#code_review_list table.list td.subject { - text-align: left; -} - -.icon-review { - background-image: url(../images/review.png); - background-repeat: no-repeat; -} - -.icon-closed-review { - background-image: url(../images/closed_review.png); - background-repeat: no-repeat; -} - -.icon-settings { - background-image: url(../../../images/changeset.png); - background-repeat: no-repeat; -} - - -li.code_review_summary { - list-style-type: none; +/* +# Code Review plugin for Redmine +# Copyright (C) 2009 Haruyuki Iida +# +# 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. +*/ +#review-form-frame { +height: 100%; +} + +.autoscroll table.filecontent th.line-num { + white-space: nowrap; + vertical-align: bottom; + padding-top: 0; + padding-bottom: 0; + text-align:left; +} + +table.filecontent th.line-num img{ + padding: 0; + margin: 0; + cursor: pointer; +} + + +.code-review-form-title { + background-color: #002059; + color: white; + padding-left: 2px; + padding-right: 2px; + cursor: default; +} + + +.code_review_viewer { + + min-width: 300px; + /* + max-width: 60%; + */ + /* max-height: 400px; */ +} + +.code_review_viewer .issue{ + +} + +.code_review_body { + background-color: white; + + padding:2px; + +} + +#code_review_list table.list td { + text-align: center; +} + +#code_review_list table.list td.path { + text-align: left; +} + +#code_review_list table.list td.subject { + text-align: left; +} + +.icon-review { + background-image: url(../images/review.png); + background-repeat: no-repeat; +} + +.icon-closed-review { + background-image: url(../images/closed_review.png); + background-repeat: no-repeat; +} + +.icon-settings { + background-image: url(../../../images/changeset.png); + background-repeat: no-repeat; +} + + +li.code_review_summary { + list-style-type: none; } \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE index 0a7cf9ad1..5bcdad1bd 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE @@ -1,19 +1,19 @@ -Copyright (c) 2006 S茅bastien Gruhier (http://xilinus.com, http://itseb.com) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (c) 2006 S茅bastien Gruhier (http://xilinus.com, http://itseb.com) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css index 4846e6185..432d14e36 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css @@ -1,119 +1,119 @@ -.overlay_alert { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alert_nw { - width: 5px; - height: 5px; - background: transparent url(alert/top_left.gif) no-repeat bottom left; -} - -.alert_n { - height: 5px; - background: transparent url(alert/top.gif) repeat-x bottom left; -} - -.alert_ne { - width: 5px; - height: 5px; - background: transparent url(alert/top_right.gif) no-repeat bottom left -} - -.alert_e { - width: 5px; - background: transparent url(alert/right.gif) repeat-y 0 0; -} - -.alert_w { - width: 5px; - background: transparent url(alert/left.gif) repeat-y 0 0; -} - -.alert_sw { - width: 5px; - height: 5px; - background: transparent url(alert/bottom_left.gif) no-repeat 0 0; -} - -.alert_s { - height: 5px; - background: transparent url(alert/bottom.gif) repeat-x 0 0; -} - -.alert_se, .alert_sizer { - width: 5px; - height: 5px; - background: transparent url(alert/bottom_right.gif) no-repeat 0 0; -} - -.alert_close { - width:0px; - height:0px; - display:none; -} - -.alert_minimize { - width:0px; - height:0px; - display:none; -} - -.alert_maximize { - width:0px; - height:0px; - display:none; -} - -.alert_title { - float:left; - height:1px; - width:100%; -} - -.alert_content { - overflow:visible; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font: 12px arial; - background: #FFF; -} - -/* For alert/confirm dialog */ -.alert_window { - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alert_message { - font: 12px arial; - width:100%; - color:#F00; - padding-bottom:10px; -} - -.alert_buttons { - text-align:center; - width:100%; -} - -.alert_buttons input { - width:20%; - margin:10px; -} - -.alert_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - - +.overlay_alert { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_nw { + width: 5px; + height: 5px; + background: transparent url(alert/top_left.gif) no-repeat bottom left; +} + +.alert_n { + height: 5px; + background: transparent url(alert/top.gif) repeat-x bottom left; +} + +.alert_ne { + width: 5px; + height: 5px; + background: transparent url(alert/top_right.gif) no-repeat bottom left +} + +.alert_e { + width: 5px; + background: transparent url(alert/right.gif) repeat-y 0 0; +} + +.alert_w { + width: 5px; + background: transparent url(alert/left.gif) repeat-y 0 0; +} + +.alert_sw { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_left.gif) no-repeat 0 0; +} + +.alert_s { + height: 5px; + background: transparent url(alert/bottom.gif) repeat-x 0 0; +} + +.alert_se, .alert_sizer { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_right.gif) no-repeat 0 0; +} + +.alert_close { + width:0px; + height:0px; + display:none; +} + +.alert_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_title { + float:left; + height:1px; + width:100%; +} + +.alert_content { + overflow:visible; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background: #FFF; +} + +/* For alert/confirm dialog */ +.alert_window { + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_message { + font: 12px arial; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_buttons { + text-align:center; + width:100%; +} + +.alert_buttons input { + width:20%; + margin:10px; +} + +.alert_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css index a74fc71c3..c2ad538ca 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css @@ -1,88 +1,88 @@ -.overlay_alert_lite { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alert_lite_sizer { - width:0px; - height:0px; - display:none; -} - -.alert_lite_close { - width:0px; - height:0px; - display:none; -} - -.alert_lite_minimize { - width:0px; - height:0px; - display:none; -} - -.alert_lite_maximize { - width:0px; - height:0px; - display:none; -} - -.alert_lite_title { - width:0px; - height:0px; - display:none; -} - -.alert_lite_content { - overflow:auto; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background: #FFF; -} - - -/* For alert/confirm dialog */ -.alert_lite_window { - border:1px solid #F00; - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alert_lite_message { - font-size:16px; - text-align:center; - width:100%; - color:#F00; - padding-bottom:10px; -} - -.alert_lite_buttons { - text-align:center; - width:100%; -} - -.alert_lite_buttons input { - width:20%; - margin:10px; -} - -.alert_lite_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - -table.alert_lite_header { - border:1px solid #F00; - background:#FFF -} - +.overlay_alert_lite { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_lite_sizer { + width:0px; + height:0px; + display:none; +} + +.alert_lite_close { + width:0px; + height:0px; + display:none; +} + +.alert_lite_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_title { + width:0px; + height:0px; + display:none; +} + +.alert_lite_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background: #FFF; +} + + +/* For alert/confirm dialog */ +.alert_lite_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_lite_message { + font-size:16px; + text-align:center; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_lite_buttons { + text-align:center; + width:100%; +} + +.alert_lite_buttons input { + width:20%; + margin:10px; +} + +.alert_lite_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +table.alert_lite_header { + border:1px solid #F00; + background:#FFF +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css index 6d2862c0e..7d2790e75 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css @@ -1,150 +1,150 @@ -.overlay_alphacube { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alphacube_nw { - background: transparent url(alphacube/left-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.alphacube_n { - background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; - height:25px; -} - -.alphacube_ne { - background: transparent url(alphacube/right-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.alphacube_w { - background: transparent url(alphacube/frame-left.gif) repeat-y top left; - width:7px; -} - -.alphacube_e { - background: transparent url(alphacube/frame-right.gif) repeat-y top right; - width:7px; -} - -.alphacube_sw { - background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.alphacube_s { - background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; - height:7px; -} - -.alphacube_se, .alphacube_sizer { - background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.alphacube_sizer { - cursor:se-resize; -} - -.alphacube_close { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:11px; - cursor:pointer; - z-index:1000; -} - -.alphacube_minimize { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:55px; - cursor:pointer; - z-index:1000; -} - -.alphacube_maximize { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:33px; - cursor:pointer; - z-index:1000; -} - -.alphacube_title { - float:left; - height:14px; - font-size:14px; - text-align:center; - margin-top:2px; - width:100%; - color:#123456; -} - -.alphacube_content { - overflow:auto; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font: 12px arial; - background:#FDFDFD; -} - -/* For alert/confirm dialog */ -.alphacube_window { - border:1px solid #F00; - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alphacube_message { - font: 12px arial; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.alphacube_buttons { - text-align:center; - width:100%; -} - -.alphacube_buttons input { - width:20%; - margin:10px; -} - -.alphacube_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - -.alphacube_wired_frame { - background: #FFF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - - +.overlay_alphacube { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alphacube_nw { + background: transparent url(alphacube/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_n { + background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.alphacube_ne { + background: transparent url(alphacube/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_w { + background: transparent url(alphacube/frame-left.gif) repeat-y top left; + width:7px; +} + +.alphacube_e { + background: transparent url(alphacube/frame-right.gif) repeat-y top right; + width:7px; +} + +.alphacube_sw { + background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_s { + background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.alphacube_se, .alphacube_sizer { + background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_sizer { + cursor:se-resize; +} + +.alphacube_close { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.alphacube_minimize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.alphacube_maximize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.alphacube_title { + float:left; + height:14px; + font-size:14px; + text-align:center; + margin-top:2px; + width:100%; + color:#123456; +} + +.alphacube_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background:#FDFDFD; +} + +/* For alert/confirm dialog */ +.alphacube_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alphacube_message { + font: 12px arial; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.alphacube_buttons { + text-align:center; + width:100%; +} + +.alphacube_buttons input { + width:20%; + margin:10px; +} + +.alphacube_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +.alphacube_wired_frame { + background: #FFF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc index e5c6edc1c..437c5ec92 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc @@ -1,51 +1,51 @@ - - - + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css index e3df3e0a4..2f83cfd46 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css @@ -1,121 +1,121 @@ -.overlay_darkX { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.darkX_nw { - background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_n { - background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; - height:21px; -} -.darkX_ne { - background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_w { - background: transparent url(darkX/frame-left-focused.png) repeat-y top left; - width:3px; -} - -.darkX_e { - background: transparent url(darkX/frame-right-focused.png) repeat-y top right; - width:3px; -} - -.darkX_sw { - background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} -.darkX_s { - background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; - height:3px; -} -.darkX_se, .darkX_sizer { - background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} - -.darkX_sizer { - cursor:se-resize; -} - -.darkX_close { - width: 21px; - height: 21px; - background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:5px; - cursor:pointer; - z-index:1000; -} - -.darkX_minimize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:26px; - cursor:pointer; - z-index:1000; -} - -.darkX_maximize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:47px; - cursor:pointer; - z-index:1000; -} - - -.darkX_title { - float:left; - height:14px; - font-size:12px; - text-align:center; - margin-top:2px; - width:100%; - color:#FFF; -} - -.darkX_content { - overflow:auto; - color: #E6DF2A; - font-family: Tahoma, Arial, sans-serif; - font-size: 14px; - background:#5E5148; -} - - -/* FOR IE */ -* html .darkX_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); -} - -* html .darkX_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); -} - -* html .darkX_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); -} +.overlay_darkX { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.darkX_nw { + background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_n { + background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; + height:21px; +} +.darkX_ne { + background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_w { + background: transparent url(darkX/frame-left-focused.png) repeat-y top left; + width:3px; +} + +.darkX_e { + background: transparent url(darkX/frame-right-focused.png) repeat-y top right; + width:3px; +} + +.darkX_sw { + background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} +.darkX_s { + background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; + height:3px; +} +.darkX_se, .darkX_sizer { + background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} + +.darkX_sizer { + cursor:se-resize; +} + +.darkX_close { + width: 21px; + height: 21px; + background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:5px; + cursor:pointer; + z-index:1000; +} + +.darkX_minimize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:26px; + cursor:pointer; + z-index:1000; +} + +.darkX_maximize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:47px; + cursor:pointer; + z-index:1000; +} + + +.darkX_title { + float:left; + height:14px; + font-size:12px; + text-align:center; + margin-top:2px; + width:100%; + color:#FFF; +} + +.darkX_content { + overflow:auto; + color: #E6DF2A; + font-family: Tahoma, Arial, sans-serif; + font-size: 14px; + background:#5E5148; +} + + +/* FOR IE */ +* html .darkX_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); +} + +* html .darkX_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); +} + +* html .darkX_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); +} diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css index d7981e9ca..69e3b7fc2 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css @@ -1,25 +1,25 @@ -div.inspector div.inspectable { - padding: 0.25em 0 0.25em 1em; - background-color: Gray; - color: white; - border: outset 2px white; - cursor: pointer; -} - -div.inspector div.child { - margin: 0 0 0 1em; -} - -#debug_window_content { /* DIV container for debug sizing*/ - width:250px; - height:100px; - background-color:#000; -} - -#debug { /* DIV container for debug contents*/ - padding:3px; - color:#0f0; - font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size:10px; -} - +div.inspector div.inspectable { + padding: 0.25em 0 0.25em 1em; + background-color: Gray; + color: white; + border: outset 2px white; + cursor: pointer; +} + +div.inspector div.child { + margin: 0 0 0 1em; +} + +#debug_window_content { /* DIV container for debug sizing*/ + width:250px; + height:100px; + background-color:#000; +} + +#debug { /* DIV container for debug contents*/ + padding:3px; + color:#0f0; + font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size:10px; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css index 591451723..6ab13789d 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css @@ -1,155 +1,155 @@ -.overlay_dialog { - background-color: #666666; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.overlay___invisible__ { - background-color: #666666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.dialog_nw { - width: 9px; - height: 23px; - background: transparent url(default/top_left.gif) no-repeat 0 0; -} - -.dialog_n { - background: transparent url(default/top_mid.gif) repeat-x 0 0; - height: 23px; -} - -.dialog_ne { - width: 9px; - height: 23px; - background: transparent url(default/top_right.gif) no-repeat 0 0; -} - -.dialog_e { - width: 2px; - background: transparent url(default/center_right.gif) repeat-y 0 0; -} - -.dialog_w { - width: 2px; - background: transparent url(default/center_left.gif) repeat-y 0 0; -} - -.dialog_sw { - width: 9px; - height: 19px; - background: transparent url(default/bottom_left.gif) no-repeat 0 0; -} - -.dialog_s { - background: transparent url(default/bottom_mid.gif) repeat-x 0 0; - height: 19px; -} - -.dialog_se { - width: 9px; - height: 19px; - background: transparent url(default/bottom_right.gif) no-repeat 0 0; -} - -.dialog_sizer { - width: 9px; - height: 19px; - background: transparent url(default/sizer.gif) no-repeat 0 0; - cursor:se-resize; -} - -.dialog_close { - width: 14px; - height: 14px; - background: transparent url(default/close.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:8px; - cursor:pointer; - z-index:2000; -} - -.dialog_minimize { - width: 14px; - height: 15px; - background: transparent url(default/minimize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:28px; - cursor:pointer; - z-index:2000; -} - -.dialog_maximize { - width: 14px; - height: 15px; - background: transparent url(default/maximize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:49px; - cursor:pointer; - z-index:2000; -} - -.dialog_title { - float:left; - height:14px; - font-family: Tahoma, Arial, sans-serif; - font-size:12px; - text-align:center; - width:100%; - color:#000; -} - -.dialog_content { - overflow:auto; - color: #DDD; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background-color:#123; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display: block; - position: absolute; - border: 1px #000 dashed; -} - -/* DO NOT CHANGE THESE VALUES*/ -.dialog { - display: block; - position: absolute; -} - -.dialog table.table_window { - border-collapse: collapse; - border-spacing: 0; - width: 100%; - margin: 0px; - padding:0px; -} - -.dialog table.table_window td , .dialog table.table_window th { - padding: 0; -} - -.dialog .title_window { - -moz-user-select:none; -} - +.overlay_dialog { + background-color: #666666; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.overlay___invisible__ { + background-color: #666666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.dialog_nw { + width: 9px; + height: 23px; + background: transparent url(default/top_left.gif) no-repeat 0 0; +} + +.dialog_n { + background: transparent url(default/top_mid.gif) repeat-x 0 0; + height: 23px; +} + +.dialog_ne { + width: 9px; + height: 23px; + background: transparent url(default/top_right.gif) no-repeat 0 0; +} + +.dialog_e { + width: 2px; + background: transparent url(default/center_right.gif) repeat-y 0 0; +} + +.dialog_w { + width: 2px; + background: transparent url(default/center_left.gif) repeat-y 0 0; +} + +.dialog_sw { + width: 9px; + height: 19px; + background: transparent url(default/bottom_left.gif) no-repeat 0 0; +} + +.dialog_s { + background: transparent url(default/bottom_mid.gif) repeat-x 0 0; + height: 19px; +} + +.dialog_se { + width: 9px; + height: 19px; + background: transparent url(default/bottom_right.gif) no-repeat 0 0; +} + +.dialog_sizer { + width: 9px; + height: 19px; + background: transparent url(default/sizer.gif) no-repeat 0 0; + cursor:se-resize; +} + +.dialog_close { + width: 14px; + height: 14px; + background: transparent url(default/close.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:8px; + cursor:pointer; + z-index:2000; +} + +.dialog_minimize { + width: 14px; + height: 15px; + background: transparent url(default/minimize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:28px; + cursor:pointer; + z-index:2000; +} + +.dialog_maximize { + width: 14px; + height: 15px; + background: transparent url(default/maximize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:49px; + cursor:pointer; + z-index:2000; +} + +.dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + width:100%; + color:#000; +} + +.dialog_content { + overflow:auto; + color: #DDD; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background-color:#123; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display: block; + position: absolute; + border: 1px #000 dashed; +} + +/* DO NOT CHANGE THESE VALUES*/ +.dialog { + display: block; + position: absolute; +} + +.dialog table.table_window { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 0px; + padding:0px; +} + +.dialog table.table_window td , .dialog table.table_window th { + padding: 0; +} + +.dialog .title_window { + -moz-user-select:none; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css index 249388be5..257a1b1e3 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css @@ -1,3 +1,3 @@ -/* PNG fix for all themes that uses PNG images on IE */ -td, div { behavior: url(../themes/iefix/iepngfix.htc) } - +/* PNG fix for all themes that uses PNG images on IE */ +td, div { behavior: url(../themes/iefix/iepngfix.htc) } + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc index 9a13f32bf..a6c683b9f 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc @@ -1,54 +1,54 @@ - - - - + + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css index 0d955c3d7..95ec287a9 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css @@ -1,960 +1,960 @@ -.overlay___invisible__ { - background-color: #666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display:block; - position:absolute; - border:1px #000 dashed; -} - - - -.overlay_bluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_nw { - background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.bluelighting_n { - background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; - height:28px; -} - -.bluelighting_ne { - background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.bluelighting_w { - background:transparent url(lighting/left-blue.png) repeat-y top left; - width:9px; -} - -.bluelighting_e { - background:transparent url(lighting/right-blue.png) repeat-y top right; - width:15px; -} - -.bluelighting_sw { - background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.bluelighting_s { - background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; - height:15px; -} - -.bluelighting_se, .bluelighting_sizer { - background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.bluelighting_sizer { - cursor:se-resize; -} - -.bluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#17385B; -} - -.bluelighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#BFDBFF; -} - -/* For alert/confirm dialog */ -.bluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.bluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.bluelighting_buttons { - text-align:center; - width:100%; -} - -.bluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.bluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .bluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_se, * html .bluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_content { - background:#B8D7FF; -} - - - -.overlay_greylighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_nw { - background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greylighting_n { - background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; - height:28px; -} - -.greylighting_ne { - background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greylighting_w { - background:transparent url(lighting/left-grey.png) repeat-y top left; - width:9px; -} - -.greylighting_e { - background:transparent url(lighting/right-grey.png) repeat-y top right; - width:15px; -} - -.greylighting_sw { - background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greylighting_s { - background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; - height:15px; -} - -.greylighting_se, .greylighting_sizer { - background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greylighting_sizer { - cursor:se-resize; -} - -.greylighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greylighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greylighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greylighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#525252; -} - -.greylighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#CDCDCD; -} - -/* For alert/confirm dialog */ -.greylighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greylighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greylighting_buttons { - text-align:center; - width:100%; -} - -.greylighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greylighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greylighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); -} - -* html .greylighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); -} - -* html .greylighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); -} - -* html .greylighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); -} - -* html greylighting_se, * html .greylighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); -} - -* html .greylighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_content { - background:#C7C7C7; -} - - - -.overlay_greenlighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_nw { - background:transparent url(lighting/top-left-green.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greenlighting_n { - background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; - height:28px; -} - -.greenlighting_ne { - background:transparent url(lighting/top-right-green.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greenlighting_w { - background:transparent url(lighting/left-green.png) repeat-y top left; - width:9px; -} - -.greenlighting_e { - background:transparent url(lighting/right-green.png) repeat-y top right; - width:15px; -} - -.greenlighting_sw { - background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greenlighting_s { - background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; - height:15px; -} - -.greenlighting_se, .greenlighting_sizer { - background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greenlighting_sizer { - cursor:se-resize; -} - -.greenlighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#2A6002; -} - -.greenlighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#ACFCAF; -} - -/* For alert/confirm dialog */ -.greenlighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greenlighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greenlighting_buttons { - text-align:center; - width:100%; -} - -.greenlighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greenlighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greenlighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); -} - -* html .greenlighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); -} - -* html .greenlighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); -} - -* html .greenlighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); -} - -* html greenlighting_se, * html .greenlighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); -} - -* html .greenlighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_content { - background:#A4FCA7; -} - - - -.overlay_darkbluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_nw { - background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.darkbluelighting_n { - background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; - height:28px; -} - -.darkbluelighting_ne { - background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.darkbluelighting_w { - background:transparent url(lighting/left-darkblue.png) repeat-y top left; - width:9px; -} - -.darkbluelighting_e { - background:transparent url(lighting/right-darkblue.png) repeat-y top right; - width:15px; -} - -.darkbluelighting_sw { - background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.darkbluelighting_s { - background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; - height:15px; -} - -.darkbluelighting_se, .darkbluelighting_sizer { - background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.darkbluelighting_sizer { - cursor:se-resize; -} - -.darkbluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#E4EFFD; -} - -.darkbluelighting_content { - overflow:auto; - color:#FFF; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#0413C0; -} - -/* For alert/confirm dialog */ -.darkbluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.darkbluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.darkbluelighting_buttons { - text-align:center; - width:100%; -} - -.darkbluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.darkbluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .darkbluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); -} - -* html darkbluelighting_se, * html .darkbluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_content { - background:#020EBA; -} - +.overlay___invisible__ { + background-color: #666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display:block; + position:absolute; + border:1px #000 dashed; +} + + + +.overlay_bluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_nw { + background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.bluelighting_n { + background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; + height:28px; +} + +.bluelighting_ne { + background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.bluelighting_w { + background:transparent url(lighting/left-blue.png) repeat-y top left; + width:9px; +} + +.bluelighting_e { + background:transparent url(lighting/right-blue.png) repeat-y top right; + width:15px; +} + +.bluelighting_sw { + background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.bluelighting_s { + background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; + height:15px; +} + +.bluelighting_se, .bluelighting_sizer { + background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.bluelighting_sizer { + cursor:se-resize; +} + +.bluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#17385B; +} + +.bluelighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#BFDBFF; +} + +/* For alert/confirm dialog */ +.bluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.bluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.bluelighting_buttons { + text-align:center; + width:100%; +} + +.bluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.bluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .bluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_se, * html .bluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_content { + background:#B8D7FF; +} + + + +.overlay_greylighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_nw { + background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greylighting_n { + background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; + height:28px; +} + +.greylighting_ne { + background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greylighting_w { + background:transparent url(lighting/left-grey.png) repeat-y top left; + width:9px; +} + +.greylighting_e { + background:transparent url(lighting/right-grey.png) repeat-y top right; + width:15px; +} + +.greylighting_sw { + background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greylighting_s { + background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; + height:15px; +} + +.greylighting_se, .greylighting_sizer { + background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greylighting_sizer { + cursor:se-resize; +} + +.greylighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greylighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greylighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greylighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#525252; +} + +.greylighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#CDCDCD; +} + +/* For alert/confirm dialog */ +.greylighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greylighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greylighting_buttons { + text-align:center; + width:100%; +} + +.greylighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greylighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greylighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); +} + +* html .greylighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); +} + +* html .greylighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); +} + +* html .greylighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); +} + +* html greylighting_se, * html .greylighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); +} + +* html .greylighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_content { + background:#C7C7C7; +} + + + +.overlay_greenlighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_nw { + background:transparent url(lighting/top-left-green.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greenlighting_n { + background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; + height:28px; +} + +.greenlighting_ne { + background:transparent url(lighting/top-right-green.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greenlighting_w { + background:transparent url(lighting/left-green.png) repeat-y top left; + width:9px; +} + +.greenlighting_e { + background:transparent url(lighting/right-green.png) repeat-y top right; + width:15px; +} + +.greenlighting_sw { + background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greenlighting_s { + background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; + height:15px; +} + +.greenlighting_se, .greenlighting_sizer { + background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greenlighting_sizer { + cursor:se-resize; +} + +.greenlighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#2A6002; +} + +.greenlighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#ACFCAF; +} + +/* For alert/confirm dialog */ +.greenlighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greenlighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greenlighting_buttons { + text-align:center; + width:100%; +} + +.greenlighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greenlighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greenlighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); +} + +* html .greenlighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); +} + +* html .greenlighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); +} + +* html .greenlighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); +} + +* html greenlighting_se, * html .greenlighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); +} + +* html .greenlighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_content { + background:#A4FCA7; +} + + + +.overlay_darkbluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_nw { + background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.darkbluelighting_n { + background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; + height:28px; +} + +.darkbluelighting_ne { + background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.darkbluelighting_w { + background:transparent url(lighting/left-darkblue.png) repeat-y top left; + width:9px; +} + +.darkbluelighting_e { + background:transparent url(lighting/right-darkblue.png) repeat-y top right; + width:15px; +} + +.darkbluelighting_sw { + background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.darkbluelighting_s { + background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; + height:15px; +} + +.darkbluelighting_se, .darkbluelighting_sizer { + background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.darkbluelighting_sizer { + cursor:se-resize; +} + +.darkbluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#E4EFFD; +} + +.darkbluelighting_content { + overflow:auto; + color:#FFF; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#0413C0; +} + +/* For alert/confirm dialog */ +.darkbluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.darkbluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.darkbluelighting_buttons { + text-align:center; + width:100%; +} + +.darkbluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.darkbluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .darkbluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); +} + +* html darkbluelighting_se, * html .darkbluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_content { + background:#020EBA; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc index 92248c665..36ea182e7 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc @@ -1,67 +1,67 @@ - - - -