diff --git a/.gitignore b/.gitignore index 7166a15b..d27ac727 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,8 @@ public/assets config/application.rb .rvmrc + +app/assets/javascripts/.DS_Store + +solr +Gemfile.lock diff --git a/Gemfile b/Gemfile index 0fb3acd0..40270a73 100644 --- a/Gemfile +++ b/Gemfile @@ -12,14 +12,13 @@ gem 'exception_notification' # Send error trace gem 'execjs' gem 'jquery-rails' gem 'jquery-ui-rails' - gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git' # gem "memcached", "~> 1.4.3" # gem "memcache-client" gem 'mini_magick' -gem 'mongoid' +gem 'mongoid', '> 2.1', '< 3.0.0' gem 'mongoid-tree', :require => 'mongoid/tree' gem "mongo_session_store-rails3" gem 'mysql2' @@ -32,7 +31,7 @@ gem 'resque', :require => 'resque/server' # background jobs gem 'resque-scheduler' # job scheduling gem 'resque-restriction' #gem 'rb-readline' -gem 'ruby-debug19' +# gem 'ruby-debug19' gem 'rubyzip' gem 'sunspot_mongo' @@ -40,26 +39,26 @@ gem 'sunspot_solr' gem 'progress_bar' gem 'sinatra' +#gem 'sinatra-contrib' gem 'sprockets' gem 'social-share-button' gem 'tinymce-rails' gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux") +gem 'mongoid-encryptor', :require => 'mongoid/encryptor' gem 'rb-readline' if RUBY_PLATFORM.downcase.include?("linux") -#gem "impressionist", :require => "impressionist", :path => "vendor/impressionist" gem "impressionist", :git => 'git://github.com/charlotte-ruby/impressionist.git' - - - +#gem 'contacts' +#gem 'event-calendar', :require => 'event_calendar'#, :git => 'git://github.com/elevation/event_calendar.git' gem 'redis','>= 2.1.1' gem 'chinese_pinyin', '0.4.1' # add rmmseg if you need search by segment words gem 'rmmseg-cpp-huacnlee', '0.2.9' -gem 'redis-namespace','~> 1.0.2' -gem 'redis-search', '0.7.1' +gem 'redis-namespace' +gem 'redis-search' # Gems used only for assets and not required # in production environments by default. @@ -71,6 +70,11 @@ end group :test, :development do + gem 'pry' + gem 'pry-remote' + gem 'pry-stack_explorer' + gem 'pry-debugger' + gem "sunspot-rails-tester" gem 'spork' gem 'database_cleaner' #Strategies for cleaning databases. Can be used to ensure a clean state for testing. diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index a28df6b1..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,342 +0,0 @@ -GIT - remote: git://github.com/amatsuda/kaminari.git - revision: b4b1e578ad81b803522d9bc28713bf1b20e7ded9 - specs: - kaminari (0.14.1) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - -GIT - remote: git://github.com/charlotte-ruby/impressionist.git - revision: 7a93fff25568cd3edcc63c1a3c4b60dc6b81d2b7 - specs: - impressionist (1.1.1) - httpclient (~> 2.2) - nokogiri (~> 1.5) - -GEM - remote: http://rubygems.org/ - specs: - actionmailer (3.1.8) - actionpack (= 3.1.8) - mail (~> 2.3.3) - actionpack (3.1.8) - activemodel (= 3.1.8) - activesupport (= 3.1.8) - builder (~> 3.0.0) - erubis (~> 2.7.0) - i18n (~> 0.6) - rack (~> 1.3.6) - rack-cache (~> 1.2) - rack-mount (~> 0.8.2) - rack-test (~> 0.6.1) - sprockets (~> 2.0.4) - activemodel (3.1.8) - activesupport (= 3.1.8) - builder (~> 3.0.0) - i18n (~> 0.6) - activerecord (3.1.8) - activemodel (= 3.1.8) - activesupport (= 3.1.8) - arel (~> 2.2.3) - tzinfo (~> 0.3.29) - activeresource (3.1.8) - activemodel (= 3.1.8) - activesupport (= 3.1.8) - activesupport (3.1.8) - multi_json (>= 1.0, < 1.3) - archive-tar-minitar (0.5.2) - arel (2.2.3) - bcrypt-ruby (3.0.1) - brakeman (1.8.0) - activesupport - erubis (~> 2.6) - fastercsv (~> 1.5) - haml (~> 3.0) - highline (~> 1.6) - i18n - json_pure - ruby2ruby (~> 1.2) - ruby_parser (= 2.3.1) - sass (~> 3.0) - terminal-table (~> 1.4) - bson (1.7.0) - bson_ext (1.7.0) - bson (~> 1.7.0) - builder (3.0.3) - carrierwave (0.5.8) - activesupport (~> 3.0) - carrierwave-mongoid (0.1.6) - carrierwave (~> 0.5.6) - mongoid (~> 2.1) - chinese_pinyin (0.4.1) - chronic (0.8.0) - coffee-rails (3.1.1) - coffee-script (>= 2.2.0) - railties (~> 3.1.0) - coffee-script (2.2.0) - coffee-script-source - execjs - coffee-script-source (1.3.3) - columnize (0.3.6) - database_cleaner (0.8.0) - delorean (2.0.0) - chronic - devise (1.5.3) - bcrypt-ruby (~> 3.0) - orm_adapter (~> 0.0.3) - warden (~> 1.1) - diff-lcs (1.1.3) - erubis (2.7.0) - exception_notification (2.6.1) - actionmailer (>= 3.0.4) - execjs (1.4.0) - multi_json (~> 1.0) - factory_girl (4.1.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.1.0) - factory_girl (~> 4.1.0) - railties (>= 3.0.0) - fastercsv (1.5.5) - fattr (2.2.1) - haml (3.1.7) - highline (1.6.15) - hike (1.2.1) - httpclient (2.2.7) - i18n (0.6.1) - jquery-rails (2.1.2) - railties (>= 3.1.0, < 5.0) - thor (~> 0.14) - jquery-ui-rails (2.0.0) - jquery-rails - railties (>= 3.1.0) - json (1.7.5) - json_pure (1.7.5) - libv8 (3.3.10.4) - linecache19 (0.5.12) - ruby_core_source (>= 0.1.4) - mail (2.3.3) - i18n (>= 0.4.0) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.19) - mini_magick (3.4) - subexec (~> 0.2.1) - mongo (1.7.0) - bson (~> 1.7.0) - mongo_session_store-rails3 (3.0.6) - actionpack (>= 3.0) - mongo - mongoid (2.5.0) - activemodel (~> 3.1) - mongo (~> 1.7) - tzinfo (~> 0.3.22) - mongoid-tree (0.7.0) - mongoid (~> 2.0) - multi_json (1.2.0) - mysql2 (0.3.11) - net-ldap (0.3.1) - nokogiri (1.5.5) - 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) - rack (1.3.6) - rack-cache (1.2) - rack (>= 0.4) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-protection (1.2.0) - rack - rack-ssl (1.3.2) - rack - rack-test (0.6.1) - rack (>= 1.0) - radius (0.7.3) - rails (3.1.8) - actionmailer (= 3.1.8) - actionpack (= 3.1.8) - activerecord (= 3.1.8) - activeresource (= 3.1.8) - activesupport (= 3.1.8) - bundler (~> 1.0) - railties (= 3.1.8) - railties (3.1.8) - actionpack (= 3.1.8) - activesupport (= 3.1.8) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (~> 0.14.6) - rake (0.9.2.2) - rb-readline (0.4.2) - rdoc (3.12) - json (~> 1.4) - redis (2.2.2) - redis-namespace (1.0.3) - redis (< 3.0.0) - redis-search (0.7.1) - chinese_pinyin (>= 0.3.0) - redis (>= 2.1.1) - redis-namespace (~> 1.0.2) - resque (1.22.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.11.0) - rspec-core (~> 2.11.0) - rspec-expectations (~> 2.11.0) - rspec-mocks (~> 2.11.0) - rspec-core (2.11.1) - rspec-expectations (2.11.3) - diff-lcs (~> 1.1.3) - rspec-mocks (2.11.2) - rspec-rails (2.11.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec (~> 2.11.0) - ruby-debug-base19 (0.11.25) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby_core_source (>= 0.1.4) - ruby-debug19 (0.11.5) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby-debug-base19 (>= 0.11.15) - ruby2ruby (1.3.1) - ruby_parser (~> 2.0) - sexp_processor (~> 3.0) - ruby_core_source (0.1.5) - archive-tar-minitar (>= 0.5.2) - ruby_parser (2.3.1) - sexp_processor (~> 3.0) - rubyzip (0.9.9) - rufus-scheduler (2.0.17) - tzinfo (>= 0.3.23) - sass (3.2.1) - sass-rails (3.1.6) - actionpack (~> 3.1.0) - railties (~> 3.1.0) - sass (>= 3.1.10) - tilt (~> 1.3.2) - sexp_processor (3.2.0) - shoulda-matchers (1.3.0) - activesupport (>= 3.0.0) - simplecov (0.6.4) - multi_json (~> 1.0) - simplecov-html (~> 0.5.3) - simplecov-html (0.5.3) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) - social-share-button (0.0.8) - spork (0.9.2) - sprockets (2.0.4) - hike (~> 1.2) - 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) - therubyracer (0.10.2) - libv8 (~> 3.3.10) - thor (0.14.6) - tilt (1.3.3) - tinymce-rails (3.4.8) - railties (>= 3.1) - treetop (1.4.10) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.33) - 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) - -PLATFORMS - ruby - -DEPENDENCIES - brakeman - bson_ext - carrierwave - carrierwave-mongoid - chinese_pinyin (= 0.4.1) - coffee-rails - database_cleaner - delorean - devise (= 1.5.3) - exception_notification - execjs - factory_girl_rails - impressionist! - jquery-rails - jquery-ui-rails - kaminari! - mini_magick - mongo_session_store-rails3 - mongoid - mongoid-tree - mysql2 - net-ldap (~> 0.3.1) - nokogiri - progress_bar - radius - rails (>= 3.1.0, < 3.2.0) - rake - rb-readline - redis (>= 2.1.1) - redis-namespace (~> 1.0.2) - redis-search (= 0.7.1) - resque - resque-restriction - resque-scheduler - rmmseg-cpp-huacnlee (= 0.2.9) - rspec (~> 2.0) - rspec-rails (~> 2.0) - ruby-debug19 - rubyzip - sass-rails - shoulda-matchers - simplecov - sinatra - social-share-button - spork - sprockets - sunspot-rails-tester - sunspot_mongo - sunspot_solr - therubyracer - tinymce-rails - uglifier - watchr diff --git a/app/assets/fonts/desktop/fontawesome-webfont.eot b/app/assets/fonts/desktop/fontawesome-webfont.eot new file mode 100755 index 00000000..89070c1e Binary files /dev/null and b/app/assets/fonts/desktop/fontawesome-webfont.eot differ diff --git a/app/assets/fonts/desktop/fontawesome-webfont.svg b/app/assets/fonts/desktop/fontawesome-webfont.svg new file mode 100755 index 00000000..1245f92c --- /dev/null +++ b/app/assets/fonts/desktop/fontawesome-webfont.svg @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/desktop/fontawesome-webfont.ttf b/app/assets/fonts/desktop/fontawesome-webfont.ttf new file mode 100755 index 00000000..c17e9f8d Binary files /dev/null and b/app/assets/fonts/desktop/fontawesome-webfont.ttf differ diff --git a/app/assets/fonts/desktop/fontawesome-webfont.woff b/app/assets/fonts/desktop/fontawesome-webfont.woff new file mode 100755 index 00000000..09f2469a Binary files /dev/null and b/app/assets/fonts/desktop/fontawesome-webfont.woff differ diff --git a/app/assets/images/-sign-in-logo.png b/app/assets/images/-sign-in-logo.png deleted file mode 100644 index 53756c7c..00000000 Binary files a/app/assets/images/-sign-in-logo.png and /dev/null differ diff --git a/app/assets/images/connection/Thumbs.db b/app/assets/images/connection/Thumbs.db new file mode 100755 index 00000000..47897e3f Binary files /dev/null and b/app/assets/images/connection/Thumbs.db differ diff --git a/app/assets/images/connection/facebook.png b/app/assets/images/connection/facebook.png new file mode 100755 index 00000000..f8c4f219 Binary files /dev/null and b/app/assets/images/connection/facebook.png differ diff --git a/app/assets/images/connection/gmail.png b/app/assets/images/connection/gmail.png new file mode 100755 index 00000000..ec897f23 Binary files /dev/null and b/app/assets/images/connection/gmail.png differ diff --git a/app/assets/images/connection/twitter.png b/app/assets/images/connection/twitter.png new file mode 100755 index 00000000..a8071eea Binary files /dev/null and b/app/assets/images/connection/twitter.png differ diff --git a/app/assets/images/facebook.png b/app/assets/images/facebook.png new file mode 100644 index 00000000..3bfe4bac Binary files /dev/null and b/app/assets/images/facebook.png differ diff --git a/app/assets/images/gmail.png b/app/assets/images/gmail.png new file mode 100644 index 00000000..dd2d70a8 Binary files /dev/null and b/app/assets/images/gmail.png differ diff --git a/app/assets/images/icons/bookkeeper.png b/app/assets/images/icons/bookkeeper.png new file mode 100755 index 00000000..41b3bf26 Binary files /dev/null and b/app/assets/images/icons/bookkeeper.png differ diff --git a/app/assets/images/icons/calendar.png b/app/assets/images/icons/calendar.png new file mode 100755 index 00000000..a2f6ae71 Binary files /dev/null and b/app/assets/images/icons/calendar.png differ diff --git a/app/assets/images/icons/dailyenglish.png b/app/assets/images/icons/dailyenglish.png new file mode 100644 index 00000000..c820bd61 Binary files /dev/null and b/app/assets/images/icons/dailyenglish.png differ diff --git a/app/assets/images/icons/diary.png b/app/assets/images/icons/diary.png new file mode 100755 index 00000000..38bfa20c Binary files /dev/null and b/app/assets/images/icons/diary.png differ diff --git a/app/assets/images/icons/doc.png b/app/assets/images/icons/doc.png new file mode 100755 index 00000000..36cb273b Binary files /dev/null and b/app/assets/images/icons/doc.png differ diff --git a/app/assets/images/icons/facebook.png b/app/assets/images/icons/facebook.png new file mode 100755 index 00000000..03c3ddd5 Binary files /dev/null and b/app/assets/images/icons/facebook.png differ diff --git a/app/assets/images/icons/gmail.png b/app/assets/images/icons/gmail.png new file mode 100755 index 00000000..44ff25b7 Binary files /dev/null and b/app/assets/images/icons/gmail.png differ diff --git a/app/assets/images/icons/iclock.png b/app/assets/images/icons/iclock.png new file mode 100755 index 00000000..4200755e Binary files /dev/null and b/app/assets/images/icons/iclock.png differ diff --git a/app/assets/images/icons/movies.png b/app/assets/images/icons/movies.png new file mode 100755 index 00000000..6e75b450 Binary files /dev/null and b/app/assets/images/icons/movies.png differ diff --git a/app/assets/images/icons/musicbox.png b/app/assets/images/icons/musicbox.png new file mode 100755 index 00000000..6071215f Binary files /dev/null and b/app/assets/images/icons/musicbox.png differ diff --git a/app/assets/images/icons/newsfeed.png b/app/assets/images/icons/newsfeed.png new file mode 100755 index 00000000..cb20cd92 Binary files /dev/null and b/app/assets/images/icons/newsfeed.png differ diff --git a/app/assets/images/icons/quotes.png b/app/assets/images/icons/quotes.png new file mode 100644 index 00000000..d22866fd Binary files /dev/null and b/app/assets/images/icons/quotes.png differ diff --git a/app/assets/images/icons/talk.png b/app/assets/images/icons/talk.png new file mode 100755 index 00000000..6f498870 Binary files /dev/null and b/app/assets/images/icons/talk.png differ diff --git a/app/assets/images/icons/ted.png b/app/assets/images/icons/ted.png new file mode 100755 index 00000000..d9063ce0 Binary files /dev/null and b/app/assets/images/icons/ted.png differ diff --git a/app/assets/images/icons/weather.png b/app/assets/images/icons/weather.png new file mode 100755 index 00000000..d7033439 Binary files /dev/null and b/app/assets/images/icons/weather.png differ diff --git a/app/assets/images/icons/youtube.png b/app/assets/images/icons/youtube.png new file mode 100755 index 00000000..400ce4c1 Binary files /dev/null and b/app/assets/images/icons/youtube.png differ diff --git a/app/assets/images/linkedin.png b/app/assets/images/linkedin.png new file mode 100644 index 00000000..3c989802 Binary files /dev/null and b/app/assets/images/linkedin.png differ diff --git a/app/assets/images/miniColors/circle.gif b/app/assets/images/miniColors/circle.gif new file mode 100755 index 00000000..599f7f13 Binary files /dev/null and b/app/assets/images/miniColors/circle.gif differ diff --git a/app/assets/images/miniColors/gradient.png b/app/assets/images/miniColors/gradient.png new file mode 100755 index 00000000..561cdd9c Binary files /dev/null and b/app/assets/images/miniColors/gradient.png differ diff --git a/app/assets/images/miniColors/line.gif b/app/assets/images/miniColors/line.gif new file mode 100755 index 00000000..9eb19837 Binary files /dev/null and b/app/assets/images/miniColors/line.gif differ diff --git a/app/assets/images/miniColors/rainbow.png b/app/assets/images/miniColors/rainbow.png new file mode 100755 index 00000000..8d6c71bf Binary files /dev/null and b/app/assets/images/miniColors/rainbow.png differ diff --git a/app/assets/images/miniColors/trigger.png b/app/assets/images/miniColors/trigger.png new file mode 100755 index 00000000..8c169fd6 Binary files /dev/null and b/app/assets/images/miniColors/trigger.png differ diff --git a/app/assets/images/ncculogo.ico b/app/assets/images/ncculogo.ico index 3aa5e1c6..0550cd4b 100644 Binary files a/app/assets/images/ncculogo.ico and b/app/assets/images/ncculogo.ico differ diff --git a/app/assets/images/ncculogo_bk.ico b/app/assets/images/ncculogo_bk.ico new file mode 100644 index 00000000..3aa5e1c6 Binary files /dev/null and b/app/assets/images/ncculogo_bk.ico differ diff --git a/app/assets/images/note_alert.png b/app/assets/images/note_alert.png new file mode 100644 index 00000000..6ebda48e Binary files /dev/null and b/app/assets/images/note_alert.png differ diff --git a/app/assets/images/note_imp.png b/app/assets/images/note_imp.png new file mode 100644 index 00000000..eb1306a9 Binary files /dev/null and b/app/assets/images/note_imp.png differ diff --git a/app/assets/images/note_success.png b/app/assets/images/note_success.png new file mode 100644 index 00000000..5d5ae2ad Binary files /dev/null and b/app/assets/images/note_success.png differ diff --git a/app/assets/images/sample_theme.jpg b/app/assets/images/sample_theme.jpg new file mode 100755 index 00000000..03945979 Binary files /dev/null and b/app/assets/images/sample_theme.jpg differ diff --git a/app/assets/images/sign-in-logo-nccu.png b/app/assets/images/sign-in-logo-nccu.png new file mode 100644 index 00000000..a3148bab Binary files /dev/null and b/app/assets/images/sign-in-logo-nccu.png differ diff --git a/app/assets/images/sign-in-logo.png b/app/assets/images/sign-in-logo.png index a3148bab..53756c7c 100644 Binary files a/app/assets/images/sign-in-logo.png and b/app/assets/images/sign-in-logo.png differ diff --git a/app/assets/images/stockBackground/1.jpg b/app/assets/images/stockBackground/1.jpg new file mode 100755 index 00000000..5981dcf2 Binary files /dev/null and b/app/assets/images/stockBackground/1.jpg differ diff --git a/app/assets/images/stockBackground/10.jpg b/app/assets/images/stockBackground/10.jpg new file mode 100755 index 00000000..3b1faa7f Binary files /dev/null and b/app/assets/images/stockBackground/10.jpg differ diff --git a/app/assets/images/stockBackground/11.jpg b/app/assets/images/stockBackground/11.jpg new file mode 100755 index 00000000..88ab7bdf Binary files /dev/null and b/app/assets/images/stockBackground/11.jpg differ diff --git a/app/assets/images/stockBackground/12.jpg b/app/assets/images/stockBackground/12.jpg new file mode 100755 index 00000000..e9385131 Binary files /dev/null and b/app/assets/images/stockBackground/12.jpg differ diff --git a/app/assets/images/stockBackground/2.jpg b/app/assets/images/stockBackground/2.jpg new file mode 100755 index 00000000..9fed12fc Binary files /dev/null and b/app/assets/images/stockBackground/2.jpg differ diff --git a/app/assets/images/stockBackground/3.jpg b/app/assets/images/stockBackground/3.jpg new file mode 100755 index 00000000..7a2cf18a Binary files /dev/null and b/app/assets/images/stockBackground/3.jpg differ diff --git a/app/assets/images/stockBackground/4.jpg b/app/assets/images/stockBackground/4.jpg new file mode 100755 index 00000000..c2bfc14e Binary files /dev/null and b/app/assets/images/stockBackground/4.jpg differ diff --git a/app/assets/images/stockBackground/5.jpg b/app/assets/images/stockBackground/5.jpg new file mode 100755 index 00000000..0db9de93 Binary files /dev/null and b/app/assets/images/stockBackground/5.jpg differ diff --git a/app/assets/images/stockBackground/6.jpg b/app/assets/images/stockBackground/6.jpg new file mode 100755 index 00000000..867ad0f9 Binary files /dev/null and b/app/assets/images/stockBackground/6.jpg differ diff --git a/app/assets/images/stockBackground/7.jpg b/app/assets/images/stockBackground/7.jpg new file mode 100755 index 00000000..370313a2 Binary files /dev/null and b/app/assets/images/stockBackground/7.jpg differ diff --git a/app/assets/images/stockBackground/8.jpg b/app/assets/images/stockBackground/8.jpg new file mode 100755 index 00000000..919fabf4 Binary files /dev/null and b/app/assets/images/stockBackground/8.jpg differ diff --git a/app/assets/images/stockBackground/9.jpg b/app/assets/images/stockBackground/9.jpg new file mode 100755 index 00000000..3bba544e Binary files /dev/null and b/app/assets/images/stockBackground/9.jpg differ diff --git a/app/assets/images/stockBackground/thumb/1.jpg b/app/assets/images/stockBackground/thumb/1.jpg new file mode 100755 index 00000000..38b23586 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/1.jpg differ diff --git a/app/assets/images/stockBackground/thumb/10.jpg b/app/assets/images/stockBackground/thumb/10.jpg new file mode 100755 index 00000000..481bc866 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/10.jpg differ diff --git a/app/assets/images/stockBackground/thumb/11.jpg b/app/assets/images/stockBackground/thumb/11.jpg new file mode 100755 index 00000000..ca304ded Binary files /dev/null and b/app/assets/images/stockBackground/thumb/11.jpg differ diff --git a/app/assets/images/stockBackground/thumb/12.jpg b/app/assets/images/stockBackground/thumb/12.jpg new file mode 100755 index 00000000..83cd444a Binary files /dev/null and b/app/assets/images/stockBackground/thumb/12.jpg differ diff --git a/app/assets/images/stockBackground/thumb/2.jpg b/app/assets/images/stockBackground/thumb/2.jpg new file mode 100755 index 00000000..14254a1e Binary files /dev/null and b/app/assets/images/stockBackground/thumb/2.jpg differ diff --git a/app/assets/images/stockBackground/thumb/3.jpg b/app/assets/images/stockBackground/thumb/3.jpg new file mode 100755 index 00000000..cc2047e6 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/3.jpg differ diff --git a/app/assets/images/stockBackground/thumb/4.jpg b/app/assets/images/stockBackground/thumb/4.jpg new file mode 100755 index 00000000..2fbe5929 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/4.jpg differ diff --git a/app/assets/images/stockBackground/thumb/5.jpg b/app/assets/images/stockBackground/thumb/5.jpg new file mode 100755 index 00000000..d9395737 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/5.jpg differ diff --git a/app/assets/images/stockBackground/thumb/6.jpg b/app/assets/images/stockBackground/thumb/6.jpg new file mode 100755 index 00000000..9661a8c7 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/6.jpg differ diff --git a/app/assets/images/stockBackground/thumb/7.jpg b/app/assets/images/stockBackground/thumb/7.jpg new file mode 100755 index 00000000..697ae27a Binary files /dev/null and b/app/assets/images/stockBackground/thumb/7.jpg differ diff --git a/app/assets/images/stockBackground/thumb/8.jpg b/app/assets/images/stockBackground/thumb/8.jpg new file mode 100755 index 00000000..25a47979 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/8.jpg differ diff --git a/app/assets/images/stockBackground/thumb/9.jpg b/app/assets/images/stockBackground/thumb/9.jpg new file mode 100755 index 00000000..e7dd60e0 Binary files /dev/null and b/app/assets/images/stockBackground/thumb/9.jpg differ diff --git a/app/assets/images/timeline/date_connector.png b/app/assets/images/timeline/date_connector.png new file mode 100644 index 00000000..66ee903b Binary files /dev/null and b/app/assets/images/timeline/date_connector.png differ diff --git a/app/assets/images/timeline/pp.png b/app/assets/images/timeline/pp.png new file mode 100644 index 00000000..029c483b Binary files /dev/null and b/app/assets/images/timeline/pp.png differ diff --git a/app/assets/images/timeline/ruler.png b/app/assets/images/timeline/ruler.png new file mode 100644 index 00000000..35f38afa Binary files /dev/null and b/app/assets/images/timeline/ruler.png differ diff --git a/app/assets/images/twitter.png b/app/assets/images/twitter.png new file mode 100644 index 00000000..8b8fac07 Binary files /dev/null and b/app/assets/images/twitter.png differ diff --git a/app/assets/javascripts/.DS_Store b/app/assets/javascripts/.DS_Store deleted file mode 100644 index 9134f2a5..00000000 Binary files a/app/assets/javascripts/.DS_Store and /dev/null differ diff --git a/app/assets/javascripts/ajax_form.js.erb b/app/assets/javascripts/ajax_form.js.erb index d56024b3..9f993cd1 100644 --- a/app/assets/javascripts/ajax_form.js.erb +++ b/app/assets/javascripts/ajax_form.js.erb @@ -1,121 +1,7 @@ -<%#= encoding: utf-8 %> -// $(document).on('click', '#ajax_form_submit', function(){ - // $('#ajaxForm').ajaxSubmit({ - // beforeSubmit: function(a,f,o) { - // o.dataType = 'script'; - // if (o.dataType == 'script') { - // o.url = o.url.split('?'); // split on GET params - // if (o.url[0].substr(-3) != '.js') o.url[0] += '.js'; // force rails to respond to respond to the request with :format = js - // o.url = o.url.join('?'); // join on GET params - // } - // }, - // success: function(response,status,xhr){ - // alert(response); - // alert(status); - // alert(xhr); - // }, - // error:function(){ - // alert("error"); - // } - // }); - - -// var o = { -// // dataType: 'script', -// dataType: 'html', -// url:$("#ajaxForm").attr("action"), -// beforeSubmit: function(){ -// var sub = true; -// $("span.error").remove(); -// $("#dyn_error").empty(); -// $("#ajaxForm input").each(function(){ -// if($(this).val() == ""){ -// $(" *").insertAfter($(this)); -// sub = false; -// } -// }) -// if(!sub){ -// $("#dyn_error").text("Cannot be empty."); -// $("#dyn_error").text("<%= I18n.t('cant_empty_star') %>"); -// return false; -// } -// }, -// success: function(response,status,xhr){ -// if(typeof tinyMCEPopup != "undefined"){ -// var x = response.split("#"); -// var returnurl = x[0], -// returntitle = x[1], -// returndescription = x[2]; -// var win = tinyMCEPopup.getWindowArg("window"); -// win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = returnurl; -// win.document.getElementById(tinyMCEPopup.getWindowArg("alt")).value = returndescription; -// win.document.getElementById(tinyMCEPopup.getWindowArg("title")).value = returntitle; -// if (typeof(win.ImageDialog) != "undefined") { -// // we are, so update image dimensions... -// if (win.ImageDialog.getImageData) -// win.ImageDialog.getImageData(); - -// // ... and preview if necessary -// if (win.ImageDialog.showPreviewImage) -// win.ImageDialog.showPreviewImage(returnurl); -// } -// tinyMCEPopup.close(); -// }else{ -// //incase if we want to do something for quick edit file upload -// // var modalvalues = ""; -// // var r = ""; -// // if(rcom.getInternetExplorerVersion() > -1){ -// // r = "" + response + ""; -// // r = r.replace("**",""); -// // r = r.replace("**",""); -// // r = $(r); -// // modalvalues = r.find("span").attr("data-content").split("#"); -// // r.attr("id",r.find("span").attr("for")); -// // var table=document.getElementById(modalvalues[0]); -// // //var tbody = table.getElementsByTagName("tbody"); -// // var row = table.insertRow(table.rows.length-1); -// // var c1 = row.insertCell(0), -// // c2 = row.insertCell(1), -// // c3 = row.insertCell(2); -// // c1.innerHTML = r.find("td").eq(0).html(); -// // c2.innerHTML = r.find("td").eq(1).html(); -// // c3.innerHTML = r.find("td").eq(2).html(); -// // var trow = $("#bulletin_files tfoot").find("tr").eq(0); -// // $("#bulletin_files tbody").append(trow); -// // }else{ - -// // response = response.replace("**",""); -// // response = response.replace("**",""); -// // r = $(response); -// // modalvalues = r.find("span").attr("data-content").split("#"); -// // $('#' + modalvalues[0]+ ' tbody').append(r); -// // } -// // console.log(modalvalues[1]); -// // $("#"+modalvalues[1]).modal('hide'); -// //$('#bulletin_files tbody').append(r); -// //$(response).fadeIn(); -// } -// }, -// error:function(){ -// alert("error"); -// } -// } - -// if (o.dataType == 'script') { -// o.url = o.url.split('?'); // split on GET params -// if (o.url[0].substr(-3) != '.js') o.url[0] += '.js'; // force rails to respond to respond to the request with :format = js -// o.url = o.url.join('?'); // join on GET params -// } -// $('#ajaxForm').ajaxSubmit(o); - -// }); - $('#ajaxForm').ajaxForm({ - beforeSubmit: function(a,f,o) { - o.dataType = 'script'; - - }, - success: function(data) { - - } - }); \ No newline at end of file + beforeSubmit: function(a,f,o) { + o.dataType = 'script'; + }, + success: function(data) { + } +}); \ No newline at end of file diff --git a/app/assets/javascripts/archive_form.js.erb b/app/assets/javascripts/archive_form.js.erb new file mode 100644 index 00000000..8386842e --- /dev/null +++ b/app/assets/javascripts/archive_form.js.erb @@ -0,0 +1,9 @@ +$('.archive_file_multiples_block a.delete').live('click', function(){ + $(this).parents('.list_item').remove(); +}); + +$(document).on('click', '.action a.remove_existing_record', function(){ + $(this).next('.should_destroy').attr('value', 1); + $("tr#archive_file_multiple_" + $(this).prev().attr('value')).hide(); +}); + diff --git a/app/assets/javascripts/archive_plugin_form.js.erb b/app/assets/javascripts/archive_plugin_form.js.erb new file mode 100644 index 00000000..873f42bf --- /dev/null +++ b/app/assets/javascripts/archive_plugin_form.js.erb @@ -0,0 +1,9 @@ +$('.plugin_files_block a.delete').live('click', function(){ + $(this).parents('.list_item').remove(); +}); + +$(document).on('click', '.action a.remove_existing_record', function(){ + $(this).next('.should_destroy').attr('value', 1); + $("tr#plugin_file_" + $(this).prev().attr('value')).hide(); +}); + diff --git a/app/assets/javascripts/bootstrap.js b/app/assets/javascripts/bootstrap.js index 5c158c64..4facdf35 100644 --- a/app/assets/javascripts/bootstrap.js +++ b/app/assets/javascripts/bootstrap.js @@ -1,1740 +1,2031 @@ -/* =================================================== - * bootstrap-transition.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - -!function( $ ) { - - $(function () { - - "use strict" - - /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) - * ======================================================= */ - - $.support.transition = (function () { - var thisBody = document.body || document.documentElement - , thisStyle = thisBody.style - , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined - - return support && { - end: (function () { - var transitionEnd = "TransitionEnd" - if ( $.browser.webkit ) { - transitionEnd = "webkitTransitionEnd" - } else if ( $.browser.mozilla ) { - transitionEnd = "transitionend" - } else if ( $.browser.opera ) { - transitionEnd = "oTransitionEnd" - } - return transitionEnd - }()) - } - })() - - }) - -}( window.jQuery ) - -/* ========================================================= - * bootstrap-modal.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - -!function( $ ){ - - "use strict" - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function ( content, options ) { - this.options = options - this.$element = $(content) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - } - - Modal.prototype = { - - constructor: Modal - - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } - - , show: function () { - var that = this - - if (this.isShown) return - - $('body').addClass('modal-open') - - this.isShown = true - this.$element.trigger('show') - - escape.call(this) - backdrop.call(this, function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position - - that.$element - .show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') - - }) - } - - , hide: function ( e ) { - e && e.preventDefault() - - if (!this.isShown) return - - var that = this - this.isShown = false - - $('body').removeClass('modal-open') - - escape.call(this) - - this.$element - .trigger('hide') - .removeClass('in') - - $.support.transition && this.$element.hasClass('fade') ? - hideWithTransition.call(this) : - hideModal.call(this) - } - - } - - /* MODAL PRIVATE METHODS - * ===================== */ - - function hideWithTransition() { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - hideModal.call(that) - }, 500) - - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - hideModal.call(that) - }) - } - - function hideModal( that ) { - this.$element - .hide() - .trigger('hidden') - - backdrop.call(this) - } - - function backdrop( callback ) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(' \ No newline at end of file diff --git a/app/views/desktop/seminar_pages/add.html.erb b/app/views/desktop/seminar_pages/add.html.erb new file mode 100644 index 00000000..190e8abd --- /dev/null +++ b/app/views/desktop/seminar_pages/add.html.erb @@ -0,0 +1,107 @@ +
+
+ + +
+
+
Year
+
+ +
+
+
+
Language
+
+ +
+
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • + OralPoster
  • +
  • + +
  • + + + + + +
  • + +
  • +
  • + +
