ソースを参照

version 0.9.7.0 commit

Sean Vail 9 年 前
コミット
ea436de6f8
100 ファイル変更9747 行追加0 行削除
  1. 44 0
      .gitignore
  2. 7 0
      .jrubyrc
  3. 1 0
      .rspec
  4. 1 0
      .ruby-gemset
  5. 1 0
      .ruby-version
  6. 1816 0
      COPYING.txt
  7. 100 0
      Gemfile
  8. 253 0
      Gemfile.lock
  9. 116 0
      LIBRARIES.txt
  10. 187 0
      LICENSEHEADER.txt
  11. 198 0
      NOTICE.txt
  12. 261 0
      README.rdoc
  13. 7 0
      Rakefile
  14. BIN
      app/assets/images/chosen-sprite.png
  15. BIN
      app/assets/images/chosen-sprite@2x.png
  16. BIN
      app/assets/images/epri-e.png
  17. BIN
      app/assets/images/epri-e@2x.png
  18. BIN
      app/assets/images/epri-logo-mobile.jpg
  19. BIN
      app/assets/images/epri-logo.jpg
  20. 12 0
      app/assets/images/icon-snowflake.svg
  21. 27 0
      app/assets/images/icon-sun.svg
  22. BIN
      app/assets/images/icon_accounts.png
  23. BIN
      app/assets/images/icon_accounts@2x.png
  24. BIN
      app/assets/images/icon_events.png
  25. BIN
      app/assets/images/icon_events@2x.png
  26. 8 0
      app/assets/images/icon_pencil.svg
  27. BIN
      app/assets/images/icon_utility.png
  28. BIN
      app/assets/images/icon_utility@2x.png
  29. BIN
      app/assets/images/icon_vens.png
  30. BIN
      app/assets/images/icon_vens@2x.png
  31. BIN
      app/assets/images/icon_vtn.png
  32. BIN
      app/assets/images/icon_vtn@2x.png
  33. BIN
      app/assets/images/rails.png
  34. BIN
      app/assets/images/ven-config-reference.jpg
  35. 3 0
      app/assets/javascripts/accounts.js.coffee
  36. 27 0
      app/assets/javascripts/application.js
  37. 1239 0
      app/assets/javascripts/chosen.jquery.js
  38. 626 0
      app/assets/javascripts/color_picker.js
  39. 3 0
      app/assets/javascripts/create_reports.js.coffee
  40. 17 0
      app/assets/javascripts/dashboard.js
  41. 3 0
      app/assets/javascripts/data_export.js.coffee
  42. 2244 0
      app/assets/javascripts/datetimepicker.js
  43. 3 0
      app/assets/javascripts/emix_units.js.coffee
  44. 3 0
      app/assets/javascripts/event.js.coffee
  45. 56 0
      app/assets/javascripts/event_filter.js
  46. 3 0
      app/assets/javascripts/event_interface.js.coffee
  47. 179 0
      app/assets/javascripts/event_interval_data_graphs.js
  48. 3 0
      app/assets/javascripts/event_responses.js.coffee
  49. 41 0
      app/assets/javascripts/event_search.js
  50. 3 0
      app/assets/javascripts/event_signal_intervals.js.coffee
  51. 3 0
      app/assets/javascripts/event_signals.js.coffee
  52. 3 0
      app/assets/javascripts/eventfeed.js.coffee
  53. 3 0
      app/assets/javascripts/group.js.coffee
  54. 3 0
      app/assets/javascripts/holidays.js.coffee
  55. 208 0
      app/assets/javascripts/interval_data_graph.js
  56. 3 0
      app/assets/javascripts/market_contexts.js
  57. 3 0
      app/assets/javascripts/oadr20a.js.coffee
  58. 3 0
      app/assets/javascripts/oadr20b.js.coffee
  59. 26 0
      app/assets/javascripts/oadr_ujs.js
  60. 3 0
      app/assets/javascripts/opt_schedules.js.coffee
  61. 3 0
      app/assets/javascripts/report_request_configurations.js.coffee
  62. 25 0
      app/assets/javascripts/report_requests.js
  63. 3 0
      app/assets/javascripts/report_requests.js.coffee
  64. 3 0
      app/assets/javascripts/reports.js.coffee
  65. 3 0
      app/assets/javascripts/resource_types.js.coffee
  66. 3 0
      app/assets/javascripts/resources.js.coffee
  67. 3 0
      app/assets/javascripts/schedules.js.coffee
  68. 98 0
      app/assets/javascripts/scripts.js
  69. 3 0
      app/assets/javascripts/sessions.js.coffee
  70. 3 0
      app/assets/javascripts/static_pages.js.coffee
  71. 3 0
      app/assets/javascripts/targets.js.coffee
  72. 3 0
      app/assets/javascripts/test_case_prompt.js.coffee
  73. 65 0
      app/assets/javascripts/tou_schedule_months.js
  74. 19 0
      app/assets/javascripts/ve_ns.js.coffee
  75. 209 0
      app/assets/javascripts/ven_interval_data_graphs.js
  76. 20 0
      app/assets/javascripts/ven_live_connection_status_box.js
  77. 17 0
      app/assets/javascripts/vens.js
  78. 3 0
      app/assets/javascripts/vtn_parameters.js.coffee
  79. 15 0
      app/assets/stylesheets/_alerts.css.scss
  80. 164 0
      app/assets/stylesheets/_base.css.scss
  81. 62 0
      app/assets/stylesheets/_forms.css.scss
  82. 11 0
      app/assets/stylesheets/_mixins.css.scss
  83. 73 0
      app/assets/stylesheets/_navigation.css.scss
  84. 45 0
      app/assets/stylesheets/_tables.css.scss
  85. 17 0
      app/assets/stylesheets/_variables.css.scss
  86. 24 0
      app/assets/stylesheets/accounts.css.scss
  87. 39 0
      app/assets/stylesheets/application.css.scss
  88. 198 0
      app/assets/stylesheets/calendar.css.scss
  89. 39 0
      app/assets/stylesheets/cards.css.scss
  90. 420 0
      app/assets/stylesheets/chosen.css
  91. 150 0
      app/assets/stylesheets/color_picker.css.scss
  92. 8 0
      app/assets/stylesheets/create_reports.css.scss
  93. 183 0
      app/assets/stylesheets/custom.css.scss
  94. 13 0
      app/assets/stylesheets/dashboard.css.scss
  95. 3 0
      app/assets/stylesheets/data_export.css.scss
  96. 38 0
      app/assets/stylesheets/datetimepicker.css.scss
  97. 3 0
      app/assets/stylesheets/emix_units.css.scss
  98. 3 0
      app/assets/stylesheets/event_responses.css.scss
  99. 3 0
      app/assets/stylesheets/event_signal_intervals.css.scss
  100. 0 0
      app/assets/stylesheets/event_signals.css.scss

+ 44 - 0
.gitignore

