Compare commits
103
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eefca8531 | ||
|
|
96b6f7e3fd | ||
|
|
3d7b54df1c | ||
|
|
e8a6c2cc3c | ||
|
|
ecf0aa7d2e | ||
|
|
2f0533db2d | ||
|
|
350c68611c | ||
|
|
8b44f930f3 | ||
|
|
d2330d6e3e | ||
|
|
bd3e9fe4f6 | ||
|
|
4bb5e18f44 | ||
|
|
78205d8b00 | ||
|
|
a62ff9308f | ||
|
|
474e8b9b57 | ||
|
|
a8f7422c25 | ||
|
|
9e02011956 | ||
|
|
3f0addf04d | ||
|
|
0a01faedc9 | ||
|
|
8e0331449f | ||
|
|
635d3f1690 | ||
|
|
9e33bdadc3 | ||
|
|
54acaebc98 | ||
|
|
7f7e21b4f2 | ||
|
|
8609c8dec0 | ||
|
|
f3e40c1405 | ||
|
|
42aca64dc3 | ||
|
|
6ba840de4a | ||
|
|
53953e57db | ||
|
|
ddf61e5606 | ||
|
|
5685e11511 | ||
|
|
0e39de56e2 | ||
|
|
677faf1811 | ||
|
|
f0fbd50261 | ||
|
|
573270c98c | ||
|
|
f61b786e90 | ||
|
|
d085197635 | ||
|
|
6c58a0f773 | ||
|
|
478b54da26 | ||
|
|
e799ac4395 | ||
|
|
c101413d32 | ||
|
|
50a09763ec | ||
|
|
811b30791b | ||
|
|
4b8c68500a | ||
|
|
e5e45f3ada | ||
|
|
f619c5e389 | ||
|
|
3c6ca3c254 | ||
|
|
12fdb5a0ca | ||
|
|
7df0be3826 | ||
|
|
80be9e63ef | ||
|
|
0444b1f5e5 | ||
|
|
91d3e1d92c | ||
|
|
fb8407dbe3 | ||
|
|
9963c9fb68 | ||
|
|
80a2f67dda | ||
|
|
7b2e7f5297 | ||
|
|
38a695d8a9 | ||
|
|
df83c6fff7 | ||
|
|
adec8c8938 | ||
|
|
2746616610 | ||
|
|
61cc8f0f54 | ||
|
|
31476bb813 | ||
|
|
d2c1abeb95 | ||
|
|
f0c19cfdf9 | ||
|
|
8ab4e90a06 | ||
|
|
7a78594594 | ||
|
|
b50548c538 | ||
|
|
84f255173c | ||
|
|
b4ba4149d4 | ||
|
|
3830fddfe0 | ||
|
|
66633443de | ||
|
|
3d7fbd9711 | ||
|
|
aa851cad76 | ||
|
|
4a2c994401 | ||
|
|
af6813480a | ||
|
|
4a83521b84 | ||
|
|
470dbea22d | ||
|
|
8e369fe819 | ||
|
|
2b4e53ed1b | ||
|
|
6d194759fa | ||
|
|
d20081157a | ||
|
|
e88487bc9f | ||
|
|
311d741f92 | ||
|
|
8e0632236b | ||
|
|
78abcac1cb | ||
|
|
385e043809 | ||
|
|
8d5a2d71b7 | ||
|
|
1880ed11ca | ||
|
|
96602842a3 | ||
|
|
ca64cba9ad | ||
|
|
4f64ff3568 | ||
|
|
a22c0c46e0 | ||
|
|
196030b4b4 | ||
|
|
75a5e74bc0 | ||
|
|
39a20f6cc9 | ||
|
|
32d56232bc | ||
|
|
b7beadfc04 | ||
|
|
e53ad9f5d1 | ||
|
|
b2cbcf6629 | ||
|
|
906e522a6a | ||
|
|
4f7928ad1b | ||
|
|
77c7053bf1 | ||
|
|
20ac4f1ac0 | ||
|
|
9931eb7f61 |
No files matched your search
+1
-2
@@ -11,7 +11,7 @@ public/assets
|
|||||||
public/index.html
|
public/index.html
|
||||||
public/panel/**/*
|
public/panel/**/*
|
||||||
public/uploads/**/*
|
public/uploads/**/*
|
||||||
solr/data
|
solr
|
||||||
tmp/**/*
|
tmp/**/*
|
||||||
uploads/**/*
|
uploads/**/*
|
||||||
|
|
||||||
@@ -21,4 +21,3 @@ uploads/**/*
|
|||||||
|
|
||||||
.sass-cache/*
|
.sass-cache/*
|
||||||
*.supported
|
*.supported
|
||||||
mongoid.yml
|
|
||||||
@@ -26,7 +26,6 @@ gem "mongo_session_store-rails3", '3.0.6'
|
|||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
|
|
||||||
gem 'fb_graph'
|
gem 'fb_graph'
|
||||||
gem 'rack-gridfs'
|
|
||||||
gem 'radius'
|
gem 'radius'
|
||||||
gem 'rake'
|
gem 'rake'
|
||||||
# gem 'remotipart'
|
# gem 'remotipart'
|
||||||
@@ -50,7 +49,7 @@ gem 'tinymce-rails'
|
|||||||
gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux")
|
gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux")
|
||||||
gem 'libv8', '~> 3.11.8' if RUBY_PLATFORM.downcase.include?("linux")
|
gem 'libv8', '~> 3.11.8' if RUBY_PLATFORM.downcase.include?("linux")
|
||||||
gem 'mongoid-encryptor', :require => 'mongoid/encryptor'
|
gem 'mongoid-encryptor', :require => 'mongoid/encryptor'
|
||||||
gem 'rb-readline','~> 0.4.2' if RUBY_PLATFORM.downcase.include?("linux")
|
gem 'rb-readline' if RUBY_PLATFORM.downcase.include?("linux")
|
||||||
|
|
||||||
|
|
||||||
gem "impressionist", :git => 'git://github.com/charlotte-ruby/impressionist.git'
|
gem "impressionist", :git => 'git://github.com/charlotte-ruby/impressionist.git'
|
||||||
@@ -63,8 +62,6 @@ gem 'chinese_pinyin', '0.4.1'
|
|||||||
gem 'rmmseg-cpp-huacnlee', '0.2.9'
|
gem 'rmmseg-cpp-huacnlee', '0.2.9'
|
||||||
gem 'redis-namespace'
|
gem 'redis-namespace'
|
||||||
gem 'redis-search'
|
gem 'redis-search'
|
||||||
gem 'syslog-logger'
|
|
||||||
gem "recaptcha", :require => "recaptcha/rails"
|
|
||||||
|
|
||||||
# Gems used only for assets and not required
|
# Gems used only for assets and not required
|
||||||
# in production environments by default.
|
# in production environments by default.
|
||||||
|
|||||||
+402
@@ -0,0 +1,402 @@
|
|||||||
|
GIT
|
||||||
|
remote: git://github.com/amatsuda/kaminari.git
|
||||||
|
revision: 2e09b5374fec33b57c6387ca7bac89ecaa60c9eb
|
||||||
|
specs:
|
||||||
|
kaminari (0.14.1)
|
||||||
|
actionpack (>= 3.0.0)
|
||||||
|
activesupport (>= 3.0.0)
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/charlotte-ruby/impressionist.git
|
||||||
|
revision: 0894f6a550a33f83f4937d655e9f0774521781e4
|
||||||
|
specs:
|
||||||
|
impressionist (1.2.0)
|
||||||
|
httpclient (~> 2.2)
|
||||||
|
nokogiri (~> 1.5)
|
||||||
|
|
||||||
|
GEM
|
||||||
|
remote: http://rubygems.org/
|
||||||
|
specs:
|
||||||
|
actionmailer (3.2.12)
|
||||||
|
actionpack (= 3.2.12)
|
||||||
|
mail (~> 2.4.4)
|
||||||
|
actionpack (3.2.12)
|
||||||
|
activemodel (= 3.2.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
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.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
builder (~> 3.0.0)
|
||||||
|
activerecord (3.2.12)
|
||||||
|
activemodel (= 3.2.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
arel (~> 3.0.2)
|
||||||
|
tzinfo (~> 0.3.29)
|
||||||
|
activeresource (3.2.12)
|
||||||
|
activemodel (= 3.2.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
activesupport (3.2.12)
|
||||||
|
i18n (~> 0.6)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
arel (3.0.2)
|
||||||
|
attr_required (0.0.5)
|
||||||
|
bcrypt-ruby (3.0.0)
|
||||||
|
binding_of_caller (0.7.1)
|
||||||
|
debug_inspector (>= 0.0.1)
|
||||||
|
bourne (1.1.2)
|
||||||
|
mocha (= 0.10.5)
|
||||||
|
brakeman (1.9.2)
|
||||||
|
erubis (~> 2.6)
|
||||||
|
fastercsv (~> 1.5)
|
||||||
|
haml (~> 3.0)
|
||||||
|
highline (~> 1.6)
|
||||||
|
multi_json (~> 1.2)
|
||||||
|
ruby2ruby (~> 2.0)
|
||||||
|
ruby_parser (~> 3.1.1)
|
||||||
|
sass (~> 3.0)
|
||||||
|
terminal-table (~> 1.4)
|
||||||
|
bson (1.8.2)
|
||||||
|
bson_ext (1.8.2)
|
||||||
|
bson (~> 1.8.2)
|
||||||
|
builder (3.0.4)
|
||||||
|
capybara (2.0.2)
|
||||||
|
mime-types (>= 1.16)
|
||||||
|
nokogiri (>= 1.3.3)
|
||||||
|
rack (>= 1.0.0)
|
||||||
|
rack-test (>= 0.5.4)
|
||||||
|
selenium-webdriver (~> 2.0)
|
||||||
|
xpath (~> 1.0.0)
|
||||||
|
carrierwave (0.6.2)
|
||||||
|
activemodel (>= 3.2.0)
|
||||||
|
activesupport (>= 3.2.0)
|
||||||
|
carrierwave-mongoid (0.2.2)
|
||||||
|
carrierwave (~> 0.6.1)
|
||||||
|
mongoid (~> 2.1)
|
||||||
|
childprocess (0.3.8)
|
||||||
|
ffi (~> 1.0, >= 1.0.11)
|
||||||
|
chinese_pinyin (0.4.1)
|
||||||
|
chronic (0.9.0)
|
||||||
|
coderay (1.0.9)
|
||||||
|
coffee-rails (3.2.2)
|
||||||
|
coffee-script (>= 2.2.0)
|
||||||
|
railties (~> 3.2.0)
|
||||||
|
coffee-script (2.2.0)
|
||||||
|
coffee-script-source
|
||||||
|
execjs
|
||||||
|
coffee-script-source (1.4.0)
|
||||||
|
columnize (0.3.6)
|
||||||
|
database_cleaner (0.9.1)
|
||||||
|
debug_inspector (0.0.2)
|
||||||
|
debugger (1.2.4)
|
||||||
|
columnize (>= 0.3.1)
|
||||||
|
debugger-linecache (~> 1.1.1)
|
||||||
|
debugger-ruby_core_source (~> 1.1.7)
|
||||||
|
debugger-linecache (1.1.2)
|
||||||
|
debugger-ruby_core_source (>= 1.1.1)
|
||||||
|
debugger-ruby_core_source (1.1.8)
|
||||||
|
delorean (2.1.0)
|
||||||
|
chronic
|
||||||
|
devise (1.5.3)
|
||||||
|
bcrypt-ruby (~> 3.0)
|
||||||
|
orm_adapter (~> 0.0.3)
|
||||||
|
warden (~> 1.1)
|
||||||
|
diff-lcs (1.1.3)
|
||||||
|
encrypted_strings (0.3.3)
|
||||||
|
erubis (2.7.0)
|
||||||
|
exception_notification (3.0.1)
|
||||||
|
actionmailer (>= 3.0.4)
|
||||||
|
execjs (1.4.0)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
factory_girl (4.2.0)
|
||||||
|
activesupport (>= 3.0.0)
|
||||||
|
factory_girl_rails (4.2.1)
|
||||||
|
factory_girl (~> 4.2.0)
|
||||||
|
railties (>= 3.0.0)
|
||||||
|
faker (1.1.2)
|
||||||
|
i18n (~> 0.5)
|
||||||
|
fastercsv (1.5.5)
|
||||||
|
fattr (2.2.1)
|
||||||
|
fb_graph (2.6.4)
|
||||||
|
httpclient (>= 2.2.0.2)
|
||||||
|
multi_json (>= 1.3)
|
||||||
|
rack-oauth2 (>= 0.14.4)
|
||||||
|
tzinfo
|
||||||
|
ffi (1.4.0)
|
||||||
|
haml (3.1.8)
|
||||||
|
highline (1.6.15)
|
||||||
|
hike (1.2.1)
|
||||||
|
httpclient (2.3.2)
|
||||||
|
i18n (0.6.1)
|
||||||
|
journey (1.0.4)
|
||||||
|
jquery-rails (2.1.4)
|
||||||
|
railties (>= 3.0, < 5.0)
|
||||||
|
thor (>= 0.14, < 2.0)
|
||||||
|
jquery-ui-rails (4.0.1)
|
||||||
|
jquery-rails
|
||||||
|
railties (>= 3.1.0)
|
||||||
|
json (1.7.7)
|
||||||
|
mail (2.4.4)
|
||||||
|
i18n (>= 0.4.0)
|
||||||
|
mime-types (~> 1.16)
|
||||||
|
treetop (~> 1.4.8)
|
||||||
|
metaclass (0.0.1)
|
||||||
|
method_source (0.8.1)
|
||||||
|
mime-types (1.21)
|
||||||
|
mini_magick (3.5.0)
|
||||||
|
subexec (~> 0.2.1)
|
||||||
|
mocha (0.10.5)
|
||||||
|
metaclass (~> 0.0.1)
|
||||||
|
mongo (1.8.2)
|
||||||
|
bson (~> 1.8.2)
|
||||||
|
mongo_session_store-rails3 (3.0.6)
|
||||||
|
actionpack (>= 3.0)
|
||||||
|
mongo
|
||||||
|
mongoid (2.6.0)
|
||||||
|
activemodel (~> 3.1)
|
||||||
|
mongo (~> 1.7)
|
||||||
|
tzinfo (~> 0.3.22)
|
||||||
|
mongoid-encryptor (0.0.5)
|
||||||
|
activesupport (~> 3.0)
|
||||||
|
encrypted_strings (~> 0.3.3)
|
||||||
|
mongoid (~> 2)
|
||||||
|
mongoid-tree (0.7.0)
|
||||||
|
mongoid (~> 2.0)
|
||||||
|
multi_json (1.6.1)
|
||||||
|
net-ldap (0.3.1)
|
||||||
|
nokogiri (1.5.6)
|
||||||
|
options (2.3.0)
|
||||||
|
fattr
|
||||||
|
orm_adapter (0.0.7)
|
||||||
|
polyglot (0.3.3)
|
||||||
|
pr_geohash (1.0.0)
|
||||||
|
progress_bar (0.4.0)
|
||||||
|
highline (~> 1.6.1)
|
||||||
|
options (~> 2.3.0)
|
||||||
|
pry (0.9.12)
|
||||||
|
coderay (~> 1.0.5)
|
||||||
|
method_source (~> 0.8)
|
||||||
|
slop (~> 3.4)
|
||||||
|
pry-debugger (0.2.1)
|
||||||
|
debugger (~> 1.2.0)
|
||||||
|
pry (~> 0.9.10)
|
||||||
|
pry-remote (0.1.6)
|
||||||
|
pry (~> 0.9)
|
||||||
|
slop (~> 3.0)
|
||||||
|
pry-stack_explorer (0.4.9)
|
||||||
|
binding_of_caller (>= 0.7)
|
||||||
|
pry (~> 0.9.11)
|
||||||
|
rack (1.4.5)
|
||||||
|
rack-cache (1.2)
|
||||||
|
rack (>= 0.4)
|
||||||
|
rack-oauth2 (1.0.0)
|
||||||
|
activesupport (>= 2.3)
|
||||||
|
attr_required (>= 0.0.5)
|
||||||
|
httpclient (>= 2.2.0.2)
|
||||||
|
i18n
|
||||||
|
multi_json (>= 1.3.6)
|
||||||
|
rack (>= 1.1)
|
||||||
|
rack-protection (1.3.2)
|
||||||
|
rack
|
||||||
|
rack-ssl (1.3.3)
|
||||||
|
rack
|
||||||
|
rack-test (0.6.2)
|
||||||
|
rack (>= 1.0)
|
||||||
|
radius (0.7.3)
|
||||||
|
rails (3.2.12)
|
||||||
|
actionmailer (= 3.2.12)
|
||||||
|
actionpack (= 3.2.12)
|
||||||
|
activerecord (= 3.2.12)
|
||||||
|
activeresource (= 3.2.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
bundler (~> 1.0)
|
||||||
|
railties (= 3.2.12)
|
||||||
|
railties (3.2.12)
|
||||||
|
actionpack (= 3.2.12)
|
||||||
|
activesupport (= 3.2.12)
|
||||||
|
rack-ssl (~> 1.3.2)
|
||||||
|
rake (>= 0.8.7)
|
||||||
|
rdoc (~> 3.4)
|
||||||
|
thor (>= 0.14.6, < 2.0)
|
||||||
|
rake (10.0.3)
|
||||||
|
rdoc (3.12.1)
|
||||||
|
json (~> 1.4)
|
||||||
|
redis (3.0.2)
|
||||||
|
redis-namespace (1.2.1)
|
||||||
|
redis (~> 3.0.0)
|
||||||
|
redis-search (0.9.0)
|
||||||
|
chinese_pinyin (>= 0.3.0)
|
||||||
|
redis (>= 2.1.1)
|
||||||
|
redis-namespace (>= 1.0.2)
|
||||||
|
resque (1.23.0)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
redis-namespace (~> 1.0)
|
||||||
|
sinatra (>= 0.9.2)
|
||||||
|
vegas (~> 0.1.2)
|
||||||
|
resque-restriction (0.3.0)
|
||||||
|
resque (>= 1.7.0)
|
||||||
|
resque-scheduler (2.0.0)
|
||||||
|
redis (>= 2.0.1)
|
||||||
|
resque (>= 1.20.0)
|
||||||
|
rufus-scheduler
|
||||||
|
rmmseg-cpp-huacnlee (0.2.9)
|
||||||
|
rsolr (1.0.8)
|
||||||
|
builder (>= 2.1.2)
|
||||||
|
rspec (2.12.0)
|
||||||
|
rspec-core (~> 2.12.0)
|
||||||
|
rspec-expectations (~> 2.12.0)
|
||||||
|
rspec-mocks (~> 2.12.0)
|
||||||
|
rspec-core (2.12.2)
|
||||||
|
rspec-expectations (2.12.1)
|
||||||
|
diff-lcs (~> 1.1.3)
|
||||||
|
rspec-mocks (2.12.2)
|
||||||
|
rspec-rails (2.12.2)
|
||||||
|
actionpack (>= 3.0)
|
||||||
|
activesupport (>= 3.0)
|
||||||
|
railties (>= 3.0)
|
||||||
|
rspec-core (~> 2.12.0)
|
||||||
|
rspec-expectations (~> 2.12.0)
|
||||||
|
rspec-mocks (~> 2.12.0)
|
||||||
|
ruby2ruby (2.0.3)
|
||||||
|
ruby_parser (~> 3.1)
|
||||||
|
sexp_processor (~> 4.0)
|
||||||
|
ruby_parser (3.1.1)
|
||||||
|
sexp_processor (~> 4.1)
|
||||||
|
rubyzip (0.9.9)
|
||||||
|
rufus-scheduler (2.0.17)
|
||||||
|
tzinfo (>= 0.3.23)
|
||||||
|
sass (3.2.5)
|
||||||
|
sass-rails (3.2.6)
|
||||||
|
railties (~> 3.2.0)
|
||||||
|
sass (>= 3.1.10)
|
||||||
|
tilt (~> 1.3)
|
||||||
|
select2-rails (3.3.1)
|
||||||
|
sass-rails (>= 3.2)
|
||||||
|
thor (~> 0.14)
|
||||||
|
selenium-webdriver (2.30.0)
|
||||||
|
childprocess (>= 0.2.5)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
rubyzip
|
||||||
|
websocket (~> 1.0.4)
|
||||||
|
sexp_processor (4.1.5)
|
||||||
|
shoulda-matchers (1.4.2)
|
||||||
|
activesupport (>= 3.0.0)
|
||||||
|
bourne (~> 1.1.2)
|
||||||
|
simplecov (0.7.1)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
simplecov-html (~> 0.7.1)
|
||||||
|
simplecov-html (0.7.1)
|
||||||
|
sinatra (1.3.4)
|
||||||
|
rack (~> 1.4)
|
||||||
|
rack-protection (~> 1.3)
|
||||||
|
tilt (~> 1.3, >= 1.3.3)
|
||||||
|
slop (3.4.3)
|
||||||
|
social-share-button (0.1.1)
|
||||||
|
spork (0.9.2)
|
||||||
|
sprockets (2.2.2)
|
||||||
|
hike (~> 1.2)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
rack (~> 1.0)
|
||||||
|
tilt (~> 1.1, != 1.3.0)
|
||||||
|
subexec (0.2.2)
|
||||||
|
sunspot (1.3.3)
|
||||||
|
pr_geohash (~> 1.0)
|
||||||
|
rsolr (~> 1.0.7)
|
||||||
|
sunspot-rails-tester (0.0.4)
|
||||||
|
sunspot_rails (~> 1.2)
|
||||||
|
sunspot_mongo (1.0.1)
|
||||||
|
sunspot_rails
|
||||||
|
sunspot_rails (1.3.3)
|
||||||
|
nokogiri
|
||||||
|
sunspot (= 1.3.3)
|
||||||
|
sunspot_solr (1.3.3)
|
||||||
|
terminal-table (1.4.5)
|
||||||
|
thor (0.17.0)
|
||||||
|
tilt (1.3.3)
|
||||||
|
tinymce-rails (3.5.8)
|
||||||
|
railties (>= 3.1.1)
|
||||||
|
treetop (1.4.12)
|
||||||
|
polyglot
|
||||||
|
polyglot (>= 0.3.1)
|
||||||
|
tzinfo (0.3.35)
|
||||||
|
uglifier (1.3.0)
|
||||||
|
execjs (>= 0.3.0)
|
||||||
|
multi_json (~> 1.0, >= 1.0.2)
|
||||||
|
vegas (0.1.11)
|
||||||
|
rack (>= 1.0.0)
|
||||||
|
warden (1.2.1)
|
||||||
|
rack (>= 1.0)
|
||||||
|
watchr (0.7)
|
||||||
|
websocket (1.0.7)
|
||||||
|
xpath (1.0.0)
|
||||||
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
brakeman
|
||||||
|
bson_ext
|
||||||
|
capybara
|
||||||
|
carrierwave
|
||||||
|
carrierwave-mongoid
|
||||||
|
chinese_pinyin (= 0.4.1)
|
||||||
|
coffee-rails
|
||||||
|
database_cleaner
|
||||||
|
debugger
|
||||||
|
delorean
|
||||||
|
devise (= 1.5.3)
|
||||||
|
exception_notification
|
||||||
|
execjs
|
||||||
|
factory_girl_rails
|
||||||
|
faker
|
||||||
|
fb_graph
|
||||||
|
impressionist!
|
||||||
|
jquery-rails (= 2.1.4)
|
||||||
|
jquery-ui-rails
|
||||||
|
kaminari!
|
||||||
|
mime-types
|
||||||
|
mini_magick
|
||||||
|
mongo_session_store-rails3 (= 3.0.6)
|
||||||
|
mongoid (> 2.1, < 3.0.0)
|
||||||
|
mongoid-encryptor
|
||||||
|
mongoid-tree
|
||||||
|
net-ldap (~> 0.3.1)
|
||||||
|
nokogiri
|
||||||
|
progress_bar
|
||||||
|
pry
|
||||||
|
pry-debugger
|
||||||
|
pry-remote
|
||||||
|
pry-stack_explorer
|
||||||
|
radius
|
||||||
|
rails (~> 3.2.9)
|
||||||
|
rake
|
||||||
|
redis (>= 2.1.1)
|
||||||
|
redis-namespace
|
||||||
|
redis-search
|
||||||
|
resque
|
||||||
|
resque-restriction
|
||||||
|
resque-scheduler
|
||||||
|
rmmseg-cpp-huacnlee (= 0.2.9)
|
||||||
|
rspec (~> 2.0)
|
||||||
|
rspec-rails (~> 2.0)
|
||||||
|
rubyzip
|
||||||
|
sass-rails
|
||||||
|
select2-rails (= 3.3.1)
|
||||||
|
shoulda-matchers
|
||||||
|
simplecov
|
||||||
|
sinatra
|
||||||
|
social-share-button
|
||||||
|
spork
|
||||||
|
sprockets
|
||||||
|
sunspot-rails-tester
|
||||||
|
sunspot_mongo
|
||||||
|
sunspot_solr
|
||||||
|
tinymce-rails
|
||||||
|
uglifier
|
||||||
|
watchr
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 524 B |
Binary file not shown.
|
Before Width: | Height: | Size: 738 B |
@@ -10,11 +10,10 @@
|
|||||||
//= require jquery.form
|
//= require jquery.form
|
||||||
//= require jquery.tinyscrollbar
|
//= require jquery.tinyscrollbar
|
||||||
//= require jquery.miniColors.min
|
//= require jquery.miniColors.min
|
||||||
//= require select2
|
|
||||||
//= require bootstrap
|
//= require bootstrap
|
||||||
//= require orbitdesktopAPI
|
//= require orbitdesktopAPI
|
||||||
//= require orbitTimeline
|
//= require orbitTimeline
|
||||||
//= require orbitdesktop
|
//= require orbitdesktop
|
||||||
//= require jquery.gridster
|
//= require jquery.gridster
|
||||||
//= require jquery.isotope.min
|
|
||||||
//= require desktop/books_pages
|
//= require desktop/books_pages
|
||||||
|
//= require select2
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||||
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
||||||
// alert("<%= @desktop.inspect %>")
|
alert("<%= @desktop.inspect %>")
|
||||||
var od = new orbitDesktop("#ajax_container");
|
var od = new orbitDesktop("#ajax_container");
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
getEvent(selet);
|
||||||
function resetText() {
|
function resetText() {
|
||||||
$events.find('li').find($mon).html('');
|
$events.find('li').find($mon).html('');
|
||||||
$events.find('li').find($day).html('');
|
$events.find('li').find($day).html('');
|
||||||
@@ -63,4 +63,60 @@ $(document).ready(function(){
|
|||||||
$events.find('li').find($link_text).attr('href', '');
|
$events.find('li').find($link_text).attr('href', '');
|
||||||
$events.find('li').find($time).html('');
|
$events.find('li').find($time).html('');
|
||||||
}
|
}
|
||||||
|
function getEvent(selet){
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "/static/nccu_calendar.xml",
|
||||||
|
dataType: "xml",
|
||||||
|
timeout: 1000,
|
||||||
|
error: function(xml){
|
||||||
|
$events.find('.links_next').addClass('disabled')
|
||||||
|
$events.find('.error_mag').show();
|
||||||
|
$events.find('ul').hide();
|
||||||
|
$events.find('.error_mag').html("讀取錯誤");
|
||||||
|
},
|
||||||
|
success: function(xml) {
|
||||||
|
xmlLength = $(xml).find('entry').length;
|
||||||
|
$(xml).find('entry').slice(selet, selet+objLength).each(function(i){
|
||||||
|
title_text = $(this).find('title').text()
|
||||||
|
link_text = $(this).find('link').attr('href')
|
||||||
|
summary_text = $(this).find('summary').text()
|
||||||
|
indexA = summary_text.indexOf("-");
|
||||||
|
indexB = summary_text.indexOf(" ");
|
||||||
|
indexC = summary_text.indexOf("/");
|
||||||
|
//清除前後空白字元
|
||||||
|
summary_text = jQuery.trim(summary_text);
|
||||||
|
//篩選標題
|
||||||
|
title_text = title_text.slice(0, 16)
|
||||||
|
if (summary_text.length == 31) {
|
||||||
|
startDate_text = summary_text.slice(0, indexA);
|
||||||
|
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
||||||
|
startDay_text = startDate_text.slice(7);
|
||||||
|
endDate_text = summary_text.slice((indexA+1), indexB);
|
||||||
|
time_text = summary_text.slice((indexB+1));
|
||||||
|
} else {
|
||||||
|
startDate_text = summary_text.slice(0, indexB);
|
||||||
|
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
||||||
|
startDay_text = startDate_text.slice(7);
|
||||||
|
endDate_text = '';
|
||||||
|
time_text = summary_text.slice((indexB+1));
|
||||||
|
}
|
||||||
|
if(startMon_text.slice(0, 1) == '0'){
|
||||||
|
startMon_text = month[startMon_text.slice(1)-1];
|
||||||
|
} else {
|
||||||
|
startMon_text = month[startMon_text-1];
|
||||||
|
}
|
||||||
|
$events.find('li').eq(i).find($mon).html(startMon_text);
|
||||||
|
$events.find('li').eq(i).find($day).html(startDay_text);
|
||||||
|
$events.find('li').eq(i).find($link_text).html(title_text+"…");
|
||||||
|
$events.find('li').eq(i).find($link_text).attr('href', link_text);
|
||||||
|
$events.find('li').eq(i).find($time).html('時間:'+time_text);
|
||||||
|
//console.log();
|
||||||
|
/*$('<li></li>')
|
||||||
|
.html('<div class="event_date"><span class="mon">'+startMon_text+'</span><span class="day">'+startDay_text+'</div>')
|
||||||
|
.appendTo('.events ul');*/
|
||||||
|
});//close each(
|
||||||
|
}
|
||||||
|
}); //close $.ajax(
|
||||||
|
}
|
||||||
});
|
});
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
function append_id(){
|
|
||||||
if ($("#object_id").length == 1) {
|
|
||||||
return "&id="+$("#object_id").val();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return '';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#page_design").live('change', function() {
|
|
||||||
$.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("#module_app_list select").live('change', function() {
|
|
||||||
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id());
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#widget_list select,#frontend_list select").live('change', function() {
|
|
||||||
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() );
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#tag_list select").live('change', function() {
|
|
||||||
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id() );
|
|
||||||
});
|
|
||||||
|
|
||||||
$("select.widget_field_select").live('change', function() {
|
|
||||||
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() );
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.part_kind').live('click', function() {
|
|
||||||
$('.part_kind_partial').hide();
|
|
||||||
$('#part_' + $(this).attr('value')).show();
|
|
||||||
});
|
|
||||||
@@ -2,11 +2,11 @@ function update_cates_and_tags()
|
|||||||
{
|
{
|
||||||
$('.select_option,.select_all').removeAttr('disabled');
|
$('.select_option,.select_all').removeAttr('disabled');
|
||||||
$(".select_all:checked").each(function( obj ) {
|
$(".select_all:checked").each(function( obj ) {
|
||||||
// $(this).parent().siblings('label').find('.select_option').attr('disabled',"disabled");
|
$(this).parent().siblings('label').find('.select_option').attr('disabled',true);
|
||||||
$(this).parent().siblings('label').find('.select_option').removeAttr('checked');
|
$(this).parent().siblings('label').find('.select_option').removeAttr('checked');
|
||||||
});
|
});
|
||||||
$(".select_option:checked").each(function( obj ) {
|
$(".select_option:checked").each(function( obj ) {
|
||||||
// $(this).parent().siblings('label').find('.select_all').attr('disabled',"disabled");
|
$(this).parent().siblings('label').find('.select_all').attr('disabled',true);
|
||||||
$(this).parent().siblings('label').find('.select_all').removeAttr('checked');
|
$(this).parent().siblings('label').find('.select_all').removeAttr('checked');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
+5
-7
@@ -1,13 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* Isotope v1.5.25
|
* Isotope v1.5.11
|
||||||
* An exquisite jQuery plugin for magical layouts
|
* An exquisite jQuery plugin for magical layouts
|
||||||
* http://isotope.metafizzy.co
|
* http://isotope.metafizzy.co
|
||||||
*
|
*
|
||||||
* Commercial use requires one-time purchase of a commercial license
|
* Commercial use requires one-time license fee
|
||||||
* http://isotope.metafizzy.co/docs/license.html
|
* http://metafizzy.co/#licenses
|
||||||
*
|
*
|
||||||
* Non-commercial use is licensed under the MIT License
|
* Copyright 2012 David DeSandro / Metafizzy
|
||||||
*
|
|
||||||
* Copyright 2013 Metafizzy
|
|
||||||
*/
|
*/
|
||||||
(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.oLine truncated
|
(function(a,b,c){var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd",transitionProperty:"transitionEnd"}[j],r=h("transitionDuration"));var s=b.event,t;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",t&&clearTimeout(t),t=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var u=["overflow","position","width","height"],v=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!b.browser.opera,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};for(var d=0,e=u.length;d<e;d++){var f=u[d];this.originalStyle[f]=c[f]||""}this.element.css({overflow:"hidden",position:"relative"}),this._updateAnimationEngine(),this._updateUsingTransforms();var g={"original-order":function(a,b){b.elemCount++;return b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,g),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left"),10),top:parseInt(this.element.css("padding-top"),10)};var h=this;setTimeout(function(){h.element.addClass(h.options.containerClass)},0),this.options.resizable&&v.bind("smartresize.isotope",function(){h.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0);return c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),thiLine truncated
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -8,37 +8,32 @@ var orbitDesktopAPI = function(){
|
|||||||
//msg (string) : message to display
|
//msg (string) : message to display
|
||||||
//type (string : success, imp, alert
|
//type (string : success, imp, alert
|
||||||
//time (int) : duration for notification in seconds
|
//time (int) : duration for notification in seconds
|
||||||
var $notify = $('#orbitnote'),
|
var $notify = $("#orbitnote");
|
||||||
ani_method = { direction: 'up',easing: 'easeInOutQuint' },
|
var img, n_height;
|
||||||
img, n_height;
|
|
||||||
if(!type)type="";
|
if(!type)type="";
|
||||||
switch(type){
|
switch(type){
|
||||||
case "alert":
|
case "alert":
|
||||||
img = "exclamation-sign";
|
img = "note_alert.png";
|
||||||
break;
|
break;
|
||||||
case "imp":
|
case "imp":
|
||||||
img = "warning-sign";
|
img = "note_imp.png";
|
||||||
break;
|
break;
|
||||||
case "success":
|
case "success":
|
||||||
img = "ok";
|
img = "note_success.png";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
img = "exclamation-sign";
|
img = "note_alert.png";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( !time || time > 20) time = 5000; else time = time*1000;
|
$notify.find("img#note_img").attr("src",o.notifyImgPath+img);
|
||||||
|
$notify.find(".note_message").html(msg);
|
||||||
var sign = '<div class="note_type"><span class="sign icon-'+ img +'"></span></div>',
|
n_height = $notify.outerHeight();
|
||||||
message = '<div class="note_message">'+ msg +'</div>',
|
if(!time)time=5000; else time=time*1000;
|
||||||
item = '<div class="note_holder admbg">'+ sign + message +'</div>';
|
$notify
|
||||||
|
.css({'top':-n_height, 'display':'block', 'opacity':0})
|
||||||
$(item)
|
.animate({top:0,opacity:1},200)
|
||||||
.prependTo($notify)
|
|
||||||
.stop(1,1)
|
|
||||||
.toggle('slide', ani_method, 300)
|
|
||||||
.delay(time)
|
.delay(time)
|
||||||
.toggle('slide', ani_method, 800);
|
.animate({top:-n_height,opacity:0},200);
|
||||||
$notify.find('.note_holder:hidden').remove();
|
|
||||||
};
|
};
|
||||||
this.executeFunc = function(func,callbackFn){
|
this.executeFunc = function(func,callbackFn){
|
||||||
//takes 2 arguments
|
//takes 2 arguments
|
||||||
@@ -72,7 +67,7 @@ var orbitDesktopAPI = function(){
|
|||||||
this.changeWallpaper = function(wallpaper){
|
this.changeWallpaper = function(wallpaper){
|
||||||
//takes 1 parameter
|
//takes 1 parameter
|
||||||
//wallpaper (string): takes wallpaper and sets the wallpaper
|
//wallpaper (string): takes wallpaper and sets the wallpaper
|
||||||
$("#thmbackground").attr("src",o.wallpaperPath+wallpaper);
|
$("img#thmbackground").attr("src",o.wallpaperPath+wallpaper);
|
||||||
o.saveWallpaper(wallpaper);
|
o.saveWallpaper(wallpaper);
|
||||||
};
|
};
|
||||||
this.confirm = function(settings,callbackfn){
|
this.confirm = function(settings,callbackfn){
|
||||||
@@ -116,35 +111,29 @@ var orbitDesktopAPI = function(){
|
|||||||
})
|
})
|
||||||
return tempArray;
|
return tempArray;
|
||||||
};
|
};
|
||||||
this.appWindow = function(options,callbackfn){
|
this.appWindow = function(settings,callbackfn){
|
||||||
//takes set of arguments as array and gives callback
|
//takes set of arguments as array and gives callback
|
||||||
//settings.method (string) : like open and close
|
//settings.method (string) : like open and close
|
||||||
//settings.title (string) : the window title
|
//settings.title (string) : the window title
|
||||||
//settings.extUrl (boolean) : true for opening external url else false
|
//settings.extUrl (boolean) : true for opening external url else false
|
||||||
//settings.appid (string) : appid.. user can use this appid to open or close or refresh the window
|
//settings.appid (string) : appid.. user can use this appid to open or close or refresh the window
|
||||||
//settings.url (string) : it is the url if you want to force external url to open in appwindow... you have to pass extURL in appid if you want to open externalurl
|
//settings.url (string) : it is the url if you want to force external url to open in appwindow... you have to pass extURL in appid if you want to open externalurl
|
||||||
var settings = {
|
if(typeof settings == "undefined")settings = {};
|
||||||
method : "open",
|
|
||||||
extUrl : true,
|
|
||||||
title : "New Window"
|
|
||||||
}
|
|
||||||
$.extend(settings,options);
|
|
||||||
if(!settings.appid){
|
if(!settings.appid){
|
||||||
o.notify("Invalid AppID.","imp",3);
|
o.notify("Invalid AppID.","imp",3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var isWindow = ($("div.app_frame[data-app="+settings.appid+"]").length > 0 ? $("div.app_frame[data-app="+settings.appid+"]") : null);
|
if(!settings.method)settings.method = "open";
|
||||||
if(isWindow){
|
if(!settings.extUrl)settings.extUrl = true;
|
||||||
o.minimizeBarManager.maximize(isWindow);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(settings.method == 'open'){
|
if(settings.method == 'open'){
|
||||||
var appurl = "http://www.rulingcom.com";
|
var appurl = "http://www.rulingcom.com";
|
||||||
o.windowcounter++;
|
o.windowcounter++;
|
||||||
|
if(!settings.title)settings.title = "New Window "+o.windowcounter;
|
||||||
if(settings.extUrl){
|
if(settings.extUrl){
|
||||||
if(settings.url){
|
if(settings.url){
|
||||||
|
|
||||||
if(settings.url.substr(0,4)!="http")settings.url = "http://"+settings.url;
|
if(settings.url.substr(0,4)!="http")settings.url = "http://"+settings.url;
|
||||||
|
console.log(settings.url)
|
||||||
var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)");
|
var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)");
|
||||||
if(urlregex.test(settings.url))
|
if(urlregex.test(settings.url))
|
||||||
appurl = settings.url;
|
appurl = settings.url;
|
||||||
@@ -158,64 +147,20 @@ var orbitDesktopAPI = function(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var whtml = $('<div id="app_frame_'+o.windowcounter+'" class="thmc2 app_frame" data-app="'+settings.appid+'" data-title="'+ settings.title +'"><div class="app_frame_header"><div class="dtitle hh2 hp"><span class="thmtxth">'+settings.title+'</span></div><span class="icon-remove hh2 hp thmtxt"></span><span class="icon-minus hh2 hp thmtxt"></span></div><div id="holder_'+o.windowcounter+'" class="app_holder clear"><iframe src="'+appurl+'" frameborder="0" scrolling="auto"></iframe></div></div>');
|
var whtml =$('<div id="app_frame_'+o.windowcounter+'" class="thmc2 app_frame" data-app="'+settings.appid+'"><div id="content"><div id="header" class="hh3"><div class="dtitle hh3 hp" style="text-transform:capitalize;"><span class="thmtxth">'+settings.title+'</span></div><span class="icon-remove hh3 hp thmtxt"></span></div><div id="holder_'+o.windowcounter+'" class="app_holder"><iframe src="'+appurl+'" frameborder="0" scrolling="auto"></iframe><div class="clear"></div></div></div></div>');
|
||||||
$("body").append(whtml).css('overflow','hidden');
|
$(o.contentHolder).append(whtml);
|
||||||
var parentwindow = $("#app_frame_"+o.windowcounter);
|
var parentwindow = $(o.contentHolder).find("div#app_frame_"+o.windowcounter);
|
||||||
var app_holder_height = parentwindow.height() - 60;
|
var app_holder_height = parentwindow.height() - 72;
|
||||||
var app_holder_width = parentwindow.width();
|
var app_holder_width = parentwindow.width();
|
||||||
parentwindow.find("iframe").attr({"height":app_holder_height});
|
parentwindow.find("iframe").attr({"height":app_holder_height,"width":app_holder_width});
|
||||||
parentwindow.find(".app_holder").height(app_holder_height);
|
parentwindow.find("div.app_holder").height(app_holder_height);
|
||||||
parentwindow.find(".icon-remove").click(function(){
|
parentwindow.find("span.icon-remove").click(function(){
|
||||||
o.appWindow.close(parentwindow);
|
parentwindow.remove();
|
||||||
});
|
|
||||||
parentwindow.find(".icon-minus").click(function(){
|
|
||||||
o.appWindow.minimize(parentwindow);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.appWindow.close = function(win){
|
|
||||||
win.remove();
|
|
||||||
$('body').attr('style','');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.appWindow.minimize = function(win){
|
|
||||||
o.minimizeBarManager.minimize(win);
|
|
||||||
var minimizeBar = $('#minimizebar'),
|
|
||||||
minimizeHeight = minimizeBar.height();
|
|
||||||
|
|
||||||
minimizeBar
|
|
||||||
.stop(1,1)
|
|
||||||
.delay(2000)
|
|
||||||
.animate({
|
|
||||||
//'bottom': -minimizeHeight
|
|
||||||
'opacity': 0
|
|
||||||
}, 900, 'easeInOutQuint');
|
|
||||||
|
|
||||||
minimizeBar.on({
|
|
||||||
mouseenter: function(){
|
|
||||||
$(this)
|
|
||||||
.stop(1,1)
|
|
||||||
.animate({
|
|
||||||
'opacity': 1
|
|
||||||
}, 900, 'easeInOutQuint');
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
$(this)
|
|
||||||
.stop(1,1)
|
|
||||||
.delay(2000)
|
|
||||||
.animate({
|
|
||||||
//'bottom': -minimizeHeight
|
|
||||||
'opacity': 0
|
|
||||||
}, 900, 'easeInOutQuint');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if(typeof callbackfn=="function"){
|
if(typeof callbackfn=="function"){
|
||||||
callbackfn.call(this,parentwindow);
|
callbackfn.call(this);
|
||||||
}
|
}
|
||||||
return parentwindow;
|
|
||||||
};
|
};
|
||||||
this.toolPopup = function(settings){
|
this.toolPopup = function(settings){
|
||||||
if(settings == "destroy"){
|
if(settings == "destroy"){
|
||||||
|
|||||||
@@ -1,3 +1,50 @@
|
|||||||
|
function get_part_id(){
|
||||||
|
return $(".edit_page_part,.edit_page").attr("action").split('/').pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("div.editable").live("mouseenter mouseleave", function (event) {
|
||||||
|
$(this).children('.edit_link').toggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#page_design").live('change', function() {
|
||||||
|
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_themes');
|
||||||
|
});
|
||||||
|
|
||||||
|
// $("#page_module_app_id").live('change', function() {
|
||||||
|
// var app_id = $(this).val();
|
||||||
|
// if(app_id!=''){
|
||||||
|
// $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_after_module_changed',function(data, textStatus){
|
||||||
|
// if(textStatus == 'success'){
|
||||||
|
// $(this).after(data);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// $("#app_page_url").children().remove();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
$("#module_app_list select").live('change', function() {
|
||||||
|
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val()); //?part_id=' + get_part_id());
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#widget_list select,#frontend_list select").live('change', function() {
|
||||||
|
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() );//+ '&part_id=' + get_part_id());
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#tag_list select").live('change', function() {
|
||||||
|
$.getScript($(this).attr('rel') + '?type=' + $(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
$("select.widget_field_select").live('change', function() {
|
||||||
|
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val());
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.part_kind').live('click', function() {
|
||||||
|
$('.part_kind_partial').hide();
|
||||||
|
$('#part_' + $(this).attr('value')).show();
|
||||||
|
});
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
bindTreeDragHandle();
|
bindTreeDragHandle();
|
||||||
});
|
});
|
||||||
@@ -22,7 +69,3 @@ var bindTreeDragHandle = function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div.editable").live("mouseenter mouseleave", function (event) {
|
|
||||||
$(this).children('.edit_link').toggle();
|
|
||||||
});
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<%#= encoding: utf-8 %>
|
|
||||||
$(document).ready(function(){
|
|
||||||
|
|
||||||
$(document).on('click', '.survey_question_item a.remove_existing_record_question', function(){
|
|
||||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
|
||||||
$(this).next('.should_destroy').val(1);
|
|
||||||
$(".survey_question_item#" + $(this).prev().attr('value')).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.survey_question_option_item a.remove_existing_record_option', function(){
|
|
||||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
|
||||||
$(this).next('.should_destroy').val(1);
|
|
||||||
$(".survey_question_option_item#" + $(this).prev().attr('value')).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.survey_question_radiogroup_item a.remove_existing_record_radiogroup', function(){
|
|
||||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
|
||||||
$(this).next('.should_destroy').val(1);
|
|
||||||
$(".survey_question_radiogroup_item#" + $(this).prev().attr('value')).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.survey_question_item .type-selector').live('change', function(){
|
|
||||||
$item = $(this).parents('.survey_question_item');
|
|
||||||
$item.find('.type-specify').hide();
|
|
||||||
$item.find('.type-specify.type-' + $(this).val()).show();
|
|
||||||
$item.find('.type-specify.hide-type-' + $(this).val()).hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.survey_question_item .type-selector').trigger('change');
|
|
||||||
|
|
||||||
$('.survey_question_item .add_survey_question_option a.add').live('click', function(){
|
|
||||||
var new_id = $(this).prev().attr('value');
|
|
||||||
var old_id = new RegExp("new_survey_question_options", "g");
|
|
||||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
||||||
$_new = $($(this).next().html().replace(old_id, new_id));
|
|
||||||
$(this).parents('.survey_question_options_wrapper').find('tbody').append($_new);
|
|
||||||
$_new.find('a.delete_option').on('click', function(){
|
|
||||||
$(this).parents('.survey_question_option_item').remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.survey_question_item .add_survey_question_radiogroup a.add').live('click', function(){
|
|
||||||
var new_id = $(this).prev().attr('value');
|
|
||||||
var old_id = new RegExp("new_survey_question_radiogroups", "g");
|
|
||||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
||||||
$_new = $($(this).next().html().replace(old_id, new_id));
|
|
||||||
$(this).parents('.survey_question_radiogroups_wrapper').find('tbody').append($_new);
|
|
||||||
$_new.find('a.delete_radiogroup').on('click', function(){
|
|
||||||
$(this).parents('.survey_question_radiogroup_item').remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
$(".attributes").append('<%= escape_javascript(render :partial=>"attribute_field",:locals=>{:attribute_field=>@attribute_field,:attribute_field_counter=>@attribute_field_counter} )%>');
|
||||||
|
$(".dataType").change(function () {
|
||||||
|
$(this).parents("legend").next("div").find("div[class^='type']").addClass("hide");
|
||||||
|
$(this).parents("legend").next("div").find("."+$(this).find("option:selected").attr("ref")).removeClass("hide");
|
||||||
|
|
||||||
|
})
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#acknowledgement {
|
|
||||||
display: none;
|
|
||||||
padding: 20px;
|
|
||||||
margin: -20px 0 30px 0;
|
|
||||||
background-color: #fff;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 15px;
|
|
||||||
border: solid 2px #f0f0f0;
|
|
||||||
}
|
|
||||||
#aclnowledgement:after {
|
|
||||||
content: '';
|
|
||||||
display: table;
|
|
||||||
width: table;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ask-question {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* AQ form */
|
|
||||||
#new-ask-question {
|
|
||||||
background-color: #f8f8f8;
|
|
||||||
padding: 20px 0;
|
|
||||||
}
|
|
||||||
#new-ask-question .form-horizontal .control-label {
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
#new-ask-question .form-horizontal .controls {
|
|
||||||
margin-left: 120px;
|
|
||||||
}
|
|
||||||
#new-ask-question .form-horizontal .controls textarea {
|
|
||||||
width: 80%;
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
#new-ask-question .form-horizontal .form-actions {
|
|
||||||
padding-left: 120px;
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
@@ -3,14 +3,12 @@ $gray: #ddd;
|
|||||||
@mixin font-main($font-size) {
|
@mixin font-main($font-size) {
|
||||||
font-family: "Source Sans Pro", sans-serif;
|
font-family: "Source Sans Pro", sans-serif;
|
||||||
font-size: #{$font-size}px;
|
font-size: #{$font-size}px;
|
||||||
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
@mixin font-sub($font-size) {
|
@mixin font-sub($font-size) {
|
||||||
font-family: "Source Sans Pro", Arial, sans-serif;
|
font-family: "Source Sans Pro", Arial, sans-serif;
|
||||||
font-size: #{$font-size}px;
|
font-size: #{$font-size}px;
|
||||||
}
|
font-weight: 300;
|
||||||
@mixin font-icon($font-size) {
|
|
||||||
font-family: "FontAwesome";
|
|
||||||
font-size: #{$font-size}px;
|
|
||||||
}
|
}
|
||||||
@mixin transition-type($property, $sec) {
|
@mixin transition-type($property, $sec) {
|
||||||
-webkit-transition: #{$property} #{$sec}s ease;
|
-webkit-transition: #{$property} #{$sec}s ease;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.noSelect, .noSelect * {
|
.noSelect {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-khtml-user-select: none;
|
-khtml-user-select: none;
|
||||||
@@ -50,14 +50,6 @@
|
|||||||
width: 384px; }
|
width: 384px; }
|
||||||
.s_grid_row .s_grid_12 {
|
.s_grid_row .s_grid_12 {
|
||||||
width: 420px; }
|
width: 420px; }
|
||||||
.s_grid_row .s_grid_13 {
|
|
||||||
width: 456px; }
|
|
||||||
.s_grid_row .s_grid_14 {
|
|
||||||
width: 492px; }
|
|
||||||
.s_grid_row .s_grid_15 {
|
|
||||||
width: 528px; }
|
|
||||||
.s_grid_row .s_grid_16 {
|
|
||||||
width: 564px; }
|
|
||||||
.s_grid_row:last-child {
|
.s_grid_row:last-child {
|
||||||
margin-bottom: 0; }
|
margin-bottom: 0; }
|
||||||
.s_grid_row .s_grid_h_1 {
|
.s_grid_row .s_grid_h_1 {
|
||||||
@@ -101,20 +93,9 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 60px;
|
top: 60px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
min-width: 120px;
|
width: 120px; }
|
||||||
border: solid 2px #dddddd;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
/* webkit */
|
|
||||||
-khtml-box-sizing: border-box;
|
|
||||||
/* konqueror */
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
/* firefox */
|
|
||||||
-ms-box-sizing: border-box;
|
|
||||||
/* ie */
|
|
||||||
box-sizing: border-box;
|
|
||||||
/* css3 */ }
|
|
||||||
.sdm_o li {
|
.sdm_o li {
|
||||||
border-top: solid 1px #f7f7f7; }
|
border-top: solid 1px #f2f2f2; }
|
||||||
.sdm_o li:first-child {
|
.sdm_o li:first-child {
|
||||||
border: none; }
|
border: none; }
|
||||||
.sdm_o a {
|
.sdm_o a {
|
||||||
@@ -136,7 +117,7 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px; }
|
line-height: 36px; }
|
||||||
.s_menu li {
|
.s_menu li {
|
||||||
border-top: solid 1px #eaeaea; }
|
border-top: solid 1px #dddddd; }
|
||||||
.s_menu li:first-child {
|
.s_menu li:first-child {
|
||||||
border: none; }
|
border: none; }
|
||||||
.s_menu a {
|
.s_menu a {
|
||||||
@@ -146,23 +127,31 @@
|
|||||||
.s_tab {
|
.s_tab {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px; }
|
line-height: 36px; }
|
||||||
|
|
||||||
.s_tab ul {
|
.s_tab ul {
|
||||||
overflow: hidden; }
|
overflow: hidden; }
|
||||||
|
|
||||||
.s_tab li {
|
.s_tab li {
|
||||||
float: left; }
|
float: left; }
|
||||||
|
|
||||||
.s_tab a {
|
.s_tab a {
|
||||||
display: block; }
|
display: block; }
|
||||||
|
|
||||||
.s_tab .admbg {
|
.s_tab .admbg {
|
||||||
background-color: #f0f0f0; }
|
background-color: #f0f0f0; }
|
||||||
|
|
||||||
.st_c {
|
.st_c {
|
||||||
display: none; }
|
display: none; }
|
||||||
|
|
||||||
|
.st_c:first-child {
|
||||||
|
display: block; }
|
||||||
|
|
||||||
/* simple form */
|
/* simple form */
|
||||||
.s_form {
|
.s_form {
|
||||||
font-size: 15px; }
|
font-size: 15px; }
|
||||||
.s_form label {
|
.s_form label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@@ -172,9 +161,6 @@
|
|||||||
line-height: 32px; }
|
line-height: 32px; }
|
||||||
.s_form input[type=text],
|
.s_form input[type=text],
|
||||||
.s_form input[type=password],
|
.s_form input[type=password],
|
||||||
.s_form input[type=submit],
|
|
||||||
.s_form input[type=reset],
|
|
||||||
.s_form input[type=button],
|
|
||||||
.s_form select {
|
.s_form select {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@@ -205,6 +191,7 @@
|
|||||||
.s_form input[type=text]:focus,
|
.s_form input[type=text]:focus,
|
||||||
.s_form input[type=password]:focus,
|
.s_form input[type=password]:focus,
|
||||||
.s_form textarea:focus {
|
.s_form textarea:focus {
|
||||||
|
background-color: #f7f7f7;
|
||||||
border-color: #c4c4c4; }
|
border-color: #c4c4c4; }
|
||||||
.s_form textarea {
|
.s_form textarea {
|
||||||
resize: none; }
|
resize: none; }
|
||||||
@@ -220,10 +207,9 @@
|
|||||||
.s_form .s_table td {
|
.s_form .s_table td {
|
||||||
vertical-align: middle; }
|
vertical-align: middle; }
|
||||||
.s_form .s_table thead th {
|
.s_form .s_table thead th {
|
||||||
border-bottom: solid 1px #eee; }
|
border-bottom: solid 1px #eeeeee; }
|
||||||
|
|
||||||
/* simple select */
|
.check_box_g {
|
||||||
.s_select_g {
|
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
/* webkit */
|
/* webkit */
|
||||||
@@ -235,89 +221,22 @@
|
|||||||
/* ie */
|
/* ie */
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* css3 */ }
|
/* css3 */ }
|
||||||
.s_select_g li {
|
.check_box_g li {
|
||||||
margin: 0 6px 6px 0;
|
margin: 0 6px 6px 0;
|
||||||
padding: 0; }
|
padding: 0; }
|
||||||
.s_select_g li,
|
.check_box_g li,
|
||||||
.s_select_g li > * {
|
.check_box_g li > * {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle; }
|
vertical-align: middle; }
|
||||||
.s_select_g label {
|
.check_box_g label {
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: 0; }
|
margin: 0; }
|
||||||
.s_select_g > label {
|
.check_box_g > label {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 4px 0; }
|
padding: 4px 0; }
|
||||||
.s_select_g li label {
|
.check_box_g li label {
|
||||||
padding-left: 4px;
|
padding-left: 4px; }
|
||||||
cursor: pointer; }
|
|
||||||
.s_select_g li label:before {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
line-height: 14px;
|
|
||||||
text-align: center;
|
|
||||||
margin-right: 6px;
|
|
||||||
content: '';
|
|
||||||
border: solid 1px #c4c4c4; }
|
|
||||||
.s_select_g input[type=checkbox],
|
|
||||||
.s_select_g input[type=radio] {
|
|
||||||
display: none; }
|
|
||||||
.s_select_g input[type=checkbox]:checked + label:before, .s_select_g input[type=radio]:checked + label:before {
|
|
||||||
background-color: #444444;
|
|
||||||
border-color: #444444;
|
|
||||||
color: #fff;
|
|
||||||
font-family: "FontAwesome";
|
|
||||||
font-size: 12px; }
|
|
||||||
.s_select_g input[type=checkbox]:checked + label:before {
|
|
||||||
content: "\f00c"; }
|
|
||||||
.s_select_g input[type=radio] + label:before {
|
|
||||||
border-radius: 8px; }
|
|
||||||
.s_select_g input[type=radio]:checked + label:before {
|
|
||||||
content: "\f111";
|
|
||||||
font-size: 9px;
|
|
||||||
-webkit-text-size-adjust: none; }
|
|
||||||
|
|
||||||
/* simple switch */
|
|
||||||
.s_switch {
|
|
||||||
overflow: hidden; }
|
|
||||||
.s_switch .s_switch_status {
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 20px;
|
|
||||||
height: 20px;
|
|
||||||
float: left;
|
|
||||||
margin-right: 60px; }
|
|
||||||
.s_switch .s_switch_switcher {
|
|
||||||
display: block;
|
|
||||||
float: right;
|
|
||||||
position: relative;
|
|
||||||
width: 48px;
|
|
||||||
height: 20px;
|
|
||||||
overflow: hidden; }
|
|
||||||
.s_switch .s_switch_switcher input[type=checkbox] {
|
|
||||||
width: 144px;
|
|
||||||
height: 20px;
|
|
||||||
margin: 0;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: -96px; }
|
|
||||||
.s_switch .s_switch_switcher input[type=checkbox] + .s_switch_toggle {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: -2px;
|
|
||||||
top: -2px;
|
|
||||||
width: 16px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #000;
|
|
||||||
border: solid 2px #fff;
|
|
||||||
cursor: pointer;
|
|
||||||
-webkit-transition: left 0.3s ease;
|
|
||||||
-moz-transition: left 0.3s ease;
|
|
||||||
transition: left 0.3s ease; }
|
|
||||||
.s_switch .s_switch_switcher input[type=checkbox]:checked + .s_switch_toggle {
|
|
||||||
left: 30px; }
|
|
||||||
|
|
||||||
/* tool bar */
|
/* tool bar */
|
||||||
.toolbar {
|
.toolbar {
|
||||||
@@ -325,12 +244,13 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 99; }
|
z-index: 9; }
|
||||||
.toolbar .sdm, .toolbar .fn_g {
|
.toolbar .sdm, .toolbar .fn_g {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top; }
|
vertical-align: top; }
|
||||||
.toolbar .sdm_o {
|
.toolbar .sdm_o {
|
||||||
top: 36px; }
|
top: 36px;
|
||||||
|
background-color: #f0f0f0; }
|
||||||
.toolbar button {
|
.toolbar button {
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
@@ -352,21 +272,16 @@
|
|||||||
width: auto;
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative; }
|
||||||
z-index: 10; }
|
|
||||||
.tinycanvas .overview {
|
.tinycanvas .overview {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
min-width: 100%;
|
||||||
height: 100%; }
|
height: 100%; }
|
||||||
.tinycanvas .overview:after {
|
|
||||||
content: "";
|
|
||||||
display: table;
|
|
||||||
width: 100%; }
|
|
||||||
.tinycanvas .overview > .column {
|
.tinycanvas .overview > .column {
|
||||||
float: left;
|
float: left;
|
||||||
border-right: solid 1px #eee;
|
border-right: solid 1px #eeeeee;
|
||||||
padding: 0 12px 0 0;
|
padding: 0 12px 0 0;
|
||||||
margin: 0 12px 0 0;
|
margin: 0 12px 0 0;
|
||||||
height: 100%; }
|
height: 100%; }
|
||||||
@@ -422,7 +337,7 @@
|
|||||||
width: 6px; }
|
width: 6px; }
|
||||||
.tinycanvas .scrollbar {
|
.tinycanvas .scrollbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 11;
|
z-index: 9;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-webkit-transition: opacity 0.3s ease;
|
-webkit-transition: opacity 0.3s ease;
|
||||||
@@ -433,7 +348,7 @@
|
|||||||
visibility: visible; }
|
visibility: visible; }
|
||||||
.tinycanvas .scrollbar.sb_h {
|
.tinycanvas .scrollbar.sb_h {
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: -6px;
|
||||||
height: 6px; }
|
height: 6px; }
|
||||||
.tinycanvas .scrollbar.sb_v {
|
.tinycanvas .scrollbar.sb_v {
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@import "desktop-helper";
|
@import "desktop-helper";
|
||||||
|
|
||||||
.noSelect, .noSelect * {
|
.noSelect {
|
||||||
@include no-select;
|
@include no-select;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,11 +19,9 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fixed width column with 12px gutter
|
// fixed width column
|
||||||
// 276px width for 8 columns
|
// full width 420px
|
||||||
// 420px width for 12 columns
|
@for $i from 1 through 12 {
|
||||||
// 564px width for 16 columns
|
|
||||||
@for $i from 1 through 16 {
|
|
||||||
.s_grid_#{$i} {
|
.s_grid_#{$i} {
|
||||||
width: 36px * $i - 12px;
|
width: 36px * $i - 12px;
|
||||||
}
|
}
|
||||||
@@ -40,7 +38,6 @@
|
|||||||
height: 44px * $j - 12px;
|
height: 44px * $j - 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* simple dropdown menu */
|
/* simple dropdown menu */
|
||||||
@@ -61,12 +58,10 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 60px;
|
top: 60px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
min-width: 120px;
|
width: 120px;
|
||||||
border: solid 2px $gray;
|
|
||||||
@include box-sizing;
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
border-top: solid 1px lighten( $gray, 10% );
|
border-top: solid 1px #f2f2f2;
|
||||||
}
|
}
|
||||||
li:first-child {
|
li:first-child {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -95,7 +90,7 @@
|
|||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
border-top: solid 1px lighten($gray, 5%);
|
border-top: solid 1px #ddd;
|
||||||
}
|
}
|
||||||
li:first-child {
|
li:first-child {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -109,25 +104,27 @@
|
|||||||
.s_tab {
|
.s_tab {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
|
||||||
ul {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.admbg {
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.stb_h {}
|
.stb_h {}
|
||||||
.stb_v {}
|
.stb_v {}
|
||||||
|
.s_tab ul {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.s_tab li {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.s_tab a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.s_tab .admbg {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
.st_c {
|
.st_c {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.st_c:first-child {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
/* simple form */
|
/* simple form */
|
||||||
.s_form {
|
.s_form {
|
||||||
@@ -136,6 +133,7 @@
|
|||||||
// basic style
|
// basic style
|
||||||
label {
|
label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@@ -148,9 +146,6 @@
|
|||||||
}
|
}
|
||||||
input[type=text],
|
input[type=text],
|
||||||
input[type=password],
|
input[type=password],
|
||||||
input[type=submit],
|
|
||||||
input[type=reset],
|
|
||||||
input[type=button],
|
|
||||||
select {
|
select {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@@ -172,7 +167,7 @@
|
|||||||
@include box-sizing;
|
@include box-sizing;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
// background-color: lighten($gray, 10%);
|
background-color: lighten($gray, 10%);
|
||||||
border-color: darken($gray, 10%);
|
border-color: darken($gray, 10%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,8 +196,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* simple select */
|
|
||||||
.s_select_g {
|
.check_box_g {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
// border: solid 1px $gray;
|
// border: solid 1px $gray;
|
||||||
@include box-sizing;
|
@include box-sizing;
|
||||||
@@ -227,87 +222,6 @@
|
|||||||
}
|
}
|
||||||
li label {
|
li label {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
line-height: 14px;
|
|
||||||
text-align: center;
|
|
||||||
margin-right: 6px;
|
|
||||||
content: '';
|
|
||||||
border: solid 1px darken($gray, 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
input[type=checkbox],
|
|
||||||
input[type=radio]
|
|
||||||
{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
input[type=checkbox]:checked + label:before, input[type=radio]:checked + label:before {
|
|
||||||
background-color: darken($gray, 60%);
|
|
||||||
border-color: darken($gray, 60%);
|
|
||||||
color: #fff;
|
|
||||||
@include font-icon(12);
|
|
||||||
}
|
|
||||||
input[type=checkbox]:checked + label:before {
|
|
||||||
content: "\f00c";
|
|
||||||
}
|
|
||||||
input[type=radio] + label:before {
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
input[type=radio]:checked + label:before {
|
|
||||||
content: "\f111";
|
|
||||||
font-size: 9px;
|
|
||||||
-webkit-text-size-adjust: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* simple switch */
|
|
||||||
.s_switch {
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.s_switch_status {
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 20px;
|
|
||||||
height: 20px;
|
|
||||||
float: left;
|
|
||||||
margin-right: 60px;
|
|
||||||
}
|
|
||||||
.s_switch_switcher {
|
|
||||||
display: block;
|
|
||||||
float: right;
|
|
||||||
position: relative;
|
|
||||||
width: 48px;
|
|
||||||
height: 20px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
input[type=checkbox] {
|
|
||||||
width: 144px;
|
|
||||||
height: 20px;
|
|
||||||
margin: 0;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: -96px;
|
|
||||||
|
|
||||||
+ .s_switch_toggle {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: -2px;
|
|
||||||
top: -2px;
|
|
||||||
width: 16px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #000;
|
|
||||||
border: solid 2px #fff;
|
|
||||||
cursor: pointer;
|
|
||||||
@include transition-type(left,0.3);
|
|
||||||
}
|
|
||||||
&:checked + .s_switch_toggle {
|
|
||||||
left: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,7 +231,7 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 99;
|
z-index: 9;
|
||||||
|
|
||||||
.sdm, .fn_g {
|
.sdm, .fn_g {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -325,6 +239,7 @@
|
|||||||
}
|
}
|
||||||
.sdm_o {
|
.sdm_o {
|
||||||
top: 36px;
|
top: 36px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -352,21 +267,14 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
|
||||||
}
|
}
|
||||||
.overview {
|
.overview {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
min-width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: "";
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .column {
|
> .column {
|
||||||
float: left;
|
float: left;
|
||||||
border-right: solid 1px #eee;
|
border-right: solid 1px #eee;
|
||||||
@@ -420,7 +328,7 @@
|
|||||||
}
|
}
|
||||||
.scrollbar {
|
.scrollbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 11;
|
z-index: 9;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@include transition-type(opacity, 0.3);
|
@include transition-type(opacity, 0.3);
|
||||||
@@ -431,7 +339,7 @@
|
|||||||
}
|
}
|
||||||
&.sb_h {
|
&.sb_h {
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: -6px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
}
|
}
|
||||||
&.sb_v {
|
&.sb_v {
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ table {
|
|||||||
body {
|
body {
|
||||||
font-family: "Source Sans Pro", sans-serif;
|
font-family: "Source Sans Pro", sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
font-weight: 300;
|
||||||
background-color: #000; }
|
background-color: #000; }
|
||||||
|
|
||||||
a, a:hover {
|
a, a:hover {
|
||||||
@@ -72,31 +73,23 @@ a:focus {
|
|||||||
content: '';
|
content: '';
|
||||||
clear: both; }
|
clear: both; }
|
||||||
|
|
||||||
.valign:before {
|
|
||||||
content: '';
|
|
||||||
height: 100%;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle; }
|
|
||||||
|
|
||||||
.o-loading {
|
.o-loading {
|
||||||
font-size: 13px; }
|
font-size: 13px;
|
||||||
|
font-weight: normal; }
|
||||||
.fullsize .o-loading {
|
.fullsize .o-loading {
|
||||||
padding: 12px; }
|
padding: 12px; }
|
||||||
.o-loading i {
|
.o-loading i {
|
||||||
font-size: 20px; }
|
font-size: 20px; }
|
||||||
|
|
||||||
#thmbackground {
|
#thmbackground {
|
||||||
|
min-height: 100%;
|
||||||
|
min-width: 980px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: auto;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;
|
z-index: -1; }
|
||||||
background-repeat: no-repeat;
|
|
||||||
-webkit-background-size: cover;
|
|
||||||
-moz-background-size: cover;
|
|
||||||
-o-background-size: cover;
|
|
||||||
background-size: cover; }
|
|
||||||
|
|
||||||
#bgover {
|
#bgover {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -130,14 +123,13 @@ a:focus {
|
|||||||
background-color: #fff; }
|
background-color: #fff; }
|
||||||
|
|
||||||
.admbg2 {
|
.admbg2 {
|
||||||
background-color: #dddddd; }
|
background-color: #ddd; }
|
||||||
|
|
||||||
.admtxt {
|
.admtxt {
|
||||||
color: #666; }
|
color: #666; }
|
||||||
|
|
||||||
a.admtxt.admbg2:hover {
|
.admtxt:hover {
|
||||||
color: #fff;
|
color: #666; }
|
||||||
background-color: #aaaaaa; }
|
|
||||||
|
|
||||||
.hfn {
|
.hfn {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -157,15 +149,6 @@ a.admtxt.admbg2:hover {
|
|||||||
.ini_input:focus {
|
.ini_input:focus {
|
||||||
outline: none; }
|
outline: none; }
|
||||||
|
|
||||||
.text_ofl {
|
|
||||||
overflow: hidden; }
|
|
||||||
.text_ofl span {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
-o-text-overflow: ellipsis; }
|
|
||||||
|
|
||||||
/* - Opacity */
|
/* - Opacity */
|
||||||
.op00 {
|
.op00 {
|
||||||
opacity: 0; }
|
opacity: 0; }
|
||||||
@@ -257,15 +240,7 @@ a.admtxt.admbg2:hover {
|
|||||||
.element {
|
.element {
|
||||||
margin: 0 12px 12px 0;
|
margin: 0 12px 12px 0;
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative; }
|
||||||
cursor: pointer;
|
|
||||||
-webkit-transition: all 0.2s ease;
|
|
||||||
-moz-transition: all 0.2s ease;
|
|
||||||
transition: all 0.2s ease; }
|
|
||||||
.element:active {
|
|
||||||
-webkit-transform: scale(0.92);
|
|
||||||
-moz-transform: scale(0.92);
|
|
||||||
transform: scale(0.92); }
|
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
float: left;
|
float: left;
|
||||||
@@ -273,14 +248,12 @@ a.admtxt.admbg2:hover {
|
|||||||
|
|
||||||
/* desktop layout */
|
/* desktop layout */
|
||||||
#container {
|
#container {
|
||||||
padding: 48px 0 0 156px;
|
padding: 48px 0 0 156px; }
|
||||||
min-width: 800px; }
|
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
padding: 0 0 12px 0;
|
padding: 0 0 12px 0;
|
||||||
height: 72px;
|
min-width: 800px;
|
||||||
position: relative;
|
height: 72px; }
|
||||||
z-index: 2; }
|
|
||||||
|
|
||||||
#side {
|
#side {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
@@ -289,13 +262,12 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-right: 96px;
|
margin-right: 96px;
|
||||||
top: 120px;
|
top: 120px;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 13; }
|
z-index: 11; }
|
||||||
|
|
||||||
#holder {
|
#holder {
|
||||||
height: 516px;
|
height: 516px;
|
||||||
width: auto;
|
width: auto;
|
||||||
position: relative;
|
position: relative; }
|
||||||
z-index: 1; }
|
|
||||||
|
|
||||||
#rwidget {
|
#rwidget {
|
||||||
height: 516px; }
|
height: 516px; }
|
||||||
@@ -325,7 +297,7 @@ a.admtxt.admbg2:hover {
|
|||||||
|
|
||||||
.fn_des.admtxt {
|
.fn_des.admtxt {
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
padding: 0 12px;
|
padding: 0 6px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
@@ -364,64 +336,44 @@ a.admtxt.admbg2:hover {
|
|||||||
.section_label li {
|
.section_label li {
|
||||||
font-size: 15px; }
|
font-size: 15px; }
|
||||||
.section_label li:first-child {
|
.section_label li:first-child {
|
||||||
font-size: 18px; }
|
font-size: 18px;
|
||||||
|
font-weight: normal; }
|
||||||
|
|
||||||
/* panel */
|
/* panel */
|
||||||
#panel_l {
|
#panel_l {
|
||||||
background-color: #f7f7f7;
|
background-color: #f0f0f0;
|
||||||
float: left; }
|
float: left; }
|
||||||
|
|
||||||
#panel_r {
|
#panel_r {
|
||||||
background-color: #fff;
|
|
||||||
margin-left: 252px;
|
margin-left: 252px;
|
||||||
position: relative;
|
position: relative; }
|
||||||
width: auto; }
|
|
||||||
|
|
||||||
/* Desktop Notification */
|
/* Desktop Notification */
|
||||||
#orbitnote {
|
#orbitnote {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -200px;
|
margin-left: -206px;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
-webkit-transition: height 2s ease;
|
padding: 0 6px 6px 6px;
|
||||||
-moz-transition: height 2s ease;
|
background-color: #000;
|
||||||
transition: height 2s ease; }
|
background-color: rgba(0, 0, 0, 0.6); }
|
||||||
#orbitnote .note_holder {
|
#orbitnote .note_holder {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
border: solid 1px white;
|
||||||
|
border-top: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 36px;
|
padding: 24px 24px; }
|
||||||
border: solid 2px #dddddd;
|
|
||||||
border-top: 0;
|
|
||||||
display: none; }
|
|
||||||
#orbitnote .note_holder .note_type {
|
#orbitnote .note_holder .note_type {
|
||||||
display: inline-block;
|
float: left; }
|
||||||
vertical-align: middle;
|
#orbitnote .note_holder .note_type img {
|
||||||
width: 60px;
|
display: block; }
|
||||||
height: 60px;
|
|
||||||
color: #fff; }
|
|
||||||
#orbitnote .note_holder .note_type .sign {
|
|
||||||
display: block;
|
|
||||||
font-size: 40px;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 30px;
|
|
||||||
text-align: center; }
|
|
||||||
#orbitnote .note_holder .note_type .sign.icon-ok {
|
|
||||||
background-color: #5BB75B; }
|
|
||||||
#orbitnote .note_holder .note_type .sign.icon-exclamation-sign {
|
|
||||||
background-color: #DA4F49; }
|
|
||||||
#orbitnote .note_holder .note_type .sign.icon-warning-sign {
|
|
||||||
background-color: #FAA732; }
|
|
||||||
#orbitnote .note_holder .note_message {
|
#orbitnote .note_holder .note_message {
|
||||||
color: #333;
|
color: #333;
|
||||||
display: inline-block;
|
margin: 10px 0 0 48px;
|
||||||
vertical-align: middle;
|
font-size: 15px;
|
||||||
word-wrap: break-word;
|
font-weight: normal; }
|
||||||
width: 240px;
|
|
||||||
margin: 0 0 0 20px;
|
|
||||||
font-size: 15px; }
|
|
||||||
|
|
||||||
/* Desktop Dialogue */
|
/* Desktop Dialogue */
|
||||||
#orbitdiag {
|
#orbitdiag {
|
||||||
@@ -430,8 +382,7 @@ a.admtxt.admbg2:hover {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 12;
|
z-index: 12; }
|
||||||
display: none; }
|
|
||||||
#orbitdiag .tile {
|
#orbitdiag .tile {
|
||||||
background-color: #000; }
|
background-color: #000; }
|
||||||
#orbitdiag .diag_holder {
|
#orbitdiag .diag_holder {
|
||||||
@@ -453,9 +404,10 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 6px;
|
margin: 0 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
line-height: 36px; }
|
line-height: 36px; }
|
||||||
#orbitdiag .diag_holder .diag_holder_inner .diag_btn:hover {
|
#orbitdiag .diag_holder .diag_holder_inner .diag_btn:hover {
|
||||||
outline: solid 2px #fff; }
|
outline: solid 2px white; }
|
||||||
|
|
||||||
/* Tile */
|
/* Tile */
|
||||||
.appname {
|
.appname {
|
||||||
@@ -469,12 +421,12 @@ a.admtxt.admbg2:hover {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 3;
|
z-index: 3; }
|
||||||
white-space: nowrap; }
|
|
||||||
[data-sizex="1"] .appname, .w1.h1 .appname {
|
[data-sizex="1"] .appname, .w1.h1 .appname {
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
[data-sizey="2"] .appname {
|
[data-sizey="2"] .appname {
|
||||||
font-size: 21px; }
|
font-size: 21px;
|
||||||
|
font-weight: normal; }
|
||||||
.hh2 .appname {
|
.hh2 .appname {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
@@ -488,7 +440,7 @@ a.admtxt.admbg2:hover {
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative; }
|
position: relative; }
|
||||||
[data-sizex="1"] .appicon, .w1.h1 .appicon {
|
[data-sizex="1"] .appicon {
|
||||||
margin-top: 24px; }
|
margin-top: 24px; }
|
||||||
#sections .appicon {
|
#sections .appicon {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
@@ -517,6 +469,8 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 12px 0 0;
|
margin: 0 12px 0 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 9; }
|
z-index: 9; }
|
||||||
|
.dtitle .sdm_o {
|
||||||
|
width: auto; }
|
||||||
|
|
||||||
.tile {
|
.tile {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -526,17 +480,8 @@ a.admtxt.admbg2:hover {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0; }
|
top: 0; }
|
||||||
|
|
||||||
.gridster ul {
|
|
||||||
margin: -6px 0 0 -6px; }
|
|
||||||
|
|
||||||
.widget.gs_w {
|
.widget.gs_w {
|
||||||
cursor: move;
|
cursor: move; }
|
||||||
overflow: hidden; }
|
|
||||||
|
|
||||||
.gs_w.dragging {
|
|
||||||
-webkit-transform: scale(0.92);
|
|
||||||
-moz-transform: scale(0.92);
|
|
||||||
transform: scale(0.92); }
|
|
||||||
|
|
||||||
/* header drop menu */
|
/* header drop menu */
|
||||||
.sdm_mdr .sdm_o {
|
.sdm_mdr .sdm_o {
|
||||||
@@ -553,7 +498,7 @@ a.admtxt.admbg2:hover {
|
|||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
.theme_thumb, .stock_wallpaper img {
|
.theme_thumb, .stock_wallpaper img {
|
||||||
border: solid 1px #fff;
|
border: solid 1px white;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
margin: 0 auto; }
|
margin: 0 auto; }
|
||||||
|
|
||||||
@@ -588,6 +533,7 @@ a.admtxt.admbg2:hover {
|
|||||||
|
|
||||||
.s_title {
|
.s_title {
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
|
font-weight: normal;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
text-align: left; }
|
text-align: left; }
|
||||||
.s_title.size_large {
|
.s_title.size_large {
|
||||||
@@ -606,88 +552,40 @@ a.admtxt.admbg2:hover {
|
|||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-top: solid 1px #eee; }
|
border-top: solid 1px #eeeeee;
|
||||||
.s_action .setting_btn {
|
background-color: #fff; }
|
||||||
margin-left: 12px; }
|
|
||||||
|
|
||||||
.setting_btn {
|
.setting_btn {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 0; }
|
border: 0; }
|
||||||
|
|
||||||
/* Apps Manager */
|
.group_search {
|
||||||
#app_info {
|
|
||||||
float: left;
|
float: left;
|
||||||
width: 420px;
|
margin-right: 36px; }
|
||||||
height: 516px;
|
|
||||||
margin-right: 36px;
|
|
||||||
display: none; }
|
|
||||||
#app_info .app_info_header {
|
|
||||||
height: 120px;
|
|
||||||
margin: -12px -12px 12px -12px;
|
|
||||||
position: relative;
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
/* webkit */
|
|
||||||
-khtml-box-sizing: border-box;
|
|
||||||
/* konqueror */
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
/* firefox */
|
|
||||||
-ms-box-sizing: border-box;
|
|
||||||
/* ie */
|
|
||||||
box-sizing: border-box;
|
|
||||||
/* css3 */ }
|
|
||||||
#app_info .app_info_header > * {
|
|
||||||
height: 100%; }
|
|
||||||
#app_info .app_info_header .app_info_icon {
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-top: 30px;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
/* webkit */
|
|
||||||
-khtml-box-sizing: border-box;
|
|
||||||
/* konqueror */
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
/* firefox */
|
|
||||||
-ms-box-sizing: border-box;
|
|
||||||
/* ie */
|
|
||||||
box-sizing: border-box;
|
|
||||||
/* css3 */ }
|
|
||||||
#app_info .app_info_header .app_info_name {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
font-size: 2em;
|
|
||||||
width: 300px;
|
|
||||||
word-wrap: break-word; }
|
|
||||||
#app_info .app_info_header .panel_close {
|
|
||||||
position: absolute;
|
|
||||||
right: 12px;
|
|
||||||
top: 12px;
|
|
||||||
font-size: 20px; }
|
|
||||||
#app_info .app_info_list {
|
|
||||||
line-height: 1.5em;
|
|
||||||
overflow: hidden; }
|
|
||||||
#app_info .app_info_list label {
|
|
||||||
color: #aaaaaa; }
|
|
||||||
|
|
||||||
#app_list {
|
|
||||||
float: left; }
|
|
||||||
#app_list .element > * {
|
|
||||||
cursor: pointer; }
|
|
||||||
|
|
||||||
.search_result {
|
.search_result {
|
||||||
float: left;
|
float: left;
|
||||||
overflow: hidden; }
|
margin-right: 24px;
|
||||||
.search_result .message {
|
max-width: 340px; }
|
||||||
font-size: 15px;
|
|
||||||
word-wrap: break-word; }
|
.g_sep {
|
||||||
.search_result .message b {
|
width: 12px;
|
||||||
font-size: 20px;
|
border-left: solid 1px white;
|
||||||
display: block;
|
-webkit-box-sizing: border-box;
|
||||||
margin-top: 12px; }
|
/* webkit */
|
||||||
|
-khtml-box-sizing: border-box;
|
||||||
|
/* konqueror */
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
/* firefox */
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
/* ie */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* css3 */ }
|
||||||
|
|
||||||
.grp {
|
.grp {
|
||||||
height: 528px;
|
height: 528px;
|
||||||
@@ -715,10 +613,10 @@ a.admtxt.admbg2:hover {
|
|||||||
overflow: hidden; }
|
overflow: hidden; }
|
||||||
|
|
||||||
.list_t_title {
|
.list_t_title {
|
||||||
padding-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
color: #000;
|
color: #333;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 1.3em; }
|
font-weight: normal; }
|
||||||
|
|
||||||
.list_t_des {
|
.list_t_des {
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
@@ -726,34 +624,153 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
font-size: 13px; }
|
font-size: 13px; }
|
||||||
|
|
||||||
.list_item_function {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: -30px;
|
|
||||||
width: 100%;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: right;
|
|
||||||
-webkit-transition: all 0.3s ease;
|
|
||||||
-moz-transition: all 0.3s ease;
|
|
||||||
transition: all 0.3s ease; }
|
|
||||||
.list_item_function a {
|
.list_item_function a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
padding: 4px;
|
||||||
margin-left: 4px;
|
|
||||||
padding: 0 6px;
|
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
-webkit-text-size-adjust: none; }
|
-webkit-text-size-adjust: none; }
|
||||||
.list_item_function a :first-child {
|
|
||||||
margin-left: 0; }
|
/* Journal Papers */
|
||||||
.datalist_item:hover .list_item_function {
|
[page-name="journal_p_list"] .list_t_item .inner {
|
||||||
bottom: 0; }
|
padding-left: 30px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action {
|
||||||
|
font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: -30px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action a {
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 1px 1px 6px 1px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action .icon-star-empty {
|
||||||
|
color: #999;
|
||||||
|
font-size: 20px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action .icon-star {
|
||||||
|
color: #faa732;
|
||||||
|
font-size: 20px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action .icon-check-empty {
|
||||||
|
color: #999;
|
||||||
|
font-size: 20px; }
|
||||||
|
[page-name="journal_p_list"] .list_item_action .icon-check {
|
||||||
|
color: #333;
|
||||||
|
font-size: 20px; }
|
||||||
|
[page-name="journal_p_list"] .file_view .list_t_des {
|
||||||
|
overflow: hidden; }
|
||||||
|
[page-name="journal_p_list"] .file_view .file {
|
||||||
|
float: left;
|
||||||
|
width: 120px;
|
||||||
|
height: 50px;
|
||||||
|
padding: 6px;
|
||||||
|
margin: 1px;
|
||||||
|
position: relative;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
/* webkit */
|
||||||
|
-khtml-box-sizing: border-box;
|
||||||
|
/* konqueror */
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
/* firefox */
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
/* ie */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* css3 */ }
|
||||||
|
[page-name="journal_p_list"] .file_view .file:hover {
|
||||||
|
background-color: #f7f7f7; }
|
||||||
|
[page-name="journal_p_list"] .file_view .file img {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
position: absolute;
|
||||||
|
left: 6px;
|
||||||
|
top: 6px; }
|
||||||
|
[page-name="journal_p_list"] .file_view .file .filetitle {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
padding-left: 40px;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
/* webkit */
|
||||||
|
-khtml-box-sizing: border-box;
|
||||||
|
/* konqueror */
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
/* firefox */
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
/* ie */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* css3 */ }
|
||||||
|
|
||||||
|
/* Journal Paper Add */
|
||||||
|
#paper_add .s_grid_con {
|
||||||
|
float: left;
|
||||||
|
height: 456px;
|
||||||
|
margin-left: 12px;
|
||||||
|
padding-left: 12px;
|
||||||
|
border-left: solid 1px #eeeeee; }
|
||||||
|
#paper_add .s_grid_con:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
border: none; }
|
||||||
|
#paper_add .f_w {
|
||||||
|
width: 336px; }
|
||||||
|
#paper_add label {
|
||||||
|
margin-right: 0; }
|
||||||
|
|
||||||
|
/* Journal Journal list */
|
||||||
|
[page-name="journal_p_journal"] .datalist_item .inner {
|
||||||
|
padding-left: 30px; }
|
||||||
|
[page-name="journal_p_journal"] .list_item_action {
|
||||||
|
font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: -30px; }
|
||||||
|
[page-name="journal_p_journal"] .list_item_action i {
|
||||||
|
color: #999;
|
||||||
|
font-size: 20px;
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 1px 1px 6px 1px; }
|
||||||
|
[page-name="journal_p_journal"] .list_t_desc {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999; }
|
||||||
|
|
||||||
|
/* Journal Co-Author */
|
||||||
|
[page-name="journal_p_coauthor"] .list_t_item {
|
||||||
|
height: 110px; }
|
||||||
|
[page-name="journal_p_coauthor"] .list_item_function a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 11px;
|
||||||
|
-webkit-text-size-adjust: none; }
|
||||||
|
[page-name="journal_p_coauthor"] .info {
|
||||||
|
font-family: Arial, sans-serif; }
|
||||||
|
[page-name="journal_p_coauthor"] .info li {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #999; }
|
||||||
|
[page-name="journal_p_coauthor"] .info .name {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 24px;
|
||||||
|
color: #333; }
|
||||||
|
|
||||||
|
/* Journal Co-Author Relationship*/
|
||||||
|
[page-name="journal_p_coauthor_relation"] .edit_co_author_relation {
|
||||||
|
/*margin-left: -10px;*/ }
|
||||||
|
[page-name="journal_p_coauthor_relation"] .form_space {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: Arial, sans-serif; }
|
||||||
|
|
||||||
|
/* Journal New Co-Author */
|
||||||
|
#new_co_author label {
|
||||||
|
margin-right: 0; }
|
||||||
|
|
||||||
/* App */
|
/* App */
|
||||||
.app_frame {
|
.app_frame {
|
||||||
margin: 60px 0 48px 156px;
|
margin: 48px 96px 48px 156px;
|
||||||
min-width: 800px;
|
min-width: 800px;
|
||||||
min-height: 576px;
|
min-height: 588px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -764,40 +781,17 @@ a.admtxt.admbg2:hover {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
.app_frame .app_holder iframe {
|
.app_frame #header .icon-remove {
|
||||||
width: 100%; }
|
|
||||||
.app_frame .app_frame_header {
|
|
||||||
height: 60px; }
|
|
||||||
.app_frame .app_frame_header .icon-remove, .app_frame .app_frame_header .icon-minus {
|
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
/* Minimize Section */
|
|
||||||
#minimizebar {
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 14; }
|
|
||||||
#minimizebar .minimize {
|
|
||||||
cursor: pointer;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
line-height: 36px;
|
|
||||||
font-size: 15px;
|
|
||||||
float: left; }
|
|
||||||
#minimizebar .minimize .icon-remove {
|
|
||||||
float: right;
|
|
||||||
line-height: 36px; }
|
|
||||||
|
|
||||||
/*Tooltip popup */
|
/*Tooltip popup */
|
||||||
.desktop_toolpopup {
|
.desktop_toolpopup {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10px;
|
||||||
display: none;
|
display: none;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|||||||
@@ -68,15 +68,9 @@ a:focus { outline: none; }
|
|||||||
content: '';
|
content: '';
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
.valign:before {
|
|
||||||
content: '';
|
|
||||||
height: 100%;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.o-loading {
|
.o-loading {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
||||||
.fullsize & {
|
.fullsize & {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
@@ -86,17 +80,14 @@ a:focus { outline: none; }
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#thmbackground {
|
#thmbackground {
|
||||||
|
min-height: 100%;
|
||||||
|
min-width: 980px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: auto;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
background-repeat: no-repeat;
|
|
||||||
-webkit-background-size: cover;
|
|
||||||
-moz-background-size: cover;
|
|
||||||
-o-background-size: cover;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
}
|
||||||
#bgover {
|
#bgover {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -122,12 +113,9 @@ a:focus { outline: none; }
|
|||||||
|
|
||||||
/* Desktop Global Style */
|
/* Desktop Global Style */
|
||||||
.admbg { background-color: #fff; }
|
.admbg { background-color: #fff; }
|
||||||
.admbg2 { background-color: $gray; }
|
.admbg2 { background-color: #ddd; }
|
||||||
.admtxt { color: #666; }
|
.admtxt { color: #666; }
|
||||||
a.admtxt.admbg2:hover {
|
.admtxt:hover { color: #666; }
|
||||||
color: #fff;
|
|
||||||
background-color: darken($gray, 20%);
|
|
||||||
}
|
|
||||||
.hfn {
|
.hfn {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
@@ -142,17 +130,6 @@ a.admtxt.admbg2:hover {
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
.ini_input:focus { outline: none; }
|
.ini_input:focus { outline: none; }
|
||||||
.text_ofl {
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
-o-text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* - Opacity */
|
/* - Opacity */
|
||||||
@for $i from 0 through 10 {
|
@for $i from 0 through 10 {
|
||||||
@@ -189,14 +166,6 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 12px 12px 0;
|
margin: 0 12px 12px 0;
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
|
||||||
@include transition-type(all,0.2);
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
-webkit-transform: scale(0.92);
|
|
||||||
-moz-transform: scale(0.92);
|
|
||||||
transform: scale(0.92);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.group{
|
.group{
|
||||||
float: left;
|
float: left;
|
||||||
@@ -206,13 +175,11 @@ a.admtxt.admbg2:hover {
|
|||||||
/* desktop layout */
|
/* desktop layout */
|
||||||
#container {
|
#container {
|
||||||
padding: 48px 0 0 156px;
|
padding: 48px 0 0 156px;
|
||||||
min-width: 800px;
|
|
||||||
}
|
}
|
||||||
#header {
|
#header {
|
||||||
padding: 0 0 12px 0;
|
padding: 0 0 12px 0;
|
||||||
|
min-width: 800px;
|
||||||
height: 72px;
|
height: 72px;
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
#side {
|
#side {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
@@ -221,13 +188,12 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-right: 96px;
|
margin-right: 96px;
|
||||||
top: 120px;
|
top: 120px;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 13;
|
z-index: 11;
|
||||||
}
|
}
|
||||||
#holder {
|
#holder {
|
||||||
height: 516px;
|
height: 516px;
|
||||||
width: auto;
|
width: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
#rwidget {
|
#rwidget {
|
||||||
height: 516px;
|
height: 516px;
|
||||||
@@ -265,7 +231,7 @@ a.admtxt.admbg2:hover {
|
|||||||
}
|
}
|
||||||
.fn_des.admtxt {
|
.fn_des.admtxt {
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
padding: 0 12px;
|
padding: 0 6px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
@@ -311,19 +277,18 @@ a.admtxt.admbg2:hover {
|
|||||||
}
|
}
|
||||||
li:first-child {
|
li:first-child {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* panel */
|
/* panel */
|
||||||
#panel_l {
|
#panel_l {
|
||||||
background-color: lighten($gray, 10%);
|
background-color: #f0f0f0;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
#panel_r {
|
#panel_r {
|
||||||
background-color: #fff;
|
|
||||||
margin-left: 252px;
|
margin-left: 252px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Desktop Notification */
|
/* Desktop Notification */
|
||||||
@@ -331,48 +296,32 @@ a.admtxt.admbg2:hover {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -200px;
|
margin-left: -206px;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
@include transition-type(height,2);
|
padding: 0 6px 6px 6px;
|
||||||
|
background-color: #000;
|
||||||
|
background-color: rgba(0,0,0,0.6);
|
||||||
|
|
||||||
.note_holder {
|
.note_holder {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
border: solid 1px #fff;
|
||||||
|
border-top: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 36px;
|
padding: 24px 24px;
|
||||||
border: solid 2px $gray;
|
|
||||||
border-top: 0;
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
.note_type {
|
.note_type {
|
||||||
display: inline-block;
|
float: left;
|
||||||
vertical-align: middle;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
.sign {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 40px;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 30px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&.icon-ok { background-color: #5BB75B; }
|
|
||||||
&.icon-exclamation-sign { background-color: #DA4F49; }
|
|
||||||
&.icon-warning-sign { background-color: #FAA732; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.note_message {
|
.note_message {
|
||||||
color: #333;
|
color: #333;
|
||||||
display: inline-block;
|
margin: 10px 0 0 48px;
|
||||||
vertical-align: middle;
|
|
||||||
word-wrap: break-word;
|
|
||||||
width: 240px;
|
|
||||||
margin: 0 0 0 20px;
|
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -385,7 +334,6 @@ a.admtxt.admbg2:hover {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 12;
|
z-index: 12;
|
||||||
display: none;
|
|
||||||
|
|
||||||
.tile {
|
.tile {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
@@ -413,7 +361,7 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 6px;
|
margin: 0 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -438,7 +386,6 @@ a.admtxt.admbg2:hover {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
[data-sizex="1"] &,
|
[data-sizex="1"] &,
|
||||||
.w1.h1 & {
|
.w1.h1 & {
|
||||||
@@ -446,7 +393,7 @@ a.admtxt.admbg2:hover {
|
|||||||
}
|
}
|
||||||
[data-sizey="2"] & {
|
[data-sizey="2"] & {
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.hh2 & {
|
.hh2 & {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -464,7 +411,7 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
[data-sizex="1"] &, .w1.h1 & {
|
[data-sizex="1"] & {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
#sections & {
|
#sections & {
|
||||||
@@ -474,6 +421,8 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.appholder {
|
.appholder {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@@ -497,6 +446,10 @@ a.admtxt.admbg2:hover {
|
|||||||
margin: 0 12px 0 0;
|
margin: 0 12px 0 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|
||||||
|
.sdm_o {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.tile {
|
.tile {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -506,17 +459,8 @@ a.admtxt.admbg2:hover {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
.gridster ul {
|
|
||||||
margin: -6px 0 0 -6px;
|
|
||||||
}
|
|
||||||
.widget.gs_w {
|
.widget.gs_w {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.gs_w.dragging {
|
|
||||||
-webkit-transform: scale(0.92);
|
|
||||||
-moz-transform: scale(0.92);
|
|
||||||
transform: scale(0.92);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* header drop menu */
|
/* header drop menu */
|
||||||
@@ -576,7 +520,7 @@ a.admtxt.admbg2:hover {
|
|||||||
|
|
||||||
.s_title {
|
.s_title {
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
@@ -599,90 +543,33 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-top: solid 1px #eee;
|
border-top: solid 1px #eee;
|
||||||
// background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.setting_btn {
|
|
||||||
margin-left: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.setting_btn {
|
.setting_btn {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
// font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Apps Manager */
|
|
||||||
#app_info {
|
.group_search{
|
||||||
float: left;
|
float: left;
|
||||||
width: 420px;
|
|
||||||
height: 516px;
|
|
||||||
margin-right: 36px;
|
margin-right: 36px;
|
||||||
display: none;
|
|
||||||
|
|
||||||
.app_info_header {
|
|
||||||
height: 120px;
|
|
||||||
margin: -12px -12px 12px -12px;
|
|
||||||
position: relative;
|
|
||||||
background-color: lighten($gray, 10%);
|
|
||||||
@include box-sizing;
|
|
||||||
|
|
||||||
> * {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.app_info_icon {
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-top: 30px;
|
|
||||||
@include box-sizing;
|
|
||||||
}
|
|
||||||
.app_info_name {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
font-size: 2em;
|
|
||||||
width: 300px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
.panel_close {
|
|
||||||
position: absolute;
|
|
||||||
right: 12px;
|
|
||||||
top: 12px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.app_info_list {
|
|
||||||
line-height: 1.5em;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
label {
|
|
||||||
color: darken($gray, 20%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#app_list {
|
|
||||||
float: left;
|
|
||||||
|
|
||||||
.element > * {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.search_result{
|
.search_result{
|
||||||
float: left;
|
float: left;
|
||||||
overflow: hidden;
|
margin-right: 24px;
|
||||||
|
max-width: 340px;
|
||||||
.message {
|
|
||||||
font-size: 15px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
|
|
||||||
b {
|
|
||||||
font-size: 20px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.g_sep {
|
||||||
|
width: 12px;
|
||||||
|
border-left: solid 1px #fff;
|
||||||
|
@include box-sizing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -706,15 +593,12 @@ a.admtxt.admbg2:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* list item */
|
/* list item */
|
||||||
.list_t_item {
|
.list_t_item { overflow: hidden; }
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.list_t_title {
|
.list_t_title {
|
||||||
padding-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
color: #000;
|
color: #333;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 1.3em;
|
font-weight: normal;
|
||||||
// font-weight: normal;
|
|
||||||
}
|
}
|
||||||
.list_t_des {
|
.list_t_des {
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
@@ -722,38 +606,164 @@ a.admtxt.admbg2:hover {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.list_item_function {
|
.list_item_function a {
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: -30px;
|
|
||||||
width: 100%;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: right;
|
|
||||||
@include transition-type(all,0.3);
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
padding: 4px;
|
||||||
margin-left: 4px;
|
|
||||||
padding: 0 6px;
|
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
-webkit-text-size-adjust: none;
|
-webkit-text-size-adjust: none;
|
||||||
|
}
|
||||||
|
|
||||||
:first-child {
|
/* Journal Papers */
|
||||||
|
[page-name="journal_p_list"] {
|
||||||
|
.list_t_item .inner { padding-left: 30px; }
|
||||||
|
.list_item_action {
|
||||||
|
font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: -30px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 1px 1px 6px 1px;
|
||||||
|
}
|
||||||
|
.icon-star-empty { color: #999; font-size: 20px; }
|
||||||
|
.icon-star { color: #faa732; font-size: 20px; }
|
||||||
|
.icon-check-empty { color: #999; font-size: 20px; }
|
||||||
|
.icon-check { color: #333; font-size: 20px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_view {
|
||||||
|
.list_t_des {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.file {
|
||||||
|
float: left;
|
||||||
|
width: 120px;
|
||||||
|
height: 50px;
|
||||||
|
padding: 6px;
|
||||||
|
margin: 1px;
|
||||||
|
position: relative;
|
||||||
|
@include box-sizing;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: lighten($gray, 10%);
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
position: absolute;
|
||||||
|
left: 6px;
|
||||||
|
top: 6px;
|
||||||
|
}
|
||||||
|
.filetitle {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
padding-left: 40px;
|
||||||
|
overflow: hidden;
|
||||||
|
@include box-sizing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Journal Paper Add */
|
||||||
|
#paper_add {
|
||||||
|
.s_grid_con {
|
||||||
|
float: left;
|
||||||
|
height: 456px;
|
||||||
|
margin-left: 12px;
|
||||||
|
padding-left: 12px;
|
||||||
|
border-left: solid 1px #eee;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.datalist_item:hover & {
|
.f_w { width: 336px; }
|
||||||
bottom: 0;
|
label { margin-right: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Journal Journal list */
|
||||||
|
[page-name="journal_p_journal"] {
|
||||||
|
|
||||||
|
.datalist_item .inner {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.list_item_action {
|
||||||
|
font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: -30px;
|
||||||
|
}
|
||||||
|
.list_item_action i {
|
||||||
|
color: #999;
|
||||||
|
font-size: 20px;
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 1px 1px 6px 1px;
|
||||||
|
}
|
||||||
|
.list_t_desc {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Journal Co-Author */
|
||||||
|
[page-name="journal_p_coauthor"] {
|
||||||
|
.list_t_item {
|
||||||
|
height: 110px;
|
||||||
|
}
|
||||||
|
.list_item_function {}
|
||||||
|
.list_item_function a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 11px;
|
||||||
|
-webkit-text-size-adjust: none;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
.info li {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.info .name {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 24px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Journal Co-Author Relationship*/
|
||||||
|
[page-name="journal_p_coauthor_relation"]{
|
||||||
|
.edit_co_author_relation {
|
||||||
|
/*margin-left: -10px;*/
|
||||||
|
}
|
||||||
|
.form_space {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Journal New Co-Author */
|
||||||
|
#new_co_author label {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* App */
|
/* App */
|
||||||
.app_frame {
|
.app_frame {
|
||||||
margin: 60px 0 48px 156px;
|
margin: 48px 96px 48px 156px;
|
||||||
min-width: 800px;
|
min-width: 800px;
|
||||||
min-height: 576px;
|
min-height: 588px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -765,15 +775,8 @@ a.admtxt.admbg2:hover {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
iframe {
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
#header .icon-remove {
|
||||||
.app_frame_header{
|
|
||||||
height: 60px;
|
|
||||||
|
|
||||||
.icon-remove, .icon-minus {
|
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
@@ -781,39 +784,11 @@ a.admtxt.admbg2:hover {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Minimize Section */
|
|
||||||
#minimizebar {
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 14;
|
|
||||||
|
|
||||||
.minimize {
|
|
||||||
cursor: pointer;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
line-height: 36px;
|
|
||||||
font-size: 15px;
|
|
||||||
float: left;
|
|
||||||
|
|
||||||
.icon-remove {
|
|
||||||
float: right;
|
|
||||||
line-height: 36px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
> :first-child {
|
|
||||||
// margin-top: 48px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Tooltip popup */
|
/*Tooltip popup */
|
||||||
.desktop_toolpopup {
|
.desktop_toolpopup {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10px;
|
||||||
display: none;
|
display: none;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@media only screen and (min-width: 1240px){
|
@media only screen and (min-width: 1240px){
|
||||||
|
|
||||||
/*#panel_r.pw { width: 800px; }*/
|
#panel_r.pw { width: 800px; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 1900px){
|
@media only screen and (min-width: 1900px){
|
||||||
|
|
||||||
/*#panel_r.pw { width: 1400px; }*/
|
#panel_r.pw { width: 1400px; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -86,12 +86,15 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
background-color: #fff;
|
background-color: #dddddd;
|
||||||
color: #000;
|
color: #000;
|
||||||
border: 2px solid #dddddd; }
|
border: 1px solid #dddddd;
|
||||||
|
border-top: 0; }
|
||||||
|
|
||||||
.select2-drop.select2-drop-above {
|
.select2-drop.select2-drop-above {
|
||||||
margin-top: 1px; }
|
margin-top: 1px;
|
||||||
|
border-top: 1px solid #dddddd;
|
||||||
|
border-bottom: 0; }
|
||||||
|
|
||||||
.select2-container .select2-choice div {
|
.select2-container .select2-choice div {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -149,7 +152,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
margin-top: 4px; }
|
margin-top: 4px; }
|
||||||
|
|
||||||
.select2-search input.select2-active {
|
.select2-search input.select2-active {
|
||||||
background: white url("select2/spinner.gif") no-repeat 100%; }
|
background: white image-url("select2-spinner.gif") no-repeat 100%; }
|
||||||
|
|
||||||
.select2-container-active .select2-choice,
|
.select2-container-active .select2-choice,
|
||||||
.select2-container-active .select2-choices {
|
.select2-container-active .select2-choices {
|
||||||
@@ -168,6 +171,8 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
/* results */
|
/* results */
|
||||||
.select2-results {
|
.select2-results {
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
|
padding: 0 0 0 4px;
|
||||||
|
margin: 4px 4px 4px 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -201,16 +206,13 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
.select2-results li {
|
.select2-results li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: list-item;
|
display: list-item;
|
||||||
background-image: none;
|
background-image: none; }
|
||||||
border-top: solid 1px #f7f7f7; }
|
|
||||||
.select2-results li :first-child {
|
|
||||||
border-top: 0; }
|
|
||||||
|
|
||||||
.select2-results li.select2-result-with-children > .select2-result-label {
|
.select2-results li.select2-result-with-children > .select2-result-label {
|
||||||
font-weight: bold; }
|
font-weight: bold; }
|
||||||
|
|
||||||
.select2-results .select2-result-label {
|
.select2-results .select2-result-label {
|
||||||
padding: 6px;
|
padding: 4px 6px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
@@ -261,7 +263,7 @@ disabled look for disabled choices in the results dropdown
|
|||||||
display: none; }
|
display: none; }
|
||||||
|
|
||||||
.select2-more-results.select2-active {
|
.select2-more-results.select2-active {
|
||||||
background: #f4f4f4 url("select2/spinner.gif") no-repeat 100%; }
|
background: #f4f4f4 image-url("select2-spinner.gif") no-repeat 100%; }
|
||||||
|
|
||||||
.select2-more-results {
|
.select2-more-results {
|
||||||
background: #f4f4f4;
|
background: #f4f4f4;
|
||||||
@@ -271,7 +273,7 @@ disabled look for disabled choices in the results dropdown
|
|||||||
.select2-container.select2-container-disabled .select2-choice {
|
.select2-container.select2-container-disabled .select2-choice {
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #dddddd;
|
||||||
cursor: default; }
|
cursor: default; }
|
||||||
|
|
||||||
.select2-container.select2-container-disabled .select2-choice div {
|
.select2-container.select2-container-disabled .select2-choice div {
|
||||||
@@ -323,10 +325,10 @@ disabled look for disabled choices in the results dropdown
|
|||||||
background: transparent !important; }
|
background: transparent !important; }
|
||||||
|
|
||||||
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
||||||
background: white url("select2/spinner.gif") no-repeat 100% !important; }
|
background: white image-url("select2-spinner.gif") no-repeat 100% !important; }
|
||||||
|
|
||||||
.select2-default {
|
.select2-default {
|
||||||
color: #999 !important; }
|
color: #999999 !important; }
|
||||||
|
|
||||||
.select2-container-multi .select2-choices .select2-search-choice {
|
.select2-container-multi .select2-choices .select2-search-choice {
|
||||||
padding: 3px 5px 3px 18px;
|
padding: 3px 5px 3px 18px;
|
||||||
@@ -374,12 +376,12 @@ disabled look for disabled choices in the results dropdown
|
|||||||
.select2-container-multi.select2-container-disabled .select2-choices {
|
.select2-container-multi.select2-container-disabled .select2-choices {
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #dddddd;
|
||||||
cursor: default; }
|
cursor: default; }
|
||||||
|
|
||||||
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
||||||
padding: 3px 5px 3px 5px;
|
padding: 3px 5px 3px 5px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #dddddd;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-color: #f4f4f4; }
|
background-color: #f4f4f4; }
|
||||||
|
|
||||||
|
|||||||
@@ -86,16 +86,16 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
background-color: #fff;
|
background-color: $gray;
|
||||||
color: #000;
|
color: #000;
|
||||||
border: 2px solid $gray;
|
border: 1px solid $gray;
|
||||||
// border-top: 0;
|
border-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-drop.select2-drop-above {
|
.select2-drop.select2-drop-above {
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
// border-top: 1px solid $gray;
|
border-top: 1px solid $gray;
|
||||||
// border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container .select2-choice div {
|
.select2-container .select2-choice div {
|
||||||
@@ -155,7 +155,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-search input.select2-active {
|
.select2-search input.select2-active {
|
||||||
background: #fff url('select2/spinner.gif') no-repeat 100%;
|
background: #fff image-url('select2-spinner.gif') no-repeat 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container-active .select2-choice,
|
.select2-container-active .select2-choice,
|
||||||
@@ -180,8 +180,8 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
/* results */
|
/* results */
|
||||||
.select2-results {
|
.select2-results {
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
// padding: 0 0 0 4px;
|
padding: 0 0 0 4px;
|
||||||
// margin: 4px 4px 4px 0;
|
margin: 4px 4px 4px 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -205,11 +205,6 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
display: list-item;
|
display: list-item;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
border-top: solid 1px lighten($gray, 10%);
|
|
||||||
|
|
||||||
:first-child {
|
|
||||||
border-top: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-results li.select2-result-with-children > .select2-result-label {
|
.select2-results li.select2-result-with-children > .select2-result-label {
|
||||||
@@ -217,7 +212,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-results .select2-result-label {
|
.select2-results .select2-result-label {
|
||||||
padding: 6px;
|
padding: 4px 6px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@@ -273,7 +268,7 @@ disabled look for disabled choices in the results dropdown
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-more-results.select2-active {
|
.select2-more-results.select2-active {
|
||||||
background: #f4f4f4 url('select2/spinner.gif') no-repeat 100%;
|
background: #f4f4f4 image-url('select2-spinner.gif') no-repeat 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-more-results {
|
.select2-more-results {
|
||||||
@@ -352,7 +347,7 @@ disabled look for disabled choices in the results dropdown
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
||||||
background: #fff url('select2/spinner.gif') no-repeat 100% !important;
|
background: #fff image-url('select2-spinner.gif') no-repeat 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-default {
|
.select2-default {
|
||||||
|
|||||||
@@ -12,9 +12,6 @@
|
|||||||
.main-list {
|
.main-list {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
#filter .main-list, #filter + .main-list {
|
|
||||||
table-layout: fixed;
|
|
||||||
}
|
|
||||||
.main-wrap>.main-list thead th {
|
.main-wrap>.main-list thead th {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-right: medium none;
|
border-right: medium none;
|
||||||
@@ -39,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
.main-list tbody .quick-edit .nav {
|
.main-list tbody .quick-edit .nav {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 440px;
|
width: 350px;
|
||||||
left: -8px;
|
left: -8px;
|
||||||
}
|
}
|
||||||
.main-list tbody .quick-edit .nav .dropdown-menu {
|
.main-list tbody .quick-edit .nav .dropdown-menu {
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
.o-question {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
.o-question input[type=checkbox], .o-question input[type=radio] {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.o-question textarea {
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
.o-question-topic {
|
|
||||||
font-size: 2em;
|
|
||||||
line-height: normal;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.5em 0;
|
|
||||||
}
|
|
||||||
.o-question-description {
|
|
||||||
font-size: 0.9em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
.o-question-list {
|
|
||||||
clear: both;
|
|
||||||
margin: 40px 0;
|
|
||||||
padding: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.o-question-list > li {
|
|
||||||
margin: 0 0 0 40px;
|
|
||||||
padding: 16px 0;
|
|
||||||
border-top: solid 1px #eee;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.o-question-list > li .required-star {
|
|
||||||
position: absolute;
|
|
||||||
left: -42px;
|
|
||||||
padding-top: 4px;
|
|
||||||
}
|
|
||||||
.o-question-list > li:first-child {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
.o-question-title {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.2em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
.o-question-title + .o-question-description {
|
|
||||||
font-weight: normal;
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
padding: 16px;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 20px;
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
.o-question-title + .o-question-description:before {
|
|
||||||
display: block;
|
|
||||||
content: "";
|
|
||||||
border-left: 12px solid transparent;
|
|
||||||
border-right: 12px solid transparent;
|
|
||||||
border-bottom: 12px solid #f6f6f6;
|
|
||||||
position: absolute;
|
|
||||||
top: -12px;
|
|
||||||
left: 16px;
|
|
||||||
}
|
|
||||||
.o-question-title + input[type=text],
|
|
||||||
.o-question-title + textarea,
|
|
||||||
.o-question-title + select,
|
|
||||||
.o-question-description + input[type=text],
|
|
||||||
.o-question-description + textarea,
|
|
||||||
.o-question-description + select {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.o-question-title + input[type=text], .o-question-title + textarea {
|
|
||||||
border: solid 1px #ccc;
|
|
||||||
padding: 6px;
|
|
||||||
margin: 20px 0;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
.o-question-title + input[type=text] {
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
.o-question-title + textarea {
|
|
||||||
width: 70%;
|
|
||||||
}
|
|
||||||
.o-question-group {
|
|
||||||
margin: 20px 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.o-question-option {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.o-question-group.view-list {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.o-question-group.view-list .o-question-option {}
|
|
||||||
.o-question-group.view-list > li {
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
.o-question-group.view-list > li:first-child {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.o-question-group.view-list > li > * {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.o-question-group.view-list > li input + .o-question-option {
|
|
||||||
margin: 0 0 0 12px;
|
|
||||||
}
|
|
||||||
.o-question-group.view-dropdown {
|
|
||||||
height: 24px;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid {
|
|
||||||
border-collapse: collapse;
|
|
||||||
max-width: 90%;
|
|
||||||
min-width: 50%;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid th, .o-question-group.view-grid td {
|
|
||||||
padding: 6px;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid thead th {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid tbody th {}
|
|
||||||
.o-question-group.view-grid tbody .odd .o-question-title, .o-question-group.view-grid tbody .odd td {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid .o-question-title {
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid tbody .odd .o-question-title {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid tbody .odd td {}
|
|
||||||
.o-question-group.view-grid tbody tr:hover td {
|
|
||||||
background-color: #aaa;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid tbody td {
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.o-question-group.view-grid tbody td input {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
.o-question-action {
|
|
||||||
padding: 20px;
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700);
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 50px 0;
|
|
||||||
background-color: #eee;
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
background: #FFFFFF none;
|
|
||||||
box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
|
|
||||||
margin: 0 auto;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 980px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper > h1 {
|
|
||||||
margin: 0;
|
|
||||||
padding: 20px;
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
section {
|
|
||||||
border-top: dashed 3px #eee;
|
|
||||||
padding: 40px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
section:first-child {
|
|
||||||
border: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
section > h2 {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: bold;
|
|
||||||
border: solid 1px #ddd;
|
|
||||||
background-color: #2676C0;
|
|
||||||
color: #fff;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 16px;
|
|
||||||
box-shadow: 0 1px 1px #fff, 0 2px 6px rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
.side {
|
|
||||||
float: right;
|
|
||||||
width: 189px;
|
|
||||||
padding-left: 20px;
|
|
||||||
border-left: solid 1px #eee;
|
|
||||||
}
|
|
||||||
.main {
|
|
||||||
float: left;
|
|
||||||
width: 710px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||||||
def new
|
def new
|
||||||
@asset = Asset.new
|
@asset = Asset.new
|
||||||
@asset_categories = AssetCategory.all
|
@asset_categories = AssetCategory.all
|
||||||
@tags = get_tags
|
@tags = AssetTag.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {}
|
format.html {}
|
||||||
format.js { render 'js/show_pop_up', :locals => {:partial => 'admin/assets/new'} }
|
format.js { render 'js/show_pop_up', :locals => {:partial => 'admin/assets/new'} }
|
||||||
@@ -21,7 +21,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||||||
def edit
|
def edit
|
||||||
@asset = Asset.find(params[:id])
|
@asset = Asset.find(params[:id])
|
||||||
@asset_categories = AssetCategory.all
|
@asset_categories = AssetCategory.all
|
||||||
@tags = get_tags
|
@tags = AssetTag.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {}
|
format.html {}
|
||||||
format.js { render 'js/show_pop_up', :locals => {:partial => 'admin/assets/edit'} }
|
format.js { render 'js/show_pop_up', :locals => {:partial => 'admin/assets/edit'} }
|
||||||
@@ -46,7 +46,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||||||
else
|
else
|
||||||
flash[:error] = t('create.fail')
|
flash[:error] = t('create.fail')
|
||||||
@asset_categories = AssetCategory.all
|
@asset_categories = AssetCategory.all
|
||||||
@tags = get_tags
|
@tags = AssetTag.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js {
|
format.js {
|
||||||
if params[:uploader]
|
if params[:uploader]
|
||||||
@@ -69,7 +69,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||||||
else
|
else
|
||||||
flash[:error] = t('update.fail')
|
flash[:error] = t('update.fail')
|
||||||
@asset_categories = AssetCategory.all
|
@asset_categories = AssetCategory.all
|
||||||
@tags = get_tags
|
@tags = AssetTag.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :action => :edit }
|
format.html { render :action => :edit }
|
||||||
format.js { render 'js/reload_pop_up', :locals => {:value => @asset, :values => nil, :partial => 'admin/assets/edit', :locals => {:is_html => false}} }
|
format.js { render 'js/reload_pop_up', :locals => {:value => @asset, :values => nil, :partial => 'admin/assets/edit', :locals => {:is_html => false}} }
|
||||||
@@ -96,7 +96,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||||||
def file_upload
|
def file_upload
|
||||||
@asset = Asset.new
|
@asset = Asset.new
|
||||||
@asset_categories = AssetCategory.all
|
@asset_categories = AssetCategory.all
|
||||||
@tags = get_tags
|
@tags = AssetTag.all
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ class Admin::DashboardsController < OrbitBackendController
|
|||||||
# before_filter :is_admin?
|
# before_filter :is_admin?
|
||||||
|
|
||||||
def index
|
def index
|
||||||
check_backend_openness
|
|
||||||
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'page_context', 'web_link')
|
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'page_context', 'web_link')
|
||||||
@recent_updated = get_recently_updated('bulletin', 'page_context', 'web_link')
|
@recent_updated = get_recently_updated('bulletin', 'page_context', 'web_link')
|
||||||
@most_visited = get_most_visited('bulletin', 'page_context')
|
@most_visited = get_most_visited('bulletin', 'page_context')
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
class Admin::PagePartsController < OrbitBackendController
|
class Admin::PagePartsController < OrbitBackendController
|
||||||
include Admin::FrontendWidgetInterface
|
|
||||||
layout "site_editor"
|
layout "site_editor"
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
before_filter :is_admin?
|
before_filter :is_admin?
|
||||||
before_filter :set_current_item
|
before_filter :set_current_item
|
||||||
@@ -17,80 +18,59 @@ class Admin::PagePartsController < OrbitBackendController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@part = PagePart.find(params[:id])
|
@part = PagePart.find(params[:id])
|
||||||
|
@module_apps = ModuleApp.where(:key.in=>OrbitApp::Module::WidgetUtility.all.keys).order_by(:title, :asc)
|
||||||
|
@module_app = @part.module_app ? @part.module_app : nil
|
||||||
|
@user_choose = @part.widget_path
|
||||||
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
||||||
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
||||||
if @r_tag.eql?('tag_cloud')
|
|
||||||
@tag_objects = ModuleApp.where(has_tag: true)
|
|
||||||
else
|
|
||||||
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
|
||||||
end
|
|
||||||
|
|
||||||
@module_apps = ModuleApp.for_widget_select
|
if @module_app
|
||||||
@categories = nil
|
@widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0]
|
||||||
@tags = nil
|
@widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? or @module_app.nil?
|
||||||
@page_frontend_data_counts = nil
|
|
||||||
# @frontend_styles = nil
|
|
||||||
|
|
||||||
@selected={
|
|
||||||
:module_app=> @part.module_app ? @part.module_app : nil,
|
|
||||||
:app_frontend_url=> @part.widget_path || "default_widget", #@module_apps.first
|
|
||||||
:category=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil,
|
|
||||||
:widget_path=> nil
|
|
||||||
}
|
|
||||||
|
|
||||||
@selected[:widget_path] = @part.widget_path ? @part.widget_path : (@selected[:module_app].widgets.keys[0] rescue nil)
|
|
||||||
get_categories_and_tags
|
|
||||||
get_frontend_data_count
|
|
||||||
@app_frontend_urls = get_app_frontend_urls
|
|
||||||
end
|
|
||||||
|
|
||||||
def reload_widgets
|
|
||||||
@part = PagePart.find params[:id]
|
|
||||||
@selected={
|
|
||||||
:module_app=> ModuleApp.find(params["module_app_id"])
|
|
||||||
}
|
|
||||||
get_categories_and_tags
|
|
||||||
get_frontend_data_count
|
|
||||||
@selected[:app_frontend_url] = @selected[:module_app].has_default_widget? ? 'default_widget' : @selected[:module_app].widget_options.first.name
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def reload_widget_styles
|
unless @module_app.nil?
|
||||||
@part = PagePart.find(params[:id])
|
@categories = @module_app.get_categories
|
||||||
@selected={
|
@tags = @module_app.get_tags
|
||||||
:module_app=> ModuleApp.find(params["module_app_id"]),
|
|
||||||
:app_frontend_url=> params["frontend"], #@module_apps.first
|
|
||||||
:category=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil,
|
|
||||||
:widget_path=> nil
|
|
||||||
}
|
|
||||||
get_categories_and_tags
|
|
||||||
get_frontend_data_count
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def reload_widget_field
|
@widget_path = @part.widget_path ? @part.widget_path : (@module_app.widgets.keys[0] rescue nil)
|
||||||
@index = params[:field_seri].to_i
|
|
||||||
@part = PagePart.find(params[:id])
|
if @module_app && @module_app.widgets.any?{|b| b.class == Array}
|
||||||
@selected = {
|
@widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank?
|
||||||
:module_app=> ModuleApp.find(params["module_app_id"]),
|
end
|
||||||
:default_widget_field=>params[:widget_field_value]
|
|
||||||
}
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
||||||
@part = PagePart.find(params[:id])
|
@part = PagePart.find(params[:id])
|
||||||
|
|
||||||
|
# params[:page_part][:widget_field_type] = nil
|
||||||
|
# params[:page_part][:widget_field_is_link] = nil
|
||||||
|
|
||||||
clean_tags_and_category_params
|
if params[:page_part][:module_app].blank?
|
||||||
|
params[:page_part][:module_app] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if params[:page_part][:tag].nil? || params[:page_part][:tag].include?("nil")
|
||||||
|
params[:page_part][:tag] = []
|
||||||
|
end
|
||||||
|
|
||||||
|
if params[:page_part][:category].nil? || params[:page_part][:category].include?("nil")
|
||||||
|
params[:page_part][:category] = []
|
||||||
|
end
|
||||||
|
|
||||||
# params[:page_part][:widget_field].each{|t| t[2] = (t[2]=="true" ? true : false )} if !params[:page_part][:widget_field].blank?
|
# params[:page_part][:widget_field].each{|t| t[2] = (t[2]=="true" ? true : false )} if !params[:page_part][:widget_field].blank?
|
||||||
if @part.update_attributes(params[:page_part])
|
if @part.update_attributes(params[:page_part])
|
||||||
@@ -121,25 +101,51 @@ class Admin::PagePartsController < OrbitBackendController
|
|||||||
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reload_widget_field
|
||||||
|
@index = params[:field_seri].to_i
|
||||||
|
@part = PagePart.find params[:id]
|
||||||
|
@choosen_field = params[:widget_field_value]
|
||||||
|
@module_app = @part.module_app
|
||||||
|
@module_app = ModuleApp.find params[:module_app_id] if @module_app.nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload_widgets
|
||||||
|
@part = PagePart.find params[:id]
|
||||||
|
@module_app = ModuleApp.find(params[:module_app_id]) rescue nil
|
||||||
|
@categories =@module_app ? @module_app.get_categories : []
|
||||||
|
@tags =@module_app ? @module_app.get_tags : []
|
||||||
|
@widget_path = @module_app.widgets.keys[0] if (@module_app && @module_app.widgets[0].blank? )
|
||||||
|
@widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? )
|
||||||
|
|
||||||
|
@part.widget_path = @module_app.widgets.first if( @module_app)
|
||||||
|
respond_to do |format|
|
||||||
|
format.js {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload_widget_styles
|
||||||
|
@module_app = ModuleApp.find(params[:module_app_id])
|
||||||
|
|
||||||
|
@part = PagePart.find params[:id]
|
||||||
|
@user_choose =@widget_path= params[:frontend]
|
||||||
|
@widget_style = @module_app.widgets[@widget_path]
|
||||||
|
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def reload_r_tag_options
|
def reload_r_tag_options
|
||||||
@part = PagePart.find params[:id]
|
@part = PagePart.find params[:id]
|
||||||
@r_tag = params[:type]
|
@r_tag = params[:type]
|
||||||
if params[:type].eql?('tag_cloud')
|
|
||||||
@tag_objects = ModuleApp.where(has_tag: true)
|
|
||||||
else
|
|
||||||
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
||||||
end
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js {}
|
format.js {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def get_app_frontend_urls
|
|
||||||
@selected[:module_app] ? @selected[:module_app].widgets.collect{|k,v| [I18n.t(v["i18n"]),k]} : []
|
|
||||||
# has_old_value = @selected[:module_app].app_pages[@selected[:app_frontend_url]]
|
|
||||||
# @frontend_styles = has_old_value ? has_old_value["style"] : (@selected[:module_app].app_pages.first[1]["style"] rescue nil)
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_children_sub_menu(part)
|
def set_children_sub_menu(part)
|
||||||
part.page.children.each do |child|
|
part.page.children.each do |child|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
class Admin::PagesController < Admin::ItemsController
|
class Admin::PagesController < Admin::ItemsController
|
||||||
helper Admin::PagePartsHelper
|
helper Admin::PagePartsHelper
|
||||||
include Admin::FrontendWidgetInterface
|
|
||||||
def show
|
def show
|
||||||
@item = Page.find(params[:id])
|
@item = Page.find(params[:id])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
@@ -14,123 +13,40 @@ include Admin::FrontendWidgetInterface
|
|||||||
def new
|
def new
|
||||||
@item = Page.new
|
@item = Page.new
|
||||||
@item.parent = Item.find(params[:parent_id]) rescue nil
|
@item.parent = Item.find(params[:parent_id]) rescue nil
|
||||||
# @apps = ModuleApp.for_frontend_select
|
@apps = ModuleApp.where(:key.in => OrbitApp::Module::FrontendUtility.all.keys)
|
||||||
|
@module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
|
||||||
@designs = Design.all.entries
|
@designs = Design.all.entries
|
||||||
@themes = Design.first.themes
|
@design = Design.first
|
||||||
@module_apps = ModuleApp.for_frontend_select
|
|
||||||
@app_frontend_urls = nil
|
|
||||||
@categories = nil
|
|
||||||
@tags = nil
|
|
||||||
@page_frontend_data_counts = nil
|
|
||||||
@frontend_styles = nil
|
|
||||||
@selected={
|
|
||||||
:design => @designs.first,
|
|
||||||
:theme=> @themes.first,
|
|
||||||
:module_app=>nil,#@module_apps.first
|
|
||||||
:app_frontend_url=> nil, #@module_apps.first
|
|
||||||
:category=>nil,
|
|
||||||
:tag=>nil,
|
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@item = Page.find(params[:id])
|
@item = Page.find(params[:id])
|
||||||
|
@user_choose = @item.app_frontend_url
|
||||||
|
@apps = ModuleApp.where(:key.in => OrbitApp::Module::FrontendUtility.all.keys)
|
||||||
|
@module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
|
||||||
|
|
||||||
@designs = Design.all.entries
|
@designs = Design.all.entries
|
||||||
@themes = @item.design ? @item.design.themes : @designs.first.themes
|
@design = @item.design ? @item.design : @designs.first
|
||||||
@module_apps = ModuleApp.for_frontend_select
|
|
||||||
@categories = nil
|
|
||||||
@tags = nil
|
|
||||||
@page_frontend_data_counts = nil
|
|
||||||
@frontend_styles = nil
|
|
||||||
|
|
||||||
@selected={
|
if @item.module_app
|
||||||
:design => @item.design || @designs.first,
|
@app_frontend_urls = []
|
||||||
:theme=> @item.theme,
|
setup_app_frontend_and_style
|
||||||
:module_app=>@item.module_app,#@module_apps.first
|
@app_frontend_urls << [I18n.t('default_widget.name'),'default_widget'] if @item.module_app.has_default_widget?
|
||||||
:app_frontend_url=> @item.app_frontend_url, #@module_apps.first
|
|
||||||
:category=>nil, #fetch by method: get_categories_and_tags
|
@module_app = @item.module_app
|
||||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
@frontend_path = @item.app_frontend_url
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil
|
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||||
}
|
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||||
@app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil
|
end
|
||||||
get_categories_and_tags
|
get_categories_and_tags
|
||||||
get_frontend_data_count
|
|
||||||
|
else
|
||||||
|
@module_app = @module_apps[0]
|
||||||
end
|
end
|
||||||
|
|
||||||
def reload_themes
|
|
||||||
design = Design.find(params[:design_id])
|
|
||||||
@themes = design.themes
|
|
||||||
respond_to do |format|
|
|
||||||
format.js {}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def reload_frontend_pages
|
|
||||||
@item = Page.find(params[:id]) rescue Page.new
|
|
||||||
@selected={
|
|
||||||
:design => nil,
|
|
||||||
:theme=> nil,
|
|
||||||
:module_app=>(ModuleApp.find(params[:module_app_id]) rescue nil),
|
|
||||||
:app_frontend_url=> @item.app_frontend_url || 'default_widget', #@module_apps.first
|
|
||||||
:category=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil
|
|
||||||
}
|
|
||||||
@app_frontend_urls = @selected[:module_app] ? select_array_for_app_frontend_urls(@selected[:module_app].app_pages) : nil
|
|
||||||
|
|
||||||
get_categories_and_tags
|
|
||||||
get_frontend_data_count
|
|
||||||
get_frontend_styles
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.js {}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def reload_front_end_setting
|
|
||||||
@item = Page.find(params[:id]) rescue Page.new
|
|
||||||
|
|
||||||
@categories = nil
|
|
||||||
@tags = nil
|
|
||||||
@page_frontend_data_counts = nil
|
|
||||||
|
|
||||||
@selected={
|
|
||||||
# :design => @item.design || @designs.first,
|
|
||||||
# :theme=> @item.theme,
|
|
||||||
:module_app=>ModuleApp.find(params[:module_app_id]),
|
|
||||||
:app_frontend_url=> params[:frontend] ,
|
|
||||||
:category=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
|
||||||
:page_frontend_data_count=>nil,
|
|
||||||
:frontend_style => nil
|
|
||||||
}
|
|
||||||
@app_frontend_urls = @selected[:module_app].nil? ? nil : @selected[:module_app].app_pages.each{|name,data| [I18n.t(data["i18n"]),name]}
|
|
||||||
@frontend_styles = @selected[:module_app].app_pages[params["frontend"]]["style"] rescue nil
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def reload_widget_field
|
|
||||||
@index = params[:field_seri].to_i
|
|
||||||
@item = Page.find(params[:id]) rescue Page.new
|
|
||||||
@selected = {
|
|
||||||
:module_app=> (ModuleApp.find(params[:module_app_id]) || @item.module_app ),
|
|
||||||
:default_widget_field=>params[:widget_field_value]
|
|
||||||
}
|
|
||||||
# @choosen_field = params[:widget_field_value]
|
|
||||||
# @module_app = @item.module_app
|
|
||||||
# @module_app = ModuleApp.find params[:module_app_id] if @module_app.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
clean_tags_and_category_params
|
|
||||||
@item = Page.new(params[:page])
|
@item = Page.new(params[:page])
|
||||||
|
|
||||||
if @item.module_app && @item.module_app.key == 'page_content'
|
if @item.module_app && @item.module_app.key == 'page_content'
|
||||||
@@ -147,34 +63,36 @@ include Admin::FrontendWidgetInterface
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
flash.now[:error] = t('create.error.page')
|
flash.now[:error] = t('create.error.page')
|
||||||
|
@apps = ModuleApp.where(:key.in => OrbitApp::Module::FrontendUtility.all.keys)
|
||||||
@designs = Design.all.entries
|
@designs = Design.all.entries
|
||||||
@design = Design.find(params[:page][:design]) || Design.first
|
@design = Design.first
|
||||||
@themes = @design.themes
|
|
||||||
@module_apps = ModuleApp.for_frontend_select
|
|
||||||
@selected={
|
|
||||||
:design => params[:page][:design],
|
|
||||||
:theme=> (Theme.find(params[:page][:theme_id]) rescue nil),
|
|
||||||
:module_app=> (ModuleApp.find(params[:page][:module_app_id]) rescue nil) ,#@module_apps.first
|
|
||||||
:app_frontend_url=> params[:page][:app_frontend_url], #@module_apps.first
|
|
||||||
:category=>params[:page][:category],
|
|
||||||
:tag=>params[:page][:tag],
|
|
||||||
:page_frontend_data_count=>params[:page][:page_frontend_data_count],
|
|
||||||
:frontend_style => params[:page][:frontend_style]
|
|
||||||
}
|
|
||||||
@app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil
|
|
||||||
get_categories_and_tags
|
|
||||||
get_frontend_data_count
|
|
||||||
render :action => "new"
|
render :action => "new"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
clean_tags_and_category_params
|
|
||||||
@item = Page.find(params[:id])
|
@item = Page.find(params[:id])
|
||||||
|
|
||||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type], params[:page][:frontend_field_is_link] ) if params[:page][:frontend_field]
|
||||||
|
|
||||||
|
# params[:page][:frontend_field_type] = nil
|
||||||
|
# params[:page][:frontend_field_is_link] = nil
|
||||||
|
|
||||||
|
if params[:page][:tag].nil? || params[:page][:tag].include?("nil")
|
||||||
|
params[:page][:tag] = []
|
||||||
|
end
|
||||||
|
|
||||||
|
if params[:page][:category].nil? || params[:page][:category].include?("nil")
|
||||||
|
params[:page][:category] = []
|
||||||
|
end
|
||||||
|
|
||||||
|
# params[:page][:frontend_field].each{|t| t[2] = (t[2]=="true" ? true : false )} if !params[:page][:frontend_field].blank?
|
||||||
|
|
||||||
|
|
||||||
if @item.update_attributes(params[:page])
|
if @item.update_attributes(params[:page])
|
||||||
flash[:notice] = t('update.success.page')
|
flash[:notice] = t('update.success.page')
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
@@ -208,10 +126,65 @@ include Admin::FrontendWidgetInterface
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
def reload_front_end_setting
|
||||||
|
@item = Page.find params[:id] rescue nil
|
||||||
|
@module_app = ModuleApp.find params[:module_app_id]
|
||||||
|
@user_choose = params[:frontend] #choosen frontend
|
||||||
|
|
||||||
def get_frontend_styles
|
@app_frontend_urls = @module_app.nil? ? nil : @module_app.app_pages.each{|name,data| [I18n.t(data["i18n"]),name]}
|
||||||
has_old_value = @selected[:module_app].app_pages[@selected[:app_frontend_url]]
|
@frontend_styles = @module_app.app_pages[params["frontend"]]["style"] rescue nil
|
||||||
@frontend_styles = has_old_value ? has_old_value["style"] : (@selected[:module_app].app_pages.first[1]["style"] rescue nil)
|
# =======
|
||||||
|
# @chosen_frontend = @user_choose = params[:frontend]
|
||||||
|
# >>>>>>> Stashed changes
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_categories_and_tags
|
||||||
|
unless @module_app.nil?
|
||||||
|
@categories = @module_app.get_categories
|
||||||
|
@tags = @module_app.get_tags
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def setup_app_frontend_and_style
|
||||||
|
if @module_app.nil?
|
||||||
|
@item.module_app.app_pages.each{|name,data| @app_frontend_urls << [I18n.t(data["i18n"]),name]}
|
||||||
|
@frontend_styles = @item.module_app.app_pages[@item.frontend_style]["style"] if @frontend_styles.nil? && @item && @item.module_app.app_pages[@item.frontend_style]
|
||||||
|
@frontend_styles = @item.module_app.app_pages.first[1]["style"] if @frontend_styles.nil? && @item
|
||||||
|
else
|
||||||
|
@module_app.app_pages.each{|name,data| @app_frontend_urls << [I18n.t(data["i18n"]),name]}
|
||||||
|
@frontend_styles = @module_app.app_pages[params["frontend"]]["style"] rescue nil
|
||||||
|
@frontend_styles = @module_app.app_pages.first[1]["style"] if @frontend_styles.nil?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload_frontend_pages
|
||||||
|
@item = Page.find params[:id] rescue nil
|
||||||
|
@module_app = ModuleApp.find(params[:module_app_id]) rescue nil
|
||||||
|
@app_frontend_urls = []
|
||||||
|
setup_app_frontend_and_style
|
||||||
|
@app_frontend_urls << [I18n.t('default_widget.name'),'default_widget'] if(@module_app && @module_app.has_default_widget?)
|
||||||
|
|
||||||
|
get_categories_and_tags
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload_themes
|
||||||
|
@design = Design.find(params[:id])
|
||||||
|
@themes = @design.themes
|
||||||
|
respond_to do |format|
|
||||||
|
format.js {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload_widget_field
|
||||||
|
@index = params[:field_seri].to_i
|
||||||
|
@item = params.has_key?(:id) ? Page.find(params[:id] ) : Page.new
|
||||||
|
@choosen_field = params[:widget_field_value]
|
||||||
|
@module_app = @page.module_app
|
||||||
|
@module_app = ModuleApp.find params[:module_app_id] if @module_app.nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
class Admin::RoleCategorysController < Admin::RoleFiltersController
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@app_type = 'role_category'
|
|
||||||
@app_type_name = 'category'
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
class Admin::RoleFiltersController < OrbitBackendController
|
|
||||||
|
|
||||||
include OrbitControllerLib::DivisionForDisable
|
|
||||||
|
|
||||||
layout "new_admin"
|
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
|
||||||
before_filter :is_admin?
|
|
||||||
# before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
|
||||||
helper Admin::AttributeValuesViewHelper
|
|
||||||
|
|
||||||
def index
|
|
||||||
get_types
|
|
||||||
@role = Role.find(params[:role_id])
|
|
||||||
@role_filters = @types.where(:role_id=>params[:role_id])
|
|
||||||
@role_filter = @types.new(:display => 'List')
|
|
||||||
|
|
||||||
# @url = admin_role_filter_role_filters_path
|
|
||||||
|
|
||||||
if @app_type == 'role_statuses'
|
|
||||||
@url = eval("admin_#{@app_type}_path")
|
|
||||||
else
|
|
||||||
@url = eval("admin_#{@app_type}s_path")
|
|
||||||
end
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html # index.html.erb
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def show
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.find(params[:id])
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html # show.html.erb
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def new
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.new(:display => 'List')
|
|
||||||
|
|
||||||
@verb = :post
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html # new.html.erb
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def edit
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.find(params[:id])
|
|
||||||
|
|
||||||
@url = polymorphic_path([:admin, @role_filter])
|
|
||||||
|
|
||||||
@verb = :put
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def create
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.new(params[:role_filter])
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
if @role_filter.save
|
|
||||||
format.html { redirect_to(admin_role_filter_url(params[:role_filter][:role_id])) }
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def update
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.find(params[:id])
|
|
||||||
# debugger
|
|
||||||
# @url = admin_role_filter_role_filter_path(@role_filter)
|
|
||||||
# @url = eval("admin_role_filter_#{@app_type}_path(#{@role_filter})")
|
|
||||||
@url = polymorphic_path([:admin, @role_filter])
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
if @role_filter.update_attributes(params[:role_filter])
|
|
||||||
format.html { redirect_to(admin_role_filter_role_filters_url(params[:role_id]), :notice => t('role_filter.update_role_filter_success')) }
|
|
||||||
# format.xml { head :ok }
|
|
||||||
format.js
|
|
||||||
else
|
|
||||||
format.html { render :action => "edit" }
|
|
||||||
format.js { render :action => "edit" }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
|
|
||||||
get_types
|
|
||||||
|
|
||||||
@role_filter = @types.find(params[:id])
|
|
||||||
@role_filter.disable = @role_filter.disable ? false : true
|
|
||||||
|
|
||||||
if @role_filter.save!
|
|
||||||
respond_to do |format|
|
|
||||||
format.html { redirect_to(admin_role_filter_role_filters_url) }
|
|
||||||
# format.xml { head :ok }
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
else
|
|
||||||
flash[:error] = t("role_filter.update_failed")
|
|
||||||
format.html { render :action => "index" }
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def get_types
|
|
||||||
@types = @app_type.classify.constantize
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
class Admin::RoleStatusesController < Admin::RoleFiltersController
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@app_type = 'role_statuses'
|
|
||||||
@app_type_name = 'status'
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -28,6 +28,7 @@ class Admin::RolesController < OrbitBackendController
|
|||||||
@attribute = Role.find(params[:role_id])
|
@attribute = Role.find(params[:role_id])
|
||||||
@attribute_fields_upper_object = @attribute.sub_roles
|
@attribute_fields_upper_object = @attribute.sub_roles
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_sub_role
|
def add_sub_role
|
||||||
@@ -94,6 +95,7 @@ class Admin::RolesController < OrbitBackendController
|
|||||||
format.js { render 'add_attribute_field' }
|
format.js { render 'add_attribute_field' }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|||||||
@@ -14,16 +14,8 @@ class Admin::SitesController < OrbitBackendController
|
|||||||
# @site = Site.new
|
# @site = Site.new
|
||||||
# end
|
# end
|
||||||
|
|
||||||
def show_system_preference
|
|
||||||
@git_commit_list_file = File.new(OrbitSystemPreference::GitCommitListPath, "r") rescue nil
|
|
||||||
@db_backup_list_file = File.new(OrbitSystemPreference::ArchiveDbListPath, "r") rescue nil
|
|
||||||
@resque_logs_file = File.new(OrbitSystemPreference::ResqueLogFile, "r") rescue nil
|
|
||||||
@site = Site.first
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@site.update_attributes(params[:site])
|
@site.update_attributes(params[:site])
|
||||||
site_restart
|
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,16 @@ class Admin::TagsController < OrbitBackendController
|
|||||||
before_filter :force_order_for_visitor,:only=>[:index]
|
before_filter :force_order_for_visitor,:only=>[:index]
|
||||||
before_filter :force_order_for_user,:except => [:index]
|
before_filter :force_order_for_user,:except => [:index]
|
||||||
before_filter :for_app_sub_manager,:except => [:index]
|
before_filter :for_app_sub_manager,:except => [:index]
|
||||||
|
|
||||||
|
|
||||||
|
# layout 'new_admin'
|
||||||
|
# before_filter :authenticate_user!
|
||||||
|
# before_filter :is_admin?
|
||||||
# before_filter :set_module_app
|
# before_filter :set_module_app
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@tags = get_tags
|
get_tags
|
||||||
|
@module_app_id = @module_app.id rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@@ -17,7 +23,12 @@ class Admin::TagsController < OrbitBackendController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@tag = @module_app ? @module_app.tags.create(params[:tag]) : Tag.create(params[:tag])
|
if params[:tag][:module_app_id].blank?
|
||||||
|
@tag = Tag.create(params[:tag])
|
||||||
|
else
|
||||||
|
module_app = ModuleApp.find(params[:tag][:module_app_id])
|
||||||
|
@tag = eval("#{module_app.key.camelize}Tag").create(params[:tag])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@@ -36,12 +47,15 @@ class Admin::TagsController < OrbitBackendController
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
def get_tags
|
def get_tags
|
||||||
@tags = @module_app.blank? ? Tag.all : @module_app.tags
|
@tags = (@module_app ? @module_app.tags : Tag.all)
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_vars
|
def setup_vars
|
||||||
@module_app = ModuleApp.find(params[:module_app_id]) if params[:module_app_id]
|
@app_key = request.env['HTTP_REFERER'].split('/')[4]
|
||||||
@module_app_id = @module_app.id rescue nil
|
if @app_key
|
||||||
|
@app_key.gsub!(/[?].*/, '')
|
||||||
|
@module_app = ModuleApp.first(conditions: {:key => @app_key})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
class Admin::UserActionsController < OrbitBackendController
|
|
||||||
layout "new_admin"
|
|
||||||
before_filter :authenticate_user!
|
|
||||||
before_filter :is_admin?
|
|
||||||
def index
|
|
||||||
@user_actions = UserAction.all
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
class Admin::UsersNewInterfaceController < OrbitBackendController
|
class Admin::UsersNewInterfaceController < OrbitBackendController
|
||||||
|
|
||||||
helper MemberHelper
|
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
# before_filter :authenticate_user!
|
# before_filter :authenticate_user!
|
||||||
# before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
# before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
||||||
@@ -25,13 +23,13 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
|
|||||||
|
|
||||||
render case params[:at]
|
render case params[:at]
|
||||||
when 'summary'
|
when 'summary'
|
||||||
@users=User.not_guest_user.page(page_num).per(12).asc("_id").includes('avatar')
|
@users=User.not_guest_user.page(page_num).per(12).includes('avatar')
|
||||||
"index_summary"
|
"index_summary"
|
||||||
when 'thumbnail'
|
when 'thumbnail'
|
||||||
@users=User.not_guest_user.page(page_num).per(36).asc("_id").includes('avatar')
|
@users=User.not_guest_user.page(page_num).per(36).includes('avatar')
|
||||||
"index_thumbnail"
|
"index_thumbnail"
|
||||||
else
|
else
|
||||||
@users=User.not_guest_user.page(page_num).per(10).asc("_id").includes('avatar')
|
@users=User.not_guest_user.page(page_num).per(10).includes('avatar')
|
||||||
"index"
|
"index"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -45,7 +43,7 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
|
|||||||
@student_data = []
|
@student_data = []
|
||||||
@staff_data = []
|
@staff_data = []
|
||||||
|
|
||||||
attribute_values = @user.attribute_values.asc("_id")
|
attribute_values = @user.attribute_values
|
||||||
attribute_values.each{|att_val|
|
attribute_values.each{|att_val|
|
||||||
@profile_data.push({:name => att_val.attribute_field.title,:value =>att_val.get_value_by_locale(I18n.locale.to_s)}) if att_val.attribute_field.attribute.key=="profile" rescue false
|
@profile_data.push({:name => att_val.attribute_field.title,:value =>att_val.get_value_by_locale(I18n.locale.to_s)}) if att_val.attribute_field.attribute.key=="profile" rescue false
|
||||||
}
|
}
|
||||||
@@ -82,29 +80,21 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
# puts params.to_yaml
|
puts params.to_yaml
|
||||||
# attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
# attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
||||||
# attribute_values = params[:user].delete(attribute_values_key)
|
# attribute_values = params[:user].delete(attribute_values_key)
|
||||||
@user = User.new(params["user"])
|
@user = User.new(params["user"])
|
||||||
|
|
||||||
@checkuser = User.where(:user_id => params[:user][:user_id]).first
|
|
||||||
|
|
||||||
if !@checkuser.blank?
|
|
||||||
flash.now[:error] = t("users.user_id_error")
|
|
||||||
end
|
|
||||||
|
|
||||||
# attribute_values.to_hash.each{|key,value|
|
# attribute_values.to_hash.each{|key,value|
|
||||||
# @user.attribute_values.build(value)
|
# @user.attribute_values.build(value)
|
||||||
# }
|
# }
|
||||||
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
||||||
# binding.pry
|
# binding.pry
|
||||||
if !flash.now[:error] && @user.save
|
if @user.save
|
||||||
flash[:notice] = t('create.success.user')
|
flash[:notice] = t('create.success.user')
|
||||||
redirect_to :action => :index
|
redirect_to :action => :index
|
||||||
else
|
else
|
||||||
@user.attribute_values = nil
|
|
||||||
@form_index = 0
|
@form_index = 0
|
||||||
render :action => :new , :notice => flash.now[:error]
|
render :action => :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -121,45 +111,15 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
|
|||||||
get_info_and_roles
|
get_info_and_roles
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_passwd
|
|
||||||
# @disable_all_field = false
|
|
||||||
@user = User.find(params[:users_new_interface_id])
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
||||||
@user = User.find(params[:id])
|
@user = User.find(params[:id])
|
||||||
|
|
||||||
if params[:edit_type] == 'edit_passwd'
|
|
||||||
|
|
||||||
@checkuser = User.where(:user_id => params[:user][:user_id]).first
|
|
||||||
|
|
||||||
if !@checkuser.blank? && @checkuser.id != @user.id
|
|
||||||
flash.now[:error] = t("users.user_id_error")
|
|
||||||
elsif @user.admin && current_user.id == @user.id
|
|
||||||
flash.now[:error] = t("users.admin_change_password")
|
|
||||||
end
|
|
||||||
|
|
||||||
if !flash.now[:error] && @user.update_attributes(params[:user])
|
|
||||||
redirect_to :action => :show
|
|
||||||
else
|
|
||||||
render :action => :edit_passwd, :notice => flash.now[:error]
|
|
||||||
end
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
@user.update_attributes(params[:user])
|
@user.update_attributes(params[:user])
|
||||||
|
|
||||||
attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
||||||
attribute_values = params[:user].delete(attribute_values_key)
|
attribute_values = params[:user].delete(attribute_values_key)
|
||||||
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
||||||
@user.save
|
@user.save
|
||||||
|
|
||||||
redirect_to :action => :show
|
redirect_to :action => :show
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# # Update changes to the avatar
|
# # Update changes to the avatar
|
||||||
# @user.remove_avatar! if params[:file]
|
# @user.remove_avatar! if params[:file]
|
||||||
# @user.avatar = params[:file] if params[:file]
|
# @user.avatar = params[:file] if params[:file]
|
||||||
|
|||||||
@@ -17,19 +17,10 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
helper_attr :site_valid_locales
|
helper_attr :site_valid_locales
|
||||||
|
|
||||||
def check_backend_openness
|
|
||||||
if !Me.backend_openness_on
|
|
||||||
redirect_to '/users/sign_in' if not (authenticate_user! and is_member? )
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def site_restart
|
|
||||||
Resque.enqueue(RestartServer)
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_current_user
|
def set_current_user
|
||||||
User.current = current_or_guest_user
|
User.current = current_or_guest_user
|
||||||
UserActionRecoder.perform(current_or_guest_user,params.to_s)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def front_end_available(module_app_title='')
|
def front_end_available(module_app_title='')
|
||||||
@@ -110,10 +101,10 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Render the page
|
# Render the page
|
||||||
def render_page(args={})
|
def render_page
|
||||||
if @item
|
if @item
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :text => parse_page_content(@item,args), :layout => 'page_layout' }
|
format.html { render :text => parse_page_content(@item), :layout => 'page_layout' }
|
||||||
format.rss { render_main_rss }
|
format.rss { render_main_rss }
|
||||||
format.mobile { redirect_to mobile_path(:app => params[:app]) }
|
format.mobile { redirect_to mobile_path(:app => params[:app]) }
|
||||||
end
|
end
|
||||||
@@ -156,7 +147,7 @@ class ApplicationController < ActionController::Base
|
|||||||
# Set the site variables
|
# Set the site variables
|
||||||
def set_site
|
def set_site
|
||||||
# set site if exist or create site
|
# set site if exist or create site
|
||||||
@site = Site.first || Site.create({:valid_locales => VALID_LOCALES, :in_use_locales => VALID_LOCALES})
|
@site = Site.first || Site.create({:valid_locales => [], :in_use_locales => []})
|
||||||
session[:site] = @site.id
|
session[:site] = @site.id
|
||||||
@site_in_use_locales = site_locales_default_head(@site.in_use_locales)
|
@site_in_use_locales = site_locales_default_head(@site.in_use_locales)
|
||||||
@site_valid_locales = site_locales_default_head(@site.valid_locales)
|
@site_valid_locales = site_locales_default_head(@site.valid_locales)
|
||||||
@@ -229,174 +220,6 @@ class ApplicationController < ActionController::Base
|
|||||||
redirect_to ret
|
redirect_to ret
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_sorted_and_filtered(object_class, query = nil, objects = nil)
|
|
||||||
objects ||= get_objects(object_class, query)
|
|
||||||
object_class = object_class.classify.constantize
|
|
||||||
if !params[:sort].blank?
|
|
||||||
options = params[:sort_options]
|
|
||||||
options = [options] if !options.class.eql?(Array)
|
|
||||||
options.each do |option|
|
|
||||||
if object_class.fields.include?(option)
|
|
||||||
if object_class.fields[option].type.to_s.eql?('Object') && !object_class.relations[option].nil?
|
|
||||||
objects = get_objects_from_referenced_objects(object_class.fields[option].options[:class_name].constantize, objects, option)
|
|
||||||
else
|
|
||||||
(objects = objects.order_by(option, params[:direction])) rescue nil
|
|
||||||
end
|
|
||||||
elsif object_class.relations.include?(option)
|
|
||||||
case object_class.relations[option].macro
|
|
||||||
when :references_one
|
|
||||||
a = Array.new
|
|
||||||
objects.each { |object| a << [get_string_value_from_object(object), object] }
|
|
||||||
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
|
||||||
objects = sorted.collect {|x| x[1] }
|
|
||||||
when :references_many, :references_and_referenced_in_many
|
|
||||||
objects = get_objects_from_self(object_class, objects, option)
|
|
||||||
when :referenced_in
|
|
||||||
objects = get_objects_from_referenced_objects(object_class.relations[option].class_name.constantize, objects, "#{option}_id")
|
|
||||||
end
|
|
||||||
elsif option.eql?('tags')
|
|
||||||
tag_array = @module_app.tags.inject([]){ |result, value|
|
|
||||||
result << [value.name, value]
|
|
||||||
}
|
|
||||||
params[:direction].eql?('asc') ? tag_array.sort : tag_array.sort.reverse!
|
|
||||||
sorted_objects = Array.new
|
|
||||||
tag_array.each do |x|
|
|
||||||
taggings = x[1].taggings
|
|
||||||
taggings.each {|tagging| sorted_objects << tagging.taggable }
|
|
||||||
end
|
|
||||||
# debugger
|
|
||||||
sorted_objects.flatten!
|
|
||||||
sorted_objects.uniq!
|
|
||||||
objects = get_with_nil(objects, option, sorted_objects)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if @filter
|
|
||||||
@filter.each do |key, value|
|
|
||||||
case key
|
|
||||||
when 'status'
|
|
||||||
a = Array.new
|
|
||||||
objects.each do |object|
|
|
||||||
value.each do |v|
|
|
||||||
a << object if object[v]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
objects = a.uniq
|
|
||||||
when 'categories'
|
|
||||||
a = Array.new
|
|
||||||
objects.each do |object|
|
|
||||||
a << object if (value.include?(object.send("#{object.class.to_s.underscore}_category").id.to_s) rescue nil)
|
|
||||||
end
|
|
||||||
objects = a.uniq
|
|
||||||
when 'tags'
|
|
||||||
a = Array.new
|
|
||||||
objects.each do |object|
|
|
||||||
object.tags.each do |tag|
|
|
||||||
a << object if value.include?(tag.id.to_s)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
objects = a.uniq
|
|
||||||
end if value.size > 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_viewable(object_class, query=nil)
|
|
||||||
objects = get_objects(object_class,query).order_by(:created_at, :desc)
|
|
||||||
Kaminari.paginate_array(objects).page(params[:page]).per(10)
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_objects(object_class, query=nil)
|
|
||||||
object_class = object_class.classify.constantize
|
|
||||||
# debugger
|
|
||||||
# a=1
|
|
||||||
if query
|
|
||||||
if object_class.include?(Mongoid::Sortable)
|
|
||||||
objects = object_class.default_sort(params[:sort]).where(query)
|
|
||||||
else
|
|
||||||
objects = object_class.where(query)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if object_class.include?(Mongoid::Sortable)
|
|
||||||
objects = object_class.default_sort(params[:sort]).all
|
|
||||||
else
|
|
||||||
objects = object_class.all
|
|
||||||
end
|
|
||||||
end
|
|
||||||
objects
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_objects_from_referenced_objects(object_class, objects, option)
|
|
||||||
referer_ids = objects.distinct(option)
|
|
||||||
referenced_objects = object_class.find(referer_ids) rescue nil
|
|
||||||
if referenced_objects
|
|
||||||
a = Array.new
|
|
||||||
referenced_objects.to_a.each { |referer| a << [get_string_value_from_object(referer), referer.id] }
|
|
||||||
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
|
||||||
sorted_objects = sorted.collect {|x| objects.where(option => x[1]).entries }
|
|
||||||
sorted_objects.flatten!
|
|
||||||
sorted_objects.uniq!
|
|
||||||
get_with_nil(objects, option, sorted_objects)
|
|
||||||
else
|
|
||||||
objects
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_objects_from_self(object_class, objects, option)
|
|
||||||
referenced_class = object_class.relations[option].class_name.constantize
|
|
||||||
referenced_objects = referenced_class.all rescue nil
|
|
||||||
if referenced_objects
|
|
||||||
reverse_relation = nil
|
|
||||||
referenced_class.relations.each { |relation| reverse_relation = relation[1].name.to_s if relation[1].class_name.eql?(object_class.to_s) }
|
|
||||||
a = Array.new
|
|
||||||
referenced_objects.each { |referenced_object| a << [get_string_value_from_object(referenced_object), referenced_object] }
|
|
||||||
a.compact!
|
|
||||||
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
|
||||||
sorted_objects = Array.new
|
|
||||||
sorted.each {|x| sorted_objects << x[1].send(reverse_relation) }
|
|
||||||
sorted_objects.flatten!
|
|
||||||
sorted_objects.uniq!
|
|
||||||
get_with_nil(objects, option, sorted_objects)
|
|
||||||
else
|
|
||||||
objects
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_string_value_from_object(object)
|
|
||||||
s = object.name_translations[I18n.locale.to_s] unless s rescue nil
|
|
||||||
s = object.title_translations[I18n.locale.to_s] unless s rescue nil
|
|
||||||
s = object.name unless s rescue nil
|
|
||||||
s = object.title unless s rescue nil
|
|
||||||
s.downcase rescue ''
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_with_nil(objects, option, sorted_objects)
|
|
||||||
tmp = Array.new
|
|
||||||
objects.each { |object| tmp << [get_string_value_from_object(object), object] if (object.send(option).blank? || (object.send(option).size == 0 rescue nil)) }
|
|
||||||
sorted = params[:direction].eql?('asc') ? tmp.sort : tmp.sort.reverse!
|
|
||||||
sorted_tmp = sorted.collect {|a| a[1] }
|
|
||||||
a = params[:direction].eql?('asc') ? (sorted_tmp + sorted_objects) : (sorted_objects + sorted_tmp)
|
|
||||||
a.flatten
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def filter_authorized_objects(objects)
|
|
||||||
if(!is_admin? || !is_manager?)
|
|
||||||
objects.delete_if{ |object|
|
|
||||||
if object.is_pending == true
|
|
||||||
if check_permission(:manager)
|
|
||||||
object.create_user_id != current_user.id
|
|
||||||
else
|
|
||||||
!object.send("#{object.class.to_s.underscore}_category").authed_users('fact_check').include?(current_user) rescue false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
objects
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -12,65 +12,52 @@ class DefaultWidgetController< OrbitWidgetController
|
|||||||
|
|
||||||
def query_for_default_widget
|
def query_for_default_widget
|
||||||
|
|
||||||
@ori_class_name = @default_widget["query"].split('.')[0]
|
ori_class_name = @default_widget["query"].split('.')[0]
|
||||||
result = nil
|
result = nil
|
||||||
result_objects = nil
|
result_objects = nil
|
||||||
|
|
||||||
if !params["tag_id"].blank?
|
if !params["tag_id"].blank?
|
||||||
|
@tags = Tag.find(params["tag_id"]) rescue nil
|
||||||
|
result_ids = nil
|
||||||
|
|
||||||
|
result_ids = @tags.collect{|tag| tag.send(ori_class_name.downcase.pluralize).entries.collect{|t| t.id}}
|
||||||
if params["category_id"].blank? #has tag no cate
|
if params["category_id"].blank? #has tag no cate
|
||||||
result = @ori_class_name.constantize.where(:tagged_ids.in => params["tag_id"])
|
#nothing
|
||||||
else #has tag and cate
|
else #has tag and cate
|
||||||
result = eval("#{@ori_class_name}.where(:#{get_category_field_name}.in=>params['category_id'], :tagged_ids.in => params['tag_id'])")
|
# result_ids = @tags.collect{|tag| tag.send(ori_class_name.downcase.pluralize).where(:#{get_category_field_name(ori_class_name)}.in=>params["category_id"]).available_for_lang(I18n.locale).can_display.collect{|t| t.id}}.flatten
|
||||||
|
result_ids << eval("#{ori_class_name}.where(:#{get_category_field_name(ori_class_name)}.in=>params['category_id']).entries.collect{|t| t.id}")
|
||||||
|
result_ids.flatten!
|
||||||
|
|
||||||
end
|
end
|
||||||
|
result = eval("#{ori_class_name}.where(:id=>result_ids)")
|
||||||
elsif params["category_id"].blank? #no tag no cate
|
elsif params["category_id"].blank? #no tag no cate
|
||||||
result = eval(@default_widget["query"])
|
result = eval(@default_widget["query"])
|
||||||
else #no tag has cate
|
else #no tag has cate
|
||||||
result = eval("#{@ori_class_name}.where(:#{get_category_field_name}.in=>params['category_id'])")
|
result = eval("#{ori_class_name}.where(:#{get_category_field_name(ori_class_name)}.in=>params['category_id'])")
|
||||||
end
|
end
|
||||||
result.available_for_lang(I18n.locale).can_display.desc(:is_top, :postdate)
|
date_now = Time.now
|
||||||
end
|
result.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, :postdate)
|
||||||
|
|
||||||
def search_result
|
|
||||||
@search = query_for_default_widget.solr_search do
|
|
||||||
fulltext params[:search_query]
|
|
||||||
end
|
|
||||||
search_result = @search.results.collect{|result| result.id}
|
|
||||||
@items = eval(@ori_class_name).all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_widget
|
def default_widget
|
||||||
@search = params["search_query"].blank? ? false : true
|
|
||||||
if !params[:id].blank?
|
if !params[:id].blank?
|
||||||
clicked_field_name = params["clicked_field_name"].to_sym
|
redirect_to eval("#{@page_part.module_app.widget_fields_link_method[:title][:method]}('#{params[:id]}', {inner: #{params[:inner] || true}})")
|
||||||
redirect_to eval("#{@page_part.module_app.widget_fields_link_method[clicked_field_name][:method]}('#{params[:id]}', {inner: #{params[:inner] || true}})")
|
|
||||||
else
|
else
|
||||||
@tag_class = nil
|
@tag_class = nil
|
||||||
@default_widget = @page_part.module_app.get_default_widget
|
@default_widget = @page_part.module_app.get_default_widget
|
||||||
@widget_image_field = @default_widget["image"] || @default_widget[:image]
|
@widget_image_field = @default_widget["image"] || @default_widget[:image]
|
||||||
case @page_part
|
case @page_part
|
||||||
when Page
|
when Page
|
||||||
@frontend_field_names = @page_part.frontend_field_name
|
@fields = @page_part.frontend_field
|
||||||
@frontend_classes = @page_part.frontend_class
|
|
||||||
@frontend_sat_to_links = @page_part.frontend_sat_to_link
|
|
||||||
|
|
||||||
@data_limit = @page_part.frontend_data_count.is_a?(Fixnum) ? @page_part.frontend_data_count : (@page_part.frontend_data_count.to_i rescue 3)
|
@data_limit = @page_part.frontend_data_count.is_a?(Fixnum) ? @page_part.frontend_data_count : (@page_part.frontend_data_count.to_i rescue 3)
|
||||||
@paginate = true
|
@paginate = true
|
||||||
@page_id = @page_part.id
|
@page_id = @page_part.id
|
||||||
when PagePart
|
when PagePart
|
||||||
@frontend_field_names = @page_part.widget_field_name
|
|
||||||
@frontend_classes = @page_part.widget_class
|
|
||||||
@frontend_sat_to_links = @page_part.widget_sat_to_link
|
|
||||||
|
|
||||||
@fields = @page_part.widget_field
|
@fields = @page_part.widget_field
|
||||||
@data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3)
|
@data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3)
|
||||||
end
|
end
|
||||||
|
if @paginate
|
||||||
if @paginate || @search
|
|
||||||
if @search
|
|
||||||
@data = search_result.page(params[:page_main]).per(@data_limit) rescue []
|
|
||||||
else #regular listing
|
|
||||||
@data = query_for_default_widget.includes(@widget_image_field).page(params[:page_main]).per(@data_limit)
|
@data = query_for_default_widget.includes(@widget_image_field).page(params[:page_main]).per(@data_limit)
|
||||||
end
|
|
||||||
# @data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field)
|
# @data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field)
|
||||||
else
|
else
|
||||||
@data = query_for_default_widget.includes(@widget_image_field).limit(@data_limit)
|
@data = query_for_default_widget.includes(@widget_image_field).limit(@data_limit)
|
||||||
@@ -90,9 +77,9 @@ class DefaultWidgetController< OrbitWidgetController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_category_field_name
|
def get_category_field_name(ori_class_name)
|
||||||
@ori_class_name = @ori_class_name.constantize
|
ori_class_name = ori_class_name.constantize
|
||||||
@ori_class_name.fields.each_key do |key|
|
ori_class_name.fields.each_key do |key|
|
||||||
return key if key.include?('category_id')
|
return key if key.include?('category_id')
|
||||||
end
|
end
|
||||||
nil
|
nil
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
class DesktopAppsController < OrbitBackendController
|
|
||||||
require "net/http"
|
|
||||||
require "uri"
|
|
||||||
require 'zip/zip'
|
|
||||||
|
|
||||||
def index
|
|
||||||
@desktopapps = DesktopApp.all
|
|
||||||
end
|
|
||||||
|
|
||||||
def upload
|
|
||||||
if !params[:desktop_app].nil?
|
|
||||||
temp_file = Tempfile.new("temp_file");
|
|
||||||
original_file = params[:desktop_app][:package_file]
|
|
||||||
temp_file.write(original_file.read.force_encoding("UTF-8"))
|
|
||||||
temp_file.rewind
|
|
||||||
filename = File.basename(original_file.original_filename,".zip")
|
|
||||||
unzip_app(temp_file,filename)
|
|
||||||
temp_file.close
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def unzip_app(file, zip_name)
|
|
||||||
Zip::ZipFile.open(file) { |zip_file|
|
|
||||||
da = DesktopApp.new.from_json(zip_file.read("#{zip_name}/settings.json"))
|
|
||||||
Dir.mktmpdir('f_path') { |dir|
|
|
||||||
images_entries = []
|
|
||||||
zip_file.entries.each do |entry|
|
|
||||||
case (path = entry.to_s)
|
|
||||||
when /\A(#{zip_name})\/(images)\/.*((\.jpg)|(\.png)|(\.gif))\z/ #for img
|
|
||||||
images_entries << entry
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
images_entries.each do |image|
|
|
||||||
da.images.build(:file => get_temp_file(zip_file,dir,image))
|
|
||||||
end
|
|
||||||
}
|
|
||||||
da.save
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_temp_file(zip_file, dir, entry)
|
|
||||||
filename = File.basename(entry.to_s)
|
|
||||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
|
||||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
|
||||||
temp_file
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -31,7 +31,7 @@ class DesktopController< ApplicationController
|
|||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_themes
|
def themes
|
||||||
@themes = DesktopTheme.all
|
@themes = DesktopTheme.all
|
||||||
# raise @themes.inspect
|
# raise @themes.inspect
|
||||||
render "desktop/settings/themes", :layout => false
|
render "desktop/settings/themes", :layout => false
|
||||||
@@ -42,7 +42,6 @@ class DesktopController< ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def connections
|
def connections
|
||||||
@url = "http://fb.tp.rulingcom.com/login?callback=http://harry.tp.rulingcom.com/facebook/register_fb?user="+current_user.id.to_s
|
|
||||||
render "desktop/settings/connections", :layout => false
|
render "desktop/settings/connections", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -108,19 +107,18 @@ class DesktopController< ApplicationController
|
|||||||
def getgroups
|
def getgroups
|
||||||
@section = Section.find(params["sectionid"])
|
@section = Section.find(params["sectionid"])
|
||||||
@groups = @section.groups
|
@groups = @section.groups
|
||||||
|
|
||||||
gr = Array.new
|
gr = Array.new
|
||||||
@groups.each do |group|
|
@groups.each do |group|
|
||||||
a = Array.new
|
a = Array.new
|
||||||
@t = group.tiles
|
t = group.tiles
|
||||||
|
t.each do |tile|
|
||||||
@t.each do |tile|
|
|
||||||
data_content = ""
|
data_content = ""
|
||||||
jsfile = []
|
jsfile = []
|
||||||
cssfile = ""
|
cssfile = ""
|
||||||
shape = "w1 h1"
|
shape = "w1 h1"
|
||||||
link = ""
|
|
||||||
icon= ""
|
|
||||||
fullsize = false
|
fullsize = false
|
||||||
|
link = ""
|
||||||
if tile.data_category == "widget"
|
if tile.data_category == "widget"
|
||||||
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
||||||
# data_content = widge.widget_layout.file
|
# data_content = widge.widget_layout.file
|
||||||
@@ -129,17 +127,21 @@ class DesktopController< ApplicationController
|
|||||||
cssfile = widge.css_default.file.as_json[:file]
|
cssfile = widge.css_default.file.as_json[:file]
|
||||||
shape = widge.shape
|
shape = widge.shape
|
||||||
title = widge.name
|
title = widge.name
|
||||||
icon = widge.images.where(:name => widge.icon).first.file.url
|
|
||||||
# binding.pry
|
# binding.pry
|
||||||
|
if not widge.fullsize.nil?
|
||||||
fullsize = widge.fullsize
|
fullsize = widge.fullsize
|
||||||
else
|
|
||||||
app = DesktopApp.find(tile.desktop_app_id.to_s)
|
|
||||||
title = app.name
|
|
||||||
link = app.url
|
|
||||||
icon = app.images.where(:name => app.icon).first.file.url
|
|
||||||
|
|
||||||
end
|
end
|
||||||
gr << {"id"=>tile.id,"data_category"=>tile.data_category,"data_content"=>data_content,"js"=>jsfile,"css"=>cssfile,"shape"=>shape,"position"=>tile.position,"row"=>tile.row,"column"=>tile.column, "title"=>title,"fullsize"=>fullsize,"link"=>link,"icon"=>icon}
|
else
|
||||||
|
data_content = tile.data_content
|
||||||
|
title = tile.title
|
||||||
|
case data_content
|
||||||
|
when "envocab"
|
||||||
|
link = "http://www.english-vocabulary.eu/"
|
||||||
|
when "wikibooks"
|
||||||
|
link = "http://www.wikibooks.org"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gr << {"id"=>tile.id,"data_category"=>tile.data_category,"data_content"=>data_content,"js"=>jsfile,"css"=>cssfile,"shape"=>shape,"position"=>tile.position,"row"=>tile.row,"column"=>tile.column, "title"=>title,"fullsize"=>fullsize,"link"=>link}
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -150,11 +152,9 @@ class DesktopController< ApplicationController
|
|||||||
|
|
||||||
def widget_layout
|
def widget_layout
|
||||||
widget = DesktopWidget.find(params[:id])
|
widget = DesktopWidget.find(params[:id])
|
||||||
# link = '<link href="'+widget.css_default.file.to_s+'" media="screen" rel="stylesheet" type="text/css" />'
|
link = '<link href="'+widget.css_default.file.to_s+'" media="screen" rel="stylesheet" type="text/css" />'
|
||||||
css = widget.css_default.content;
|
|
||||||
css = "<style>" + css + "</style>"
|
|
||||||
content = widget.widget_layout.body
|
content = widget.widget_layout.body
|
||||||
dhtml = css + content
|
dhtml = link + content
|
||||||
render :text => dhtml.html_safe
|
render :text => dhtml.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -195,46 +195,6 @@ class DesktopController< ApplicationController
|
|||||||
render :json=>a.to_json
|
render :json=>a.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def getapplistforManager
|
|
||||||
@dwss = DesktopWidget.all
|
|
||||||
@dapps = DesktopApp.all
|
|
||||||
@tiles = Array.new
|
|
||||||
desktop = Desktop.find(params['desktopid'])
|
|
||||||
sections = desktop.sections
|
|
||||||
sections.each do |section|
|
|
||||||
groups = section.groups
|
|
||||||
groups.each do |group|
|
|
||||||
@tiles += group.tiles
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@validtiles = Array.new
|
|
||||||
@allWidgets = Array.new
|
|
||||||
@dwss.each do |dw|
|
|
||||||
@id = dw.id
|
|
||||||
@validtiles = @tiles.select{|t| t.desktop_widget_id == @id}
|
|
||||||
@sections = Array.new
|
|
||||||
@validtiles.each do |vt|
|
|
||||||
grp = Group.find(vt.group_id)
|
|
||||||
sec = Section.find(grp.section_id);
|
|
||||||
@sections << {"id"=>sec.id,"name"=>sec.name}
|
|
||||||
end
|
|
||||||
@allWidgets << {"id"=>dw.id, "data_category"=> "widget","title" => dw.name, "version" => dw.version, "author"=>dw.author, "last_update"=>dw.updated_at, "icon"=>dw.images.where(:name=>dw.icon).first.file.url, "text_color" => dw.text_color, "background" => dw.bg_color, "sections" => @sections}
|
|
||||||
end
|
|
||||||
validtiles = Array.new
|
|
||||||
@dapps.each do |da|
|
|
||||||
@id = da.id
|
|
||||||
@validtiles = @tiles.select{|t| t.desktop_app_id == @id}
|
|
||||||
@sections = Array.new
|
|
||||||
@validtiles.each do |vt|
|
|
||||||
grp = Group.find(vt.group_id)
|
|
||||||
sec = Section.find(grp.section_id);
|
|
||||||
@sections << {"id"=>sec.id,"name"=>sec.name}
|
|
||||||
end
|
|
||||||
@allWidgets << {"id"=>da.id, "data_category"=> "app","title" => da.name, "version" => da.version, "author"=>da.author, "last_update"=>da.updated_at, "icon"=>da.images.where(:name=>da.icon).first.file.url, "sections" => @sections}
|
|
||||||
end
|
|
||||||
render :json=>@allWidgets.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
def newpositions
|
def newpositions
|
||||||
@newpositions = params[:newpositions]
|
@newpositions = params[:newpositions]
|
||||||
|
|
||||||
@@ -277,47 +237,4 @@ class DesktopController< ApplicationController
|
|||||||
render :xml=>feed
|
render :xml=>feed
|
||||||
end
|
end
|
||||||
|
|
||||||
def appactivation
|
|
||||||
@group = Section.find(params[:section_id]).groups.first
|
|
||||||
@type = params[:type]
|
|
||||||
if @type == "widget"
|
|
||||||
@widget = DesktopWidget.find(params[:id])
|
|
||||||
status = params[:status]
|
|
||||||
|
|
||||||
case status
|
|
||||||
when "true"
|
|
||||||
tile = Tile.new(data_category: "widget", position: 8, desktop_widget_id: @widget.id)
|
|
||||||
@group.tiles+=[tile]
|
|
||||||
@group.save
|
|
||||||
when "false"
|
|
||||||
tile = @group.tiles.where("desktop_widget_id"=>@widget.id).first
|
|
||||||
if tile != nil
|
|
||||||
tile.destroy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if @type == "app"
|
|
||||||
@app = DesktopApp.find(params[:id])
|
|
||||||
status = params[:status]
|
|
||||||
case status
|
|
||||||
when "true"
|
|
||||||
tile = Tile.new(data_category: "app", position: 8, desktop_app_id: @app.id)
|
|
||||||
@group.tiles+=[tile]
|
|
||||||
@group.save
|
|
||||||
when "false"
|
|
||||||
tile = @group.tiles.where("desktop_app_id"=>@app.id).first
|
|
||||||
if tile != nil
|
|
||||||
tile.destroy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
b = Array.new
|
|
||||||
b = {"success"=>"true"}
|
|
||||||
render :json=>b.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
class DesktopThemesController < OrbitBackendController
|
|
||||||
require "net/http"
|
|
||||||
require "uri"
|
|
||||||
require 'zip/zip'
|
|
||||||
|
|
||||||
def index
|
|
||||||
@desktopThemes = DesktopTheme.all
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
dt = DesktopTheme.find(params[:id])
|
|
||||||
dt.destroy
|
|
||||||
redirect_to desktop_theme_path
|
|
||||||
end
|
|
||||||
|
|
||||||
def upload
|
|
||||||
if !params[:desktop_theme].nil?
|
|
||||||
temp_file = Tempfile.new("temp_file")
|
|
||||||
original_file = params[:desktop_theme][:package_file]
|
|
||||||
#if original_file.content_type == 'application/zip'
|
|
||||||
temp_file.write(original_file.read.force_encoding('UTF-8'))
|
|
||||||
temp_file.rewind
|
|
||||||
filename = File.basename(original_file.original_filename,".zip")
|
|
||||||
unzip_widget(temp_file, filename)
|
|
||||||
#else
|
|
||||||
# flash[:error] = "Upload file should be in zip format"
|
|
||||||
#end
|
|
||||||
temp_file.close
|
|
||||||
end
|
|
||||||
end
|
|
||||||
def edit
|
|
||||||
@dw = DesktopWidget.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def unzip_widget(file, zip_name)
|
|
||||||
Zip::ZipFile.open(file) { |zip_file|
|
|
||||||
dt = DesktopTheme.new.from_json(zip_file.read("#{zip_name}/settings.json"))
|
|
||||||
Dir.mktmpdir('f_path') { |dir|
|
|
||||||
images_entries = []
|
|
||||||
zip_file.entries.each do |entry|
|
|
||||||
case (path = entry.to_s)
|
|
||||||
when /\A(#{zip_name})\/(theme\.css)\z/
|
|
||||||
#for default css
|
|
||||||
dt.build_css_default(:file => get_temp_file(zip_file, dir, entry))
|
|
||||||
when /\A(#{zip_name})\/(background)\/.*((\.jpg)|(\.png)|(\.gif))\z/ #for img
|
|
||||||
images_entries << entry
|
|
||||||
end
|
|
||||||
end
|
|
||||||
images_entries.each do |image|
|
|
||||||
dt.images.build(:file => get_temp_file(zip_file,dir,image))
|
|
||||||
end
|
|
||||||
}
|
|
||||||
dt.save
|
|
||||||
}
|
|
||||||
end
|
|
||||||
def get_temp_file(zip_file, dir, entry)
|
|
||||||
filename = File.basename(entry.to_s)
|
|
||||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
|
||||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
|
||||||
temp_file
|
|
||||||
end
|
|
||||||
|
|
||||||
def settings
|
|
||||||
if params[:id] == "custom"
|
|
||||||
@id = DesktopTheme.first.id.to_s
|
|
||||||
else
|
|
||||||
@id = params[:id]
|
|
||||||
end
|
|
||||||
dt = DesktopTheme.find(@id)
|
|
||||||
if !dt.nil?
|
|
||||||
dt['css'] = dt.css_default.file.url
|
|
||||||
dt['background'] = dt.images.where(:name=>dt.background).first.file.url
|
|
||||||
end
|
|
||||||
icons = DesktopTheme::ICONS
|
|
||||||
dt['icons'] = icons
|
|
||||||
|
|
||||||
render :json => dt.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4,7 +4,6 @@ class DesktopWidgetsController < OrbitBackendController
|
|||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@desktopWidgets = DesktopWidget.all
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload
|
def upload
|
||||||
@@ -22,19 +21,6 @@ class DesktopWidgetsController < OrbitBackendController
|
|||||||
temp_file.close
|
temp_file.close
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def edit
|
|
||||||
@dw = DesktopWidget.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
|
||||||
@dw = DesktopWidget.find(params[:id])
|
|
||||||
if(params[:desktop_widget])
|
|
||||||
@imagefile = params[:desktop_widget][:image]
|
|
||||||
@dw.images.build(:file => @imagefile)
|
|
||||||
@dw.save
|
|
||||||
end
|
|
||||||
redirect_to action: "index"
|
|
||||||
end
|
|
||||||
|
|
||||||
def unzip_widget(file, zip_name)
|
def unzip_widget(file, zip_name)
|
||||||
Zip::ZipFile.open(file) { |zip_file|
|
Zip::ZipFile.open(file) { |zip_file|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
require "net/http"
|
|
||||||
require "uri"
|
|
||||||
require 'json'
|
|
||||||
|
|
||||||
class FacebookController< ApplicationController
|
|
||||||
|
|
||||||
def register_fb
|
|
||||||
user = User.find(params[:user])
|
|
||||||
if !user.facebook
|
|
||||||
user.build_facebook(fb_identifier: params[:identifier],connected: true)
|
|
||||||
user.save!
|
|
||||||
end
|
|
||||||
render :json=>{"success"=>true,"user"=>user.facebook.fb_identifier}.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_friends
|
|
||||||
@url = "http://fb.tp.rulingcom.com/get_friends?identifier=" + current_user.facebook.fb_identifier
|
|
||||||
uri = URI.parse(@url)
|
|
||||||
http = Net::HTTP.new(uri.host, uri.port)
|
|
||||||
request = Net::HTTP::Get.new(uri.request_uri)
|
|
||||||
response = http.request(request)
|
|
||||||
friends = response.body
|
|
||||||
friends = JSON.parse(friends)
|
|
||||||
output = Array.new
|
|
||||||
friends.each do |friend|
|
|
||||||
output << friend['name']
|
|
||||||
end
|
|
||||||
render :json=>{"count"=>friends.count,"friends"=>output}.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -38,11 +38,6 @@ class FrontController < ApplicationController
|
|||||||
@ad_images = AdImage.all
|
@ad_images = AdImage.all
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_tag_cloud
|
|
||||||
module_app = ModuleApp.find(params[:id]) rescue nil
|
|
||||||
@tags = module_app.sorted_tags_for_cloud
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def menu_level(page, current_page, current, menu)
|
def menu_level(page, current_page, current, menu)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
class OrbitBackendController < ApplicationController
|
class OrbitBackendController < ApplicationController
|
||||||
include OrbitCoreLib::AppBackendUtility
|
include OrbitCoreLib::AppBackendUtility
|
||||||
include OrbitCoreLib::PermissionUtility
|
include OrbitCoreLib::PermissionUtility
|
||||||
include OrbitTag::Tagging
|
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
|
|
||||||
@@ -16,7 +15,6 @@ class OrbitBackendController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def force_order_for_visitor
|
def force_order_for_visitor
|
||||||
check_backend_openness
|
|
||||||
setup_vars
|
setup_vars
|
||||||
set_current_user
|
set_current_user
|
||||||
end
|
end
|
||||||
@@ -35,4 +33,152 @@ class OrbitBackendController < ApplicationController
|
|||||||
redirect_to root_url
|
redirect_to root_url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_sorted_and_filtered(object_class, query=nil)
|
||||||
|
objects = get_objects(object_class, query)
|
||||||
|
object_class = object_class.classify.constantize
|
||||||
|
if !params[:sort].blank?
|
||||||
|
options = params[:sort_options]
|
||||||
|
options = [options] if !options.class.eql?(Array)
|
||||||
|
options.each do |option|
|
||||||
|
if object_class.fields.include?(option)
|
||||||
|
if object_class.fields[option].type.to_s.eql?('Object') && !object_class.relations[option].nil?
|
||||||
|
objects = get_objects_from_referenced_objects(object_class.fields[option].options[:class_name].constantize, objects, option)
|
||||||
|
else
|
||||||
|
(objects = objects.order_by(option, params[:direction])) rescue nil
|
||||||
|
end
|
||||||
|
elsif object_class.relations.include?(option)
|
||||||
|
case object_class.relations[option].macro
|
||||||
|
when :references_one
|
||||||
|
a = Array.new
|
||||||
|
objects.each { |object| a << [get_string_value_from_object(object), object] }
|
||||||
|
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
||||||
|
objects = sorted.collect {|x| x[1] }
|
||||||
|
when :references_many, :references_and_referenced_in_many
|
||||||
|
objects = get_objects_from_self(object_class, objects, option)
|
||||||
|
when :referenced_in
|
||||||
|
objects = get_objects_from_referenced_objects(object_class.relations[option].class_name.constantize, objects, "#{option}_id")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if @filter
|
||||||
|
@filter.each do |key, value|
|
||||||
|
case key
|
||||||
|
when 'status'
|
||||||
|
a = Array.new
|
||||||
|
objects.each do |object|
|
||||||
|
value.each do |v|
|
||||||
|
a << object if object[v]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
objects = a.uniq
|
||||||
|
when 'categories'
|
||||||
|
a = Array.new
|
||||||
|
objects.each do |object|
|
||||||
|
a << object if (value.include?(object.send("#{object.class.to_s.underscore}_category").id.to_s) rescue nil)
|
||||||
|
end
|
||||||
|
objects = a.uniq
|
||||||
|
when 'tags'
|
||||||
|
a = Array.new
|
||||||
|
objects.each do |object|
|
||||||
|
object.tags.each do |tag|
|
||||||
|
a << object if value.include?(tag.id.to_s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
objects = a.uniq
|
||||||
|
end if value.size > 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_string_value_from_object(object)
|
||||||
|
s = object.name_translations[I18n.locale.to_s] unless s rescue nil
|
||||||
|
s = object.title_translations[I18n.locale.to_s] unless s rescue nil
|
||||||
|
s = object.name unless s rescue nil
|
||||||
|
s = object.title unless s rescue nil
|
||||||
|
s.downcase rescue ''
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_objects_from_referenced_objects(object_class, objects, option)
|
||||||
|
referer_ids = objects.distinct(option)
|
||||||
|
referenced_objects = object_class.find(referer_ids) rescue nil
|
||||||
|
if referenced_objects
|
||||||
|
a = Array.new
|
||||||
|
referenced_objects.to_a.each { |referer| a << [get_string_value_from_object(referer), referer.id] }
|
||||||
|
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
||||||
|
sorted_objects = sorted.collect {|x| objects.where(option => x[1]).entries }
|
||||||
|
sorted_objects.flatten!
|
||||||
|
sorted_objects.uniq!
|
||||||
|
get_with_nil(objects, option, sorted_objects)
|
||||||
|
else
|
||||||
|
objects
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_objects_from_self(object_class, objects, option)
|
||||||
|
referenced_class = object_class.relations[option].class_name.constantize
|
||||||
|
referenced_objects = referenced_class.all rescue nil
|
||||||
|
if referenced_objects
|
||||||
|
reverse_relation = nil
|
||||||
|
referenced_class.relations.each { |relation| reverse_relation = relation[1].name.to_s if relation[1].class_name.eql?(object_class.to_s) }
|
||||||
|
a = Array.new
|
||||||
|
referenced_objects.each { |referenced_object| a << [get_string_value_from_object(referenced_object), referenced_object] }
|
||||||
|
a.compact!
|
||||||
|
sorted = params[:direction].eql?('asc') ? a.sort : a.sort.reverse!
|
||||||
|
sorted_objects = Array.new
|
||||||
|
sorted.each {|x| sorted_objects << x[1].send(reverse_relation) }
|
||||||
|
sorted_objects.flatten!
|
||||||
|
sorted_objects.uniq!
|
||||||
|
get_with_nil(objects, option, sorted_objects)
|
||||||
|
else
|
||||||
|
objects
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_with_nil(objects, option, sorted_objects)
|
||||||
|
tmp = Array.new
|
||||||
|
objects.each { |object| tmp << [get_string_value_from_object(object), object] if (object.send(option).blank? || (object.send(option).size == 0 rescue nil)) }
|
||||||
|
sorted = params[:direction].eql?('asc') ? tmp.sort : tmp.sort.reverse!
|
||||||
|
sorted_tmp = sorted.collect {|a| a[1] }
|
||||||
|
a = params[:direction].eql?('asc') ? (sorted_tmp + sorted_objects) : (sorted_objects + sorted_tmp)
|
||||||
|
a.flatten
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_viewable(object_class, query=nil)
|
||||||
|
objects = get_objects(object_class,query).order_by(:created_at, :desc)
|
||||||
|
Kaminari.paginate_array(objects).page(params[:page]).per(10)
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_objects(object_class, query=nil)
|
||||||
|
object_class = object_class.classify.constantize
|
||||||
|
# debugger
|
||||||
|
# a=1
|
||||||
|
if query
|
||||||
|
objects = object_class.where(query)
|
||||||
|
else
|
||||||
|
objects = object_class.all
|
||||||
|
end
|
||||||
|
objects
|
||||||
|
end
|
||||||
|
|
||||||
|
def filter_authorized_objects(objects)
|
||||||
|
if(!is_admin? || !is_manager?)
|
||||||
|
objects.delete_if{ |object|
|
||||||
|
if object.is_pending == true
|
||||||
|
if check_permission(:manager)
|
||||||
|
object.create_user_id != current_user.id
|
||||||
|
else
|
||||||
|
!object.send("#{object.class.to_s.underscore}_category").authed_users('fact_check').include?(current_user) rescue false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
}
|
||||||
|
end
|
||||||
|
objects
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
class OrbitWidgetController< OrbitFrontendComponentController
|
class OrbitWidgetController< OrbitFrontendComponentController
|
||||||
include FrontEndArrayParamsHelper
|
|
||||||
before_filter {get_tags_and_cates(params)}
|
|
||||||
|
|
||||||
def get_tags_and_cates(params)
|
|
||||||
params = tags_and_cates(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,24 +1,16 @@
|
|||||||
class PagesController < ApplicationController
|
class PagesController < ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
||||||
before_filter :check_frontend_open, :only => [:index,:show]
|
|
||||||
# caches_page :index
|
# caches_page :index
|
||||||
|
|
||||||
def check_frontend_open
|
|
||||||
if Me.frontend_closed and current_user.nil? #Need to be change
|
|
||||||
redirect_to '/admin/dashboards'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@item = Page.find_by_name('home')
|
@item = Page.find_by_name('home')
|
||||||
|
|
||||||
if @item
|
if @item
|
||||||
delayed_impressionist(@item)
|
impressionist(@item)
|
||||||
render_page
|
render_page
|
||||||
else
|
else
|
||||||
redirect_to '/admin/dashboards',:notice=>t(:need_home)
|
render :text => t(:need_home)
|
||||||
# render :text => t(:need_home)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26,14 +18,10 @@ class PagesController < ApplicationController
|
|||||||
#begin
|
#begin
|
||||||
@item = Item.first(:conditions => {:path => params[:page_name]})
|
@item = Item.first(:conditions => {:path => params[:page_name]})
|
||||||
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
|
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
|
||||||
delayed_impressionist(@item)
|
impressionist(@item)
|
||||||
case @item.class.to_s
|
case @item.class.to_s
|
||||||
when 'Page'
|
when 'Page'
|
||||||
if params[:clicked_field_name]
|
render_page unless save_from_no_lang_for_page
|
||||||
render_page({"clicked_field_name"=>params["clicked_field_name"]}) unless save_from_no_lang_for_page
|
|
||||||
else
|
|
||||||
render_page(params) unless save_from_no_lang_for_page
|
|
||||||
end
|
|
||||||
when 'Link'
|
when 'Link'
|
||||||
redirect_to(@item[:url]) unless save_from_no_lang_for_page
|
redirect_to(@item[:url]) unless save_from_no_lang_for_page
|
||||||
end
|
end
|
||||||
@@ -45,28 +33,12 @@ class PagesController < ApplicationController
|
|||||||
#end
|
#end
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert_array_param(key,array)
|
|
||||||
array.collect{|t| "#{key}[]=#{t}"}.join("&")
|
|
||||||
end
|
|
||||||
|
|
||||||
def index_from_link
|
def index_from_link
|
||||||
url = "/#{@item.path}"
|
url = "/#{@item.path}"
|
||||||
options = ''
|
options = ''
|
||||||
options << "#{options.blank? ? '?' : '&'}page_main=#{params[:page_main]}" unless params[:page_main].blank?
|
options << "#{options.blank? ? '?' : '&'}page_main=#{params[:page_main]}" unless params[:page_main].blank?
|
||||||
|
|
||||||
if params[:category_id].is_a? Array
|
|
||||||
options << "#{options.blank? ? '?' : '&'}#{convert_array_param('category_id',params[:category_id])}" unless params[:category_id].blank?
|
|
||||||
elsif params[:category_id].is_a? String
|
|
||||||
options << "#{options.blank? ? '?' : '&'}category_id=#{params[:category_id]}" unless params[:category_id].blank?
|
options << "#{options.blank? ? '?' : '&'}category_id=#{params[:category_id]}" unless params[:category_id].blank?
|
||||||
end
|
|
||||||
|
|
||||||
if params[:tag_id].is_a? Array
|
|
||||||
options << "#{options.blank? ? '?' : '&'}#{convert_array_param('tag_id',params[:tag_id])}" unless params[:tag_id].blank?
|
|
||||||
elsif params[:category_id].is_a? String
|
|
||||||
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
options << "#{options.blank? ? '?' : '&'}search_query=#{params[:search_query]}" unless params[:search_query].blank?
|
options << "#{options.blank? ? '?' : '&'}search_query=#{params[:search_query]}" unless params[:search_query].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}name=#{params[:name]}" unless params[:name].blank?
|
options << "#{options.blank? ? '?' : '&'}name=#{params[:name]}" unless params[:name].blank?
|
||||||
uri = URI::escape(url + options)
|
uri = URI::escape(url + options)
|
||||||
@@ -82,7 +54,6 @@ class PagesController < ApplicationController
|
|||||||
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}preview=#{params[:preview]}" unless params[:preview].blank?
|
options << "#{options.blank? ? '?' : '&'}preview=#{params[:preview]}" unless params[:preview].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}controller_action=#{params[:controller_action]}" unless params[:controller_action].blank?
|
options << "#{options.blank? ? '?' : '&'}controller_action=#{params[:controller_action]}" unless params[:controller_action].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}clicked_field_name=#{params[:clicked_field_name]}" unless params[:clicked_field_name].blank?
|
|
||||||
redirect_to(url + options) unless save_from_no_lang_for_page
|
redirect_to(url + options) unless save_from_no_lang_for_page
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
module Admin::FrontendWidgetInterface
|
|
||||||
|
|
||||||
protected
|
|
||||||
def get_categories_and_tags
|
|
||||||
unless @selected[:module_app].nil?
|
|
||||||
@categories = @selected[:module_app].get_categories
|
|
||||||
@tags = @selected[:module_app].tags
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_frontend_data_count
|
|
||||||
local_item = set_local_item
|
|
||||||
@page_frontend_data_counts = @selected[:module_app].get_registration.get_data_count rescue []
|
|
||||||
@selected[:page_frontend_data_count] = case local_item
|
|
||||||
when PagePart
|
|
||||||
local_item.widget_data_count
|
|
||||||
when Page
|
|
||||||
local_item.frontend_data_count
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def clean_tags_and_category_params
|
|
||||||
field_name = set_field_name
|
|
||||||
if self.class==Admin::PagePartsController and params[field_name][:module_app].blank?
|
|
||||||
params[field_name][:module_app] = nil
|
|
||||||
end
|
|
||||||
if params[field_name][:tag].nil? || params[field_name][:tag].include?("nil")
|
|
||||||
params[field_name][:tag] = []
|
|
||||||
end
|
|
||||||
|
|
||||||
if params[field_name][:category].nil? || params[field_name][:category].include?("nil")
|
|
||||||
params[field_name][:category] = []
|
|
||||||
end
|
|
||||||
end #of clean_tags_and_category_params
|
|
||||||
|
|
||||||
def set_local_item
|
|
||||||
local_item = @part
|
|
||||||
local_item = @item if local_item.nil? && @item
|
|
||||||
local_item
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_field_name
|
|
||||||
case self.class.to_s
|
|
||||||
when "Admin::PagesController"
|
|
||||||
return "page"
|
|
||||||
when "Admin::PagePartsController"
|
|
||||||
return "page_part"
|
|
||||||
end # of case
|
|
||||||
end
|
|
||||||
|
|
||||||
def select_array_for_app_frontend_urls(hash)
|
|
||||||
ary = hash.collect{|name,data| [I18n.t(data["i18n"]),name]}
|
|
||||||
ary << [I18n.t('default_widget.name'),'default_widget'] if @selected[:module_app] and @selected[:module_app].has_default_widget?
|
|
||||||
ary
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
module Admin::PagePartsHelper
|
module Admin::PagePartsHelper
|
||||||
include Admin::FrontendWidgetInterface
|
|
||||||
|
|
||||||
def support_link
|
def support_link
|
||||||
url_method = @selected[:module_app].get_default_widget[:url_method]
|
url_method = @module_app.get_default_widget[:url_method]
|
||||||
unless url_method.nil?
|
unless url_method.nil?
|
||||||
res = "Link:"
|
res = "Link:"
|
||||||
res << select_tag( "page_part[widget_field_is_link][]", options_for_select([["NotLink",false],["Link1",url_method]]))
|
res << select_tag( "page_part[widget_field_is_link][]", options_for_select([["NotLink",false],["Link1",url_method]]))
|
||||||
@@ -10,8 +9,10 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_widget_field_rel
|
def get_widget_field_rel(local_item=nil)
|
||||||
case set_local_item
|
local_item = @part if local_item.nil? && @part
|
||||||
|
local_item = @item if local_item.nil? && @item
|
||||||
|
case local_item
|
||||||
when Page
|
when Page
|
||||||
reload_after_list_changed_admin_pages_path
|
reload_after_list_changed_admin_pages_path
|
||||||
when PagePart
|
when PagePart
|
||||||
@@ -33,7 +34,8 @@ module Admin::PagePartsHelper
|
|||||||
|
|
||||||
unless field_is_checked.nil? and assign_field_name_value.nil?
|
unless field_is_checked.nil? and assign_field_name_value.nil?
|
||||||
origin_field = nil
|
origin_field = nil
|
||||||
origin_field = @selected[:module_app].widget_fields.select{|t| t.first.to_s==(assign_field_name_value || local_item.default_widget_field_name[i])}.first
|
|
||||||
|
origin_field = @module_app.widget_fields.select{|t| t.first.to_s==(assign_field_name_value || local_item.default_widget_field_name[i])}.first
|
||||||
|
|
||||||
if origin_field and origin_field[2]==:link #choosen_field_is_link
|
if origin_field and origin_field[2]==:link #choosen_field_is_link
|
||||||
|
|
||||||
@@ -49,10 +51,11 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def widget_field_options(i,local_item=nil)
|
def widget_field_options(i,local_item=nil)
|
||||||
local_item = set_local_item
|
local_item = @part if local_item.nil? && @part
|
||||||
|
local_item = @item if local_item.nil? && @item
|
||||||
|
|
||||||
options = @selected[:module_app].widget_fields.collect do |widget_field|
|
options = @module_app.widget_fields.collect do |widget_field|
|
||||||
label = I18n.t("#{@selected[:module_app].key}.default_widget.#{widget_field[0]}")
|
label = I18n.t("#{@module_app.key}.default_widget.#{widget_field[0]}")
|
||||||
[label, widget_field[0]]
|
[label, widget_field[0]]
|
||||||
end
|
end
|
||||||
case local_item
|
case local_item
|
||||||
@@ -63,9 +66,11 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def widget_field_class_options(i,local_item=nil)
|
def widget_fiield_class_options(i,local_item=nil)
|
||||||
options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
||||||
local_item = set_local_item
|
local_item = @part if local_item.nil? && @part
|
||||||
|
local_item = @item if local_item.nil? && @item
|
||||||
|
|
||||||
case local_item
|
case local_item
|
||||||
when Page
|
when Page
|
||||||
options_for_select(options, (local_item.frontend_class[i] if (local_item) ))
|
options_for_select(options, (local_item.frontend_class[i] if (local_item) ))
|
||||||
@@ -110,8 +115,12 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def nil_checkbox_button(part,tag_or_cate)
|
def nil_checkbox_button(part,tag_or_cate)
|
||||||
field_name = set_field_name
|
field_name = case part
|
||||||
|
when PagePart
|
||||||
|
'page_part'
|
||||||
|
when Page
|
||||||
|
'page'
|
||||||
|
end
|
||||||
content_tag :label,:class=>"radio inline" do
|
content_tag :label,:class=>"radio inline" do
|
||||||
op = check_box_tag("#{field_name}[#{tag_or_cate}][]", 'nil' , eval("#{tag_or_cate}_checked_value(part,'')"),:class=>'select_all')
|
op = check_box_tag("#{field_name}[#{tag_or_cate}][]", 'nil' , eval("#{tag_or_cate}_checked_value(part,'')"),:class=>'select_all')
|
||||||
op << I18n.t("default_widget.no_value")
|
op << I18n.t("default_widget.no_value")
|
||||||
@@ -119,8 +128,12 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def nil_radio_button(part,tag_or_cate)
|
def nil_radio_button(part,tag_or_cate)
|
||||||
field_name = set_field_name
|
field_name = case part
|
||||||
|
when PagePart
|
||||||
|
'page_part'
|
||||||
|
when Page
|
||||||
|
'page'
|
||||||
|
end
|
||||||
content_tag :label,:class=>"radio inline" do
|
content_tag :label,:class=>"radio inline" do
|
||||||
op = radio_button(field_name, tag_or_cate, '' , :checked => eval("#{tag_or_cate}_checked_value(part,'')"))
|
op = radio_button(field_name, tag_or_cate, '' , :checked => eval("#{tag_or_cate}_checked_value(part,'')"))
|
||||||
op << I18n.t("default_widget.no_value")
|
op << I18n.t("default_widget.no_value")
|
||||||
@@ -128,7 +141,7 @@ module Admin::PagePartsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show_default_widget_setting_panel
|
def show_default_widget_setting_panel
|
||||||
@selected[:module_app] && @selected[:module_app].has_default_widget? && (@selected[:app_frontend_url]== 'default_widget')
|
@module_app && @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget'
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_custom_widget_setting_panel
|
def show_custom_widget_setting_panel
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
FLASH_NOTICE_KEYS = [:error, :notice, :warning]
|
FLASH_NOTICE_KEYS = [:error, :notice, :warning]
|
||||||
|
|
||||||
|
|
||||||
def current_path(param_hash)
|
|
||||||
request.referer.include?('?') ? [request.referer,param_hash.to_param].join('&') : [request.referer,param_hash.to_param].join('?')
|
|
||||||
end
|
|
||||||
|
|
||||||
def delayed_impressionist(object)
|
|
||||||
# Resque.enqueue_at(1.minute.from_now,DelayedImpressionist,object)
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_user_role_enable(attribute_fields)
|
def check_user_role_enable(attribute_fields)
|
||||||
@user.attribute_values.collect{|t| attribute_fields.include?(t.attribute_field) }.include?(true) rescue false
|
@user.attribute_values.collect{|t| attribute_fields.include?(t.attribute_field) }.include?(true) rescue false
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_attribute_value(value)
|
def show_attribute_value(value)
|
||||||
if value.kind_of? Hash
|
if value.kind_of? Hash
|
||||||
result = []
|
result = []
|
||||||
@@ -303,12 +292,4 @@ module ApplicationHelper
|
|||||||
"http://#{request.host}:2#{site_number}00"
|
"http://#{request.host}:2#{site_number}00"
|
||||||
end
|
end
|
||||||
|
|
||||||
def sortable(column, title = nil, options = {})
|
|
||||||
options[:remote] ||= true
|
|
||||||
title ||= column.titleize
|
|
||||||
css_class = column.to_s == params[:sort] ? "current #{params[:direction]}" : 'asc'
|
|
||||||
direction = column.to_s == params[:sort] && params[:direction] == 'asc' ? 'desc' : 'asc'
|
|
||||||
link_to title, params.merge({direction: direction, sort: column, sort_options: column}), {:class => "#{css_class} sortable", :remote => options[:remote]}
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -6,9 +6,7 @@ module DefaultWidgetHelper
|
|||||||
def link_to_field(row_data,field, switch, options=nil)
|
def link_to_field(row_data,field, switch, options=nil)
|
||||||
method_ary = @page_part.module_app.widget_fields_link_method
|
method_ary = @page_part.module_app.widget_fields_link_method
|
||||||
field = field.to_sym
|
field = field.to_sym
|
||||||
options = options || {}
|
if(method_ary.has_key?(field) and (switch == true))
|
||||||
options[:clicked_field_name] = field
|
|
||||||
if(method_ary.has_key?(field) and (switch.to_s == "true"))
|
|
||||||
url = case method_ary[field][:args]
|
url = case method_ary[field][:args]
|
||||||
when nil # no args
|
when nil # no args
|
||||||
get_data_link(method_ary[field][:method], options)
|
get_data_link(method_ary[field][:method], options)
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
module MemberHelper
|
|
||||||
def nl2br(val)
|
|
||||||
val.gsub(/\r\n/, '<br />').html_safe
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -8,7 +8,7 @@ module OrbitFormHelper
|
|||||||
options[:icon_date] ||= 'icons-calendar'
|
options[:icon_date] ||= 'icons-calendar'
|
||||||
options[:icon_clear] ||= 'icons-cross-3'
|
options[:icon_clear] ||= 'icons-cross-3'
|
||||||
options[:input_class] ||= 'input-large'
|
options[:input_class] ||= 'input-large'
|
||||||
options[:value] ||= options[:object].send(method) if options[:object] && options[:object][method]
|
options[:value] ||= options[:object][method] if options[:object] && options[:object][method]
|
||||||
case options[:picker_type]
|
case options[:picker_type]
|
||||||
when 'date'
|
when 'date'
|
||||||
content_tag :div, :id => options[:id], :class => options[:class] do
|
content_tag :div, :id => options[:id], :class => options[:class] do
|
||||||
@@ -22,7 +22,7 @@ module OrbitFormHelper
|
|||||||
options[:label] ||= I18n.t('datetime_picker.separated.label')
|
options[:label] ||= I18n.t('datetime_picker.separated.label')
|
||||||
content_tag :div, :id => options[:id], :class => "separated_picker #{options[:class]}" do
|
content_tag :div, :id => options[:id], :class => "separated_picker #{options[:class]}" do
|
||||||
concat label_tag options[:label] unless options[:no_label]
|
concat label_tag options[:label] unless options[:no_label]
|
||||||
concat hidden_field(object_name, method, :value => options[:value])
|
concat hidden_field(object_name, method)
|
||||||
concat separated_picker(object_name, method, options)
|
concat separated_picker(object_name, method, options)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -5,13 +5,9 @@ class BackupServer
|
|||||||
#CronMail.time_check("Going to backup Orbit").deliver
|
#CronMail.time_check("Going to backup Orbit").deliver
|
||||||
dbhost = Mongoid.config.database.connection.primary.join ':'
|
dbhost = Mongoid.config.database.connection.primary.join ':'
|
||||||
dbname = Mongoid.config.database.name
|
dbname = Mongoid.config.database.name
|
||||||
archive_db_list_path = OrbitSystemPreference::ArchiveDbListPath
|
|
||||||
dbdirectory = "#{Rails.root}/tmp/#{dbname}-"+Time.now.strftime("%Y-%m-%d-%H-%M")
|
dbdirectory = "#{Rails.root}/tmp/#{dbname}-"+Time.now.strftime("%Y-%m-%d-%H-%M")
|
||||||
%x[mongodump -h #{dbhost} -d #{dbname} -o #{dbdirectory} ]
|
%x[mongodump -h #{dbhost} -d #{dbname} -o #{dbdirectory} ]
|
||||||
|
|
||||||
%x[rm #{archive_db_list_path}]
|
# %x[touch #{Rails.root}/tmp/restart]
|
||||||
%x[ls #{Rails.root}/tmp/#{dbname}* | du -h --max-depth=1 --block-size=1M |sort -h >> #{archive_db_list_path}]
|
|
||||||
OrbitLogger.info "DB backup done Path:#{dbdirectory}"
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
class DashboardCounter < Resque::Plugins::RestrictionJob
|
|
||||||
@queue = :high
|
|
||||||
|
|
||||||
def self.perform(*args)
|
|
||||||
site = Site.first
|
|
||||||
obj = new(*args)
|
|
||||||
site.dashboard_counter[:visitors_this_week] = obj.display_visitors_this_week
|
|
||||||
site.dashboard_counter[:visitors_this_month] = obj.display_visitors_this_month
|
|
||||||
site.dashboard_counter[:visitors_this_year] = obj.display_visitors_this_year
|
|
||||||
site.save
|
|
||||||
OrbitLogger.info "DashboardCounter done #{site.dashboard_counter.to_s}"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def display_visitors(options={})
|
|
||||||
impressions = Impression.where(options).and(:referrer.ne => nil)
|
|
||||||
impressions.map{|i| i[:session_hash]}.uniq.count
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_visitors_today
|
|
||||||
display_visitors(created_at: {'$gte' => Date.today.beginning_of_day, '$lte' => Date.today.end_of_day})
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_visitors_this_week
|
|
||||||
display_visitors(created_at: {'$gte' => Date.today.beginning_of_week, '$lte' => Date.today.end_of_week})
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_visitors_this_month
|
|
||||||
display_visitors(created_at: {'$gte' => Date.today.beginning_of_month, '$lte' => Date.today.end_of_month})
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_visitors_this_year
|
|
||||||
display_visitors(created_at: {'$gte' => Date.today.beginning_of_year, '$lte' => Date.today.end_of_year})
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
class DelayedImpressionist
|
|
||||||
@queue = :low
|
|
||||||
def self.perform(object)
|
|
||||||
impressionist(object)
|
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
class GenerateSystemSummary
|
|
||||||
@queue = :high
|
|
||||||
|
|
||||||
def self.perform()
|
|
||||||
@site = Site.first
|
|
||||||
get_disk_free
|
|
||||||
get_git_log_list
|
|
||||||
get_package_info
|
|
||||||
@site.save
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_package_info
|
|
||||||
@info = {}
|
|
||||||
get_nginx_version
|
|
||||||
get_MongoDB_version
|
|
||||||
get_Linux_version
|
|
||||||
@site.system_package_info = @info
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_git_log_list
|
|
||||||
git_commit_list_path = OrbitSystemPreference::GitCommitListPath
|
|
||||||
%x[rm #{git_commit_list_path}]
|
|
||||||
%x[cd #{Rails.root};#{OrbitSystemPreference::GitLogCommend} >>#{git_commit_list_path} ]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_disk_free
|
|
||||||
@site.disk_space= %x[#{OrbitSystemPreference::DiskFree}]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_nginx_version
|
|
||||||
@info[:nginx] = %x[#{OrbitSystemPreference::SystemPackage::NginxVersion} ]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_MongoDB_version
|
|
||||||
@info[:mongodb] = %x[#{OrbitSystemPreference::SystemPackage::MongodbVersion} ]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_Linux_version
|
|
||||||
@info[:linux] = %x[#{OrbitSystemPreference::SystemPackage::SystemVersion} ]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.check_system_has_enough_space( limit =OrbitSystemPreference::DefaultDiskSpaceLimit )
|
|
||||||
binding.pry
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
class NccuCalendar
|
||||||
|
require 'open-uri'
|
||||||
|
require 'tempfile'
|
||||||
|
|
||||||
|
@queue = :high
|
||||||
|
|
||||||
|
def self.perform()
|
||||||
|
# temp_file = Tempfile.new('new_cal')
|
||||||
|
# open('http://events.nccu.edu.tw/Month').read{|data|
|
||||||
|
# temp_file << data
|
||||||
|
# }
|
||||||
|
|
||||||
|
open(File.join(Rails.root, 'public/static', 'nccu_calendar.xml'), 'wb') do |fo|
|
||||||
|
fo.print open('http://events.nccu.edu.tw/Month').read
|
||||||
|
end
|
||||||
|
|
||||||
|
# FileUtils.mv(temp_file, File.join(Rails.root, 'public/static', 'nccu_calendar.xml'))
|
||||||
|
|
||||||
|
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]NccuCalendar Synced #{File.join(Rails.root, 'public/static', 'nccu_calendar.xml')}"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
class RestartServer
|
|
||||||
@queue = :high
|
|
||||||
|
|
||||||
def self.perform()
|
|
||||||
temp_directory = "#{Rails.root}/tmp/"
|
|
||||||
%x[touch #{temp_directory}restart.txt ]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
class SendAskNoticeMail
|
|
||||||
@queue = :mail
|
|
||||||
|
|
||||||
def self.perform(ask_admin_id, ask_question_id)
|
|
||||||
ask_admin = AskAdmin.find(ask_admin_id)
|
|
||||||
ask_question = AskQuestion.find(ask_question_id)
|
|
||||||
AskMailer.notice(ask_admin, ask_question).deliver
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
class SendAskReplyMail
|
|
||||||
@queue = :mail
|
|
||||||
|
|
||||||
def self.perform(ask_question_id)
|
|
||||||
ask_question = AskQuestion.find(ask_question_id)
|
|
||||||
AskMailer.reply(ask_question).deliver
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
class SyncDb
|
||||||
|
|
||||||
|
@queue = :high
|
||||||
|
|
||||||
|
def self.perform()
|
||||||
|
puts "[ #{DateTime.now.strftime("%Y %D %H:%M") }]\t SyncDb Starting"
|
||||||
|
self.start_sync
|
||||||
|
self.set_admin
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.start_sync
|
||||||
|
task = 'mid_site:sync'
|
||||||
|
args = []
|
||||||
|
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
|
||||||
|
User.all.each{|ur| ur.create_dept_cache}
|
||||||
|
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tSyncDb Synced"
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.set_admin
|
||||||
|
task = 'mid_site:install_admin'
|
||||||
|
args = []
|
||||||
|
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
|
||||||
|
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tAdmin done"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -5,6 +5,5 @@ class UpdateTagCloud
|
|||||||
Tag.all.each do |tag|
|
Tag.all.each do |tag|
|
||||||
tag.update_attribute(:cloud_view_count, tag.impressionist_count(:created_at.gte => 14.days.ago, :created_at.lte => Time.now))
|
tag.update_attribute(:cloud_view_count, tag.impressionist_count(:created_at.gte => 14.days.ago, :created_at.lte => Time.now))
|
||||||
end
|
end
|
||||||
OrbitLogger.info "UpdateTagCloud Done"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
class UserActionRecoder
|
|
||||||
@queue = :low
|
|
||||||
def self.perform(user,params)
|
|
||||||
UserAction.create!(:user=>user,:params=>params,:page=>"#{params['controller']}##{params['action']}")
|
|
||||||
true
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
+6
-4
@@ -2,8 +2,6 @@ class Asset
|
|||||||
|
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
include OrbitTag::Taggable
|
|
||||||
taggable
|
|
||||||
|
|
||||||
mount_uploader :data, FileAssetUploader
|
mount_uploader :data, FileAssetUploader
|
||||||
|
|
||||||
@@ -18,14 +16,18 @@ class Asset
|
|||||||
|
|
||||||
belongs_to :asset_category
|
belongs_to :asset_category
|
||||||
belongs_to :assetable, polymorphic: true
|
belongs_to :assetable, polymorphic: true
|
||||||
# has_and_belongs_to_many :tags, :class_name => "AssetTag"
|
has_and_belongs_to_many :tags, :class_name => "AssetTag"
|
||||||
|
|
||||||
before_save :clean_tags
|
before_save :clean_tags
|
||||||
|
|
||||||
|
def sorted_tags
|
||||||
|
tags.order_by(I18n.locale, :asc)
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def clean_tags
|
def clean_tags
|
||||||
self.tagged_ids.delete('')
|
self.tag_ids.delete('')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -4,8 +4,5 @@ class CssDefault < Stylesheet
|
|||||||
# belongs_to :desktop_widget
|
# belongs_to :desktop_widget
|
||||||
|
|
||||||
belongs_to :css, polymorphic: true
|
belongs_to :css, polymorphic: true
|
||||||
def content
|
|
||||||
self.file.read.force_encoding("UTF-8") rescue ''
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -2,7 +2,7 @@ class Desktop
|
|||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
|
|
||||||
field :theme
|
field :theme, default: "4f8d3f533b67fcd05f08635a"
|
||||||
field :customtheme
|
field :customtheme
|
||||||
field :wallpaper
|
field :wallpaper
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
class DesktopApp
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
|
|
||||||
field :name
|
|
||||||
field :author
|
|
||||||
field :shape
|
|
||||||
field :version, :type => String
|
|
||||||
field :text_color, :type => String, default: ""
|
|
||||||
field :bg_color, :type => String, default: ""
|
|
||||||
field :icon, default: "icon.png"
|
|
||||||
field :url
|
|
||||||
|
|
||||||
has_many :images, as: :imgs, :autosave => true, :dependent => :destroy
|
|
||||||
has_and_belongs_to_many :desktops, :autosave => true
|
|
||||||
has_many :tiles, :autosave => true
|
|
||||||
|
|
||||||
accepts_nested_attributes_for :images, :allow_destroy => true
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -4,60 +4,6 @@ class DesktopTheme
|
|||||||
|
|
||||||
field :name
|
field :name
|
||||||
field :author
|
field :author
|
||||||
field :background
|
|
||||||
field :tilecolor ,type: Array, default: ["thmc1","thmc2"]
|
|
||||||
ICONS = {
|
|
||||||
"home"=>"d_home.png",
|
|
||||||
"app_manager"=>"d_app_manager.png",
|
|
||||||
"sections"=>"d_sections.png",
|
|
||||||
"settings"=>"d_settings.png",
|
|
||||||
"publication"=>"d_publication.png",
|
|
||||||
"journal_p"=>"d_journal_p.png",
|
|
||||||
"conference_p"=>"d_conference_p.png",
|
|
||||||
"books"=>"d_books.png",
|
|
||||||
"research"=>"d_research.png",
|
|
||||||
"research_d"=>"d_research_d.png",
|
|
||||||
"research_p"=>"d_research_p.png",
|
|
||||||
"patents"=>"d_patents.png",
|
|
||||||
"labs"=>"d_labs.png",
|
|
||||||
"experience"=>"d_experience.png",
|
|
||||||
"working"=>"d_working.png",
|
|
||||||
"education"=>"d_education.png",
|
|
||||||
"honors"=>"d_honors.png",
|
|
||||||
"activities"=>"d_activities.png",
|
|
||||||
"clubs"=>"d_clubs.png",
|
|
||||||
"landt"=>"d_landt.png",
|
|
||||||
"courses"=>"d_courses.png",
|
|
||||||
"homework"=>"d_homework.png",
|
|
||||||
"certification"=>"d_certification.png",
|
|
||||||
"personal"=>"d_personal.png",
|
|
||||||
"mypage"=>"d_mypage.png",
|
|
||||||
"blog"=>"d_blog.png",
|
|
||||||
"album"=>"d_album.png",
|
|
||||||
"calendar"=>"d_calendar.png",
|
|
||||||
"files"=>"d_files.png",
|
|
||||||
"orbit"=>"d_orbit.png",
|
|
||||||
"connection"=>"d_connection.png",
|
|
||||||
"appstore"=>"d_appstore.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
has_one :css_default, as: :css, :autosave => true, :dependent => :destroy
|
|
||||||
has_many :images, as: :imgs, :autosave => true, :dependent => :destroy
|
|
||||||
has_and_belongs_to_many :desktops, :autosave => true
|
|
||||||
|
|
||||||
accepts_nested_attributes_for :images, :allow_destroy => true
|
|
||||||
|
|
||||||
# after_save :parse_css_for_images
|
|
||||||
|
|
||||||
# belongs_to :desktop
|
|
||||||
|
|
||||||
|
|
||||||
# protected
|
|
||||||
|
|
||||||
# def parse_css_for_images
|
|
||||||
# self.css_default.parse_urls
|
|
||||||
# end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -5,12 +5,9 @@ class DesktopWidget
|
|||||||
|
|
||||||
field :name
|
field :name
|
||||||
field :author
|
field :author
|
||||||
field :shape, default: "w1 h1"
|
field :shape
|
||||||
field :fullsize, :type => Boolean, default: false
|
field :fullsize, :type => Boolean
|
||||||
field :version, :type => String
|
field :version, :type => String
|
||||||
field :text_color, :type => String, default: ""
|
|
||||||
field :bg_color, :type => String, default: ""
|
|
||||||
field :icon, default: "icon.png"
|
|
||||||
|
|
||||||
has_one :css_default, as: :css, :autosave => true, :dependent => :destroy
|
has_one :css_default, as: :css, :autosave => true, :dependent => :destroy
|
||||||
has_one :widget_layout, :autosave => true, :dependent => :destroy
|
has_one :widget_layout, :autosave => true, :dependent => :destroy
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
class Facebook
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
|
|
||||||
field :fb_identifier
|
|
||||||
field :connected, type: Boolean
|
|
||||||
|
|
||||||
belongs_to :user
|
|
||||||
end
|
|
||||||
@@ -7,11 +7,11 @@ class Group
|
|||||||
before_create :initialize_tile
|
before_create :initialize_tile
|
||||||
|
|
||||||
def initialize_tile
|
def initialize_tile
|
||||||
# self.tiles.build(data_category: "app", data_content: "quotes", position: 5, shape: "w1 h1", title: "Quotes")
|
self.tiles.build(data_category: "app", data_content: "quotes", position: 5, shape: "w1 h1", title: "Quotes")
|
||||||
# self.tiles.build(data_category: "app", data_content: "dailyenglish", position: 6, shape: "w1 h1", title: "Daily English Word")
|
self.tiles.build(data_category: "app", data_content: "dailyenglish", position: 6, shape: "w1 h1", title: "Daily English Word")
|
||||||
widgets = self.section.desktop.desktop_widgets.collect{|widget| widget.id}
|
widgets = self.section.desktop.desktop_widgets.collect{|widget| widget.id}
|
||||||
widgets.each_with_index do |w,i|
|
for i in 0..3
|
||||||
self.tiles.build(data_category: "widget", position: i+1,desktop_widget_id: w)
|
self.tiles.build(data_category: "widget", position: i+1,desktop_widget_id: widgets[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,6 +13,5 @@ class Tile
|
|||||||
|
|
||||||
belongs_to :group
|
belongs_to :group
|
||||||
belongs_to :desktop_widget
|
belongs_to :desktop_widget
|
||||||
belongs_to :desktop_app
|
|
||||||
|
|
||||||
end
|
end
|
||||||
+2
-14
@@ -17,7 +17,7 @@ class Item
|
|||||||
|
|
||||||
validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/
|
validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/
|
||||||
# validates :name, :exclusion => { :in => LIST[:forbidden_item_names] }
|
# validates :name, :exclusion => { :in => LIST[:forbidden_item_names] }
|
||||||
validates_uniqueness_of :name #, :scope => :parent_id
|
validates_uniqueness_of :name, :scope => :parent_id
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
validates_associated :parent, :children
|
validates_associated :parent, :children
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ class Item
|
|||||||
after_save :rebuild_children_path, :if => "path_changed?"
|
after_save :rebuild_children_path, :if => "path_changed?"
|
||||||
|
|
||||||
def enabled_for_lang(lang)
|
def enabled_for_lang(lang)
|
||||||
enabled_for.include?(lang) rescue false
|
enabled_for.include?(lang)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_by_name(item_name)
|
def self.find_by_name(item_name)
|
||||||
@@ -65,10 +65,6 @@ class Item
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.structure_ordered_items
|
|
||||||
self.get_children(Item.root, [])
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def rebuild_path
|
def rebuild_path
|
||||||
@@ -92,12 +88,4 @@ class Item
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_children(item, tree)
|
|
||||||
tree << item
|
|
||||||
item.children.each do |child|
|
|
||||||
self.get_children(child, tree)
|
|
||||||
end
|
|
||||||
tree
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -8,8 +8,6 @@ class ModuleApp
|
|||||||
field :title
|
field :title
|
||||||
field :sidebar_order,type: Integer,default: 0
|
field :sidebar_order,type: Integer,default: 0
|
||||||
|
|
||||||
has_many :tags, as: :module_tag, dependent: :destroy
|
|
||||||
|
|
||||||
def refetch_setting!(reg)
|
def refetch_setting!(reg)
|
||||||
# %w{module_label category base_url version organization author intro update_info create_date}.each do |field|
|
# %w{module_label category base_url version organization author intro update_info create_date}.each do |field|
|
||||||
# self[field.to_sym] = reg.send field
|
# self[field.to_sym] = reg.send field
|
||||||
@@ -19,20 +17,13 @@ class ModuleApp
|
|||||||
self[:get_widget_style] = reg.get_widgets
|
self[:get_widget_style] = reg.get_widgets
|
||||||
self[:using_default_widget] = !reg.get_default_widget.blank?
|
self[:using_default_widget] = !reg.get_default_widget.blank?
|
||||||
self[:widgets] = reg.get_widgets
|
self[:widgets] = reg.get_widgets
|
||||||
self[:has_tag] = reg.get_has_tags
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# scope :for_frontend_select,
|
# def app_pages
|
||||||
scope :standard_sorting ,order_by(:title, :asc)
|
# get_registration.get_app_pages
|
||||||
|
# end
|
||||||
|
|
||||||
def self.for_widget_select
|
|
||||||
where(:key.in=>OrbitApp::Module::WidgetUtility.all.keys).order_by(:title, :asc)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.for_frontend_select
|
|
||||||
where(:key.in => OrbitApp::Module::FrontendUtility.all.keys).excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
|
|
||||||
end
|
|
||||||
|
|
||||||
def enable_frontend?
|
def enable_frontend?
|
||||||
self[:enable_frontend]
|
self[:enable_frontend]
|
||||||
@@ -121,6 +112,10 @@ class ModuleApp
|
|||||||
|
|
||||||
has_one :app_auth,dependent: :delete
|
has_one :app_auth,dependent: :delete
|
||||||
|
|
||||||
|
def get_tags
|
||||||
|
get_registration.get_tags
|
||||||
|
end
|
||||||
|
|
||||||
def get_categories
|
def get_categories
|
||||||
get_registration.get_categories
|
get_registration.get_categories
|
||||||
end
|
end
|
||||||
@@ -133,30 +128,4 @@ class ModuleApp
|
|||||||
OrbitApp::Module::Registration.find_by_key(key)
|
OrbitApp::Module::Registration.find_by_key(key)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_by_key(key)
|
|
||||||
self.where(key: key)[0] rescue nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def sorted_tags_for_cloud
|
|
||||||
temp_tags = {}
|
|
||||||
self.tags.each{ |tag|
|
|
||||||
temp_tags.merge!({tag => Tag.get_impressionist(tag)})
|
|
||||||
}
|
|
||||||
if !temp_tags.blank?
|
|
||||||
sorted_tags = temp_tags.sort{|a,b| a[1]<=>b[1]}.reverse
|
|
||||||
sorted_tags[0][1] = :hot1
|
|
||||||
offset = (sorted_tags.size - 1) / 3
|
|
||||||
i = 1
|
|
||||||
class_i = 2
|
|
||||||
sorted_tags[1..-1].collect!{ |x|
|
|
||||||
x[1] = "hot#{class_i}"
|
|
||||||
i == offset ? i = 1 : i += 1 if class_i < 4
|
|
||||||
class_i += 1 if i == offset && class_i < 4
|
|
||||||
}
|
|
||||||
sorted_tags
|
|
||||||
else
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
module Mongoid
|
|
||||||
module Sortable
|
|
||||||
extend ActiveSupport::Concern
|
|
||||||
|
|
||||||
included do
|
|
||||||
field :sort_number, type: Integer
|
|
||||||
|
|
||||||
after_initialize :set_sort_number
|
|
||||||
end
|
|
||||||
|
|
||||||
module ClassMethods
|
|
||||||
def default_sort(sorted = true)
|
|
||||||
if !sorted
|
|
||||||
asc(:sort_number)
|
|
||||||
else
|
|
||||||
asc
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def set_sort_number
|
|
||||||
if self.new? && self.sort_number.nil?
|
|
||||||
last_record = self.class.desc(:sort_number).first
|
|
||||||
if last_record && last_record.sort_number
|
|
||||||
self.sort_number = (last_record.sort_number + 10) / 10 * 10
|
|
||||||
else
|
|
||||||
self.sort_number = 10
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+1
-2
@@ -7,7 +7,7 @@ class Page < Item
|
|||||||
|
|
||||||
field :content, localize: true
|
field :content, localize: true
|
||||||
field :app_frontend_url
|
field :app_frontend_url
|
||||||
# field :theme_id, :type => BSON::ObjectId, :default => nil
|
field :theme_id, :type => BSON::ObjectId, :default => nil
|
||||||
field :category,type: Array, :default => []
|
field :category,type: Array, :default => []
|
||||||
field :tag, type: Array,:default => []
|
field :tag, type: Array,:default => []
|
||||||
field :view_count, :type => Integer, :default => 0
|
field :view_count, :type => Integer, :default => 0
|
||||||
@@ -22,7 +22,6 @@ class Page < Item
|
|||||||
|
|
||||||
field :frontend_data_count
|
field :frontend_data_count
|
||||||
|
|
||||||
belongs_to :theme
|
|
||||||
belongs_to :design
|
belongs_to :design
|
||||||
belongs_to :module_app
|
belongs_to :module_app
|
||||||
has_many :page_parts, :dependent => :destroy
|
has_many :page_parts, :dependent => :destroy
|
||||||
|
|||||||
@@ -11,17 +11,10 @@ class Site
|
|||||||
field :roaming_id
|
field :roaming_id
|
||||||
field :private_key, :type => Binary
|
field :private_key, :type => Binary
|
||||||
field :public_key, :type => Binary
|
field :public_key, :type => Binary
|
||||||
|
|
||||||
field :frontend_closed, :type => Boolean, :default => false
|
|
||||||
field :backend_openness_on, :type => Boolean, :default => false
|
|
||||||
|
|
||||||
field :title_always_on, :type => Boolean, :default => false
|
field :title_always_on, :type => Boolean, :default => false
|
||||||
field :dashbroad_allow_visitor, :type => Boolean, :default => false
|
field :dashbroad_allow_visitor, :type => Boolean, :default => false
|
||||||
field :mail_settings, :type => Hash
|
field :mail_settings, :type => Hash
|
||||||
|
|
||||||
field :disk_space, :type => String
|
|
||||||
field :system_package_info, :type => Hash,:default=>{}
|
|
||||||
|
|
||||||
field :school
|
field :school
|
||||||
field :department
|
field :department
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
class SubRoleTag < ProtoTag
|
class SubRoleTag < ProtoTag
|
||||||
has_and_belongs_to_many :sub_roles
|
has_and_belongs_to_many :sub_roles
|
||||||
|
|
||||||
end
|
end
|
||||||
+22
-25
@@ -10,36 +10,33 @@ class Tag
|
|||||||
|
|
||||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||||
|
|
||||||
field :name, localize: true
|
field :key
|
||||||
field :view_count, :type => Integer, :default => 0
|
field :view_count, :type => Integer, :default => 0
|
||||||
field :cloud_view_count, :type => Integer, :default => 0
|
field :cloud_view_count, :type => Integer, :default => 0
|
||||||
|
|
||||||
belongs_to :module_tag, polymorphic: true
|
|
||||||
has_many :taggings, dependent: :destroy
|
|
||||||
|
|
||||||
#field :cloud_amper,:type: Integer,:default=> 0
|
#field :cloud_amper,:type: Integer,:default=> 0
|
||||||
|
|
||||||
# def self.sorted_for_cloud
|
def self.sorted_for_cloud
|
||||||
# tags = {}
|
tags = {}
|
||||||
# self.all.each{ |tag|
|
self.all.each{ |tag|
|
||||||
# tags.merge!({tag => self.get_impressionist(tag)})
|
tags.merge!({tag => self.get_impressionist(tag)})
|
||||||
# }
|
}
|
||||||
# if !tags.blank?
|
if !tags.blank?
|
||||||
# sorted_tags = tags.sort{|a,b| a[1]<=>b[1]}.reverse
|
sorted_tags = tags.sort{|a,b| a[1]<=>b[1]}.reverse
|
||||||
# sorted_tags[0][1] = :hot1
|
sorted_tags[0][1] = :hot1
|
||||||
# offset = (sorted_tags.size - 1) / 3
|
offset = (sorted_tags.size - 1) / 3
|
||||||
# i = 1
|
i = 1
|
||||||
# class_i = 2
|
class_i = 2
|
||||||
# sorted_tags[1..-1].collect!{ |x|
|
sorted_tags[1..-1].collect!{ |x|
|
||||||
# x[1] = "hot#{class_i}"
|
x[1] = "hot#{class_i}"
|
||||||
# i == offset ? i = 1 : i += 1 if class_i < 4
|
i == offset ? i = 1 : i += 1 if class_i < 4
|
||||||
# class_i += 1 if i == offset && class_i < 4
|
class_i += 1 if i == offset && class_i < 4
|
||||||
# }
|
}
|
||||||
# sorted_tags
|
sorted_tags
|
||||||
# else
|
else
|
||||||
# []
|
[]
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
class Tagging
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
|
|
||||||
field :to_destroy, default: false
|
|
||||||
|
|
||||||
belongs_to :tag
|
|
||||||
belongs_to :taggable, polymorphic: true
|
|
||||||
|
|
||||||
before_destroy :update_taggable_tag_ids
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def update_taggable_tag_ids
|
|
||||||
self.taggable.remove_id(self.tag.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -11,14 +11,9 @@ class Role < Attribute
|
|||||||
|
|
||||||
has_many :sub_roles, :autosave => true, :dependent => :destroy
|
has_many :sub_roles, :autosave => true, :dependent => :destroy
|
||||||
has_many :users
|
has_many :users
|
||||||
# has_many :statuses, :autosave => true, :dependent => :destroy
|
has_many :statuses, :autosave => true, :dependent => :destroy
|
||||||
# has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
# has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
||||||
has_many :role_statuses, :autosave => true, :dependent => :destroy
|
|
||||||
has_many :role_categorys, :autosave => true, :dependent => :destroy
|
|
||||||
|
|
||||||
accepts_nested_attributes_for :sub_roles, :allow_destroy => true
|
accepts_nested_attributes_for :sub_roles, :allow_destroy => true
|
||||||
accepts_nested_attributes_for :role_statuses, :allow_destroy => true
|
|
||||||
accepts_nested_attributes_for :role_categorys, :allow_destroy => true
|
|
||||||
|
|
||||||
def is_built_in?
|
def is_built_in?
|
||||||
self.built_in
|
self.built_in
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
class RoleCategory < RoleFilter
|
|
||||||
|
|
||||||
has_and_belongs_to_many :users
|
|
||||||
belongs_to :role
|
|
||||||
|
|
||||||
def self.get_role_data(role_key)
|
|
||||||
|
|
||||||
@role = Role.where(:key =>role_key).first
|
|
||||||
|
|
||||||
return @role.id
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
class RoleFilter
|
|
||||||
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
# include OrbitCoreLib::ObjectAuthable
|
|
||||||
include OrbitCoreLib::ObjectDisable
|
|
||||||
|
|
||||||
|
|
||||||
field :key
|
|
||||||
field :title, localize: true
|
|
||||||
|
|
||||||
# belongs_to :role
|
|
||||||
|
|
||||||
def pp_object
|
|
||||||
title
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.from_id(id)
|
|
||||||
RoleFilter.find(id) rescue nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.is_localized?(field_name)
|
|
||||||
self.fields[field_name.to_s].localized?
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
class RoleStatus < RoleFilter
|
|
||||||
|
|
||||||
has_and_belongs_to_many :users
|
|
||||||
belongs_to :role
|
|
||||||
|
|
||||||
scope :can_display,where(disable: false)
|
|
||||||
|
|
||||||
def self.get_role_data(role_key)
|
|
||||||
|
|
||||||
@role = Role.where(:key =>role_key).first
|
|
||||||
|
|
||||||
return @role.id
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
+5
-72
@@ -9,13 +9,7 @@ class User
|
|||||||
|
|
||||||
field :admin, :type => Boolean, :default => true
|
field :admin, :type => Boolean, :default => true
|
||||||
field :active_role
|
field :active_role
|
||||||
field :user_id
|
|
||||||
field :sid
|
|
||||||
field :first_name, localize: true
|
|
||||||
field :last_name, localize: true
|
|
||||||
field :email
|
field :email
|
||||||
field :sex, :default => 'unknown'
|
|
||||||
field :office_tel
|
|
||||||
field :cache_dept,type: Hash
|
field :cache_dept,type: Hash
|
||||||
field :status_record,type: Hash
|
field :status_record,type: Hash
|
||||||
|
|
||||||
@@ -26,19 +20,14 @@ class User
|
|||||||
|
|
||||||
has_many :managing_apps,:class_name => "AppManager", :dependent => :destroy
|
has_many :managing_apps,:class_name => "AppManager", :dependent => :destroy
|
||||||
has_one :desktop, :autosave => true, :dependent => :destroy
|
has_one :desktop, :autosave => true, :dependent => :destroy
|
||||||
has_one :facebook, :autosave => true, :dependent => :destroy
|
|
||||||
has_many :other_accounts, :autosave => true, :dependent => :destroy
|
has_many :other_accounts, :autosave => true, :dependent => :destroy
|
||||||
# has_many :journals, :autosave => true, :dependent => :destroy
|
# has_many :journals, :autosave => true, :dependent => :destroy
|
||||||
# has_many :papers, :autosave => true, :dependent => :destroy
|
# has_many :papers, :autosave => true, :dependent => :destroy
|
||||||
has_and_belongs_to_many :sub_role_tags
|
has_and_belongs_to_many :sub_role_tags
|
||||||
|
|
||||||
has_many :user_actions, :dependent => :destroy
|
has_and_belongs_to_many :statuses
|
||||||
|
|
||||||
# has_and_belongs_to_many :statuses
|
|
||||||
has_and_belongs_to_many :roles
|
has_and_belongs_to_many :roles
|
||||||
has_and_belongs_to_many :sub_roles
|
has_and_belongs_to_many :sub_roles
|
||||||
has_and_belongs_to_many :role_statuses
|
|
||||||
has_and_belongs_to_many :role_categorys
|
|
||||||
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
||||||
|
|
||||||
before_create :initialize_desktop
|
before_create :initialize_desktop
|
||||||
@@ -47,9 +36,6 @@ class User
|
|||||||
scope :remote_account, where(:nccu_id.ne => nil)
|
scope :remote_account, where(:nccu_id.ne => nil)
|
||||||
scope :not_guest_user, all_of(:name.ne => "guest")
|
scope :not_guest_user, all_of(:name.ne => "guest")
|
||||||
|
|
||||||
validates :user_id,
|
|
||||||
:presence => { :message => I18n.t("users.user_id_not_null") } ,
|
|
||||||
:length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") }
|
|
||||||
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
|
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
|
||||||
|
|
||||||
# def new_attribute_values=(vars)
|
# def new_attribute_values=(vars)
|
||||||
@@ -115,24 +101,6 @@ class User
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def role_status=(var)
|
|
||||||
self.role_statuses = []
|
|
||||||
var[:id].each do |id,val|
|
|
||||||
if (val=="true")
|
|
||||||
self.role_statuses << RoleStatus.find(id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def role_category=(var)
|
|
||||||
self.role_categorys = []
|
|
||||||
var[:id].each do |id,val|
|
|
||||||
if (val=="true")
|
|
||||||
self.role_categorys << RoleCategory.find(id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def set_sub_role(sub_role_id,status_id)
|
def set_sub_role(sub_role_id,status_id)
|
||||||
@@ -176,24 +144,6 @@ class User
|
|||||||
}.uniq!
|
}.uniq!
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_member_list_attribute_field_name(role_type,field_key)
|
|
||||||
@attribute = ::Attribute.where(:key => role_type).first
|
|
||||||
return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first.title
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_member_list_attribute_value(user_id,role_type,field_key)
|
|
||||||
@attribute = ::Attribute.where(:key => role_type).first
|
|
||||||
@AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
|
|
||||||
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get_role_member_data_by_sort(role_status_id)
|
|
||||||
a = Array.new
|
|
||||||
where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,"staff","job_title")['val'].to_i, t ] }
|
|
||||||
member_data = a.sort
|
|
||||||
member_data_tmp = member_data.collect {|v| v[1] }
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_dept_cache
|
def create_dept_cache
|
||||||
dept_hash = {}
|
dept_hash = {}
|
||||||
|
|
||||||
@@ -220,30 +170,12 @@ class User
|
|||||||
(query1 + query2).uniq
|
(query1 + query2).uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
# def name
|
|
||||||
# info = Class::Info.first(:conditions => {:key => 'profile'})
|
|
||||||
# if info
|
|
||||||
# first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
|
|
||||||
# last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
|
|
||||||
# full_name = "#{last_name} #{first_name}"
|
|
||||||
|
|
||||||
# if full_name.strip.empty?
|
|
||||||
# full_name = email
|
|
||||||
# end
|
|
||||||
|
|
||||||
# return full_name
|
|
||||||
# else
|
|
||||||
# return nil
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
def name
|
def name
|
||||||
info = Class::Info.first(:conditions => {:key => 'profile'})
|
info = Class::Info.first(:conditions => {:key => 'profile'})
|
||||||
if info
|
if info
|
||||||
# first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
|
first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
|
||||||
# last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
|
last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
|
||||||
# full_name = (I18n.locale != 'zh_tw') ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
|
full_name = "#{last_name} #{first_name}"
|
||||||
full_name = (I18n.locale.to_s == 'zh_tw') ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
|
|
||||||
|
|
||||||
if full_name.strip.empty?
|
if full_name.strip.empty?
|
||||||
full_name = email
|
full_name = email
|
||||||
@@ -279,6 +211,7 @@ class User
|
|||||||
self.roles = self.roles.uniq
|
self.roles = self.roles.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def rebuild_status_record
|
def rebuild_status_record
|
||||||
self.status_record = {}
|
self.status_record = {}
|
||||||
self.attribute_values.reject{|t| t.key!='status'}.each do |status|
|
self.attribute_values.reject{|t| t.key!='status'}.each do |status|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
class UserAction
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
|
|
||||||
belongs_to :user
|
|
||||||
field :params,:type => Hash
|
|
||||||
|
|
||||||
field :page
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="label-group">
|
<div class="label-group">
|
||||||
<div class="label-td">
|
<div class="label-td">
|
||||||
<% asset.sorted_tags.each do |tag| %>
|
<% asset.sorted_tags.each do |tag| %>
|
||||||
<span class="label label-tags"><%= tag.name %></span>
|
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
<%= content_tag :label, :class => "checkbox inline" do -%>
|
<%= content_tag :label, :class => "checkbox inline" do -%>
|
||||||
<%= check_box_tag 'asset[tag_ids][]', tag.id, @asset.tag_ids.include?(tag.id) %>
|
<%= check_box_tag 'asset[tag_ids][]', tag.id, @asset.tag_ids.include?(tag.id) %>
|
||||||
<%= tag.name %>
|
<%= tag[I18n.locale] %>
|
||||||
<%= hidden_field_tag 'asset[tag_ids][]', '' %>
|
<%= hidden_field_tag 'asset[tag_ids][]', '' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% content_for :side_bar do %>
|
<% content_for :side_bar do %>
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member_), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% content_for :side_bar do %>
|
<% content_for :side_bar do %>
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member_), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
@@ -37,8 +37,6 @@
|
|||||||
<% if @attribute_type == 'role' %>
|
<% if @attribute_type == 'role' %>
|
||||||
<li><%= link_to t(:role_field), eval("admin_#{@attribute_type}_role_field_path(attribute)") %></li>
|
<li><%= link_to t(:role_field), eval("admin_#{@attribute_type}_role_field_path(attribute)") %></li>
|
||||||
<li><%= link_to t(:sub_role), eval("admin_#{@attribute_type}_sub_role_path(attribute)") %></li>
|
<li><%= link_to t(:sub_role), eval("admin_#{@attribute_type}_sub_role_path(attribute)") %></li>
|
||||||
<li><%= link_to t(:status), eval("admin_role_statuses_path(:role_id=>attribute)") %></li>
|
|
||||||
<li><%= link_to t(:category), eval("admin_role_categorys_path(:role_id=>attribute)") %></li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
|
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
|
||||||
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
|
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item element">
|
<!-- <div class="item element">
|
||||||
<h3><i class="icons-"></i><a href=""><%= t(:member_) %></a></h3>
|
<h3><i class="icons-"></i><a href=""><%= t(:member) %></a></h3>
|
||||||
<div class="detail w-a h-a">
|
<div class="detail w-a h-a">
|
||||||
<p class="totle"><span><%= t(:all_member) %></span>2,217</p>
|
<p class="totle"><span><%= t(:all_member) %></span>2,217</p>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
|
|||||||
@@ -9,5 +9,4 @@
|
|||||||
|
|
||||||
<div class="form-actions form-fixed pagination-right">
|
<div class="form-actions form-fixed pagination-right">
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:add), new_admin_design_path, :class => 'btn btn-primary pull-right' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:add), new_admin_design_path, :class => 'btn btn-primary pull-right' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:upload), upload_package_admin_designs_path, :class => 'btn btn-primary pull-right' %>
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<% content_for :side_bar do %>
|
<% content_for :side_bar do %>
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %>
|
<%= render 'admin/sites/side_bar' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<div class="main2">
|
<div class="main2">
|
||||||
<%= form_tag '',:multipart => true,:action=>"post" do |f| %>
|
<%= form_tag '',:multipart => true,:action=>"post" do |f| %>
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,5 @@
|
|||||||
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
||||||
</ol>
|
</ol>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$.ajaxSetup({
|
|
||||||
error: function(xhr, status, err) {
|
|
||||||
if (xhr.status == 401){
|
|
||||||
alert("<%= I18n.t('access.denied.ajax_401_error') %>");
|
|
||||||
window.location.href = '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bindTreeDragHandle();
|
bindTreeDragHandle();
|
||||||
</script>
|
</script>
|
||||||
Loaded 100 of 945 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user