+
+
+
    +
  • +
  • + + +
  • + +
  • + +
  • +
  • +
  • +
  • +
  • + + +
+
+
+
    +
  • +
  • +
+
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/seminar_pages/list.html.erb b/app/views/desktop/seminar_pages/list.html.erb new file mode 100644 index 00000000..e32e4d6c --- /dev/null +++ b/app/views/desktop/seminar_pages/list.html.erb @@ -0,0 +1,75 @@ +
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+
+ +
+
+
+
Share
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/app/views/desktop/settings.html.erb b/app/views/desktop/settings.html.erb new file mode 100644 index 00000000..8b7ad2d1 --- /dev/null +++ b/app/views/desktop/settings.html.erb @@ -0,0 +1,27 @@ +
+
+ +
+ +
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/settings/connections.html.erb b/app/views/desktop/settings/connections.html.erb new file mode 100644 index 00000000..148762da --- /dev/null +++ b/app/views/desktop/settings/connections.html.erb @@ -0,0 +1,44 @@ +
+
+
+
+
    +
  • No Connection
  • +
  • Facebook

  • +
  • +
  • +
  • +
    + Connect + +
    +
  • +
+
    +
  • No Connection
  • +
  • Twitter

  • +
  • +
  • +
  • +
    + Connect + +
    +
  • +
+
    +
  • No Connection
  • +
  • Gmail

  • +
  • +
  • +
  • +
    + Connect + +
    +
  • +
+
+ +
+
diff --git a/app/views/desktop/settings/sections.html.erb b/app/views/desktop/settings/sections.html.erb new file mode 100644 index 00000000..dcb92237 --- /dev/null +++ b/app/views/desktop/settings/sections.html.erb @@ -0,0 +1,18 @@ +
+
+
+
+
Section Names
+
    +
  • +
  • +
  • +
  • +
+
sample desciption
+
+ Confirm +
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/settings/themes.html.erb b/app/views/desktop/settings/themes.html.erb new file mode 100644 index 00000000..6a3c34f8 --- /dev/null +++ b/app/views/desktop/settings/themes.html.erb @@ -0,0 +1,86 @@ +
+ +
+
+
+
+
+
+
+ <% @themes.each do |theme| %> +
<%= theme.name %>
+ <% end %> +
+
+ + +
+
Preview
+
+
Theme Text1
+
+
+
Theme Text2
+
+
Theme Text
+
+
+
+ + + + + + + + + + + + + +
Theme ColorLine ColorText ColorBackground Color
+ + + + + + + + + + +
+
+ Confirm +
+
+
+
+
+
+
1.jpg
+
2.jpg
+
3.jpg
+
4.jpg
+
5.jpg
+
6.jpg
+
7.jpg
+
8.jpg
+
9.jpg
+
10.jpg
+
11.jpg
+
12.jpg
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 26ca7599..f394700c 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -3,16 +3,16 @@

<%= t(:login) %>

- <%= form_for :user, :url => user_session_path, :html => {:class => 'user_new form-horizontal'} do |f| %> + <%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'user_new form-horizontal'} do |f| %>
<% flash.each do |key, msg| %> <%= content_tag :span, msg, :class => [key, "notice label label-warning"] %> - <% end%> + <% end %>

You need to sign in or sign up before continuing.

