Merge branch 'develop' into cxt_course
|
@ -30,4 +30,6 @@ vendor/cache
|
|||
/public/files
|
||||
/tags
|
||||
/config/initializers/gitlab_config.rb
|
||||
/config/wechat.yml
|
||||
/config/menu.yml
|
||||
1234567
|
||||
|
|
25
Client.html
|
@ -1,25 +0,0 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>
|
||||
Client
|
||||
</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<hr />
|
||||
<h2>这是一张图片</h2>
|
||||
<p>photo<a href="http://10.0.47.15:3000/shares/new?access_token='2d3dda45dsd'&comment='verygood'&title=davide&share_type=1&url=http://www.baidu.com"> Share A </a></p>
|
||||
<hr />
|
||||
|
||||
<h2>这是一段视频</h2>
|
||||
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=kaka&share_type=2&url=http://www.sina.com"> Share B </a></p>
|
||||
<hr />
|
||||
|
||||
<h2>这是一篇文章</h2>
|
||||
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=pepe&share_type=3&url=http://www.sina.com"> Share C </a></p>
|
||||
<hr />
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
386
Gemfile.lock~
|
@ -1,386 +0,0 @@
|
|||
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
|
112
Gemfile~
|
@ -1,112 +0,0 @@
|
|||
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
|
|
@ -13,34 +13,18 @@ module Mobile
|
|||
end
|
||||
post do
|
||||
user = UserWechat.find_by_openid(params[:openid]).user
|
||||
=begin
|
||||
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
page = params[:page] ? params[:page] : 0
|
||||
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','ProjectCreateInfo')"
|
||||
principal_types = "JournalsForMessage"
|
||||
|
||||
blog_ids = "("+user.blog.id.to_s+","+((User.watched_by(user.id).count == 0 )? '0' :User.watched_by(user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc')
|
||||
=end
|
||||
|
||||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
page = params[:page] ? params[:page] : 0
|
||||
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
user_project_ids = (user.projects.where("status = 1").map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.where("status = 1").map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
watched_user_ids = User.watched_by(user.id).count == 0 ? " " : ("," + User.watched_by(user.id).map{|u| u.id.to_s }.join(','))
|
||||
user_ids = "(" + user.id.to_s + watched_user_ids + ")"
|
||||
watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",")
|
||||
watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").count == 0 ? " " :Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",")
|
||||
blog_ids = "(" + watched_user_blog_ids + ")"
|
||||
|
||||
activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
|
|
|
@ -41,11 +41,11 @@ module Mobile
|
|||
end
|
||||
when :description
|
||||
if ac.act_type == "HomeworkCommon" || ac.act_type == "Issue" || ac.act_type == "News"
|
||||
ac.act.description unless ac.nil? || ac.act.nil?
|
||||
strip_html(ac.act.description) unless ac.nil? || ac.act.nil?
|
||||
elsif ac.act_type == "Message" || ac.act_type == "BlogComment"
|
||||
ac.act.content unless ac.nil? || ac.act.nil?
|
||||
strip_html(ac.act.content) unless ac.nil? || ac.act.nil?
|
||||
elsif ac.act_type == "JournalsForMessage"
|
||||
ac.act.notes unless ac.nil? || ac.act.nil?
|
||||
strip_html(ac.act.notes) unless ac.nil? || ac.act.nil?
|
||||
end
|
||||
when :latest_update
|
||||
time_from_now ac.updated_at unless ac.nil?
|
||||
|
|
|
@ -363,7 +363,11 @@ class ApplicationController < ActionController::Base
|
|||
when "contest"
|
||||
return true
|
||||
when "Course"
|
||||
allowed = User.current.allowed_to?(:course_attachments_download, @course, :global => false)
|
||||
if @attachment.get_status_by_attach(User.current.id) == 2
|
||||
return true
|
||||
else
|
||||
allowed = User.current.allowed_to?(:course_attachments_download, @course, :global => false)
|
||||
end
|
||||
else
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class OrgDocumentCommentsController < ApplicationController
|
||||
before_filter :find_organization, :only => [:new, :create, :show, :index]
|
||||
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
||||
helper :attachments,:organizations
|
||||
layout 'base_org'
|
||||
|
||||
|
@ -101,16 +102,22 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
@organization = Organization.find(params[:organization_id])
|
||||
end
|
||||
|
||||
def authorize_allowed
|
||||
unless User.current.logged?
|
||||
redirect_to signin_url
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@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
|
||||
@org_document_comment = OrgDocumentComment.find(params[:id])
|
||||
@org_sub_id = @org_document_comment.org_subfield_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
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -390,7 +390,7 @@ class StudentWorkController < ApplicationController
|
|||
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
|
||||
end
|
||||
#开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
|
||||
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if @order == 'lastname'
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
|
||||
elsif @order == 'student_id'
|
||||
|
@ -456,7 +456,7 @@ class StudentWorkController < ApplicationController
|
|||
|
||||
@student_work_count = (search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name).count
|
||||
else
|
||||
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if (@homework.is_open == 1 &&@course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if @order == 'lastname'
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
|
||||
elsif @order == 'student_id'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class SubDocumentCommentsController < ApplicationController
|
||||
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
|
||||
before_filter :find_subfield_content, :only => [:show, :index]
|
||||
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
||||
helper :attachments,:organizations
|
||||
layout 'base_sub_domain'
|
||||
|
||||
|
@ -125,6 +126,8 @@ class SubDocumentCommentsController < ApplicationController
|
|||
def destroy
|
||||
@sub_document_comment = SubDocumentComment.find(params[:id])
|
||||
@sub_document_comment.destroy
|
||||
@sub_domain = @sub_document_comment.sub_domain
|
||||
@org_subfield = @sub_domain.org_subfield
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
respond_to do |format|
|
||||
# format.html{
|
||||
|
@ -205,4 +208,11 @@ class SubDocumentCommentsController < ApplicationController
|
|||
def find_subfield_content
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
end
|
||||
|
||||
def authorize_allowed
|
||||
unless User.current.logged?
|
||||
redirect_to signin_url
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -320,7 +320,7 @@ class UsersController < ApplicationController
|
|||
case params[:agree]
|
||||
when 'Y'
|
||||
ar.update_column('status', 2)
|
||||
@msg.update_attributes(:apply_result => 1, :viewed => 1)
|
||||
@msg.update_attributes(:apply_result => 1, :viewed => 1)
|
||||
ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 2, :status => 1)
|
||||
when 'N'
|
||||
ar.update_column('status', 3)
|
||||
|
@ -539,28 +539,28 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def student_homeworks
|
||||
if User.current == @user
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
if User.current == @user
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
|
||||
#判断当前用户在当前课程的身份
|
||||
visibleCourse = @user.courses.empty? ? [] : @user.courses.where("is_delete = 0").visible
|
||||
homework_ids = []
|
||||
visibleCourse.each do |course|
|
||||
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
|
||||
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
|
||||
end
|
||||
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
|
||||
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
|
||||
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
|
||||
@is_in_course = params[:is_in_course].to_i || 0
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'new_base_user'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
#判断当前用户在当前课程的身份
|
||||
visibleCourse = @user.courses.empty? ? [] : @user.courses.where("is_delete = 0").visible
|
||||
homework_ids = []
|
||||
visibleCourse.each do |course|
|
||||
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
|
||||
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
|
||||
end
|
||||
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
|
||||
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
|
||||
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
|
||||
@is_in_course = params[:is_in_course].to_i || 0
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'new_base_user'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
||||
def choose_user_course
|
||||
|
@ -1095,22 +1095,27 @@ class UsersController < ApplicationController
|
|||
|
||||
#引入资源列表根据关键词过滤
|
||||
def user_ref_resource_search
|
||||
search = params[:search].to_s.strip.downcase
|
||||
if(params[:type].blank? || params[:type] == "1") #全部
|
||||
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 取交集并查询
|
||||
@attachments = Attachment.where("((author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
|
||||
" or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))) and (filename like '%#{search}%') ").order("created_on desc")
|
||||
elsif params[:type] == "2" #课程资源
|
||||
if User.current.id.to_i != params[:id].to_i
|
||||
render_403
|
||||
return
|
||||
end
|
||||
@resource_id = params[:mul_id]
|
||||
@resource_type = params[:mul_type]
|
||||
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
|
||||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
@user = User.current
|
||||
@switch_search = params[:search].nil? ? " " : params[:search]
|
||||
search = "%#{@switch_search.strip.downcase}%"
|
||||
# 别人的资源库是没有权限去看的
|
||||
if(params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
|
||||
@attachments = Attachment.where("(author_id = #{params[:id]} and container_type = 'Course') or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})) and (filename like '%#{search}%') ").order("created_on desc")
|
||||
elsif params[:type] == "3" #项目资源
|
||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Project' and (filename like '%#{search}%')").order("created_on desc")
|
||||
elsif params[:type] == "4" #附件
|
||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Project','Issue','Document','Message','News','StudentWorkScore','HomewCommon') and (filename like '%#{search}%')").order("created_on desc")
|
||||
elsif params[:type] == "5" #用户资源
|
||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal' and (filename like '%#{search}%')").order("created_on desc")
|
||||
elsif params[:type] == "6" #公共资源
|
||||
@attachments = Attachment.where("(is_public =1 and is_publish = 1 and container_id is not null)" + "or (author_id = #{params[:id]} and is_publish = 0)").order("created_on desc")
|
||||
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
|
||||
# user_org_ids = User.current.organizations.map {|o| o.id}
|
||||
@attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search)
|
||||
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
|
||||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
|
||||
end
|
||||
@type = params[:type]
|
||||
@limit = 7
|
||||
|
@ -1982,7 +1987,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
elsif params[:send_ids].present?
|
||||
send_ids = params[:send_ids].split(" ")
|
||||
send_ids = params[:send_ids].split(",")
|
||||
course_ids = params[:course_ids]
|
||||
if course_ids.nil?
|
||||
@flag = false
|
||||
|
@ -2058,18 +2063,18 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
|
||||
end
|
||||
elsif params[:type] == "2"
|
||||
apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
if params[:status] == "2"
|
||||
resource_type = "'Course'"
|
||||
elsif params[:status] == "3"
|
||||
resource_type = "'Project'"
|
||||
elsif params[:status] == "5"
|
||||
resource_type = "'Principal'"
|
||||
else
|
||||
resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
end
|
||||
@attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
# elsif params[:type] == "2"
|
||||
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
# if params[:status] == "2"
|
||||
# resource_type = "'Course'"
|
||||
# elsif params[:status] == "3"
|
||||
# resource_type = "'Project'"
|
||||
# elsif params[:status] == "5"
|
||||
# resource_type = "'Principal'"
|
||||
# else
|
||||
# resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
# end
|
||||
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
end
|
||||
@type = params[:type]
|
||||
@limit = 25
|
||||
|
@ -2100,7 +2105,8 @@ class UsersController < ApplicationController
|
|||
project_ids.each do |project_id|
|
||||
next if ori.blank?
|
||||
@exist = false
|
||||
Project.find(project_id).attachments.each do |att| #如果课程中包含该资源
|
||||
# 如果对象中包含该资源
|
||||
Project.find(project_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
|
||||
att.created_on = Time.now
|
||||
att.save
|
||||
|
@ -2133,7 +2139,7 @@ class UsersController < ApplicationController
|
|||
@ori = ori
|
||||
end
|
||||
elsif params[:send_ids].present?
|
||||
send_ids = params[:send_ids].split(" ")
|
||||
send_ids = params[:send_ids].split(",")
|
||||
project_ids = params[:projects_ids]
|
||||
if project_ids.nil?
|
||||
@flag = false
|
||||
|
@ -2211,18 +2217,18 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
|
||||
end
|
||||
elsif params[:type] == "2"
|
||||
apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
if params[:status] == "2"
|
||||
resource_type = "'Course'"
|
||||
elsif params[:status] == "3"
|
||||
resource_type = "'Project'"
|
||||
elsif params[:status] == "5"
|
||||
resource_type = "'Principal'"
|
||||
else
|
||||
resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
end
|
||||
@attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
# elsif params[:type] == "2"
|
||||
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
# if params[:status] == "2"
|
||||
# resource_type = "'Course'"
|
||||
# elsif params[:status] == "3"
|
||||
# resource_type = "'Project'"
|
||||
# elsif params[:status] == "5"
|
||||
# resource_type = "'Principal'"
|
||||
# else
|
||||
# resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
# end
|
||||
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
end
|
||||
@status = params[:status]
|
||||
@type = params[:type]
|
||||
|
@ -2280,7 +2286,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
@ori = ori
|
||||
elsif params[:send_ids].present?
|
||||
send_ids = params[:send_ids].split(" ")
|
||||
send_ids = params[:send_ids].split(",")
|
||||
subfield_id = params[:subfield]
|
||||
if subfield_id.nil?
|
||||
@flag = false
|
||||
|
@ -2352,18 +2358,18 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
|
||||
end
|
||||
elsif params[:type] == "2"
|
||||
apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
if params[:status] == "2"
|
||||
resource_type = "'Course'"
|
||||
elsif params[:status] == "3"
|
||||
resource_type = "'Project'"
|
||||
elsif params[:status] == "5"
|
||||
resource_type = "'Principal'"
|
||||
else
|
||||
resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
end
|
||||
@attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
# elsif params[:type] == "2"
|
||||
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
# if params[:status] == "2"
|
||||
# resource_type = "'Course'"
|
||||
# elsif params[:status] == "3"
|
||||
# resource_type = "'Project'"
|
||||
# elsif params[:status] == "5"
|
||||
# resource_type = "'Principal'"
|
||||
# else
|
||||
# resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
# end
|
||||
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
end
|
||||
@type = params[:type]
|
||||
@limit = 25
|
||||
|
@ -2700,7 +2706,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取公共资源
|
||||
def get_public_resources user_course_ids, user_project_ids, 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}")
|
||||
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}")
|
||||
end
|
||||
|
||||
# 获取公共资源搜索
|
||||
|
@ -2725,19 +2731,19 @@ class UsersController < ApplicationController
|
|||
# 获取我的课程资源
|
||||
def get_course_resources author_id, user_course_ids, order, score
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 获取我的私有资源分享结果
|
||||
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_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
|
||||
|
@ -2748,18 +2754,18 @@ 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)").order("#{order.nil? ? 'created_on' : 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}")
|
||||
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 (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 is_public =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
|
||||
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
|
||||
and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
|
@ -2772,12 +2778,12 @@ 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").order("#{order.nil? ? 'created_on' : 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}")
|
||||
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 (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 is_public =1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 获取我上传的附件
|
||||
|
@ -2795,13 +2801,13 @@ 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").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
and container_id is not null and is_public =1").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 (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
and container_id is not null and is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 获取我的用户类型资源
|
||||
|
@ -2816,12 +2822,12 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的用户类型资源
|
||||
def get_principal_resources_public order, score
|
||||
attchments = Attachment.where("container_type = 'Principal' and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
attchments = Attachment.where("container_type = 'Principal' and is_public =1 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 (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 is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
end
|
||||
|
||||
# 资源库 分为全部 课程资源 项目资源 附件
|
||||
|
@ -2863,18 +2869,18 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
|
||||
end
|
||||
elsif params[:type] == "2" # 私有资源
|
||||
apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
if params[:status] == "2"
|
||||
resource_type = "'Course'"
|
||||
elsif params[:status] == "3"
|
||||
resource_type = "'Project'"
|
||||
elsif params[:status] == "5"
|
||||
resource_type = "'Principal'"
|
||||
else
|
||||
resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
end
|
||||
@attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
# elsif params[:type] == "2" # 私有资源
|
||||
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
# if params[:status] == "2"
|
||||
# resource_type = "'Course'"
|
||||
# elsif params[:status] == "3"
|
||||
# resource_type = "'Project'"
|
||||
# elsif params[:status] == "5"
|
||||
# resource_type = "'Principal'"
|
||||
# else
|
||||
# resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
# end
|
||||
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
|
||||
end
|
||||
@status = params[:status]
|
||||
@type = params[:type]
|
||||
|
@ -3052,21 +3058,21 @@ class UsersController < ApplicationController
|
|||
@attachments = get_principal_resources_public_search(@order, @score, search)
|
||||
else
|
||||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
|
||||
@attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search)
|
||||
end
|
||||
elsif params[:type] == "2" # 私有资源
|
||||
apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
if params[:status] == "2"
|
||||
resource_type = "'Course'"
|
||||
elsif params[:status] == "3"
|
||||
resource_type = "'Project'"
|
||||
elsif params[:status] == "5"
|
||||
resource_type = "'Principal'"
|
||||
else
|
||||
resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
end
|
||||
@attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search)
|
||||
@attachments
|
||||
# elsif params[:type] == "2" # 私有资源
|
||||
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
|
||||
# if params[:status] == "2"
|
||||
# resource_type = "'Course'"
|
||||
# elsif params[:status] == "3"
|
||||
# resource_type = "'Project'"
|
||||
# elsif params[:status] == "5"
|
||||
# resource_type = "'Principal'"
|
||||
# else
|
||||
# resource_type = "'Project','OrgSubfield','Principal','Course'"
|
||||
# end
|
||||
# @attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search)
|
||||
# @attachments
|
||||
end
|
||||
@status = params[:status]
|
||||
@type = params[:type]
|
||||
|
@ -3121,6 +3127,7 @@ class UsersController < ApplicationController
|
|||
@orgs = @user.organizations.select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Resource'").count > 0}
|
||||
end
|
||||
end
|
||||
@type = params[:type]
|
||||
@search = params[:search]
|
||||
#这里仅仅是传递需要发送的资源id
|
||||
@send_id = params[:send_id]
|
||||
|
|
|
@ -139,99 +139,129 @@ class WechatsController < ActionController::Base
|
|||
end
|
||||
|
||||
def sendBind(request)
|
||||
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } }
|
||||
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台!
|
||||
在这里您可以随时了解您的课程和项目动态,随时点赞和回复。
|
||||
我们将会与微信不断结合,为您提供更有价值的服务。
|
||||
|
||||
您还未绑定确实的用户,请先绑定,谢谢!" } }
|
||||
request.reply.news(news) do |article, n, index| # article is return object
|
||||
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
|
||||
pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/weixin_pic.jpg"
|
||||
article.item title: "#{n[:title]}",
|
||||
description: n[:content],
|
||||
pic_url: 'https://www.trustie.net/images/trustie_logo2.png',
|
||||
pic_url: pic_url,
|
||||
url: url
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def get_open_id
|
||||
begin
|
||||
raise "非法操作, code不存在" unless params[:code]
|
||||
|
||||
|
||||
### controller method
|
||||
|
||||
|
||||
module Controllers
|
||||
def get_open_id
|
||||
begin
|
||||
|
||||
code = params[:code] || session[:wechat_code]
|
||||
openid = get_openid_from_code(code)
|
||||
|
||||
raise "无法获取到微信openid" unless openid
|
||||
render :json => {status:0, openid: openid}
|
||||
rescue Exception=>e
|
||||
render :json => {status: -1, msg: e.message}
|
||||
end
|
||||
end
|
||||
|
||||
def bind
|
||||
begin
|
||||
|
||||
code = params[:code] || session[:wechat_code]
|
||||
openid = get_openid_from_code(code)
|
||||
|
||||
raise "无法获取到openid" unless openid
|
||||
raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid)
|
||||
|
||||
user, last_login_on = User.try_to_login(params[:username], params[:password])
|
||||
raise "用户名或密码错误,请重新登录" unless user
|
||||
#补全用户信息
|
||||
|
||||
raise "此用户已经绑定过公众号, 请换一个帐户试试" if user.user_wechat
|
||||
|
||||
UserWechat.create!(
|
||||
openid: openid,
|
||||
user: user
|
||||
)
|
||||
render :json => {status:0, msg: "绑定成功"}
|
||||
rescue Exception=>e
|
||||
render :json => {status: -1, msg: e.message}
|
||||
end
|
||||
end
|
||||
|
||||
def login
|
||||
session[:wechat_code] = params[:code] if params[:code]
|
||||
openid = get_openid_from_code(params[:code])
|
||||
raise "无法获取到openid" unless openid
|
||||
render :json => {status:0, openid: openid}
|
||||
rescue Exception=>e
|
||||
render :json => {status: -1, msg: e.message}
|
||||
@wechat_user = user_binded?(openid)
|
||||
|
||||
render 'wechats/login', layout: 'base_wechat'
|
||||
end
|
||||
end
|
||||
|
||||
def bind
|
||||
begin
|
||||
raise "非法操作, code不存在" unless params[:code]
|
||||
openid = get_openid_from_code(params[:code])
|
||||
raise "无法获取到openid" unless openid
|
||||
raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid)
|
||||
private
|
||||
def get_openid_from_code(code)
|
||||
openid = session[:wechat_openid]
|
||||
|
||||
user, last_login_on = User.try_to_login(params[:username], params[:password])
|
||||
raise "用户名或密码错误,请重新登录" unless user
|
||||
#补全用户信息
|
||||
|
||||
raise "此用户已经绑定了公众号" if user.user_wechat
|
||||
|
||||
UserWechat.create!(
|
||||
openid: openid,
|
||||
user: user
|
||||
)
|
||||
request.reply.text "欢迎加入Trustie创新实践社区"
|
||||
render :json => {status:0, msg: "绑定成功"}
|
||||
rescue Exception=>e
|
||||
render :json => {status: -1, msg: e.message}
|
||||
end
|
||||
end
|
||||
|
||||
def login
|
||||
@code = params[:code] #TODO 安全性
|
||||
render 'wechats/login', layout: 'base_wechat'
|
||||
end
|
||||
|
||||
private
|
||||
def get_openid_from_code(code)
|
||||
url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{Wechat.config.appid}&secret=#{Wechat.config.secret}&code=#{code}&grant_type=authorization_code"
|
||||
logger.debug url
|
||||
body = URI.parse(url).read
|
||||
logger.debug body
|
||||
JSON.parse(body)["openid"]
|
||||
end
|
||||
|
||||
def user_binded?(openid)
|
||||
uw = UserWechat.where(openid: openid).first
|
||||
end
|
||||
|
||||
def user_activity(user)
|
||||
@user = user
|
||||
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
|
||||
|
||||
end
|
||||
|
||||
def process_activity(user_activity)
|
||||
act= user_activity.act
|
||||
case user_activity.container_type.to_s
|
||||
when 'Course'
|
||||
when 'Project'
|
||||
case user_activity.act_type.to_s
|
||||
when 'Issue'
|
||||
[act.project.name.to_s+" | 项目问题", act.subject.to_s, url_to_avatar(act.author),"http://wechat.trustie.net/app.html#/issue/#{act.id}"]
|
||||
unless openid
|
||||
if code
|
||||
openid = wechat.web_access_token(code)["openid"]
|
||||
end
|
||||
end
|
||||
|
||||
if openid
|
||||
session[:wechat_openid] = openid
|
||||
end
|
||||
|
||||
return openid
|
||||
end
|
||||
|
||||
def user_binded?(openid)
|
||||
uw = UserWechat.where(openid: openid).first
|
||||
end
|
||||
|
||||
def user_activity(user)
|
||||
@user = user
|
||||
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
|
||||
|
||||
end
|
||||
|
||||
def process_activity(user_activity)
|
||||
act= user_activity.act
|
||||
case user_activity.container_type.to_s
|
||||
when 'Course'
|
||||
when 'Project'
|
||||
case user_activity.act_type.to_s
|
||||
when 'Issue'
|
||||
[act.project.name.to_s+" | 项目问题", act.subject.to_s, url_to_avatar(act.author),"http://wechat.trustie.net/app.html#/issue/#{act.id}"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
include Controllers
|
||||
|
||||
end
|
||||
|
|
|
@ -10,14 +10,14 @@ class ZipdownController < ApplicationController
|
|||
#勿删 before_filter :authorize, :only => [:assort,:download_user_homework]
|
||||
SAVE_FOLDER = "#{Rails.root}/files"
|
||||
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
|
||||
MAX_PATH = 50
|
||||
|
||||
#统一下载功能
|
||||
def download
|
||||
if User.current.logged?
|
||||
begin
|
||||
if params[:base64file]
|
||||
file = Base64.decode64(params[:base64file])
|
||||
file = file.sub('*', '+')
|
||||
file = decode64(params[:base64file])
|
||||
send_file "#{OUTPUT_FOLDER}/#{file}", :filename => filename_for_content_disposition(file), :type => detect_content_type(file)
|
||||
else
|
||||
send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file])
|
||||
|
@ -125,7 +125,11 @@ class ZipdownController < ApplicationController
|
|||
end
|
||||
|
||||
def encode64(str)
|
||||
Base64.encode64(str).sub('+', '*')
|
||||
Base64.urlsafe_encode64(str)
|
||||
end
|
||||
|
||||
def decode64(str)
|
||||
Base64.urlsafe_decode64(str)
|
||||
end
|
||||
|
||||
def zip_homework_common homework_common
|
||||
|
@ -242,6 +246,12 @@ class ZipdownController < ApplicationController
|
|||
|
||||
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
|
||||
rename_zipfile = zip_name_refer ||= "#{Time.now.to_i.to_s}.zip"
|
||||
# 文件名过长
|
||||
|
||||
if rename_zipfile.size > MAX_PATH
|
||||
rename_zipfile = rename_zipfile[0,rename_zipfile.size-4][0,MAX_PATH-4] + rename_zipfile[-4,4]
|
||||
end
|
||||
|
||||
zipfile_name = "#{output_path}/#{rename_zipfile}"
|
||||
|
||||
Dir.mkdir(File.dirname(zipfile_name)) unless File.exist?(File.dirname(zipfile_name))
|
||||
|
|
|
@ -182,7 +182,7 @@ module ApiHelper
|
|||
timeIntoFormat = 0
|
||||
updateAtValue = ""
|
||||
if timePassed < 0
|
||||
updateAtValue = "时间有问题"
|
||||
updateAtValue = "刚刚"
|
||||
elsif timePassed < ONE_MINUTE
|
||||
updateAtValue = "1分钟前"
|
||||
elsif timePassed < ONE_HOUR
|
||||
|
|
|
@ -58,12 +58,21 @@ module ApplicationHelper
|
|||
when "Course"
|
||||
User.current.member_of_course?(attachment.container) ? true : false
|
||||
when "OrgSubfield"
|
||||
User.current.member_of_org?(attachment.container) ? true : false
|
||||
User.current.member_of_org?(attachment.container.organization) ? true : false
|
||||
when "Principal"
|
||||
User.current.id == attachment.author_id ? true : false
|
||||
end
|
||||
end
|
||||
|
||||
# 判断某个私有资源是否可以发送下载权限
|
||||
# 结果为true不能下载,false可以下载
|
||||
def private_attachment_allow attachment_id
|
||||
attach = Attachment.find(attachment_id)
|
||||
# 条件取否,result结果为true则不能下载
|
||||
result = attach.is_public == 0 && attach.author != User.current && !attach.get_apply_resource_status(attach.id, User.current.id) && !attach_show_allow(attach)
|
||||
return result
|
||||
end
|
||||
|
||||
# Time 2015-03-24 15:27:29
|
||||
# Author lizanle
|
||||
# Description 从硬盘上删除对应的资源文件
|
||||
|
@ -2089,12 +2098,12 @@ module ApplicationHelper
|
|||
def attachment_history_candown attachment_history
|
||||
if attachment_history.container_type == "Course"
|
||||
course = Course.find(attachment_history.container_id)
|
||||
candown = User.current.member_of?(course) || (course.is_public && attachment_history.is_public == 1)
|
||||
candown = User.current.member_of_course?(course) || (course.is_public && attachment_history.is_public == 1)
|
||||
elsif attachment_history.container_type == "Project"
|
||||
project = Project.find(attachment_history.container_id)
|
||||
candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1)
|
||||
elsif attachment_history.container_type == "OrgSubfield"
|
||||
org = OrgSubfield.find(attachment_history.container_id)
|
||||
org = OrgSubfield.find(attachment_history.container_id).organization
|
||||
candown = User.current.member_of_org?(org) || (org.organization.is_public && attachment_history.is_public == 1 && (User.current.logged? || org.organization.allow_guest_download?))
|
||||
end
|
||||
end
|
||||
|
@ -2109,20 +2118,20 @@ module ApplicationHelper
|
|||
candown= User.current.member_of?(project) || (project.is_public && attachment.is_public == 1)
|
||||
elsif attachment.container.is_a?(Project)
|
||||
project = attachment.container
|
||||
candown= User.current.member_of?(project) || (project.is_public && attachment.is_public == 1)
|
||||
candown = User.current.member_of?(project) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
||||
elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board &&
|
||||
attachment.container.board.project
|
||||
project = attachment.container.board.project
|
||||
candown = User.current.member_of?(project) || (project.is_public && attachment.is_public == 1)
|
||||
elsif (attachment.container.has_attribute?(:course) ||attachment.container.has_attribute?(:course_id) ) && attachment.container.course
|
||||
course = attachment.container.course
|
||||
candown = User.current.member_of_course?(course) || (course.is_public==1 && attachment.is_public == 1)
|
||||
candown = User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
||||
elsif attachment.container.is_a?(Course)
|
||||
course = attachment.container
|
||||
candown= User.current.member_of_course?(course) || (course.is_public==1 && attachment.is_public == 1)
|
||||
candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
||||
elsif attachment.container.is_a?(OrgSubfield)
|
||||
org = attachment.container.organization
|
||||
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
||||
candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
||||
elsif attachment.container.is_a?(OrgDocumentComment)
|
||||
org = attachment.container.organization
|
||||
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
||||
|
|
|
@ -142,7 +142,8 @@ 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)
|
||||
status = ApplyResource.where("attachment_id =? and user_id =?", attachment_id, author_id).first.try(:status)
|
||||
status == 2 ? true :false
|
||||
end
|
||||
|
||||
# add by nwb
|
||||
|
|
|
@ -83,7 +83,7 @@ class Message < ActiveRecord::Base
|
|||
# after_create :add_author_as_watcher, :reset_counters!, :add_boards_count
|
||||
after_update :update_messages_board, :update_activity
|
||||
after_destroy :reset_counters!,:down_user_score,:delete_kindeditor_assets, :decrease_boards_count, :down_course_score
|
||||
after_create :act_as_course_activity, :act_as_forge_activity, :act_as_student_score, act_as_at_message(:content, :author_id), :add_author_as_watcher, :reset_counters!, :add_boards_count, :act_as_system_message
|
||||
after_create :act_as_course_activity, :act_as_forge_activity, :act_as_student_score, act_as_at_message(:content, :author_id), :add_author_as_watcher, :reset_counters!, :add_boards_count, :act_as_system_message, :delay_message_send
|
||||
#before_save :be_user_score
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
|
@ -308,6 +308,22 @@ class Message < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def delay_message_send
|
||||
if self.course
|
||||
if self.parent_id.nil? # 发帖
|
||||
self.delay.contain_messages_message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def contain_messages_message
|
||||
self.course.members.includes(:user).each do |m|
|
||||
if self.author.allowed_to?(:as_teacher, self.course) && m.user_id != self.author_id # 老师 自己的帖子不给自己发送消息
|
||||
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.board.course_id, :viewed => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#更新用户分数 -by zjc
|
||||
def be_user_score
|
||||
#新建message且无parent的为发帖
|
||||
|
|
|
@ -62,7 +62,7 @@ class News < ActiveRecord::Base
|
|||
:author_key => :author_id
|
||||
acts_as_watchable
|
||||
|
||||
after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message
|
||||
after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message, :delay_news_send
|
||||
after_update :update_activity
|
||||
after_destroy :delete_kindeditor_assets, :decrease_news_count, :delete_org_activities, :down_course_score
|
||||
|
||||
|
@ -163,8 +163,8 @@ class News < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
#课程/项目通知 消息发送
|
||||
#消息发送原则:除了消息的发布者,课程的其它成员都能收到消息提醒
|
||||
# 课程/项目通知 消息发送
|
||||
# 消息发送原则:除了消息的发布者,课程的其它成员都能收到消息提醒
|
||||
def act_as_system_message
|
||||
if self.course
|
||||
self.course.members.each do |m|
|
||||
|
@ -189,6 +189,20 @@ class News < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def delay_news_send
|
||||
if self.course
|
||||
self.delay.contain_news_message
|
||||
end
|
||||
end
|
||||
|
||||
def contain_news_message
|
||||
self.course.members.each do |m|
|
||||
if m.user_id != self.author_id
|
||||
self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => container_id, :viewed => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Time 2015-03-31 13:50:54
|
||||
# Author lizanle
|
||||
# Description 删除news后删除对应的资源
|
||||
|
|
|
@ -5,7 +5,7 @@ class WechatService
|
|||
data = {
|
||||
touser:openid,
|
||||
template_id:template_id,
|
||||
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
|
||||
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
|
||||
topcolor:"#FF0000",
|
||||
data:{
|
||||
first: {
|
||||
|
@ -44,7 +44,6 @@ class WechatService
|
|||
end
|
||||
Rails.logger.info "send over. #{req}"
|
||||
end
|
||||
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
end
|
||||
|
||||
def topic_publish_template(user_id, type, id, first, key1, key2, key3, remark="")
|
||||
|
@ -59,7 +58,6 @@ class WechatService
|
|||
end
|
||||
Rails.logger.info "send over. #{req}"
|
||||
end
|
||||
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
end
|
||||
|
||||
def comment_template(user_id,type, id, first, key1, key2, key3, remark="")
|
||||
|
@ -74,7 +72,6 @@ class WechatService
|
|||
end
|
||||
Rails.logger.info "send over. #{req}"
|
||||
end
|
||||
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
end
|
||||
|
||||
def message_update_template(user_id, type, id, first, key1, key2, remark="")
|
||||
|
@ -83,7 +80,7 @@ class WechatService
|
|||
data = {
|
||||
touser:uw.openid,
|
||||
template_id:"YTyNPZnQD8uZFBFq-Q6cCOWaq5LA9vL6RFlF2JuD5Cg",
|
||||
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
|
||||
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
|
||||
topcolor:"#FF0000",
|
||||
data:{
|
||||
first: {
|
||||
|
@ -112,6 +109,5 @@ class WechatService
|
|||
end
|
||||
Rails.logger.info "send over. #{req}"
|
||||
end
|
||||
Rails.logger.info "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://www.trustie.net/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
end
|
||||
end
|
|
@ -2,6 +2,6 @@ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'attachments/sh
|
|||
showModal('ajax-modal', '452px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","50%");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","50%").css("position","fixed");
|
||||
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
|
@ -207,6 +207,9 @@
|
|||
$(function(){
|
||||
var postContent = $("#message_description_<%= @article.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @article.id %>").html(postContent);
|
||||
autoUrl('message_description_<%= @article.id %>');
|
||||
});
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<script type="text/javascript">
|
||||
function submit_copy_course() {
|
||||
if(regex_course_name()&®ex_course_class_period()&®ex_time_term()&®ex_course_password())
|
||||
if(regex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new')&®ex_course_password('new'))
|
||||
{
|
||||
$("#new_course").submit();
|
||||
document.getElementById("submit_copy_course").onclick = "";
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$("#time").change(function(){
|
||||
document.getElementById("end_time").options[document.getElementById("time").selectedIndex].selected = true;
|
||||
$("#new_time").change(function(){
|
||||
document.getElementById("new_end_time").options[document.getElementById("new_time").selectedIndex].selected = true;
|
||||
});
|
||||
$("#term").change(function(){
|
||||
document.getElementById("end_term").options[document.getElementById("term").selectedIndex].selected = true;
|
||||
$("#new_term").change(function(){
|
||||
document.getElementById("new_end_term").options[document.getElementById("new_term").selectedIndex].selected = true;
|
||||
});
|
||||
|
||||
var popupHeight = $(".referenceResourcesPopup").outerHeight(true);
|
||||
|
@ -56,35 +56,35 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="course_name" class="courses_input grey_border" maxlength="100" onkeyup="regex_course_name();" value="<%=@course.name %>">
|
||||
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input grey_border" maxlength="100" onkeyup="regex_course_name('new');" value="<%=@course.name %>">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="class_period" class="hwork_input02 grey_border" onkeyup="regex_course_class_period();" maxlength="6" value="<%=@course.class_period %>">
|
||||
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
||||
<input type="text" name="class_period" id="new_class_period" class="hwork_input02 grey_border" onkeyup="regex_course_class_period('new');" maxlength="6" value="<%=@course.class_period %>">
|
||||
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@new_course.time),@new_course.time), {} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@new_course.term || cur_course_term),{} %>
|
||||
<span class="c_red" id="course_time_term_notice"></span>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@new_course.time),@new_course.time), {:id=>"new_time"} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@new_course.term || cur_course_term),{:id=>"new_term"} %>
|
||||
<span class="c_red" id="new_course_time_term_notice"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> 结束学期 :</label>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@new_course.end_time),@new_course.end_time), {} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@new_course.end_term || cur_course_term),{} %>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@new_course.end_time),@new_course.end_time), {:id=>"new_end_time"} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@new_course.end_term || cur_course_term),{:id=>"new_end_term"} %>
|
||||
<span class="mr15 c_red">仅针对跨越多个学期的班级,否则不用修改。</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
||||
<input type="text" style="display: none;">
|
||||
<input type="text" name="course[password]" id="course_course_password" class="hwork_input02 grey_border" onkeyup="regex_course_password();" value="<%=@course.password %>">
|
||||
<input type="text" name="course[password]" id="new_course_course_password" class="hwork_input02 grey_border" onkeyup="regex_course_password('new');" value="<%=@course.password %>">
|
||||
<!--<a id="psw_btn" href="javascript:void(0)">显示明码</a>-->
|
||||
<span class="c_red" id="course_course_password_notice"></span>
|
||||
<span class="c_red" id="new_course_course_password_notice"></span>
|
||||
<div class="cl"></div>
|
||||
<span class="ml95 c_red">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
||||
</li>
|
||||
|
|
|
@ -15,9 +15,11 @@
|
|||
<%= format_time(journal.created_on) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<%= journal.notes.html_safe %>
|
||||
</p>
|
||||
<div class = "ping_journal" id="journal_<%= journal.id %>">
|
||||
<p>
|
||||
<%= journal.notes.html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="ping_disfoot f14">
|
||||
|
@ -52,6 +54,12 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('journal_<%= journal.id %>');
|
||||
autoUrl('journal_<%= journal.id %>');
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -51,17 +51,9 @@
|
|||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<ul>
|
||||
<% if @canShowCode %>
|
||||
<li>
|
||||
<% if member.user.show_name == ''%>
|
||||
<%= link_to("#{l(:label_bidding_user_studentname)}:<span >#{member.user.name}</span>".html_safe,user_path(member.user)) %>
|
||||
<% else%>
|
||||
<%= link_to("#{l(:label_bidding_user_studentname)}:<span >#{member.user.show_name}</span>".html_safe,user_path(member.user)) %>
|
||||
<%end%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li><%= link_to("#{l(:label_bidding_user_studentname)}:<span >#{member.user.name}</span>".html_safe, user_path(member.user)) %></li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to("#{l(:label_bidding_user_studentname)}:<span >#{member.user.show_name}</span>".html_safe,user_path(member.user)) %>
|
||||
</li>
|
||||
<br/>
|
||||
<% unless member.user.user_extensions.student_id == ''%>
|
||||
<li><%= link_to("#{l(:label_bidding_user_studentcode)}:<span >#{member.user.user_extensions.student_id}</span>".html_safe,user_path(member.user)) %></li>
|
||||
|
|
|
@ -8,36 +8,36 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();">
|
||||
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name('new');">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6">
|
||||
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
||||
<input type="text" name="class_period" id="new_class_period" class="hwork_input02" onkeyup="regex_course_class_period('new');" maxlength="6">
|
||||
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
|
||||
<span class="c_red" id="course_time_term_notice"></span>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"new_time"} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"new_term"} %>
|
||||
<span class="c_red" id="new_course_time_term_notice"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> 结束学期 :</label>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{} %>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"new_end_time"} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"new_end_term"} %>
|
||||
<span class="mr15 c_red">仅针对跨越多个学期的班级,否则不用修改。</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
||||
<input type="text" style="display: none;">
|
||||
<input type="password" name="course[password]" id="course_course_password" class="hwork_input02" onkeyup="regex_course_password();">
|
||||
<input type="password" name="course[password]" id="new_course_course_password" class="hwork_input02" onkeyup="regex_course_password('new');">
|
||||
<a id="psw_btn" href="javascript:void(0)">显示明码</a>
|
||||
<span class="c_red" id="course_course_password_notice"></span>
|
||||
<span class="c_red" id="new_course_course_password_notice"></span>
|
||||
<div class="cl"></div>
|
||||
<span class="ml80 c_red">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
||||
</li>
|
||||
|
@ -75,11 +75,11 @@
|
|||
<div class="cl"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
$("#time").change(function(){
|
||||
document.getElementById("end_time").options[document.getElementById("time").selectedIndex].selected = true;
|
||||
$("#new_time").change(function(){
|
||||
document.getElementById("new_end_time").options[document.getElementById("new_time").selectedIndex].selected = true;
|
||||
});
|
||||
$("#term").change(function(){
|
||||
document.getElementById("end_term").options[document.getElementById("term").selectedIndex].selected = true;
|
||||
$("#new_term").change(function(){
|
||||
document.getElementById("new_end_term").options[document.getElementById("new_term").selectedIndex].selected = true;
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -33,35 +33,35 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
|
||||
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<input type="text" name="course[name]" id="edit_course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name('edit');" value="<%= @course.name%>">
|
||||
<span class="c_red" id="edit_course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<input type="password" style="top: -100000px;position: fixed;">
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
|
||||
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
||||
<input type="text" name="class_period" id="edit_class_period" class="hwork_input02" onkeyup="regex_course_class_period('edit');" maxlength="6" value="<%= @course.class_period%>">
|
||||
<span class="c_red" id="edit_course_class_period_notice" style="display: none;"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time"} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term"} %>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"edit_time"} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"edit_term"} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> 结束学期 :</label>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time"} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term"} %>
|
||||
<span class="c_red" id="course_time_term_notice"></span>
|
||||
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"edit_end_time"} %>
|
||||
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"edit_end_term"} %>
|
||||
<span class="c_red" id="edit_course_time_term_notice"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
||||
<input type="password" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>" onkeyup="regex_course_password();">
|
||||
<input type="password" name="course[password]" id="edit_course_course_password" class="hwork_input02" value="<%= @course.password%>" onkeyup="regex_course_password('edit');">
|
||||
<a id="psw_btn" href="javascript:void(0)">显示明码</a>
|
||||
<span class="c_red" id="course_course_password_notice"></span>
|
||||
<span class="c_red" id="edit_course_course_password_notice"></span>
|
||||
<div class="cl"></div>
|
||||
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
||||
</li>
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
<div id="popbox02">
|
||||
<div class="ni_con">
|
||||
<% if @homework.is_open == 0 %>
|
||||
<% if @homework.is_open == 0 && @homework.course.is_public == 1 %>
|
||||
<h2>公开作品</h2>
|
||||
<p>
|
||||
本次作业的所有作品将对Trustie平台所有注册用户开放,请问是否确定公开作品?
|
||||
</p>
|
||||
<% elsif @homework.is_open == 0 && @homework.course.is_public == 0 %>
|
||||
<h2>公开作品</h2>
|
||||
<p>
|
||||
该作业是私有课程的作业,公开作品后本次作业的所有作品将对课程内的所有学生开放,请问是否确定公开作品?
|
||||
</p>
|
||||
<% elsif @homework.is_open == 1 && @homework.course.is_public == 0 %>
|
||||
<h2>取消公开作品</h2>
|
||||
<p>
|
||||
您将取消“公开作品”的功能,该私有作业的作品将只在作业截止后对已提交作品的学生开放,请问是否确定?
|
||||
</p>
|
||||
<% else %>
|
||||
<h2>取消公开作品</h2>
|
||||
<p>
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<% case @issue.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="issues fl" title="缺陷"></span>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="issues-function fl" title="功能"></span>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="support fl" title="支持"></span>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="duty fl" title="任务"></span>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="weekly fl" title="周报"></span>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
</span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
|
||||
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
||||
|
|
|
@ -157,9 +157,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="lg-foot" id="lg-foot" onclick="show_more_msg();">
|
||||
<%= l(:label_expend_information)%>
|
||||
<label id="expend_more_information" value="show_more"><%= l(:label_expend_information)%></label>
|
||||
<span class="g-arr-down">
|
||||
<img src="/images/jiantou.jpg" width="12" height="6" />
|
||||
<img id="arrow" src="/images/jiantou.jpg" width="12" height="6" />
|
||||
</span>
|
||||
</div>
|
||||
</div><!--项目简介 end-->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//location.reload();
|
||||
<% if params[:detail_page] %>
|
||||
window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @sub_domain.id)%>';
|
||||
window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>';
|
||||
<% else %>
|
||||
window.location.reload();
|
||||
<% end %>
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %>
|
||||
<% if act.org_act_type == 'OrgDocumentComment' %>
|
||||
<%= render :partial => 'show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.description.to_s.html_safe, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", student_work_index_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<% end %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.description.to_s.html_safe, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -151,7 +151,7 @@
|
|||
<% end %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.content, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => activity.id, :content=> activity.description, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to activity.content.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -214,7 +214,7 @@
|
|||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-title sn-hidden" %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => document.id, :content=> document.content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => document.id, :content=> document.content, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to document.content.to_s.html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -244,7 +244,7 @@
|
|||
<% end %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", board_message_url_in_org(message.board.id,message.id), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -264,7 +264,7 @@
|
|||
<% end %>
|
||||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28} %>
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => message.id, :content=> content, :maxheight=>54, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
<%#= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
|
||||
</div>
|
||||
<%#= link_to "更多", board_message_path(message.board,activity), :class => "more-btn", :target => "_blank" %>
|
||||
|
@ -285,7 +285,7 @@
|
|||
</h3>
|
||||
<div class="resources-tagbox">
|
||||
<%#= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => news.id, :content=> news.description, :maxheight=>54, :maxwordsnum => 28, :maxwordsnum => 28} %>
|
||||
<%= render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id => news.id, :content=> news.description, :maxheight=>54, :maxwordsnum => 28, :maxwordsnum => 28, :maxwidth=>0} %>
|
||||
</div>
|
||||
<%#= link_to "更多", news_path(news), :class => "more-btn", :target => "_blank" %>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
</span><span class="c_grey fr f14"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<!--<p><%#= textilizable journal.notes%></p>-->
|
||||
<p><%=journal.notes.html_safe%>
|
||||
<div class = "ping_journal" id="journal_<%= journal.id %>">
|
||||
<p><%=journal.notes.html_safe%></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ping_disfoot f14">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
@ -44,6 +46,12 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('journal_<%= journal.id %>');
|
||||
autoUrl('journal_<%= journal.id %>');
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//location.reload();
|
||||
<% if params[:detail_page] %>
|
||||
window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @subdomain.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 %>
|
|
@ -56,7 +56,7 @@
|
|||
<%= link_to "编辑文章", edit_org_subfield_sub_domain_sub_document_comment_path(@document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => @document.sub_domain.id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @organization.id, :detail_page => 1), :method => 'delete',
|
||||
<%= link_to "删除文章", org_subfield_sub_domain_sub_document_comment_path(@document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => @document.sub_domain.id, :flag => 0, :detail_page=>1), :method => 'delete',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:remote => true, :class => 'postOptionLink' %>
|
||||
</li>
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
<span class="fl ml10 green-cir-btn" title="已锁定">锁</span>
|
||||
<% end %>
|
||||
<% u = User.where("id=?",activity.author_id).first%>
|
||||
<span class="fr grayTxt">
|
||||
发帖人: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="massages-content ml15">
|
||||
|
@ -42,11 +39,13 @@
|
|||
<% else %>
|
||||
<% content = activity.parent.content %>
|
||||
<% end %>
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>75, :maxwidth=>563} %></p>
|
||||
</div>
|
||||
<div class="ml15 mt10">
|
||||
<span class="grayTxt">发帖:<%= format_time(activity.created_on) %></span>
|
||||
<span class="grayTxt">更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
|
||||
<span class="grayTxt">
|
||||
发帖人: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<span class="grayTxt">更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %></span>
|
||||
<% count=0 %>
|
||||
<% if activity.parent %>
|
||||
<% count=activity.parent.children.count%>
|
||||
|
|
|
@ -24,16 +24,15 @@
|
|||
<span class="fl ml10 red-cir-btn">顶</span>
|
||||
<% end%>
|
||||
<% u = User.where("id=?",activity.author_id).first%>
|
||||
<span class="fr grayTxt">
|
||||
发布者: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="massages-content ml15">
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100} %></p>
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100, :maxwidth=>563} %></p>
|
||||
</div>
|
||||
<div class="ml15 mt10">
|
||||
<span class="grayTxt">发布:<%= format_time(activity.created_on) %></span>
|
||||
<span class="grayTxt">
|
||||
发布者: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<span class="grayTxt">更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
|
||||
<% count=0 %>
|
||||
<% count=activity.comments.count %>
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
$("#activity_description_<%= user_activity_id%>").css("max-height", heightType + "px");
|
||||
}
|
||||
|
||||
var maxWidth = <%= maxwidth %>
|
||||
if (maxWidth > 0) {
|
||||
$("#intro_content_<%= user_activity_id%>").css("max-width", maxWidth + "px");
|
||||
}
|
||||
|
||||
description_showwords_ellipsis(<%=user_activity_id %>,<%= maxwordsnum %>);
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<%= form_tag add_exist_file_to_org_user_path(user, :type => defined?(type) ? type : "6" ),:remote=>true,:id=>'orgs_list_form' do %>
|
||||
<%= form_tag add_exist_file_to_org_user_path(user, :type => @type ),:remote=>true,:id=>'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
<span class="fl ml10 green-cir-btn" title="已锁定">锁</span>
|
||||
<% end %>
|
||||
<% u = User.where("id=?",activity.author_id).first%>
|
||||
<span class="fr grayTxt">
|
||||
发帖人:<%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="massages-content ml15">
|
||||
|
@ -42,11 +39,13 @@
|
|||
<% else %>
|
||||
<% content = activity.parent.content %>
|
||||
<% end %>
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
|
||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>75, :maxwidth=>563} %></p>
|
||||
</div>
|
||||
<div class="ml15 mt10 f12">
|
||||
<span class="grayTxt">发帖:<%= format_time(activity.created_on) %></span>
|
||||
<span class="grayTxt">更新:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %></span>
|
||||
<span class="grayTxt">
|
||||
发帖人:<%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
||||
</span>
|
||||
<span class="grayTxt">更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %></span>
|
||||
<% count=0 %>
|
||||
<% if activity.parent %>
|
||||
<% count=activity.parent.children.count%>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= form_tag add_exist_file_to_project_user_path(user, :type => defined?(type) ? type : "6" ), :remote => true, :id => 'projects_list_form' %>
|
||||
<%= form_tag add_exist_file_to_project_user_path(user, :type => @type ), :remote => true, :id => 'projects_list_form' %>
|
||||
<div>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
|
|
|
@ -38,16 +38,16 @@
|
|||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="issues fl" title="缺陷"></span>
|
||||
<% when 1%>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="issues-function fl" title="功能"></span>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="support fl" title="支持"></span>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="duty fl" title="任务"></span>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="weekly fl" title="周报"></span>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5" %>
|
||||
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
<div >
|
||||
<div class="relateText fl mb10 mr5">发送到</div>
|
||||
<div class="resourcesSendTo mr15">
|
||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','file');">
|
||||
<% unless send_ids.blank? %>
|
||||
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||
<% end %>
|
||||
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
|
||||
<option value="1">课程</option>
|
||||
<option value="2">项目</option>
|
||||
<option value="3" selected>组织</option>
|
||||
</select>
|
||||
</div>
|
||||
<%= form_tag search_user_org_user_path(user),:method => 'get',
|
||||
<%= form_tag search_user_org_user_path(user, :type => @type),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_org_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
|
@ -19,5 +22,5 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="org_file_form">
|
||||
<%= render :partial => 'users/org_file_form', :locals => {:user => user, :orgs => @orgs, :send_id => send_id, :send_ids => send_ids, :type => type} %>
|
||||
<%= render :partial => 'users/org_file_form', :locals => {:user => user, :orgs => @orgs, :send_id => send_id, :send_ids => send_ids, :type => @type} %>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<div>
|
||||
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
||||
<div class="resourcesSendTo">
|
||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id %>','<%= send_ids %>','<%= User.current.id %>','file');">
|
||||
<% unless send_ids.blank? %>
|
||||
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||
<% end %>
|
||||
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id %>','<%= send_ids %>','<%= User.current.id %>','file', '<%= @type %>');">
|
||||
<option value="1">课程</option>
|
||||
<option value="2" selected>项目</option>
|
||||
<option value="3">组织</option>
|
||||
|
@ -12,7 +15,7 @@
|
|||
</div>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div class="fl">
|
||||
<%= form_tag search_user_project_user_path(user),:method => 'get',
|
||||
<%= form_tag search_user_project_user_path(user, :type => @type),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_project_form',:class=>'resourcesSearchBox' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
<div>
|
||||
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
||||
<div class="resourcesSendTo">
|
||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','file');">
|
||||
<% unless send_ids.blank? %>
|
||||
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||
<% end %>
|
||||
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
|
||||
<option value="1">课程</option>
|
||||
<option value="2">项目</option>
|
||||
<option value="3">组织</option>
|
||||
|
@ -14,10 +17,9 @@
|
|||
</div>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div class="fl">
|
||||
<%= form_tag search_user_course_user_path(user),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> 'resourcesSearchBox' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入课程ID或者名称搜索" class="searchResourcePopup" />
|
||||
<script>
|
||||
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','<%= send_ids%>','file')
|
||||
|
|
|
@ -6,50 +6,20 @@
|
|||
<% attachments.each do |attach| %>
|
||||
<ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
|
||||
<li class="resource-list-checkbox fl">
|
||||
<% 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) %>
|
||||
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
<% else %>
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
<% end %>
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
<!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />-->
|
||||
</li>
|
||||
<li class="resource-list-name fl">
|
||||
<% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != "2" %>
|
||||
<a style="cursor: default" class = "resourcesBlack resource-list-middle hidden mw280" title="<%= attach.filename %>"><%= attach.filename %> </a>
|
||||
<% 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 %>
|
||||
<img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16">
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="resource-list-apply fr" id="resource_apply_status_<%=attach.id %>">
|
||||
<% 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 %>
|
||||
<%= 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' %>
|
||||
</li>
|
||||
<li class="resource-list-time fr"><%= format_date(attach.created_on) %></li>
|
||||
<li class="resource-list-quote fr"><%= attach.quotes.nil? ? 0 : attach.quotes %></li>
|
||||
<li class="resource-list-download fr"><%= attach.downloads %></li>
|
||||
<li style="display: none"><%= attach.author_id %></li>
|
||||
<li class="resource-list-size fr"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>
|
||||
<li class="resource-list-uploader fr hidden"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
||||
<li class="resource-list-uploader fr hidden"><%= User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
||||
<li class="resource-list-type fr"><%= get_resource_type(attach.container_type)%></li>
|
||||
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li>
|
||||
<li style="display: none"><%= attach.is_public %></li>
|
||||
<li style="display: none"><%= attach.get_apply_resource_status(attach.id, attach.author_id) %></li>
|
||||
<li style="display: none"><%= attach_show_allow(attach) == true ? 0 : 1 %></li>
|
||||
<li style="display: none"><%= attach.id %></li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
|
@ -72,7 +42,7 @@
|
|||
function batch_delete(){
|
||||
var data = $("#resources_list_form").serialize();
|
||||
if($("input[type=checkbox][data-deleteble=N]:checked").length != 0){
|
||||
alert("您只能删除自己上传的资源,请重新选择后再删除。");
|
||||
alert("您无法删除此资源!");
|
||||
return;
|
||||
}
|
||||
if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){
|
||||
|
@ -99,11 +69,9 @@
|
|||
document.oncontextmenu = function() {return true;}
|
||||
line.children().css("background-color",'white');
|
||||
id = line.children().last().html();
|
||||
is_public = line.children().eq(11).html();
|
||||
user_id = line.children().eq(6).html();
|
||||
apply_status = line.children().eq(12).html();
|
||||
user_id = line.children().eq(5).html();
|
||||
allow = line.children().eq(13).html();
|
||||
if(is_public == 0 && user_id != '<%= User.current.id %>' && apply_status != 2 && allow == 1){
|
||||
if( allow == 0){
|
||||
alert('您无权发送私有资源')
|
||||
}else{
|
||||
if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
|
||||
|
@ -131,13 +99,26 @@
|
|||
if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '<%= search_user_project_user_path(User.current.id)%>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type%>",
|
||||
url: '<%= search_user_project_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>",
|
||||
data:{send_type:'file'}
|
||||
});
|
||||
}else{
|
||||
}else if (lastSendType === '1'){
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '<%= search_user_course_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type%>",
|
||||
url: '<%= search_user_course_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>",
|
||||
data:{send_type:'file'}
|
||||
});
|
||||
}else if (lastSendType === '3'){
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '<%= search_user_org_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>",
|
||||
data:{send_type:'file'}
|
||||
});
|
||||
}
|
||||
else{
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '<%= search_user_course_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type %>",
|
||||
data:{send_type:'file'}
|
||||
});
|
||||
|
||||
|
@ -216,7 +197,7 @@
|
|||
}
|
||||
line.children().css("background-color", 'white');
|
||||
id = line.children().last().html();
|
||||
user_id = line.children().eq(6).html();
|
||||
user_id = line.children().eq(5).html();
|
||||
if(user_id === '<%= User.current.id%>') {
|
||||
if(line.children().first().children().data('hasHistory') == 'Y'){
|
||||
alert('该资源存在历史版本,不能删除');
|
||||
|
@ -225,7 +206,7 @@
|
|||
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 %>'
|
||||
url: '<%= user_resource_delete_user_path(User.current.id) %>' + '?resource_id=' + id + '&type=<%= @type %>&status=<%= @status %>'
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,16 @@
|
|||
// });
|
||||
|
||||
$(document).ready(function(){
|
||||
<% if type == "1" %>
|
||||
$("#my_resources_choose_homework").addClass("referenceTypeActive");
|
||||
$("#public_resources_choose_homework").removeClass("referenceTypeActive");
|
||||
<% else %>
|
||||
$(".referenceTypeBlock").click(function(){
|
||||
var activeBlock = $(".referenceResourceType").children(".referenceTypeActive");
|
||||
activeBlock.removeClass("referenceTypeActive");
|
||||
$(this).addClass("referenceTypeActive");
|
||||
});
|
||||
<% end %>
|
||||
});
|
||||
|
||||
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
||||
|
@ -36,14 +41,12 @@ function store_seleted_resource(dom){
|
|||
</div>
|
||||
<div>
|
||||
<div class="referenceResourceType fl">
|
||||
<a href="<%= user_resource_type_user_path(user)%>" class="referenceTypeBlock referenceTypeActive" data-remote="true" >资源库</a>
|
||||
<a href="<%= user_resource_type_user_path(user,:type=>'2')%>" class="referenceTypeBlock" data-remote="true">课程资源</a>
|
||||
<a href="<%= user_resource_type_user_path(user,:type=>'3')%>" class="referenceTypeBlock" data-remote="true">项目资源</a>
|
||||
<a href="<%= user_resource_type_user_path(user,:type=>'5')%>" class="referenceTypeBlock" data-remote="true">用户资源</a>
|
||||
<a href="<%= user_resource_type_user_path(user,:type=>'4')%>" class="referenceTypeBlock" data-remote="true">附件</a> </div>
|
||||
<a href="<%= user_ref_resource_search_user_path(User.current, :type => '6') %>" id="public_resources_choose_homework" class="referenceTypeBlock referenceTypeActive" data-remote="true">公共资源</a>
|
||||
<a href="<%= user_ref_resource_search_user_path(User.current, :type => '1') %>" id="my_resources_choose_homework" class="referenceTypeBlock" data-remote="true">我的资源</a>
|
||||
</div>
|
||||
<div class="fr">
|
||||
<!--<form class="referenceSearchBox">-->
|
||||
<%= form_tag(user_ref_resource_search_user_path(user),:method => 'get',:remote=>'true',:class=>'referenceSearchBox') do%>
|
||||
<%= form_tag(user_ref_resource_search_user_path(user, :type => @type),:method => 'get',:remote=>'true',:class=>'referenceSearchBox') do%>
|
||||
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="searchReferencePopup" />
|
||||
<a href="javascript:void(0);" onclick="$(this).parent().submit();" class="referenceSearchIcon"></a>
|
||||
<% end %>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<% teacher = User.where("id=?",course.tea_id).first%>
|
||||
<span class="fr grayTxt">
|
||||
<%='主讲老师:'+(teacher.try(:realname) != " " ? teacher.lastname + teacher.firstname : teacher.try(:login)) %>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml15">
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<div class="mt5 fl">
|
||||
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
|
||||
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
||||
<%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3 mr15",:title=>"请从资源库中选择文件作为作品的附件",:remote => true%>
|
||||
<%= link_to "资源库", user_ref_resource_search_user_path(User.current.id, :homework_id => container.id), :class => "FilesBtn fl mt3 mr15", :title => "请从资源库中选择文件作为作品的附件", :remote => true %>
|
||||
<% if defined?(has_program) && has_program %>
|
||||
<div id="program_setting" class="fl">
|
||||
<a href="javascript:void(0);" class="ProBtn fl mt3"title="请设置编程语言和输入测试集">编程</a>
|
||||
|
|
|
@ -1,27 +1,15 @@
|
|||
<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
|
||||
:mul_id => @resource_id,
|
||||
:mul_type => @resource_type}),
|
||||
:method => 'post', :id => 'resource_import_container_form') do %>
|
||||
:mul_id => @resource_id,
|
||||
:mul_type => @resource_type}),
|
||||
:method => 'post', :id => 'resource_import_container_form') do %>
|
||||
<% @attachments.each do |attach| %>
|
||||
<ul class="subjectRow">
|
||||
<li class="subjectName fl hidden">
|
||||
<label>
|
||||
<% 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)%>
|
||||
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
||||
<% else %>
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
||||
<% end %>
|
||||
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
||||
<span>
|
||||
<% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<a href="" style="cursor: default" title="<%= attach.filename %>"><%= attach.filename %> </a>
|
||||
<% else %>
|
||||
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
|
||||
<% end %>
|
||||
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
|
||||
</span>
|
||||
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %>
|
||||
<img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16">
|
||||
<% end %>
|
||||
</label>
|
||||
</li>
|
||||
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="users_setting">
|
||||
<div id="upload_private_resource">
|
||||
<%= render :partial => "show_new_upload", :locals => {:type => @type, :status => @status} %>
|
||||
<%= render :partial => "show_new_upload", :locals => {:type => @type, :status => @status} %>
|
||||
</div>
|
||||
<div id="search_div">
|
||||
<%= render :partial => 'users/resource_search_form',:locals => {:user => @user, :type => @type, :order => @order, :sort => @score, :status => @status} %>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<div class="cl"></div>
|
||||
<form id="resources_list_form">
|
||||
<div id="resources_list">
|
||||
<%= render :partial => 'users/resources_list' , :locals => { :attachments => @attachments} %>
|
||||
<%= render :partial => 'users/resources_list' , :locals => { :attachments => @attachments, :type => @type} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
@ -19,13 +19,13 @@
|
|||
<div class="resource-check-all">
|
||||
<input id="checkboxAll" type="checkbox" value="" onclick="all_select();" class="resourcesCheckbox" />
|
||||
</div>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey mr15" onclick="all_select();">全选</a> -->
|
||||
<a href="javascript:void(0);" class="replyGrey mr15" onclick="all_select();">全选</a>
|
||||
<a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a> </div>
|
||||
<div class="cl"></div>
|
||||
<div class="resourcesSelectSend mt10 fl">
|
||||
<!--<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();">-->
|
||||
<!--<!–<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>–>-->
|
||||
<!--</div>-->
|
||||
<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();">
|
||||
<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>
|
||||
</div>
|
||||
<div class="fl">选择 <span class="c_red" id="res_count">0</span> 个资源</div>
|
||||
</div>
|
||||
|
||||
|
@ -215,7 +215,7 @@
|
|||
document.oncontextmenu = function() {return true;}
|
||||
line.children().css("background-color",'white');
|
||||
id = line.children().last().html();
|
||||
user_id = line.children().eq(6).html();
|
||||
user_id = line.children().eq(5).html();
|
||||
if(user_id === '<%= User.current.id %>') {
|
||||
res_name = line.children().eq(1).children().attr('title');
|
||||
res_link = line.children().eq(1).html();
|
||||
|
@ -232,7 +232,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
//发送至按钮控制
|
||||
//发送至按钮控制
|
||||
$("input[name='checkbox1[]']").click(function(){
|
||||
if($("input[name='checkbox1[]']:checked").length >= 1){
|
||||
$(".resourcesSelectSendButton").removeClass("inactive-border");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<ul class="resource-list-tab mt10" id="resource_tip_list">
|
||||
<li class="resource-list-checkbox fl"> </li>
|
||||
<li class="resource-list-name fl">资源名称</li>
|
||||
<li class="resource-list-apply fr">操作</li>
|
||||
<!--<li class="resource-list-apply fr">操作</li>-->
|
||||
<li class="resource-list-time fr">
|
||||
<%= link_to "上传时间", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "created_on", :search => " "), :class => "fl", :remote => true %>
|
||||
<% if @order == "created_on" %>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
<% if params[:is_observe].nil? %>
|
||||
<% if params[:send_type].present? && params[:send_type] == 'news' %>
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user,:homework_id=>@homework_id,:seleted_resources=>@seleted_resources}) %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user, :homework_id => @homework_id, :seleted_resources=> @seleted_resources, :type => @type}) %>');
|
||||
showModal('ajax-modal', '730px');
|
||||
$('#ajax-modal').css('height','500px').css("width","730px");
|
||||
$('#ajax-modal').siblings().remove();
|
||||
|
|
|
@ -1,2 +1,11 @@
|
|||
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'homework_ref_resources_list',:locals=>{:attachments => @attachments,:seleted_resources=>@seleted_resources})%>');
|
||||
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user, :homework_id => @homework_id, :seleted_resources=> @seleted_resources, :type => @type}) %>');
|
||||
showModal('ajax-modal', '730px');
|
||||
$('#ajax-modal').css('height','auto').css("width","730px");
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<div class='resourcePopupClose mt5 mr-5'>" + "<a href='javascript:void(0)' class='resourceClose' onclick='hideResource();'></a></div>");
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","").css("position","fixed");
|
||||
$('#ajax-modal').parent().addClass("popbox").addClass("referenceResourcesPopup");
|
||||
|
||||
$("#public_resources_choose_homework").attr('href','<%= user_ref_resource_search_user_path(@user, :type => '6') %>');
|
||||
$("#my_resources_choose_homework").attr('href','<%= user_ref_resource_search_user_path(@user, :type => '1') %>');
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(".resource-switch").click(function(){
|
||||
$(".resource-switch").children().removeClass("resource-tab-active");
|
||||
$(this).children().addClass("resource-tab-active");
|
||||
});
|
||||
$(".resource-switch").click(function(){
|
||||
$(".resource-switch").children().removeClass("resource-tab-active");
|
||||
$(this).children().addClass("resource-tab-active");
|
||||
});
|
||||
});
|
||||
function remote_search(){
|
||||
$("#resource_search_form").submit();
|
||||
}
|
||||
|
@ -55,10 +55,10 @@
|
|||
<li class="fl resource-switch">
|
||||
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab" id="my_resource_list" data-remote="true">我的资源</a>
|
||||
</li>
|
||||
<li class="fl resource-switch">
|
||||
<a href="<%= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">私有资源</a>
|
||||
</li>
|
||||
<li class="fl w680 border-bottom h34"> </li>
|
||||
<!--<li class="fl resource-switch">-->
|
||||
<!--<a href="<%#= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">申请资源</a>-->
|
||||
<!--</li>-->
|
||||
<li class="fl w770 border-bottom h34"> </li>
|
||||
<li class="fr resource-banner-li border-bottom h34">
|
||||
<div id="user_resource_type_filter">
|
||||
<%= render :partial => 'user_resource_type_filter' %>
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
<% if @wechat_user %>
|
||||
|
||||
<div class="page">
|
||||
<div class="weui_msg">
|
||||
<div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
|
||||
<div class="weui_text_area">
|
||||
<h2 class="weui_msg_title">操作成功</h2>
|
||||
<p class="weui_msg_desc">您已经绑定过微信了,用户名: (<%= @wechat_user.user.login %>)</p>
|
||||
</div>
|
||||
<div class="weui_opr_area">
|
||||
<p class="weui_btn_area">
|
||||
<a onclick="WeixinJSBridge.call('closeWindow');" class="weui_btn weui_btn_primary">确定</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
<div class="loginIn">
|
||||
<div>
|
||||
<p class="weui_cells_title wechat-error">
|
||||
|
@ -12,19 +30,16 @@
|
|||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label">用户名</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" autocapitalize="off" type="text" name="username" placeholder="请输入邮箱地址或昵称"/>
|
||||
</div>
|
||||
<input class="weui_input" autocapitalize="off" type="text" name="username" placeholder="请输入邮箱/登录名"/> </div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label">密码</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="password" name="password" placeholder="请输密码"/>
|
||||
<input class="weui_input" type="password" name="password" placeholder="请输入密码"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" value="<%=@code%>" name="code">
|
||||
|
||||
<div class="weui_btn_area">
|
||||
<a class="weui_btn weui_btn_primary" id="submitForm">确定</a>
|
||||
</div>
|
||||
|
@ -66,3 +81,6 @@
|
|||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<% end %>
|
|
@ -20,10 +20,17 @@
|
|||
<% else %>
|
||||
<%= l(:label_anonymous) %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= reply.notes.html_safe %>
|
||||
</p>
|
||||
<div id="reply_<%= reply.id %>">
|
||||
<p>
|
||||
<%= reply.notes.html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply__<%= reply.id %>');
|
||||
autoUrl('reply_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="cl"></div>
|
||||
<span class="c_grey fl">
|
||||
<%= format_time reply.created_on %>
|
||||
|
|
|
@ -2,7 +2,7 @@ button:
|
|||
-
|
||||
type: "view"
|
||||
name: "最新动态"
|
||||
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"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/assets/wechat/app.html#/activities?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "意见反馈"
|
||||
|
@ -13,8 +13,8 @@ button:
|
|||
-
|
||||
type: "view"
|
||||
name: "进入网站"
|
||||
url: "https://www.trustie.net/"
|
||||
url: "https://test.course.trustie.net/"
|
||||
-
|
||||
type: "view"
|
||||
name: "使用手册"
|
||||
url: "https://www.trustie.net/organizations/1/downloads"
|
||||
url: "https://test.course.trustie.net/organizations/1/downloads"
|
|
@ -0,0 +1,11 @@
|
|||
class DeleteAnonymousReply < ActiveRecord::Migration
|
||||
def up
|
||||
anonymous_replys = OrgDocumentComment.where("organization_id = 23 AND creator_id = 2")
|
||||
if anonymous_replys
|
||||
anonymous_replys.destroy_all
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
31
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160519070718) do
|
||||
ActiveRecord::Schema.define(:version => 20160526093715) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -77,6 +77,18 @@ ActiveRecord::Schema.define(:version => 20160519070718) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "apply_resources", :force => true do |t|
|
||||
t.integer "status"
|
||||
t.integer "user_id"
|
||||
t.integer "attachment_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "container_id"
|
||||
t.string "container_type"
|
||||
t.text "content"
|
||||
t.integer "apply_user_id"
|
||||
end
|
||||
|
||||
create_table "at_messages", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "at_message_id"
|
||||
|
@ -1107,23 +1119,6 @@ ActiveRecord::Schema.define(:version => 20160519070718) do
|
|||
t.integer "viewed_count", :default => 0
|
||||
end
|
||||
|
||||
create_table "mess", :id => false, :force => true do |t|
|
||||
t.string "课程名"
|
||||
t.integer "课程ID", :default => 0, :null => false
|
||||
t.string "教师姓", :default => "", :null => false
|
||||
t.string "教师名", :limit => 30, :default => "", :null => false
|
||||
t.string "主贴名", :default => "", :null => false
|
||||
t.integer "主贴或回帖ID", :default => 0, :null => false
|
||||
t.integer "回帖对应主贴ID"
|
||||
t.integer "帖子点赞数"
|
||||
t.integer "主贴回复数", :default => 0, :null => false
|
||||
t.text "主贴或回帖内容"
|
||||
t.datetime "发帖时间", :null => false
|
||||
t.integer "发帖或回帖用户ID", :default => 0, :null => false
|
||||
t.string "发帖或回帖用户姓", :default => "", :null => false
|
||||
t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
create_table "message_alls", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "message_id"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#coding=utf-8
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
||||
|
|
|
@ -297,7 +297,7 @@ K.options = {
|
|||
'td,th': [
|
||||
'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
|
||||
'.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
|
||||
'.font-style', '.text-decoration', '.vertical-align', '.background', '.border', '.text-overflow','.overflow','.white-space'
|
||||
'.font-style', '.text-decoration', '.vertical-align', '.background', '.border','.border-color', '.text-overflow','.overflow','.white-space'
|
||||
],
|
||||
a : ['id', 'class', 'href', 'target', 'name'],
|
||||
embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
|
||||
|
@ -2539,7 +2539,8 @@ function _nativeCommand(doc, key, val) {
|
|||
function _nativeCommandValue(doc, key) {
|
||||
var val = '';
|
||||
try {
|
||||
val = doc.query_nativeCommand(self.doc, name, val);Value(key);
|
||||
// val = doc.query_nativeCommand(self.doc, name, val);Value(key);
|
||||
val = doc.queryCommandValue(key);
|
||||
} catch (e) {}
|
||||
if (typeof val !== 'string') {
|
||||
val = '';
|
||||
|
@ -3310,6 +3311,7 @@ _each(('formatblock,selectall,justifyleft,justifycenter,justifyright,justifyfull
|
|||
if (!_IERANGE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) {
|
||||
self.selection();
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
||||
});
|
||||
|
@ -5751,7 +5753,7 @@ _plugin('core', function(K) {
|
|||
h2 : 24,
|
||||
h3 : 18,
|
||||
H4 : 14,
|
||||
p : 12
|
||||
p : 12
|
||||
},
|
||||
curVal = self.cmd.val('formatblock'),
|
||||
menu = self.createMenu({
|
||||
|
@ -5769,6 +5771,14 @@ _plugin('core', function(K) {
|
|||
checked : (curVal === key || curVal === val),
|
||||
click : function() {
|
||||
self.select().exec('formatblock', '<' + key + '>').hideMenu();
|
||||
//by yk利用html的特性使h1 h2 h3 h4标签之间不能相互包含 并将空的标签去掉
|
||||
if (key != "p"){
|
||||
var val = self.select().html();
|
||||
self.select().html(val);
|
||||
val = self.select().html().replace(/(<h1>\s*<\/h1>)|(<h2>\s*<\/h2>)|(<h3>\s*<\/h3>)|(<h4>\s*<\/h4>)/g,"");
|
||||
self.select().html(val);
|
||||
self.select();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -41,7 +41,7 @@ KindEditor.plugin('autoheight', function(K) {
|
|||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
self.resize(null, Math.max(
|
||||
((K.IE ? body.scrollHeight : body.offsetHeight) > 500 ? 500 : (K.IE ? body.scrollHeight : body.offsetHeight)) //限制初始化太高的情况
|
||||
((K.IE ? body.scrollHeight : body.offsetHeight) > 250 ? 250 : (K.IE ? body.scrollHeight : body.offsetHeight)) //限制初始化太高的情况
|
||||
+ 33, minHeight));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.ke-content {
|
||||
font-size: 12px;
|
||||
font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: <EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
font-family:Tahoma;
|
||||
font-size: 14px;
|
||||
/*font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;*/
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
||||
.ke-content pre {
|
||||
font-size:9pt;
|
||||
|
@ -53,4 +53,6 @@ span.at a{color:#269ac9;text-decoration: none;}
|
|||
/*yk*/
|
||||
.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;}
|
||||
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}
|
||||
.ke-content a{color: #15bccf;}
|
||||
.ke-content a:link,.ke-content a:visited{text-decoration:none;}
|
||||
|
|
|
@ -257,6 +257,7 @@ KindEditor.plugin('table', function(K) {
|
|||
style += 'border-color:'+borderColor+';';
|
||||
}
|
||||
style += 'table-layout: '+'fixed;';
|
||||
style += 'border-collapse: collapse;';
|
||||
var html = '<table';
|
||||
if (style !== '') {
|
||||
html += ' style="' + style + '"';
|
||||
|
@ -283,7 +284,7 @@ KindEditor.plugin('table', function(K) {
|
|||
for (var i = 0; i < rows; i++) {
|
||||
html += '<tr>';
|
||||
for (var j = 0; j < cols; j++) {
|
||||
html += '<td style="text-overflow:inherit;overflow: hidden;white-space: nowrap" >' + (K.IE ? ' ' : '<br />') + '</td>';
|
||||
html += '<td style="border:'+ border+'px solid;border-color:' + borderColor+';text-overflow:inherit;overflow: hidden;white-space: nowrap" >' + (K.IE ? ' ' : '<br />') + '</td>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
|
|
|
@ -8,30 +8,32 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5">
|
||||
<a herf="javascript:void(0);">
|
||||
<span ng-if="act.author.realname != ' '">{{act.author.realname}}</span>
|
||||
<span ng-if="act.author.realname == ' '">{{act.author.nickname}}</span>
|
||||
</a></div>
|
||||
<div class="post-title hidden">
|
||||
<a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title mt5 hidden"><a ng-href="#/homework/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
|
||||
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/homework/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5">
|
||||
<a herf="javascript:void(0);">
|
||||
<span ng-if="act.author.realname != ' '">{{act.author.realname}}</span>
|
||||
<span ng-if="act.author.realname == ' '">{{act.author.nickname}}</span>
|
||||
</a></div>
|
||||
<div class="post-title hidden">
|
||||
<a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title mt5 mb5 hidden"><a ng-href="#/homework/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content mb5" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15 f13 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
|
||||
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f13 c-grey2">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f12 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f12 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,23 +44,25 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f13 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/course_notice/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2 mt10">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/course_notice/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f13 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5 mb5"><a ng-href="#/course_notice/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -69,23 +73,25 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/course_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2 mt10">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/course_discussion/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5 mb5"><a ng-href="#/course_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,25 +118,27 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/issues/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15">优先级:{{act.issue_detail.issue_priority}}</span> <br />
|
||||
<span class="mr15">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15">完成度:{{act.issue_detail.done_ratio}}%</span>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/issues/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5 mb5"><a ng-href="#/issues/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content mb5" ng-bind-html="act.description|safeHtml"></div>
|
||||
<span class="mr15 f13 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f13 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br />
|
||||
<span class="mr15 f13 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f13 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -142,30 +150,32 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/project_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/project_discussion/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5 mb5"><a ng-href="#/project_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f12 fl mr15">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="act.act_type=='ProjectCreateInfo'">
|
||||
<div ng-if="act.act_type=='Project'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
|
@ -184,22 +194,24 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title mb5 hidden"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><span class="f12 c-grey">留言</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content c-grey2 mt5">
|
||||
<p class="post-all-content" ng-bind-html="act.description|safeHtml"></p>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/journal_for_message/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title mb5 hidden"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><span class="f12 c-grey">留言</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content c-grey3 mt5 mb5">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -211,22 +223,24 @@
|
|||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><span class="f12 c-grey">博客</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5"><a ng-href="#/blog_comment/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey2">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/blog_comment/'+ ($(this).attr('dataID'))">
|
||||
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
|
||||
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
|
||||
<div class="post-title hidden"><span class="f12 c-grey">博客</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-title hidden mt5 mb5"><a ng-href="#/blog_comment/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
|
||||
<div class="post-content c-grey3">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more undis" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 fl">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12 w36"><span class="reply-icon"></span>{{act.reply_count}}</a>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="!act.praise_count" ng-click="addPraise(act);"><span class="praise-icon"></span></div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><span class="praise-icon"></span>{{act.praise_count}}</div>
|
||||
<div class="c-grey fr f12 mr15 w36" ng-if="act.has_praise" ng-click="decreasePraise(act);"><span class="praised-icon"></span>{{act.praise_count}}</div>
|
||||
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
|
||||
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">赞</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,46 +1,49 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{blog.title}}</span><span ng-if="blog.locked" class="locked_btn_cir ml10" title="已锁定"> </span></div>
|
||||
<div class="post-title"><a herf="javascript:void(0);" class="mr10">{{blog.user.realname}}</a>发表博客</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content" style="height:auto;">
|
||||
<div class="post-all-content c-grey3 mt10" ng-bind-html="blog.content|safeHtml"></div>
|
||||
<div ng-if="blog.act_type == 'BlogComment'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{blog.title}}</span></div>
|
||||
<div class="post-title"><a herf="javascript:void(0);" class="mr10">{{blog.user.realname}}</a>发表博客</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content" style="height:auto;">
|
||||
<div class="post-all-content c-grey3 mt10" ng-bind-html="blog.content|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{blog.created_at}}</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{blog.created_at}}</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{blog.comment_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="blog.has_praise" ng-click="decreasePraise(blog);">已赞 ({{blog.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!blog.has_praise" ng-click="addPraise(blog);">赞 ({{blog.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_blog_reply">
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in blog.blog_comment_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{blog.comment_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="blog.has_praise" ng-click="decreasePraise(blog);">已赞 ({{blog.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!blog.has_praise" ng-click="addPraise(blog);">赞 ({{blog.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_blog_reply">
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in blog.blog_comment_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="!blog.locked" class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,52 +1,56 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span><span ng-if="discussion.locked" class="locked_btn_cir ml10" title="已锁定"> </span></div>
|
||||
<table class="post-detail-info"><tr>
|
||||
<td class="text-nowrap v-top">发布者:</td>
|
||||
<td>{{discussion.user.realname}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap v-top">来 源:</td>
|
||||
<td>{{discussion.course_project_name}} | 课程问答区</td>
|
||||
</tr></table>
|
||||
<div class="post-content c-grey3 mt10" style="height:auto;">
|
||||
<div class="post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{discussion.created_on}}</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_course_message_reply">
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in discussion.message_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
<div ng-if="discussion.act_type == 'Message'">
|
||||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span></div>
|
||||
<table class="post-detail-info"><tr>
|
||||
<td class="text-nowrap v-top">发布者:</td>
|
||||
<td>{{discussion.user.realname}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap v-top">来 源:</td>
|
||||
<td>{{discussion.course_project_name}} | 课程问答区</td>
|
||||
</tr></table>
|
||||
<div class="post-content c-grey3 mt10" style="height:auto;">
|
||||
<div class="post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="!discussion.locked" class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<span class="c-grey f13 mt10 fl">{{discussion.created_on}}</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_course_message_reply">
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in discussion.message_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div ng-if="news.act_type == 'News'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
|
@ -30,7 +31,7 @@
|
|||
<div class="post-reply-avatar fl"><img ng-src="{{comments.author.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{comments.author.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="comments.comments|safeHtml"></div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="comments.comments|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{comments.created_on}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
|
@ -42,7 +43,8 @@
|
|||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addNoticeReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -50,3 +52,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div ng-if="homework.act_type == 'HomeworkCommon'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
|
@ -36,7 +37,7 @@
|
|||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
|
@ -48,7 +49,8 @@
|
|||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment"></textarea>
|
||||
</div>
|
||||
<button ng-click="addHomeworkReply(formData)" ng-disabled="formData.disabled" value="回复" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -56,3 +58,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div ng-if="issue.act_type == 'Issue'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
|
@ -34,7 +35,7 @@
|
|||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.created_on}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
|
@ -46,7 +47,8 @@
|
|||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addIssueReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -54,3 +56,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,44 +1,47 @@
|
|||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><a herf="javascript:void(0);" class="mr10">{{message.user.realname}}</a><span style="vertical-align:top;">给您留言了</span><br /></div>
|
||||
<div class="post-title">{{message.created_on}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content c-grey2 mt10" style="height:auto;">
|
||||
<div class="post-all-content" ng-bind-html="message.notes|safeHtml"></div>
|
||||
<div ng-if="message.act_type == 'JournalsForMessage'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><a herf="javascript:void(0);" class="mr10">{{message.user.realname}}</a><span style="vertical-align:top;">给您留言了</span><br /></div>
|
||||
<div class="post-title">{{message.created_on}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-content c-grey2 mt10" style="height:auto;">
|
||||
<div class="post-all-content" ng-bind-html="message.notes|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{message.reply_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="message.has_praise" ng-click="decreasePraise(message);">已赞 ({{message.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!message.has_praise" ng-click="addPraise(message);">赞 ({{message.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_message_reply">
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{message.reply_count}})</span></div>
|
||||
<div class="post-interactive-column c-grey" ng-if="message.has_praise" ng-click="decreasePraise(message);">已赞 ({{message.praise_count}})</div>
|
||||
<div class="post-interactive-column c-grey" ng-if="!message.has_praise" ng-click="addPraise(message);">赞 ({{message.praise_count}})</div>
|
||||
</div>
|
||||
<div id="all_message_reply">
|
||||
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in message.child_reply">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
<div class="post-reply-wrap border-bottom" ng-repeat="journal in message.child_reply">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.notes|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addJournalReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
</div>
|
||||
<button ng-click="addJournalReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
<!-- 模板1开始,可以使用script(type设置为text/html)来存放模板片段,并且用id标示 -->
|
||||
<div ng-if="discussion.act_type == 'Message'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span><span ng-if="discussion.locked" class="locked_btn_cir ml10" title="已锁定"> </span></div>
|
||||
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span></div>
|
||||
<table class="post-detail-info"><tr>
|
||||
<td class="text-nowrap v-top">发布者:</td>
|
||||
<td>{{discussion.user.realname}}</td>
|
||||
|
@ -30,7 +31,7 @@
|
|||
<div class="post-reply-avatar fl"><img ng-src="{{journal.user.img_url}}" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden">{{journal.user.realname}}</div>
|
||||
<div class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<pre class="post-reply-content c-grey2 mb10" ng-bind-html="journal.content|safeHtml"></pre>
|
||||
<div class="post-reply-date fl">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-trigger fr undis">回复</div>
|
||||
</div>
|
||||
|
@ -38,11 +39,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="!discussion.locked" class="post-input-wrap">
|
||||
<div class="post-input-wrap">
|
||||
<div class="post-reply-row">
|
||||
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
|
||||
<div class="post-input-container">
|
||||
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
|
||||
<textarea class="copy-input"></textarea>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
|
||||
</div>
|
||||
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -50,3 +52,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 62 KiB |
|
@ -1178,6 +1178,37 @@ function chooseSendType(res_id,res_ids, user_id, send_type){
|
|||
lastSendType = sendType;
|
||||
}
|
||||
|
||||
|
||||
function chooseSendType2(res_id,res_ids, user_id, send_type, type){
|
||||
console.log(res_ids);
|
||||
sendType = $(".resourcesSendType").val();
|
||||
if (sendType === lastSendType) {
|
||||
return;
|
||||
} else if(lastSendType != null) { //不是第一次点击的时候
|
||||
if (sendType == '1') {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/users/' + user_id + '/search_user_course' + '?' + "&type=" + type,
|
||||
data:{send_id:res_id, send_ids:res_ids ,send_type:send_type}
|
||||
});
|
||||
} else if(sendType == '2') {
|
||||
console.log(res_ids);
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/users/' + user_id + '/search_user_project' + '?' + "&type=" + type,
|
||||
data:{send_id:res_id, send_ids:res_ids, send_type:send_type}
|
||||
});
|
||||
}else if(sendType == '3'){
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/users/' + user_id + '/search_user_org' + '?' + "&type=" + type,
|
||||
data:{send_id:res_id, send_ids:res_ids, send_type:send_type}
|
||||
});
|
||||
}
|
||||
}
|
||||
lastSendType = sendType;
|
||||
}
|
||||
|
||||
//组织新建和配置中,选择组织为私有后,disbled掉允许游客下载选项
|
||||
function disable_down(source, des, hint){
|
||||
if (source.attr("checked")){
|
||||
|
@ -1322,15 +1353,15 @@ function autoUrl(id){
|
|||
$("#"+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) {
|
||||
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(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 = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
else{
|
||||
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
}
|
||||
return reStr ;
|
||||
|
@ -1341,15 +1372,15 @@ function autoUrl(id){
|
|||
}
|
||||
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) {
|
||||
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(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 = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
else{
|
||||
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
}
|
||||
return reStr ;
|
||||
|
|
|
@ -73,79 +73,79 @@ function hidden_homework_score_form()
|
|||
///////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////新建课程相关
|
||||
//验证课程名称
|
||||
function regex_course_name()
|
||||
function regex_course_name(str)
|
||||
{
|
||||
var name = $.trim($("#course_name").val());
|
||||
var name = $.trim($("#"+str+"_course_name").val());
|
||||
if(name.length < 2)
|
||||
{
|
||||
$("#course_name_notice").show();
|
||||
$("#"+str+"_course_name_notice").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#course_name_notice").hide();
|
||||
$("#"+str+"_course_name_notice").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//验证课程学时
|
||||
function regex_course_class_period()
|
||||
function regex_course_class_period(str)
|
||||
{
|
||||
var class_period = $.trim($("#class_period").val());
|
||||
var class_period = $.trim($("#"+str+"_class_period").val());
|
||||
var regex = /^\d*$/;
|
||||
if(class_period.length == 0)
|
||||
{
|
||||
$("#course_class_period_notice").html("学时总数不能为空");
|
||||
$("#course_class_period_notice").show();
|
||||
$("#"+str+"_course_class_period_notice").html("学时总数不能为空");
|
||||
$("#"+str+"_course_class_period_notice").show();
|
||||
return false;
|
||||
}
|
||||
else if (regex.test(class_period)) {
|
||||
if(parseInt(class_period) > 0)
|
||||
{
|
||||
$("#course_class_period_notice").html("");
|
||||
$("#course_class_period_notice").hide();
|
||||
$("#"+str+"_course_class_period_notice").html("");
|
||||
$("#"+str+"_course_class_period_notice").hide();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#course_class_period_notice").html("学时总数必须大于0");
|
||||
$("#course_class_period_notice").show();
|
||||
$("#"+str+"_course_class_period_notice").html("学时总数必须大于0");
|
||||
$("#"+str+"_course_class_period_notice").show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#course_class_period_notice").html("学时总数必须为正整数");
|
||||
$("#course_class_period_notice").show();
|
||||
$("#"+str+"_course_class_period_notice").html("学时总数必须为正整数");
|
||||
$("#"+str+"_course_class_period_notice").show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//验证开始学期和结束学期
|
||||
function regex_time_term(){
|
||||
var obj_time = document.getElementById("time");
|
||||
var obj_end_time = document.getElementById("end_time");
|
||||
var obj_term = document.getElementById("term");
|
||||
var obj_end_term = document.getElementById("end_term");
|
||||
function regex_time_term(str){
|
||||
var obj_time = document.getElementById(str+"_time");
|
||||
var obj_end_time = document.getElementById(str+"_end_time");
|
||||
var obj_term = document.getElementById(str+"_term");
|
||||
var obj_end_term = document.getElementById(str+"_end_term");
|
||||
var time = obj_time.options[obj_time.selectedIndex];
|
||||
var end_time = obj_end_time.options[obj_end_time.selectedIndex];
|
||||
var term = obj_term.options[obj_term.selectedIndex];
|
||||
var end_term = obj_end_term.options[obj_end_term.selectedIndex];
|
||||
if(time.value == end_time.value) {
|
||||
if(set_term_val(term.value) > set_term_val(end_term.value)) {
|
||||
$("#course_time_term_notice").html("开始学期不能晚于结束学期");
|
||||
$("#course_time_term_notice").show();
|
||||
$("#"+str+"_course_time_term_notice").html("开始学期不能晚于结束学期");
|
||||
$("#"+str+"_course_time_term_notice").show();
|
||||
return false;
|
||||
} else {
|
||||
$("#course_time_term_notice").html("");
|
||||
$("#course_time_term_notice").hide();
|
||||
$("#"+str+"_course_time_term_notice").html("");
|
||||
$("#"+str+"_course_time_term_notice").hide();
|
||||
return true;
|
||||
}
|
||||
} else if(time.value < end_time.value) {
|
||||
$("#course_time_term_notice").html("");
|
||||
$("#course_time_term_notice").hide();
|
||||
$("#"+str+"_course_time_term_notice").html("");
|
||||
$("#"+str+"_course_time_term_notice").hide();
|
||||
return true;
|
||||
} else {
|
||||
$("#course_time_term_notice").html("开始学期不能晚于结束学期");
|
||||
$("#course_time_term_notice").show();
|
||||
$("#"+str+"_course_time_term_notice").html("开始学期不能晚于结束学期");
|
||||
$("#"+str+"_course_time_term_notice").show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -160,32 +160,32 @@ function set_term_val(val) {
|
|||
}
|
||||
}
|
||||
//验证密码
|
||||
function regex_course_password()
|
||||
function regex_course_password(str)
|
||||
{
|
||||
var class_period = $.trim($("#course_course_password").val());
|
||||
var class_period = $.trim($("#"+str+"_course_course_password").val());
|
||||
var regex = /^\w+$/;
|
||||
if(class_period.length == 0)
|
||||
{
|
||||
$("#course_course_password_notice").html("课程密码不能为空");
|
||||
$("#course_course_password_notice").show();
|
||||
$("#"+str+"_course_course_password_notice").html("课程密码不能为空");
|
||||
$("#"+str+"_course_course_password_notice").show();
|
||||
return false;
|
||||
}
|
||||
else if (regex.test(class_period)) {
|
||||
$("#course_course_password_notice").html("");
|
||||
$("#course_course_password_notice").hide();
|
||||
$("#"+str+"_course_course_password_notice").html("");
|
||||
$("#"+str+"_course_course_password_notice").hide();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#course_course_password_notice").html("课程密码有非法字符");
|
||||
$("#course_course_password_notice").show();
|
||||
$("#"+str+"_course_course_password_notice").html("课程密码有非法字符");
|
||||
$("#"+str+"_course_course_password_notice").show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//提交新建课程
|
||||
function submit_new_course()
|
||||
{
|
||||
if(regex_course_name()&®ex_course_class_period()&®ex_time_term()&®ex_course_password())
|
||||
if(regex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new')&®ex_course_password('new'))
|
||||
{
|
||||
$("#new_course").submit();
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ function submit_new_course()
|
|||
|
||||
function submit_edit_course(id)
|
||||
{
|
||||
if(regex_course_name()&®ex_course_class_period()&®ex_time_term()&®ex_course_password())
|
||||
if(regex_course_name('edit')&®ex_course_class_period('edit')&®ex_time_term('edit')&®ex_course_password('edit'))
|
||||
{
|
||||
$("#edit_course_"+id).submit();
|
||||
}
|
||||
|
@ -475,6 +475,19 @@ function submitMemberSerch(content)
|
|||
function show_more_msg()
|
||||
{
|
||||
$("#course_description").toggleClass("course_description_none");
|
||||
var information = $("#expend_more_information");
|
||||
var arrow = $("#arrow");
|
||||
var val = information.attr("value");
|
||||
if (val == "show_more") {
|
||||
$("#expend_more_information").text("收起描述信息");
|
||||
information.attr("value", "hide_more");
|
||||
arrow.attr("src", "/images/jiantouup.jpg")
|
||||
}
|
||||
else {
|
||||
$("#expend_more_information").text("展开更多信息");
|
||||
information.attr("value", "show_more");
|
||||
arrow.attr("src", "/images/jiantou.jpg")
|
||||
}
|
||||
}
|
||||
//作业描述显示更多信息
|
||||
function news_show_more_des(id)
|
||||
|
|
|
@ -25,7 +25,7 @@ function sd_create_editor(params){
|
|||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(paramsHeight);
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+7)) , paramsHeight));
|
||||
},
|
||||
afterBlur:function(){
|
||||
//params.toolbar_container.hide();
|
||||
|
|
|
@ -487,6 +487,7 @@ int main()\n\
|
|||
';
|
||||
} else if(language==3){
|
||||
src = '\
|
||||
#-*-coding:utf-8-*-\n\
|
||||
#注意\n\
|
||||
#1:该程序每次运行的时间必须小于200毫秒,否则会超时,程序超时将不会测试剩余的测试集\n\
|
||||
#2:该程序每次运行使用的内存不能超过1M,否则会返回错误\n\
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
||||
var apiUrl = '/api/v1/';
|
||||
var debug = false; //调试标志,如果在本地请置为true
|
||||
var debug = true; //调试标志,如果在本地请置为true
|
||||
|
||||
if(debug===true){
|
||||
//apiUrl = 'http://localhost:3000/api/v1/';
|
||||
apiUrl = 'https://www.trustie.net/api/v1/';
|
||||
apiUrl = 'http://localhost:3000/api/v1/';
|
||||
//apiUrl = 'https://www.trustie.net/api/v1/';
|
||||
}
|
||||
|
||||
app.factory('auth', function($http,$routeParams, $cookies, $q){
|
||||
|
@ -78,6 +78,9 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|||
url: apiUrl+ "activities",
|
||||
data: {openid: auth.openid(), page: page}
|
||||
}).then(function successCallback(response) {
|
||||
if(response.data.message == "undefined method `user' for nil:NilClass"){
|
||||
alert("请先绑定确实的用户账号");
|
||||
}
|
||||
$scope.current_page = 0;
|
||||
console.log($scope.current_page);
|
||||
console.log(response.data.page);
|
||||
|
@ -128,6 +131,7 @@ app.factory('common', function($http, auth, $routeParams){
|
|||
openid: auth.openid()
|
||||
};
|
||||
|
||||
//回复按钮禁用
|
||||
data.disabled = true;
|
||||
|
||||
$http({
|
||||
|
@ -135,7 +139,8 @@ app.factory('common', function($http, auth, $routeParams){
|
|||
url: apiUrl+ "new_comment/"+id,
|
||||
data: userInfo
|
||||
}).then(function successCallback(response) {
|
||||
alert("提交成功");
|
||||
//alert("提交成功");
|
||||
//数据提交完成,回复按钮启用
|
||||
data.disabled = false;
|
||||
if(typeof cb === 'function'){
|
||||
cb();
|
||||
|
@ -410,31 +415,51 @@ app.filter('safeHtml', function ($sce) {
|
|||
}
|
||||
});
|
||||
|
||||
app.directive('textAutoHeight', function($timeout){
|
||||
return {
|
||||
//app.directive('textAutoHeight', function($timeout){
|
||||
// return {
|
||||
// restrict: 'A',
|
||||
// scope: {},
|
||||
// link: function(scope, element, attr){
|
||||
// scope.text = '点击展开';
|
||||
// $timeout(function(){
|
||||
// var e = element.parent().children().eq(5);
|
||||
// var height = e[0].scrollHeight;
|
||||
// if(height>90){
|
||||
// element.css('display', 'block');
|
||||
// element.on('click', function(){
|
||||
// if(element.text() == "点击展开"){
|
||||
// e.css("height", height+'px');
|
||||
// element.text("点击隐藏");
|
||||
// } else {
|
||||
// e.css("height", '90px');
|
||||
// element.text("点击展开");
|
||||
// }
|
||||
//
|
||||
// });
|
||||
// }
|
||||
// }, false);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
app.directive('inputAuto',function(){
|
||||
return{
|
||||
restrict: 'A',
|
||||
scope: {},
|
||||
link: function(scope, element, attr){
|
||||
scope.text = '点击展开';
|
||||
$timeout(function(){
|
||||
var e = element.parent().children().eq(5);
|
||||
var height = e[0].scrollHeight;
|
||||
if(height>90){
|
||||
element.css('display', 'block');
|
||||
element.on('click', function(){
|
||||
if(element.text() == "点击展开"){
|
||||
e.css("height", height+'px');
|
||||
element.text("点击隐藏");
|
||||
} else {
|
||||
e.css("height", '90px');
|
||||
element.text("点击展开");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
|
||||
}
|
||||
link: function(scope, element){
|
||||
var copyContainer = element.parent().children().eq(0);
|
||||
var sendButton = element.parent().next();
|
||||
element.on('input',function(){
|
||||
console.log(sendButton);
|
||||
copyContainer.html(element[0].value);
|
||||
var textHeight = copyContainer[0].scrollHeight;
|
||||
element.css('height', textHeight + 'px');
|
||||
});
|
||||
sendButton.on('click',function(){
|
||||
element.css('height','28px');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -442,7 +467,7 @@ app.directive('loadingSpinner', function ($http) {
|
|||
return {
|
||||
restrict: 'A',
|
||||
replace: true,
|
||||
template: '<div class="loading-bg"><div class="loading-box"><img src="/images/wechat/loading.gif" alt=""/><span>加载中...</span></div></div>',
|
||||
template: '<div class="loading-bg"><div class="loading-box"><img src="/images/loading.gif" alt=""/><span>加载中...</span></div></div>',
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
scope.$watch('activeCalls', function (newVal, oldVal) {
|
||||
|
@ -495,7 +520,7 @@ app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProv
|
|||
redirectTo: '/activities'
|
||||
});
|
||||
|
||||
//监听异步请求
|
||||
//监听异步请求,实现加载中显隐标记
|
||||
$httpProvider.interceptors.push(function ($q, $rootScope) {
|
||||
if ($rootScope.activeCalls == undefined) {
|
||||
$rootScope.activeCalls = 0;
|
||||
|
|
|
@ -144,7 +144,6 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostDes {float:left; width:655px; margin-left:15px;}
|
||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
||||
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
||||
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
|
||||
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
|
||||
.homepagePostSubmit:hover {background-color:#d8d8d8;}
|
||||
|
@ -152,7 +151,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
|
||||
.homepagePostIntro a{color: #15bccf;}
|
||||
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
|
||||
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
|
||||
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
|
||||
|
@ -194,6 +193,7 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
|
|||
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
|
||||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #15bccf;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
|
||||
|
@ -441,6 +441,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
|||
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
|
||||
.ping_dispic a:hover{border:1px solid #15bccf;}
|
||||
.ping_discon{ float:left; width:610px; margin-left:10px; }
|
||||
.ping_journal a{color: #15bccf;}
|
||||
/*.ping_distop span{ float:left;}*/
|
||||
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
|
||||
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
|
||||
|
@ -1138,7 +1139,8 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin
|
|||
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
|
||||
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #15bccf;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; }
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
|
|
@ -123,7 +123,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
|||
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}
|
||||
|
||||
.ping_journal a{color: #15bccf;}
|
||||
|
||||
/* 创建作业 */
|
||||
.Newwork{ width:940px; border:1px solid #c3c3c3;}
|
||||
|
|
|
@ -672,7 +672,6 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;}
|
||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
||||
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
||||
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
|
||||
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
|
||||
.homepagePostSubmit:hover {background-color:#d8d8d8;}
|
||||
|
@ -683,6 +682,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #15bccf;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
.borderBottomNone {border-bottom:none !important;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
|
||||
|
@ -722,6 +722,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
|||
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #15bccf;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
|
||||
|
@ -866,6 +867,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
|
|||
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #15bccf;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
|
|
@ -333,6 +333,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
|||
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
|
||||
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
|
||||
.ping_disfoot span a span{ color: #6883b6;}
|
||||
.ping_journal a{color: #15bccf;}
|
||||
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
|
||||
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 40px;}
|
||||
|
@ -975,6 +976,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
|||
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #15bccf;}
|
||||
.topBorder {
|
||||
border-top: 1px solid #E4E4E4;
|
||||
}
|
||||
|
@ -1115,7 +1117,8 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
|
|||
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
|
||||
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #15bccf;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
|
|
@ -24,9 +24,9 @@ table{ background:#fff;}
|
|||
a.btn_message_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;}
|
||||
.db {display:block;}
|
||||
/* font & color */
|
||||
h2{ font-size:18px; color:#15bccf;}
|
||||
h3{ font-size:14px; color:#e8770d;}
|
||||
h4{ font-size:14px; color:#3b3b3b;}
|
||||
h2{ font-size:18px; }
|
||||
h3{ font-size:14px; }
|
||||
h4{ font-size:14px; }
|
||||
.f12{font-size:12px; font-weight:normal;}
|
||||
.f14{font-size:14px;}
|
||||
.f16{font-size:16px;}
|
||||
|
@ -613,6 +613,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #15bccf;}
|
||||
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
|
||||
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
|
||||
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
|
@ -649,6 +650,7 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #15bccf;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}
|
||||
|
|
|
@ -22,9 +22,9 @@ table{ background:#fff;}
|
|||
.none{display: none;}
|
||||
|
||||
/* font & color */
|
||||
h2{ font-size:18px; color:#15bccf;}
|
||||
h3{ font-size:14px; color:#e8770d;}
|
||||
h4{ font-size:14px; color:#3b3b3b;}
|
||||
h2{ font-size:18px; }
|
||||
h3{ font-size:14px; }
|
||||
h4{ font-size:14px; }
|
||||
.f12{font-size:12px; font-weight:normal;}
|
||||
.f14{font-size:14px;}
|
||||
.f16{font-size:16px;}
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
/*基本样式*/
|
||||
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体";}
|
||||
h1,h2,h3,h4,h5,p {padding:0px; margin:0px;}
|
||||
h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;}
|
||||
.f12 {font-size:12px;}
|
||||
.f13 {font-size:13px;}
|
||||
.f15 {font-size:15px;}
|
||||
.fb {font-weight:bold;}
|
||||
.mt2 {margin-top:2px;}
|
||||
.mt5 {margin-top:5px;}
|
||||
.mt10 {margin-top:10px;}
|
||||
.mb5 {margin-bottom:5px;}
|
||||
|
@ -16,6 +17,8 @@ h1,h2,h3,h4,h5,p {padding:0px; margin:0px;}
|
|||
.mr10 {margin-right:10px;}
|
||||
.ml15 {margin-left:15px;}
|
||||
.mr15 {margin-right:15px;}
|
||||
.mr20 {margin-right:20px;}
|
||||
.mr25 {margin-right:25px;}
|
||||
.ml55 {margin-left:55px;}
|
||||
.mr55 {margin-right:55px;}
|
||||
.c-blue {color:#269ac9;}
|
||||
|
@ -66,15 +69,16 @@ a.underline {text-decoration:underline;}
|
|||
.post-reply-content img {max-width:100%;}
|
||||
.post-reply-date, .post-reply-trigger {font-size:13px;}
|
||||
.post-input-container {padding-right:2px;}
|
||||
.post-reply-input {width:100%; height:28px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px;}
|
||||
.copy-input {width:100%; height:28px; line-height:28px; border-radius:3px; position:absolute; left:-9999em;}
|
||||
.post-reply-input {width:100%; height:28px; max-height:84px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px; overflow-y:auto; resize:none;}
|
||||
.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
|
||||
.reply-icon {background:url(/images/wechat/wechat_icon.png) -100px 1px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
|
||||
.praise-icon {background:url(/images/wechat/wechat_icon.png) -100px -38px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
|
||||
.praised-icon {background:url(/images/wechat/wechat_icon.png) -100px -76px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
|
||||
.reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
|
||||
.praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
|
||||
.praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
|
||||
|
||||
/* loading 弹框*/
|
||||
.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
|
||||
.loading-box {position:absolute; top:50%; background:white; width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
|
||||
.loading-box {position:absolute; top:50%; background:rgba(240,240,240, 0.5); width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
|
||||
.loading-box img {margin-top: 3px; text-align: center;}
|
||||
.loading-box span {display: block; font-size:12px;}
|
||||
|
||||
|
|