@@ -0,0 +1,44 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+#   git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+/config/database.yml
+/config/torquebox.yml
+/config/initializers/secret_token.rb
+
+# Ignore all logfiles and tempfiles.
+/log/*
+/tmp
+
+doc/
+*.swp
+*~
+.project
+.DS_Store
+.idea
+oadr.sublime-workspace
+oadr.war
+public/assets/*
+**.zip
+out
+oadr.iml
+.sass-cache
+*.knob*
+.powenv
+config/tls/*.jks
+config/tls/*.pem
+config/secrets.yml
+
+coverage
+
+# Ignore API script files
+lib/api/*
+lib/schema/*
+

+ 7 - 0
.jrubyrc

@@ -0,0 +1,7 @@
+# Set compilation mode. JIT = at runtime; FORCE = before execution.
+# Options: [JIT, FORCE, OFF, OFFIR], Default: JIT.
+compile.mode=OFF
+
+# Use invokedynamic to bind FFI invocations.
+# Options: [true, false], Default: false.
+ffi.compile.invokedynamic=false

+ 1 - 0
.rspec

@@ -0,0 +1 @@
+--colour

+ 1 - 0
.ruby-gemset

@@ -0,0 +1 @@
+oadr

+ 1 - 0
.ruby-version

@@ -0,0 +1 @@
+jruby-1.7.10

ファイルの差分が大きいため隠しています
+ 1816 - 0
COPYING.txt


+ 100 - 0
Gemfile

@@ -0,0 +1,100 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.12'
+
+gem 'bcrypt-ruby', '3.0.1'
+
+gem 'warbler', '1.4.0.beta1'
+
+# gem 'httpclient', '~> 2.2.2'
+
+gem 'httpclient', '~> 2.3.4.1'
+
+gem 'json-schema'
+
+group :development do
+  gem 'torquebox', '~> 3.0.2'
+  gem 'torquebox-server', '~> 3.0.2'
+
+  gem 'annotate', '2.5.0'
+
+end
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'activerecord-jdbcpostgresql-adapter', '~> 1.2.9'
+gem 'jdbc-postgresql', '9.2.1000'
+
+
+# gem 'jruby-openssl'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'bourbon'
+  gem 'sass-rails',   '~> 3.2.3'
+  gem 'coffee-rails', '~> 3.2.1'
+
+  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+  gem 'therubyrhino', '2.0.2'
+
+  gem 'uglifier', '>= 1.0.3'
+  gem 'bootstrap-sass'
+end
+
+group :test do
+  gem 'capybara'
+end
+
+group :development, :test do
+  gem 'rspec-rails', '~> 2.14.0'
+  gem 'factory_girl_rails'
+  gem 'database_cleaner'
+  gem 'spork-testunit'
+  gem 'spork', '~> 1.0rc'
+  gem 'test-unit'
+  gem 'gem-licenses'
+
+  gem 'simplecov', '~> 0.9.0'
+  gem 'mocha', '~> 1.1.0'
+
+  # Theine pre-loads the Rails environment, to lower perceived environment load time
+  # gem 'theine'
+
+end
+
+# gem 'jquery-rails', '2.2.1'
+gem 'jquery-rails', '3.0.4'
+gem 'jquery-ui-rails', '4.0.3'
+
+gem 'time_difference'
+
+# Load local gems based on their existence in a known local directory
+local_gems_directory = File.dirname(__FILE__) + '/../local_oadr_gems/' # Set to empty string ('') if not replacing with valid directory
+
+if File.directory?(local_gems_directory)
+  gem_paths = Dir[local_gems_directory + '*']
+  gem_paths.each do |gem_path|
+    gem_name = File.basename(gem_path)
+    gem gem_name, path: gem_path
+  end
+end
+
+# gem 'event_interface-cea2045', path: '../oadr_gems/epri/event_interface-cea2045'
+# gem 'event_interface-der', path: '../oadr_gems/epri/event_interface-der'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'debugger'

+ 253 - 0
Gemfile.lock

@@ -0,0 +1,253 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    actionmailer (3.2.12)
+      actionpack (= 3.2.12)
+      mail (~> 2.4.4)
+    actionpack (3.2.12)
+      activemodel (= 3.2.12)
+      activesupport (= 3.2.12)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      journey (~> 1.0.4)
+      rack (~> 1.4.5)
+      rack-cache (~> 1.2)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.2.1)
+    activemodel (3.2.12)
+      activesupport (= 3.2.12)
+      builder (~> 3.0.0)
+    activerecord (3.2.12)
+      activemodel (= 3.2.12)
+      activesupport (= 3.2.12)
+      arel (~> 3.0.2)
+      tzinfo (~> 0.3.29)
+    activerecord-jdbc-adapter (1.2.9.1)
+    activerecord-jdbcpostgresql-adapter (1.2.9)
+      activerecord-jdbc-adapter (~> 1.2.9)
+      jdbc-postgres (>= 9.1, < 9.3)
+    activeresource (3.2.12)
+      activemodel (= 3.2.12)
+      activesupport (= 3.2.12)
+    activesupport (3.2.12)
+      i18n (~> 0.6)
+      multi_json (~> 1.0)
+    addressable (2.3.8)
+    annotate (2.5.0)
+      rake
+    arel (3.0.2)
+    bcrypt-ruby (3.0.1-java)
+    blankslate (2.1.2.4)
+    bootstrap-sass (3.1.1.0)
+      sass (~> 3.2)
+    bourbon (3.1.8)
+      sass (>= 3.2.0)
+      thor
+    builder (3.0.4)
+    capybara (2.4.4)
+      mime-types (>= 1.16)
+      nokogiri (>= 1.3.3)
+      rack (>= 1.0.0)
+      rack-test (>= 0.5.4)
+      xpath (~> 2.0)
+    coffee-rails (3.2.2)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.2.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.6.3)
+    database_cleaner (1.4.0)
+    diff-lcs (1.2.4)
+    docile (1.1.5)
+    edn (1.0.0)
+      parslet (~> 1.4.0)
+    erubis (2.7.0)
+    execjs (1.4.0)
+      multi_json (~> 1.0)
+    factory_girl (4.5.0)
+      activesupport (>= 3.0.0)
+    factory_girl_rails (4.5.0)
+      factory_girl (~> 4.5.0)
+      railties (>= 3.0.0)
+    gem-licenses (0.1.2)
+    hike (1.2.3)
+    httpclient (2.3.4.1)
+    i18n (0.6.5)
+    jdbc-postgres (9.2.1004)
+    jdbc-postgresql (9.2.1000)
+    journey (1.0.4)
+    jquery-rails (3.0.4)
+      railties (>= 3.0, < 5.0)
+      thor (>= 0.14, < 2.0)
+    jquery-ui-rails (4.0.3)
+      jquery-rails
+      railties (>= 3.1.0)
+    jruby-jars (1.7.4)
+    jruby-rack (1.1.13.2)
+    json (1.8.0-java)
+    json-schema (2.6.2)
+      addressable (~> 2.3.8)
+    mail (2.4.4)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    metaclass (0.0.4)
+    mime-types (1.23)
+    mocha (1.1.0)
+      metaclass (~> 0.0.1)
+    multi_json (1.7.9)
+    nokogiri (1.6.5-java)
+    parslet (1.4.0)
+      blankslate (~> 2.0)
+    polyglot (0.3.3)
+    rack (1.4.5)
+    rack-cache (1.2)
+      rack (>= 0.4)
+    rack-ssl (1.3.3)
+      rack
+    rack-test (0.6.2)
+      rack (>= 1.0)
+    rails (3.2.12)
+      actionmailer (= 3.2.12)
+      actionpack (= 3.2.12)
+      activerecord (= 3.2.12)
+      activeresource (= 3.2.12)
+      activesupport (= 3.2.12)
+      bundler (~> 1.0)
+      railties (= 3.2.12)
+    railties (3.2.12)
+      actionpack (= 3.2.12)
+      activesupport (= 3.2.12)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (>= 0.14.6, < 2.0)
+    rake (10.1.0)
+    rdoc (3.12.2)
+      json (~> 1.4)
+    rspec-core (2.14.3)
+    rspec-expectations (2.14.0)
+      diff-lcs (>= 1.1.3, < 2.0)
+    rspec-mocks (2.14.1)
+    rspec-rails (2.14.0)
+      actionpack (>= 3.0)
+      activesupport (>= 3.0)
+      railties (>= 3.0)
+      rspec-core (~> 2.14.0)
+      rspec-expectations (~> 2.14.0)
+      rspec-mocks (~> 2.14.0)
+    rubyzip (0.9.9)
+    sass (3.2.9)
+    sass-rails (3.2.6)
+      railties (~> 3.2.0)
+      sass (>= 3.1.10)
+      tilt (~> 1.3)
+    simplecov (0.9.0)
+      docile (~> 1.1.0)
+      multi_json
+      simplecov-html (~> 0.8.0)
+    simplecov-html (0.8.0)
+    spork (1.0.0rc3)
+    spork-testunit (0.0.8)
+      spork (>= 0.6.0)
+    sprockets (2.2.2)
+      hike (~> 1.2)
+      multi_json (~> 1.0)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    test-unit (2.5.5)
+    therubyrhino (2.0.2)
+      therubyrhino_jar (>= 1.7.3)
+    therubyrhino_jar (1.7.4)
+    thor (0.18.1)
+    tilt (1.4.1)
+    time_difference (0.4.2)
+      activesupport
+    torquebox (3.0.2)
+      thor (>= 0.14.6)
+      torquebox-cache (= 3.0.2)
+      torquebox-configure (= 3.0.2)
+      torquebox-core (= 3.0.2)
+      torquebox-messaging (= 3.0.2)
+      torquebox-naming (= 3.0.2)
+      torquebox-rake-support (= 3.0.2)
+      torquebox-security (= 3.0.2)
+      torquebox-stomp (= 3.0.2)
+      torquebox-transactions (= 3.0.2)
+      torquebox-web (= 3.0.2)
+    torquebox-cache (3.0.2-java)
+      torquebox-core (= 3.0.2)
+      torquebox-transactions (= 3.0.2)
+    torquebox-configure (3.0.2-java)
+      blankslate (= 2.1.2.4)
+    torquebox-core (3.0.2-java)
+      edn (= 1.0.0)
+    torquebox-messaging (3.0.2-java)
+      torquebox-core (= 3.0.2)
+      torquebox-transactions (= 3.0.2)
+    torquebox-naming (3.0.2-java)
+      torquebox-core (= 3.0.2)
+    torquebox-rake-support (3.0.2)
+      rake (>= 0.8.7)
+    torquebox-security (3.0.2-java)
+      torquebox-core (= 3.0.2)
+    torquebox-server (3.0.2-java)
+      torquebox (= 3.0.2)
+    torquebox-stomp (3.0.2)
+      torquebox-core (= 3.0.2)
+      torquebox-messaging (= 3.0.2)
+    torquebox-transactions (3.0.2)
+      torquebox-core (= 3.0.2)
+    torquebox-web (3.0.2-java)
+    treetop (1.4.14)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.37)
+    uglifier (2.1.2)
+      execjs (>= 0.3.0)
+      multi_json (~> 1.0, >= 1.0.2)
+    warbler (1.4.0.beta1)
+      jruby-jars (>= 1.5.6)
+      jruby-rack (>= 1.0.0)
+      rake (>= 0.9.6)
+      rubyzip (~> 0.9)
+    xpath (2.0.0)
+      nokogiri (~> 1.3)
+
+PLATFORMS
+  java
+
+DEPENDENCIES
+  activerecord-jdbcpostgresql-adapter (~> 1.2.9)
+  annotate (= 2.5.0)
+  bcrypt-ruby (= 3.0.1)
+  bootstrap-sass
+  bourbon
+  capybara
+  coffee-rails (~> 3.2.1)
+  database_cleaner
+  factory_girl_rails
+  gem-licenses
+  httpclient (~> 2.3.4.1)
+  jdbc-postgresql (= 9.2.1000)
+  jquery-rails (= 3.0.4)
+  jquery-ui-rails (= 4.0.3)
+  json-schema
+  mocha (~> 1.1.0)
+  rails (= 3.2.12)
+  rspec-rails (~> 2.14.0)
+  sass-rails (~> 3.2.3)
+  simplecov (~> 0.9.0)
+  spork (~> 1.0rc)
+  spork-testunit
+  test-unit
+  therubyrhino (= 2.0.2)
+  time_difference
+  torquebox (~> 3.0.2)
+  torquebox-server (~> 3.0.2)
+  uglifier (>= 1.0.3)
+  warbler (= 1.4.0.beta1)
+
+BUNDLED WITH
+   1.12.5

+ 116 - 0
LIBRARIES.txt

@@ -0,0 +1,116 @@
+Mit
+* actionmailer 3.2.12 (http://www.rubyonrails.org) - Email composition, delivery, and receiving framework (part of Rails).
+* actionpack 3.2.12 (http://www.rubyonrails.org) - Web-flow and rendering framework putting the VC in MVC (part of Rails).
+* activemodel 3.2.12 (http://www.rubyonrails.org) - A toolkit for building modeling frameworks (part of Rails).
+* activerecord 3.2.12 (http://www.rubyonrails.org) - Object-relational mapper framework (part of Rails).
+* activeresource 3.2.12 (http://www.rubyonrails.org) - REST modeling framework (part of Rails).
+* activesupport 3.2.12 (http://www.rubyonrails.org) - A toolkit of support libraries and Ruby core extensions extracted from the Rails framework.
+* arel 3.0.2 (http://github.com/rails/arel) - Arel is a SQL AST manager for Ruby
+* bootstrap-sass 3.1.1.0 (https://github.com/twbs/bootstrap-sass) - Twitter's Bootstrap, converted to Sass and ready to drop into Rails or Compass
+* builder 3.0.4 (http://onestepback.org) - Builders for MarkUp.
+* bundler 1.12.5 (http://bundler.io) - The best way to manage your application's dependencies
+* capybara 2.4.4 (http://github.com/jnicklas/capybara) - Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb
+* coffee-rails 3.2.2 () - Coffee Script adapter for the Rails asset pipeline.
+* coffee-script-source 1.6.3 (http://jashkenas.github.com/coffee-script/) - The CoffeeScript Compiler
+* docile 1.1.5 (https://ms-ati.github.io/docile/) - Docile keeps your Ruby DSLs tame and well-behaved
+* edn 1.0.0 () - 'edn implements a reader for Extensible Data Notation by Rich Hickey.'
+* erubis 2.7.0 (http://www.kuwata-lab.com/erubis/) - a fast and extensible eRuby implementation which supports multi-language
+* execjs 1.4.0 (https://github.com/sstephenson/execjs) - Run JavaScript code from Ruby
+* factory_girl 4.5.0 (https://github.com/thoughtbot/factory_girl) - factory_girl provides a framework and DSL for defining and using model instance factories.
+* factory_girl_rails 4.5.0 (http://github.com/thoughtbot/factory_girl_rails) - factory_girl_rails provides integration between factory_girl and rails 3
+* gem-licenses 0.1.2 (http://github.com/dblock/gem-licenses) - List all gem licenses.
+* hike 1.2.3 (http://github.com/sstephenson/hike) - Find files in a set of paths
+* i18n 0.6.5 (http://github.com/svenfuchs/i18n) - New wave Internationalization support for Ruby
+* jdbc-postgresql 9.2.1000 (https://github.com/rosenfeld/jdbc-postgresql) - PostgresSQL jdbc driver for JRuby
+* journey 1.0.4 (http://github.com/rails/journey) - Journey is a router
+* jquery-rails 3.0.4 (http://rubygems.org/gems/jquery-rails) - Use jQuery with Rails 3
+* json-schema 2.6.2 (http://github.com/ruby-json-schema/json-schema/tree/master) - Ruby JSON Schema Validator
+* mail 2.4.4 (http://github.com/mikel/mail) - Mail provides a nice Ruby DSL for making, sending and reading emails.
+* metaclass 0.0.4 (http://github.com/floehopper/metaclass) - Adds a metaclass method to all Ruby objects
+* mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+* mocha 1.1.0 (http://gofreerange.com/mocha/docs) - Mocking and stubbing library
+* multi_json 1.7.9 (http://github.com/intridea/multi_json) - A common interface to multiple JSON libraries.
+* nokogiri 1.6.5 (http://nokogiri.org) - Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
+* polyglot 0.3.3 (http://github.com/cjheath/polyglot) - Augment 'require' to load non-Ruby file types
+* rack-test 0.6.2 (http://github.com/brynary/rack-test) - Simple testing API built on Rack
+* railties 3.2.12 (http://www.rubyonrails.org) - Tools for creating, working with, and running Rails applications.
+* rake 10.1.0 (http://rake.rubyforge.org) - Ruby based make-like utility.
+* rspec-core 2.14.3 (http://github.com/rspec/rspec-core) - rspec-core-2.14.3
+* rspec-expectations 2.14.0 (http://github.com/rspec/rspec-expectations) - rspec-expectations-2.14.0
+* rspec-mocks 2.14.1 (http://github.com/rspec/rspec-mocks) - rspec-mocks-2.14.1
+* rspec-rails 2.14.0 (http://github.com/rspec/rspec-rails) - rspec-rails-2.14.0
+* sass 3.2.9 (http://sass-lang.com/) - A powerful but elegant CSS compiler that makes CSS fun again.
+* sass-rails 3.2.6 () - Sass adapter for the Rails asset pipeline.
+* simplecov 0.9.0 (http://github.com/colszowka/simplecov) - Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites
+* spork 1.0.0rc3 (http://github.com/sporkrb/spork) - spork
+* therubyrhino 2.0.2 (http://github.com/cowboyd/therubyrhino) - Embed the Rhino JavaScript interpreter into JRuby
+* thor 0.18.1 (http://whatisthor.com/) - A scripting framework that replaces rake, sake and rubigen
+* tilt 1.4.1 (http://github.com/rtomayko/tilt/) - Generic interface to multiple Ruby template engines
+* treetop 1.4.14 (https://github.com/cjheath/treetop) - A Ruby-based text parsing and interpretation DSL
+* uglifier 2.1.2 (http://github.com/lautis/uglifier) - Ruby wrapper for UglifyJS JavaScript compressor
+* xpath 2.0.0 (http://github.com/jnicklas/xpath) - Generate XPath expressions from Ruby
+* blankslate 2.1.2.4 (http://github.com/masover/blankslate) - BlankSlate extracted from Builder.
+* bourbon 3.1.8 (https://github.com/thoughtbot/bourbon) - Bourbon Sass Mixins using SCSS syntax.
+* coffee-script 2.2.0 (http://github.com/josh/ruby-coffee-script) - Ruby CoffeeScript Compiler
+* diff-lcs 1.2.4 (http://diff-lcs.rubyforge.org/) - Diff::LCS computes the difference between two Enumerable sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm
+* jquery-ui-rails 4.0.3 (https://github.com/joliss/jquery-ui-rails) - jQuery UI packaged for the Rails asset pipeline
+* parslet 1.4.0 (http://kschiess.github.com/parslet) - Parser construction library with great error reporting in Ruby.
+* rack 1.4.5 (http://rack.github.com/) - a modular Ruby webserver interface
+* rack-cache 1.2 (http://tomayko.com/src/rack-cache/) - HTTP Caching for Rack
+* rack-ssl 1.3.3 (https://github.com/josh/rack-ssl) - Force SSL/TLS in your app.
+* rails 3.2.12 (http://www.rubyonrails.org) - Full-stack web application framework.
+* simplecov-html 0.8.0 (https://github.com/colszowka/simplecov-html) - Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
+* tzinfo 0.3.37 (http://tzinfo.rubyforge.org/) - Daylight-savings aware timezone library
+* warbler 1.4.0.beta1 (http://caldersphere.rubyforge.org/warbler) - Warbler chirpily constructs .war files of your Rails applications.
+
+Artistic 2.0
+* mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+
+Gpl-2
+* mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+
+Bsd
+* activerecord-jdbc-adapter 1.2.9.1 (https://github.com/jruby/activerecord-jdbc-adapter) - JDBC adapter for ActiveRecord, for use within JRuby on Rails.
+* jdbc-postgres 9.2.1004 (https://github.com/jruby/activerecord-jdbc-adapter) - PostgreSQL JDBC driver for JRuby and PostgreSQL/ActiveRecord-JDBC (activerecord-jdbcpostgresql-adapter).
+
+Apache license 2.0
+* addressable 2.3.8 (https://github.com/sporkmonger/addressable) - URI Implementation
+* bcrypt-ruby 3.0.1 (http://bcrypt-ruby.rubyforge.org) - OpenBSD's bcrypt() password hashing algorithm.
+* database_cleaner 1.4.0 (http://github.com/bmabey/database_cleaner) - Strategies for cleaning databases.  Can be used to ensure a clean state for testing.
+* annotate 2.5.0 (http://github.com/ctran/annotate_models) - Annotates Rails Models, routes, fixtures, and others based on the database schema.
+* smack 3.3.1 (https://www.igniterealtime.org/projects/smack/) - XMPP library
+
+Ruby
+* json 1.8.0 (http://json-jruby.rubyforge.org/) - JSON implementation for JRuby
+* rubyzip 0.9.9 (http://github.com/aussiegeek/rubyzip) - rubyzip is a ruby module for reading and writing zip files
+* httpclient 2.3.4.1 (http://github.com/nahi/httpclient) - gives something like the functionality of libwww-perl (LWP) in Ruby
+
+Ruby's and psfl (lib/test/unit/diff.rb)
+* test-unit 2.5.5 (http://test-unit.rubyforge.org/) - test-unit - Improved version of Test::Unit bundled in Ruby 1.8.x.
+
+Public domain
+* torquebox 3.1.2 (http://torquebox.org/) - TorqueBox Gem
+* torquebox-cache 3.1.2 (http://torquebox.org/) - TorqueBox Cache Gem
+* torquebox-configure 3.1.2 (http://torquebox.org/) - TorqueBox Configure Gem
+* torquebox-core 3.1.2 (http://torquebox.org/) - TorqueBox Core Gem
+* torquebox-messaging 3.1.2 (http://torquebox.org/) - TorqueBox Messaging Client
+* torquebox-naming 3.1.2 (http://torquebox.org/) - TorqueBox Naming Client
+* torquebox-rake-support 3.1.2 (http://torquebox.org/) - TorqueBox Rake Support
+* torquebox-security 3.1.2 (http://torquebox.org/) - TorqueBox Security Gem
+* torquebox-server 3.1.2 (http://torquebox.org/) - TorqueBox Server Gem
+* torquebox-stomp 3.1.2 (http://torquebox.org/) - TorqueBox STOMP Support
+* torquebox-transactions 3.1.2 (http://torquebox.org/) - TorqueBox Transactions Gem
+* torquebox-web 3.1.2 (http://torquebox.org/) - TorqueBox Web Gem
+
+LGPL
+* jruby-1.7.4
+* jruby-jars 1.7.4 (http://github.com/jruby/jruby/tree/master/gem/jruby-jars) - The core JRuby code and the JRuby stdlib as jar
+* jruby-rack 1.1.13.2 (http://jruby.org) - Rack adapter for JRuby and Servlet Containers
+  ** JRuby is tri-licensed GPL, LGPL, and EPL.
+
+MPL
+* therubyrhino_jar 1.7.4 (http://github.com/cowboyd/therubyrhino) - Rhino's jars packed for therubyrhino
+
+Unknown
+* spork-testunit 0.0.8 (http://github.com/timcharper/spork-testunit) - spork-testunit
+* sprockets 2.2.2 (http://getsprockets.org/) - Rack-based asset packaging system

+ 187 - 0
LICENSEHEADER.txt

@@ -0,0 +1,187 @@
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#
+# Copyright (c) 2016, Electric Power Research Institute (EPRI)
+# All rights reserved.
+#
+# OpenADR ("this software") is licensed under BSD 3-Clause license.
+#
+# Redistribution and use in source and binary forms, with or without modification, 
+# are permitted provided that the following conditions are met:
+#
+#  * Redistributions of source code must retain the above copyright notice, this 
+#    list of conditions and the following disclaimer.
+#    
+#  * Redistributions in binary form must reproduce the above copyright notice, 
+#    this list of conditions and the following disclaimer in the documentation 
+#    and/or other materials provided with the distribution.
+#    
+#  * Neither the name of EPRI nor the names of its contributors may 
+#    be used to endorse or promote products derived from this software without 
+#    specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
+# OF SUCH DAMAGE.
+# 
+# This EPRI software incorporates work covered by the following copyright and permission
+# notices. You may not use these works except in compliance with their respective 
+# licenses, which are provided below.
+# 
+# These works are provided by the copyright holders and contributors "as is" and any express or
+# implied warranties, including, but not limited to, the implied warranties of merchantability
+# and fitness for a particular purpose are disclaimed.
+# 
+#########################################################################################
+# MIT Licensed Libraries
+#########################################################################################
+#
+# * actionmailer 3.2.12 (http://www.rubyonrails.org) - Email composition, delivery, and receiving framework (part of Rails).
+# * actionpack 3.2.12 (http://www.rubyonrails.org) - Web-flow and rendering framework putting the VC in MVC (part of Rails).
+# * activemodel 3.2.12 (http://www.rubyonrails.org) - A toolkit for building modeling frameworks (part of Rails).
+# * activerecord 3.2.12 (http://www.rubyonrails.org) - Object-relational mapper framework (part of Rails).
+# * activeresource 3.2.12 (http://www.rubyonrails.org) - REST modeling framework (part of Rails).
+# * activesupport 3.2.12 (http://www.rubyonrails.org) - A toolkit of support libraries and Ruby core extensions extracted from the Rails framework.
+# * arel 3.0.2 (http://github.com/rails/arel) - Arel is a SQL AST manager for Ruby
+# * bootstrap-sass 3.1.1.0 (https://github.com/twbs/bootstrap-sass) - Twitter's Bootstrap, converted to Sass and ready to drop into Rails or Compass
+# * builder 3.0.4 (http://onestepback.org) - Builders for MarkUp.
+# * bundler 1.12.5 (http://bundler.io) - The best way to manage your application's dependencies
+# * capybara 2.4.4 (http://github.com/jnicklas/capybara) - Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb
+# * coffee-rails 3.2.2 () - Coffee Script adapter for the Rails asset pipeline.
+# * coffee-script-source 1.6.3 (http://jashkenas.github.com/coffee-script/) - The CoffeeScript Compiler
+# * docile 1.1.5 (https://ms-ati.github.io/docile/) - Docile keeps your Ruby DSLs tame and well-behaved
+# * edn 1.0.0 () - 'edn implements a reader for Extensible Data Notation by Rich Hickey.'
+# * erubis 2.7.0 (http://www.kuwata-lab.com/erubis/) - a fast and extensible eRuby implementation which supports multi-language
+# * execjs 1.4.0 (https://github.com/sstephenson/execjs) - Run JavaScript code from Ruby
+# * factory_girl 4.5.0 (https://github.com/thoughtbot/factory_girl) - factory_girl provides a framework and DSL for defining and using model instance factories.
+# * factory_girl_rails 4.5.0 (http://github.com/thoughtbot/factory_girl_rails) - factory_girl_rails provides integration between factory_girl and rails 3
+# * gem-licenses 0.1.2 (http://github.com/dblock/gem-licenses) - List all gem licenses.
+# * hike 1.2.3 (http://github.com/sstephenson/hike) - Find files in a set of paths
+# * i18n 0.6.5 (http://github.com/svenfuchs/i18n) - New wave Internationalization support for Ruby
+# * jdbc-postgresql 9.2.1000 (https://github.com/rosenfeld/jdbc-postgresql) - PostgresSQL jdbc driver for JRuby
+# * journey 1.0.4 (http://github.com/rails/journey) - Journey is a router
+# * jquery-rails 3.0.4 (http://rubygems.org/gems/jquery-rails) - Use jQuery with Rails 3
+# * json-schema 2.6.2 (http://github.com/ruby-json-schema/json-schema/tree/master) - Ruby JSON Schema Validator
+# * mail 2.4.4 (http://github.com/mikel/mail) - Mail provides a nice Ruby DSL for making, sending and reading emails.
+# * metaclass 0.0.4 (http://github.com/floehopper/metaclass) - Adds a metaclass method to all Ruby objects
+# * mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+# * mocha 1.1.0 (http://gofreerange.com/mocha/docs) - Mocking and stubbing library
+# * multi_json 1.7.9 (http://github.com/intridea/multi_json) - A common interface to multiple JSON libraries.
+# * nokogiri 1.6.5 (http://nokogiri.org) - Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
+# * polyglot 0.3.3 (http://github.com/cjheath/polyglot) - Augment 'require' to load non-Ruby file types
+# * rack-test 0.6.2 (http://github.com/brynary/rack-test) - Simple testing API built on Rack
+# * railties 3.2.12 (http://www.rubyonrails.org) - Tools for creating, working with, and running Rails applications.
+# * rake 10.1.0 (http://rake.rubyforge.org) - Ruby based make-like utility.
+# * rspec-core 2.14.3 (http://github.com/rspec/rspec-core) - rspec-core-2.14.3
+# * rspec-expectations 2.14.0 (http://github.com/rspec/rspec-expectations) - rspec-expectations-2.14.0
+# * rspec-mocks 2.14.1 (http://github.com/rspec/rspec-mocks) - rspec-mocks-2.14.1
+# * rspec-rails 2.14.0 (http://github.com/rspec/rspec-rails) - rspec-rails-2.14.0
+# * sass 3.2.9 (http://sass-lang.com/) - A powerful but elegant CSS compiler that makes CSS fun again.
+# * sass-rails 3.2.6 () - Sass adapter for the Rails asset pipeline.
+# * simplecov 0.9.0 (http://github.com/colszowka/simplecov) - Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites
+# * spork 1.0.0rc3 (http://github.com/sporkrb/spork) - spork
+# * therubyrhino 2.0.2 (http://github.com/cowboyd/therubyrhino) - Embed the Rhino JavaScript interpreter into JRuby
+# * thor 0.18.1 (http://whatisthor.com/) - A scripting framework that replaces rake, sake and rubigen
+# * tilt 1.4.1 (http://github.com/rtomayko/tilt/) - Generic interface to multiple Ruby template engines
+# * treetop 1.4.14 (https://github.com/cjheath/treetop) - A Ruby-based text parsing and interpretation DSL
+# * uglifier 2.1.2 (http://github.com/lautis/uglifier) - Ruby wrapper for UglifyJS JavaScript compressor
+# * xpath 2.0.0 (http://github.com/jnicklas/xpath) - Generate XPath expressions from Ruby
+# * blankslate 2.1.2.4 (http://github.com/masover/blankslate) - BlankSlate extracted from Builder.
+# * bourbon 3.1.8 (https://github.com/thoughtbot/bourbon) - Bourbon Sass Mixins using SCSS syntax.
+# * coffee-script 2.2.0 (http://github.com/josh/ruby-coffee-script) - Ruby CoffeeScript Compiler
+# * diff-lcs 1.2.4 (http://diff-lcs.rubyforge.org/) - Diff::LCS computes the difference between two Enumerable sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm
+# * jquery-ui-rails 4.0.3 (https://github.com/joliss/jquery-ui-rails) - jQuery UI packaged for the Rails asset pipeline
+# * parslet 1.4.0 (http://kschiess.github.com/parslet) - Parser construction library with great error reporting in Ruby.
+# * rack 1.4.5 (http://rack.github.com/) - a modular Ruby webserver interface
+# * rack-cache 1.2 (http://tomayko.com/src/rack-cache/) - HTTP Caching for Rack
+# * rack-ssl 1.3.3 (https://github.com/josh/rack-ssl) - Force SSL/TLS in your app.
+# * rails 3.2.12 (http://www.rubyonrails.org) - Full-stack web application framework.
+# * simplecov-html 0.8.0 (https://github.com/colszowka/simplecov-html) - Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
+# * tzinfo 0.3.37 (http://tzinfo.rubyforge.org/) - Daylight-savings aware timezone library
+# * warbler 1.4.0.beta1 (http://caldersphere.rubyforge.org/warbler) - Warbler chirpily constructs .war files of your Rails applications.
+#
+#########################################################################################
+# BSD Licensed Libraries
+#########################################################################################
+#
+# * activerecord-jdbc-adapter 1.2.9.1 (https://github.com/jruby/activerecord-jdbc-adapter) - Copyright (c) 2006-2012 Nick Sieger <nick@nicksieger.com>, Copyright (c) 2006-2008 Ola Bini <ola.bini@gmail.com> 
+# * jdbc-postgres 9.2.1004 (https://github.com/jruby/activerecord-jdbc-adapter) - Copyright (c) 1997-2011, PostgreSQL Global Development Group
+# * d3js 3.5.16 (https://d3js.org/) Copyright (c) 2015 Mike Bostock
+#
+#########################################################################################
+# Ruby Licensed Libraries
+#########################################################################################
+#
+# * json 1.8.0 (http://json-jruby.rubyforge.org/) - JSON implementation for JRuby
+# * rubyzip 0.9.9 (http://github.com/aussiegeek/rubyzip) - rubyzip is a ruby module for reading and writing zip files
+# * httpclient 2.3.4.1 (http://github.com/nahi/httpclient) - gives something like the functionality of libwww-perl (LWP) in Ruby
+# * test-unit 2.5.5 (http://test-unit.rubyforge.org/) - test-unit - Improved version of Test::Unit bundled in Ruby 1.8.x.
+#
+#########################################################################################
+# Public domain - creative commons Licensed Libraries
+#########################################################################################
+# 
+# * torquebox 3.1.2 (http://torquebox.org/) - TorqueBox Gem
+# * torquebox-cache 3.1.2 (http://torquebox.org/) - TorqueBox Cache Gem
+# * torquebox-configure 3.1.2 (http://torquebox.org/) - TorqueBox Configure Gem
+# * torquebox-core 3.1.2 (http://torquebox.org/) - TorqueBox Core Gem
+# * torquebox-messaging 3.1.2 (http://torquebox.org/) - TorqueBox Messaging Client
+# * torquebox-naming 3.1.2 (http://torquebox.org/) - TorqueBox Naming Client
+# * torquebox-rake-support 3.1.2 (http://torquebox.org/) - TorqueBox Rake Support
+# * torquebox-security 3.1.2 (http://torquebox.org/) - TorqueBox Security Gem
+# * torquebox-server 3.1.2 (http://torquebox.org/) - TorqueBox Server Gem
+# * torquebox-stomp 3.1.2 (http://torquebox.org/) - TorqueBox STOMP Support
+# * torquebox-transactions 3.1.2 (http://torquebox.org/) - TorqueBox Transactions Gem
+# * torquebox-web 3.1.2 (http://torquebox.org/) - TorqueBox Web Gem
+#
+#########################################################################################
+# Apache Licensed Libraries
+#########################################################################################
+#
+# * addressable 2.3.8 (https://github.com/sporkmonger/addressable) - URI Implementation
+# * bcrypt-ruby 3.0.1 (http://bcrypt-ruby.rubyforge.org) - OpenBSD's bcrypt() password hashing algorithm.
+# * database_cleaner 1.4.0 (http://github.com/bmabey/database_cleaner) - Strategies for cleaning databases.  Can be used to ensure a clean state for testing.
+# * annotate 2.5.0 (http://github.com/ctran/annotate_models) - Annotates Rails Models, routes, fixtures, and others based on the database schema.
+# * nvd3 1.8.4 (http://nvd3.org/) Copeyright (c) 2014 Novus Partners - chart library based on d3js
+# * smack 3.3.1 (https://www.igniterealtime.org/projects/smack/) - XMPP library
+#
+#########################################################################################
+# LGPL
+#########################################################################################
+#
+# * jruby-1.7.4
+# * jruby-jars 1.7.4 (http://github.com/jruby/jruby/tree/master/gem/jruby-jars) - The core JRuby code and the JRuby stdlib as jar 
+# ** JRuby is tri-licensed GPL, LGPL, and EPL.
+#
+#########################################################################################
+# MPL Licensed Libraries
+#########################################################################################
+#
+# * therubyrhino_jar 1.7.4 (http://github.com/cowboyd/therubyrhino) - Rhino's jars packed for therubyrhino
+#
+#########################################################################################
+# Artistic 2.0
+# * mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+#
+#########################################################################################
+#
+#########################################################################################
+# GPL-2
+#########################################################################################
+# * mime-types 1.23 (http://mime-types.rubyforge.org/) - This library allows for the identification of a file's likely MIME content type
+#
+#########################################################################################
+# No License Given
+#########################################################################################
+#
+# * spork-testunit 0.0.8 (http://github.com/timcharper/spork-testunit) - spork-testunit
+# * sprockets 2.2.2 (http://getsprockets.org/) - Rack-based asset packaging system
+#
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+

+ 198 - 0
NOTICE.txt

@@ -0,0 +1,198 @@
+This project is an implementation of the OpenADR Vritual Top Node.  It is released 
+under the BSD 3-Clause License (see LICENSE.txt)
+
+########################################
+## SMACK
+########################################
+
+This project is distributed with the following library:
+  * Smack XMPP library: http://www.igniterealtime.org/projects/smack/
+  * version: 3.3.1
+
+Licensing information is availabe online here:
+  * http://www.igniterealtime.org/builds/smack/docs/latest/README.html
+  
+Smack is distributed under the Apache License, version 2:
+
+Use of thie Smack source code is governed by the Apache License:
+
+ Copyright 2002-2008 Jive Software.
+
+ All rights reserved. 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.
+ 
+ 
+The library jar file distributed with this software is version 3.3.1 and was built
+with Oracle's Java, version 1.7.0_05.
+ 
+########################################
+## JRurby: http://jruby.org/
+########################################
+
+This project relies on JRuby on rails.  JRuby is an implmentation of Ruby for the
+Java Virtual Machine.  JRuby is released under the GPL.  The license is available
+here:
+  * https://github.com/jruby/jruby/blob/master/LICENSE.RUBY
+  * version: 1.7.4
+
+########################################
+## Ruby: https://www.ruby-lang.org/en/
+########################################
+
+Ruby is not used direclty in this program, but mentioned here for reference.
+
+Ruby is released under the 2-clause BSDL license:
+  * https://www.ruby-lang.org/en/about/license.txt
+  * uses JRuby which implements ruby in java.  
+    JRuby 1.7.4 is Ruby 1.9.3p392 compliant
+   
+  
+########################################
+## JRuby on Rails
+########################################
+
+This project was built using JRuby on rails version 3.2.  Rails is released under
+the MIT License:
+  * http://opensource.org/licenses/mit-license.php
+  * version: 3.2.12
+
+########################################
+## Blueprint CSS: http://www.blueprintcss.org/
+########################################
+  
+Blueprint CSS is released under a modifed MIT license.  The license text can be
+found in:
+  public/blueprint/blueprint.license.txt
+  
+########################################
+## GEMs
+########################################
+
+The following gems were used to build this project:
+
+
+name:               bcrypt-ruby                      
+version:            3.0.1           
+licnense:           MIT
+copyright year:
+copyright owners:
+
+name:              warbler                          
+version:           1.4.0.beta1     
+licnese:           MIT
+copyright year:
+copyright owners:
+
+name:              httpclient                       
+version:           2.2.2           
+license:           RUBY (dual or 2003 version)
+copyright year:
+copyright owners:
+
+name:              annotate
+version:           2.5.0
+license:           RUBY
+copyright year:
+copyright owners:
+
+name:              torquebox
+version:           3.0.0
+license:           Public Domain
+copyright year:
+copyright owners:
+
+name:              jdbc-mysql
+version:           5.1.25
+license:           GPLv2
+copyright year:
+copyright owners:
+
+name:              activerecord-jdbcmysql-adapter
+version:           1.2.9
+linense:           see: activerecord-jdbcmysql-adapter-license.txt
+copyright year:
+copyright owners:
+
+name:              sass-rails
+version:           3.2.3
+license:           MIT
+copyright year:
+copyright owners:
+
+name:              coffee-rails
+version:           3.2.1
+license:           MIT
+copyright year:    
+copyright owners:
+
+name:              therubyrhino
+version:           2.0.2
+lincense:          MIT
+copyright year:
+copyright owners:
+
+name:             uglifier
+version:          1.0.3
+license:          MIT
+copyright year:
+copyright owners:
+
+name:             rspec
+version:          2.14.3
+license:          MIT
+copyright year:
+copyright owners: 
+
+name:             rspec-rails
+version:          2.14.0
+license:          MIT
+copyright year:
+copyright owners:
+
+name:             spork-testunit
+version:          0.0.8
+license:          (no license given)
+copyright year:
+copyright owners:
+
+name:             spork
+version:          1.0rc
+license:          MIT
+copyright year:
+copyright owners:
+
+name:             test-unit
+version:          2.5.5
+license:          RUBY
+copyright year:
+copyright owners:
+
+name:             rails-erd
+version:          1.1.0
+license:          http://rails-erd.rubyforge.org/doc/files/LICENSE.html
+copyright year:
+copyright owners:
+
+name:             jquery-rails
+version:          3.0.4
+license:          MIT
+copyright year:
+copyright owners:
+          
+name:            jquery-ui-rails                  
+version:         4.0.3
+license:         MIT
+copyright year:
+copyright owners:
+
+  
+

+ 261 - 0
README.rdoc

@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+       <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+       <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+       "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+  class WeblogController < ActionController::Base
+    def destroy
+      @weblog = Weblog.find(params[:id])
+      @weblog.destroy
+      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+    end
+  end
+
+The result will be a message in your log file along the lines of:
+
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+  class WeblogController < ActionController::Base
+    def index
+      @posts = Post.all
+      debugger
+    end
+  end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+  >> @posts.inspect
+  => "[#<Post:0x14a6be8
+          @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+       #<Post:0x14a6620
+          @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+  >> @posts.first.title = "hello from a debugger"
+  => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+  >> f = @posts.first
+  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+  >> f.
+  Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+  made to the database.
+* Passing an environment name as an argument will load the corresponding
+  environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+  |-- app
+  |   |-- assets
+  |       |-- images
+  |       |-- javascripts
+  |       `-- stylesheets
+  |   |-- controllers
+  |   |-- helpers
+  |   |-- mailers
+  |   |-- models
+  |   `-- views
+  |       `-- layouts
+  |-- config
+  |   |-- environments
+  |   |-- initializers
+  |   `-- locales
+  |-- db
+  |-- doc
+  |-- lib
+  |   `-- tasks
+  |-- log
+  |-- public
+  |-- script
+  |-- test
+  |   |-- fixtures
+  |   |-- functional
+  |   |-- integration
+  |   |-- performance
+  |   `-- unit
+  |-- tmp
+  |   |-- cache
+  |   |-- pids
+  |   |-- sessions
+  |   `-- sockets
+  `-- vendor
+      |-- assets
+          `-- stylesheets
+      `-- plugins
+
+app
+  Holds all the code that's specific to this particular application.
+
+app/assets
+  Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+  Holds controllers that should be named like weblogs_controller.rb for
+  automated URL mapping. All controllers should descend from
+  ApplicationController which itself descends from ActionController::Base.
+
+app/models
+  Holds models that should be named like post.rb. Models descend from
+  ActiveRecord::Base by default.
+
+app/views
+  Holds the template files for the view that should be named like
+  weblogs/index.html.erb for the WeblogsController#index action. All views use
+  eRuby syntax by default.
+
+app/views/layouts
+  Holds the template files for layouts to be used with views. This models the
+  common header/footer method of wrapping views. In your views, define a layout
+  using the <tt>layout :default</tt> and create a file named default.html.erb.
+  Inside default.html.erb, call <% yield %> to render the view using this
+  layout.
+
+app/helpers
+  Holds view helpers that should be named like weblogs_helper.rb. These are
+  generated for you automatically when using generators for controllers.
+  Helpers can be used to wrap functionality for your views into methods.
+
+config
+  Configuration files for the Rails environment, the routing map, the database,
+  and other dependencies.
+
+db
+  Contains the database schema in schema.rb. db/migrate contains all the
+  sequence of Migrations for your schema.
+
+doc
+  This directory is where your application documentation will be stored when
+  generated using <tt>rake doc:app</tt>
+
+lib
+  Application specific libraries. Basically, any kind of custom code that
+  doesn't belong under controllers, models, or helpers. This directory is in
+  the load path.
+
+public
+  The directory available for the web server. Also contains the dispatchers and the
+  default HTML files. This should be set as the DOCUMENT_ROOT of your web
+  server.
+
+script
+  Helper scripts for automation and generation.
+
+test
+  Unit and functional tests along with fixtures. When using the rails generate
+  command, template test files will be generated for you and placed in this
+  directory.
+
+vendor
+  External libraries that the application depends on. Also includes the plugins
+  subdirectory. If the app has frozen rails, those gems also go here, under
+  vendor/rails/. This directory is in the load path.

+ 7 - 0
Rakefile

@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Oadr::Application.load_tasks

BIN
app/assets/images/chosen-sprite.png


BIN
app/assets/images/chosen-sprite@2x.png


BIN
app/assets/images/epri-e.png


BIN
app/assets/images/epri-e@2x.png


BIN
app/assets/images/epri-logo-mobile.jpg


BIN
app/assets/images/epri-logo.jpg


ファイルの差分が大きいため隠しています
+ 12 - 0
app/assets/images/icon-snowflake.svg


+ 27 - 0
app/assets/images/icon-sun.svg

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
+    <!-- Generator: Sketch 3.2.2 (9983) - http://www.bohemiancoding.com/sketch -->
+    <title>Your_Icon</title>
+    <desc>Created with Sketch.</desc>
+    <defs></defs>
+    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
+        <g id="noun_17480" sketch:type="MSLayerGroup" transform="translate(-1.000000, -1.000000)">
+            <g id="Captions" transform="translate(1.000000, 1.000000)"></g>
+            <g id="Your_Icon" fill="#333333" sketch:type="MSShapeGroup">
+                <path d="M87.625,43.569 L97.52,31.58 L82.016,30.176 C84.776,34.285 86.67,38.818 87.625,43.569 L87.625,43.569 Z" id="Shape"></path>
+                <path d="M79.006,26.276 L81.578,10.932 L67.474,17.456 C71.828,19.592 75.732,22.568 79.006,26.276 L79.006,26.276 Z" id="Shape"></path>
+                <path d="M50.96,13.605 C52.557,13.605 54.178,13.709 55.774,13.91 C58.213,14.222 60.589,14.776 62.873,15.531 L57.436,0.998 L48.473,13.718 C49.299,13.661 50.121,13.605 50.96,13.605 L50.96,13.605 Z" id="Shape"></path>
+                <path d="M77.345,30.657 C71.912,23.62 64.065,19.126 55.249,17.986 C53.824,17.801 52.38,17.714 50.96,17.714 C34.293,17.714 20.121,30.193 17.994,46.747 C15.651,64.955 28.555,81.663 46.755,84.006 C48.18,84.191 49.624,84.287 51.048,84.287 C67.707,84.287 81.879,71.801 84.014,55.245 C85.146,46.427 82.778,37.695 77.345,30.657 L77.345,30.657 Z" id="Shape"></path>
+                <path d="M101.002,57.444 L88.314,48.505 C88.471,50.904 88.403,53.336 88.089,55.768 C87.769,58.231 87.202,60.598 86.437,62.877 L101.002,57.444 L101.002,57.444 Z" id="Shape"></path>
+                <path d="M43.562,14.367 L31.572,4.489 L30.172,20.009 C34.176,17.305 38.702,15.354 43.562,14.367 L43.562,14.367 Z" id="Shape"></path>
+                <path d="M75.74,79.007 L91.079,81.583 L84.535,67.443 C82.36,71.864 79.375,75.797 75.74,79.007 L75.74,79.007 Z" id="Shape"></path>
+                <path d="M51.048,88.396 C49.451,88.396 47.83,88.292 46.23,88.084 C43.766,87.771 41.395,87.209 39.124,86.446 L44.562,101.003 L53.529,88.276 C52.705,88.331 51.883,88.396 51.048,88.396 L51.048,88.396 Z" id="Shape"></path>
+                <path d="M26.26,22.994 L10.917,20.426 L17.461,34.566 C19.636,30.144 22.625,26.212 26.26,22.994 L26.26,22.994 Z" id="Shape"></path>
+                <path d="M58.438,87.633 L70.419,97.528 L71.831,81.993 C67.824,84.696 63.294,86.646 58.438,87.633 L58.438,87.633 Z" id="Shape"></path>
+                <path d="M23.006,75.7 L20.426,91.084 L34.558,84.544 C30.115,82.361 26.212,79.344 23.006,75.7 L23.006,75.7 Z" id="Shape"></path>
+                <path d="M14.388,58.415 L4.48,70.429 L20.024,71.841 C17.312,67.812 15.374,63.271 14.388,58.415 L14.388,58.415 Z" id="Shape"></path>
+                <path d="M13.918,46.226 C14.23,43.771 14.801,41.404 15.563,39.124 L0.999,44.564 L13.702,53.52 C13.541,51.129 13.597,48.689 13.918,46.226 L13.918,46.226 Z" id="Shape"></path>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
app/assets/images/icon_accounts.png


BIN
app/assets/images/icon_accounts@2x.png


BIN
app/assets/images/icon_events.png


BIN
app/assets/images/icon_events@2x.png


+ 8 - 0
app/assets/images/icon_pencil.svg

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="240px" height="240px" viewBox="0 0 240 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
+    <g id="pencil-icon" sketch:type="MSLayerGroup" transform="translate(109.000000, 129.000000) rotate(225.000000) translate(-109.000000, -129.000000) translate(73.000000, -24.000000)" fill="#333333">
+        <rect id="Rectangle-1" sketch:type="MSShapeGroup" x="0" y="81" width="72" height="180"></rect>
+        <polygon id="Triangle-1" sketch:type="MSShapeGroup" points="36 0 72 72 0 72 "></polygon>
+        <path d="M72,270 L72,293.996825 C72,300.625995 66.6177433,306 60.009604,306 L11.990396,306 C5.36828313,306 0,300.620315 0,293.996825 L0,270 L72,270 Z" id="Rectangle-2" sketch:type="MSShapeGroup"></path>
+    </g>
+</svg>

BIN
app/assets/images/icon_utility.png


BIN
app/assets/images/icon_utility@2x.png


BIN
app/assets/images/icon_vens.png


BIN
app/assets/images/icon_vens@2x.png


BIN
app/assets/images/icon_vtn.png


BIN
app/assets/images/icon_vtn@2x.png


BIN
app/assets/images/rails.png


BIN
app/assets/images/ven-config-reference.jpg


+ 3 - 0
app/assets/javascripts/accounts.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 27 - 0
app/assets/javascripts/application.js

@@ -0,0 +1,27 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require jquery.ui.slider
+//= require jquery.ui.datepicker
+//= require jquery.ui.tabs
+//= require jquery.ui.progressbar
+//= require bootstrap/modal
+//= require bootstrap/tab
+//= require scripts
+//= require chosen.jquery
+//= require color_picker
+//= require datetimepicker
+//= require d3
+//= require nv.d3
+

ファイルの差分が大きいため隠しています
+ 1239 - 0
app/assets/javascripts/chosen.jquery.js


+ 626 - 0
app/assets/javascripts/color_picker.js

@@ -0,0 +1,626 @@
+/**
+*
+* jQuery Color Picker Plugin
+* URL: http://www.codecanyon.net/user/bamdaa
+* Version: 2.0
+* Author: BamDaa
+* Author URL: http://www.codecanyon.net/user/bamdaa
+*
+*/
+
+if( typeof Object.create !== 'function'){
+	Object.create = function( obj ){
+		function F(){};
+		F.prototype = obj;
+		return new F();
+	};
+}
+
+(function( $, window, document, undefined ){
+	
+	var CPicker = {
+		init: function( options, elem ){
+			var self = this;
+			self.elem = elem;
+			self.$elem = $( elem );			
+			self.pickerState =  self.bodyState = [];
+
+			// Generate user and default settings.
+			self.options = self.setOptions( options );			
+
+			self.$elem.bind("click", function(evt){
+
+				evt.preventDefault();
+
+				if( self.pickerWindow ){
+					if( self.pickerWindow.attr("data-bmd-cp") == "closed" ){
+						self.showMe();
+						return true;
+					}
+					else{
+						self.hideMe();
+						return true;
+					}
+				}
+
+				if(typeof self.options.colors == "string")
+				{
+					
+					self.loadColors( self.options.colors ).done( function( data, status, jqXHR){
+
+						if( typeof data == 'object' )
+						{
+							self.options.colors = data;
+							self.build();
+							return true;
+						}
+
+					}).fail(function(jqXHR, status, errorThrown){
+
+						console.log( "FAIL! " + errorThrown );
+						self.build();
+						return false;
+
+					});
+				}
+				else{
+					self.build();
+				}	
+			});
+		},
+		
+		build: function(e){
+			var self = this;
+
+			self.colors = self.collectColors();
+
+			self.pickerWindow = $(self.template.div, {class: 'bmd-cp-window'})
+				.appendTo("body");
+
+			self.pickerContainer = $(self.template.div, {class: 'bmd-cp-container'})
+				.appendTo( self.pickerWindow );
+
+			self.itemContainer = $(self.template.itemContainer, {class: 'bmd-cp-item-container'})
+				.appendTo( self.pickerContainer );
+				
+			var itemRow;
+			$.each(self.colors, function(key, val){
+				
+				// How many colors in a row
+				if(key == 0 || (key)%self.options.rowitem == 0)
+				{
+					itemRow = $(self.template.itemRow, { class: 'bmd-cp-item-row' })
+						.appendTo( self.itemContainer );					
+				}
+
+				c_item = $( self.template.item );
+				c_item.css({
+						backgroundColor: val,
+						width: self.options.itemwidth,
+						height: self.options.itemheight
+					})
+					.attr("title", self.returnColor( val ))
+					.data("color", val)
+					.bind("click", function(e){
+
+						$this = $(this);
+						e.preventDefault();
+
+						self.options.onSelect(self.$elem, self.returnColor( $this.data("color") ));
+						self.hideMe();
+
+					});
+
+				c_item.appendTo( itemRow );
+			});
+
+			t = self.colors.length > self.options.rowitem
+				? self.colors.length % self.options.rowitem
+				: 0;
+
+			self.itemContainer.find('td:last').attr('colspan', t + 1);
+			self.buildControls();
+			self.putInsertForm();
+			self.showMe( true );
+		},
+
+		setOptions: function( options ){
+
+			var self = this;			
+			var	settings = [], dataSettings = [];
+
+			settings = $.extend( {}, $.fn.colorPicker.options, options );
+			dataSettings = self.$elem.data();
+			$.each(dataSettings, function(key, val){
+				
+				if(typeof val == 'string'){
+					var res = val.match(/^\[|\]$/g);
+					if( res !== null )
+						dataSettings[key] = eval( val );
+				}				
+
+			});
+			return $.extend( {}, settings, dataSettings );
+
+		},
+
+		loadColors: function( colorURL ){ return $.ajax({ dataType: "json", url: colorURL}); },
+
+		collectColors: function(){
+			
+			var self = this;
+			var colors = self.options.colors;
+
+			if( self.options.customcolors.length > 0)
+				colors = colors.concat( self.options.customcolors );
+
+			return colors;
+		},
+
+		setPosition: function(){
+
+			var self 	= this, target, picker;
+
+			target = self.getElementOffset( self.$elem );
+			picker = self.getElementOffset( self.pickerWindow );
+			wWidth = $(window).width();
+			switch( self.options.alignment.toLowerCase() )
+			{
+				case 'tl': 
+					left = target.l;
+					left = (parseInt(left + picker.w + self.btnClose.width()) >= wWidth) ? wWidth - picker.w - self.btnClose.width() - 5 : left;
+					self.pickerWindow.css({left: left, top: target.t - (picker.h + 2) });
+					break;
+				case 'tr':
+					left = (target.l + target.w) - picker.w;
+					left = (left <= 0)? 5 : left;
+
+					self.pickerWindow.css({left: left, top: target.t - (picker.h + 2) });
+					break;
+				case 'br':
+					left = (target.l + target.w) - picker.w;
+					left = (left <= 0)? 5 : left;
+
+					self.pickerWindow.css({left: left, top: target.t + target.h + 2 });
+					break;						
+				default:
+					left = target.l;
+					left = (parseInt(left + picker.w + self.btnClose.width()) >= wWidth) ? wWidth - picker.w - self.btnClose.width() : left;
+					self.pickerWindow.css({left: left, top: target.t + target.h + 2 });
+					break;
+			}
+		},
+
+		getControlPanel: function(){
+			var self = this;
+			if( ! self.controlContainer )
+				self.controlContainer = $(self.template.div, {class: 'bmd-cp-controls-container'})
+					.appendTo( self.pickerContainer );
+
+			return self.controlContainer;
+
+		},
+
+		putInsertForm: function(){
+
+			var self = this;
+
+			if( self.options.insertcode === true ){
+
+				inputLabel = $( self.template.button )
+					.addClass('bmd-cp-button-prefix')
+					.appendTo( self.getControlPanel() )
+					.bind('click', function(e){ 
+						e.preventDefault()	;
+						self.inputColor.focus();
+					});
+
+				self.inputColor = $(self.template.input)
+					.addClass('bmd-cp-insert-input')
+					.appendTo( self.getControlPanel() );
+
+				self.buttonColor = $(self.template.button)
+					.addClass('bmd-cp-button-accept')
+					.appendTo( self.getControlPanel() )
+					.bind("click", function( e ){
+
+						e.preventDefault();
+						code = self.inputColor.val();
+
+						if( ! self.isHexColor( code ) ){
+							self.inputColor.focus().select();
+							return false;
+						}
+
+						self.options.onSelect( self.$elem, self.returnColor( code ) );
+						self.hideMe();
+
+					});
+				
+			}
+		},		
+
+		buildControls: function(){
+
+			var self = this;
+
+			if( self.options.buttonclose === true )
+				self.getBtnClose();
+
+			if( self.options.buttonfullscreen === true && ! self.detectMobile() )
+				self.getBtnFullscreen();
+
+		},
+
+		getBtnClose: function (){
+
+			var self = this;			
+			if( ! self.btnClose )
+				self.btnClose = self.setButton('bmd-cp-button-close', 'Close', self.pickerContainer )
+					.bind('click', function(e){
+						e.preventDefault();
+						self.hideMe();
+					});
+
+			return self.btnClose;
+		},
+
+		getBtnFullscreen: function (){
+
+			var self = this;
+			if( ! self.btnFullscreen )
+				self.btnFullscreen = self.setButton('bmd-cp-button-fullscreen', 'Fullscreen', self.pickerContainer)
+					.bind('click', function(e){
+						e.preventDefault();
+						self.fullscreen();
+					});
+
+			if( ! self.btnClose )
+				self.btnFullscreen.css('top', 5);
+
+			return self.btnFullscreen;
+		},
+
+		setButton: function( css, title, container ){
+
+			var self = this;
+			return $( self.template.button )
+				.addClass(css + ' bmd-cp-controls')
+				.attr('title', title )
+				.appendTo( container );
+
+		},
+		
+		setFullscreen: function(){
+			var self = this;
+
+			self.pickerWindow.css({
+				width: 	$(window).width(),
+				height: $(window).height(),
+				top: 	$(window).scrollTop(),
+				left: 	0
+			});
+			
+			totalRows = parseInt(self.colors.length / self.options.rowitem);
+			cHeight   = self.pickerWindow.height() - 20;
+
+			o = self.getElementOffset( self.getControlPanel() );
+			cHeight -= o.h;
+			
+			// Inverting Color Pallete if need.
+			if( $(window).width() < $(window).height() )
+			{
+				if(!self.itemContainer.hasClass('inverted') )
+				{
+					self.itemContainer.addClass('inverted');
+					self.invertCells( self.itemContainer );	
+				}
+				
+				self.itemContainer.find('td').css('height', cHeight / self.options.rowitem );
+			}
+			else
+			{
+				if( self.itemContainer.hasClass('inverted') )
+				{
+					self.itemContainer.removeClass('inverted');
+					self.invertCells( self.itemContainer );	
+				}
+
+				self.itemContainer.find('td').css('height', cHeight / totalRows );
+			}
+
+		},
+
+		fullscreen: function(){
+
+			var self = this;
+
+			if( ! self.pickerWindow.hasClass('bmd-cp-fullscreen')){
+				self.pickerState = self.getElementOffset( self.pickerWindow );
+				self.pickerWindow.addClass('bmd-cp-fullscreen');
+			}
+
+			if( ! self.detectMobile() ){
+				self.getBtnFullscreen()
+					.removeClass('bmd-cp-controls')
+					.attr('title', 'Normal')
+					.appendTo( self.getControlPanel() )
+					.unbind('click')
+					.bind('click', function(){
+						self.minimize();
+					});
+			}
+			
+			self.getBtnClose()
+				.removeClass('bmd-cp-controls')
+				.appendTo( self.getControlPanel() );
+			
+			self.noScroll( true );
+			self.setFullscreen();
+			self.hideOnEsc();
+
+		},
+
+		minimize: function(){
+			
+			var self = this;
+
+			self.pickerWindow.css({
+				width: self.pickerState.w,
+				height: self.pickerState.h,
+				top: self.pickerState.t,
+				left: self.pickerState.l
+			}).removeClass('bmd-cp-fullscreen');
+			
+			self.getBtnFullscreen()
+				.addClass('bmd-cp-controls')
+				.appendTo( self.pickerContainer )
+				.bind('click', function( e ){
+					e.preventDefault();
+					self.fullscreen();
+				});
+			
+			if( self.options.buttonclose === false ){
+				self.getBtnClose().remove();
+				self.btnClose = false;
+			}
+			else{
+				self.getBtnClose()
+					.addClass('bmd-cp-controls')
+					.appendTo( self.pickerContainer );
+			}
+
+			if( self.itemContainer.hasClass('inverted') ){
+				self.itemContainer.removeClass('inverted');
+				self.invertCells( self.itemContainer );
+			}
+
+			self.itemContainer.find('td')
+				.height( self.options.itemheight )
+				.width( self.options.itemwidth );
+
+			self.noScroll();
+			$(document).unbind(".cpEvents");
+			$(window).unbind("scroll.cpEvents");
+
+		},
+
+		showMe: function( firstLoad ){
+
+			var self = this;			
+			
+			if( $(".bmd-cp-window[data-bmd-cp='open']").length ){
+				$(".bmd-cp-window").attr("data-bmd-cp", "closed").hide();
+				$(document).unbind('.cpEvents');
+				$(window).unbind('.cpEvents');
+			}
+
+			self.pickerWindow.attr("data-bmd-cp", "open");
+			self.pickerWindow.show();
+
+			if( firstLoad !== true && self.pickerWindow.hasClass("bmd-cp-fullscreen") )
+			{
+				self.noScroll( true );
+				self.setFullscreen();
+				self.hideOnEsc();
+			}
+			else
+			{
+				self.setPosition();
+			}
+
+			if(firstLoad === true && (self.detectMobile() || self.options.fullscreen === true) ){
+				self.fullscreen();
+			}
+				
+
+			$(document).bind('mouseup.cpEvents', function(e){
+				if( ! self.pickerWindow.is(e.target) 
+					&& ! self.$elem.is(e.target) 
+						&& self.pickerWindow.has(e.target).length === 0 ){
+					self.hideMe();
+				}
+			});
+
+			$(window).bind('resize.cpEvents', function(){ 
+
+				if( self.pickerWindow.hasClass("bmd-cp-fullscreen") )
+					self.setFullscreen();
+				else
+					self.setPosition();
+
+			});
+			
+		},
+
+		hideMe: function(){
+
+			var self = this;
+
+			self.pickerWindow.attr("data-bmd-cp", "closed");
+			self.pickerWindow.hide();
+
+			self.noScroll();
+
+			$(document).unbind('.cpEvents');
+			$(window).unbind('.cpEvents');
+
+		},
+
+		hideOnEsc: function(){
+
+			var self = this;
+
+			if( self.options.esc === true )
+			{
+				$(document).bind("keydown.cpEvents", function( event ) {
+					if ( event.keyCode == 27 )
+						self.hideMe();
+					return true;
+				});
+			}
+			
+
+		},
+
+		noScroll: function( isHide ){
+			
+			var self = this;
+			
+			if( isHide === true )
+			{
+				
+				self.bodyState.overflow = self.bodyState.overflow || $('body').css('overflow');
+
+				$('html, body').css({ 
+					'overflow': 'hidden',
+					'overflow-y': 'hidden'
+				});
+
+			}
+			else
+			{
+
+				$('html, body').css({ 
+					'overflow': self.bodyState.overflow,
+					'overflow-y': self.bodyState.overflow
+				});
+
+			}
+		},
+
+		getElementOffset: function( el ){
+			var o = [];
+			dom_el = el.get( 0 );
+
+			o.w = dom_el.offsetWidth;
+			o.h = dom_el.offsetHeight;
+			o.l = el.offset().left;
+			o.t = el.offset().top;
+			return o;
+		},
+
+		returnColor: function( h ){
+
+			var self = this;
+
+			h = h.charAt(0) == '#' ? h.substring(1, 7) : h; 
+			c = self.hexToRGB( h );
+
+			switch( self.options.colorformat.toLowerCase() ){
+				case 'rgb': 	return 'rgb(' + c.r + ',' + c.g + ',' + c.b + ')'; break;
+				case 'rgba': 	return 'rgba(' + c.r + ',' + c.g + ',' + c.b + ',1.0)'; break;
+				case '0x': 		return '0x' + h; break;
+				default: 		return '#' + h; break;
+			}
+		},
+
+		isHexColor: function( h ){ return h.length === 6 && ! isNaN( parseInt(h, 16)); },
+
+		hexToRGB: function(h){
+
+			var color = [];
+
+			h = h.charAt(0) == '#' ? h.substring(1, 7) : h; 
+
+			color.r = parseInt( h.substring(0,2).toString(), 16);
+			color.g = parseInt( h.substring(2,4).toString(), 16);
+			color.b = parseInt( h.substring(4,6).toString(), 16);
+
+			return color;
+
+		},
+
+		detectMobile: function(){
+			return ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) );
+		},
+
+		invertCells: function( table ){
+			var newrows = [];
+			
+			table.find("tr").each(function(r){
+				
+				$(this).find("td").each(function( c ){
+
+					newrows[c] = newrows[c] || $("<tr></tr>");
+					newrows[c].append( $(this) );
+
+					rowspan = $(this).attr('colspan') ? $(this).attr('colspan') : 0;
+					colspan = $(this).attr('rowspan') ? $(this).attr('rowspan') : 0;
+
+					if( rowspan > 0 )
+						$(this).attr('rowspan', rowspan).removeAttr('colspan');
+
+					if( colspan > 0 )
+						$(this).attr('colspan', colspan).removeAttr('rowspan');
+
+				});
+
+			}).remove();
+
+			$.each(newrows, function(){				
+				table.append( this );
+			});
+		},
+
+		template:{
+			div: 			'<div/>',
+			itemContainer: 	'<table/>',
+			itemRow: 		'<tr/>',
+			item: 			'<td/>',
+			input: 			'<input type="text" maxlength="6" placeholder="FF6600"/>',
+			button: 		'<button type="button">&nbsp;</button>'
+		}
+	};
+	
+	$.fn.colorPicker = function( options ){
+		return this.each(function(){
+			var myCPicker = Object.create( CPicker );
+			myCPicker.init( options, this );
+		});
+	};
+	
+	$.fn.colorPicker.options = {
+		colors: [
+			'#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00',
+			'#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca',
+			'#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694',
+			'#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#a5d0e0', '#fac08f', '#f2c314',
+			'#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100',
+			'#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'			
+			],
+		customcolors: 		[],
+		itemheight: 		20,
+		itemwidth: 			20,
+		insertcode: 		false,
+		rowitem: 			11,
+		buttonclose: 		true,
+		buttonfullscreen: 	true,
+		fullscreen: 		false,
+		esc: 				true,
+		alignment: 			'bl',
+		colorformat: 		'hex', // hex | rgb | rgba | 0x 
+		onSelect: 			function(ui, color){ console.log(color); }
+	};
+
+})(jQuery, window, document);