- <%= f.label :nccu_ldap_uid ,t("nccu_c.nccu_ldap_uid")%> - <%= f.text_field :nccu_ldap_uid, :placeholder => t("nccu_c.nccu_ldap_uid"), :style => "width: 330px;" %> + <%= f.label :email ,t("admin.user_new_interface.email")%> + <%= f.text_field :email, :placeholder => t("admin.user_new_interface.email"), :style => "width: 330px;" %> Please correct the error
diff --git a/app/views/layouts/_orbit_bar.html.erb b/app/views/layouts/_orbit_bar.html.erb index 3645d62f..4733ab6f 100644 --- a/app/views/layouts/_orbit_bar.html.erb +++ b/app/views/layouts/_orbit_bar.html.erb @@ -6,12 +6,16 @@ Orbit <% else %> @@ -20,7 +24,7 @@
- <% if user_signed_in? %> @@ -86,7 +90,7 @@
  • - <%= f.text_field :nccu_ldap_uid, :class => 'span2', :placeholder => t('nccu_c.nccu_ldap_uid'), :size => 16 %> + <%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
  • diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 02282605..6363bb46 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -1,3 +1,4 @@ +<<<<<<< HEAD <%#= content_tag :li, :class => active_for_controllers('purchases') do -%> <%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t(:purchase), admin_purchases_path %> <%# end -%> @@ -79,4 +80,26 @@ <% flash.each do |key, msg| %> <%= content_tag :span, msg, :class => [key, "notice label label-warning"] %> <% end%> -
  • \ No newline at end of file +
    +======= +
    +
    + <%= link_to content_tag(:i, nil, :class => (local_assigns.has_key? :icon) ? icon : 'icons-dashboard') + content_tag(:span, (local_assigns.has_key? :link_name) ? link_name : t('admin.dashboard')), (local_assigns.has_key? :link_url) ? link_url : admin_dashboards_path %> +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +>>>>>>> various_bugs diff --git a/app/views/layouts/_side_bar_content.html.erb b/app/views/layouts/_side_bar_content.html.erb new file mode 100644 index 00000000..94c0b104 --- /dev/null +++ b/app/views/layouts/_side_bar_content.html.erb @@ -0,0 +1,121 @@ + +<%#= content_tag :li, :class => active_for_controllers('purchases') do -%> + <%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %> +<%# end -%> +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "/static/kernel.js" %> +<% end %> + +<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.announcement')), panel_announcement_back_end_bulletins_path %> + <%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%> + <%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %> + <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") )if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index')if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('announcement.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %> + + <% end -%> + +<% end -%> + +<%= content_tag :li, :class =>( active_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')|| active_for_app_auth('news') || active_for_ob_auths_object("NewsBulletinCategory")) do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.news')), panel_news_back_end_news_bulletins_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')) do -%> + <%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') %> + <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') if (is_manager? rescue nil)%> + <%= content_tag :li, link_to((t('announcement.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue nil) %> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %> + <% end -%> + +<% end -%> + +<%#= content_tag :li, :class => active_for_controllers('users') do -%> + <%#= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %> +<%# end -%> + +<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-page') + content_tag(:span, t('admin.page')), panel_page_content_back_end_page_contexts_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%> + <%#= content_tag :li, link_to(t('admin.all_articles'), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %> + <% end -%> + +<% end -%> + +<%= content_tag :li, :class => active_for_controllers('ad_banners', 'ad_images') ||active_for_ob_auths_object("AdBanner") ||active_for_app_auth('ad_banners') do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.ad_banner')), admin_ad_banners_path %> + + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images') ) do -%> + <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> + <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> + <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %> + <% end -%> +<% end %> + + +<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.link')), panel_web_resource_back_end_web_links_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%> + <%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %> + <%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') if (is_manager? rescue nil)%> + <%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) if (is_manager? rescue nil)%> + <%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') if (is_manager? rescue nil)%> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %> + <% end -%> +<% end -%> + +<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-picture') + content_tag(:span, t('admin.orbit_gallery')), panel_gallery_back_end_albums_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('albums') ) do -%> + <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> + <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> + <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> + <%= content_tag :li, link_to((t('gallery.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_gallery_categories_path), :class => active_for_action('gallery_categories','index') %> + <%= content_tag :li, link_to((t('gallery.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %> + <%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> + <% end -%> +<% end %> + +<%= content_tag :li, :class => active_for_controllers('archive_files', 'tags', 'archive_file_categorys') do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-asset') + content_tag(:span, t('admin.archive')), panel_archive_back_end_archive_files_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> + <%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index') %> + <%= content_tag :li, link_to((t('admin.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') %> + <%= content_tag :li, link_to((t('admin.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index') %> + <%= content_tag :li, link_to((t('admin.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') %> + <% end -%> +<% end -%> + +<%= content_tag :li, :class => active_for_controllers('cals') || active_for_app_auth("calendar") do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-calendar') + content_tag(:span, t('admin.calendar')), panel_calendar_back_end_cals_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('cals','calendar_categories') ) do -%> + <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> + <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> + <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> + <%= content_tag :li, link_to((t('calendar.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') %> + <%#= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %> + <%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> + <% end -%> +<% end %> +<%= content_tag :li, :class => active_for_controllers('locations') || active_for_app_auth("gprs") do -%> + <%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.gprs')), panel_gprs_back_end_locations_path %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('locations') ) do -%> + <%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> + <%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> + <%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %> + <%#= content_tag :li, link_to((t('calendar.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') %> + <%#= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %> + <%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %> + <% end -%> +<% end %> + +
    + <% flash.each do |key, msg| %> + <%= content_tag :span, msg, :class => [key, "notice label label-warning"] %> + <% end%> +
    \ No newline at end of file diff --git a/app/views/layouts/_users_checkbox_ary.html.erb b/app/views/layouts/_users_checkbox_ary.html.erb index e3baca27..92cf8242 100644 --- a/app/views/layouts/_users_checkbox_ary.html.erb +++ b/app/views/layouts/_users_checkbox_ary.html.erb @@ -1,3 +1,3 @@ <%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do %> - <%= render :partial => "shared/privilege_user",:collection =>@sys_users,:as=>:user ,:locals =>{ :chosen_users=> @users_array } %> + <%= render :partial => "shared/privilege_user",:collection =>@sys_users,:as=>:user ,:locals =>{ :chosen_users=> @users_array } %> <%end -%> \ No newline at end of file diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 3c2df376..78673abf 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -31,7 +31,7 @@ <%= yield %>
    <%= yield :tertiary %>
    - + diff --git a/app/views/layouts/desktop.html.erb b/app/views/layouts/desktop.html.erb new file mode 100644 index 00000000..628c0b3f --- /dev/null +++ b/app/views/layouts/desktop.html.erb @@ -0,0 +1,19 @@ + + + + + <%= @title || APP_CONFIG['orbit'] %> + + <%= stylesheet_link_tag "desktop" %> + <%= javascript_include_tag "desktop" %> + <%= yield :page_specific_css %> + <%= yield :page_specific_javascript %> + <%= csrf_meta_tag %> + + + <%= render 'layouts/orbit_bar' %> + <%= yield %> + + diff --git a/app/views/layouts/new_admin.html.erb b/app/views/layouts/new_admin.html.erb index 3a493a9d..7659a38f 100644 --- a/app/views/layouts/new_admin.html.erb +++ b/app/views/layouts/new_admin.html.erb @@ -13,28 +13,13 @@ <%= yield :page_specific_javascript %> <%= csrf_meta_tag %> - + <%= render 'layouts/orbit_bar' %> -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    + <% if !(yield :side_bar).blank? %> + <%= yield :side_bar %> + <% else %> + <%= render 'layouts/side_bar' %> + <% end %>
    <%= yield %>
    diff --git a/app/views/seminar_p.html.erb b/app/views/seminar_p.html.erb new file mode 100644 index 00000000..15573365 --- /dev/null +++ b/app/views/seminar_p.html.erb @@ -0,0 +1,33 @@ +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/config/application.rb b/config/application.rb index 4eb40b2c..ccc4a65e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -34,6 +34,10 @@ module Orbit config.autoload_paths += %W(#{config.root}/app/models/purchase) config.autoload_paths += %W(#{config.root}/app/models/user) + # Include all helpers + # 'helper :all' must be removed in ApplicationController + config.action_controller.include_all_helpers = false + # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] @@ -67,3 +71,5 @@ module Orbit end Orbit_Apps = [] VALID_LOCALES = ["en", "zh_tw"] + + diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index ea19b137..817f12ea 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -21,7 +21,7 @@ Devise.setup do |config| # parameters are used only when authenticating and not when retrieving from # session. If you need permissions, you should implement that in a before filter. # config.authentication_keys = [ :email ] - config.authentication_keys = [ :nccu_ldap_uid ] + config.authentication_keys = [ :email ] # Tell if authentication through request.params is enabled. True by default. diff --git a/config/list.yml b/config/list.yml index 8d1ca9fc..b0cf253f 100644 --- a/config/list.yml +++ b/config/list.yml @@ -3,9 +3,34 @@ forbidden_item_names: - panel - appfront +#NO_MULTI_TAG = ["select","date","radio_button","checkbox","date_durnation"] + markups: - - text_field - - select + text_field: + muti_lang_input_supprt: true + ext_support: true + select: + muti_lang_input_supprt: false + ext_support: false + date: + muti_lang_input_supprt: false + ext_support: false + text_area: + muti_lang_input_supprt: true + ext_support: false + radio_button: + muti_lang_input_supprt: false + ext_support: false + checkbox: + muti_lang_input_supprt: false + ext_support: false + # date_durnation: + # muti_lang_input_supprt: false + # ext_support: false + # address: + # muti_lang_input_supprt: true + # ext_support: true + public_r_tags: - ad_banner @@ -15,4 +40,27 @@ public_r_tags: page_part_kinds: - text - public_r_tag - - module_widget \ No newline at end of file + - module_widget + +widget_field: + - title + - category + - image + - date + - subtitle + - content + - link + - file + +widget_field_type: + - title + - category + - img + - date + - text + - link + - file + - status + - tag + - viewcount + - poster diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 800f6c7a..cf578eac 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -30,6 +30,7 @@ en: signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.' updated: 'You updated your account successfully.' destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' + email_not_unique: 'Your email address has been registed' unlocks: send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' unlocked: 'Your account was successfully unlocked. You are now signed in.' diff --git a/config/locales/devise.zh_tw.yml b/config/locales/devise.zh_tw.yml index 4cb8c317..d825f92e 100644 --- a/config/locales/devise.zh_tw.yml +++ b/config/locales/devise.zh_tw.yml @@ -30,6 +30,7 @@ zh_tw: signed_up: '您已經成功的登錄,確認信件已送至您的 Email 信箱。' updated: '您已經成功的更新帳號資訊。' destroyed: '再會!您的帳號已被取消。有緣再會。' + email_not_unique: '已被註冊' unlocks: send_instructions: '您將在幾分鐘後收到一封電子郵件,內有將帳號解除鎖定的步驟說明。' unlocked: '您的帳號已被解鎖,現在您已成功登入。' diff --git a/config/locales/en.yml b/config/locales/en.yml index 6db7e53b..0c6fec10 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -214,12 +214,40 @@ en: text: Text Area passed: Approved password: Password +<<<<<<< HEAD pending: Pending picture: Picture postdate: Postdate posted_by: Posted by preview: Preview purchase: Purchase +======= + register: Register + remember_me: Remember me + search_google: Search Google + show: Show + submit: Submit + sure?: Are you sure? + update: Update + update_failed: Update failed + view: View + view_count: View count + yes_: "Yes" + addthis_tools: + add_to_bookmark: Add this to bookmark + all_content: All Content + all_file: All File + all_member: All Member + content: Content + data: Data + file: File + file_type: File Type + hits: Hits + item: Item + member: Member + module: Module + most_visited_page: Most Visited Page +>>>>>>> various_bugs quantity: Quantity quick_edit: Quick edit recent_update: Recent Update @@ -319,6 +347,7 @@ en: visitors_today: Today's visitors yes_: "Yes" +<<<<<<< HEAD nccu: date: Date file: File @@ -327,5 +356,233 @@ en: link_name: Name picture: Picture selected_file: File +======= + errors: + at_least_one: must at least have one value + + admin: + access: + denied: + app: + not_sub_manager: Access Denied for you are not SubManager for this app + not_manager: Access Denied for you are not SubManager for this app + not_authed_user: Access Denied for you are not User for this app + not_admin: Access Denied for you are not Admin + object: "Access Denied for you don't have permission for this object" + action: Action + ad_banner: AD Banner + orbit_gallery: Gallery + calendar: Calendar + ad: + sec_place_holder: Enter 3 if 3 sec + ab_fx: FX + all_banners: AdBanner list + banner_best_size: Banner Best Size + best_size: Best size + new_banner: New banner + new_image: New image + showing: Showing + not_showing: NotShowing + picture_list: Picture List + title: Title + transition_sec: Transition time + trans_unit_sec: sec + update_banner: Update Banner + widget_info_for_ad_image_size: "Best size with: %{best_size}" + add: Add + add_item: Add item + add_language: Add language + add_drop_down_item: +Add Menu Item + admin: Admin + action: Action + all_articles: List + always_display_title: Always displayed in the title bar + announcement: Announcement + asset: Asset + assets: + file: File + album: Album + video: Video + book: Book + attributes: Attributes + author: Author + calendar: Calendar + gprs: GPRS + cant_delete_self: You can not delete yourself. + cant_revoke_self_admin: You can not revoke your admin role yourself. + category: Category + choose_file: Choose a file... + class: Class + content: Content + create_error_link: Error when creating link. + create_error_page: Error when creating page. + create_success_home: Homepage was successfully created. + create_success_layout: Layout was successfully created. + create_success_link: Link was successfully created. + create_success_page: Page was successfully created. + create_success_snippet: Snippet was successfully created. + create_success_user: User was successfully created. + data: Data + dashboard: Dashboard + delete_language: Delete language + description: Description + design: Template + disable_language: Disable language + editing_home: Editing homepage + editing_layout: Editing layout + editing_link: Editing link + editing_page: Editing page + editing_snippet: Editing snippet + editing_info: Editing user information + editing_role: Editing user role + email: Email + enable_language: Enable language + enabled_for: Enabled for + file_name: Filename + file_size: File size + file_upload: File upload + format: Format + home: Home + id: ID + info: Information + intro: Introduction + is_published: Is published + item: Item + key: Key + keywords: Keywords + language: Language + layout: Layout + layout_name: Layout name + links: Links + link: Links + list_assets: Assets list + list_designs: Designs list + list_items: Items list + list_puchases: Purchases list + list_snippets: Snippets list + list_users: Users list + list_infos: User information list + list_roles: User roles list + mail_address: Address + mail_port: Port + mail_domain: Domain + mail_authentication: Authentication + mail_user_name: User Name + mail_password: Password + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto + member: Member + menu_enabled_for: Menu enabled for + module: + authorization: Module Authorization + move_down: Move down + move_up: Move up + multilingual: Multilingual + my_avatar: My Avatar + no_home_page: You don't have a homepage + no_layout: You don't have a layout + name: Name + nccu: NCCU Custom + nccu_c: + nccu_ldap_uid: NCCU LDAP Account + new_asset: New asset + new_component: New component + new_design: New design + new_home: New homepage + new_layout: New layout + new_link: New link + new_page: New page + new_snippet: New snippet + new_user: New user + new_info: New user information + new_role: New user role + news: News + non_multilingual: Non multilingual + object_auth: + list_title_of_users: %{auth_title} Auth List + update_done: Update done,reulst showing in list + update_failed: Update failed + options: Options + orig_upload_file: Original filename + page: Page + page_context: + edit: Edit + ob_auth: + edit: Category authorization + page_part_kinds: + text: Text Area + public_r_tag: System Widget + module_widget: Plug-in Module Widget + position: Position + published?: Published? + purchase: Purchase + registered: Registered + role: Role + roles: Roles + setup_member: Member setup + setup_translations: Translations setup + setup_designs: Designs setup + site: Site + site_description: Site description + site_footer: Site footer + site_settings: Site Setting + site_sub_menu: Site sub-menu + site_title: Site title + super_pages: Super pages + structure: Structure +>>>>>>> various_bugs tags: Tags url: URL +<<<<<<< HEAD +======= + user: User + user_new_interface: + sys_basic_form: User system info + password: Password + password_confirmation: Password Confirmation + email: User account + user_role: + auth: + all_member: All Member + manager: Manager + sub_mamanger: SubManager + by_role: By Role + by_sub_role: By SubRole + block_list: Block List + privilege_list: Privilege List + add_manager: Add Manager + add_sub_manager: Add SubManager + add_to_block_list: Add to block List + add_to_privilege_list: Add to privilege List + auth_by: -AuthBy %{user_display_name} + info: User information + panel: User panel + role: User role + + dashboard: + bulletin: Announcement + news_bulletin: News + page_context: Page + web_link: Link + + panel: + + modal: + close: Close + preview: Preview + sys: + not_previewable: "Preview not support" + limit_of_upload_file_size: "Upload file must be less than: %{best_size}" + preview_only_for_img: "Preview only supprt with file type:jpg,png,gif,bmp" + can_not_display_due_to_no_context: "Can not display due to no context for English" + module_page_lang_not_support: "We are sorry, this page is not available for English" + search: + not_found: "NOT FOUND" + domains: Google Search Domains + site_search: Site Search + sitesearch: Google Site Search + site_setting_help: Please Enter the search argument for Google search. + result_get: "Searched about ' %{search_word} ' Found %{item_num} items" + too_many: "Search about ' %{search_word} 'resulted more than %{exceed_num} items maybe try to search with more specific terms?" + unit_get: "Listed items created by :%{unit_name} Found %{item_num} items" +>>>>>>> various_bugs diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 6e116c87..7b818edd 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -230,6 +230,7 @@ zh_tw: rejected_reason: '拒絕原因:' rejected_reason_empty: "拒絕核准, 沒有參考資訊" related_links: 相關連結 + remember_me: 記住我 role: 角色 Roles: 角色 ruling_site: 銳綸網站 @@ -240,10 +241,12 @@ zh_tw: sitesearch: 全站搜尋 too_many: "搜尋有關 ' %{search_word} '尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋?" unit_get: "列出由 :%{unit_name}發佈的資料,共有%{item_num}筆" + search_google: 搜尋Google search_nccu: 搜尋政治大學 setup_member: 會員設定 show: 顯示 site: + default_image: 預設圖像 description: 網站描述 description_help: '' footer: 網站頁尾 @@ -335,6 +338,272 @@ zh_tw: +<<<<<<< HEAD +======= + errors: + at_least_one: 必須至少有一個值 + + admin: + access: + denied: + app: + not_sub_manager: 拒絕存取因你不是此應用程式次管理員 + not_manager: 拒絕存取因你不是此應用程式管理員 + not_authed_user: 拒絕存取因你不是此應用程式授權使用者 + not_admin: 拒絕存取因你不是此應用程式次管理員 + object: 拒絕存取因你不是網站管理者 + action: 操作 + ad_banner: 廣告輪播 + orbit_gallery: 活動花絮 + ad: + sec_place_holder: 3秒請輸入3 + ab_fx: 轉場特效 + all_banners: 輪播清單 + banner_best_size: Banner 尺寸 + best_size: 最佳尺寸 + cate_auth: 分類授權 + delete_banner: 刪除整組輪播 + new_banner: 新增輪播 + new_image: 新增橫幅 + showing: 顯示中 + not_showing: 沒有顯示 + picture_list: 圖片列表 + title: 標題 + transition_sec: 轉場單位時間 + trans_unit_sec: 秒 + update_banner: 更新輪播 + widget_info_for_ad_image_size: "此區塊圖片尺寸請使用 %{best_size}" + add: 新增 + add_item: 新增項目 + add_language: 新增語言 + add_drop_down_item: +增加Orbit選單 + admin: 網站管理者 + all_articles: 列表 + always_display_title: 永遠顯示於標題列 + announcement: 公告管理 + asset: 資產 + assets: + file: 檔案 + album: 相簿 + video: 影片 + book: 書籍 + attributes: 屬性 + author: 作者 + calendar: 行事曆 + cant_delete_self: 您不可以刪除自己。 + cant_revoke_self_admin: 您不可以撤銷自己的管理身份。 + category: 類別 + choose_file: 請選擇一個文件... + class: 階級 + content: 內容 + contenteditable: + update_done: 更新完成 + update_failed: 更新失敗 + create_error_link: 新增連接時出錯。 + create_error_page: 新增頁面時出錯。 + create_success_home: 首頁已成功新增。 + create_success_layout: 樣板已成功新增。 + create_success_link: 連結已成功新增。 + create_success_page: 頁面已成功新增。 + create_success_home: 首頁已成功新增。 + create_success_layout: 佈局已成功新增。 + create_success_link: 連結已成功新增。 + create_success_page: 頁面已成功新增。 + create_success_snippet: 片段已成功新增。 + create_success_user: 用戶已成功新增。。 + dashboard: 儀表板 + data: 選擇檔案 + delete_language: 刪除語言 + description: 描述 + design: 版型管理 + disable_language: 禁用語言 + edit: 編輯 + editing_home: 編輯首頁 + editing_layout: 編輯樣板 + editing_link: 編輯連結 + editing_page: 編輯頁面 + editing_snippet: 編輯片段 + editing_info: 編輯用戶資料 + editing_role: 編輯用戶身份 + email: Email + enable_language: 啟用語言 + enabled_for: 啟用 + file_name: 檔名 + file_size: 檔案大小 + file_upload: 文件上載 + format: 格式 + home: 首頁 + id: ID + info: 資料 + intro: 簡介 + is_published: 被出版 + item: 網站架構 + key: 關鍵 + keywords: 關鍵字 + language: 語言 + layout: 佈局 + layout_name: 佈局名字 + link: 連結管理 + links: 網路資源 + list_assets: 資產列表 + list_designs: 設計列表 + list_items: 項目列表 + list_puchases: 購買清單 + list_snippets: 斷片列表 + list_users: 使用列表 + list_infos: 用戶資料列表 + list_roles: 用戶身份列表 + mail_address: 郵件地址 + mail_port: 傳輸埠 + mail_domain: 網域名稱 + mail_authentication: 認證 + mail_user_name: 帳號 + mail_password: 密碼 + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto + member: 會員 + menu_enabled_for: 選單啟用 + module: + authorization: 模組授權 + move_down: 往下移 + move_up: 往上移 + multilingual: 多種語言 + my_avatar: 我的頭像 + no_home_page: 您沒有首頁 + no_layout: 您沒有佈局 + name: 名稱 + new_admin: + side_bar: + all_user: 所有使用者 + add_user: 新增使用者 + user_roles: 角色 + user_info: 使用者資訊 + user: 會員 + users: + all_plugin_summary: 全部 + profile: 基本資料 + roles: + staff: 職員資料 + student: 學生資料 + teacher: 教師資料 + action: + add: 新增 + edit: 編輯 + delete: 刪除 + quick_edit: 快速編輯 + next: 下一頁 + prev: 上一頁 + attributes: + roles: 角色 + name: 名稱 + publications: 出版數 + courses: 開課數 + followers: 被關注數 + show_mode: + index: 清單 + summary: 摘要 + thumbnail: 縮圖 + table_header: + status: 狀態 + category: 分類 + tags: 標籤 + clear_filter: 重置 + new_asset: 新增資產 + new_component: 新增元件 + new_design: 新設計 + new_home: 新增首頁 + new_layout: 新增樣板 + new_link: 新增連結 + new_page: 新增頁面 + new_snippet: 新增片段 + new_user: 新增使用 + new_info: 新增用戶資料 + new_role: 新增用戶身份 + news: 新聞 + non_multilingual: + object_auth: + list_title_of_users: 授權清單-%{auth_title} + update_done: 更新完成,結果顯示於清單 + update_failed: 更新失敗 + options: 選項 + orig_upload_file: 原上傳檔名 + page: 頁面管理 + page_context: + edit: 編輯 + ob_auth: + edit: 分類授權 + page_part_kinds: + text: 文字區塊 + public_r_tag: 系統模塊 + module_widget: 外掛模塊 + position: 位置 + published?: 發布? + purchase: 購買 + role: 身份 + roles: 身份 + site_description: 網站描述 + site_footer: 網站頁尾 + site_settings: 基本設定 + site_sub_menu: 網站次選單 + site_title: 網站標題 + setup_member: 成員設置 + setup_translations: 語系設定 + setup_designs: 版型設定 + site: 網站 + site_setting: 網站設定 + super_pages: 可編頁面 + structure: 網站結構 + tags: 標籤 + title: 標題 + translation: 翻譯 + type: 類型 + up_to_date: 最新版本 + update_error_link: 更新鏈接時出現錯誤。 + update_error_page: 更新頁面時出現錯誤。 + update_success_content: 內容已成功更新。 + update_success_home: 首頁已成功更新。 + update_success_layout: 樣板已成功更新。 + update_success_link: 連結已成功更新。 + update_success_page: 頁面已成功更新。 + update_success_snippet: 片段已成功更新。 + update_success_user: 用戶已成功更新 + upload_design: 上傳設計 + url: URL + user: 用戶 + user_new_interface: + sys_basic_form: 系統基本資料表 + password: 密碼 + password_confirmation: 確認密碼 + email: 使用者帳號信箱 + user_role: + auth: + all_member: 所有會員 + manager: 管理員 + sub_manager: 次管理員 + by_role: 根據身份 + by_sub_role: 根據次身份 + block_list: 封鎖名單 + add_manager: 增加到管理員 + add_sub_manager: 增加到次管理員 + add_to_block_list: 封鎖名單 + add_to_privilege_list: 特許名單 + auth_by: -由%{user_display_name}授權 + user: 使用會員 + info: 用戶資料 + panel: 用戶面板 + role: 用戶身份 + + dashboard: + bulletin: 公告 + news_bulletin: 新聞 + page_context: 頁面 + web_link: 鏈接 + + panel: + + + +>>>>>>> various_bugs # Chinese (Taiwan) translations for Ruby on Rails # by tsechingho (http://github.com/tsechingho) date: @@ -549,6 +818,7 @@ zh_tw: other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。" body: "以下欄位發生問題:" +<<<<<<< HEAD mongoid: models: news_bulletin: 新聞 @@ -565,3 +835,25 @@ zh_tw: web_link: title: 名稱 url: 路徑 +======= + helpers: + select: + prompt: "請選擇" + submit: + create: "新增%{model}" + update: "更新%{model}" + submit: "儲存%{model}" + modal: + save_and_close: "儲存並關閉" + close: "關閉" + preview: "預覽" + sys: + not_previewable: "不支援預覽" + limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}" + preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp...等圖片格式" + can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示" + module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本" + object_disable: + change_to_true: "設為停用" + change_to_false: "重新啓用" +>>>>>>> various_bugs diff --git a/config/mongoid.yml b/config/mongoid.yml index ed5aa3e7..75c5ef80 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -8,11 +8,10 @@ defaults: &defaults development: <<: *defaults - database: prototype_r4_ldap0229 - + database: demo_site_development test: <<: *defaults - database: prototype_r4_ldap0229 + database: demo_site_test # set these environment variables on your prod server production: @@ -22,5 +21,4 @@ production: # password: <%= ENV['MONGOID_PASSWORD'] %> # database: <%= ENV['MONGOID_DATABASE'] %> <<: *defaults - database: prototype_r4_ldap0229 - slave_ok: true + database: demo_site_production diff --git a/config/routes.rb b/config/routes.rb index 72032fcb..72841be5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,6 @@ Orbit::Application.routes.draw do - devise_for :users,:controllers => {:sessions => 'sessions'} + devise_for :users mount Resque::Server, :at => "/admin/resque" # routes for sinatra app @@ -58,6 +58,8 @@ Orbit::Application.routes.draw do end member do post 'edit_file' => 'designs#edit_file' + post 'update_file' => 'designs#update_file' + post 'upload_image' => 'designs#upload_image' end end resources :infos do @@ -98,9 +100,11 @@ Orbit::Application.routes.draw do resources :page_parts do member do get 'reload_widgets' + get 'reload_widget_styles' get 'reload_r_tag_options' end end + resources :plugins resources :purchases do collection do get 'install_app' @@ -124,14 +128,113 @@ Orbit::Application.routes.draw do end resources :tags resources :users + resources :users_new_interface do + member do + get 'temp_edit' + end + end + end # end admin namespace :panel do resources :users end + + match '/desktop/'=>'desktop#index' + + # Sinatra Routes start + + # match '/desktop/desktop', :to => Desktopapp::DesktopApp + # match '/desktop/app_manager', :to => Desktopapp::DesktopApp + # match '/desktop/sections', :to => Desktopapp::DesktopApp + # match '/desktop/settings', :to => Desktopapp::DesktopApp + # match '/desktop/get_desktop_settings/', :to => Desktopapp::DesktopApp + # match '/desktop/save_desktop_settings/', :to => Desktopapp::DesktopApp + # match '/desktop/getgroups/', :to => Desktopapp::DesktopApp + # match '/desktop/getsectionlist/', :to => Desktopapp::DesktopApp + # match '/desktop/settingthemes/', :to => Desktopapp::DesktopApp + # match '/desktop/settingsections/', :to => Desktopapp::DesktopApp + # match '/desktop/getapplist/', :to => Desktopapp::DesktopApp + # match '/desktop/newpositions/', :to => Desktopapp::DesktopApp + # match '/desktop/settingconnection/', :to => Desktopapp::DesktopApp + + # match '/desktop/journal_p/', :to => Desktopapp::DesktopAppPublications + # match '/desktop/journal_p_list/', :to => Desktopapp::DesktopAppPublications + # match '/desktop/journal_p_add/', :to => Desktopapp::DesktopAppPublications + # match '/desktop_publications/getjournals', :to => Desktopapp::DesktopAppPublications + + # match '/desktop/twitter/', :to => Desktopapp::Otheraccounts + # match '/desktop/forgmail/', :to => Desktopapp::Otheraccounts + # match '/desktop/getaccounts', :to => Desktopapp::Otheraccounts + # match '/desktop/save_account_info/', :to => Desktopapp::Otheraccounts + + # match '/desktop_appstore/appstore', :to => Desktopapp::DesktopAppAppstore + # match '/desktop_appstore/widgets', :to => Desktopapp::DesktopAppAppstore + # match '/desktop_appstore/getuserwidgets', :to => Desktopapp::DesktopAppAppstore + # match '/desktop_appstore/widgets_settings', :to => Desktopapp::DesktopAppAppstore - match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request| + # Sinatra Routes end + + match '/desktop/desktop'=>'desktop#desktop' + match '/desktop/app_manager'=>'desktop#app_manager' + match '/desktop/sections'=>'desktop#sections' + match '/desktop/settings'=>'desktop#settings' + match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings' + match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings' + match '/desktop/getgroups/'=>'desktop#getgroups' + match '/desktop/getsectionlist/'=>'desktop#getsectionlist' + match '/desktop/settingthemes/'=>'desktop#settingthemes' + match '/desktop/settingsections/'=>'desktop#settingsections' + match '/desktop/getapplist/'=>'desktop#getapplist' + match '/desktop/newpositions/'=>'desktop#newpositions' + match '/desktop/settingconnection/'=>'desktop#settingconnection' + + + match '/desktop/journal_p/'=>'desktop_publications#journal_p' + match '/desktop/journal_p_list/'=>'desktop_publications#journal_p_list' + match '/desktop/journal_p_add/'=>'desktop_publications#journal_p_add' + match '/desktop_publications/getjournals' => 'desktop_publications#getjournals' + match '/desktop/books' => 'desktop_publications#books' + match '/desktop/books_list/'=>'desktop_publications#books_list' + match '/desktop/books_add/'=>'desktop_publications#books_add' + + match '/desktop/seminar_p' => 'desktop_publications#seminar_p' + match '/desktop/seminar_p_list/'=>'desktop_publications#seminar_p_list' + match '/desktop/seminar_p_add/'=>'desktop_publications#seminar_p_add' + + match '/desktop/research_d' => 'desktop_research#research_d' + match '/desktop/research_d_list/' => 'desktop_research#research_d_list' + match '/desktop/research_d_add' => 'desktop_research#research_d_add' + + match '/desktop/research_p' => 'desktop_research#research_p' + match '/desktop/research_p_list/' => 'desktop_research#research_p_list' + match '/desktop/research_p_add' => 'desktop_research#research_p_add' + + + match '/desktop/twitter/'=>'otheraccounts#twitter' + match '/desktop/forgmail/'=>'otheraccounts#gmail' + match '/desktop/getaccounts'=>'otheraccounts#getaccounts' + match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo' + + match '/desktop_appstore/appstore'=>'desktop_appstore#appstore' + match '/desktop_appstore/widgets'=>'desktop_appstore#widgets' + match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets' + match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings' + + match '/desktop_orbit/orbit' => 'desktop_orbit#orbit' + + match '/desktop_orbit/eventajaxload'=> 'desktop_orbit#eventajaxload' + match '/desktop_orbit/gettimelinespan' => 'desktop_orbit#gettimelinespan' + + #match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal' + #match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal' + # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' + + + match '/desktop/temp_func/'=>'desktop#temp_func' + + match '/panel/:app_name/front_end/:app_action/:id(/:controller_action)' => 'pages#show_from_link', :constraints => lambda { |request| !request.query_string.include?("inner=true") } diff --git a/lib/desktopapp/desktop_app.rb b/lib/desktopapp/desktop_app.rb new file mode 100644 index 00000000..c626849f --- /dev/null +++ b/lib/desktopapp/desktop_app.rb @@ -0,0 +1,148 @@ +class Desktopapp::DesktopApp < Sinatra::Base + + #set :views, settings.root+'/desktop/' + + get "/desktop/desktop" do + erb :desktop + end + + get "/desktop/app_manager" do + erb :app_manager + end + + get "/desktop/sections" do + erb :sections + end + + get "/desktop/settings" do + erb :settings + end + + post "/desktop/save_desktop_settings" do + @desktop = Desktop.find(params["desktopid"]) + @savewhat = params["save"] + case @savewhat + when "theme" + @desktop.update_attributes(:theme => params["theme"]) + @desktop.update_attributes(:wallpaper => nil) + when "desktopnames" + @sections = @desktop.sections + x = 0; + @sections.each do |section| + @desktopnewnames = params["desktopnms"] + section.update_attributes(:name => @desktopnewnames[x] ) + x = x+1 + end + when "appnewsection" + @section = Section.find(params["newsectionid"]) + @groups = @section.groups + @app = Tile.find(params["appid"]) + @groups.each do |group| + @tiles = group.tiles.where(:data_category.all => ["app"]) + if @tiles.length < 12 + @app.update_attributes(:group_id => group.id) + break + end + end + when "customtheme" + @desktop.update_attributes(:theme => "custom") + @desktop.update_attributes(:customtheme => params['theme']) + when "wallpaper" + @desktop.update_attributes(:wallpaper => params["wallpapernm"]) + end + a = Array.new + a << {"success"=>"true"} + a.to_json + end + + get "/desktop/get_desktop_settings" do + @desktop = Desktop.find(params["desktopid"]) + @getwhat = params["get"] + case @getwhat + when "desktop" + @desktop.to_json + when "sectionnames" + secnames = Array.new + @sections = @desktop.sections + @sections.each do |section| + secnames << section.name + end + secnames.to_json + when "theme" + @theme = @desktop.theme + @theme.to_json + end + end + + get "/desktop/getgroups" do + @section = Section.find(params["sectionid"]) + @groups = @section.groups + a = Array.new + @groups.each do |group| + a << group.tiles + end + a.to_json + end + + get "/desktop/getsectionlist" do + @desktop = Desktop.find(params["desktopid"]) + @sections = @desktop.sections + @sections.to_json + end + + get "/desktop/settingthemes" do + @themes = DesktopTheme.all + erb :'settings/themes' + end + + get "/desktop/settingsections" do + erb :'settings/sections' + end + + get "/desktop/getapplist" do + @desktop = Desktop.find(params["desktopid"]) + @sections = @desktop.sections + a = Array.new + @sections.each do |section| + @groups = section.groups + @groups.each do |group| + @tiles = group.tiles.where(:data_category.all => ["app"]) + a << @tiles + end + end + a.to_json + end + + post "/desktop/newpositions" do + @newpositions = params["newpos"] + @section = Section.find(params["sectionid"]) + @groupids = params["groupids"] + @groups = @section.groups + z = 0 + @newpositions.each do |grp| + x = 1 + grp.each do |tileid| + if x != 1 + y = 1 + tileid.each do |id| + @tile = Tile.find(id) + @tile.update_attributes({:position => y}) + if @tile.group_id != @groupids[z] + @tile.update_attributes({:group_id => @groupids[z]}) + end + y = y + 1 + end + z = z + 1 + end + x = x + 1 + end + end + b = Array.new + b << {"success"=>"true"} + b.to_json + end + + get "/desktop/settingconnection" do + erb :'settings/connections' + end +end \ No newline at end of file diff --git a/lib/desktopapp/desktop_app_appstore.rb b/lib/desktopapp/desktop_app_appstore.rb new file mode 100644 index 00000000..5ad72f77 --- /dev/null +++ b/lib/desktopapp/desktop_app_appstore.rb @@ -0,0 +1,96 @@ +class Desktopapp::DesktopAppAppstore < Sinatra::Base + + get '/desktop_appstore/appstore' do + erb :appstore + end + + get '/desktop_appstore/widgets' do + erb :'appstore/widgets' + end + + get '/desktop_appstore/getuserwidgets' do + # @widgets = current_user.desktop.desktop_widgets + # @groups = Array.new + # @sections = current_user.desktop.sections + + # @sections.each do |section| + # @groups << section.groups + # end + + # @widgets.each do |widget| + # @count = 0; + # @sectionids = Array.new + # @groups.each do |group| + # group.each do |grp| + # @widge = 0 + # @gid = widget.id.to_s + # @widge = grp.tiles.where(:data_content.all => [@gid]).count + # @count = @count + @widge + # if @widge > 0 + # @sectionids << grp.section_id + # end + # end + # end + # if @count > 0 + # widget.status = "Installed" + # widget.section = @sectionids + # else + # widget.status = "Downloaded" + # end + # end + # @widgets.to_json + current_user.to_json + end + + get '/desktop_appstore/widgets_settings' do + what = params["what"] + @widgetid = params["widget"] + @sectionid = params["section"] + @msg = Array.new + case what + when "remove" + @section = Section.find(@sectionid) + @groups = @section.groups + @groups.each do |group| + @tile = group.tiles.where(:data_content.all => [@widgetid]) + if @tile.count > 0 + @thistile = @tile + end + end + @t = Tile.find(@thistile.first.id) + @t.delete + @msg << {"success"=>true} + when "add" + @widget = current_user.desktop.desktop_widgets.find(@widgetid) + @section = Section.find(@sectionid) + @groups = @section.groups + @totalwidgets = 0 + @groups.each do |group| + @tile = group.tiles.where(:data_content.all => [@widgetid]).count + if @tile > 0 + @msg << {"success"=>false,"error"=>"Duplicate widget"} + else + no_of_widgets = group.tiles.where(:data_category.all => ["widget"]).count + @totalwidgets = @totalwidgets + no_of_widgets + end + end + if @totalwidgets >= 12 + @msg << {"success"=>false,"error"=>"Section full"} + else + wshape = @widget.shape + wdata_content = @widgetid + wdata_category = "widget" + wname = @widget.name + if @groups.first.tiles.where(:data_category.all => ["widget"]).count >= 6 + groupid = @groups.last.id + else + groupid = @groups.first.id + end + Tile.create(data_category: wdata_category,data_content: wdata_content, group_id: groupid, position: 10, title: wname, shape: wshape) + @msg << {"success"=>true} + end + end + @msg.to_json + end + +end \ No newline at end of file diff --git a/lib/desktopapp/desktop_app_publications.rb b/lib/desktopapp/desktop_app_publications.rb new file mode 100644 index 00000000..e88d78fa --- /dev/null +++ b/lib/desktopapp/desktop_app_publications.rb @@ -0,0 +1,25 @@ +class Desktopapp::DesktopAppPublications < Sinatra::Base + + get "/desktop/journal_p" do + erb :journal_p + end + + get "/desktop/journal_p_list" do + erb :'journal_pages/list' + end + + get '/desktop/journal_p_add' do + erb :'journal_pages/add' + end + + get '/desktop_publications/getjournals' do + @journals = Journal.all + data = Array.new + @journals.each do |journal| + @papers = journal.papers.all + data << {"title" => journal.title, "papers" => @papers} + end + data.to_json + end + +end \ No newline at end of file diff --git a/lib/desktopapp/otheraccounts.rb b/lib/desktopapp/otheraccounts.rb new file mode 100644 index 00000000..65a24a18 --- /dev/null +++ b/lib/desktopapp/otheraccounts.rb @@ -0,0 +1,61 @@ +class Desktopapp::Otheraccounts < Sinatra::Base + require 'open-uri' + require 'rexml/document' + require 'net/http' + require 'net/https' + # require 'twitter' + include REXML + + + get '/desktop/save_account_info' do + @dowhat = params['dowhat'] + @email = params['email'] + @password = params['password'] + @account = params['account'] + case @dowhat + when "new" + OtherAccount.create(user_id: current_user.id, email: @email, encrypted_password: @password, type: @account) + when "edit" + @otheraccount = OtherAccount.where(:type.all => [@account],:user_id.all => [current_user.id]) rescue nil + @otheraccount.first.update_attributes(:email => @email, :encrypted_password => @password) + when "delete" + @otheraccount = OtherAccount.where(:type.all => [@account], :user_id.all => [current_user.id]) rescue nil + @otheraccount.destroy_all + end + a = Array.new + a << {"success"=>"true"} + a.to_json + end + + get '/desktop/forgmail' do + @gmailaccount = OtherAccount.where(:type.all => ["gmail"],:user_id.all => [current_user.id]) rescue nil + + # if @gmailaccount.first != nil + # @decrypted_password = @gmailaccount.first.encrypted_password.decrypt + # @email = @gmailaccount.first.email + # url = URI.parse("https://mail.google.com/mail/feed/atom") + # #url = URI.parse("https://www.google.com/m8/feeds/contacts/default/full") + # req = Net::HTTP::Get.new(url.path) + # req.basic_auth @email, @decrypted_password + # req.content_type = 'text/xml' + + # http = Net::HTTP.new(url.host, url.port) + # http.use_ssl = true + # response = http.start { |http| http.request(req) } + + # root = Document.new(response.read_body).root + # root + # else + # msg = "trueAccount setting problem." + # # respond_to do |m| + # # m.xml {render :xml=>msg} + # # end + # msg.to_xml + # end + end + + get '/desktop/getaccounts' do + @accounts = OtherAccount.where(:user_id.all => [current_user.id]).without(:encrypted_password) + @accounts.to_json + end +end \ No newline at end of file diff --git a/lib/desktopapp/views/app_manager.erb b/lib/desktopapp/views/app_manager.erb new file mode 100755 index 00000000..b6a54fe3 --- /dev/null +++ b/lib/desktopapp/views/app_manager.erb @@ -0,0 +1,36 @@ +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/app_view1.html.erb b/lib/desktopapp/views/app_view1.html.erb new file mode 100644 index 00000000..795c9ab0 --- /dev/null +++ b/lib/desktopapp/views/app_view1.html.erb @@ -0,0 +1,12 @@ +
    +
    + +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/appstore.erb b/lib/desktopapp/views/appstore.erb new file mode 100644 index 00000000..c92ac427 --- /dev/null +++ b/lib/desktopapp/views/appstore.erb @@ -0,0 +1,26 @@ +
    +
    + +
    + + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/appstore/widgets.erb b/lib/desktopapp/views/appstore/widgets.erb new file mode 100644 index 00000000..4fd150c4 --- /dev/null +++ b/lib/desktopapp/views/appstore/widgets.erb @@ -0,0 +1,11 @@ +
    Your Widgets
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/desktop.erb b/lib/desktopapp/views/desktop.erb new file mode 100755 index 00000000..93827506 --- /dev/null +++ b/lib/desktopapp/views/desktop.erb @@ -0,0 +1,30 @@ +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/index.html.erb b/lib/desktopapp/views/index.html.erb new file mode 100755 index 00000000..98ac23e3 --- /dev/null +++ b/lib/desktopapp/views/index.html.erb @@ -0,0 +1,100 @@ +
    +
    + +
    +
    +
    +
    + +
    + + +
    +
    + + + +
    + + + diff --git a/lib/desktopapp/views/journal_p.erb b/lib/desktopapp/views/journal_p.erb new file mode 100644 index 00000000..6dddb734 --- /dev/null +++ b/lib/desktopapp/views/journal_p.erb @@ -0,0 +1,33 @@ +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/lib/desktopapp/views/journal_pages/add.erb b/lib/desktopapp/views/journal_pages/add.erb new file mode 100644 index 00000000..324432b6 --- /dev/null +++ b/lib/desktopapp/views/journal_pages/add.erb @@ -0,0 +1,109 @@ +
    +
    + + +
    +
    +
    Entry Year
    +
    + +
    +
    +
    +
    Language
    +
    + +
    +
    +
    +
    Share
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
    • +
    • +
      + +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • +
    • + + +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/journal_pages/list.erb b/lib/desktopapp/views/journal_pages/list.erb new file mode 100644 index 00000000..e32e4d6c --- /dev/null +++ b/lib/desktopapp/views/journal_pages/list.erb @@ -0,0 +1,75 @@ +
    +
    +
    +
    + +
    +
    +
    +
    More
    +
    + +
    +
    +
    +
    Tag
    +
    + +
    +
    +
    +
    Status
    +
    + +
    +
    +
    +
    View
    +
    + +
    +
    +
    +
    Share
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/sections.erb b/lib/desktopapp/views/sections.erb new file mode 100644 index 00000000..d8e8208e --- /dev/null +++ b/lib/desktopapp/views/sections.erb @@ -0,0 +1,178 @@ +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/settings.erb b/lib/desktopapp/views/settings.erb new file mode 100644 index 00000000..8b7ad2d1 --- /dev/null +++ b/lib/desktopapp/views/settings.erb @@ -0,0 +1,27 @@ +
    +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/settings/connections.erb b/lib/desktopapp/views/settings/connections.erb new file mode 100644 index 00000000..148762da --- /dev/null +++ b/lib/desktopapp/views/settings/connections.erb @@ -0,0 +1,44 @@ +
    +
    +
    +
    +
      +
    • No Connection
    • +
    • Facebook

    • +
    • +
    • +
    • +
      + Connect + +
      +
    • +
    +
      +
    • No Connection
    • +
    • Twitter

    • +
    • +
    • +
    • +
      + Connect + +
      +
    • +
    +
      +
    • No Connection
    • +
    • Gmail

    • +
    • +
    • +
    • +
      + Connect + +
      +
    • +
    +
    + +
    +
    diff --git a/lib/desktopapp/views/settings/sections.erb b/lib/desktopapp/views/settings/sections.erb new file mode 100644 index 00000000..dcb92237 --- /dev/null +++ b/lib/desktopapp/views/settings/sections.erb @@ -0,0 +1,18 @@ +
    +
    +
    +
    +
    Section Names
    +
      +
    • +
    • +
    • +
    • +
    +
    sample desciption
    +
    + Confirm +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/desktopapp/views/settings/themes.erb b/lib/desktopapp/views/settings/themes.erb new file mode 100644 index 00000000..6a3c34f8 --- /dev/null +++ b/lib/desktopapp/views/settings/themes.erb @@ -0,0 +1,86 @@ +
    + +
    +
    +
    +
    +
    +
    +
    + <% @themes.each do |theme| %> +
    <%= theme.name %>
    + <% end %> +
    +
    + + +
    +
    Preview
    +
    +
    Theme Text1
    +
    +
    +
    Theme Text2
    +
    +
    Theme Text
    +
    +
    +
    + + + + + + + + + + + + + +
    Theme ColorLine ColorText ColorBackground Color
    + + + + + + + + + + +
    +
    + Confirm +
    +
    +
    +
    +
    +
    +
    1.jpg
    +
    2.jpg
    +
    3.jpg
    +
    4.jpg
    +
    5.jpg
    +
    6.jpg
    +
    7.jpg
    +
    8.jpg
    +
    9.jpg
    +
    10.jpg
    +
    11.jpg
    +
    12.jpg
    +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/lib/orbit_app.rb b/lib/orbit_app.rb new file mode 100644 index 00000000..b0e5a735 --- /dev/null +++ b/lib/orbit_app.rb @@ -0,0 +1,12 @@ +require "orbit_app/summary" +require "orbit_app/dsl" +require "orbit_app/module/backend_side_bar" +require "orbit_app/plugin/summary" +require "orbit_app/plugin/registration" +require "orbit_app/module/summary" +require "orbit_app/module/registration" + +module OrbitApp + extend DSL + +end diff --git a/lib/orbit_app/dsl.rb b/lib/orbit_app/dsl.rb new file mode 100644 index 00000000..95bc7cce --- /dev/null +++ b/lib/orbit_app/dsl.rb @@ -0,0 +1,26 @@ +module OrbitApp + module DSL + def registration(name,type ={:type=> "ModuleApp"} ,&block) + if type[:type] == "ModuleApp" + Module::Registration.new(name,&block) + elsif type[:type] == "PersonalPlugin" + Plugin::Registration.new(name,&block) + end + + end + + + # def backend_side_bar(name,&block) + # Module::BackendSideBar.new(name,&block) + # end + + # def plugin_summary(name,&block) + # # Plugin::PluginSummary.new(name,&block) + # end + + # def module_summary(name,&block) + # Module::Summary.new(name,&block) + # end + + end +end \ No newline at end of file diff --git a/lib/orbit_app/module/backend_side_bar.rb b/lib/orbit_app/module/backend_side_bar.rb new file mode 100644 index 00000000..de0ef750 --- /dev/null +++ b/lib/orbit_app/module/backend_side_bar.rb @@ -0,0 +1,17 @@ +module OrbitApp + module Module + class BackendSideBar + attr_reader :name + + def initialize(name, &block) + @name = name + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + # def personal_plugin(*args) + # binding.pry + # end + + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/module/registration.rb b/lib/orbit_app/module/registration.rb new file mode 100644 index 00000000..2f98592d --- /dev/null +++ b/lib/orbit_app/module/registration.rb @@ -0,0 +1,54 @@ +module OrbitApp + module Module + module Registration + Version = "0.1" + + module ClassMethods + @@registrations = [] + + def new( name ,&block) + @@registrations << DataSheet.new(name,&block) + end + + def find_by_key(key) + @@registrations.each{|t| + return t if t.name == key + } + return nil + end + + def all + return @@registrations + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class DataSheet + attr_reader :name + attr_reader :base_path + + def initialize(name, &block) + @name = name + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def plugin + + end + + def personal_plugin(params) + # TODO 這裡要看是一些檔案是不是都有 + Plugin::Registration.new_from_module_app(@name,@base_path,params) + end + + def base_url(var) + @base_path = var + end + end + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/module/summary.rb b/lib/orbit_app/module/summary.rb new file mode 100644 index 00000000..c3098cb1 --- /dev/null +++ b/lib/orbit_app/module/summary.rb @@ -0,0 +1,20 @@ +#encoding: utf-8 +require "orbit_app/summary" + +module OrbitApp + module Module + module Summary + include OrbitApp::Summary + + class Item + def initialize() + @top = {:label => "全部內容有",:value=> "2071"} + @items = [{:label => "新聞",:value=> "20"}] + end + + + end + + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/plugin/registration.rb b/lib/orbit_app/plugin/registration.rb new file mode 100644 index 00000000..f996fc6d --- /dev/null +++ b/lib/orbit_app/plugin/registration.rb @@ -0,0 +1,58 @@ +module OrbitApp + module Plugin + module Registration + Version = "0.1" + + module ClassMethods + @@registrations = [] + + def new( name ,&block) + @@registrations << DataSheet.new(name,&block) + end + + def new_from_module_app(name,base_path,arg) + @@registrations << DataSheet.new(name,arg,:base_path=>base_path) + end + + def find_by_key(key) + @@registrations.each{|t| + return t if t.name == key + } + return nil + end + + def all + return @@registrations + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + class DataSheet + attr_reader :name + attr_reader :base_path + + + def initialize(name,partial=nil,*args ,&block) + @base_path = args[0][:base_path] + @name = name + @partial_path = '' + + unless partial.nil? + @partial_path = partial[:path] + end + + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def profile_partial_path + return @partial_path + end + + end + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/plugin/summary.rb b/lib/orbit_app/plugin/summary.rb new file mode 100644 index 00000000..ee0c6982 --- /dev/null +++ b/lib/orbit_app/plugin/summary.rb @@ -0,0 +1,11 @@ +require "orbit_app/summary" + +module OrbitApp + module Plugin + module Summary + # include OrbitApp::Summary + include OrbitApp::Summary + + end + end +end \ No newline at end of file diff --git a/lib/orbit_app/summary.rb b/lib/orbit_app/summary.rb new file mode 100644 index 00000000..05c22f89 --- /dev/null +++ b/lib/orbit_app/summary.rb @@ -0,0 +1,46 @@ +module OrbitApp + module Summary + Version = "0.1" + + module ClassMethods + @@summaries = [] + + def new( name ,&block) + @@summaries << Item.new(name,&block) + binding.pry + end + + def all + return @@summaries + end + end + + extend ClassMethods + def self.included( other ) + other.extend( ClassMethods ) + end + + + + + + # def initialize( k ) + # @@summaries += 1 + # binding.pry + # end + + + class Item + @name ="" + def initialize(name = "test",&block) + @name = name + block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? + end + + def get_name + return @name + end + end + + end +end \ No newline at end of file diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index eac9c40b..3abeeddd 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -148,19 +148,18 @@ module OrbitCoreLib module PermissionUnility private def check_permission(type = :use) - setup_vars - permission_grant = current_user.admin?? true : false + permission_grant = current_or_guest_user.admin?? true : false module_app = @module_app.nil?? find_module_app_by_token(params[:token]) : @module_app unless permission_grant permission_grant = case type when :use users_ary = module_app.app_auth.auth_users rescue nil users_ary = [] if users_ary.nil? - (users_ary.include?(current_user) || module_app.is_manager?(current_user) || module_app.is_sub_manager?(current_user)) + (users_ary.include?(current_or_guest_user) || module_app.is_manager?(current_or_guest_user) || module_app.is_sub_manager?(current_or_guest_user)) when :manager - module_app.is_manager?(current_user) + module_app.is_manager?(current_or_guest_user) when :sub_manager - module_app.is_manager?(current_user) || module_app.is_sub_manager?(current_user) + module_app.is_manager?(current_or_guest_user) || module_app.is_sub_manager?(current_or_guest_user) end end permission_grant diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 2ee2824b..32b4405c 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -189,6 +189,7 @@ module ParserCommon if (content["main"] == "true" && !page.module_app.nil?) ret << "
    " else @@ -205,7 +206,7 @@ module ParserCommon ret << part.content rescue '' when 'module_widget' url = "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" - options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}" + options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}&part_id=#{part.id}" ret << "
    " when 'public_r_tag' ret << "" diff --git a/lib/parsers/parser_layout.rb b/lib/parsers/parser_layout.rb index 3379c487..817bf327 100644 --- a/lib/parsers/parser_layout.rb +++ b/lib/parsers/parser_layout.rb @@ -22,7 +22,7 @@ module ParserLayout body.css('.page_image').each do |page_image| image = design.images.where( file: File.basename(page_image['src']))[0] - image.update_attributes(:name => File.basename(page_image['src']), :html_id => page_image['id'], :html_class => page_image['class']) if image + image.update_attributes(:html_id => page_image['id'], :html_class => page_image['class'], :in_html => true) if image end end diff --git a/lib/tasks/build_new_member.rake b/lib/tasks/build_new_member.rake new file mode 100644 index 00000000..5810f4fe --- /dev/null +++ b/lib/tasks/build_new_member.rake @@ -0,0 +1,333 @@ +# encoding: utf-8 + +namespace :build_new_member do + task :set_gender => :environment do + af = AttributeField.first({conditions:{key: "gender"}}) + af.markup_value = {"1"=>{"en"=>"Male", "zh_tw"=>"男性"}, "2"=>{"en"=>"Female", "zh_tw"=>"女性"}, "3"=>{"en"=>"Other", "zh_tw"=>"其他"}, "3"=>{"en"=>"Not public", "zh_tw"=>"不公開"}} + af.markup = "select" + af.locale = true + af.save + end + + task :setup_status_options => :environment do + data_set = { + :teacher=>{:status=>{:markup=>"select",:markup_value=>{"1"=>{"en"=>"Fulltime", "zh_tw"=>"全職"}, "2"=>{"en"=>"Adjunct", "zh_tw"=>"兼職"}, "3"=>{"en"=>"Co Hiring", "zh_tw"=>"合聘"}, "3"=>{"en"=>"Distinguished", "zh_tw"=>"特聘"}}}}, + :student=>{:status=>{:markup=>"select",:markup_value=>{"1"=>{"en"=>"Studying", "zh_tw"=>"在學"}, "2"=>{"en"=>"Drop-out", "zh_tw"=>"休學"}, "3"=>{"en"=>"Alumi", "zh_tw"=>"校友"}, "3"=>{"en"=>"Suspended", "zh_tw"=>"未完成"}}}}, + :staff=>{:staff=>{:markup=>"select",:markup_value=>nil}} + } + data_set.each do |key,data| + role = Role.first({conditions:{key: key}}) + role.sub_roles.each do |sr| + sr.attribute_fields.each do |af| + if af.key == "status" + # binding.pry + af.markup = data[:status][:markup] + af.markup_value = data[:status][:markup_value] + af.save + # binding.pry + end + end + end + end + + end + + task :sub_role_tags_generate => :environment do + SubRoleTag.destroy_all + role_keys = %w{teacher staff student} + role_keys.each do |role_key| + role = Role.first({conditions:{key: role_key}}) + puts "Starting with Role with key: #{role_key}" + role.sub_roles.each do |sr| + puts "Role : #{role_key} => #{sr.title}" + for i in 1..7 + sr.tags.build(:en => "Students-#{sr.title_translations['en']}_#{i}" , :zh_tw => "在校學生-#{sr.title_translations['zh_tw']}_#{i}" , :key => "#{role_key}_#{sr.title_translations['en'].parameterize}_#{i}" ) + end + sr.save + end + end + end + + task :fields_for_teacher => :environment do + sub_role_attribute_fields_template = [ + {key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil }, + {key: 'other_position', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"其他職位", "en"=>"Other Position"}, neutral_title: nil }, + {key: 'research_domain', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"研究領域", "en"=>"Research Domain"}, neutral_title: nil }, + {key: 'teaching_domain', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"授課領域", "en"=>"Teaching Domain"}, neutral_title: nil } + ] + role = Role.first({conditions:{key: 'teacher'}}) + role.sub_roles.each{|sb| + sb.attribute_fields.destroy_all + sub_role_attribute_fields_template.each{|att_f| + sb.attribute_fields.build att_f + } + sb.save + } + end + + task :fields_for_student => :environment do + sub_role_attribute_fields_template = [ + {key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil }, + {key: 'entrance_year', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"入學年", "en"=>"Entrance Year"}, neutral_title: nil }, + {key: 'graduation_date', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"屆別", "en"=>"Graduation Date"}, neutral_title: nil }, + {key: 'actual_graduation', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"實際畢業年", "en"=>"Actual Graduation"}, neutral_title: nil } + ] + role = Role.first({conditions:{key: 'student'}}) + role.sub_roles.each{|sb| + sb.attribute_fields.destroy_all + sub_role_attribute_fields_template.each{|att_f| + sb.attribute_fields.build att_f + } + sb.save + } + end + + task :fields_for_staff => :environment do + sub_role_attribute_fields_template = [ + {key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil }, + {key: 'responsibilities', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"負責業務", "en"=>"Responsibilities"}, neutral_title: nil } + ] + role = Role.first({conditions:{key: 'staff'}}) + role = Role.create!({key: "staff", built_in: true, disabled: false, title_translations: {"en"=>"Staff", "zh_tw"=>"行政人員"}}) if role.nil? + role.sub_roles.each{|sb| + sb.attribute_fields.destroy_all + sub_role_attribute_fields_template.each{|att_f| + sb.attribute_fields.build att_f + } + sb.save + } + end + + task :matt_data => :environment do + b = User.first({conditions:{email: 'matt@rulingcom.com'}}) + b.attribute_values.destroy_all + + data = [{:key=> 'last_name',:en=>'Fu',:zh_tw=>'傅'}, + {:key=> 'first_name',:en=>'Matt',:zh_tw=>'儒淵'}, + {:key=> 'nick_name',:en=> 'Matt K.',:zh_tw=> 'Matt K.'}, + {:key=> 'addr',:en=>'Earth',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號'}, + {:key=> 'phone',:en=>'035508881',:zh_tw=>'035508881'}, + {:key=> 'gender',:en=>'Male',:zh_tw=>'男'}, + {:key=> 'birthday',:en=>'1986',:zh_tw=>'1986'}, + {:key=> 'email',:en=>'matt@rulingcom.com',:zh_tw=>'matt@rulingcom.com'}] + + data_hash = Hash[data.map{|t| [t[:key],t] }] + Info.first.attribute_fields.each do |profile_field| + b.attribute_values.build(data_hash.fetch(profile_field.key).merge({:attribute_field_id=>profile_field.id})) + end + + #================================================================== + b.roles = [] + b.roles << Role.first({conditions:{key: 'teacher'}}) + b.roles << Role.first({conditions:{key: 'student'}}) + #================================================================== + b.sub_roles = [] + sr_1 = b.roles.first.sub_roles.last + sr_2 = b.roles.last.sub_roles.last + b.sub_roles << sr_1 #use teacher data + b.sub_roles << sr_2 #use student data + #================================================================== + # to get field for fast fill up: sr_2.attribute_fields.map{|t| Hash[t.key,nil]} + {"status"=>"兼職","research_domain"=>"神經網絡","teaching_domain"=>"平行運算"}.each do |key, value| + field = sr_1.attribute_fields.where({key: key}).first + b.attribute_values.build({key=>value}.merge({:key=>field.key,:attribute_field_id=>field.id})) + end + + {"status"=>"在學中","entrance_year"=>2010}.each do |key, value| + field = sr_2.attribute_fields.where({key: key}).first + b.attribute_values.build({key=>value}.merge({:key=>field.key,:attribute_field_id=>field.id})) + end + + # b.attribute_values.build :key=> 'last_name',:en=>'Fu',:zh_tw=>'傅' + # b.attribute_values.build :key=> 'first_name',:en=>'Matt',:zh_tw=>'儒淵' + # b.attribute_values.build :key=> 'nick_name',:en=> 'Matt K.',:zh_tw=> 'Matt K.' + # b.attribute_values.build :key=> 'addr',:en=>'Earth',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號' + # b.attribute_values.build :key=> 'phone',:en=>'035508881',:zh_tw=>'035508881' + # b.attribute_values.build :key=> 'gender',:en=>'Male',:zh_tw=>'男' + # b.attribute_values.build :key=> 'birthday',:en=>'1986',:zh_tw=>'1986' + # b.attribute_values.build :key=> 'email',:en=>'matt@rulingcom.com',:zh_tw=>'matt@rulingcom.com' + b.save + end + + task :chris_data => :environment do + b = User.first({conditions:{email: 'chris@rulingcom.com'}}) + b.attribute_values.destroy_all + b.attribute_values.build :key=> 'last_name',:en=>'Vilayphiou',:zh_tw=>'林' + b.attribute_values.build :key=> 'first_name',:en=>'Christophe',:zh_tw=>'順發' + b.attribute_values.build :key=> 'nick_name',:en=> 'Chris',:zh_tw=> 'Chris' + b.attribute_values.build :key=> 'addr',:en=>'asdsaddasdasd',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號' + b.attribute_values.build :key=> 'phone',:en=>'035508881',:zh_tw=>'035508881' + b.attribute_values.build :key=> 'gender',:en=>'Male',:zh_tw=>'男' + b.attribute_values.build :key=> 'birthday',:en=>'1990',:zh_tw=>'1990' + b.attribute_values.build :key=> 'email',:en=>'chris@rulingcom.com',:zh_tw=>'chris@rulingcom.com' + b.save + end + + task :module_app => :environment do + ModuleApp.create!(:key=>"new_member", + :title=>"new_member", + :version=> "0.1", + :organization => "Rulingcom", + :author => "RD dep", + :intro => "New interface for member menagement", + :enable_frontend => true) + end + + task :sub_role => :environment do + teacher_role = Role.first({conditions:{key: 'teacher'}}) + teacher_role.sub_roles.destroy_all + teacher_sub_roles ={ + :professor => {"zh_tw"=>"教授", "en"=>"Professor"}, + :lecturer => {"zh_tw"=>"講師", "en"=>"Lecturer"}, + :associate_professor => {"zh_tw"=>"副教授", "en"=>"Associate Professor"}, + :assistant_professor => {"zh_tw"=>"助理教授", "en"=>"Assistant Professor"} + } + + teacher_sub_roles.each do |key,title| + teacher_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true + puts "=SubRole key:#{key}\t Title:#{title}" + end + teacher_role.save + p "==Finished building sub_roles for Teachers" + + student_role = Role.first({conditions:{key: 'student'}}) + student_role.sub_roles.destroy_all + student_sub_roles ={ + :ph_d => {"zh_tw"=>"博士班", "en"=>"Ph.D"}, + :master => {"zh_tw"=>"碩士班", "en"=>"Master"}, + :bachelor => {"zh_tw"=>"學士班", "en"=>"Bachelor"}, + } + + student_sub_roles.each do |key,title| + student_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true + puts "=SubRole key:#{key}\t Title:#{title}" + end + student_role.save + p "==Finished building sub_roles for Students" + + staff_role = Role.first({conditions:{key: 'staff'}}) + staff_role.sub_roles.destroy_all + staff_sub_roles ={ + :general => {"zh_tw"=>"一般", "en"=>"General"} + } + + staff_sub_roles.each do |key,title| + staff_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true + puts "=SubRole key:#{key}\t Title:#{title}" + end + staff_role.save + p "==Finished building sub_roles for Staff" + + staff_role = Role.first({conditions:{key: 'staff'}}) + staff_role.sub_roles.destroy_all + staff_sub_roles ={ + :general => {"zh_tw"=>"一般", "en"=>"General"} + } + + staff_sub_roles.each do |key,title| + staff_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true + puts "=SubRole key:#{key}\t Title:#{title}" + end + staff_role.save + p "==Finished building sub_roles for Staff" + + end + + + # task :status => :environment do + # teacher_role = Role.first({conditions:{key: 'teacher'}}) + # teacher_role.statuses.destroy_all + # teacher_status ={ + # :fulltime => {"en"=>"Full Time", "zh_tw"=>"全職"}, + # :adjunct => {"en"=>"Adjunct", "zh_tw"=>"兼職"}, + # :co_hiring => {"en"=>"Co Hiring", "zh_tw"=>"合聘"}, + # :distinguished => {"en"=>"Distinguished", "zh_tw"=>"特聘"} + # } + # teacher_status.each do |key,title| + # teacher_role.statuses.build :key=>key,:title_translations=>title + # puts "=Status key:#{key}\t Title:#{title}" + # end + # teacher_role.save + + # p "==Finished building status for Teachers" + + # student_role = Role.first({conditions:{key: 'student'}}) + # student_status.statuses.destroy_all + # student_status ={ + # :studying => {"en"=>"Studying", "zh_tw"=>"在學"}, + # :drop_out => {"en"=>"Drop-out", "zh_tw"=>"休學"}, + # :alumi => {"en"=>"Alumi", "zh_tw"=>"校友"}, + # :suspended => {"en"=>"Suspended", "zh_tw"=>"未完成"} + # } + # student_status.each do |key,title| + # student_role.statuses.build :key=>key,:title_translations=>title + # puts "=Status key:#{key}\t Title:#{title}" + # end + # student_role.save + + # p "==Finished building status for Students" + + # end + task :build_sub_role_for_staff_1023 => :environment do + role = Role.first(conditions: {key: 'staff'}) + staff_sub_roles ={ + :secretary => {"en"=>"Secretary", "zh_tw"=>"秘書"}, + :assistant => {"en"=>"Assistant", "zh_tw"=>"行政助理"}, + :research_assistant => {"en"=>"Research Assistant", "zh_tw"=>"研究助理"}, + :ta => {"en"=>"TA", "zh_tw"=>"助教"}, + :technical_specialist => {"en"=>"Technical Specialist", "zh_tw"=>"技士"} + } + staff_sub_roles.each do |key,item| + role.sub_roles.build(:key=>key,:title_translations=> item) + end + role.save + end + + task :build_staff_attribute_field_1023 => :environment do + sub_role_attribute_fields_template = [ + {key: 'status', markup: "select", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil }, + {key: 'responsibilities', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"負責業務", "en"=>"Responsibilities"}, neutral_title: nil } + ] + role = Role.first({conditions:{key: 'staff'}}) + role.sub_roles.each{|sb| + sb.attribute_fields.destroy_all + sub_role_attribute_fields_template.each{|att_f| + sb.attribute_fields.build att_f + } + sb.save + } + role.save + end + + task :build_status_1023 => :environment do + student_status ={ + :studying => {"en"=>"Studying", "zh_tw"=>"在學"}, + :drop_out => {"en"=>"Drop-out", "zh_tw"=>"休學"}, + :alumi => {"en"=>"Alumi", "zh_tw"=>"校友"}, + :suspended => {"en"=>"Suspended", "zh_tw"=>"未完成"} + } + + role = Role.first(conditions: {key: 'student'}) + student_status.each do |key,item| + role.statuses.build(:key=>key.to_s,:title_translations=>item) + end + role.save + + teacher_status ={ + :fulltime => {"en"=>"Full Time", "zh_tw"=>"全職"}, + :adjunct => {"en"=>"Adjunct", "zh_tw"=>"兼職"}, + :co_hiring => {"en"=>"Co Hiring", "zh_tw"=>"合聘"}, + :distinguished => {"en"=>"Distinguished", "zh_tw"=>"特聘"} + } + role = Role.first(conditions: {key: 'teacher'}) + teacher_status.each do |key,item| + role.statuses.build(:key=>key.to_s,:title_translations=>item) + end + role.save + + end + + task :clean_up_attribute_value_for_deleted_fields => :environment do + AttributeValue.all.reject{|t| !AttributeField.find(t.attribute_field_id).nil? rescue false }.each{|t| t.delete} + end +end diff --git a/lib/tasks/data_migration.rake b/lib/tasks/data_migration.rake index 624cf39c..9c93c18a 100644 --- a/lib/tasks/data_migration.rake +++ b/lib/tasks/data_migration.rake @@ -96,4 +96,8 @@ namespace :data_migration do app.save! end + task :rename_attribute_field => :environment do + AttributeField.collection.update({},{'$rename' => {'title' => 'locale_title'}}, multi: true, safe: true) + end + end \ No newline at end of file diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index 70776ed9..60a7ec93 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -71,7 +71,7 @@ namespace :dev do design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake") - design.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) + design.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # @@ -89,7 +89,7 @@ namespace :dev do design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran") - design_1.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) + design_1.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # diff --git a/lib/tasks/pages.rake b/lib/tasks/pages.rake index 8a43f420..598d4b53 100644 --- a/lib/tasks/pages.rake +++ b/lib/tasks/pages.rake @@ -13,7 +13,7 @@ namespace :pages do design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake") - design.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) + design.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # @@ -37,7 +37,7 @@ namespace :pages do design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran") - design_1.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) + design_1.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/css/default.css b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/css/default.css new file mode 100755 index 00000000..9e01a140 --- /dev/null +++ b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/css/default.css @@ -0,0 +1,45 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #6F0; } +.thmc2 { background: #C09; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #FFFFFF; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +*/ +.thmc4 { background: #000000; } + + +/* Theme Text Color */ +.thmtxt { color: #fff; } +.thmtxth { color: #000; } + +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/apps.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/apps.png new file mode 100644 index 00000000..67b69c89 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/apps.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/background.jpg b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/background.jpg new file mode 100755 index 00000000..f45c73a7 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/chris.jpeg b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/chris.jpeg new file mode 100644 index 00000000..e0c669d4 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/chris.jpeg differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_activities.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_album.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_app_manager.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_appstore.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_blog.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_books.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_calendar.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_certification.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_clubs.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_connection.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_courses.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_education.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_experience.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_files.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_home.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_homework.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_honors.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_journal_p.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_labs.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_landt.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_mypage.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_orbit.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_patents.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_personal.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_publication.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_d.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_p.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_sections.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_seminar_p.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_settings.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_working.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/home.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/home.png new file mode 100644 index 00000000..56efebb5 Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/home.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/sections.png b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/sections.png new file mode 100644 index 00000000..7b6a039f Binary files /dev/null and b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/images/sections.png differ diff --git a/public/desktop_themes/4f8d3f3c3b67fcd05f086358/settings/4f8d3f3c3b67fcd05f086358.json b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/settings/4f8d3f3c3b67fcd05f086358.json new file mode 100755 index 00000000..64701e64 --- /dev/null +++ b/public/desktop_themes/4f8d3f3c3b67fcd05f086358/settings/4f8d3f3c3b67fcd05f086358.json @@ -0,0 +1,39 @@ +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/css/default.css b/public/desktop_themes/4f8d3f493b67fcd05f086359/css/default.css new file mode 100755 index 00000000..cfbd430d --- /dev/null +++ b/public/desktop_themes/4f8d3f493b67fcd05f086359/css/default.css @@ -0,0 +1,45 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #0099CC; } +.thmc2 { background: #3366CC; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #FFFFFF; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +*/ +.thmc4 { background: #000000; } + + +/* Theme Text Color */ +.thmtxt, .thmtxt:hover { color: #fff; } +.thmtxth { color: #fff; } + +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/background.jpg b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/background.jpg new file mode 100755 index 00000000..f45c73a7 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_activities.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_album.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_app_manager.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_appstore.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_blog.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_books.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_calendar.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_certification.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_clubs.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_connection.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_courses.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_education.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_experience.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_files.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_home.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_homework.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_honors.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_journal_p.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_labs.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_landt.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_mypage.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_orbit.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_patents.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_personal.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_publication.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_d.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_p.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_sections.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_seminar_p.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_settings.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_working.png b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f493b67fcd05f086359/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f493b67fcd05f086359/settings/4f8d3f493b67fcd05f086359.json b/public/desktop_themes/4f8d3f493b67fcd05f086359/settings/4f8d3f493b67fcd05f086359.json new file mode 100755 index 00000000..64701e64 --- /dev/null +++ b/public/desktop_themes/4f8d3f493b67fcd05f086359/settings/4f8d3f493b67fcd05f086359.json @@ -0,0 +1,39 @@ +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/css/natural.css b/public/desktop_themes/4f8d3f533b67fcd05f08635a/css/natural.css new file mode 100755 index 00000000..1a1d5766 --- /dev/null +++ b/public/desktop_themes/4f8d3f533b67fcd05f08635a/css/natural.css @@ -0,0 +1,46 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #B6662C; } +.thmc2 { background: #34520C; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #FFFFFF; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +first one +*/ +.thmc4 { background: #5CA360; } + + +/* Theme Text Color */ +.thmtxt, .thmtxt:hover { color: #fff; } +.thmtxth { color: #fff; } + +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/background.jpg b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/background.jpg new file mode 100755 index 00000000..520df56c Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_activities.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_activities.png new file mode 100755 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_album.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_album.png new file mode 100755 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_app_manager.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_app_manager.png new file mode 100755 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_appstore.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_appstore.png new file mode 100755 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_blog.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_blog.png new file mode 100755 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_books.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_books.png new file mode 100755 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_calendar.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_calendar.png new file mode 100755 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_certification.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_certification.png new file mode 100755 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_clubs.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_clubs.png new file mode 100755 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_connection.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_connection.png new file mode 100755 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_courses.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_courses.png new file mode 100755 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_education.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_experience.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_experience.png new file mode 100755 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_files.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_files.png new file mode 100755 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_home.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_home.png new file mode 100755 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_homework.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_homework.png new file mode 100755 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_honors.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_journal_p.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_journal_p.png new file mode 100755 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_labs.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_labs.png new file mode 100755 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_landt.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_landt.png new file mode 100755 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_mypage.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_mypage.png new file mode 100755 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_orbit.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_patents.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_patents.png new file mode 100755 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_personal.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_personal.png new file mode 100755 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_publication.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_publication.png new file mode 100755 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research.png new file mode 100755 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_d.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_d.png new file mode 100755 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_p.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_p.png new file mode 100755 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_sections.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_sections.png new file mode 100755 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_seminar_p.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_seminar_p.png new file mode 100755 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_settings.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_settings.png new file mode 100755 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_working.png b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_working.png new file mode 100755 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f533b67fcd05f08635a/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f533b67fcd05f08635a/settings/4f8d3f533b67fcd05f08635a.json b/public/desktop_themes/4f8d3f533b67fcd05f08635a/settings/4f8d3f533b67fcd05f08635a.json new file mode 100755 index 00000000..21c4eee1 --- /dev/null +++ b/public/desktop_themes/4f8d3f533b67fcd05f08635a/settings/4f8d3f533b67fcd05f08635a.json @@ -0,0 +1,39 @@ +{ + "css":"natural.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/css/default.css b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/css/default.css new file mode 100755 index 00000000..535227b0 --- /dev/null +++ b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/css/default.css @@ -0,0 +1,45 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #F0F; } +.thmc2 { background: #FF0; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #000000; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +*/ +.thmc4 { background: #C6F; } + + +/* Theme Text Color */ +.thmtxt { color: #000; } +.thmtxth { color: #F00; } + +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/apps.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/apps.png new file mode 100644 index 00000000..67b69c89 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/apps.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/background.jpg b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/background.jpg new file mode 100644 index 00000000..2df405f5 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_activities.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_album.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_app_manager.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_appstore.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_blog.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_books.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_calendar.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_certification.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_clubs.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_connection.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_courses.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_education.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_experience.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_files.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_home.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_homework.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_honors.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_journal_p.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_labs.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_landt.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_mypage.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_orbit.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_patents.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_personal.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_publication.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_d.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_p.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_sections.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_seminar_p.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_settings.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_working.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/home.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/home.png new file mode 100644 index 00000000..56efebb5 Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/home.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/sections.png b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/sections.png new file mode 100644 index 00000000..7b6a039f Binary files /dev/null and b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/images/sections.png differ diff --git a/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/settings/4f8d3f5d3b67fcd05f08635b.json b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/settings/4f8d3f5d3b67fcd05f08635b.json new file mode 100755 index 00000000..64701e64 --- /dev/null +++ b/public/desktop_themes/4f8d3f5d3b67fcd05f08635b/settings/4f8d3f5d3b67fcd05f08635b.json @@ -0,0 +1,39 @@ +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/css/default.css b/public/desktop_themes/4f8d3f673b67fcd05f08635c/css/default.css new file mode 100755 index 00000000..05b25eb1 --- /dev/null +++ b/public/desktop_themes/4f8d3f673b67fcd05f08635c/css/default.css @@ -0,0 +1,45 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #CC9; } +.thmc2 { background: #CC0; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #FFFFFF; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +*/ +.thmc4 { background: #000000; } + + +/* Theme Text Color */ +.thmtxt { color: #000; } +.thmtxth { color: #fff; } + +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/apps.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/apps.png new file mode 100644 index 00000000..67b69c89 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/apps.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/background.jpg b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/background.jpg new file mode 100644 index 00000000..5eb4d999 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_activities.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_album.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_app_manager.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_appstore.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_blog.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_books.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_calendar.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_certification.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_clubs.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_connection.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_courses.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_education.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_experience.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_files.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_home.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_homework.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_honors.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_journal_p.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_labs.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_landt.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_mypage.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_orbit.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_patents.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_personal.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_publication.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_d.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_p.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_sections.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_seminar_p.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_settings.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_working.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/home.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/home.png new file mode 100644 index 00000000..56efebb5 Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/home.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/sections.png b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/sections.png new file mode 100644 index 00000000..7b6a039f Binary files /dev/null and b/public/desktop_themes/4f8d3f673b67fcd05f08635c/images/sections.png differ diff --git a/public/desktop_themes/4f8d3f673b67fcd05f08635c/settings/4f8d3f673b67fcd05f08635c.json b/public/desktop_themes/4f8d3f673b67fcd05f08635c/settings/4f8d3f673b67fcd05f08635c.json new file mode 100755 index 00000000..64701e64 --- /dev/null +++ b/public/desktop_themes/4f8d3f673b67fcd05f08635c/settings/4f8d3f673b67fcd05f08635c.json @@ -0,0 +1,39 @@ +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/css/default.css b/public/desktop_themes/4f8d3f783b67fcd05f08635d/css/default.css new file mode 100644 index 00000000..d1fe3916 --- /dev/null +++ b/public/desktop_themes/4f8d3f783b67fcd05f08635d/css/default.css @@ -0,0 +1,44 @@ +/* +Theme Color + +random apply to: +.widget_fn - on hover status +#search_app .submit +.tile + +*/ +.thmc1 { background: #271D13; } +.thmc2 { background: #967957; } + +/* +sub1 Theme Color + +apply to: +#search_app + +*/ +.thmc3 { background: #FFFFFF; } + +/* +sub1 Theme Color + +apply to: +#rwidget + +*/ +.thmc4 { background: #000; } + + +/* Theme Text Color */ +.thmtxt { color: #fff; } +.thmtxth { color: #fff; } +/* Group Seprate Color */ +.g_sep { border-color: #fff; } + +/* +theme bg image + +#thmbackground img - background +#bgover - upon #thmbackground + +*/ \ No newline at end of file diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/Home-icon.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/Home-icon.png new file mode 100644 index 00000000..97cef985 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/Home-icon.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/apps.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/apps.png new file mode 100644 index 00000000..67b69c89 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/apps.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/background.jpg b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/background.jpg new file mode 100644 index 00000000..0589fd94 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/background.jpg differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_activities.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_activities.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_album.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_album.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_app_manager.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_app_manager.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_appstore.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_appstore.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_blog.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_blog.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_books.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_books.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_calendar.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_calendar.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_certification.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_certification.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_clubs.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_clubs.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_connection.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_connection.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_courses.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_courses.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_education.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_education.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_experience.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_experience.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_files.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_files.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_home.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_home.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_homework.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_homework.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_honors.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_honors.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_journal_p.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_journal_p.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_labs.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_labs.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_landt.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_landt.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_mypage.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_mypage.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_orbit.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_orbit.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_patents.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_patents.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_personal.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_personal.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_publication.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_publication.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_d.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_d.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_p.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_research_p.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_sections.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_sections.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_seminar_p.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_seminar_p.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_settings.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_settings.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_working.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/d_working.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/home.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/home.png new file mode 100644 index 00000000..56efebb5 Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/home.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/sections.png b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/sections.png new file mode 100644 index 00000000..7b6a039f Binary files /dev/null and b/public/desktop_themes/4f8d3f783b67fcd05f08635d/images/sections.png differ diff --git a/public/desktop_themes/4f8d3f783b67fcd05f08635d/settings/4f8d3f783b67fcd05f08635d.json b/public/desktop_themes/4f8d3f783b67fcd05f08635d/settings/4f8d3f783b67fcd05f08635d.json new file mode 100755 index 00000000..64701e64 --- /dev/null +++ b/public/desktop_themes/4f8d3f783b67fcd05f08635d/settings/4f8d3f783b67fcd05f08635d.json @@ -0,0 +1,39 @@ +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["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", + "seminar_p":"d_seminar_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" + } + } \ No newline at end of file diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/4fa7810ac88514014d7c59bc.js b/public/desktop_widgets/4fa7810ac88514014d7c59bc/4fa7810ac88514014d7c59bc.js new file mode 100755 index 00000000..d4237c01 --- /dev/null +++ b/public/desktop_widgets/4fa7810ac88514014d7c59bc/4fa7810ac88514014d7c59bc.js @@ -0,0 +1,171 @@ +/*! + * jquery.tzineClock.js - Tutorialzine Colorful Clock Plugin + * + * Copyright (c) 2009 Martin Angelov + * http://tutorialzine.com/ + * + * Licensed under MIT + * http://www.opensource.org/licenses/mit-license.php + * + * Launch : December 2009 + * Version : 1.0 + * Released: Monday 28th December, 2009 - 00:00 + */ + +(function($){ + + // A global array used by the functions of the plug-in: + var gVars = {}; + + // Extending the jQuery core: + $.fn.tzineClock = function(opts){ + + // "this" contains the elements that were selected when calling the plugin: $('elements').tzineClock(); + // If the selector returned more than one element, use the first one: + + var container = this.eq(0); + + if(!container) + { + try{ + console.log("Invalid selector!"); + } catch(e){} + + return false; + } + + if(!opts) opts = {}; + + var defaults = { + /* Additional options will be added in future versions of the plugin. */ + }; + + /* Merging the provided options with the default ones (will be used in future versions of the plugin): */ + $.each(defaults,function(k,v){ + opts[k] = opts[k] || defaults[k]; + }) + + // Calling the setUp function and passing the container, + // will be available to the setUp function as "this": + setUp.call(container); + + return this; + } + + function setUp() + { + // The colors of the dials: + var colors = ['orange','blue','green']; + + var tmp; + + for(var i=0;i<3;i++) + { + // Creating a new element and setting the color as a class name: + + tmp = $('
    ').attr('class',colors[i]+' clock').html( + '
    '+ + + '
    '+ + + '
    '+ + '
    '+ + '
    '+ + + '
    '+ + '
    '+ + '
    ' + ); + + // Appending to the container: + $(this).append(tmp); + + // Assigning some of the elements as variables for speed: + tmp.rotateLeft = tmp.find('.rotate.left'); + tmp.rotateRight = tmp.find('.rotate.right'); + tmp.display = tmp.find('.display'); + + // Adding the dial as a global variable. Will be available as gVars.colorName + gVars[colors[i]] = tmp; + } + + // Setting up a interval, executed every 1000 milliseconds: + setInterval(function(){ + + var currentTime = new Date(); + var h = currentTime.getHours(); + var m = currentTime.getMinutes(); + var s = currentTime.getSeconds(); + + animation(gVars.green, s, 60); + animation(gVars.blue, m, 60); + animation(gVars.orange, h, 24); + + },1000); + } + + function animation(clock, current, total) + { + // Calculating the current angle: + var angle = (360/total)*(current+1); + + var element; + + if(current==0) + { + // Hiding the right half of the background: + clock.rotateRight.hide(); + + // Resetting the rotation of the left part: + rotateElement(clock.rotateLeft,0); + } + + if(angle<=180) + { + // The left part is rotated, and the right is currently hidden: + element = clock.rotateLeft; + } + else + { + // The first part of the rotation has completed, so we start rotating the right part: + clock.rotateRight.show(); + clock.rotateLeft.show(); + + rotateElement(clock.rotateLeft,180); + + element = clock.rotateRight; + angle = angle-180; + } + + rotateElement(element,angle); + + // Setting the text inside of the display element, inserting a leading zero if needed: + clock.display.html(current<10?'0'+current:current); + } + + function rotateElement(element,angle) + { + // Rotating the element, depending on the browser: + var rotate = 'rotate('+angle+'deg)'; + + if(element.css('MozTransform')!=undefined) + element.css('MozTransform',rotate); + + else if(element.css('WebkitTransform')!=undefined) + element.css('WebkitTransform',rotate); + + // A version for internet explorer using filters, works but is a bit buggy (no surprise here): + else if(element.css("filter")!=undefined) + { + var cos = Math.cos(Math.PI * 2 / 360 * angle); + var sin = Math.sin(Math.PI * 2 / 360 * angle); + + element.css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+cos+",M12=-"+sin+",M21="+sin+",M22="+cos+",SizingMethod='auto expand',FilterType='nearest neighbor')"); + + element.css("left",-Math.floor((element.width()-200)/2)); + element.css("top",-Math.floor((element.height()-200)/2)); + } + + } + +})(jQuery) \ No newline at end of file diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_blue.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_blue.png new file mode 100644 index 00000000..7f53ed5c Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_blue.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_green.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_green.png new file mode 100644 index 00000000..ce092cfc Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_green.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_orange.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_orange.png new file mode 100644 index 00000000..f13fdc7c Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_orange.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/index.html.erb b/public/desktop_widgets/4fa7810ac88514014d7c59bc/index.html.erb new file mode 100755 index 00000000..2a69e24c --- /dev/null +++ b/public/desktop_widgets/4fa7810ac88514014d7c59bc/index.html.erb @@ -0,0 +1,81 @@ + + +
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_blue.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_blue.png new file mode 100755 index 00000000..ea275d1b Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_blue.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_green.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_green.png new file mode 100755 index 00000000..393618c2 Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_green.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_orange.png b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_orange.png new file mode 100755 index 00000000..84d32207 Binary files /dev/null and b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/bg_orange.png differ diff --git a/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/clock.css b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/clock.css new file mode 100755 index 00000000..8790b137 --- /dev/null +++ b/public/desktop_widgets/4fa7810ac88514014d7c59bc/temp/clock.css @@ -0,0 +1,69 @@ +.clock{ + /* The .clock div. Created dynamically by jQuery */ + /*background-color:#252525;*/ + height:200px; + width:200px; + position:relative; + overflow:hidden; + float:left; +} + +.clock .rotate{ + /* There are two .rotate divs - one for each half of the background */ + position:absolute; + width:200px; + height:200px; + top:0; + left:0; +} + +.rotate.right{ + display:none; + z-index:11; +} + +.clock .bg, .clock .front{ + width:100px; + height:200px; + /*background-color:#252525;*/ + position:absolute; + top:0; +} + +.clock .display{ + /* Holds the number of seconds, minutes or hours respectfully */ + position:absolute; + width:200px; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + z-index:20; + color:#F5F5F5; + font-size:60px; + text-align:center; + top:65px; + left:0; + + /* CSS3 text shadow: */ + text-shadow:4px 4px 5px #333333; +} + +/* The left part of the background: */ + +.clock .bg.left{ left:0; } + +/* Individual styles for each color: */ +.orange .bg.left{ background:url(bg_orange.png) no-repeat left top; } +.green .bg.left{ background:url(bg_green.png) no-repeat left top; } +.blue .bg.left{ background:url(bg_blue.png) no-repeat left top; } + +/* The right part of the background: */ +.clock .bg.right{ left:100px; } + +.orange .bg.right{ background:url(bg_orange.png) no-repeat right top; } +.green .bg.right{ background:url(bg_green.png) no-repeat right top; } +.blue .bg.right{ background:url(bg_blue.png) no-repeat right top; } + + +.clock .front.left{ + left:0; + z-index:10; +} diff --git a/public/desktop_widgets/4fa7812ec88514014d7c59bd/4fa7812ec88514014d7c59bd.js b/public/desktop_widgets/4fa7812ec88514014d7c59bd/4fa7812ec88514014d7c59bd.js new file mode 100644 index 00000000..f68298d5 --- /dev/null +++ b/public/desktop_widgets/4fa7812ec88514014d7c59bd/4fa7812ec88514014d7c59bd.js @@ -0,0 +1,40 @@ +var gmail = function(){ + $.ajax({ + url: "/desktop/forgmail", + dataType : "xml", + success:function(data){ + if($(data).find("HEAD").find("ERROR").text()=="true"){ + $("#gmail #content #msgbody").text($(data).find("HEAD").find("ERRORMSG").text()); + }else{ + if($(data).find("HEAD").find("TITLE").text()=="Unauthorized"){ + $("#gmail #forerror").text($(data).find("HEAD").find("TITLE").text()).show(); + }else{ + if($(data).find("fullcount").text()=="0"){ + $("#gmail #forerror").hide(); + $("#gmail #content #msgbody").text("No new mails"); + }else{ + var msg; + if($(data).find("fullcount").text()=="1") + msg = $(data).find("fullcount").text()+" unread message in your inbox."; + else + msg = $(data).find("fullcount").text()+" unread messages in your inbox."; + o.notify(msg,"alert",2); + $(data).find("entry").each(function(i,val){ + if(i==0){ + $("#gmail #forerror").hide(); + var atag = $(""+$(this).find("title").text()+""); + $("#gmail #content #subject").html($(this).find("title").text()); + $("#gmail #content #date").text($(this).find("issued").text()); + $("#gmail #content #msgbody").text($(this).find("summary").text()); + } + }) + } + } + } + $("#gmail #loading").hide(); + $("#gmail #content").show(); + + } + }); +} + diff --git a/public/desktop_widgets/4fa7812ec88514014d7c59bd/date.js b/public/desktop_widgets/4fa7812ec88514014d7c59bd/date.js new file mode 100644 index 00000000..77f49864 --- /dev/null +++ b/public/desktop_widgets/4fa7812ec88514014d7c59bd/date.js @@ -0,0 +1,104 @@ +/** + * Version: 1.0 Alpha-1 + * Build Date: 13-Nov-2007 + * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved. + * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. + * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/ + */ +Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; +Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;idate)?1:(this=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;} +var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);} +if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);} +if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);} +if(x.hour||x.hours){this.addHours(x.hour||x.hours);} +if(x.month||x.months){this.addMonths(x.month||x.months);} +if(x.year||x.years){this.addYears(x.year||x.years);} +if(x.day||x.days){this.addDays(x.day||x.days);} +return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(valuemax){throw new RangeError(value+" is not a valid value for "+name+".");} +return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;} +if(!x.second&&x.second!==0){x.second=-1;} +if(!x.minute&&x.minute!==0){x.minute=-1;} +if(!x.hour&&x.hour!==0){x.hour=-1;} +if(!x.day&&x.day!==0){x.day=-1;} +if(!x.month&&x.month!==0){x.month=-1;} +if(!x.year&&x.year!==0){x.year=-1;} +if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());} +if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());} +if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());} +if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());} +if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());} +if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());} +if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());} +if(x.timezone){this.setTimezone(x.timezone);} +if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);} +return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;} +var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}} +return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();}; +Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;} +return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;} +if(!last&&q[1].length===0){last=true;} +if(!last){var qx=[];for(var j=0;j0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}} +if(rx[1].length1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];} +if(args){for(var i=0,px=args.shift();i2)?n:(n+(((n+2000)Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");} +var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});} +return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;} +for(var i=0;i + +
    Retrieving new emails...
    + +
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js b/public/desktop_widgets/4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js new file mode 100644 index 00000000..c10b1e3b --- /dev/null +++ b/public/desktop_widgets/4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js @@ -0,0 +1,10 @@ +var search = function(){ + $("#search").submit(function(){ + var val=$("#googlesearch").val(); + if(val=="") return false; + val.replace(" ", "+"); + //replace the zh-tw to something + window.open("https://www.google.com.tw/#hl="+o.currentLanguage+"&q="+val); + return false; + }); +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/img/google_64.png b/public/desktop_widgets/4fa78140c88514014d7c59be/img/google_64.png new file mode 100644 index 00000000..af3a2330 Binary files /dev/null and b/public/desktop_widgets/4fa78140c88514014d7c59be/img/google_64.png differ diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb b/public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb new file mode 100644 index 00000000..341b8d81 --- /dev/null +++ b/public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb @@ -0,0 +1,34 @@ + +
    + +
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa78153c88514014d7c59bf/4fa78153c88514014d7c59bf.js b/public/desktop_widgets/4fa78153c88514014d7c59bf/4fa78153c88514014d7c59bf.js new file mode 100644 index 00000000..5fd732f2 --- /dev/null +++ b/public/desktop_widgets/4fa78153c88514014d7c59bf/4fa78153c88514014d7c59bf.js @@ -0,0 +1,21 @@ +var eventsjson = new Array; +var loadEvents = function(){ + $.getJSON(o.widgetfolder+"/4fa78153c88514014d7c59bf/events.json",function(events){ + $.each(events,function(i,event){ + eventsjson.push(event); + }) + + displayevents(); + }) +} +var i = 0; +var displayevents = function(){ + // $("#school_events").fadeOut(1000); + $("#s_date").text(eventsjson[i].date); + $("#s_event").text(eventsjson[i].event); + $("#s_timings").text(eventsjson[i].timing); + // $("#school_events").fadeIn(1000); + if(i==eventsjson.length-1)i=0; + i++ + setTimeout(displayevents,2000); +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78153c88514014d7c59bf/events.json b/public/desktop_widgets/4fa78153c88514014d7c59bf/events.json new file mode 100644 index 00000000..58a32614 --- /dev/null +++ b/public/desktop_widgets/4fa78153c88514014d7c59bf/events.json @@ -0,0 +1,12 @@ +{ + "first":{ + "date":"25 Feb", + "event":"國立政治大學101學年度碩士班暨…", + "timing":"時間:07:00-17:00" + }, + "second":{ + "date":"26 Feb", + "event":"try", + "timing":"時間:07:00-17:00" + } +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78153c88514014d7c59bf/index.html.erb b/public/desktop_widgets/4fa78153c88514014d7c59bf/index.html.erb new file mode 100644 index 00000000..a2665b99 --- /dev/null +++ b/public/desktop_widgets/4fa78153c88514014d7c59bf/index.html.erb @@ -0,0 +1,11 @@ +
    +
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/public/desktop_widgets/4fa78161c88514014d7c59c0/4fa78161c88514014d7c59c0.js b/public/desktop_widgets/4fa78161c88514014d7c59c0/4fa78161c88514014d7c59c0.js new file mode 100644 index 00000000..c4421d8e --- /dev/null +++ b/public/desktop_widgets/4fa78161c88514014d7c59c0/4fa78161c88514014d7c59c0.js @@ -0,0 +1,9 @@ +function timetable(){ + var d = new Date(); + var n = d.getHours(); + $('#tt_timetable .tt_time div').each(function(){ + if($(this).data('tthour') == n ){ + $(this).parents('tr').addClass('timenow'); + } + }); +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78161c88514014d7c59c0/index.html.erb b/public/desktop_widgets/4fa78161c88514014d7c59c0/index.html.erb new file mode 100644 index 00000000..88d83735 --- /dev/null +++ b/public/desktop_widgets/4fa78161c88514014d7c59c0/index.html.erb @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    09:00
    Computer Science
    10:00
    Computer Science
    11:00
    12:00
    Lunch Time
    13:00
    Art History
    14:00
    Art History
    15:00
    16:00
    Sport ( Basketball )
    17:00
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa78170c88514014d7c59c1/4fa78170c88514014d7c59c1.js b/public/desktop_widgets/4fa78170c88514014d7c59c1/4fa78170c88514014d7c59c1.js new file mode 100644 index 00000000..e69de29b diff --git a/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html b/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html new file mode 100644 index 00000000..efaddf3c --- /dev/null +++ b/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html @@ -0,0 +1,32 @@ + +
    + +
    \ No newline at end of file diff --git a/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html.erb b/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html.erb new file mode 100644 index 00000000..efaddf3c --- /dev/null +++ b/public/desktop_widgets/4fa78170c88514014d7c59c1/index.html.erb @@ -0,0 +1,32 @@ + +
    + +
    \ No newline at end of file diff --git a/public/desktop_widgets/4fa7817cc88514014d7c59c2/4fa7817cc88514014d7c59c2.js b/public/desktop_widgets/4fa7817cc88514014d7c59c2/4fa7817cc88514014d7c59c2.js new file mode 100644 index 00000000..42419bf5 --- /dev/null +++ b/public/desktop_widgets/4fa7817cc88514014d7c59c2/4fa7817cc88514014d7c59c2.js @@ -0,0 +1,7 @@ +function g_weather(){ + $('.gw_forecast').click(function(){ + $('.gw_recent').toggle(); + $('.gw_weekly').toggle(); + return false; + }); +} diff --git a/public/desktop_widgets/4fa7817cc88514014d7c59c2/img/sunny.png b/public/desktop_widgets/4fa7817cc88514014d7c59c2/img/sunny.png new file mode 100755 index 00000000..a12bb8a6 Binary files /dev/null and b/public/desktop_widgets/4fa7817cc88514014d7c59c2/img/sunny.png differ diff --git a/public/desktop_widgets/4fa7817cc88514014d7c59c2/index.html.erb b/public/desktop_widgets/4fa7817cc88514014d7c59c2/index.html.erb new file mode 100644 index 00000000..9862a505 --- /dev/null +++ b/public/desktop_widgets/4fa7817cc88514014d7c59c2/index.html.erb @@ -0,0 +1,45 @@ + +
    +
    + sunny +
    + 29°C +
    +
    Sunny
    +
    +
    + weekly report +
    +
    Hsin-Chu
    + > Weekly Report +
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa7818cc88514014d7c59c3/4fa7818cc88514014d7c59c3.js b/public/desktop_widgets/4fa7818cc88514014d7c59c3/4fa7818cc88514014d7c59c3.js new file mode 100644 index 00000000..e69de29b diff --git a/public/desktop_widgets/4fa7818cc88514014d7c59c3/index.html.erb b/public/desktop_widgets/4fa7818cc88514014d7c59c3/index.html.erb new file mode 100644 index 00000000..168c05c9 --- /dev/null +++ b/public/desktop_widgets/4fa7818cc88514014d7c59c3/index.html.erb @@ -0,0 +1,5 @@ +
    \ No newline at end of file diff --git a/public/desktop_widgets/4fa78197c88514014d7c59c4/4fa78197c88514014d7c59c4.js b/public/desktop_widgets/4fa78197c88514014d7c59c4/4fa78197c88514014d7c59c4.js new file mode 100644 index 00000000..e69de29b diff --git a/public/desktop_widgets/4fa78197c88514014d7c59c4/index.html.erb b/public/desktop_widgets/4fa78197c88514014d7c59c4/index.html.erb new file mode 100644 index 00000000..26a3bbe4 --- /dev/null +++ b/public/desktop_widgets/4fa78197c88514014d7c59c4/index.html.erb @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/desktop_widgets/4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js b/public/desktop_widgets/4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js new file mode 100644 index 00000000..726eee23 --- /dev/null +++ b/public/desktop_widgets/4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js @@ -0,0 +1,11 @@ +var openURL = function(){ + $("div[data-content=4fba4bf36f4fea8095e389eb] form#browse_url_4fba4bf36f4fea8095e389eb").submit(function(){ + var urlToOpen = $(this).find("input").val(); + o.appWindow({ + title: "Browser", + appid: "extURL", + url: urlToOpen + }); + return false; + }) +} \ No newline at end of file diff --git a/public/desktop_widgets/4fba4bf36f4fea8095e389eb/index.html.erb b/public/desktop_widgets/4fba4bf36f4fea8095e389eb/index.html.erb new file mode 100644 index 00000000..cc1c1c70 --- /dev/null +++ b/public/desktop_widgets/4fba4bf36f4fea8095e389eb/index.html.erb @@ -0,0 +1,9 @@ +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/public/javascripts/event_calendar.js b/public/javascripts/event_calendar.js new file mode 100644 index 00000000..e3b2885b --- /dev/null +++ b/public/javascripts/event_calendar.js @@ -0,0 +1,37 @@ +/* + * Smart event highlighting + * Handles when events span rows, or don't have a background color + */ +jQuery(document).ready(function($) { + var highlight_color = "#2EAC6A"; + + // highlight events that have a background color + $(".ec-event-bg").live("mouseover", function() { + event_id = $(this).attr("data-event-id"); + event_class_name = $(this).attr("data-event-class"); + $(".ec-"+event_class_name+"-"+event_id).css("background-color", highlight_color); + }); + $(".ec-event-bg").live("mouseout", function() { + event_id = $(this).attr("data-event-id"); + event_class_name = $(this).attr("data-event-class"); + event_color = $(this).attr("data-color"); + $(".ec-"+event_class_name+"-"+event_id).css("background-color", event_color); + }); + + // highlight events that don't have a background color + $(".ec-event-no-bg").live("mouseover", function() { + ele = $(this); + ele.css("color", "white"); + ele.find("a").css("color", "white"); + ele.find(".ec-bullet").css("background-color", "white"); + ele.css("background-color", highlight_color); + }); + $(".ec-event-no-bg").live("mouseout", function() { + ele = $(this); + event_color = $(this).attr("data-color"); + ele.css("color", event_color); + ele.find("a").css("color", event_color); + ele.find(".ec-bullet").css("background-color", event_color); + ele.css("background-color", "transparent"); + }); +}); \ No newline at end of file diff --git a/public/stylesheets/event_calendar.css b/public/stylesheets/event_calendar.css new file mode 100644 index 00000000..e8216534 --- /dev/null +++ b/public/stylesheets/event_calendar.css @@ -0,0 +1,237 @@ +/* + Event Calendar stylesheet + + Colors: + #d5d5d5 - border (gray) + #303030 - day names bg (gray) + #444 - number (gray) + #ecede2 - day header bg (light tan) + ##d7d7ba - today header bg (tan) + #ffffdd - today bg light (yellow) + #777 - other month number (gray) + #efefef - other month day header (gray) + #2eac6a - hover (green) +*/ + +/* Outer most container */ +.ec-calendar { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 11px; + line-height: 14px; + margin: 0; + padding: 0; + border-bottom: 1px solid #d5d5d5; +} + +/* Month name header & links */ +.ec-calendar-header { + padding: 5px 0; + width: 100%; + table-layout: fixed; +} + +.ec-month-name { + font-size: 16px; + font-weight: bold; +} + +.ec-month-nav { + +} + +/* Containers */ +.ec-body { + position: relative; + border-right: 1px solid #303030; + white-space: nowrap; +} + +/* Day names */ +.ec-day-names { + position: absolute; + top: 0; + left: 0; + width: 100%; + table-layout: fixed; + padding: 2px 0; + background: #303030; + color: white; +} + +.ec-day-name { + font-weight: normal; +} + +/* Rows container and Row */ +.ec-rows { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + background: white; + overflow: hidden; + border-right: 1px solid #d5d5d5; +} + +.ec-row { + position: absolute; + left: 0; + width: 100%; + overflow: hidden; +} + +/* Background */ +.ec-row-bg { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + table-layout: fixed; +} + +.ec-day-bg { + border-left: 1px solid #d5d5d5; +} + +.ec-today-bg { + background-color: #ffffdd; +} + +.ec-row-table { + position: relative; + width: 100%; + table-layout: fixed; +} + +/* Day header */ +.ec-day-header { + color: #444; + text-align: right; + padding: 0 5px; + line-height: 16px; + border-top: 1px solid #d5d5d5; + border-left: 1px solid #d5d5d5; + border-bottom: 1px dotted #bbbbbb; + background-color: #ecede2; + overflow: hidden; +} + +a.ec-day-link { + color: #444; +} + +.ec-today-header { + background-color: #d7d7ba; +} + +.ec-weekend-day-header { + +} + +.ec-other-month-header { + background-color: #efefef; + color: #777; +} + +.ec-other-month-bg { + +} + + +/* Event cell and container */ +.ec-event-cell { + cursor: pointer; + vertical-align: top; + padding-right: 1px; + padding-left: 2px; +} + +.ec-event-cell a { + text-decoration: none; + display: block; + width: 100%; + height: 100%; +} + +.ec-no-event-cell { + cursor: default; +} + +.ec-event { + color: white; + padding-right: 1px; + padding-left: 11px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + -moz-border-radius: 3px; + overflow: hidden; + white-space: nowrap; +} + +.ec-event :hover { + /* doesn't look as good as js highlighting */ + /* background-color: #2eac6a; */ +} + +.ec-event-bg a { + color: white; +} + +/* used to distinguish non-all_day events */ +.ec-event-no-bg { + position: relative; + /* padding-left: 5px; */ +} + +.ec-event-no-bg a { + /* isn't implemented in all browsers */ + color: inherit; +} + +.ec-event-time { + font-size: 85%; + font-weight: bold; + padding-right: 3px; +} + + +/* Left and right arrows */ +/* Doesn't work in IE6, use bg images instead */ +.ec-left-arrow, .ec-right-arrow { + position: relative; + top: 3px; + width: 0; + height: 0; + font-size: 0; + line-height: 0; + margin-bottom: -8px; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; +} + +.ec-left-arrow { + margin-left: -7px; + margin-right: auto; + border-right: 4px solid white; +} + +.ec-right-arrow { + margin-left: auto; + margin-right: 3px; + border-left: 4px solid white; +} + +/* remove this to not have a bullet */ +/* don't look as good in ie */ +.ec-bullet { + position: absolute; + top: 7px; + width: 4px; + height: 4px; + margin-left: -7px; + margin-right: auto; + -webkit-border-radius: 2px; + -khtml-border-radius: 2px; + -moz-border-radius: 2px; +} \ No newline at end of file diff --git a/public/test.json b/public/test.json new file mode 100644 index 00000000..aebcb6a5 --- /dev/null +++ b/public/test.json @@ -0,0 +1,12 @@ +{ + "timeline":{ + "heading" : "Title1", + "date" : "10012012", + "text" : "Think it's just another laptop? Think again. Designed to outperform standard laptops, the W520 PC is actually a mobile workstation — lightning-fast, heroically powerful and surprisingly portable. The work starts with the processor — from 2nd generation Intel® Core™ i5, up to Core™ i7 Quad Core™ Extreme, to keep your heavy-duty applications running flawlessly and boost your multi-tasking by 20 percent. Supplement that with the NVIDIA® Quadro® 1000M or 2000M graphics card with 2GB VRAM, professional-class graphics cards designed for up to 5x faster 3D performance and 8x faster computational simulation. Choose up to 16GB DDR3 RAM and you have one serious workstation — tested and certified by leading ISVs for more than 120 applications, including some of the most stringent in the industry." + }, + { + "heading" : "Title2", + "date" : "15012012", + "text" : "Performance like this should include the most advanced features — and it does. Powerful graphics require a display that lives up to what they have to show; feast your eyes on our 95-percent color gamut LED display in HD, HD+ or FHD. For the most accurate color workflow, opt for the industry's first embedded X-Rite Color Calibrator. Transfer files 10x faster with USB 3.0, depend on the 34mm ExpressCard and MMC slot or optional Smart Card reader, avail yourself of the multiburner combo drive and enjoy our best-in-class, ergonomic keyboard and Ultranav™ with our TrackPoint and touchpad. And when you're ready to talk about all the work you've done, you'll get superior Web conferencing and VoIP, thanks to full-duplex voice transmission support, dual digital microphone modes with advanced noise-cancellation technology, optimized speakers and a light-adaptive, 720p, HD webcam." + } +} \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/announcement.json b/vendor/built_in_modules/announcement/announcement.json index 536318d8..191fbd7d 100644 --- a/vendor/built_in_modules/announcement/announcement.json +++ b/vendor/built_in_modules/announcement/announcement.json @@ -1,13 +1,17 @@ { - "title": "announcement", + "title": "announcement", "version": "0.1", "organization": "Rulingcom", "author": "RD dep", "intro": "A simple blog……", "update_info": "Some info", "create_date": "11-11-2011", - "app_pages": ["bulletins"], - "widgets": ["bulletins", "bulletins_and_web_links"], - "category": ["BulletinCategory"], - "enable_frontend": true + "app_pages": ["bulletins"], + "widgets": { + "index":["1","2","3","4","5"], + "bulletins_and_web_links":[] + }, + "category": ["BulletinCategory"], + "widget_fields":["title","category","postdate"], + "enable_frontend": true } diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 46b74c0a..b6c0703d 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -2,16 +2,17 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController include AdminHelper include OrbitControllerLib::DivisionForDisable - layout 'new_admin' - - before_filter :authenticate_user! + before_filter :clean_values, :only => [:create, :update] + +# before_filter :for_admin_only,:only => [:] +# before_filter :for_app_manager,:only => [:index,:show,] + before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins] + before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins] + before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins] + before_filter :only => [ :new,:create,:edit,:update,:create] do |controller| controller.get_categorys('BulletinCategory') end - before_filter :clean_values, :only => [:create, :update] -# before_filter :for_admin_only,:only => [:] -# before_filter :for_app_manager,:only => [:index,:show,] - before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins] def preview #@preview_obj = Preview.create(:object=>params[:news_bulletin],:expired_at=>DateTime.now+30.minutes,:preview_at_link=>"panel_news_front_end_news_bulletin_path",:object_class_type=>"NewsBulletin") diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb index ea5ea930..8fa7af68 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb @@ -14,6 +14,15 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController end def index + @item = Page.find(params[:page_id]) + + if @item.frontend_data_count + @page_num = @item.frontend_data_count + else + @page_num = 15 + end + @frontend_style = @item.frontend_style + @page = Page.find(params[:page_id]) rescue nil if !params[:search_query].blank? # search_cond = {:is_checked=>true,:is_hidden=>false,:is_pending => false} @@ -25,23 +34,23 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController end search_result = @search.results.collect{|result| result.id} - @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).desc(:postdate).page( params[:page_main]).per(15) + @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).page( params[:page_main]).per(@page_num) else date_now = Time.now if !params[:category_id].blank? && !params[:tag_id].blank? @tag = AnnouncementTag.find(params[:tag_id]) rescue nil @tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag - @bulletins = @tag.bulletins.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15) + @bulletins = @tag.bulletins.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num) @current_category = BulletinCategory.from_id(params[:category_id]) rescue nil elsif !params[:category_id].blank? - @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15) + @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num) @current_category = BulletinCategory.from_id(params[:category_id]) rescue nil elsif !params[:tag_id].blank? @tag = AnnouncementTag.find(params[:tag_id]) rescue nil @tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag - @bulletins = @tag.bulletins.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).page( params[:page_main]).per(15) + @bulletins = @tag.bulletins.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).page( params[:page_main]).per(@page_num) else - @bulletins = Bulletin.all.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).page( params[:page_main]).per(15) + @bulletins = Bulletin.all.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).page( params[:page_main]).per(@page_num) end impressionist(@tag) if @tag end diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb index b19eb46d..0c5c3d91 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb @@ -8,17 +8,62 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController # GET /bulletins.xml def index + + @part = PagePart.find(params[:part_id]) + + if @part.widget_data_count + @page_num = @part.widget_data_count + else + @page_num = 4 + end + + if @part.widget_field + @widget_fields = @part.widget_field + else + @widget_fields = [] + end + + @title = params[:part_title] + + @widget_style = @part.widget_style + + @category_id = @part.category + + date_now = Time.now + if !@category_id.blank? + @bulletins = Bulletin.can_display.where(:bulletin_category_id => @category_id).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) + @current_category = BulletinCategory.from_id(@category_id) rescue nil + elsif !params[:tag_id].blank? + @tag = AnnouncementTag.find(params[:tag_id]) rescue nil + @tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag + @bulletins = @tag.bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) + else + @bulletins = Bulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) + end + + get_categorys + + end + + def bulletins_list_and_pic + + if params[:widget_data_count] + @page_num = params[:widget_data_count]; + else + @page_num = 4; + end + @title = params[:part_title] date_now = Time.now if !params[:category_id].blank? - @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10) + @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(@page_num ) @current_category = BulletinCategory.from_id(params[:category_id]) rescue nil elsif !params[:tag_id].blank? @tag = AnnouncementTag.find(params[:tag_id]) rescue nil @tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag - @bulletins = @tag.bulletins.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).page( params[:page]).per(10) + @bulletins = @tag.bulletins.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).page( params[:page]).per(@page_num ) else - @bulletins = Bulletin.all.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).page( params[:page]).per(10) + @bulletins = Bulletin.all.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).page( params[:page]).per(@page_num ) end get_categorys diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index d9711887..111aaa76 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -1,6 +1,6 @@ - <% if (bulletin.create_user_id == current_user.id) || is_manager? %> + <% if (bulletin.create_user_id == current_or_guest_user.id) || is_manager? %> <%= check_box_tag 'to_delete[]', bulletin.id, false, :class => "checkbox_in_list" %> <% end -%> @@ -33,9 +33,8 @@ <%= show_bulletin_title_at_index bulletin%>
    diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb index e9c9c481..9ea5b97b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb @@ -1,3 +1,3 @@
    - <%= link_to content_tag(:i, nil, :class => 'icons-brush-large') + t(:clear), panel_announcement_back_end_bulletins_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn js_history" %> + <%= link_to content_tag(:i, nil, :class => 'icons-brush-large') + t(:clear), panel_announcement_back_end_bulletins_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-small js_history" %>
    \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb index 7fc9cb80..3ae63a60 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb @@ -14,20 +14,6 @@ - - -
    -
    - <%= render 'filter_status' %> -
    -
    - <%= render 'filter_categories' %> -
    -
    - <%= render 'filter_tags' %> -
    -
    - <%= render 'sort_headers' %>
    diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_categories.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_categories.html.erb index b0727501..4884aada 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_categories.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_categories.html.erb @@ -1,6 +1,6 @@
    <% @bulletin_categories.each do |category| -%> - <%= link_to category.title, panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('categories', category.id)}" %> + <%= link_to category.title, panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('categories', category.id)}" %> <% end -%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'categories'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_status.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_status.html.erb index 6adba141..ba9a620b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_status.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_status.html.erb @@ -1,9 +1,9 @@
    - <%= link_to t(:top), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_top')}" %> - <%= link_to t(:hot), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %> - <%= link_to t(:hidden), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hidden')}" %> - <%= link_to t(:pending), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" %> - <%= link_to t(:passed), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" %> - <%= link_to t(:rejected), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" %> + <%= link_to t(:top), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_top')}" %> + <%= link_to t(:hot), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hot')}" %> + <%= link_to t(:hidden), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hidden')}" unless(is_guest?)%> + <%= link_to t(:pending), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_pending')}" if(is_manager?)%> + <%= link_to t(:passed), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_checked')}" if(is_manager?)%> + <%= link_to t(:rejected), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_rejected')}" if(is_manager?)%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'status'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_tags.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_tags.html.erb index b3771a1a..c40bf371 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_tags.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter_tags.html.erb @@ -1,6 +1,6 @@
    <% @tags.each do |tag| -%> - <%= link_to tag[I18n.locale], panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('tags', tag.id)}" %> + <%= link_to tag[I18n.locale], panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %> <% end -%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'tags'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 5034fa02..1c2b57eb 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -125,7 +125,7 @@ <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@bulletin.title_translations[locale] rescue nil) %> <% end %> - +
    @@ -214,17 +214,56 @@

    <%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %>

    <%= t("sys.preview_only_for_img") %>

    +
    + +
    +
    Drop files here + or + +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    File NameChineseEnglish
    File Name
    +
    - <% @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> + <%# @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> <%#= fields_for "bulletin[bulletin_files][]", bulletin_file do |f| %> - <%= f.fields_for :bulletin_files, bulletin_file do |f| %> - <%= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> - <% end %> - <% end %> + <%#= f.fields_for :bulletin_files do |f| %> + <%#= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> + <%# end %> + <%# end %> @@ -250,6 +289,7 @@ <% content_for :page_specific_javascript do %> + <%= javascript_include_tag "bulletin_form" %> <%= javascript_include_tag "inc/jquery.imagesloaded.js" %> + +
    <%= render 'index' %>
    \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb new file mode 100644 index 00000000..9a2c0d43 --- /dev/null +++ b/vendor/built_in_modules/announcement/init.rb @@ -0,0 +1,25 @@ +module Announcement + OrbitApp.registration "Announcement",:type=> 'ModuleApp' do + + base_url File.expand_path File.dirname(__FILE__) + personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile" + + + end + +end + + +# OrbitApp.backend_side_bar 'News' do + +# block :available_for => [:admin,:guest,:manager,:sub_manager], +# :active_for_controllers=> ['news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals'], +# :active_for_ob_auths_object => ['NewsBulletinCategory'], +# :head_link => panel_news_back_end_news_bulletins_path , +# :head_label=> I18n.t('admin.news') + +# context_link :link=>new_panel_news_back_end_news_bulletin_path , +# :priority=>1,:label=>I18n.t('announcement.add_new'), +# :active_for_action=>{:news_bulletins=>:new} + +# end \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/lib/announcement.rb b/vendor/built_in_modules/announcement/lib/announcement.rb deleted file mode 100644 index 1feec47d..00000000 --- a/vendor/built_in_modules/announcement/lib/announcement.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "announcement/engine" - -module Announcement -end diff --git a/vendor/built_in_modules/archive/.gitignore b/vendor/built_in_modules/archive/.gitignore new file mode 100644 index 00000000..1463de6d --- /dev/null +++ b/vendor/built_in_modules/archive/.gitignore @@ -0,0 +1,6 @@ +.bundle/ +log/*.log +pkg/ +test/dummy/db/*.sqlite3 +test/dummy/log/*.log +test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/archive/Gemfile b/vendor/built_in_modules/archive/Gemfile new file mode 100644 index 00000000..f92bd902 --- /dev/null +++ b/vendor/built_in_modules/archive/Gemfile @@ -0,0 +1,17 @@ +source "http://rubygems.org" + +# Declare your gem's dependencies in archive.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. +gemspec + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/archive/MIT-LICENSE b/vendor/built_in_modules/archive/MIT-LICENSE new file mode 100644 index 00000000..406f17b7 --- /dev/null +++ b/vendor/built_in_modules/archive/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2012 YOURNAME + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/archive/README.rdoc b/vendor/built_in_modules/archive/README.rdoc new file mode 100644 index 00000000..2a19864e --- /dev/null +++ b/vendor/built_in_modules/archive/README.rdoc @@ -0,0 +1,3 @@ += Archive + +This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/archive/Rakefile b/vendor/built_in_modules/archive/Rakefile new file mode 100644 index 00000000..b57290d4 --- /dev/null +++ b/vendor/built_in_modules/archive/Rakefile @@ -0,0 +1,39 @@ +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Archive' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + +APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) +load 'rails/tasks/engine.rake' + + +Bundler::GemHelper.install_tasks + +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false +end + + +task :default => :test diff --git a/vendor/built_in_modules/archive/app/assets/images/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/images/archive/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/assets/javascripts/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/javascripts/archive/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/assets/stylesheets/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/stylesheets/archive/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/controllers/.gitkeep b/vendor/built_in_modules/archive/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/controllers/application_controller.rb b/vendor/built_in_modules/archive/app/controllers/application_controller.rb new file mode 100644 index 00000000..307a4acd --- /dev/null +++ b/vendor/built_in_modules/archive/app/controllers/application_controller.rb @@ -0,0 +1,23 @@ +class ApplicationController < ActionController::Base + protect_from_forgery + before_filter :set_locale + + # Set I18n.locale + def set_locale + # update session if passed + session[:locale] = params[:locale] if params[:locale] + + # set locale based on session or default + begin + # check if locale is valid for non site pages + if !VALID_LOCALES.include?(session[:locale]) + I18n.locale = I18n.default_locale + else + I18n.locale = session[:locale] + end + rescue + I18n.locale = I18n.default_locale + end + end + +end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb new file mode 100644 index 00000000..f9aba371 --- /dev/null +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb @@ -0,0 +1,97 @@ +class Panel::Archive::BackEnd::ArchiveFileCategorysController < OrbitBackendController + + def index + @archive_file_categorys = ArchiveFileCategory.all + @archive_file_category = ArchiveFileCategory.new(:display => 'List') + + @url = panel_archive_back_end_archive_file_categorys_path + + respond_to do |format| + format.html # index.html.erb + format.js + end + end + + # GET /archive_files/1 + # GET /archive_files/1.xml + def show + @archive_file_category = ArchiveFileCategory.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.js + end + end + + # GET /archive_files/new + # GET /archive_files/new.xml + def new + @archive_file_category = ArchiveFileCategory.new(:display => 'List') + + respond_to do |format| + format.html # new.html.erb + format.js + end + end + + # GET /archive_files/1/edit + def edit + @archive_file_category = ArchiveFileCategory.find(params[:id]) + @i18n_variable = @archive_file_category.i18n_variable + + @url = panel_archive_back_end_archive_file_category_path(@archive_file_category) + + respond_to do |format| + format.html + format.js + end + end + + # POST /archive_files + # POST /archive_files.xml + def create + @archive_file_category = ArchiveFileCategory.new(params[:archive_file_category]) + + respond_to do |format| + if @archive_file_category.save + format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url, :notice => t('archive_file_category.create_archive_file_category_success')) } + format.js + else + format.html { render :action => "new" } + format.js { render action: "new" } + end + end + end + + # PUT /archive_files/1 + # PUT /archive_files/1.xml + def update + @archive_file_category = ArchiveFileCategory.find(params[:id]) + + @url = panel_archive_back_end_archive_file_category_path(@archive_file_category) + + respond_to do |format| + if @archive_file_category.update_attributes(params[:archive_file_category]) + format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url, :notice => t('archive_file_category.update_archive_file_category_success')) } + # format.xml { head :ok } + format.js + else + format.html { render :action => "edit" } + format.js { render :action => "edit" } + end + end + end + + # DELETE /archive_files/1 + # DELETE /archive_files/1.xml + def destroy + @archive_file_category = ArchiveFileCategory.find(params[:id]) + @archive_file_category.destroy + + respond_to do |format| + format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url) } + # format.xml { head :ok } + format.js + end + end +end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb new file mode 100644 index 00000000..a4804bb5 --- /dev/null +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb @@ -0,0 +1,117 @@ +class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController + + before_filter :authenticate_user! + before_filter :is_admin? + + def index + + get_categorys(params[:archive_file_category_id]) + + @archive_files = ArchiveFile.all.page(params[:page]).per(10) + + get_tags + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @archive_files } + end + end + + # GET /archive_files/1 + # GET /archive_files/1.xml + def show + @archive_file = ArchiveFile.find(params[:id]) + # get_categorys + + respond_to do |format| + format.html # show.html.erb + format.xml { render :xml => @archive_file } + end + end + + # GET /archive_files/new + # GET /archive_files/new.xml + def new + @archive_file = ArchiveFile.new + + get_categorys + + get_tags + + respond_to do |format| + format.html # new.html.erb + format.xml { render :xml => @archive_file } + end + end + + # GET /archive_files/1/edit + def edit + @archive_file = ArchiveFile.find(params[:id]) + get_categorys + get_tags + end + + # POST /archive_files + # POST /archive_files.xml + def create + @archive_file = ArchiveFile.new(params[:archive_file]) + + @archive_file.create_user_id = current_user.id + @archive_file.update_user_id = current_user.id + + respond_to do |format| + if @archive_file.save + format.html { redirect_to(panel_archive_back_end_archive_files_url) } + format.xml { render :xml => @archive_file, :status => :created, :location => @archive_file } + else + format.html { render :action => "new" } + format.xml { render :xml => @archive_file.errors, :status => :unprocessable_entity } + end + end + end + + # PUT /archive_files/1 + # PUT /archive_files/1.xml + def update + @archive_file = ArchiveFile.find(params[:id]) + + @archive_file.update_user_id = current_user.id + + params[:archive_file][:tag_ids] ||=[] + + respond_to do |format| + if @archive_file.update_attributes(params[:archive_file]) + format.html { redirect_to(panel_archive_back_end_archive_files_url) } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @archive_file.errors, :status => :unprocessable_entity } + end + end + end + + # DELETE /archive_files/1 + # DELETE /archive_files/1.xml + def destroy + @archive_file = ArchiveFile.find(params[:id]) + @archive_file.destroy + + respond_to do |format| + format.html { redirect_to(panel_archive_back_end_archive_files_url) } + # format.xml { head :ok } + format.js + end + end + + protected + + def get_categorys(id = nil) + @archive_file_categorys = (id ? ArchiveFileCategory.find(id).to_a : ArchiveFileCategory.excludes('disabled' => true)) + end + + def get_tags + module_app = ModuleApp.first(:conditions => {:key => 'archive'}) + @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) + end + +end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/tags_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/tags_controller.rb new file mode 100644 index 00000000..8dc1d4f3 --- /dev/null +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/tags_controller.rb @@ -0,0 +1,8 @@ +class Panel::Archive::BackEnd::TagsController < Admin::TagsController + + def initialize + super + @app_title = 'archive' + end + +end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb new file mode 100644 index 00000000..594b7348 --- /dev/null +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb @@ -0,0 +1,92 @@ +class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController + + def initialize + super + @app_title = 'archive_files' + end + + def index + + @item = Page.find(params[:page_id]) + + @title = @item.i18n_variable[I18n.locale] + + if @item.frontend_data_count + @page_num = @item.frontend_data_count + else + @page_num = 0 + end + + date_now = Time.now + + @archive_file_categorys = ArchiveFileCategory.all + + # @archive_files = ArchiveFile.where( :is_hidden => false ).desc(:is_top).page(params[:page]).per(@page_num) + + if !params[:category_id].blank? + @archive_files = ArchiveFile.can_display.where(:archive_file_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) + @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil + elsif !params[:tag_id].blank? + @tag = ArchiveTag.find(params[:tag_id]) rescue nil + @tag = ArchiveTag.where(key: params[:tag_id])[0] unless @tag + @archive_files = @tag.archive_files.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) + else + @archive_files = ArchiveFile.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) + end + + get_categorys + end + + def show + + @item = Page.find(params[:page_id]) + + @title = @item.i18n_variable[I18n.locale] + + @archive_file = ArchiveFile.find(params[:id]) + + get_categorys + + end + + protected + + def reload_archive_files + + @item = Page.find(params[:page_id]) + + @title = @item.i18n_variable[I18n.locale] + + if @item.frontend_data_count + @page_num = @item.frontend_data_count + else + @page_num = 0 + end + + date_now = Time.now + + @archive_file_categorys = ArchiveFileCategory.all + + # @archive_files = ArchiveFile.where( :is_hidden => false ).desc(:is_top).page(params[:page]).per(@page_num) + + + if !params[:category_id].blank? + @archive_files = ArchiveFile.can_display.where(:archive_file_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) + @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil + elsif !params[:tag_id].blank? + @tag = ArchiveTag.find(params[:tag_id]) rescue nil + @tag = ArchiveTag.where(key: params[:tag_id])[0] unless @tag + @archive_files = @tag.archive_files.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) + else + @archive_files = ArchiveFile.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) + end + + get_categorys + + end + + def get_categorys + @archive_file_categorys = ArchiveFileCategory.excludes('disabled' => true) + end + +end diff --git a/vendor/built_in_modules/archive/app/helpers/.gitkeep b/vendor/built_in_modules/archive/app/helpers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/mailers/.gitkeep b/vendor/built_in_modules/archive/app/mailers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/models/.gitkeep b/vendor/built_in_modules/archive/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/models/archive_file.rb b/vendor/built_in_modules/archive/app/models/archive_file.rb new file mode 100644 index 00000000..9cf2eedd --- /dev/null +++ b/vendor/built_in_modules/archive/app/models/archive_file.rb @@ -0,0 +1,66 @@ +# encoding: utf-8 + +class ArchiveFile + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::MultiParameterAttributes + + PAYMENT_TYPES = @site_valid_locales + + field :title, localize: true + + has_and_belongs_to_many :tags, :class_name => "ArchiveTag" + + field :create_user_id + field :update_user_id + + field :is_top, :type => Boolean, :default => false + field :is_hot, :type => Boolean, :default => false + field :is_hidden, :type => Boolean, :default => false + + scope :can_display,where(is_hidden: false) + + belongs_to :archive_file_category + + has_many :archive_file_multiples, :autosave => true, :dependent => :destroy + + accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true + + validates_presence_of :title + + after_save :save_archive_file_multiples + + def self.search( category_id = nil ) + + if category_id.to_s.size > 0 + + find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title ) + + else + + find(:all).desc( :is_top, :title) + + end + + end + + + def self.widget_datas + + where( :is_hidden => false ).desc(:is_top, :title) + + end + + def is_top? + self.is_top + end + + def save_archive_file_multiples + self.archive_file_multiples.each do |t| + if t.should_destroy + t.destroy + end + end + end + +end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/models/archive_file_category.rb b/vendor/built_in_modules/archive/app/models/archive_file_category.rb new file mode 100644 index 00000000..abb08bd3 --- /dev/null +++ b/vendor/built_in_modules/archive/app/models/archive_file_category.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 + +class ArchiveFileCategory + include Mongoid::Document + include Mongoid::Timestamps + # include Mongoid::MultiParameterAttributes + + field :key + + has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy + + has_many :archive_files + +end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb b/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb new file mode 100644 index 00000000..0ac3070b --- /dev/null +++ b/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb @@ -0,0 +1,26 @@ +class ArchiveFileMultiple + + include Mongoid::Document + include Mongoid::Timestamps + + mount_uploader :file, AssetUploader + + field :file_title, localize: true + # field :description + field :choose_lang, :type => Array, :default => nil + + # has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy + + field :should_destroy, :type => Boolean + + def choose_lang_display(lang) + self.choose_lang.include?(lang) + end + + belongs_to :archive_file + + # has_many :archive_file_multiple_langs, :autosave => true, :dependent => :destroy + + # accepts_nested_attributes_for :archive_file_multiple_langs, :allow_destroy => true + +end diff --git a/vendor/built_in_modules/archive/app/models/archive_tag.rb b/vendor/built_in_modules/archive/app/models/archive_tag.rb new file mode 100644 index 00000000..48aedc30 --- /dev/null +++ b/vendor/built_in_modules/archive/app/models/archive_tag.rb @@ -0,0 +1,10 @@ +class ArchiveTag < Tag + + has_and_belongs_to_many :archive_files + + + def get_visible_links(sort = :name) + self.archive_files.where(:is_hidden => false).desc(:is_top, sort) + end + +end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/.gitkeep b/vendor/built_in_modules/archive/app/views/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb new file mode 100644 index 00000000..c6bf4616 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb @@ -0,0 +1,16 @@ + + + + + <%= archive_file_category.key %> +
    + +
    + + <% @site_valid_locales.each do |locale| %> + <%= archive_file_category.i18n_variable[locale] rescue nil %> + <% end %> + \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb new file mode 100644 index 00000000..f79bbab0 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb @@ -0,0 +1,30 @@ +<% # encoding: utf-8 %> + +<%= form_for(@archive_file_category, :remote => true, :url => @url) do |f| %> + +

    <%= (@archive_file_category.new_record? ? 'Add' : 'Edit') %>

    + +
    + <%= f.label :key %> + <%= f.text_field :key %> +
    + +
    + <%= f.fields_for :i18n_variable, (@archive_file_category.new_record? ? @archive_file_category.build_i18n_variable : @archive_file_category.i18n_variable) do |f| %> + <% @site_valid_locales.each do |locale| %> +
    + <%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> +
    + <%= f.text_field locale, :class => 'input-xxlarge' %> +
    +
    + <% end %> + <% end %> +
    + +
    + <%= f.submit 'Submit/送出', :class=>'btn btn-primary' %> +
    + +<% end %> + \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb new file mode 100644 index 00000000..250d889b --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb @@ -0,0 +1,2 @@ +$('<%= j render :partial => 'archive_file_category', :collection => [@archive_file_category] %>').appendTo('#archive_file_categorys').hide().fadeIn(); +$("#new_archive_file_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb new file mode 100644 index 00000000..a8b303ed --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb @@ -0,0 +1 @@ +$("#<%= dom_id @archive_file_category %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb new file mode 100644 index 00000000..eaff01fa --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb @@ -0,0 +1 @@ +$("#form > form").replaceWith("<%= j render "form" %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb new file mode 100644 index 00000000..0d2c0339 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb @@ -0,0 +1,23 @@ + + +<%= flash_messages %> + + + + + + <% @site_valid_locales.each do |locale| %> + + <% end %> + + + + + <%= render :partial => 'archive_file_category', :collection => @archive_file_categorys %> + + +
    <%= t('archive_file_category.key') %><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %>
    + +
    <%= render :partial => "form" %>
    + + diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb new file mode 100644 index 00000000..40061b9f --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb @@ -0,0 +1 @@ +$("#form > form").replaceWith("<%= j render "form" %>"); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb new file mode 100644 index 00000000..9a6f431e --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb @@ -0,0 +1,4 @@ +$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'link_category', :collection => [@archive_file_category] %>"); +<% @archive_file_category = WebLinkCategory.new(:display => 'List') # reset for new form %> +$(".edit_archive_file_category").replaceWith("<%= j render "form" %>") +$(".new_archive_file_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb new file mode 100644 index 00000000..9f9ca8f9 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_files.html.erb @@ -0,0 +1,30 @@ + + + + <% if post.is_top? %> + <%= t(:top) %> + <% end %> + <% if post.is_hot? %> + <%= t(:hot) %> + <% end %> + <% if post.is_hidden? %> + <%= t(:hidden) %> + <% end %> +
    + +
    + + <%= post.archive_file_category.i18n_variable[I18n.locale] %> + + <%= link_to post.title, panel_archive_front_end_archive_file_path(post) %> + + + <% post.tags.each do |tag| %> + <%= tag[I18n.locale] %> + <% end %> + + + diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb new file mode 100644 index 00000000..09357f82 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb @@ -0,0 +1,149 @@ +<% # encoding: utf-8 %> + + <%= f.error_messages %> + + + +
    + +
    +
    + +
    +

    Status

    +
    +
    + <%= f.check_box :is_top %><%= t('top') %> + <%= f.check_box :is_hot %><%= t('hot') %> + <%= f.check_box :is_hidden %><%= t('hide') %> +
    +
    +
    + +
    +
    + +
    +

    Tags

    +
    + <% @tags.each do |tag| %> + <%= check_box_tag 'archive_file[tag_ids][]', tag.id, @archive_file.tag_ids.include?(tag.id)%> + <%= tag[I18n.locale] %> + <% end %> +
    +
    + +
    + + + + + +
    +
    + + <%= f.label :category %> + <%= f.select :archive_file_category_id, @archive_file_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %> + + + +
    + + <% @site_valid_locales.each_with_index do |locale, i| %> + +
    "> +
    + <%= f.label :title %> + <%= f.fields_for :title_translations do |f| %> + <%= I18nVariable.from_locale(locale) %> + <%= f.text_field locale, :class=>'post-title', :value => (@archive_file.title_translations[locale] rescue nil) %> + <% end %> +
    + +
    + + <% end %> + +
    + + +
    + +
    + + + + + + + + + + + + + + + + + + + <% @archive_file.archive_file_multiples.each_with_index do |archive_file_multiple, i| %> + <%= f.fields_for :archive_file_multiples, archive_file_multiple do |f| %> + <%= render :partial => 'form_file', :object => archive_file_multiple, :locals => {:f => f, :i => i} %> + <% end %> + <% end %> + +
    FileFile Name<%= t('呈現語系')%>
    +
    + <%= hidden_field_tag 'archive_file_multiple_field_count', @archive_file.archive_file_multiples.count %> + ADD/新增 +
    +
    + +
    + +
    + + +
    + + + + +
    + <%= f.submit t('submit'), :class=>'btn btn-primary' %> + <%= link_to t('cancel'), get_go_back, :class=>"btn" %> +
    + +
    + + + +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "archive_form" %> + +<% end %> + \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb new file mode 100644 index 00000000..f2c11f06 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb @@ -0,0 +1,57 @@ +<% # encoding: utf-8 %> + + " class='list_item'> + +
    +
    + <%= f.file_field :file %> + <%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn', :target => '_blank', :title => t(:view)} ) : '' %> +
    +
    + + + +
    + + <% @site_valid_locales.each_with_index do |locale, i| %> + +
    "> + <%#= f.fields_for :i18n_variable, (form_file.new_record? ? form_file.build_i18n_variable : form_file.i18n_variable ) do |f| %> + <%= f.fields_for :file_title_translations do |f| %> +
    + +
    + <%= f.text_field locale, :class=>'post-file_title', :value => (form_file.file_title_translations[locale] rescue nil) %> +
    +
    + <% end %> + +
    + + <% end %> + +
    + + + + <% @site_valid_locales.each do |locale| %> + <%= check_box_tag "archive_file[archive_file_multiples_attributes][#{( form_file.new_record? ? 'new_archive_file_multiples' : "#{i}" )}][choose_lang][]", locale, (form_file.choose_lang.nil? ? true : form_file.choose_lang.include?(locale)) %> + <%= I18nVariable.from_locale(locale) %> + <% end %> + <%= hidden_field_tag 'archive_file[archive_file_multiples_attributes][0][choose_lang][]', '' %> + + + + + <% if form_file.new_record? %> + + <% else %> + <%= f.hidden_field :id %> + + <%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %> + <% end %> + + + + + diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb new file mode 100644 index 00000000..7dc62871 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb @@ -0,0 +1 @@ +$("#<%= dom_id @archive_file %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb new file mode 100644 index 00000000..f2e347cc --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb @@ -0,0 +1,5 @@ +

    <%= t('archive.editing_archive') %>

    + +<%= form_for @archive_file, :url => panel_archive_back_end_archive_file_path(@archive_file), :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb new file mode 100644 index 00000000..d1bfa6c1 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb @@ -0,0 +1,23 @@ + +<%= flash_messages %> + + + + + + + + + + + + + <% @archive_files.each do |post| %> + <%= render :partial => 'archive_files', :locals => {:post => post} %> + <% end %> + + +
    <%= t('archive_file.status') %><%= t('archive_file.category') %><%= t('archive_file.title') %><%= t('archive_file.tags') %>
    + +<%= paginate @archive_files %> + diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-fp.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-fp.js new file mode 100644 index 00000000..634fb5e4 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-fp.js @@ -0,0 +1,219 @@ +/* + * jQuery File Upload File Processing Plugin 1.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + 'canvas-to-blob', + './jquery.fileupload' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // The File Upload IP version extends the basic fileupload widget + // with file processing functionality: + $.widget('blueimpFP.fileupload', $.blueimp.fileupload, { + + options: { + // The list of file processing actions: + process: [ + /* + { + action: 'load', + fileTypes: /^image\/(gif|jpeg|png)$/, + maxFileSize: 20000000 // 20MB + }, + { + action: 'resize', + maxWidth: 1920, + maxHeight: 1200, + minWidth: 800, + minHeight: 600 + }, + { + action: 'save' + } + */ + ], + + // The add callback is invoked as soon as files are added to the + // fileupload widget (via file input selection, drag & drop or add + // API call). See the basic file upload widget for more information: + add: function (e, data) { + $(this).fileupload('process', data).done(function () { + data.submit(); + }); + } + }, + + processActions: { + // Loads the image given via data.files and data.index + // as canvas element. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + load: function (data, options) { + var that = this, + file = data.files[data.index], + dfd = $.Deferred(); + if (window.HTMLCanvasElement && + window.HTMLCanvasElement.prototype.toBlob && + ($.type(options.maxFileSize) !== 'number' || + file.size < options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + loadImage( + file, + function (canvas) { + data.canvas = canvas; + dfd.resolveWith(that, [data]); + }, + {canvas: true} + ); + } else { + dfd.rejectWith(that, [data]); + } + return dfd.promise(); + }, + // Resizes the image given as data.canvas and updates + // data.canvas with the resized image. + // Accepts the options maxWidth, maxHeight, minWidth and + // minHeight to scale the given image: + resize: function (data, options) { + if (data.canvas) { + var canvas = loadImage.scale(data.canvas, options); + if (canvas.width !== data.canvas.width || + canvas.height !== data.canvas.height) { + data.canvas = canvas; + data.processed = true; + } + } + return data; + }, + // Saves the processed image given as data.canvas + // inplace at data.index of data.files: + save: function (data, options) { + // Do nothing if no processing has happened: + if (!data.canvas || !data.processed) { + return data; + } + var that = this, + file = data.files[data.index], + name = file.name, + dfd = $.Deferred(), + callback = function (blob) { + if (!blob.name) { + if (file.type === blob.type) { + blob.name = file.name; + } else if (file.name) { + blob.name = file.name.replace( + /\..+$/, + '.' + blob.type.substr(6) + ); + } + } + // Store the created blob at the position + // of the original file in the files list: + data.files[data.index] = blob; + dfd.resolveWith(that, [data]); + }; + // Use canvas.mozGetAsFile directly, to retain the filename, as + // Gecko doesn't support the filename option for FormData.append: + if (data.canvas.mozGetAsFile) { + callback(data.canvas.mozGetAsFile( + (/^image\/(jpeg|png)$/.test(file.type) && name) || + ((name && name.replace(/\..+$/, '')) || + 'blob') + '.png', + file.type + )); + } else { + data.canvas.toBlob(callback, file.type); + } + return dfd.promise(); + } + }, + + // Resizes the file at the given index and stores the created blob at + // the original position of the files list, returns a Promise object: + _processFile: function (files, index, options) { + var that = this, + dfd = $.Deferred().resolveWith(that, [{ + files: files, + index: index + }]), + chain = dfd.promise(); + that._processing += 1; + $.each(options.process, function (i, settings) { + chain = chain.pipe(function (data) { + return that.processActions[settings.action] + .call(this, data, settings); + }); + }); + chain.always(function () { + that._processing -= 1; + if (that._processing === 0) { + that.element + .removeClass('fileupload-processing'); + } + }); + if (that._processing === 1) { + that.element.addClass('fileupload-processing'); + } + return chain; + }, + + // Processes the files given as files property of the data parameter, + // returns a Promise object that allows to bind a done handler, which + // will be invoked after processing all files (inplace) is done: + process: function (data) { + var that = this, + options = $.extend({}, this.options, data); + if (options.process && options.process.length && + this._isXHRUpload(options)) { + $.each(data.files, function (index, file) { + that._processingQueue = that._processingQueue.pipe( + function () { + var dfd = $.Deferred(); + that._processFile(data.files, index, options) + .always(function () { + dfd.resolveWith(that); + }); + return dfd.promise(); + } + ); + }); + } + return this._processingQueue; + }, + + _create: function () { + $.blueimp.fileupload.prototype._create.call(this); + this._processing = 0; + this._processingQueue = $.Deferred().resolveWith(this) + .promise(); + } + + }); + +})); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-ui.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-ui.js new file mode 100644 index 00000000..4c36f008 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload-ui.js @@ -0,0 +1,736 @@ +/* + * jQuery File Upload User Interface Plugin 6.9.4 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document, URL, webkitURL, FileReader */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'tmpl', + 'load-image', + './jquery.fileupload-fp' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.tmpl, + window.loadImage + ); + } +}(function ($, tmpl, loadImage) { + 'use strict'; + + // The UI version extends the FP (file processing) version or the basic + // file upload widget and adds complete user interface interaction: + var parentWidget = ($.blueimpFP || $.blueimp).fileupload; + $.widget('blueimpUI.fileupload', parentWidget, { + + options: { + // By default, files added to the widget are uploaded as soon + // as the user clicks on the start buttons. To enable automatic + // uploads, set the following option to true: + autoUpload: false, + // The following option limits the number of files that are + // allowed to be uploaded using this widget: + maxNumberOfFiles: undefined, + // The maximum allowed file size: + maxFileSize: undefined, + // The minimum allowed file size: + minFileSize: undefined, + // The regular expression for allowed file types, matches + // against either file type or file name: + acceptFileTypes: /.+$/i, + // The regular expression to define for which files a preview + // image is shown, matched against the file type: + previewSourceFileTypes: /^image\/(gif|jpeg|png)$/, + // The maximum file size of images that are to be displayed as preview: + previewSourceMaxFileSize: 5000000, // 5MB + // The maximum width of the preview images: + previewMaxWidth: 80, + // The maximum height of the preview images: + previewMaxHeight: 80, + // By default, preview images are displayed as canvas elements + // if supported by the browser. Set the following option to false + // to always display preview images as img elements: + previewAsCanvas: true, + // The ID of the upload template: + uploadTemplateId: 'template-upload', + // The ID of the download template: + downloadTemplateId: 'template-download', + // The container for the list of files. If undefined, it is set to + // an element with class "files" inside of the widget element: + filesContainer: undefined, + // By default, files are appended to the files container. + // Set the following option to true, to prepend files instead: + prependFiles: false, + // The expected data type of the upload response, sets the dataType + // option of the $.ajax upload requests: + dataType: 'json', + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop or add API call). + // See the basic file upload widget for more information: + add: function (e, data) { + var that = $(this).data('fileupload'), + options = that.options, + files = data.files; + $(this).fileupload('process', data).done(function () { + that._adjustMaxNumberOfFiles(-files.length); + data.maxNumberOfFilesAdjusted = true; + data.files.valid = data.isValidated = that._validate(files); + data.context = that._renderUpload(files).data('data', data); + options.filesContainer[ + options.prependFiles ? 'prepend' : 'append' + ](data.context); + that._renderPreviews(files, data.context); + that._forceReflow(data.context); + that._transition(data.context).done( + function () { + if ((that._trigger('added', e, data) !== false) && + (options.autoUpload || data.autoUpload) && + data.autoUpload !== false && data.isValidated) { + data.submit(); + } + } + ); + }); + }, + // Callback for the start of each file upload request: + send: function (e, data) { + var that = $(this).data('fileupload'); + if (!data.isValidated) { + if (!data.maxNumberOfFilesAdjusted) { + that._adjustMaxNumberOfFiles(-data.files.length); + data.maxNumberOfFilesAdjusted = true; + } + if (!that._validate(data.files)) { + return false; + } + } + if (data.context && data.dataType && + data.dataType.substr(0, 6) === 'iframe') { + // Iframe Transport does not support progress events. + // In lack of an indeterminate progress bar, we set + // the progress to 100%, showing the full animated bar: + data.context + .find('.progress').addClass( + !$.support.transition && 'progress-animated' + ) + .attr('aria-valuenow', 100) + .find('.bar').css( + 'width', + '100%' + ); + } + return that._trigger('sent', e, data); + }, + // Callback for successful uploads: + done: function (e, data) { + var that = $(this).data('fileupload'), + template; + if (data.context) { + data.context.each(function (index) { + var file = ($.isArray(data.result) && + data.result[index]) || {error: 'emptyResult'}; + if (file.error) { + that._adjustMaxNumberOfFiles(1); + } + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + } + ); + } + ); + }); + } else { + if ($.isArray(data.result)) { + $.each(data.result, function (index, file) { + if (data.maxNumberOfFilesAdjusted && file.error) { + that._adjustMaxNumberOfFiles(1); + } else if (!data.maxNumberOfFilesAdjusted && + !file.error) { + that._adjustMaxNumberOfFiles(-1); + } + }); + data.maxNumberOfFilesAdjusted = true; + } + template = that._renderDownload(data.result) + .appendTo(that.options.filesContainer); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + } + ); + } + }, + // Callback for failed (abort or error) uploads: + fail: function (e, data) { + var that = $(this).data('fileupload'), + template; + if (data.maxNumberOfFilesAdjusted) { + that._adjustMaxNumberOfFiles(data.files.length); + } + if (data.context) { + data.context.each(function (index) { + if (data.errorThrown !== 'abort') { + var file = data.files[index]; + file.error = file.error || data.errorThrown || + true; + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + } + ); + } + ); + } else { + that._transition($(this)).done( + function () { + $(this).remove(); + that._trigger('failed', e, data); + } + ); + } + }); + } else if (data.errorThrown !== 'abort') { + data.context = that._renderUpload(data.files) + .appendTo(that.options.filesContainer) + .data('data', data); + that._forceReflow(data.context); + that._transition(data.context).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + } + ); + } else { + that._trigger('failed', e, data); + } + }, + // Callback for upload progress events: + progress: function (e, data) { + if (data.context) { + var progress = parseInt(data.loaded / data.total * 100, 10); + data.context.find('.progress') + .attr('aria-valuenow', progress) + .find('.bar').css( + 'width', + progress + '%' + ); + } + }, + // Callback for global upload progress events: + progressall: function (e, data) { + var $this = $(this), + progress = parseInt(data.loaded / data.total * 100, 10), + globalProgressNode = $this.find('.fileupload-progress'), + extendedProgressNode = globalProgressNode + .find('.progress-extended'); + if (extendedProgressNode.length) { + extendedProgressNode.html( + $this.data('fileupload')._renderExtendedProgress(data) + ); + } + globalProgressNode + .find('.progress') + .attr('aria-valuenow', progress) + .find('.bar').css( + 'width', + progress + '%' + ); + }, + // Callback for uploads start, equivalent to the global ajaxStart event: + start: function (e) { + var that = $(this).data('fileupload'); + that._transition($(this).find('.fileupload-progress')).done( + function () { + that._trigger('started', e); + } + ); + }, + // Callback for uploads stop, equivalent to the global ajaxStop event: + stop: function (e) { + var that = $(this).data('fileupload'); + that._transition($(this).find('.fileupload-progress')).done( + function () { + $(this).find('.progress') + .attr('aria-valuenow', '0') + .find('.bar').css('width', '0%'); + $(this).find('.progress-extended').html(' '); + that._trigger('stopped', e); + } + ); + }, + // Callback for file deletion: + destroy: function (e, data) { + var that = $(this).data('fileupload'); + if (data.url) { + $.ajax(data); + that._adjustMaxNumberOfFiles(1); + } + that._transition(data.context).done( + function () { + $(this).remove(); + that._trigger('destroyed', e, data); + } + ); + } + }, + + // Link handler, that allows to download files + // by drag & drop of the links to the desktop: + _enableDragToDesktop: function () { + var link = $(this), + url = link.prop('href'), + name = link.prop('download'), + type = 'application/octet-stream'; + link.bind('dragstart', function (e) { + try { + e.originalEvent.dataTransfer.setData( + 'DownloadURL', + [type, name, url].join(':') + ); + } catch (err) {} + }); + }, + + _adjustMaxNumberOfFiles: function (operand) { + if (typeof this.options.maxNumberOfFiles === 'number') { + this.options.maxNumberOfFiles += operand; + if (this.options.maxNumberOfFiles < 1) { + this._disableFileInputButton(); + } else { + this._enableFileInputButton(); + } + } + }, + + _formatFileSize: function (bytes) { + if (typeof bytes !== 'number') { + return ''; + } + if (bytes >= 1000000000) { + return (bytes / 1000000000).toFixed(2) + ' GB'; + } + if (bytes >= 1000000) { + return (bytes / 1000000).toFixed(2) + ' MB'; + } + return (bytes / 1000).toFixed(2) + ' KB'; + }, + + _formatBitrate: function (bits) { + if (typeof bits !== 'number') { + return ''; + } + if (bits >= 1000000000) { + return (bits / 1000000000).toFixed(2) + ' Gbit/s'; + } + if (bits >= 1000000) { + return (bits / 1000000).toFixed(2) + ' Mbit/s'; + } + if (bits >= 1000) { + return (bits / 1000).toFixed(2) + ' kbit/s'; + } + return bits + ' bit/s'; + }, + + _formatTime: function (seconds) { + var date = new Date(seconds * 1000), + days = parseInt(seconds / 86400, 10); + days = days ? days + 'd ' : ''; + return days + + ('0' + date.getUTCHours()).slice(-2) + ':' + + ('0' + date.getUTCMinutes()).slice(-2) + ':' + + ('0' + date.getUTCSeconds()).slice(-2); + }, + + _formatPercentage: function (floatValue) { + return (floatValue * 100).toFixed(2) + ' %'; + }, + + _renderExtendedProgress: function (data) { + return this._formatBitrate(data.bitrate) + ' | ' + + this._formatTime( + (data.total - data.loaded) * 8 / data.bitrate + ) + ' | ' + + this._formatPercentage( + data.loaded / data.total + ) + ' | ' + + this._formatFileSize(data.loaded) + ' / ' + + this._formatFileSize(data.total); + }, + + _hasError: function (file) { + if (file.error) { + return file.error; + } + // The number of added files is subtracted from + // maxNumberOfFiles before validation, so we check if + // maxNumberOfFiles is below 0 (instead of below 1): + if (this.options.maxNumberOfFiles < 0) { + return 'maxNumberOfFiles'; + } + // Files are accepted if either the file type or the file name + // matches against the acceptFileTypes regular expression, as + // only browsers with support for the File API report the type: + if (!(this.options.acceptFileTypes.test(file.type) || + this.options.acceptFileTypes.test(file.name))) { + return 'acceptFileTypes'; + } + if (this.options.maxFileSize && + file.size > this.options.maxFileSize) { + return 'maxFileSize'; + } + if (typeof file.size === 'number' && + file.size < this.options.minFileSize) { + return 'minFileSize'; + } + return null; + }, + + _validate: function (files) { + var that = this, + valid = !!files.length; + $.each(files, function (index, file) { + file.error = that._hasError(file); + if (file.error) { + valid = false; + } + }); + return valid; + }, + + _renderTemplate: function (func, files) { + if (!func) { + return $(); + } + var result = func({ + files: files, + formatFileSize: this._formatFileSize, + options: this.options + }); + if (result instanceof $) { + return result; + } + return $(this.options.templatesContainer).html(result).children(); + }, + + _renderPreview: function (file, node) { + var that = this, + options = this.options, + dfd = $.Deferred(); + return ((loadImage && loadImage( + file, + function (img) { + node.append(img); + that._forceReflow(node); + that._transition(node).done(function () { + dfd.resolveWith(node); + }); + if (!$.contains(document.body, node[0])) { + // If the element is not part of the DOM, + // transition events are not triggered, + // so we have to resolve manually: + dfd.resolveWith(node); + } + }, + { + maxWidth: options.previewMaxWidth, + maxHeight: options.previewMaxHeight, + canvas: options.previewAsCanvas + } + )) || dfd.resolveWith(node)) && dfd; + }, + + _renderPreviews: function (files, nodes) { + var that = this, + options = this.options; + nodes.find('.preview span').each(function (index, element) { + var file = files[index]; + if (options.previewSourceFileTypes.test(file.type) && + ($.type(options.previewSourceMaxFileSize) !== 'number' || + file.size < options.previewSourceMaxFileSize)) { + that._processingQueue = that._processingQueue.pipe(function () { + var dfd = $.Deferred(); + that._renderPreview(file, $(element)).done( + function () { + dfd.resolveWith(that); + } + ); + return dfd.promise(); + }); + } + }); + return this._processingQueue; + }, + + _renderUpload: function (files) { + return this._renderTemplate( + this.options.uploadTemplate, + files + ); + }, + + _renderDownload: function (files) { + return this._renderTemplate( + this.options.downloadTemplate, + files + ).find('a[download]').each(this._enableDragToDesktop).end(); + }, + + _startHandler: function (e) { + e.preventDefault(); + var button = $(this), + template = button.closest('.template-upload'), + data = template.data('data'); + if (data && data.submit && !data.jqXHR && data.submit()) { + button.prop('disabled', true); + } + }, + + _cancelHandler: function (e) { + e.preventDefault(); + var template = $(this).closest('.template-upload'), + data = template.data('data') || {}; + if (!data.jqXHR) { + data.errorThrown = 'abort'; + e.data.fileupload._trigger('fail', e, data); + } else { + data.jqXHR.abort(); + } + }, + + _deleteHandler: function (e) { + e.preventDefault(); + var button = $(this); + e.data.fileupload._trigger('destroy', e, { + context: button.closest('.template-download'), + url: button.attr('data-url'), + type: button.attr('data-type') || 'DELETE', + dataType: e.data.fileupload.options.dataType + }); + }, + + _forceReflow: function (node) { + return $.support.transition && node.length && + node[0].offsetWidth; + }, + + _transition: function (node) { + var dfd = $.Deferred(); + if ($.support.transition && node.hasClass('fade')) { + node.bind( + $.support.transition.end, + function (e) { + // Make sure we don't respond to other transitions events + // in the container element, e.g. from button elements: + if (e.target === node[0]) { + node.unbind($.support.transition.end); + dfd.resolveWith(node); + } + } + ).toggleClass('in'); + } else { + node.toggleClass('in'); + dfd.resolveWith(node); + } + return dfd; + }, + + _initButtonBarEventHandlers: function () { + var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'), + filesList = this.options.filesContainer, + ns = this.options.namespace; + fileUploadButtonBar.find('.start') + .bind('click.' + ns, function (e) { + e.preventDefault(); + filesList.find('.start button').click(); + }); + fileUploadButtonBar.find('.cancel') + .bind('click.' + ns, function (e) { + e.preventDefault(); + filesList.find('.cancel button').click(); + }); + fileUploadButtonBar.find('.delete') + .bind('click.' + ns, function (e) { + e.preventDefault(); + filesList.find('.delete input:checked') + .siblings('button').click(); + fileUploadButtonBar.find('.toggle') + .prop('checked', false); + }); + fileUploadButtonBar.find('.toggle') + .bind('change.' + ns, function (e) { + filesList.find('.delete input').prop( + 'checked', + $(this).is(':checked') + ); + }); + }, + + _destroyButtonBarEventHandlers: function () { + this.element.find('.fileupload-buttonbar button') + .unbind('click.' + this.options.namespace); + this.element.find('.fileupload-buttonbar .toggle') + .unbind('change.' + this.options.namespace); + }, + + _initEventHandlers: function () { + parentWidget.prototype._initEventHandlers.call(this); + var eventData = {fileupload: this}; + this.options.filesContainer + .delegate( + '.start button', + 'click.' + this.options.namespace, + eventData, + this._startHandler + ) + .delegate( + '.cancel button', + 'click.' + this.options.namespace, + eventData, + this._cancelHandler + ) + .delegate( + '.delete button', + 'click.' + this.options.namespace, + eventData, + this._deleteHandler + ); + this._initButtonBarEventHandlers(); + }, + + _destroyEventHandlers: function () { + var options = this.options; + this._destroyButtonBarEventHandlers(); + options.filesContainer + .undelegate('.start button', 'click.' + options.namespace) + .undelegate('.cancel button', 'click.' + options.namespace) + .undelegate('.delete button', 'click.' + options.namespace); + parentWidget.prototype._destroyEventHandlers.call(this); + }, + + _enableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', false) + .parent().removeClass('disabled'); + }, + + _disableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', true) + .parent().addClass('disabled'); + }, + + _initTemplates: function () { + var options = this.options; + options.templatesContainer = document.createElement( + options.filesContainer.prop('nodeName') + ); + if (tmpl) { + if (options.uploadTemplateId) { + options.uploadTemplate = tmpl(options.uploadTemplateId); + } + if (options.downloadTemplateId) { + options.downloadTemplate = tmpl(options.downloadTemplateId); + } + } + }, + + _initFilesContainer: function () { + var options = this.options; + if (options.filesContainer === undefined) { + options.filesContainer = this.element.find('.files'); + } else if (!(options.filesContainer instanceof $)) { + options.filesContainer = $(options.filesContainer); + } + }, + + _stringToRegExp: function (str) { + var parts = str.split('/'), + modifiers = parts.pop(); + parts.shift(); + return new RegExp(parts.join('/'), modifiers); + }, + + _initRegExpOptions: function () { + var options = this.options; + if ($.type(options.acceptFileTypes) === 'string') { + options.acceptFileTypes = this._stringToRegExp( + options.acceptFileTypes + ); + } + if ($.type(options.previewSourceFileTypes) === 'string') { + options.previewSourceFileTypes = this._stringToRegExp( + options.previewSourceFileTypes + ); + } + }, + + _initSpecialOptions: function () { + parentWidget.prototype._initSpecialOptions.call(this); + this._initFilesContainer(); + this._initTemplates(); + this._initRegExpOptions(); + }, + + _create: function () { + parentWidget.prototype._create.call(this); + this._refreshOptionsList.push( + 'filesContainer', + 'uploadTemplateId', + 'downloadTemplateId' + ); + if (!$.blueimpFP) { + this._processingQueue = $.Deferred().resolveWith(this).promise(); + this.process = function () { + return this._processingQueue; + }; + } + }, + + enable: function () { + parentWidget.prototype.enable.call(this); + this.element.find('input, button').prop('disabled', false); + this._enableFileInputButton(); + }, + + disable: function () { + this.element.find('input, button').prop('disabled', true); + this._disableFileInputButton(); + parentWidget.prototype.disable.call(this); + } + + }); + +})); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload.js new file mode 100644 index 00000000..c9375294 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.fileupload.js @@ -0,0 +1,975 @@ +/* + * jQuery File Upload Plugin 5.14 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document, Blob, FormData, location */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'jquery.ui.widget' + ], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // The FileReader API is not actually used, but works as feature detection, + // as e.g. Safari supports XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads: + $.support.xhrFileUpload = !!(window.XMLHttpRequestUpload && window.FileReader); + $.support.xhrFormDataFileUpload = !!window.FormData; + + // The fileupload widget listens for change events on file input fields defined + // via fileInput setting and paste or drop events of the given dropZone. + // In addition to the default jQuery Widget methods, the fileupload widget + // exposes the "add" and "send" methods, to add or directly send files using + // the fileupload API. + // By default, files added via file input selection, paste, drag & drop or + // "add" method are uploaded immediately, but it is possible to override + // the "add" callback option to queue file uploads. + $.widget('blueimp.fileupload', { + + options: { + // The namespace used for event handler binding on the dropZone and + // fileInput collections. + // If not set, the name of the widget ("fileupload") is used. + namespace: undefined, + // The drop target collection, by the default the complete document. + // Set to null or an empty collection to disable drag & drop support: + dropZone: $(document), + // The file input field collection, that is listened for change events. + // If undefined, it is set to the file input fields inside + // of the widget element on plugin initialization. + // Set to null or an empty collection to disable the change listener. + fileInput: undefined, + // By default, the file input field is replaced with a clone after + // each input field change event. This is required for iframe transport + // queues and allows change events to be fired for the same file + // selection, but can be disabled by setting the following option to false: + replaceFileInput: true, + // The parameter name for the file form data (the request argument name). + // If undefined or empty, the name property of the file input field is + // used, or "files[]" if the file input name property is also empty, + // can be a string or an array of strings: + paramName: undefined, + // By default, each file of a selection is uploaded using an individual + // request for XHR type uploads. Set to false to upload file + // selections in one request each: + singleFileUploads: true, + // To limit the number of files uploaded with one XHR request, + // set the following option to an integer greater than 0: + limitMultiFileUploads: undefined, + // Set the following option to true to issue all file upload requests + // in a sequential order: + sequentialUploads: false, + // To limit the number of concurrent uploads, + // set the following option to an integer greater than 0: + limitConcurrentUploads: undefined, + // Set the following option to true to force iframe transport uploads: + forceIframeTransport: false, + // Set the following option to the location of a redirect url on the + // origin server, for cross-domain iframe transport uploads: + redirect: undefined, + // The parameter name for the redirect url, sent as part of the form + // data and set to 'redirect' if this option is empty: + redirectParamName: undefined, + // Set the following option to the location of a postMessage window, + // to enable postMessage transport uploads: + postMessage: undefined, + // By default, XHR file uploads are sent as multipart/form-data. + // The iframe transport is always using multipart/form-data. + // Set to false to enable non-multipart XHR uploads: + multipart: true, + // To upload large files in smaller chunks, set the following option + // to a preferred maximum chunk size. If set to 0, null or undefined, + // or the browser does not support the required Blob API, files will + // be uploaded as a whole. + maxChunkSize: undefined, + // When a non-multipart upload or a chunked multipart upload has been + // aborted, this option can be used to resume the upload by setting + // it to the size of the already uploaded bytes. This option is most + // useful when modifying the options object inside of the "add" or + // "send" callbacks, as the options are cloned for each file upload. + uploadedBytes: undefined, + // By default, failed (abort or error) file uploads are removed from the + // global progress calculation. Set the following option to false to + // prevent recalculating the global progress data: + recalculateProgress: true, + // Interval in milliseconds to calculate and trigger progress events: + progressInterval: 100, + // Interval in milliseconds to calculate progress bitrate: + bitrateInterval: 500, + + // Additional form data to be sent along with the file uploads can be set + // using this option, which accepts an array of objects with name and + // value properties, a function returning such an array, a FormData + // object (for XHR file uploads), or a simple object. + // The form of the first fileInput is given as parameter to the function: + formData: function (form) { + return form.serializeArray(); + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop, paste or add API call). + // If the singleFileUploads option is enabled, this callback will be + // called once for each file in the selection for XHR file uplaods, else + // once for each file selection. + // The upload starts when the submit method is invoked on the data parameter. + // The data object contains a files property holding the added files + // and allows to override plugin options as well as define ajax settings. + // Listeners for this callback can also be bound the following way: + // .bind('fileuploadadd', func); + // data.submit() returns a Promise object and allows to attach additional + // handlers using jQuery's Deferred callbacks: + // data.submit().done(func).fail(func).always(func); + add: function (e, data) { + data.submit(); + }, + + // Other callbacks: + // Callback for the submit event of each file upload: + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); + // Callback for the start of each file upload request: + // send: function (e, data) {}, // .bind('fileuploadsend', func); + // Callback for successful uploads: + // done: function (e, data) {}, // .bind('fileuploaddone', func); + // Callback for failed (abort or error) uploads: + // fail: function (e, data) {}, // .bind('fileuploadfail', func); + // Callback for completed (success, abort or error) requests: + // always: function (e, data) {}, // .bind('fileuploadalways', func); + // Callback for upload progress events: + // progress: function (e, data) {}, // .bind('fileuploadprogress', func); + // Callback for global upload progress events: + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); + // Callback for uploads start, equivalent to the global ajaxStart event: + // start: function (e) {}, // .bind('fileuploadstart', func); + // Callback for uploads stop, equivalent to the global ajaxStop event: + // stop: function (e) {}, // .bind('fileuploadstop', func); + // Callback for change events of the fileInput collection: + // change: function (e, data) {}, // .bind('fileuploadchange', func); + // Callback for paste events to the dropZone collection: + // paste: function (e, data) {}, // .bind('fileuploadpaste', func); + // Callback for drop events of the dropZone collection: + // drop: function (e, data) {}, // .bind('fileuploaddrop', func); + // Callback for dragover events of the dropZone collection: + // dragover: function (e) {}, // .bind('fileuploaddragover', func); + + // The plugin options are used as settings object for the ajax calls. + // The following are jQuery ajax settings required for the file uploads: + processData: false, + contentType: false, + cache: false + }, + + // A list of options that require a refresh after assigning a new value: + _refreshOptionsList: [ + 'namespace', + 'dropZone', + 'fileInput', + 'multipart', + 'forceIframeTransport' + ], + + _BitrateTimer: function () { + this.timestamp = +(new Date()); + this.loaded = 0; + this.bitrate = 0; + this.getBitrate = function (now, loaded, interval) { + var timeDiff = now - this.timestamp; + if (!this.bitrate || !interval || timeDiff > interval) { + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; + this.loaded = loaded; + this.timestamp = now; + } + return this.bitrate; + }; + }, + + _isXHRUpload: function (options) { + return !options.forceIframeTransport && + ((!options.multipart && $.support.xhrFileUpload) || + $.support.xhrFormDataFileUpload); + }, + + _getFormData: function (options) { + var formData; + if (typeof options.formData === 'function') { + return options.formData(options.form); + } + if ($.isArray(options.formData)) { + return options.formData; + } + if (options.formData) { + formData = []; + $.each(options.formData, function (name, value) { + formData.push({name: name, value: value}); + }); + return formData; + } + return []; + }, + + _getTotal: function (files) { + var total = 0; + $.each(files, function (index, file) { + total += file.size || 1; + }); + return total; + }, + + _onProgress: function (e, data) { + if (e.lengthComputable) { + var now = +(new Date()), + total, + loaded; + if (data._time && data.progressInterval && + (now - data._time < data.progressInterval) && + e.loaded !== e.total) { + return; + } + data._time = now; + total = data.total || this._getTotal(data.files); + loaded = parseInt( + e.loaded / e.total * (data.chunkSize || total), + 10 + ) + (data.uploadedBytes || 0); + this._loaded += loaded - (data.loaded || data.uploadedBytes || 0); + data.lengthComputable = true; + data.loaded = loaded; + data.total = total; + data.bitrate = data._bitrateTimer.getBitrate( + now, + loaded, + data.bitrateInterval + ); + // Trigger a custom progress event with a total data property set + // to the file size(s) of the current upload and a loaded data + // property calculated accordingly: + this._trigger('progress', e, data); + // Trigger a global progress event for all current file uploads, + // including ajax calls queued for sequential file uploads: + this._trigger('progressall', e, { + lengthComputable: true, + loaded: this._loaded, + total: this._total, + bitrate: this._bitrateTimer.getBitrate( + now, + this._loaded, + data.bitrateInterval + ) + }); + } + }, + + _initProgressListener: function (options) { + var that = this, + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + // Accesss to the native XHR object is required to add event listeners + // for the upload progress event: + if (xhr.upload) { + $(xhr.upload).bind('progress', function (e) { + var oe = e.originalEvent; + // Make sure the progress event properties get copied over: + e.lengthComputable = oe.lengthComputable; + e.loaded = oe.loaded; + e.total = oe.total; + that._onProgress(e, options); + }); + options.xhr = function () { + return xhr; + }; + } + }, + + _initXHRData: function (options) { + var formData, + file = options.files[0], + // Ignore non-multipart setting if not supported: + multipart = options.multipart || !$.support.xhrFileUpload, + paramName = options.paramName[0]; + if (!multipart || options.blob) { + // For non-multipart uploads and chunked uploads, + // file meta data is not part of the request body, + // so we transmit this data as part of the HTTP headers. + // For cross domain requests, these headers must be allowed + // via Access-Control-Allow-Headers or removed using + // the beforeSend callback: + options.headers = $.extend(options.headers, { + 'X-File-Name': file.name, + 'X-File-Type': file.type, + 'X-File-Size': file.size + }); + if (!options.blob) { + // Non-chunked non-multipart upload: + options.contentType = file.type; + options.data = file; + } else if (!multipart) { + // Chunked non-multipart upload: + options.contentType = 'application/octet-stream'; + options.data = options.blob; + } + } + if (multipart && $.support.xhrFormDataFileUpload) { + if (options.postMessage) { + // window.postMessage does not allow sending FormData + // objects, so we just add the File/Blob objects to + // the formData array and let the postMessage window + // create the FormData object out of this array: + formData = this._getFormData(options); + if (options.blob) { + formData.push({ + name: paramName, + value: options.blob + }); + } else { + $.each(options.files, function (index, file) { + formData.push({ + name: options.paramName[index] || paramName, + value: file + }); + }); + } + } else { + if (options.formData instanceof FormData) { + formData = options.formData; + } else { + formData = new FormData(); + $.each(this._getFormData(options), function (index, field) { + formData.append(field.name, field.value); + }); + } + if (options.blob) { + formData.append(paramName, options.blob, file.name); + } else { + $.each(options.files, function (index, file) { + // File objects are also Blob instances. + // This check allows the tests to run with + // dummy objects: + if (file instanceof Blob) { + formData.append( + options.paramName[index] || paramName, + file, + file.name + ); + } + }); + } + } + options.data = formData; + } + // Blob reference is not needed anymore, free memory: + options.blob = null; + }, + + _initIframeSettings: function (options) { + // Setting the dataType to iframe enables the iframe transport: + options.dataType = 'iframe ' + (options.dataType || ''); + // The iframe transport accepts a serialized array as form data: + options.formData = this._getFormData(options); + // Add redirect url to form data on cross-domain uploads: + if (options.redirect && $('').prop('href', options.url) + .prop('host') !== location.host) { + options.formData.push({ + name: options.redirectParamName || 'redirect', + value: options.redirect + }); + } + }, + + _initDataSettings: function (options) { + if (this._isXHRUpload(options)) { + if (!this._chunkedUpload(options, true)) { + if (!options.data) { + this._initXHRData(options); + } + this._initProgressListener(options); + } + if (options.postMessage) { + // Setting the dataType to postmessage enables the + // postMessage transport: + options.dataType = 'postmessage ' + (options.dataType || ''); + } + } else { + this._initIframeSettings(options, 'iframe'); + } + }, + + _getParamName: function (options) { + var fileInput = $(options.fileInput), + paramName = options.paramName; + if (!paramName) { + paramName = []; + fileInput.each(function () { + var input = $(this), + name = input.prop('name') || 'files[]', + i = (input.prop('files') || [1]).length; + while (i) { + paramName.push(name); + i -= 1; + } + }); + if (!paramName.length) { + paramName = [fileInput.prop('name') || 'files[]']; + } + } else if (!$.isArray(paramName)) { + paramName = [paramName]; + } + return paramName; + }, + + _initFormSettings: function (options) { + // Retrieve missing options from the input field and the + // associated form, if available: + if (!options.form || !options.form.length) { + options.form = $(options.fileInput.prop('form')); + } + options.paramName = this._getParamName(options); + if (!options.url) { + options.url = options.form.prop('action') || location.href; + } + // The HTTP request method must be "POST" or "PUT": + options.type = (options.type || options.form.prop('method') || '') + .toUpperCase(); + if (options.type !== 'POST' && options.type !== 'PUT') { + options.type = 'POST'; + } + if (!options.formAcceptCharset) { + options.formAcceptCharset = options.form.attr('accept-charset'); + } + }, + + _getAJAXSettings: function (data) { + var options = $.extend({}, this.options, data); + this._initFormSettings(options); + this._initDataSettings(options); + return options; + }, + + // Maps jqXHR callbacks to the equivalent + // methods of the given Promise object: + _enhancePromise: function (promise) { + promise.success = promise.done; + promise.error = promise.fail; + promise.complete = promise.always; + return promise; + }, + + // Creates and returns a Promise object enhanced with + // the jqXHR methods abort, success, error and complete: + _getXHRPromise: function (resolveOrReject, context, args) { + var dfd = $.Deferred(), + promise = dfd.promise(); + context = context || this.options.context || promise; + if (resolveOrReject === true) { + dfd.resolveWith(context, args); + } else if (resolveOrReject === false) { + dfd.rejectWith(context, args); + } + promise.abort = dfd.promise; + return this._enhancePromise(promise); + }, + + // Uploads a file in multiple, sequential requests + // by splitting the file up in multiple blob chunks. + // If the second parameter is true, only tests if the file + // should be uploaded in chunks, but does not invoke any + // upload requests: + _chunkedUpload: function (options, testOnly) { + var that = this, + file = options.files[0], + fs = file.size, + ub = options.uploadedBytes = options.uploadedBytes || 0, + mcs = options.maxChunkSize || fs, + // Use the Blob methods with the slice implementation + // according to the W3C Blob API specification: + slice = file.webkitSlice || file.mozSlice || file.slice, + upload, + n, + jqXHR, + pipe; + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || + options.data) { + return false; + } + if (testOnly) { + return true; + } + if (ub >= fs) { + file.error = 'uploadedBytes'; + return this._getXHRPromise( + false, + options.context, + [null, 'error', file.error] + ); + } + // n is the number of blobs to upload, + // calculated via filesize, uploaded bytes and max chunk size: + n = Math.ceil((fs - ub) / mcs); + // The chunk upload method accepting the chunk number as parameter: + upload = function (i) { + if (!i) { + return that._getXHRPromise(true, options.context); + } + // Upload the blobs in sequential order: + return upload(i -= 1).pipe(function () { + // Clone the options object for each chunk upload: + var o = $.extend({}, options); + o.blob = slice.call( + file, + ub + i * mcs, + ub + (i + 1) * mcs + ); + // Expose the chunk index: + o.chunkIndex = i; + // Expose the number of chunks: + o.chunksNumber = n; + // Store the current chunk size, as the blob itself + // will be dereferenced after data processing: + o.chunkSize = o.blob.size; + // Process the upload data (the blob and potential form data): + that._initXHRData(o); + // Add progress listeners for this chunk upload: + that._initProgressListener(o); + jqXHR = ($.ajax(o) || that._getXHRPromise(false, o.context)) + .done(function () { + // Create a progress event if upload is done and + // no progress event has been invoked for this chunk: + if (!o.loaded) { + that._onProgress($.Event('progress', { + lengthComputable: true, + loaded: o.chunkSize, + total: o.chunkSize + }), o); + } + options.uploadedBytes = o.uploadedBytes += + o.chunkSize; + }); + return jqXHR; + }); + }; + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe = upload(n); + pipe.abort = function () { + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + }, + + _beforeSend: function (e, data) { + if (this._active === 0) { + // the start callback is triggered when an upload starts + // and no other uploads are currently running, + // equivalent to the global ajaxStart event: + this._trigger('start'); + // Set timer for global bitrate progress calculation: + this._bitrateTimer = new this._BitrateTimer(); + } + this._active += 1; + // Initialize the global progress values: + this._loaded += data.uploadedBytes || 0; + this._total += this._getTotal(data.files); + }, + + _onDone: function (result, textStatus, jqXHR, options) { + if (!this._isXHRUpload(options)) { + // Create a progress event for each iframe load: + this._onProgress($.Event('progress', { + lengthComputable: true, + loaded: 1, + total: 1 + }), options); + } + options.result = result; + options.textStatus = textStatus; + options.jqXHR = jqXHR; + this._trigger('done', null, options); + }, + + _onFail: function (jqXHR, textStatus, errorThrown, options) { + options.jqXHR = jqXHR; + options.textStatus = textStatus; + options.errorThrown = errorThrown; + this._trigger('fail', null, options); + if (options.recalculateProgress) { + // Remove the failed (error or abort) file upload from + // the global progress calculation: + this._loaded -= options.loaded || options.uploadedBytes || 0; + this._total -= options.total || this._getTotal(options.files); + } + }, + + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { + this._active -= 1; + options.textStatus = textStatus; + if (jqXHRorError && jqXHRorError.always) { + options.jqXHR = jqXHRorError; + options.result = jqXHRorResult; + } else { + options.jqXHR = jqXHRorResult; + options.errorThrown = jqXHRorError; + } + this._trigger('always', null, options); + if (this._active === 0) { + // The stop callback is triggered when all uploads have + // been completed, equivalent to the global ajaxStop event: + this._trigger('stop'); + // Reset the global progress values: + this._loaded = this._total = 0; + this._bitrateTimer = null; + } + }, + + _onSend: function (e, data) { + var that = this, + jqXHR, + slot, + pipe, + options = that._getAJAXSettings(data), + send = function (resolve, args) { + that._sending += 1; + // Set timer for bitrate progress calculation: + options._bitrateTimer = new that._BitrateTimer(); + jqXHR = jqXHR || ( + (resolve !== false && + that._trigger('send', e, options) !== false && + (that._chunkedUpload(options) || $.ajax(options))) || + that._getXHRPromise(false, options.context, args) + ).done(function (result, textStatus, jqXHR) { + that._onDone(result, textStatus, jqXHR, options); + }).fail(function (jqXHR, textStatus, errorThrown) { + that._onFail(jqXHR, textStatus, errorThrown, options); + }).always(function (jqXHRorResult, textStatus, jqXHRorError) { + that._sending -= 1; + that._onAlways( + jqXHRorResult, + textStatus, + jqXHRorError, + options + ); + if (options.limitConcurrentUploads && + options.limitConcurrentUploads > that._sending) { + // Start the next queued upload, + // that has not been aborted: + var nextSlot = that._slots.shift(); + while (nextSlot) { + if (!nextSlot.isRejected()) { + nextSlot.resolve(); + break; + } + nextSlot = that._slots.shift(); + } + } + }); + return jqXHR; + }; + this._beforeSend(e, options); + if (this.options.sequentialUploads || + (this.options.limitConcurrentUploads && + this.options.limitConcurrentUploads <= this._sending)) { + if (this.options.limitConcurrentUploads > 1) { + slot = $.Deferred(); + this._slots.push(slot); + pipe = slot.pipe(send); + } else { + pipe = (this._sequence = this._sequence.pipe(send, send)); + } + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe.abort = function () { + var args = [undefined, 'abort', 'abort']; + if (!jqXHR) { + if (slot) { + slot.rejectWith(args); + } + return send(false, args); + } + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + } + return send(); + }, + + _onAdd: function (e, data) { + var that = this, + result = true, + options = $.extend({}, this.options, data), + limit = options.limitMultiFileUploads, + paramName = this._getParamName(options), + paramNameSet, + paramNameSlice, + fileSet, + i; + if (!(options.singleFileUploads || limit) || + !this._isXHRUpload(options)) { + fileSet = [data.files]; + paramNameSet = [paramName]; + } else if (!options.singleFileUploads && limit) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < data.files.length; i += limit) { + fileSet.push(data.files.slice(i, i + limit)); + paramNameSlice = paramName.slice(i, i + limit); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + } + } else { + paramNameSet = paramName; + } + data.originalFiles = data.files; + $.each(fileSet || data.files, function (index, element) { + var newData = $.extend({}, data); + newData.files = fileSet ? element : [element]; + newData.paramName = paramNameSet[index]; + newData.submit = function () { + newData.jqXHR = this.jqXHR = + (that._trigger('submit', e, this) !== false) && + that._onSend(e, this); + return this.jqXHR; + }; + return (result = that._trigger('add', e, newData)); + }); + return result; + }, + + // File Normalization for Gecko 1.9.1 (Firefox 3.5) support: + _normalizeFile: function (index, file) { + if (file.name === undefined && file.size === undefined) { + file.name = file.fileName; + file.size = file.fileSize; + } + }, + + _replaceFileInput: function (input) { + var inputClone = input.clone(true); + $('
    ').append(inputClone)[0].reset(); + // Detaching allows to insert the fileInput on another form + // without loosing the file input value: + input.after(inputClone).detach(); + // Avoid memory leaks with the detached file input: + $.cleanData(input.unbind('remove')); + // Replace the original file input element in the fileInput + // collection with the clone, which has been copied including + // event handlers: + this.options.fileInput = this.options.fileInput.map(function (i, el) { + if (el === input[0]) { + return inputClone[0]; + } + return el; + }); + // If the widget has been initialized on the file input itself, + // override this.element with the file input clone: + if (input[0] === this.element[0]) { + this.element = inputClone; + } + }, + + _getFileInputFiles: function (fileInput) { + fileInput = $(fileInput); + var files = $.each($.makeArray(fileInput.prop('files')), this._normalizeFile), + value; + if (!files.length) { + value = fileInput.prop('value'); + if (!value) { + return []; + } + // If the files property is not available, the browser does not + // support the File API and we add a pseudo File object with + // the input value as name with path information removed: + files = [{name: value.replace(/^.*\\/, '')}]; + } + return files; + }, + + _onChange: function (e) { + var that = e.data.fileupload, + data = { + fileInput: $(e.target), + form: $(e.target.form) + }; + data.files = that._getFileInputFiles(data.fileInput); + if (that.options.replaceFileInput) { + that._replaceFileInput(data.fileInput); + } + if (that._trigger('change', e, data) === false || + that._onAdd(e, data) === false) { + return false; + } + }, + + _onPaste: function (e) { + var that = e.data.fileupload, + cbd = e.originalEvent.clipboardData, + items = (cbd && cbd.items) || [], + data = {files: []}; + $.each(items, function (index, item) { + var file = item.getAsFile && item.getAsFile(); + if (file) { + data.files.push(file); + } + }); + if (that._trigger('paste', e, data) === false || + that._onAdd(e, data) === false) { + return false; + } + }, + + _onDrop: function (e) { + var that = e.data.fileupload, + dataTransfer = e.dataTransfer = e.originalEvent.dataTransfer, + data = { + files: $.each( + $.makeArray(dataTransfer && dataTransfer.files), + that._normalizeFile + ) + }; + if (that._trigger('drop', e, data) === false || + that._onAdd(e, data) === false) { + return false; + } + e.preventDefault(); + }, + + _onDragOver: function (e) { + var that = e.data.fileupload, + dataTransfer = e.dataTransfer = e.originalEvent.dataTransfer; + if (that._trigger('dragover', e) === false) { + return false; + } + if (dataTransfer) { + dataTransfer.dropEffect = 'copy'; + } + e.preventDefault(); + }, + + _initEventHandlers: function () { + var ns = this.options.namespace; + if (this._isXHRUpload(this.options)) { + this.options.dropZone + .bind('dragover.' + ns, {fileupload: this}, this._onDragOver) + .bind('drop.' + ns, {fileupload: this}, this._onDrop) + .bind('paste.' + ns, {fileupload: this}, this._onPaste); + } + this.options.fileInput + .bind('change.' + ns, {fileupload: this}, this._onChange); + }, + + _destroyEventHandlers: function () { + var ns = this.options.namespace; + this.options.dropZone + .unbind('dragover.' + ns, this._onDragOver) + .unbind('drop.' + ns, this._onDrop) + .unbind('paste.' + ns, this._onPaste); + this.options.fileInput + .unbind('change.' + ns, this._onChange); + }, + + _setOption: function (key, value) { + var refresh = $.inArray(key, this._refreshOptionsList) !== -1; + if (refresh) { + this._destroyEventHandlers(); + } + $.Widget.prototype._setOption.call(this, key, value); + if (refresh) { + this._initSpecialOptions(); + this._initEventHandlers(); + } + }, + + _initSpecialOptions: function () { + var options = this.options; + if (options.fileInput === undefined) { + options.fileInput = this.element.is('input:file') ? + this.element : this.element.find('input:file'); + } else if (!(options.fileInput instanceof $)) { + options.fileInput = $(options.fileInput); + } + if (!(options.dropZone instanceof $)) { + options.dropZone = $(options.dropZone); + } + }, + + _create: function () { + var options = this.options; + // Initialize options set via HTML5 data-attributes: + $.extend(options, $(this.element[0].cloneNode(false)).data()); + options.namespace = options.namespace || this.widgetName; + this._initSpecialOptions(); + this._slots = []; + this._sequence = this._getXHRPromise(true); + this._sending = this._active = this._loaded = this._total = 0; + this._initEventHandlers(); + }, + + destroy: function () { + this._destroyEventHandlers(); + $.Widget.prototype.destroy.call(this); + }, + + enable: function () { + $.Widget.prototype.enable.call(this); + this._initEventHandlers(); + }, + + disable: function () { + this._destroyEventHandlers(); + $.Widget.prototype.disable.call(this); + }, + + // This method is exposed to the widget API and allows adding files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('add', {files: filesList}); + add: function (data) { + if (!data || this.options.disabled) { + return; + } + if (data.fileInput && !data.files) { + data.files = this._getFileInputFiles(data.fileInput); + } else { + data.files = $.each($.makeArray(data.files), this._normalizeFile); + } + this._onAdd(null, data); + }, + + // This method is exposed to the widget API and allows sending files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('send', {files: filesList}); + // The method returns a Promise object for the file upload call. + send: function (data) { + if (data && !this.options.disabled) { + if (data.fileInput && !data.files) { + data.files = this._getFileInputFiles(data.fileInput); + } else { + data.files = $.each($.makeArray(data.files), this._normalizeFile); + } + if (data.files.length) { + return this._onSend(null, data); + } + } + return this._getXHRPromise(false, data && data.context); + } + + }); + +})); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.iframe-transport.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.iframe-transport.js new file mode 100644 index 00000000..4749f469 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/jquery.iframe-transport.js @@ -0,0 +1,172 @@ +/* + * jQuery Iframe Transport Plugin 1.5 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint unparam: true, nomen: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Helper variable to create unique names for the transport iframes: + var counter = 0; + + // The iframe transport accepts three additional options: + // options.fileInput: a jQuery collection of file input fields + // options.paramName: the parameter name for the file form data, + // overrides the name property of the file input field(s), + // can be a string or an array of strings. + // options.formData: an array of objects with name and value properties, + // equivalent to the return data of .serializeArray(), e.g.: + // [{name: 'a', value: 1}, {name: 'b', value: 2}] + $.ajaxTransport('iframe', function (options) { + if (options.async && (options.type === 'POST' || options.type === 'GET')) { + var form, + iframe; + return { + send: function (_, completeCallback) { + form = $('
    '); + form.attr('accept-charset', options.formAcceptCharset); + // javascript:false as initial iframe src + // prevents warning popups on HTTPS in IE6. + // IE versions below IE8 cannot set the name property of + // elements that have already been added to the DOM, + // so we set the name along with the iframe HTML markup: + iframe = $( + '' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + form.remove(); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + $(input).prop('name', clone.prop('name')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', 'javascript'.concat(':false;')); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, and script: + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return $.parseJSON($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return $(iframe[0].body).html(); + }, + 'iframe script': function (iframe) { + return $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/locale.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/locale.js new file mode 100644 index 00000000..ea64b0a8 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/locale.js @@ -0,0 +1,29 @@ +/* + * jQuery File Upload Plugin Localization Example 6.5.1 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*global window */ + +window.locale = { + "fileupload": { + "errors": { + "maxFileSize": "File is too big", + "minFileSize": "File is too small", + "acceptFileTypes": "Filetype not allowed", + "maxNumberOfFiles": "Max number of files exceeded", + "uploadedBytes": "Uploaded bytes exceed file size", + "emptyResult": "Empty file upload result" + }, + "error": "Error", + "start": "Start", + "cancel": "Cancel", + "destroy": "Delete" + } +}; diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/main.js b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/main.js new file mode 100644 index 00000000..01c86feb --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/js/main.js @@ -0,0 +1,78 @@ +/* + * jQuery File Upload Plugin JS Example 6.7 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global $, window, document */ + +$(function () { + 'use strict'; + + // Initialize the jQuery File Upload widget: + $('#fileupload').fileupload(); + + // Enable iframe cross-domain access via redirect option: + $('#fileupload').fileupload( + 'option', + 'redirect', + window.location.href.replace( + /\/[^\/]*$/, + '/cors/result.html?%s' + ) + ); + + if (window.location.hostname === 'blueimp.github.com') { + // Demo settings: + $('#fileupload').fileupload('option', { + url: '//jquery-file-upload.appspot.com/', + maxFileSize: 5000000, + acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, + process: [ + { + action: 'load', + fileTypes: /^image\/(gif|jpeg|png)$/, + maxFileSize: 20000000 // 20MB + }, + { + action: 'resize', + maxWidth: 1440, + maxHeight: 900 + }, + { + action: 'save' + } + ] + }); + // Upload server status check for browsers with CORS support: + if ($.support.cors) { + $.ajax({ + url: '//jquery-file-upload.appspot.com/', + type: 'HEAD' + }).fail(function () { + $('') + .text('Upload server currently unavailable - ' + + new Date()) + .appendTo('#fileupload'); + }); + } + } else { + // Load existing files: + $('#fileupload').each(function () { + var that = this; + $.getJSON(this.action, function (result) { + if (result && result.length) { + $(that).fileupload('option', 'done') + .call(that, null, {result: result}); + } + }); + }); + } + +}); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb new file mode 100644 index 00000000..dcdaf843 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb @@ -0,0 +1,9 @@ + +<%= flash_messages %> +

    <%= t('archive_file.new_archive') %>

    +<%= form_for @archive_file, :url => panel_archive_back_end_archive_files_path, :html => {:class => 'clear'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + +<%#= link_back %> + diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/show.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/show.html.erb new file mode 100644 index 00000000..f02d9156 --- /dev/null +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/show.html.erb @@ -0,0 +1,57 @@ +<% # encoding: utf-8 %> + +
    +
    +
    + +

    <%= flash_messages %>

    + + -
    -
    - <%= render 'filter_status' %> -
    -
    - <%= render 'filter_categories' %> -
    -
    - <%= render 'filter_tags' %> -
    -
    - <%= render 'sort_headers' %>
    diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb index d8d49a9e..81d59734 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb @@ -1,6 +1,6 @@
    <% @news_bulletin_categories.each do |category| -%> - <%= link_to category.title, panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('categories', category.id)}" %> + <%= link_to category.title, panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('categories', category.id)}" %> <% end -%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'categories'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb index ec94f1a6..40d4f002 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb @@ -1,9 +1,9 @@
    - <%= link_to t(:top), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_top')}" %> - <%= link_to t('news_bulletin.hot'), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %> - <%= link_to t(:hidden), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hidden')}" %> - <%= link_to t(:pending), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" %> - <%= link_to t(:passed), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" %> - <%= link_to t(:rejected), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" %> + <%= link_to t(:top), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_top')}" %> + <%= link_to t(:hot), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hot')}" %> + <%= link_to t(:hidden), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hidden')}" unless(is_guest?)%> + <%= link_to t(:pending), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_pending')}" if(is_manager?) %> + <%= link_to t(:passed), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_checked')}" if(is_manager?)%> + <%= link_to t(:rejected), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_rejected')}" if(is_manager?)%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'status'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_tags.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_tags.html.erb index 3fe385c5..2579ef38 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_tags.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_tags.html.erb @@ -1,6 +1,6 @@
    <% @tags.each do |tag| -%> - <%= link_to tag[I18n.locale], panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('tags', tag.id)}" %> + <%= link_to tag[I18n.locale], panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %> <% end -%>
    <%= render :partial => 'clear_filters', :locals => {:type => 'tags'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb index fe478387..bd9bddfd 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb @@ -1,6 +1,6 @@ - <% if (news_bulletin.create_user_id == current_user.id) || is_manager? %> + <% if (news_bulletin.create_user_id == current_or_guest_user.id) || is_manager? %> <%= check_box_tag 'to_delete[]', news_bulletin.id, false, :class => "checkbox_in_list" %> <% end -%> @@ -32,9 +32,8 @@ <%= show_news_bulletin_title_at_index news_bulletin%>