+ 3 - 0
app/assets/javascripts/create_reports.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 17 - 0
app/assets/javascripts/dashboard.js

@@ -0,0 +1,17 @@
+var loadDashboard;
+
+loadDashboard = function() {
+  try {
+    $("#dashboard").load("dashboard.js");
+
+    return setTimeout(function() {
+      return loadDashboard();
+    }, 5000);
+  } catch (err) {
+    return alert("reload error: " + err);
+  }
+};
+
+setTimeout(function() {
+  return loadDashboard();
+}, 5000);

+ 3 - 0
app/assets/javascripts/data_export.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

ファイルの差分が大きいため隠しています
+ 2244 - 0
app/assets/javascripts/datetimepicker.js


+ 3 - 0
app/assets/javascripts/emix_units.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/event.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 56 - 0
app/assets/javascripts/event_filter.js

@@ -0,0 +1,56 @@
+jQuery(document).ready(function($)
+{
+    try
+    {
+
+        var form = $('form.filter');
+        var initialActionPath = form.attr('action');
+
+        initialActionPath = trimDateFromActionPath(initialActionPath);
+
+
+        $("#date").datepicker({
+            dateFormat: "D, M d yy",
+            onClose: function(){
+              updateFormActionPath();
+            },
+            showButtonPanel: true
+        });
+
+        if ($("#date").val() == "") {
+            var today = Date.now();
+            
+            $("#date").datepicker("setDate", today);
+        }
+    }
+    catch (err)
+    {
+        alert(err);
+        console.error(err);
+    }
+
+    function updateFormActionPath() {
+      var date = $("#date").datepicker("getDate");
+      var date_string = date.getFullYear() + "/" + addLeadingZero(date.getMonth() + 1) + "/" + addLeadingZero(date.getDate());
+
+      var updatedActionPath = initialActionPath + "/" + date_string;
+
+      form.attr('action', updatedActionPath)
+    }
+
+    function addLeadingZero(integer) {
+      var val = integer.toString();
+
+      return val.length < 2 ? addLeadingZero("0" + val) : val;
+    }
+
+    function trimDateFromActionPath(actionPath) {
+      var splitPath = actionPath.split('/');
+
+      var trimmedActionPath = [splitPath[0], splitPath[1], splitPath[2]].join("/")
+
+      return trimmedActionPath;
+    }
+
+
+});

+ 3 - 0
app/assets/javascripts/event_interface.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 179 - 0
app/assets/javascripts/event_interval_data_graphs.js

@@ -0,0 +1,179 @@
+/* * * * * * * * * * * * * * * * * * * * * * */
+/* * * Interval Data View Graphing           */
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+var QueryParameters = {};
+
+QueryParameters.startHour = 0;
+QueryParameters.stopHour = 24;
+
+jQuery(document).ready(function($)
+{
+
+    try
+    {
+
+        // When the `#inteval-select` value is changed, re-generate the graph (new interval value will be referenced)
+        $('#report-interval-description-select').change(function() {
+            generate_report_intervals_graph();
+        });
+
+        $("#hours-slider").slider({
+            range: true,
+            min: 0,
+            max: 24,
+            values: [ 0, 24 ],
+            slide: function( event, ui ) {
+
+                QueryParameters.startHour = ui.values[0];
+                QueryParameters.stopHour = ui.values[1];
+
+                update_hours();
+
+                generate_report_intervals_graph();
+            }
+        });
+
+        update_hours();
+
+        generate_report_intervals_graph();
+    }
+    catch (err)
+    {
+        alert(err);
+    }
+});
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function update_hours()
+{
+    var low = convert_24hour_to_12hour(QueryParameters.startHour);
+    var high = convert_24hour_to_12hour(QueryParameters.stopHour);
+
+    $("#hours").val(low + " - " + high);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function convert_24hour_to_12hour(hour)
+{
+    if (hour == 0 || hour == 24)
+        return "12am";
+
+    if (hour <= 11)
+        return hour.toString() + "am";
+
+    if (hour == 12)
+        return "12pm";
+
+    return (hour - 12).toString() + "pm";
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+
+function display_report_intervals_graph(data) {
+
+
+    var datum = [];
+    var event_datum = [];
+
+    try
+    {
+        var event_start = false;
+
+        // BUG: if there's only one interval, the graphing library crashes
+        if (data.report_intervals.length == 1)
+            data.report_intervals = [ ];
+
+        for (i = 0; i < data.report_intervals.length; i++)
+        {
+            datum.push({x: i, y: data.report_intervals[i][1] });
+
+            // mark the start of the event with a vertical line
+            if (data.report_intervals[i][2] == 'active' && !event_start)
+            {
+                event_start = true;
+                event_datum.push({x: i, y: 0 });
+            }
+
+            if (data.report_intervals[i][2] == 'active')
+                event_datum.push({x: i, y: data.report_intervals[i][1] });
+            else {
+                // mark the end of the event with a vertical line
+                if (event_start)
+                    event_datum.push({x: i - 1, y: 0});
+
+                event_datum.push({x: i, y: 0});
+            }
+        }
+
+        nv.addGraph(function() {
+            var chart = nv.models.lineChart()
+                    .margin({left: 100})  //Adjust chart margins to give the x-axis some breathing room.
+                    .useInteractiveGuideline(true)  //We want nice looking tooltips and a guideline!
+                    .showLegend(false)       //Show the legend, allowing users to turn on/off line series.
+                    .showYAxis(true)        //Show the y-axis
+                    .showXAxis(true)        //Show the x-axis
+                ;
+            chart.xAxis     //Chart x-axis settings
+                .axisLabel($("#event_date").text() + " " + data.time_zone)
+                .tickFormat(function(idx) {
+                    return data.report_intervals[idx][0];
+                });
+
+            chart.yAxis     //Chart y-axis settings
+                .axisLabel(data.unit_string)
+                .tickFormat(d3.format('.02f'));
+
+            d3.select('#chart svg')    //Select the <svg> element you want to render the chart in.
+                .datum([{ values: datum, key: data.unit_string, color: "#7CB5EC", area: true },
+                    { values: event_datum, key: 'Event' + ' ' + data.unit_string, color: "#000000", area: true} ])         //Populate the <svg> element with chart data...
+                .call(chart);          //Finally, render the chart!
+
+            //Update the chart when window resizes.
+            nv.utils.windowResize(function() { chart.update() });
+
+            return chart;
+        });
+
+    } catch (err)
+    {
+        console.error(err);
+    }
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function query_group_interval_data()
+{
+    var event_id = document.getElementById("event-id").value;
+    var rid = document.getElementById("report-interval-description-select").value;
+
+    jQuery.get( "/events/" + event_id + "/status_query?start_hour=" + QueryParameters.startHour + "&stop_hour=" + QueryParameters.stopHour + "&rid=" + rid, function(data) {
+    })
+        .done(function(data) {
+            display_report_intervals_graph(data);
+        })
+        .fail(function(err) {
+            console.error('[query_data] : ' + err.responseText);
+        })
+        .always(function() {
+            // alert( "finished" );
+        });
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function generate_report_intervals_graph()
+{
+    try
+    {
+        query_group_interval_data();
+    }
+    catch (err)
+    {
+        console.error(err);
+    }
+}

+ 3 - 0
app/assets/javascripts/event_responses.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 41 - 0
app/assets/javascripts/event_search.js

@@ -0,0 +1,41 @@
+jQuery(document).ready(function($)
+{
+    try
+    {
+
+        function datePlusDays(submittedDate, numDays) {
+            return new Date(submittedDate.getTime() + numDays*24*60*60*1000);
+        }
+
+        $("#first_date_string").datepicker({
+            dateFormat: "D, M d yy",
+            showButtonPanel: true,
+        });
+
+        // `@first_date_string` should be set in the controller and referenced
+        // for this field's value in the view, but this is just in case
+        if ($("#first_date_string").val() == "") {
+            var defaultFirstDate = datePlusDays(new Date(), -1)
+            
+            $("#first_date_string").datepicker("setDate", defaultFirstDate);
+        }
+
+        $("#last_date_string").datepicker({
+            dateFormat: "D, M d yy",
+            showButtonPanel: true,
+        });
+
+        // `@last_date_string` should be set in the controller and referenced
+        // for this field's value in the view, but this is just in case
+        if ($("#last_date_string").val() == "") {
+            var defaultLastDate = datePlusDays(new Date(), 2)
+            
+            $("#last_date_string").datepicker("setDate", defaultLastDate);
+        }
+
+    }
+    catch (err)
+    {
+        alert(err);
+    }
+});

+ 3 - 0
app/assets/javascripts/event_signal_intervals.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/event_signals.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/eventfeed.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/group.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/holidays.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 208 - 0
app/assets/javascripts/interval_data_graph.js

@@ -0,0 +1,208 @@
+/* * * * * * * * * * * * * * * * * * * * * * */
+/* * * Interval Data View Graphing           */
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+var QueryParameters = {};
+
+QueryParameters.startHour = 0;
+QueryParameters.stopHour = 24;
+
+jQuery(document).ready(function($)
+{
+
+    try
+    {
+        $('#target_target_id').change(function() {
+            generate_report_intervals_graph();
+        });
+
+        // When the `#inteval-select` value is changed, re-generate the graph (new interval value will be referenced)
+        $('#report-interval-description-select').change(function() {
+            generate_report_intervals_graph();
+        });
+
+        $("#hours-slider").slider({
+            range: true,
+            min: 0,
+            max: 24,
+            values: [ 0, 24 ],
+            slide: function( event, ui ) {
+
+                QueryParameters.startHour = ui.values[0];
+                QueryParameters.stopHour = ui.values[1];
+
+                update_hours();
+
+                generate_report_intervals_graph();
+            }
+        });
+
+        update_hours();
+
+        // initialize the date selector
+        var today = Date.now();
+
+        $("#report_date").datepicker({
+            dateFormat: "DD M d yy",
+            showButtonPanel: true,
+            onSelect: function(date) {
+                generate_report_intervals_graph();
+            }
+        });
+
+        $("#report_date").datepicker("setDate", today);
+
+        generate_report_intervals_graph();
+    }
+    catch (err)
+    {
+        alert(err);
+    }
+});
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function update_hours()
+{
+    var low = convert_24hour_to_12hour(QueryParameters.startHour);
+    var high = convert_24hour_to_12hour(QueryParameters.stopHour);
+
+    $("#hours").val(low + " - " + high);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function convert_24hour_to_12hour(hour)
+{
+    if (hour == 0 || hour == 24)
+        return "12am";
+
+    if (hour <= 11)
+        return hour.toString() + "am";
+
+    if (hour == 12)
+        return "12pm";
+
+    return (hour - 12).toString() + "pm";
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function increment_date_by_days(number_of_days)
+{
+    var datepicker_date = $("#report_date").datepicker("getDate");
+
+    var new_date = new Date(datepicker_date.getFullYear(), datepicker_date.getMonth(), datepicker_date.getDate() + number_of_days);
+
+    $("#report_date").datepicker("setDate", new_date);
+
+    generate_report_intervals_graph();
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+
+function display_report_intervals_graph(data) {
+
+
+    var datum = [];
+
+    try
+    {
+        // BUG: if there's only one interval, the graphing library crashes
+        if (data.report_intervals.length == 1)
+            data.report_intervals = [ ];
+
+        m = Math.ceil(data.report_intervals.length / 10);
+
+        for (i = 0; i < data.report_intervals.length; i++)
+        {
+            datum.push({x: i, y: data.report_intervals[i][1] });
+        }
+
+        nv.addGraph(function() {
+            var chart = nv.models.lineChart()
+                    .margin({left: 100})  //Adjust chart margins to give the x-axis some breathing room.
+                    .useInteractiveGuideline(true)  //We want nice looking tooltips and a guideline!
+                    .showLegend(false)       //Show the legend, allowing users to turn on/off line series.
+                    .showYAxis(true)        //Show the y-axis
+                    .showXAxis(true)        //Show the x-axis
+                ;
+            chart.xAxis     //Chart x-axis settings
+                .axisLabel($("#report_date").datepicker( "getDate").toString().substring(0, 15) + " " + data.time_zone)
+                .tickFormat(function(idx) {
+                    return data.report_intervals[idx][0];
+                });
+
+            chart.yAxis     //Chart y-axis settings
+                .axisLabel(data.unit_string)
+                .tickFormat(d3.format('.02f'));
+
+            d3.select('#chart svg')    //Select the <svg> element you want to render the chart in.
+                .datum([{ values: datum, key: data.unit_string, color: "#7CB5EC", area: true}])         //Populate the <svg> element with chart data...
+                .call(chart);          //Finally, render the chart!
+
+            //Update the chart when window resizes.
+            nv.utils.windowResize(function() { chart.update() });
+
+            return chart;
+        });
+
+    } catch (err)
+    {
+        console.error(err);
+    }
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function query_group_interval_data()
+{
+    var target_id = document.getElementById("target_target_id").value;
+    var rid = document.getElementById("report-interval-description-select").value;
+
+    var date_to_pick = $("#report_date").datepicker("getDate");
+
+    var date = $.datepicker.formatDate('yy-mm-dd', date_to_pick);
+
+    jQuery.get( "/data_export/" + target_id + "/report_intervals_query?date=" + date + "&start_hour=" + QueryParameters.startHour + "&stop_hour=" + QueryParameters.stopHour + "&rid=" + rid, function(data) {
+    })
+        .done(function(data) {
+            display_report_intervals_graph(data);
+        })
+        .fail(function(err) {
+            console.error('[query_data] : ' + err.responseText);
+        })
+        .always(function() {
+            // alert( "finished" );
+        });
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function generate_report_intervals_graph()
+{
+    try
+    {
+        var datepicker_date = $("#report_date").datepicker("getDate");
+
+        var date_string = $("#report_date").val();
+
+        $(".date").text(date_string);
+
+        if(datepicker_date == null)
+        {
+            alert('Please choose a date');
+        }
+        else
+        {
+            query_group_interval_data();
+        }
+
+        $(".date-incrementers").show();
+    }
+    catch (err)
+    {
+        console.error(err);
+    }
+}

+ 3 - 0
app/assets/javascripts/market_contexts.js

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/oadr20a.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/oadr20b.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 26 - 0
app/assets/javascripts/oadr_ujs.js

@@ -0,0 +1,26 @@
+// $j = jQuery.noConflict();
+
+jQuery(document).ready(function($) {
+  try
+  {
+    $("input.datepicker").datepicker({ dateFormat: "yy-mm-dd" });
+
+    $('#targets-tabs a').click(function (e) {
+      e.preventDefault();
+      $(this).tab('show');
+    });
+
+    $(".ajax-form").submit(function() {
+      $(".processing").show();
+    });
+
+    $(".processing").hide();
+
+    // sample code to activate a certain tab
+    // $("#tabs").tabs({active: 1});
+  }
+  catch (err)
+  {
+    alert(err);
+  }
+});

+ 3 - 0
app/assets/javascripts/opt_schedules.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/report_request_configurations.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 25 - 0
app/assets/javascripts/report_requests.js

@@ -0,0 +1,25 @@
+var reportChangeHandler = function() {
+    try
+    {
+
+        $('#report_request_report_id').change(
+            function() {
+                $(".processing").slideDown(400);
+
+                $('#report_request_form_rid_submit').click();
+            });
+
+        $('.processing').slideUp(800);
+    }
+    catch (err)
+    {
+        alert(err);
+    }
+};
+
+
+
+$(function() {
+    reportChangeHandler();
+    $('.processing').hide();
+});

+ 3 - 0
app/assets/javascripts/report_requests.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/reports.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/resource_types.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/resources.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/schedules.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 98 - 0
app/assets/javascripts/scripts.js

@@ -0,0 +1,98 @@
+$(function() {
+
+  // Toggle visibility of navigation
+  $('.toggle-sidebar').on('click', function() {
+    $('body').toggleClass('sidebar-open');
+    return false;
+  });
+
+  // Hack to get error styles right for Bootstrap
+  $('.field_with_errors').parents('.form-group').addClass('has-error');
+
+  // Setup datepicker (jQuery UI)
+  $('.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
+
+    // If having problems with multiple `.datepicker` or `.datetimepicker` elements on a single page,
+    // be sure that each input element has a unique id.  This can be done by namespacing each `form_for`
+    // Example: `form_for(record, namespace: record.id)`
+
+  // Setup datetimepicker (extends datepicker)
+  $('.datetimepicker').datetimepicker({
+    dateFormat: 'yy-mm-dd',
+    timeFormat: 'h:mmtt', // e.g. "9:40am" This must *exactly* match format of datetime field output,
+                          // but DO NOT COPY/PASTE from or into Ruby, as Ruby & JS use different
+                          // syntax for datetime string formatting!
+    oneLine: true // Try to render time selects (hour, minute) on a single line
+  });
+
+  // Select the appropriate tab on page load
+  var hash = window.location.hash;
+
+  if (hash) {
+    $('a[href="'+ hash +'"]').tab('show');
+  } else {
+    // Select the first tab in the group
+    $('.nav-tabs').find('li:first a').tab('show');
+
+    // Select a tab with errors inside, if it exists
+    $('[href="#' + $('.tab-pane:has(.field_with_errors)').attr('id') + '"]').tab('show');
+  }
+
+  //
+  // Use 'Chosen' jQuery plugin to give extra functionality to selects
+  //
+  function initChosen() {
+    $(".chosen-select").each(function() {
+
+        var item = $(this);
+
+        item.chosen({
+            allow_single_deselect: true,
+            disable_search_threshold: 0, // on single select, disables search if fewer than X options in select
+            no_results_text: 'No options match', // displayed (with "<current_string>" appended) when no options match
+            placeholder_text_single: 'Select from list',
+            placeholder_text_multiple: 'Select one or more options',
+            search_contains: true, // matches any substring, instead of matching only from beginning of word(s)
+            width: '100%',
+            max_selected_options: parseInt(item.attr('data-max-selected-options'))
+        });
+
+    });
+
+  };
+
+  $(document).ready(function(){
+    initChosen();
+  });
+
+  $(document).ajaxComplete(function(){
+    initChosen();
+  });
+
+  //
+  // AJAX forms
+  //
+  $(document).on('submit', '[data-remote="true"]', function() {
+    $('.processing').slideDown(200);
+  })
+  $('.processing').hide();
+
+
+  //
+  //// Search Form Advanced Options
+  //
+  $('.advanced-toggle').click(function() {
+    $(this).closest('form.search').toggleClass('advanced-active');
+  });
+});
+
+$(document).ready(function(){
+  $(".color-picker").colorPicker({
+    colors: ['#4C97B1','#3169D1','#271F90','#5C259A','#842959','#BB1907','#BE3D0F','#C16F1C','#C48922','#F2D435','#D0C837','#829B40'],
+    rowitem: 4,
+    onSelect: function(ui, color){
+      ui.closest(".color-picker").val(color).css('background-color', color).css('color', color);
+    }
+  });
+});
+

+ 3 - 0
app/assets/javascripts/sessions.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/static_pages.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/targets.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 3 - 0
app/assets/javascripts/test_case_prompt.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 65 - 0
app/assets/javascripts/tou_schedule_months.js

@@ -0,0 +1,65 @@
+$(document).ready(function(){
+
+  ///////////////////////////////////////////////
+  // General Setup //////////////////////////////
+
+  $('.summer-month-range-selection').show();
+  $('.month-fields').hide();
+
+  var first_month_of_summer = parseInt($('#date_first_month_of_summer').val(), 10);
+  var last_month_of_summer = parseInt($('#date_last_month_of_summer').val(), 10);
+
+  disable_inappropriate_select_options(first_month_of_summer, last_month_of_summer);
+
+  ///////////////////////////////////////////////
+  // When Summer Range Select Changes ///////////
+
+  $('.summer-range-select').change(function(){
+    var first_month_of_summer = parseInt($('#date_first_month_of_summer').val(), 10);
+    var last_month_of_summer = parseInt($('#date_last_month_of_summer').val(), 10);
+
+    set_months_season_values(first_month_of_summer, last_month_of_summer);
+    disable_inappropriate_select_options(first_month_of_summer, last_month_of_summer);
+    
+  });
+
+  ///////////////////////////////////////////////
+  // Available Named Functions //////////////////
+
+  function set_months_season_values(first_month, last_month){
+
+    for (var i = 1; i <= 12; i++) {
+      if (first_month <= i && i <= last_month) {
+        season_value = 'summer'
+      } else {
+        season_value = 'winter'
+      }
+
+      i = (i < 10)?("0"+i):i; // Add leading zero to values under 10
+      $("#tou_schedule_month_"+ i +"_season").val(season_value);
+    }
+  }
+
+  //  //  //  //  //  //  // // // // // // // //
+
+  function disable_inappropriate_select_options(first_month_number, last_month_number){
+    //alert("Disable inappropriate select options.");
+    $('#date_first_month_of_summer > option').each(function() {
+
+      if ( this.value > last_month_number ) {
+        $(this).attr('disabled','disabled')
+      } else {
+        $(this).removeAttr('disabled')
+      }
+    });
+
+    $('#date_last_month_of_summer > option').each(function() {
+
+      if ( this.value < first_month_number ) {
+        $(this).attr('disabled','disabled')
+      } else {
+        $(this).removeAttr('disabled')
+      }
+    });
+  }
+});

+ 19 - 0
app/assets/javascripts/ve_ns.js.coffee

@@ -0,0 +1,19 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
+
+loadVENs = () ->
+    try
+        $("#content").load(window.location.pathname + ".js")
+
+        setTimeout ->
+          loadVENs()
+        , 5000
+
+    catch err
+        alert "reload error: " + err
+
+
+setTimeout -> 
+  loadVENs()
+, 5000

+ 209 - 0
app/assets/javascripts/ven_interval_data_graphs.js

@@ -0,0 +1,209 @@
+/* * * * * * * * * * * * * * * * * * * * * * */
+/* * * Interval Data View Graphing           */
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+var QueryParameters = {};
+
+QueryParameters.startHour = 0;
+QueryParameters.stopHour = 24;
+
+jQuery(document).ready(function($)
+{
+
+    try
+    {
+        // When the `#inteval-select` value is changed, re-generate the graph (new interval value will be referenced)
+        $('#report-interval-description-select').change(function() {
+            generate_report_intervals_graph();
+        });
+
+        $("#hours-slider").slider({
+            range: true,
+            min: 0,
+            max: 24,
+            values: [ 0, 24 ],
+            slide: function( event, ui ) {
+
+                QueryParameters.startHour = ui.values[0];
+                QueryParameters.stopHour = ui.values[1];
+
+                update_hours();
+
+                generate_report_intervals_graph();
+            }
+        });
+
+        update_hours();
+
+        // initialize the date selector
+        var today = Date.now();
+
+        $("#report_date").datepicker({
+            dateFormat: "DD M d yy",
+            showButtonPanel: true,
+            onSelect: function(date) {
+                generate_report_intervals_graph();
+            }
+        });
+
+        $("#report_date").datepicker("setDate", today);
+
+        generate_report_intervals_graph();
+    }
+    catch (err)
+    {
+        alert(err);
+    }
+});
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function update_hours()
+{
+    var low = convert_24hour_to_12hour(QueryParameters.startHour);
+    var high = convert_24hour_to_12hour(QueryParameters.stopHour);
+
+    $("#hours").val(low + " - " + high);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function convert_24hour_to_12hour(hour)
+{
+    if (hour == 0 || hour == 24)
+        return "12am";
+
+    if (hour <= 11)
+        return hour.toString() + "am";
+
+    if (hour == 12)
+        return "12pm";
+
+    return (hour - 12).toString() + "pm";
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function increment_date_by_days(number_of_days)
+{
+    var datepicker_date = $("#report_date").datepicker("getDate");
+
+    var new_date = new Date(datepicker_date.getFullYear(), datepicker_date.getMonth(), datepicker_date.getDate() + number_of_days);
+
+    $("#report_date").datepicker("setDate", new_date);
+
+    generate_report_intervals_graph();
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+
+function display_report_intervals_graph(data) {
+
+
+    var datum = [];
+
+    try
+    {
+        // BUG: if there's only one interval, the graphing library crashes
+        if (data.report_intervals.length == 1)
+            data.report_intervals = [ ];
+
+        m = Math.ceil(data.report_intervals.length / 10);
+
+        for (i = 0; i < data.report_intervals.length; i++)
+        {
+            datum.push({x: i, y: data.report_intervals[i][1] });
+        }
+
+        nv.addGraph(function() {
+            var chart = nv.models.lineChart()
+                    .margin({left: 100})  //Adjust chart margins to give the x-axis some breathing room.
+                    .useInteractiveGuideline(true)  //We want nice looking tooltips and a guideline!
+                    .showLegend(false)       //Show the legend, allowing users to turn on/off line series.
+                    .showYAxis(true)        //Show the y-axis
+                    .showXAxis(true)        //Show the x-axis
+                ;
+            chart.xAxis     //Chart x-axis settings
+                .axisLabel($("#report_date").datepicker( "getDate").toString().substring(0, 15) + " " + data.time_zone)
+                .tickFormat(function(idx) {
+                    return data.report_intervals[idx][0];
+                });
+
+            chart.yAxis     //Chart y-axis settings
+                .axisLabel(data.unit_string)
+                .tickFormat(d3.format('.02f'));
+
+            d3.select('#chart svg')    //Select the <svg> element you want to render the chart in.
+                .datum([{ values: datum, key: data.unit_string, color: "#7CB5EC", area: true}])         //Populate the <svg> element with chart data...
+                .call(chart);          //Finally, render the chart!
+
+            //Update the chart when window resizes.
+            nv.utils.windowResize(function() { chart.update() });
+
+            return chart;
+        });
+
+    } catch (err)
+    {
+        console.error(err);
+    }
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function query_report_intervals_data()
+{
+
+    var url = window.location.pathname;
+
+    var ven_id = document.getElementById("ven-id").value;
+
+    var report_interval_description_id = document.getElementById("report-interval-description-select").value;
+
+    var date_to_pick = $("#report_date").datepicker("getDate");
+
+    var date = $.datepicker.formatDate('yy-mm-dd', date_to_pick);
+
+    jQuery.get( "/vens/" + ven_id + "/report_intervals_query?date=" + date + "&start_hour=" + QueryParameters.startHour + "&stop_hour=" + QueryParameters.stopHour + "&rid=" + report_interval_description_id, function(data) {
+    })
+        .done(function(data) {
+            display_report_intervals_graph(data);
+        })
+        .fail(function(err) {
+            console.error('[query_data] : ' + err.responseText);
+        })
+        .always(function() {
+            // alert( "finished" );
+        });
+
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+function generate_report_intervals_graph()
+{
+    try
+    {
+        var datepicker_date = $("#report_date").datepicker("getDate");
+
+        var date_string = $("#report_date").val();
+
+        $(".date").text(date_string);
+
+        if(datepicker_date == null)
+        {
+            alert('Please choose a date');
+        }
+        else
+        {
+            query_report_intervals_data();
+        }
+
+        $(".date-incrementers").show();
+    }
+    catch (err)
+    {
+        console.error(err);
+    }
+}

+ 20 - 0
app/assets/javascripts/ven_live_connection_status_box.js

@@ -0,0 +1,20 @@
+/* * * * * * * * * * * * * * * * * * * * * * */
+/* * * Provision View Status Block           */
+/* * * * * * * * * * * * * * * * * * * * * * */
+
+jQuery(document).ready(function($)
+{
+    setInterval(function() {
+
+        var venID = $('.connection-status .status-indicator-block').attr('id');
+
+        $.ajax({
+          method: "GET",
+          url: "/vens/" + venID + "/status_query",
+          dataType: "html",
+          success: function(data) {
+            $('.list-actions').html(data);
+          }
+        });
+    }, 10 * 1000);
+});

+ 17 - 0
app/assets/javascripts/vens.js

@@ -0,0 +1,17 @@
+var loadVENs;
+
+loadVENs = function() {
+    try {
+        $("#ven_list").load(window.location.pathname + ".js");
+
+        return setTimeout(function() {
+            return loadVENs();
+        }, 5000);
+    } catch (err) {
+        return alert("reload error: " + err);
+    }
+};
+
+setTimeout(function() {
+    return loadVENs();
+}, 5000);

+ 3 - 0
app/assets/javascripts/vtn_parameters.js.coffee

@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

+ 15 - 0
app/assets/stylesheets/_alerts.css.scss

@@ -0,0 +1,15 @@
+.alert > {
+  h2, h3, h4 {
+    margin-top: 0;
+  }
+
+  .error-message {
+    font-size: 18px;
+    font-weight: bold;
+    margin: 0 0 10px;
+  }
+
+  .error-list {
+    padding: 0 0 0 25px;
+  }
+}

+ 164 - 0
app/assets/stylesheets/_base.css.scss

@@ -0,0 +1,164 @@
+// Set width of navigation element to a variable
+// to enable single point of update for offsets
+// of affected elements (subnav, content-container, etc.)
+$navigation-width: 200px;
+$body-padding-top: 126px;
+@mixin standard-box-shadow {
+  box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
+}
+$active-highlight: #d26911;
+//
+
+body {
+  font-size: 14px;
+  position: relative;
+  padding: $body-padding-top 20px 0 ($navigation-width);
+
+  .container-fluid {
+    margin-left: 0;
+    margin-right: 0;
+    padding-left: 0px;
+    padding-right: 0px;
+  }
+}
+
+.header {
+  position: fixed;
+  z-index: 49;
+
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 72px;
+  padding: 0px;
+  background-color: #fff;
+  border: none;
+  border-bottom: 1px solid #eee;
+  border-radius: 0;
+
+  .logo {
+    float: left;
+    margin: 3px 6px;
+  }
+
+  .utility-id {
+    float: left;
+    margin: 24px 60px 0px 60px;
+  }
+
+  ul.header-actions {
+    float: left;
+    padding-left: 0px;
+    list-style: none;
+
+    li {
+      float: left;
+      height: 72px;
+      margin: 0px;
+      padding: 12px;
+      text-align: center;
+      border-left: 1px solid #eee;
+      &:last-child {
+        border-right: 1px solid #eee;
+      }
+      img, .btn {
+        display: block;
+        margin-bottom: 3px;
+      }
+    }
+  }
+}
+
+.subnav_container {
+  position: fixed;
+  z-index: 48;
+  top: 72px;
+  left: $navigation-width;
+  width: 100%;
+  margin: 0px 0px 0px 2px;
+  padding: 10px 0px 4px 0px;
+  background-color: #fff;
+  border-bottom: 1px solid #ddd;
+
+  .subnav {
+    display: inline-block;
+    margin: 0px 20px 0px 0px;
+    padding: 0px 4px 0px 0px;
+    list-style: none;
+    color: #fff;
+    // Background-color and border match `fieldset` (in 'forms' styles)
+    background-color: #f6f6f6;
+    border: 1px solid #ddd;
+
+    .item {
+      display: inline-block;
+      position: relative;
+      margin-left: 0px;
+      margin-right: -4px;
+      padding: 0px;
+      border-right: 2px solid #ddd;
+
+      &:last-child {
+        border-right: none;
+      }
+
+      a {
+        display: block;
+        position: relative;
+        margin: 0px;
+        padding: 6px 24px;
+        text-decoration: none;
+      }
+
+      &.current {
+        background-color: #fff;
+
+        a {
+          color: #000;
+          font-weight: bold;
+        }
+
+        &:after {
+          // This pseudo element forms the triangle under the "current" subnav item
+          content:"\A";
+          position: absolute;
+          bottom: 0px;
+          left: 50%;
+          width: 94%;
+          // This negative left margin should be
+          // half the width of the pseudo element
+          margin-left: -47%;
+          border-style: solid;
+          border-bottom: 1px solid $active-highlight;
+        }
+      }
+    }
+  }
+}
+
+.debug_dump {
+  margin-top: 20px;
+}
+
+.footer {
+  padding: 0 0 20px;
+
+  @include respond-to(mobile) {
+    text-align: center;
+
+    .pull-right {
+      float: none !important;
+      font-weight: bold;
+    }
+  }
+}
+
+.blank_slate_container {
+  box-sizing: border-box;
+  width: 360px;
+  margin: 0;
+  padding: 2% 3%;
+  background: #eee;
+  border: 1px solid #ddd;
+  text-align: center;
+}

+ 62 - 0
app/assets/stylesheets/_forms.css.scss

@@ -0,0 +1,62 @@
+// Shared Styles
+form, div.form {
+  margin: 0 0 20px;
+
+  fieldset {
+    background: #f6f6f6;
+    border: 1px solid #ddd;
+    margin: 0 2px -10px;
+    padding: 0.35em 1em 1em;
+
+    .fieldset-heading {
+      border-bottom: 1px solid #d6d6d6;
+      margin: 10px 0 20px;
+      padding: 0 0 20px;
+    }
+
+    label.control, div.control {
+      padding-left: 30px;
+      padding-right: 30px;
+      margin-bottom: 4px;
+    }
+
+    div.form-submit {
+      padding-left:30px;
+    }
+
+    .datetimepicker.form-control {
+      cursor: pointer;
+    }
+  }
+}
+
+div.control {
+  width: 100%;
+  max-width: 600px;
+}
+
+div.table-control {
+  width: 100%;
+  max-width: 600px;
+}
+
+// Forms in Tables
+table form {
+  margin: 0;
+}
+
+// Specific Forms
+.session-form {
+  h2 {
+    margin-top: 0;
+  }
+}
+
+form fieldset:hover {
+  background-color: #e8eeee;
+}
+
+div.table-narrow {
+  table-layout: fixed;
+  width: 360px;
+}

+ 11 - 0
app/assets/stylesheets/_mixins.css.scss

@@ -0,0 +1,11 @@
+@mixin respond-to($media) {
+  @if $media == phone {
+    @media (max-width: 480px) { @content; }
+  }
+  @else if $media == mobile {
+    @media (max-width: $screen-sm-min) { @content; }
+  }
+  @else if $media == desktop {
+    @media (min-width: $screen-sm-min + 1) { @content; }
+  }
+}

+ 73 - 0
app/assets/stylesheets/_navigation.css.scss

@@ -0,0 +1,73 @@
+.navigation {
+
+  @include box-sizing(border-box);
+
+  padding-bottom: 15px;
+  position: fixed;
+  top: 82px;
+  left: 3px;
+
+  // `$navigation-width` set in `base.css.scss`
+  width: $navigation-width;
+
+  min-height: 20px;
+
+  ul {
+    margin: 0px 10px 10px 5px;
+    padding: 0;
+    border: 1px solid #DDD;
+    background: #F6F6F6;
+
+    li {
+      margin-left: -1px;
+
+      list-style-type: none;
+      font-size: 1.1em;
+
+      border-bottom: 1px solid #DDD;
+
+      &:hover {
+        background-color: white;
+        box-shadow: 1px 0 0 0 #DDD inset;
+      }
+
+      img, div {
+        display: inline-block;
+      }
+      div {
+        margin-left: 6px;
+      }
+    }
+  }
+
+  a {
+    display: block;
+    padding: 9px;
+
+    &:hover {
+      text-decoration: none;
+    }
+
+    &.active {
+      box-shadow: 2px 0 0 0 $active-highlight inset;
+      font-weight: bold;
+      background-color: white;
+      color: black;
+    }
+  }
+}
+
+// Nav tabs
+.nav-tabs {
+  margin-bottom: 15px;
+}
+
+@include respond-to(mobile) {
+  .sidebar-open .navigation {
+    left: 0;
+  }
+}
+
+div.logo a {
+  padding-left: 5px !important;
+}

+ 45 - 0
app/assets/stylesheets/_tables.css.scss

@@ -0,0 +1,45 @@
+table {
+  th {
+    background: #eee;
+    font-size: 15px;
+  }
+
+  td {
+    .checkbox {
+      margin: 0;
+    }
+  }
+
+  .action {
+    text-align: right;
+    width: 100px;
+  }
+
+  .actions {
+    text-align: right;
+    width: 240px;
+
+    .btn-danger {
+      margin-left: 15px;
+    }
+  }
+}
+
+// Override Bootstrap's default of stripes on odd number columns
+.table-striped > tbody > tr:nth-child(odd) > {
+  td, th {
+    background-color: white;
+  }
+}
+
+.table-striped > tbody > tr:nth-child(even) > {
+  td, th {
+    background-color: #e8eeee;
+  }
+}
+
+.table-striped > tbody > tr:hover > {
+  td {
+    background-color: #fafae3;
+  }
+}

+ 17 - 0
app/assets/stylesheets/_variables.css.scss

@@ -0,0 +1,17 @@
+// Remove border radius from all things
+$border-radius-small: 0;
+$border-radius-base: 0;
+$border-radius-large: 0;
+
+// Update colors
+$brand-danger: #d2322d;
+$brand-primary: #3276b1;
+$brand-warning: #ed9c28;
+$brand-info: #39b3d7;
+$brand-success: #47a447;
+
+// Inputs
+$padding-base-vertical: 4px;
+$padding-base-horizontal: 8px;
+$padding-large-vertical: 6px;
+$padding-large-horizontal: 10px;

+ 24 - 0
app/assets/stylesheets/accounts.css.scss

@@ -0,0 +1,24 @@
+// Place all the styles related to the Accounts controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+
+.accounts_table th.accounts_header_name
+{
+  width: 20em;
+}
+
+.accounts_table th.accounts_header_edit
+{
+  width: 5em;
+}
+
+.accounts_table th.accounts_header_destroy
+{
+  width: 4em;
+}
+
+.accounts_table th.accounts_header_create_ven
+{
+  width: 6em;
+}

+ 39 - 0
app/assets/stylesheets/application.css.scss

@@ -0,0 +1,39 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require 'chosen'
+ *
+ */
+
+@import 'bourbon';
+@import 'variables';
+@import 'mixins';
+@import 'bootstrap';
+@import 'jquery.ui.datepicker';
+@import 'jquery.ui.tabs';
+@import 'jquery.ui.progressbar';
+@import 'jquery.ui.slider';
+
+@import 'alerts';
+@import 'base';
+@import 'forms';
+@import 'navigation';
+@import 'tables';
+@import 'search_box';
+@import 'cards';
+@import 'events';
+@import 'interfaces';
+@import 'vens';
+@import 'reports';
+@import 'tou_schedules';
+@import 'calendar';
+@import 'color_picker';
+@import 'datetimepicker';
+@import 'nv.d3';

+ 198 - 0
app/assets/stylesheets/calendar.css.scss

@@ -0,0 +1,198 @@
+$pixels-per-minute: 1px;
+$date-label-height: 20px;
+
+.week-nav {
+  display: block;
+  margin: 0px 0px 12px 0px;
+
+  & > * {
+    display: inline-block;
+  }
+
+  span {
+    position: relative;
+    top: 3px;
+    margin-left: 6px;
+    font-size: 1.3em;
+  }
+
+  .week-incrementer {
+    padding: 1px 10px 3px 10px;
+    font-size: 1.2em;
+    font-weight: bold;
+  }
+}
+
+.week {
+  font-size: 0px; // Fix to remove width of single space character from between .day elements
+
+  & > * {
+    font-size: 1.3rem; // Restore font-size of immediate child (.day) elements
+  }
+}
+
+fieldset.event-calendar {
+  min-width: 850px;
+}
+
+.calendar-wrapper {
+  margin-top: 30px;
+  // margin-bottom: 90px;
+
+  .date-label {
+    position: absolute;
+    width: 100%;
+    top: -$date-label-height;
+    height: $date-label-height;
+    font-size: 1em;
+    color: #333;
+    text-align: center;
+  }
+
+  .calendar {
+    position: relative;
+    width: 100%;
+    box-sizing: border-box;
+    margin: $date-label-height, 0px, 0px, 0px;
+    padding: 0px;
+    text-align: left;
+    overflow: visible;
+
+    .day {
+      position: relative;
+      display: inline-block;
+      height: $pixels-per-minute * 24 * 60;
+      width: 12.75%; // 100% / 7, reduced a bit to give "wiggle" room w/o pushing last day to next "row"
+      box-sizing: content-box;
+      margin: 0px 0px;
+      padding: 0px 0px 0px 0px;
+      border-right: 1px solid #eee;
+      text-align: left;
+      // overflow-x: hidden;
+      // overflow-y: hidden;
+      // background-color: rgba(255, 255, 255, .75);
+
+      transition: all .5s ease;
+
+      &.today {
+        background-color: rgba(#ddd, .2);
+
+        .date-label {
+          font-weight: bold;
+        }
+      }
+
+      &.weekday {
+        // width: 15%
+      }
+
+      &.weekend_day {
+        // width: 7%;
+      }
+
+      &:first-child {
+        margin-left: 3em;
+        border-left: 1px solid #eee;
+      }
+    }
+
+    .hour-grid {
+      position: absolute;
+      width: 100%;
+      background-color: #fff;
+      border: 1px solid #ddd;
+      border-top: none;
+
+      .current-time-line {
+        position: absolute;
+        top: 200px;
+        width: 100%;
+        height: 3px;
+        border-top: 1px solid lighten($brand-danger, 25%);
+      }
+
+      .hour {
+        position: relative;
+        height: $pixels-per-minute * 60;
+        text-align: left;
+        color: #aaa;
+        border-top: 1px solid #ededed;
+
+        .hour-label {
+          width: 3em;
+          margin: 0px;
+          padding: 1px 0px;
+          font-size: .9em;
+          color: #333;
+          background-color: #fff;
+          text-align: right;
+        }
+
+        .half-hour {
+          position: absolute;
+          bottom: 0px;
+          display: block;
+          width: 100%;
+          height: $pixels-per-minute * 30;
+          border-top: 1px dashed #eee;
+        }
+      }
+    }
+  }
+}
+
+
+.calendar-event {
+  position: absolute;
+  display: block;
+  width: 100%;
+  margin: 0px 0px 0px 0px;
+  padding: 5%;
+  background-color: $brand-primary;
+  border: 1px solid #fff;
+  box-shadow: 1px 1px 4px rgba(0, 0, 0, .5);
+
+  .event-data {
+    background-color: #f2f2f2;
+    border: 1px solid #ddd;
+    border-top: 2px solid rgba(0, 0, 0, .3);
+    padding: 2.5%;
+
+    a.link-to-object {
+      float: right;
+      display: block;
+      margin: -2px 0px 0px 0px;
+
+      img {
+        width: 14px;
+        height: 14px;
+        text-decoration: none;
+      }
+    }
+
+    .market-context {
+      // Styles necessary to achieve ellipsis for long strings overrunning their parent's width
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+
+    .status {
+      display: block;
+      width: 100%;
+      margin: 0px;
+    }
+  }
+
+  & > * {
+    // display: none;
+  }
+
+  &.trimmed_to_fit_beginning {
+    // border-top: none;
+  }
+
+  &.trimmed_to_fit_end {
+    // border-bottom: none;
+  }
+}

+ 39 - 0
app/assets/stylesheets/cards.css.scss

@@ -0,0 +1,39 @@
+.card {
+  display: inline-block;
+  margin: 12px 0px 0px 0px;
+  padding: 9px;
+  background-color: #fff;
+  border: 1px solid #ddd;
+}
+
+/* * * * * * * * * * * * * * * * */
+
+.card-column {
+  display: inline-block;
+  vertical-align: top;
+  padding: 0px 9px;
+  border-right: 1px solid #ddd;
+
+  &:nth-child(1) { // Column 1
+    padding-left: 0px;
+  }
+
+  &:nth-child(3) { // Column 3
+    padding-right: 0px;
+    border-right: none;
+  }
+}
+
+/* * * * * * * * * * * * * * * * */
+
+.card-actions {
+
+  a.btn {
+    display: block;
+    margin-bottom: 12px;
+
+    &:last-child {
+      margin-bottom: 0px;
+    }
+  }
+}

+ 420 - 0
app/assets/stylesheets/chosen.css

@@ -0,0 +1,420 @@
+/*!
+Chosen, a Select Box Enhancer for jQuery and Prototype
+by Patrick Filler for Harvest, http://getharvest.com
+
+Version 1.3.0
+Full source at https://github.com/harvesthq/chosen
+Copyright (c) 2011-2014 Harvest http://getharvest.com
+
+MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+This file is generated by `grunt build`, do not edit it by hand.
+*/
+
+/* @group Base */
+.chosen-container {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+  font-size: 13px;
+  zoom: 1;
+  *display: inline;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  user-select: none;
+}
+.chosen-container * {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+.chosen-container .chosen-drop {
+  position: absolute;
+  top: 100%;
+  left: -9999px;
+  z-index: 1010;
+  width: 100%;
+  border: 1px solid #aaa;
+  border-top: 0;
+  background: #fff;
+  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
+}
+.chosen-container.chosen-with-drop .chosen-drop {
+  left: 0;
+}
+.chosen-container a {
+  cursor: pointer;
+}
+
+/* @end */
+/* @group Single Chosen */
+.chosen-container-single .chosen-single {
+  position: relative;
+  display: block;
+  overflow: hidden;
+  padding: 0 0 0 8px;
+  height: 25px;
+  border: 1px solid #aaa;
+  background-color: #fff;
+  background-clip: padding-box;
+  box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
+  color: #444;
+  text-decoration: none;
+  white-space: nowrap;
+  line-height: 24px;
+}
+.chosen-container-single .chosen-default {
+  color: #999;
+}
+.chosen-container-single .chosen-single span {
+  display: block;
+  overflow: hidden;
+  margin-right: 26px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.chosen-container-single .chosen-single-with-deselect span {
+  margin-right: 38px;
+}
+.chosen-container-single .chosen-single abbr {
+  position: absolute;
+  top: 6px;
+  right: 26px;
+  display: block;
+  width: 12px;
+  height: 12px;
+  background: url('chosen-sprite.png') -42px 1px no-repeat;
+  font-size: 1px;
+}
+.chosen-container-single .chosen-single abbr:hover {
+  background-position: -42px -10px;
+}
+.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
+  background-position: -42px -10px;
+}
+.chosen-container-single .chosen-single div {
+  position: absolute;
+  top: 0;
+  right: 0;
+  display: block;
+  width: 18px;
+  height: 100%;
+}
+.chosen-container-single .chosen-single div b {
+  display: block;
+  width: 100%;
+  height: 100%;
+  background: url('chosen-sprite.png') no-repeat 0px 2px;
+}
+.chosen-container-single .chosen-search {
+  position: relative;
+  z-index: 1010;
+  margin: 0;
+  padding: 3px 4px;
+  white-space: nowrap;
+}
+.chosen-container-single .chosen-search input[type="text"] {
+  margin: 1px 0;
+  padding: 4px 20px 4px 5px;
+  width: 100%;
+  height: auto;
+  outline: 0;
+  border: 1px solid #aaa;
+  background: white url('chosen-sprite.png') no-repeat 100% -20px;
+  background: url('chosen-sprite.png') no-repeat 100% -20px;
+  font-size: 1em;
+  font-family: sans-serif;
+  line-height: normal;
+  border-radius: 0;
+}
+.chosen-container-single .chosen-drop {
+  margin-top: -1px;
+  border-radius: 0 0 4px 4px;
+  background-clip: padding-box;
+}
+.chosen-container-single.chosen-container-single-nosearch .chosen-search {
+  position: absolute;
+  left: -9999px;
+}
+
+/* @end */
+/* @group Results */
+.chosen-container .chosen-results {
+  color: #444;
+  position: relative;
+  overflow-x: hidden;
+  overflow-y: auto;
+  margin: 0 4px 4px 0;
+  padding: 0 0 0 4px;
+  max-height: 240px;
+  -webkit-overflow-scrolling: touch;
+}
+.chosen-container .chosen-results li {
+  display: none;
+  margin: 0;
+  padding: 5px 6px;
+  list-style: none;
+  line-height: 15px;
+  word-wrap: break-word;
+  -webkit-touch-callout: none;
+}
+.chosen-container .chosen-results li.active-result {
+  display: list-item;
+  cursor: pointer;
+}
+.chosen-container .chosen-results li.disabled-result {
+  display: list-item;
+  color: #ccc;
+  cursor: default;
+}
+.chosen-container .chosen-results li.highlighted {
+  background-color: #3875d7;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
+  background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
+  background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
+  background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
+  background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
+  color: #fff;
+}
+.chosen-container .chosen-results li.no-results {
+  color: #777;
+  display: list-item;
+  background: #f4f4f4;
+}
+.chosen-container .chosen-results li.group-result {
+  display: list-item;
+  font-weight: bold;
+  cursor: default;
+}
+.chosen-container .chosen-results li.group-option {
+  padding-left: 15px;
+}
+.chosen-container .chosen-results li em {
+  font-style: normal;
+  text-decoration: underline;
+}
+
+/* @end */
+/* @group Multi Chosen */
+.chosen-container-multi .chosen-choices {
+  position: relative;
+  overflow: hidden;
+  margin: 0;
+  padding: 0 5px;
+  width: 100%;
+  height: auto !important;
+  height: 1%;
+  border: 1px solid #aaa;
+  background-color: #fff;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
+  background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
+  background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
+  background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
+  background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
+  cursor: text;
+}
+.chosen-container-multi .chosen-choices li {
+  float: left;
+  list-style: none;
+}
+.chosen-container-multi .chosen-choices li.search-field {
+  margin: 0;
+  padding: 0;
+  white-space: nowrap;
+}
+.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
+  margin: 1px 0;
+  padding: 0;
+  height: 25px;
+  outline: 0;
+  border: 0 !important;
+  background: transparent !important;
+  box-shadow: none;
+  color: #999;
+  font-size: 100%;
+  font-family: sans-serif;
+  line-height: normal;
+  border-radius: 0;
+}
+.chosen-container-multi .chosen-choices li.search-choice {
+  position: relative;
+  margin: 3px 5px 3px 0;
+  padding: 3px 20px 3px 5px;
+  border: 1px solid #aaa;
+  max-width: 100%;
+  border-radius: 3px;
+  background-color: #eeeeee;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+  background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-size: 100% 19px;
+  background-repeat: repeat-x;
+  background-clip: padding-box;
+  box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+  color: #333;
+  line-height: 13px;
+  cursor: default;
+}
+.chosen-container-multi .chosen-choices li.search-choice span {
+  word-wrap: break-word;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
+  position: absolute;
+  top: 4px;
+  right: 3px;
+  display: block;
+  width: 12px;
+  height: 12px;
+  background: url('chosen-sprite.png') -42px 1px no-repeat;
+  font-size: 1px;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
+  background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-choices li.search-choice-disabled {
+  padding-right: 5px;
+  border: 1px solid #ccc;
+  background-color: #e4e4e4;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+  background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+  color: #666;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus {
+  background: #d4d4d4;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
+  background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-results {
+  margin: 0;
+  padding: 0;
+}
+.chosen-container-multi .chosen-drop .result-selected {
+  display: list-item;
+  color: #ccc;
+  cursor: default;
+}
+
+/* @end */
+/* @group Active  */
+.chosen-container-active .chosen-single {
+  border: 1px solid #5897fb;
+  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active.chosen-with-drop .chosen-single {
+}
+.chosen-container-active.chosen-with-drop .chosen-single div {
+  border-left: none;
+  background: transparent;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div b {
+  background-position: -18px 2px;
+}
+.chosen-container-active .chosen-choices {
+  border: 1px solid #5897fb;
+  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active .chosen-choices li.search-field input[type="text"] {
+  color: #222 !important;
+}
+
+/* @end */
+/* @group Disabled Support */
+.chosen-disabled {
+  opacity: 0.5 !important;
+  cursor: default;
+}
+.chosen-disabled .chosen-single {
+  cursor: default;
+}
+.chosen-disabled .chosen-choices .search-choice .search-choice-close {
+  cursor: default;
+}
+
+/* @end */
+/* @group Right to Left */
+.chosen-rtl {
+  text-align: right;
+}
+.chosen-rtl .chosen-single {
+  overflow: visible;
+  padding: 0 8px 0 0;
+}
+.chosen-rtl .chosen-single span {
+  margin-right: 0;
+  margin-left: 26px;
+  direction: rtl;
+}
+.chosen-rtl .chosen-single-with-deselect span {
+  margin-left: 38px;
+}
+.chosen-rtl .chosen-single div {
+  right: auto;
+  left: 3px;
+}
+.chosen-rtl .chosen-single abbr {
+  right: auto;
+  left: 26px;
+}
+.chosen-rtl .chosen-choices li {
+  float: right;
+}
+.chosen-rtl .chosen-choices li.search-field input[type="text"] {
+  direction: rtl;
+}
+.chosen-rtl .chosen-choices li.search-choice {
+  margin: 3px 5px 3px 0;
+  padding: 3px 5px 3px 19px;
+}
+.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
+  right: auto;
+  left: 4px;
+}
+.chosen-rtl.chosen-container-single-nosearch .chosen-search,
+.chosen-rtl .chosen-drop {
+  left: 9999px;
+}
+.chosen-rtl.chosen-container-single .chosen-results {
+  margin: 0 0 4px 4px;
+  padding: 0 4px 0 0;
+}
+.chosen-rtl .chosen-results li.group-option {
+  padding-right: 15px;
+  padding-left: 0;
+}
+.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
+  border-right: none;
+}
+.chosen-rtl .chosen-search input[type="text"] {
+  padding: 4px 5px 4px 20px;
+  background: white url('chosen-sprite.png') no-repeat -30px -20px;
+  background: url('chosen-sprite.png') no-repeat -30px -20px;
+  direction: rtl;
+}
+.chosen-rtl.chosen-container-single .chosen-single div b {
+  background-position: 6px 2px;
+}
+.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
+  background-position: -12px 2px;
+}
+
+/* @end */
+/* @group Retina compatibility */
+@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
+  .chosen-rtl .chosen-search input[type="text"],
+  .chosen-container-single .chosen-single abbr,
+  .chosen-container-single .chosen-single div b,
+  .chosen-container-single .chosen-search input[type="text"],
+  .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
+  .chosen-container .chosen-results-scroll-down span,
+  .chosen-container .chosen-results-scroll-up span {
+    background-image: url('chosen-sprite@2x.png') !important;
+    background-size: 52px 37px !important;
+    background-repeat: no-repeat !important;
+  }
+}
+/* @end */

+ 150 - 0
app/assets/stylesheets/color_picker.css.scss

@@ -0,0 +1,150 @@
+/**
+*
+* jQuery Color Picker Plugin
+* URL: http://www.codecanyon.net/user/bamdaa
+* Version: 2.0
+* Author: BamDaa
+* Author URL: http://www.codecanyon.net/user/bamdaa
+*
+*/
+
+/*  Firefox normalize */
+.bmd-cp-window *::-moz-focus-inner{ 
+	border: 0;
+	padding: 0;
+	outline: 0;
+}
+
+/* Picker Window */
+.bmd-cp-window{ 
+	font-family: Tahoma;
+	background-color: #333;
+	display: none;
+	left: 0;
+	top: 0;
+	position: absolute;
+	z-index: 515;
+	-webkit-box-shadow: 0px 0px 10px rgba(50, 50, 50, 0.5);
+	-moz-box-shadow:    0px 0px 10px rgba(50, 50, 50, 0.5);
+	box-shadow:         0px 0px 10px rgba(50, 50, 50, 0.5);	
+}
+
+/* Picker Container */
+.bmd-cp-container{
+	position: relative;
+	padding: 5px;
+	margin: 0;
+}
+
+/* Picker Container in Fullscreen mode */
+.bmd-cp-fullscreen > .bmd-cp-container{
+	padding: 10px;
+}
+
+/* Control Buttons */
+.bmd-cp-container button[class^='bmd-cp-button-']{
+	background-repeat: no-repeat;
+	background-position: center center;
+	right: -20px;
+	border: 0;
+	margin: 0;
+}
+
+/* Controls Container */
+.bmd-cp-controls-container{
+	text-align: right;
+	padding-top: 5px;
+	margin: 0;
+}
+
+/* Control Buttons in Normal mode */
+.bmd-cp-controls{
+	position: absolute;	
+	padding: 0;
+	height: 20px;
+	width: 20px;
+}
+
+/* Close - Button */
+.bmd-cp-container .bmd-cp-button-close{
+	top: 5px;
+	background-color: #c0392b;
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOAQMAAAAlhr+SAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAChJREFUCNdjAAIHDgYFAQYBBQYOBwaWBgZmBiACMoBcoCBQCqgAqAoAPTcC74JqR1MAAAAASUVORK5CYII=);
+	
+}
+
+/* Fullscreen - Button */
+.bmd-cp-container > .bmd-cp-button-fullscreen{
+	top: 26px;
+	background-color: #333;	
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOAQMAAAAlhr+SAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAChJREFUCNdj+GDDcICHYYEIwwQVBg4HBpYGBjAAMoBcoCBQCqgAqAwAsQ4IWYLWtUcAAAAASUVORK5CYII=);
+}
+
+/* Buttons, Input in Controls container */
+.bmd-cp-controls-container button[class^='bmd-cp-button-'],
+.bmd-cp-controls-container input{
+	position: static;
+	margin: 0;
+	padding: 5px;	
+	outline: none;
+	display: inline-block;	
+	border: 0;
+}
+
+/* Buttons in Controls container */
+.bmd-cp-controls-container button[class^='bmd-cp-button-']{
+	height: 27px;
+	width: 27px;
+}
+
+/* Fullscreen Button transform to Normal Button in Fullscreen mode */
+.bmd-cp-controls-container > .bmd-cp-button-fullscreen{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOAQMAAAAlhr+SAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAACZJREFUCNdjAAIHDgaVCQwiCxh4DjDYfGAAAyADyAUKAqWACoACAJeSB1ELCBg0AAAAAElFTkSuQmCC);
+	background-color: #e36c09;
+}
+
+/* Color list containing table */
+.bmd-cp-item-container{
+	width: 100%;
+	border-spacing: 0;
+	padding: 0;
+	margin: 0;	
+}
+
+/* Color cells */
+.bmd-cp-item-container td{
+	height: 20px;
+	width: 20px;
+	cursor: pointer;
+	padding: 0;
+	margin: 0;
+}
+
+/* Insert Code input */
+.bmd-cp-insert-input{
+	vertical-align:top;
+	border: 0;	
+	display: block;
+	width: 80px;
+	height: 27px !important;
+	padding: 5px !important;
+	font-family: Tahoma;
+	-webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+/* Accept color code Button */
+.bmd-cp-button-accept{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOAQMAAAAlhr+SAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAACFJREFUCNdjQAAOBgYBBgYFBgcHBoUGBkEGBi4GBhaENAAfGwF4FBITzQAAAABJRU5ErkJggg==);	
+	background-color: #19b597;
+	color: #fff;
+}
+.bmd-cp-button-accept:hover{ background-color: #16a085;	}
+
+/* Color prefix Button # */
+.bmd-cp-button-prefix{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOAQMAAAAlhr+SAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAABdJREFUCNdjAAIOBxCy/wAk4QhNEKgKAGsnBS9U7mopAAAAAElFTkSuQmCC);
+	background-color: #7f8c8d;
+	color: #666;
+}

+ 8 - 0
app/assets/stylesheets/create_reports.css.scss

@@ -0,0 +1,8 @@
+// Place all the styles related to the create_reports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+.create_reports_header_dtstart
+{
+  width: 150px;
+}

+ 183 - 0
app/assets/stylesheets/custom.css.scss

@@ -0,0 +1,183 @@
+.roundtop {
+  -moz-border-radius: 5px 5px 0 0;
+  -webkit-border-radius: 5px 5px 0 0;
+  border-radius: 5px 5px 0 0;
+}
+
+.settingscontainer {
+  border: 1px solid #ccc;
+  padding: 5px;
+  margin-bottom: 5px;
+  width: 738px !important;
+}
+
+.noticecontainer, .errorcontainer {
+  border: none;
+  padding: 5px 5px 0px 5px;
+  width: 738px;
+}
+
+input[disabled] {
+  background-color: #ededed !important;
+}
+
+input[readonly] {
+  background-color: #ededed !important;
+}
+
+
+th {
+  background-color: #ccc !important;
+}
+
+.field_with_errors {
+  float: left !important;
+  margin-right: 10px !important;
+  padding: 0px !important;
+
+  input {
+    background-color: #ffc7c7 !important;
+  }
+}
+
+#error_explanation {
+  width: 738px !important;
+  border: 1px solid #c00 !important;
+  padding: 5px !important;
+  padding-bottom: 0;
+  margin-bottom: 20px;
+  background-color: #f0f0f0;
+  h2 {
+    text-align: left;
+    font-weight: bold;
+    padding: 5px 5px 5px 15px;
+    font-size: 12px;
+    margin: 0px !important;
+    margin-bottom: 0px;
+    background-color: #ff9497;
+    color: #fff;
+  }
+  ul li {
+    font-size: 12px;
+    list-style: square;
+  }
+}
+
+input[type=number] {
+  background-color: #fff;
+  border:1px solid #bbb !important;
+  color:#000;
+
+  margin:0.5em 0;
+}
+
+input[type=number]:focus {
+  border-color:#666 !important;
+}
+
+input {
+  font-size: 12px;
+}
+
+select {
+  font-size: 12px;
+}
+
+body {
+  font-family: Arial,Helvetica,sans-serif !important;
+  font-size: 12px !important;
+}
+
+.view_details {
+
+  td {
+    border: 1px solid #ccc;
+    height: 35px;
+  }
+  .col1 {
+    width: 45%;
+    font-weight: bold;
+    text-align: right;
+  }
+}
+
+table.view_details tbody tr td {
+  background-color: #ffffe0;
+}
+
+table.view_details tbody tr.actions td {
+  background-color: #ffffff;
+}
+
+div.settingsbackground {
+  background-color: #ffffe0 !important;
+}
+
+#tabs {
+  font-family: Arial,Helvetica,sans-serif !important;
+  font-size: 12px !important;
+
+  a:hover {
+    background-color: #ffffe0;
+  }
+}
+
+#progressbar {
+  height: 15px;
+  margin-bottom: 10px;
+}
+
+.progress-label {
+  float: left;
+  left: 50%;
+  top: 0px;
+  font-weight: bold;
+  text-shadow: 1px 1px 0 #fff;
+  font-size: 9px !important;
+  padding-left: 5px;
+}
+
+#progressbar .ui-progressbar-value {
+  background-color: #f0f0f0;
+}
+
+div.processing {
+  background-color: #f0f0f0;
+}
+
+.create_button {
+  background-color: #f0f0f0;
+  text-decoration: none;
+
+  padding: 2px 6px 2px 6px;
+  border-top: 1px solid #CCCCCC;
+  border-right: 1px solid #333333;
+  border-bottom: 1px solid #333333;
+  border-left: 1px solid #CCCCCC;
+}
+
+.create_button:hover {
+  background-color: #ffffe0;
+}
+
+.list_table {
+  table-layout: fixed;
+}
+
+.list_table td {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.span-half {
+  width: 18px;
+  float: left;
+  margin-right: 10px;
+}
+
+.span-9-half {
+  width: 364px;
+  float: left;
+  margin-right: 10px;
+}

+ 13 - 0
app/assets/stylesheets/dashboard.css.scss

@@ -0,0 +1,13 @@
+// Place all the styles related to the Dashboard controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+.dashboard_header_event_id
+{
+  width: 150px;
+}
+
+.dashboard_header_dtstart
+{
+  width: 150px;
+}

+ 3 - 0
app/assets/stylesheets/data_export.css.scss

@@ -0,0 +1,3 @@
+// Place all the styles related to the DataExport controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/

+ 38 - 0
app/assets/stylesheets/datetimepicker.css.scss

@@ -0,0 +1,38 @@
+.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
+.ui-timepicker-div dl { text-align: left; }
+.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
+.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
+.ui-timepicker-div td { font-size: 90%; }
+.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
+.ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }
+
+.ui-timepicker-rtl{ direction: rtl; }
+.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
+.ui-timepicker-rtl dl dt{ float: right; clear: right; }
+.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }
+
+/* Shortened version style */
+.ui-timepicker-div.ui-timepicker-oneLine { padding-right: 2px; }
+.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time, 
+.ui-timepicker-div.ui-timepicker-oneLine dt { display: none; }
+.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label { display: block; padding-top: 2px; }
+.ui-timepicker-div.ui-timepicker-oneLine dl { text-align: right; }
+.ui-timepicker-div.ui-timepicker-oneLine dl dd, 
+.ui-timepicker-div.ui-timepicker-oneLine dl dd > div { display:inline-block; margin:0; }
+.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,
+.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; }
+.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,
+.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; }
+.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,
+.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; }
+
+/* OADR Custom styles */
+
+input.form-control.hasDatepicker {
+  cursor: pointer;
+}
+
+#ui-datepicker-div.ui-datepicker {
+  font-size: 12px;
+  width: 20em;
+}

+ 3 - 0
app/assets/stylesheets/emix_units.css.scss

@@ -0,0 +1,3 @@
+// Place all the styles related to the emix_units controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/

+ 3 - 0
app/assets/stylesheets/event_responses.css.scss

@@ -0,0 +1,3 @@
+// Place all the styles related to the event_responses controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/

+ 3 - 0
app/assets/stylesheets/event_signal_intervals.css.scss

@@ -0,0 +1,3 @@
+// Place all the styles related to the EventSignalIntervals controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/

+ 0 - 0
app/assets/stylesheets/event_signals.css.scss


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません