Merge branch 'develop' into features/local_file_previews

This commit is contained in:
aignatov-bio 2021-03-08 11:30:47 +01:00
commit df4297f6f7
360 changed files with 12162 additions and 6112 deletions

View file

@ -1,4 +1,4 @@
FROM ruby:2.6.4-buster
FROM ruby:2.7.2-buster
MAINTAINER BioSistemika <info@biosistemika.com>
ARG WKHTMLTOPDF_PACKAGE_URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb

View file

@ -1,4 +1,4 @@
FROM ruby:2.6.4-buster
FROM ruby:2.7.2-buster
MAINTAINER BioSistemika <info@biosistemika.com>
ARG WKHTMLTOPDF_PACKAGE_URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb

View file

@ -2,7 +2,7 @@
source 'http://rubygems.org'
ruby '2.6.4'
ruby '2.7.2'
gem 'bootsnap', require: false
gem 'bootstrap-sass', '~> 3.4.1'
@ -12,7 +12,7 @@ gem 'devise_invitable'
gem 'figaro'
gem 'pg', '~> 1.1'
gem 'pg_search' # PostgreSQL full text search
gem 'rails', '~> 6.0.0'
gem 'rails', '~> 6.1.1'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'sanitize', '~> 5.2'
gem 'sassc-rails'
@ -66,12 +66,12 @@ gem 'deface', '~> 1.0'
gem 'down', '~> 5.0'
gem 'faker' # Generate fake data
gem 'fastimage' # Light gem to get image resolution
gem 'httparty', '~> 0.13.1'
gem 'httparty', '~> 0.17.3'
gem 'i18n-js', '~> 3.6' # Localization in javascript files
gem 'jbuilder' # JSON structures via a Builder-style DSL
gem 'logging', '~> 2.0.0'
gem 'nested_form_fields'
gem 'nokogiri', '~> 1.10.8' # HTML/XML parser
gem 'nokogiri', '~> 1.11.0' # HTML/XML parser
gem 'rails_autolink', '~> 1.1', '>= 1.1.6'
gem 'rgl' # Graph framework for project diagram calculations
gem 'roo', '~> 2.8.2' # Spreadsheet parser

View file

@ -17,7 +17,7 @@ GIT
GIT
remote: https://github.com/biosistemika/yomu
revision: 063b855d672e9dd9de1e6e585b349a9b63e120c3
revision: 3baa161e76b433ede55142dd1bb7cc04159f93f0
branch: master
specs:
yomu (0.2.4)
@ -42,115 +42,134 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actioncable (6.0.3)
actionpack (= 6.0.3)
actioncable (6.1.1)
actionpack (= 6.1.1)
activesupport (= 6.1.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
actionmailbox (6.1.1)
actionpack (= 6.1.1)
activejob (= 6.1.1)
activerecord (= 6.1.1)
activestorage (= 6.1.1)
activesupport (= 6.1.1)
mail (>= 2.7.1)
actionmailer (6.0.3)
actionpack (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
actionmailer (6.1.1)
actionpack (= 6.1.1)
actionview (= 6.1.1)
activejob (= 6.1.1)
activesupport (= 6.1.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3)
actionview (= 6.0.3)
activesupport (= 6.0.3)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.1)
actionview (= 6.1.1)
activesupport (= 6.1.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3)
actionpack (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
actiontext (6.1.1)
actionpack (= 6.1.1)
activerecord (= 6.1.1)
activestorage (= 6.1.1)
activesupport (= 6.1.1)
nokogiri (>= 1.8.5)
actionview (6.0.3)
activesupport (= 6.0.3)
actionview (6.1.1)
activesupport (= 6.1.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.10)
actionpack (>= 4.1, < 6.1)
activemodel (>= 4.1, < 6.1)
active_model_serializers (0.10.12)
actionpack (>= 4.1, < 6.2)
activemodel (>= 4.1, < 6.2)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (6.0.3)
activesupport (= 6.0.3)
activejob (6.1.1)
activesupport (= 6.1.1)
globalid (>= 0.3.6)
activemodel (6.0.3)
activesupport (= 6.0.3)
activerecord (6.0.3)
activemodel (= 6.0.3)
activesupport (= 6.0.3)
activerecord-import (1.0.4)
activemodel (6.1.1)
activesupport (= 6.1.1)
activerecord (6.1.1)
activemodel (= 6.1.1)
activesupport (= 6.1.1)
activerecord-import (1.0.7)
activerecord (>= 3.2)
activestorage (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
activestorage (6.1.1)
actionpack (= 6.1.1)
activejob (= 6.1.1)
activerecord (= 6.1.1)
activesupport (= 6.1.1)
marcel (~> 0.3.1)
activesupport (6.0.3)
mimemagic (~> 0.3.2)
activesupport (6.1.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
aes_key_wrap (1.0.1)
aes_key_wrap (1.1.0)
ajax-datatables-rails (0.3.1)
railties (>= 3.1)
aspector (0.14.0)
ast (2.4.1)
auto_strip_attributes (2.5.0)
ast (2.4.2)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
autoprefixer-rails (9.7.0)
autoprefixer-rails (10.2.0.0)
execjs
autosize-rails (1.18.17)
rails (>= 3.1)
awesome_print (1.8.0)
aws-eventstream (1.0.3)
aws-partitions (1.211.0)
aws-sdk-core (3.67.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1.0)
aws-eventstream (1.1.0)
aws-partitions (1.420.0)
aws-record (2.5.0)
aws-sdk-dynamodb (~> 1.18)
aws-sdk-core (3.111.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.24.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-dynamodb (1.58.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-rails (2.1.0)
aws-sdk-kms (1.41.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-rails (3.6.0)
aws-record (~> 2)
aws-sdk-ses (~> 1)
railties (>= 3)
aws-sdk-s3 (1.48.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-sqs (~> 1)
aws-sessionstore-dynamodb (~> 2)
concurrent-ruby (~> 1)
railties (>= 5.2.0)
aws-sdk-s3 (1.87.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sdk-ses (1.25.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-ses (1.36.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
backports (3.15.0)
aws-sdk-sqs (1.35.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sessionstore-dynamodb (2.0.1)
aws-sdk-dynamodb (~> 1)
rack (~> 2)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
backports (3.20.2)
base62 (1.0.0)
bcrypt (3.1.13)
better_errors (2.5.1)
bcrypt (3.1.16)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindata (2.4.4)
binding_of_caller (0.8.0)
bindata (2.4.8)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
bootsnap (1.4.5)
bootsnap (1.6.0)
msgpack (~> 1.0)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
@ -160,34 +179,33 @@ GEM
momentjs-rails (>= 2.8.1)
bootstrap_form (2.7.0)
builder (3.2.4)
bullet (6.0.2)
bullet (6.1.3)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.0.1)
capybara (3.29.0)
byebug (11.1.3)
capybara (3.35.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
capybara-email (3.0.1)
capybara-email (3.0.2)
capybara (>= 2.4, < 4.0)
mail
caracal (1.4.1)
nokogiri (~> 1.6)
rubyzip (~> 1.1)
tilt (>= 1.4)
caracal-rails (1.0.1)
caracal-rails (1.0.2)
caracal (~> 1.0)
rails (>= 3.2)
case_transform (0.2)
activesupport
childprocess (1.0.1)
rake (< 13.0)
chunky_png (1.3.11)
coderay (1.1.2)
childprocess (3.0.0)
chunky_png (1.4.0)
coderay (1.1.3)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 5.2.0)
@ -195,11 +213,11 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
concurrent-ruby (1.1.8)
crack (0.4.5)
rexml
crass (1.0.6)
cucumber (3.1.2)
cucumber (3.2.0)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
@ -221,76 +239,80 @@ GEM
railties (>= 4.2, < 7)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
database_cleaner (1.7.0)
debug_inspector (0.0.3)
deface (1.5.1)
database_cleaner (1.8.5)
debug_inspector (1.0.0)
deface (1.6.1)
nokogiri (>= 1.6)
polyglot
rails (>= 4.1)
rails (>= 5.2)
rainbow (>= 2.1.0)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
delayed_job_active_record (4.1.4)
activerecord (>= 3.0, < 6.1)
delayed_job (4.1.9)
activesupport (>= 3.0, < 6.2)
delayed_job_active_record (4.1.5)
activerecord (>= 3.0, < 6.2)
delayed_job (>= 3.0, < 5)
devise (4.7.1)
devise (4.7.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise_invitable (2.0.1)
devise_invitable (2.0.3)
actionmailer (>= 5.0)
devise (>= 4.6)
diff-lcs (1.3)
discard (1.1.0)
diff-lcs (1.4.4)
discard (1.2.0)
activerecord (>= 4.2, < 7)
docile (1.3.2)
doorkeeper (5.1.1)
docile (1.3.5)
doorkeeper (5.4.0)
railties (>= 5)
down (5.0.0)
down (5.2.0)
addressable (~> 2.5)
erubi (1.9.0)
et-orbi (1.2.2)
erubi (1.10.0)
et-orbi (1.2.4)
tzinfo
execjs (2.7.0)
factory_bot (5.0.2)
activesupport (>= 4.2.0)
factory_bot_rails (5.0.2)
factory_bot (~> 5.0.2)
railties (>= 4.2.0)
faker (2.2.2)
i18n (~> 1.6.0)
faraday (0.15.4)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.1.0)
factory_bot (~> 6.1.0)
railties (>= 5.0.0)
faker (2.15.1)
i18n (>= 1.6, < 2)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
fastimage (2.1.7)
ffi (1.11.1)
figaro (1.1.1)
thor (~> 0.14)
fugit (1.3.3)
ruby2_keywords
faraday-net_http (1.0.1)
fastimage (2.2.1)
ffi (1.14.2)
figaro (1.2.0)
thor (>= 0.14.0, < 2)
fugit (1.4.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.1)
raabro (~> 1.4)
generator (0.0.1)
gherkin (5.1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
hammerjs-rails (2.0.8)
hashdiff (1.0.0)
hashie (3.6.0)
httparty (0.13.7)
json (~> 1.8)
hashdiff (1.0.1)
hashie (4.1.0)
httparty (0.17.3)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (1.6.0)
i18n (1.8.7)
concurrent-ruby (~> 1.0)
i18n-js (3.6.0)
i18n-js (3.8.0)
i18n (>= 0.6.6)
image_processing (1.9.3)
image_processing (1.12.1)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3)
iniparse (1.4.4)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
ruby-vips (>= 2.0.17, < 3)
iniparse (1.5.0)
jbuilder (2.11.2)
activesupport (>= 5.0.0)
jmespath (1.4.0)
jquery-rails (4.3.5)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
@ -298,14 +320,14 @@ GEM
railties (>= 3.2.16)
js_cookie_rails (2.2.0)
railties (>= 3.1)
json (1.8.6)
json-jwt (1.11.0)
json (2.5.1)
json-jwt (1.13.0)
activesupport (>= 4.2)
aes_key_wrap
bindata
json_matchers (0.11.1)
json_schema
json_schema (0.20.7)
json_schema (0.20.9)
jsonapi-renderer (0.2.2)
jwt (1.5.6)
kaminari (1.2.1)
@ -321,93 +343,94 @@ GEM
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
lazy_priority_queue (0.1.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
listen (3.4.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
little-plugger (1.1.4)
logging (2.0.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
loofah (2.5.0)
loofah (2.9.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mime-types-data (3.2020.1104)
mimemagic (0.3.5)
mini_magick (4.9.5)
mini_magick (4.11.0)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
mini_portile2 (2.5.0)
minitest (5.14.3)
momentjs-rails (2.17.1)
railties (>= 3.1)
msgpack (1.3.1)
multi_json (1.13.1)
msgpack (1.4.2)
multi_json (1.15.0)
multi_test (0.1.2)
multi_xml (0.6.0)
multipart-post (2.1.1)
nested_form_fields (0.8.2)
nested_form_fields (0.8.4)
coffee-rails (>= 3.2.1)
jquery-rails
rails (>= 3.2.0)
newrelic_rpm (6.6.0.358)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.2)
newrelic_rpm (6.15.0)
nio4r (2.5.4)
nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogumbo (2.0.4)
nokogiri (~> 1.8, >= 1.8.4)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.9.0)
hashie (>= 3.4.6, < 3.7.0)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-azure-activedirectory (1.0.0)
jwt (~> 1.5)
omniauth (~> 1.1)
omniauth-linkedin-oauth2 (1.0.0)
omniauth-oauth2
omniauth-oauth2 (1.6.0)
oauth2 (~> 1.1)
omniauth (~> 1.9)
omniauth-oauth2 (1.7.1)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
omniauth-rails_csrf_protection (0.1.2)
actionpack (>= 4.2)
omniauth (>= 1.3.1)
orm_adapter (0.5.0)
overcommit (0.49.1)
childprocess (>= 0.6.3, < 2.0)
overcommit (0.57.0)
childprocess (>= 0.6.3, < 5)
iniparse (~> 1.4)
parallel (1.19.2)
parser (2.7.1.4)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
pg (1.1.4)
pg_search (2.3.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
pg (1.2.3)
pg_search (2.3.5)
activerecord (>= 5.2)
activesupport (>= 5.2)
polyglot (0.3.5)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.7.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.10)
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.1)
puma (4.3.5)
public_suffix (4.0.6)
puma (5.2.0)
nio4r (~> 2.0)
raabro (1.1.6)
raabro (1.4.0)
racc (1.5.2)
rack (2.2.3)
rack-attack (6.1.0)
rack-attack (6.4.0)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
rack (>= 2.0.0)
@ -415,25 +438,25 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.3)
actioncable (= 6.0.3)
actionmailbox (= 6.0.3)
actionmailer (= 6.0.3)
actionpack (= 6.0.3)
actiontext (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
activemodel (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
bundler (>= 1.3.0)
railties (= 6.0.3)
rails (6.1.1)
actioncable (= 6.1.1)
actionmailbox (= 6.1.1)
actionmailer (= 6.1.1)
actionpack (= 6.1.1)
actiontext (= 6.1.1)
actionview (= 6.1.1)
activejob (= 6.1.1)
activemodel (= 6.1.1)
activerecord (= 6.1.1)
activestorage (= 6.1.1)
activesupport (= 6.1.1)
bundler (>= 1.15.0)
railties (= 6.1.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
@ -446,54 +469,53 @@ GEM
rails (> 3.1)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (6.0.3)
actionpack (= 6.0.3)
activesupport (= 6.0.3)
railties (6.1.1)
actionpack (= 6.1.1)
activesupport (= 6.1.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
thor (~> 1.0)
rainbow (3.0.0)
rake (12.3.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rake (13.0.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.2.0)
recaptcha (5.1.0)
rdoc (6.3.0)
recaptcha (5.6.0)
json
regexp_parser (1.6.0)
responders (3.0.0)
regexp_parser (2.0.3)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.4)
rgl (0.5.6)
rgl (0.5.7)
lazy_priority_queue (~> 0.1.0)
stream (~> 0.5.2)
roo (2.8.2)
stream (~> 0.5.3)
roo (2.8.3)
nokogiri (~> 1)
rubyzip (>= 1.2.1, < 2.0.0)
rotp (6.0.0)
addressable (~> 2.7)
rqrcode (1.1.2)
rubyzip (>= 1.3.0, < 3.0.0)
rotp (6.2.0)
rqrcode (1.2.0)
chunky_png (~> 1.0)
rqrcode_core (~> 0.1)
rqrcode_core (0.1.2)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.4)
rqrcode_core (~> 0.2)
rqrcode_core (0.2.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (4.0.0.beta2)
rspec-support (~> 3.10.0)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.8)
rspec-expectations (~> 3.8)
rspec-mocks (~> 3.8)
rspec-support (~> 3.8)
rspec-support (3.8.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.1)
rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
@ -501,25 +523,26 @@ GEM
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-performance (1.5.1)
rubocop (>= 0.71.0)
rubocop-rails (2.4.0)
rubocop-performance (1.7.1)
rubocop (>= 0.82.0)
rubocop-rails (2.6.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.72.0)
ruby-graphviz (1.2.4)
ruby-progressbar (1.10.1)
ruby-vips (2.0.15)
rubocop (>= 0.82.0)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.11.0)
ruby-vips (2.0.17)
ffi (~> 1.9)
ruby_dep (1.5.0)
ruby2_keywords (0.0.4)
rubyzip (1.3.0)
rufus-scheduler (3.6.0)
rufus-scheduler (3.7.0)
fugit (~> 1.1, >= 1.1.6)
safe_yaml (1.0.5)
sanitize (5.2.1)
sanitize (5.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
sassc (2.2.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
@ -527,55 +550,56 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
scenic (1.5.1)
scenic (1.5.4)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
sdoc (1.0.0)
sdoc (1.1.0)
rdoc (>= 5.0)
selenium-webdriver (3.142.4)
childprocess (>= 0.5, < 3.0)
rubyzip (~> 1.2, >= 1.2.2)
shoulda-matchers (4.1.2)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
silencer (1.0.1)
simple_token_authentication (1.16.0)
actionmailer (>= 3.2.6, < 7)
actionpack (>= 3.2.6, < 7)
devise (>= 3.2, < 6)
simplecov (0.17.0)
simplecov (0.21.2)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
spinjs-rails (1.4)
rails (>= 3.1)
sprockets (4.0.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
stream (0.5.2)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
timecop (0.9.1)
tinymce-rails (4.9.10)
stream (0.5.3)
generator
thor (1.1.0)
tilt (2.0.10)
timecop (0.9.2)
tinymce-rails (4.9.11)
railties (>= 3.1.1)
turbolinks (5.1.1)
turbolinks-source (~> 5.1)
turbolinks-source (5.2.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
underscore-rails (1.8.3)
unicode-display_width (1.7.0)
uniform_notifier (1.12.1)
warden (1.2.8)
rack (>= 2.0.6)
webmock (3.7.2)
uniform_notifier (1.13.2)
warden (1.2.9)
rack (>= 2.0.9)
webmock (3.11.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@ -583,7 +607,7 @@ GEM
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.1)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
whacamole (1.2.0)
@ -592,7 +616,7 @@ GEM
wkhtmltopdf-heroku (2.12.5.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.0)
zeitwerk (2.4.2)
PLATFORMS
ruby
@ -637,7 +661,7 @@ DEPENDENCIES
fastimage
figaro
hammerjs-rails
httparty (~> 0.13.1)
httparty (~> 0.17.3)
i18n-js (~> 3.6)
image_processing (~> 1.2)
jbuilder
@ -655,7 +679,7 @@ DEPENDENCIES
momentjs-rails (~> 2.17.1)
nested_form_fields
newrelic_rpm
nokogiri (~> 1.10.8)
nokogiri (~> 1.11.0)
omniauth
omniauth-azure-activedirectory
omniauth-linkedin-oauth2
@ -669,7 +693,7 @@ DEPENDENCIES
puma
rack-attack
rack-cors
rails (~> 6.0.0)
rails (~> 6.1.1)
rails-controller-testing
rails_12factor
rails_autolink (~> 1.1, >= 1.1.6)
@ -710,7 +734,7 @@ DEPENDENCIES
yomu!
RUBY VERSION
ruby 2.6.4p104
ruby 2.7.2p137
BUNDLED WITH
1.17.3
2.1.4

View file

@ -85,7 +85,7 @@ tests-ci:
@docker-compose run --rm web bash -c "bundle install && yarn install"
@docker-compose up -d webpack
@docker-compose ps
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e MAIL_FROM=MAIL_FROM -e MAIL_REPLYTO=MAIL_REPLYTO -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "rake db:create && rake db:migrate && yarn install && bundle exec rspec && bundle exec cucumber"
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e MAIL_FROM=MAIL_FROM -e MAIL_REPLYTO=MAIL_REPLYTO -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "rake db:create && rake db:migrate && yarn install && bundle exec rspec"
console:
@$(MAKE) rails cmd="rails console"

View file

@ -1 +1 @@
1.20.4
1.21.5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

View file

@ -1,18 +0,0 @@
# Content for tables used in demo project.
module1:
experimental_design_table: '{"data":[["group/time","1 dpi","6 dpi","",""],["PVYNTN","1","1","",""],["mock","1","1","",""],["","","","",""]]}'
module2:
samples_table: '{"data":[["Name","Sample type"],["Mock 1dpi","potatoe leaves"],["Mock 6dpi","potatoe leaves"],["PVY NTN 1dpi","potatoe leaves"],["PVY NTN 6dpi","potatoe leaves"]]}'
module3:
nanodrop: '{"data":[["Sample name","ng/ul ","260/280 ","260/230 "],["PVY NTN 6dpi","1.05","1.39","1.61"],["PVY NTN 1dpi","320.52","2.16","2.26"],["Mock 6dpi","906.19","2.15","2.26"],["Mock 1dpi","940.22","2.17","2.27"]]}'
module4:
volumes: '{"data":[["Amount of starting material (mg)","Volume of Buffer RLT (µl)"],["<20","350"],["20 - 30","600"]]}'
dna_q: '{"data":[["Sample 1","Quantity "],["1","0,2"],["2","0,5"],["3","0,4"],["4","1,1"],["5","12,5"],["6","0,05"],["7","0"],["8","0"],["9","0"],["10","0"],["11","0"],["12","4,7"],["13","2,3"],["14","5,6"],["15","2,6"],["16","8,9"],["17","1,7"],["18","1"]]}'
module6:
mastermix: '{"data":[["Date:","","","","","","","","","","","",""],["Reaction volume:","20 ul","","","","","","","","","","",""],["UMM/reaction:","10 µl","","","","","","","","","","",""],["sample/reaction:","6 µl","","","","","","","","","","",""],["","","","","","","","","","","","",""],["Chemistry","TaqMan","","","SYBR Green I","","","TaqMan","","","SYBR Green I","",""],["Gene","cox","","","cab4","","","PVY-NTN","","","PR-1","",""],["","conc.*","final conc.**","µl/reaction","conc.*","final conc.**","µl/reaction","conc.*","final conc.**","µl/reaction","conc.*","final conc.**","µl/reaction"],["Probe","10 µM","150 nM","0.3","/","/","/","5 µM","150 nM","0.6","/","/","/"],["FP","30 µM","300 nM","0.2","30 µM","300 nM ","0.2","10 µM","250 nM","0.5","30 µM","300 nM ","0.2"],["RP","30 µM","300 nM","0.2","30 µM","300 nM ","0.2","10 µM","250 nM","0.5","30 µM","300 nM ","0.2"]]}'
distribution: '{"data":[["%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t","%{sample0} (100x)\t",null,null,"Mix smpl (10x)\t","Mix smpl (10x)\t"],["%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t","%{sample0} (1000x)\t",null,null,"Mix smpl (100x)\t","Mix smpl (100x)\t"],["%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t","%{sample1} (100x)\t",null,null,"Mix smpl (1000x)\t","Mix smpl (1000x)\t"],["%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t","%{sample1} (1000x)\t",null,null,"Mix smpl (10000x)\t","Mix smpl (10000x)\t"],["%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t","%{sample2} (100x)\t",null,null,"NTC1","NTC2"],["%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t","%{sample2} (1000x)\t",null,null,"NTC1","NTC2"],["%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t","%{sample3} (100x)\t",null,null,"NTC1","NTC2"],["%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t","%{sample3} (1000x)\t",null,null,"NTC1","NTC2"],[null,null,null,null,null,null,null,null,null,null,null,null]]}'
qpcr_raw_data: '{"data":[["Sample 1","Quantity ","Column 3","Column 4"],["2","0,2","0,4","0,08"],["2","0,5","1","0,5"],["3","0,4","1,2","0,48"],["4","1,1","4,4","4,84"],["5","12,5","62,5","781,25"],["6","0,05","0,3","0,015"],["7","0","4","0"],["8","0","0","0"],["9","0","0","0"],["10","0","0","0"],["11","0","0","0"],["12","4,7","56,4","265,08"],["13","2,3","30","69"],["14","5,6","78,4","439,04"],["15","2,6","39","101,4"],["16","8,9","142,4","1267,36"],["17","1,7","28,9","49,13"],["18","1","18","18"],["","","",""]]}'
module7:
qpcr_results: '{"data":[["Sample 1","Quantity ",null,null,null],["1","0,2",null,null,null],["2","0,5",null,null,null],["3","0,4",null,null,null],["4","1,1",null,null,null],["5","12,5",null,null,null],["6","0,05",null,null,null],["7","0",null,null,null],["8","0",null,null,null],["9","0",null,null,null],["10","0",null,null,null],["11","0",null,null,null],["12","4,7",null,null,null],["13","2,3",null,null,null],["14","5,6",null,null,null],["15","2,6",null,null,null],["16","8,9",null,null,null],["17","1,7",null,null,null],["18","1",null,null,null]]}'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="162" fill="none" viewBox="0 0 200 162">
<path fill="#104DA9" fill-rule="evenodd" d="M71.03 32.572c20.282-7.496 40.784-17.717 60.46-14.647 22.565 3.52 40.998 15.045 48.753 31.686 8.322 17.86 9.488 40.666-6.573 58.827-15.18 17.165-43.582 19.625-67.963 25.457-19.93 4.766-40.54 10.14-57.728 4.604-17.12-5.513-25.82-18.982-31.012-33.185-5.292-14.48-8.933-30.974 2.122-45.848 10.83-14.573 32.758-19.805 51.94-26.894z" clip-rule="evenodd" opacity=".1"/>
<g opacity=".5">
<path fill="#fff" stroke="#D0D0D8" stroke-width="3.771" d="M122.401 59.51c0-3.199-2.597-5.787-5.794-5.787H41.04c-3.197 0-5.794 2.588-5.794 5.788v49.754c0 3.2 2.597 5.788 5.794 5.788h5.77v15.787c0 2.844 3.437 4.255 5.441 2.254l18.07-18.041h46.286c3.197 0 5.794-2.588 5.794-5.788V59.511z"/>
<path fill="#104DA9" d="M45.764 69.104H111.88499999999999V72.975H45.764zM45.763 75.778H111.88399999999999V79.649H45.763zM45.763 82.452H111.88399999999999V86.323H45.763zM45.763 89.127H111.88399999999999V92.99799999999999H45.763zM45.763 95.801H99.33099999999999V99.672H45.763z"/>
</g>
<path fill="#fff" stroke="#D0D0D8" stroke-width="3.771" d="M82.732 73.885c-3.197 0-5.794 2.588-5.794 5.788v49.754c0 3.2 2.597 5.788 5.794 5.788h46.286l18.07 18.041c2.005 2.001 5.442.59 5.442-2.254v-15.787h5.769c3.197 0 5.794-2.588 5.794-5.788V79.673c0-3.2-2.597-5.788-5.794-5.788H82.732z"/>
<ellipse cx="104.881" cy="104.551" fill="#104DA9" rx="3.909" ry="3.902"/>
<ellipse cx="120.516" cy="104.55" fill="#104DA9" opacity=".5" rx="3.909" ry="3.902"/>
<ellipse cx="136.15" cy="104.55" fill="#104DA9" opacity=".25" rx="3.909" ry="3.902"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -45,6 +45,7 @@
//= require global_activities/side_pane
//= require protocols/header
//= require marvinjslauncher
//= require jstree.min
//= require_tree ./repositories/renderers
//= require_directory ./repositories/validators
//= require_directory ./dashboard

View file

@ -10,7 +10,7 @@ var DasboardCurrentTasksWidget = (function() {
function appendTasksList(json, container) {
$.each(json.data, (i, task) => {
var currentTaskItem = task;
$(container).append(currentTaskItem);
$(container).find('.current-tasks-list').append(currentTaskItem);
});
}
@ -48,7 +48,7 @@ var DasboardCurrentTasksWidget = (function() {
}
function initInfiniteScroll() {
InfiniteScroll.init('.current-tasks-list', {
InfiniteScroll.init('.current-tasks-list-wrapper', {
url: $('.current-tasks-list').data('tasksListUrl'),
customResponse: (json, container) => {
appendTasksList(json, container);
@ -136,7 +136,7 @@ var DasboardCurrentTasksWidget = (function() {
}
appendTasksList(result, $currentTasksList);
PerfectSb().update_all();
if (newList) InfiniteScroll.resetScroll('.current-tasks-list');
if (newList) InfiniteScroll.resetScroll('.current-tasks-list-wrapper');
animateSpinner($currentTasksList, false);
}).error(function(error) {
// If error is 403, it is possible that the user was removed from project/experiment,

View file

@ -1,54 +1,89 @@
(function(){
/* globals renderFormError animateSpinner */
(function() {
function clearModal(id) {
// Completely remove modal when it gets closed
$(id).on('hidden.bs.modal', function() {
$(id).remove();
});
}
// Reload after successfully updated experiment
function validateExperimentForm(element) {
if ($(element)) {
let form = $(element).find('form');
form.on('ajax:success', function(e, data) {
animateSpinner(form, true);
if (element.match(/#new-experiment-modal/)) {
window.location.replace(data.path);
} else {
location.reload();
}
}).on('ajax:error', function(e, error) {
let msg = JSON.parse(error.responseText);
if ('name' in msg) {
renderFormError(e, $(element).find('#experiment-name'), msg.name.toString(), true);
} else if ('description' in msg) {
renderFormError(e, $(element).find('#experiment-description'), msg.description.toString(), true);
} else {
renderFormError(e, $(element).find('#experiment-name'), error.statusText, true);
}
});
}
}
// Validates move action
function validateMoveModal(modal) {
if (modal.match(/#move-experiment-modal-[0-9]*/)) {
let form = $(modal).find('form');
form.on('ajax:success', function(e, data) {
animateSpinner(form, true);
window.location.replace(data.path);
}).on('ajax:error', function(e, error) {
form.clearFormErrors();
let msg = JSON.parse(error.responseText);
renderFormError(e, form.find('#experiment_project_id'), msg.message.toString());
});
}
}
// Create ajax hook on given 'element', which should return modal with 'id' =>
// show that modal
function initializeModal(element, id){
function initializeModal(element, id) {
// Initialize new experiment modal listener
$(element)
.on("ajax:beforeSend", function(){
$(element).on('ajax:beforeSend', function() {
animateSpinner();
})
.on("ajax:success", function(e, data){
}).on('ajax:success', function(e, data) {
$('body').append($.parseHTML(data.html));
$(id).modal('show',{
$(id).modal('show', {
backdrop: true,
keyboard: false,
keyboard: false
});
validateMoveModal(id);
clearModal($(id));
validateExperimentForm(id);
})
.on("ajax:error", function() {
}).on('ajax:error', function() {
animateSpinner(null, false);
// TODO
})
.on("ajax:complete", function(){
}).on('ajax:complete', function() {
animateSpinner(null, false);
$(id).find('.selectpicker').selectpicker();
});
}
function clearModal(id) {
//Completely remove modal when it gets closed
$(id).on('hidden.bs.modal', function() {
$(id).remove();
});
}
// Initialize dropdown actions on experiment:
// - edit
// - clone
function initializeDropdownActions(){
function initializeDropdownActions() {
// { buttonClass: modalName } mappings
// click on buttonClass summons modalName dialog
modals = {
let modals = {
'.edit-experiment': '#edit-experiment-modal-',
'.clone-experiment': '#clone-experiment-modal-',
'.move-experiment': '#move-experiment-modal-'
};
$.each($(".dropdown-experiment-actions"), function(){
$.each($('.dropdown-experiment-actions'), function() {
var $dropdown = $(this);
$.each(modals, function(buttonClass, modalName) {
var id = modalName + $dropdown.data('id');
@ -57,64 +92,11 @@
});
}
// Validates move action
function validateMoveModal(modal){
if ( modal.match(/#move-experiment-modal-[0-9]*/) ) {
var form = $(modal).find("form");
form
.on('ajax:success', function(e, data) {
animateSpinner(form, true);
window.location.replace(data.path);
})
.on('ajax:error', function(e, error) {
form.clearFormErrors();
var msg = JSON.parse(error.responseText);
renderFormError(e,
form.find("#experiment_project_id"),
msg.message.toString());
});
}
}
// Reload after successfully updated experiment
function validateExperimentForm(element){
if ( $(element) ) {
var form = $(element).find("form");
form
.on('ajax:success' , function(e, data){
animateSpinner(form, true);
if ( element.match(/#new-experiment-modal/) ) {
window.location.replace(data.path);
} else {
location.reload();
}
})
.on('ajax:error', function(e, error){
var msg = JSON.parse(error.responseText);
if ( 'name' in msg ) {
renderFormError(e,
$(element).find("#experiment-name"),
msg.name.toString(),
true);
} else if ( 'description' in msg ) {
renderFormError(e,
$(element).find("#experiment-description"),
msg.description.toString(),
true);
} else {
renderFormError(e,
$(element).find("#experiment-name"),
error.statusText,
true);
}
});
}
}
// Initialize no description edit link
function initEditNoDescription(){
function initEditNoDescription() {
var modal = '#edit-experiment-modal-';
$.each($('.experiment-no-description'), function() {
var id = modal + $(this).data("id");
var id = modal + $(this).data('id');
initializeModal($(this), id);
});
}
@ -140,4 +122,4 @@
// init
initEditNoDescription();
})();
}());

View file

@ -0,0 +1,34 @@
(function() {
let selectedTasks = [];
$('#module-archive').on('click', '.restore-button-container', function(e) {
e.preventDefault();
let restoreForm = $('.restore-button-container').find('form');
selectedTasks.forEach(function(id) {
$('<input>').attr({
type: 'hidden',
name: 'my_modules_ids[]',
value: id
}).appendTo(restoreForm);
});
restoreForm.submit();
});
$('#module-archive').on('click', '.task-selector', function() {
let taskId = $(this).closest('.task-selector-container').data('task-id');
let index = $.inArray(taskId, selectedTasks);
let resoteTasksButton = $('.restore-button-container');
// If checkbox is checked and row ID is not in list of selected folder IDs
if (this.checked && index === -1) {
selectedTasks.push(taskId);
resoteTasksButton.collapse('show');
// Otherwise, if checkbox is not checked and ID is in list of selected IDs
} else if (!this.checked && index !== -1) {
selectedTasks.splice(index, 1);
}
// Hide button
if (selectedTasks.length === 0) resoteTasksButton.collapse('hide');
});
}());

View file

@ -47,6 +47,8 @@
function loadUnseenNotificationsNumber(element = 'notifications', icon = '.fa-bell') {
var notificationCount = $('#count-' + element);
if (!notificationCount.length) return;
$.ajax({
url: notificationCount.attr('data-href'),
type: 'GET',

View file

@ -138,11 +138,16 @@ var hammertime;
* Initializes page
*/
function init() {
bindModeChange();
bindAjax();
bindWindowResizeEvent();
initializeGraph(".diagram .module-large");
initializeFullZoom();
if($('#module-archive').length) {
bindFullZoomAjaxTabs();
bindEditTagsAjax($("div.module-large"));
} else {
bindModeChange();
bindAjax();
bindWindowResizeEvent();
initializeGraph(".diagram .module-large");
initializeFullZoom();
}
}
jsPlumb.ready(function () {
@ -169,9 +174,10 @@ function initializeEdit() {
$("#canvas-container").addClass("canvas-container-edit-mode");
// Hide sidebar & also its toggle button
$("#wrapper").addClass("hidden2");
$(".sidebar-container").addClass("collapsed");
$("#wrapper").css("paddingLeft", "0");
$(".navbar-secondary").addClass("navbar-without-sidebar");
$("#sidebar-arrow").addClass("invisible");
$(".show-sidebar").addClass("invisible");
// Also, hide zoom levels button group
$("#diagram-buttons").hide();
@ -309,8 +315,8 @@ function initializeFullZoom() {
bindEditDueDateAjax();
bindEditTagsAjax($("div.module-large"));
bindFullZoomAjaxTabs();
initModulesHover($("div.module-large"), $("#slide-panel"));
initSidebarClicks($("div.module-large"), $("#slide-panel"), $("#diagram"), $("#canvas-container"), 20);
initModulesHover($("div.module-large"), $("#sidebar-wrapper"));
initSidebarClicks($("div.module-large"), $("#sidebar-wrapper"), $("#diagram"), $("#canvas-container"), 20);
// Restore draggable position
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
@ -356,8 +362,8 @@ function initializeMediumZoom() {
positionModules(".diagram .module-medium", GRID_DIST_MEDIUM_X, GRID_DIST_MEDIUM_Y);
initJsPlumb("#diagram-container", "#diagram", "div.module-medium", { scrollEnabled: true, gridDistX: GRID_DIST_MEDIUM_X, gridDistY: GRID_DIST_MEDIUM_Y });
bindEditTagsAjax($("div.module-medium"));
initModulesHover($("div.module-medium"), $("#slide-panel"));
initSidebarClicks($("div.module-medium"), $("#slide-panel"), $("#diagram"), $("#canvas-container"), 20);
initModulesHover($("div.module-medium"), $("#sidebar-wrapper"));
initSidebarClicks($("div.module-medium"), $("#sidebar-wrapper"), $("#diagram"), $("#canvas-container"), 20);
// Restore draggable position
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
@ -383,8 +389,8 @@ function initializeSmallZoom() {
positionModules(".diagram .module-small", GRID_DIST_SMALL_X, GRID_DIST_SMALL_Y);
initJsPlumb("#diagram-container", "#diagram", "div.module-small", { scrollEnabled: true, gridDistX: GRID_DIST_SMALL_X, gridDistY: GRID_DIST_SMALL_Y });
initModulesHover($("div.module-small"), $("#slide-panel"));
initSidebarClicks($("div.module-small"), $("#slide-panel"), $("#diagram"), $("#canvas-container"), 20);
initModulesHover($("div.module-small"), $("#sidebar-wrapper"));
initSidebarClicks($("div.module-small"), $("#sidebar-wrapper"), $("#diagram"), $("#canvas-container"), 20);
// Restore draggable position
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
@ -711,6 +717,10 @@ function bindFullZoomAjaxTabs() {
target.addClass("active");
$this.parents(".module-large").addClass("expanded");
// Add class to bring it in front on archived tasks page (hover other cards when open comments/users)
$this.parents('#module-archive').find('.module-container').removeClass('active-card');
$this.parents('.module-container').addClass('active-card');
// Call scrollBotton after the comments are displayed
// so that the scrollHight can be calculated
if ( targetContents === 'comments' ) {
@ -2513,44 +2523,31 @@ function restoreDraggablePosition(draggable, parent) {
}
/**
* Initialize the modules group hover animation.
* Initialize the modules hover animation.
* @param modules - The modules jQuery selector.
* @param sidebar - The sidebar jQuery selector.
*/
function initModulesHover(modules, sidebar) {
function handlerIn() {
var groupId = $(this).data("module-group");
var groupModules = modules.filter("[data-module-group='" + groupId + "']");
var groupMenu = sidebar.find("li[data-module-group='" + groupId + "']");
groupModules.addClass("group-hover");
groupMenu.addClass("group-hover");
var moduleId = $(this).data("module-id");
if (!_.isUndefined(moduleId)) {
var currentModule = modules.filter("[data-module-id='" + moduleId + "']");
var currentMenu = sidebar.find("li[data-module-id='" + moduleId + "']");
var currentMenu = sidebar.find("[data-module-id='" + moduleId + "']");
currentModule.addClass("module-hover");
currentMenu.addClass("module-hover");
}
}
function handlerOut() {
var groupId = $(this).data("module-group");
var groupModules = modules.filter("[data-module-group='" + groupId + "']");
var groupMenu = $("li[data-module-group='" + groupId + "']");
groupModules.removeClass("group-hover");
groupMenu.removeClass("group-hover");
var moduleId = $(this).data("module-id");
if (!_.isUndefined(moduleId)) {
var currentModule = modules.filter("[data-module-id='" + moduleId + "']");
var currentMenu = sidebar.find("li[data-module-id='" + moduleId + "']");
var currentMenu = sidebar.find("[data-module-id='" + moduleId + "']");
currentModule.removeClass("module-hover");
currentMenu.removeClass("module-hover");
}
}
modules.hover(handlerIn, handlerOut);
sidebar.find("li[data-module-id]").hover(handlerIn, handlerOut);
sidebar.find("li[data-module-group]").hover(handlerIn, handlerOut);
sidebar.find("[data-module-id]").hover(handlerIn, handlerOut);
}
/**
@ -2587,8 +2584,8 @@ function calculateModuleGroupSize(modules) {
}
/**
* Initialize the modules & groups click action on sidebar
* so the modules/groups are then centered in canvas.
* Initialize the modules click action on sidebar
* so the modules are then centered in canvas.
* @param modules - The modules jQuery selector.
* @param sidebar - The sidebar jQuery selector.
* @param draggable - The canvas draggable jQuery selector.
@ -2597,7 +2594,7 @@ function calculateModuleGroupSize(modules) {
*/
function initSidebarClicks(modules, sidebar, draggable, parent, modulePadding) {
function moduleHandler(event) {
var moduleId = $(this).closest("li").data("module-id");
var moduleId = $(this).data("module-id");
var module = modules.filter("[data-module-id='" + moduleId + "']");
var centerX = parent.width() / 2;
var centerY = parent.height() / 2;
@ -2609,28 +2606,7 @@ function initSidebarClicks(modules, sidebar, draggable, parent, modulePadding) {
animateReposition(draggable, left, top);
return false;
}
function moduleGroupHandler(event) {
var groupId = $(this).closest("li").data("module-group");
var groupModules = modules.filter("[data-module-group='" + groupId + "']");
var groupSize = calculateModuleGroupSize(groupModules);
var centerX = parent.width() / 2;
var centerY = parent.height() / 2;
var left, top;
if (groupSize.width > parent.width() || groupSize.height > parent.height()) {
left = -groupSize.left + modulePadding;
top = -groupSize.top + modulePadding;
} else {
left = centerX - groupSize.left - (groupSize.width / 2);
top = centerY - groupSize.top - (groupSize.height / 2);
}
event.preventDefault();
event.stopPropagation();
animateReposition(draggable, left, top);
return false;
}
sidebar.find("li[data-module-id] > span > a.canvas-center-on").click(moduleHandler);
sidebar.find("li[data-module-group] > span > a.canvas-center-on").click(moduleGroupHandler);
sidebar.find(".canvas-center-on").click(moduleHandler);
}
/**

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,276 @@
/* global animateSpinner filterDropdown Sidebar Turbolinks HelperModule */
(function() {
function init() {
const PERMISSIONS = ['editable', 'archivable', 'restorable', 'moveable', 'duplicable'];
var cardsWrapper = '#cardsWrapper';
var experimentsPage = '#projectShowWrapper';
var selectedExperiments = [];
let experimentsCurrentSort;
let experimentsViewSearch;
let startedOnFromFilter;
let startedOnToFilter;
let modifiedOnFromFilter;
let modifiedOnToFilter;
let archivedOnFromFilter;
let archivedOnToFilter;
function checkActionPermission(permission) {
return selectedExperiments.every(function(experimentId) {
return $(`.experiment-card[data-id="${experimentId}"]`).data(permission);
});
}
function updateExperimentsToolbar() {
let experimentsToolbar = $('#projectShowToolbar');
let toolbarVisible = false;
if (selectedExperiments.length === 0) {
experimentsToolbar.find('.single-object-action, .multiple-object-action').addClass('hidden');
}
if (selectedExperiments.length === 1) {
experimentsToolbar.find('.single-object-action, .multiple-object-action').removeClass('hidden');
} else if (selectedExperiments.length > 1) {
experimentsToolbar.find('.single-object-action').addClass('hidden');
experimentsToolbar.find('.multiple-object-action').removeClass('hidden');
}
PERMISSIONS.forEach((permission) => {
if (!checkActionPermission(permission)) {
experimentsToolbar.find(`.btn[data-for="${permission}"]`).addClass('hidden');
}
});
$.each($('#projectShowToolbar').find('.btn'), (i, btn) => {
if (window.getComputedStyle(btn).display !== 'none') {
toolbarVisible = true;
}
});
$(experimentsPage).attr('data-toolbar-visible', toolbarVisible);
}
function initProjectsViewModeSwitch() {
$(experimentsPage).on('click', '.cards-switch', function() {
let $btn = $(this);
$('.cards-switch').removeClass('active');
if ($btn.hasClass('view-switch-cards')) {
$(cardsWrapper).removeClass('list');
} else if ($btn.hasClass('view-switch-list')) {
$(cardsWrapper).addClass('list');
}
$btn.addClass('active');
});
$(experimentsPage).on('click', '.archive-switch', function() {
Turbolinks.visit($(this).data('url'));
});
}
function loadCardsView() {
var viewContainer = $(cardsWrapper);
$.ajax({
url: viewContainer.data('experiments-cards-url'),
type: 'GET',
dataType: 'json',
data: {
view_mode: $(experimentsPage).data('view-mode'),
sort: experimentsCurrentSort,
search: experimentsViewSearch,
created_on_from: startedOnFromFilter,
created_on_to: startedOnToFilter,
updated_on_from: modifiedOnFromFilter,
updated_on_to: modifiedOnToFilter,
archived_on_from: archivedOnFromFilter,
archived_on_to: archivedOnToFilter
},
success: function(data) {
viewContainer.find('.card, .no-results-container').remove();
viewContainer.removeClass('no-results');
viewContainer.append(data.cards_html);
if (viewContainer.find('.no-results-container').length) {
viewContainer.addClass('no-results');
}
selectedExperiments.length = 0;
updateExperimentsToolbar();
loadExperimentWorkflowImages();
},
error: function() {
viewContainer.html('Error loading project list');
}
});
}
function refreshCurrentView() {
loadCardsView();
Sidebar.reload({
sort: experimentsCurrentSort,
view_mode: $(experimentsPage).data('view-mode')
});
}
function selectDate($field) {
var datePicker = $field.data('DateTimePicker');
if (datePicker && datePicker.date()) {
return datePicker.date()._d.toUTCString();
}
return null;
}
function initExperimentsFilters() {
var $filterDropdown = filterDropdown.init();
let $experimentsFilter = $('.experiments-filters');
let $startedOnFromFilter = $('.started-on-filter .from-date', $experimentsFilter);
let $startedOnToFilter = $('.started-on-filter .to-date', $experimentsFilter);
let $modifiedOnFromFilter = $('.modified-on-filter .from-date', $experimentsFilter);
let $modifiedOnToFilter = $('.modified-on-filter .to-date', $experimentsFilter);
let $archivedOnFromFilter = $('.archived-on-filter .from-date', $experimentsFilter);
let $archivedOnToFilter = $('.archived-on-filter .to-date', $experimentsFilter);
let $textFilter = $('#textSearchFilterInput', $experimentsFilter);
function appliedFiltersMark() {
let filtersEnabled = experimentsViewSearch
|| startedOnFromFilter
|| startedOnToFilter
|| modifiedOnFromFilter
|| modifiedOnToFilter
|| archivedOnFromFilter
|| archivedOnToFilter;
filterDropdown.toggleFilterMark($filterDropdown, filtersEnabled);
}
$filterDropdown.on('filter:apply', function() {
startedOnFromFilter = selectDate($startedOnFromFilter);
startedOnToFilter = selectDate($startedOnToFilter);
modifiedOnFromFilter = selectDate($modifiedOnFromFilter);
modifiedOnToFilter = selectDate($modifiedOnToFilter);
archivedOnFromFilter = selectDate($archivedOnFromFilter);
archivedOnToFilter = selectDate($archivedOnToFilter);
experimentsViewSearch = $textFilter.val();
appliedFiltersMark();
refreshCurrentView();
});
// Clear filters
$filterDropdown.on('filter:clear', function() {
if ($startedOnFromFilter.data('DateTimePicker')) $startedOnFromFilter.data('DateTimePicker').clear();
if ($startedOnToFilter.data('DateTimePicker')) $startedOnToFilter.data('DateTimePicker').clear();
if ($modifiedOnFromFilter.data('DateTimePicker')) $modifiedOnFromFilter.data('DateTimePicker').clear();
if ($modifiedOnToFilter.data('DateTimePicker')) $modifiedOnToFilter.data('DateTimePicker').clear();
if ($archivedOnFromFilter.data('DateTimePicker')) $archivedOnFromFilter.data('DateTimePicker').clear();
if ($archivedOnToFilter.data('DateTimePicker')) $archivedOnToFilter.data('DateTimePicker').clear();
$textFilter.val('');
});
}
function initSorting() {
$('#sortMenuDropdown a').click(function() {
if (experimentsCurrentSort !== $(this).data('sort')) {
$('#sortMenuDropdown a').removeClass('selected');
experimentsCurrentSort = $(this).data('sort');
refreshCurrentView();
$(this).addClass('selected');
$('#sortMenu').dropdown('toggle');
}
});
}
function initExperimentsSelector() {
$(cardsWrapper).on('click', '.experiment-card-selector', function() {
let card = $(this).closest('.experiment-card');
let experimentId = card.data('id');
// Determine whether ID is in the list of selected project IDs
let index = $.inArray(experimentId, selectedExperiments);
// If checkbox is checked and row ID is not in list of selected project IDs
if (this.checked && index === -1) {
$(this).closest('.experiment-card').addClass('selected');
selectedExperiments.push(experimentId);
// Otherwise, if checkbox is not checked and ID is in list of selected IDs
} else if (!this.checked && index !== -1) {
$(this).closest('.experiment-card').removeClass('selected');
selectedExperiments.splice(index, 1);
}
updateExperimentsToolbar();
});
}
function initSelectAllCheckbox() {
$(experimentsPage).on('click', '.sci-checkbox.select-all', function() {
var selectAll = this.checked;
$.each($('.experiment-card-selector'), function() {
if (this.checked !== selectAll) this.click();
});
});
}
function initArchiveRestoreToolbarButtons() {
$(experimentsPage)
.on('ajax:before', '.archive-experiments-form, .restore-experiments-form', function() {
let buttonForm = $(this);
buttonForm.find('input[name="experiments_ids[]"]').remove();
selectedExperiments.forEach(function(id) {
$('<input>').attr({
type: 'hidden',
name: 'experiments_ids[]',
value: id
}).appendTo(buttonForm);
});
})
.on('ajax:success', '.archive-experiments-form, .restore-experiments-form', function(ev, data) {
HelperModule.flashAlertMsg(data.message, 'success');
// Project saved, reload view
refreshCurrentView();
})
.on('ajax:error', '.archive-experiments-form, .restore-experiments-form', function(ev, data) {
HelperModule.flashAlertMsg(data.responseJSON.message, 'danger');
});
}
function appendActionModal(modal) {
$('#content-wrapper').append(modal);
modal.modal('show');
modal.find('.selectpicker').selectpicker();
// Remove modal when it gets closed
modal.on('hidden.bs.modal', function() {
$(this).remove();
});
}
function initEditMoveDuplicateToolbarButton() {
let forms = '.edit-experiments-form, .move-experiments-form, .clone-experiments-form';
$(experimentsPage)
.on('ajax:before', forms, function() {
let buttonForm = $(this);
buttonForm.find('input[name="id"]').remove();
$('<input>').attr({
type: 'hidden',
name: 'id',
value: selectedExperiments[0]
}).appendTo(buttonForm);
})
.on('ajax:success', forms, function(ev, data) {
appendActionModal($(data.html));
})
.on('ajax:error', forms, function(ev, data) {
HelperModule.flashAlertMsg(data.responseJSON.message, 'danger');
});
}
function initNewExperimentToolbarButton() {
let forms = '.new-experiment-form';
$(experimentsPage)
.on('ajax:success', forms, function(ev, data) {
appendActionModal($(data.html));
})
.on('ajax:error', forms, function(ev, data) {
HelperModule.flashAlertMsg(data.responseJSON.message, 'danger');
});
}
function loadExperimentWorkflowImages() {
$('.workflowimg-container').each(function() {
let container = $(this);
if (container.data('workflowimg-present') === false) {
@ -20,5 +291,35 @@
});
}
function init() {
$('#content-wrapper').on('ajax:success', '.experiment-action-link', function(ev, data) {
appendActionModal($(data.html));
});
$('#content-wrapper')
.on('ajax:beforeSend', '.experiment-action-form', function() {
animateSpinner();
})
.on('ajax:success', '.experiment-action-form', function() {
$(this).closest('.modal').modal('hide');
refreshCurrentView();
animateSpinner(null, false);
})
.on('ajax:error', '.experiment-action-form', function(ev, data) {
animateSpinner(null, false);
$(this).renderFormErrors('experiment', data.responseJSON);
});
initExperimentsFilters();
initSorting();
loadCardsView();
initProjectsViewModeSwitch();
initExperimentsSelector();
initArchiveRestoreToolbarButtons();
initEditMoveDuplicateToolbarButton();
initNewExperimentToolbarButton();
initSelectAllCheckbox();
}
init();
}());

View file

@ -1,8 +1,8 @@
(function() {
'use strict';
$('.delete-repo-option').initializeModal('#delete-repo-modal');
$('.rename-repo-option').initializeModal('#rename-repo-modal');
$('.share-repo-option').initializeModal('.share-repo-modal');
$('.copy-repo-option').initializeModal('#copy-repo-modal');
$('.delete-repo-option').initSubmitModal('#delete-repo-modal', 'repository');
$('.rename-repo-option').initSubmitModal('#rename-repo-modal', 'repository');
$('.share-repo-option').initSubmitModal('.share-repo-modal', 'repository');
$('.copy-repo-option').initSubmitModal('#copy-repo-modal', 'repository');
})();

View file

@ -100,10 +100,10 @@
DataTableHelpers.initSearchField(dataTableWrapper, I18n.t('repositories.index.filter_inventory'));
$('.content-body .toolbar').html($('#repositoriesListButtons').html());
dataTableWrapper.find('.main-actions, .pagination-row').removeClass('hidden');
$('#createRepoBtn').initializeModal('#create-repo-modal');
$('#deleteRepoBtn').initializeModal('#delete-repo-modal');
$('#renameRepoBtn').initializeModal('#rename-repo-modal');
$('#copyRepoBtn').initializeModal('#copy-repo-modal');
$('#createRepoBtn').initSubmitModal('#create-repo-modal', 'repository');
$('#deleteRepoBtn').initSubmitModal('#delete-repo-modal', 'repository');
$('#renameRepoBtn').initSubmitModal('#rename-repo-modal', 'repository');
$('#copyRepoBtn').initSubmitModal('#copy-repo-modal', 'repository');
},
drawCallback: function() {
if (CHECKBOX_SELECTOR) CHECKBOX_SELECTOR.checkSelectAllStatus();
@ -123,12 +123,12 @@
}
function reloadSidebar() {
var slidePanel = $('#slide-panel');
var slidePanel = $('.sidebar-container');
$.get(slidePanel.data('sidebar-url'), {
archived: $('.repositories-index').hasClass('archived')
}, function(data) {
slidePanel.html(data.html);
$('.create-new-repository').initializeModal('#create-repo-modal');
slidePanel.find('.sidebar-body').html(data.html);
$('.create-new-repository').initSubmitModal('#create-repo-modal', 'repository');
});
}
@ -187,7 +187,7 @@
}
});
$('.create-new-repository').initializeModal('#create-repo-modal');
$('.create-new-repository').initSubmitModal('#create-repo-modal', 'repository');
if (notTurbolinksPreview()) {
initRepositoriesDataTable('#repositoriesList', $('.repositories-index').hasClass('archived'));
}

View file

@ -13,11 +13,12 @@ $.fn.dataTable.render.editRowName = function(formId, cell) {
form="${formId}"
type="text"
name="repository_row[name]"
value="${text}"
value=""
placeholder="${I18n.t('repositories.table.enter_row_name')}"
data-type="RowName">
</div>
`);
$cell.find('input').val(text);
};
$.fn.dataTable.render.editRepositoryAssetValue = function(formId, columnId, cell) {
@ -34,11 +35,11 @@ $.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell)
form="${formId}"
type="text"
name="repository_cells[${columnId}]"
value="${text}"
value=""
placeholder="${I18n.t('repositories.table.text.enter_text')}"
data-type="RepositoryTextValue">
</div>`);
$cell.find('input').val(text);
SmartAnnotation.init($cell.find('input'));
};

View file

@ -26,7 +26,8 @@ $.fn.dataTable.render.defaultRepositoryAssetValue = function() {
};
$.fn.dataTable.render.RepositoryTextValue = function(data) {
var text = $(`<span class="text-value" data-edit-value="${data.value.edit}">${data.value.view}</span>`);
var text = $(`<span class="text-value">${data.value.view}</span>`);
text.attr('data-edit-value', data.value.edit);
return text.prop('outerHTML');
};

View file

@ -172,7 +172,7 @@
initShareModal();
});
$('.create-new-repository').initializeModal('#create-repo-modal');
$('.create-new-repository').initSubmitModal('#create-repo-modal', 'repository');
function initArchivingActionsInDropdown() {
$('.archive-repository-option').on('click', function(event) {

View file

@ -1,89 +1,47 @@
/**
* The functions here are global because they need to be
* accesed from outside (in reports view).
*/
/* global PerfectSb */
/* global PerfectScrollbar */
var Sidebar = (function() {
const SIDEBAR_ID = '#slide-panel';
const STORAGE_TREE_KEY = 'scinote-sidebar-tree-state';
const STORAGE_SCROLL_TREE_KEY = 'scinote-sidebar-tree-scroll-state';
const SIDEBAR_CONTAINER = '.sidebar-container';
function toggleTree($treeChildren) {
$treeChildren.toggleClass('hidden');
$.each($treeChildren, (i, treeChild) => {
$(treeChild).closest('.branch').find('.tree-toggle').first()
.toggleClass('fa-caret-down')
.toggleClass('fa-caret-right');
});
function showSelectedLeaf() {
var branchSelectors = $(SIDEBAR_CONTAINER).find('.sidebar-link.selected')
.parents('.sidebar-leaf')
.find('> .toggle-branch');
branchSelectors.removeClass('collapsed fa-caret-right').addClass('fa-caret-down');
}
function saveCurrentState() {
var config = [];
$.each($(SIDEBAR_ID).find('.tree-child:not(:hidden)'), (i, branch) => {
config.push(`[data-branch-id=${branch.dataset.branchId}]`);
function reloadSidebar(params) {
let url = $(SIDEBAR_CONTAINER).data('sidebar-url');
$.get(url, params, function(result) {
$(SIDEBAR_CONTAINER).find('.sidebar-body').html(result.html);
showSelectedLeaf();
$(SIDEBAR_CONTAINER).data('scrollBar').update();
});
sessionStorage.setItem(STORAGE_TREE_KEY, config.join(','));
}
function loadLastState() {
var currentProject = $(SIDEBAR_ID).attr('data-current-project');
var currentExperiment = $(SIDEBAR_ID).attr('data-current-experiment');
var currentTask = $(SIDEBAR_ID).attr('data-current-task');
if (currentProject) {
let projectBranch = $(`.tree-child[data-branch-id="pro${currentProject}"]`).attr('data-active', 'true');
projectBranch.prev().addClass('active');
if (!currentExperiment) projectBranch.closest('.branch').addClass('active');
}
if (currentExperiment) {
let experimentBranch = $(`.tree-child[data-branch-id="exp${currentExperiment}"]`).attr('data-active', 'true');
experimentBranch.prev().addClass('active');
if (!currentTask) {
experimentBranch.closest('.branch')
.addClass('show-canvas-handler')
.addClass('active');
}
}
if (currentTask) {
$(`.leaf[data-module-id="${currentTask}"]`).addClass('active');
}
toggleTree($(SIDEBAR_ID).find('.tree-child[data-active="true"]'));
toggleTree($(SIDEBAR_ID).find('.tree-child.hidden').filter(sessionStorage.getItem(STORAGE_TREE_KEY)));
PerfectSb().update_all();
$(SIDEBAR_ID).find('.tree').scrollTo(sessionStorage.getItem(STORAGE_SCROLL_TREE_KEY));
}
function initSideBar() {
$(SIDEBAR_ID).on('click', '.tree-toggle', function() {
var $treeChild = $(this).closest('.branch').find('.tree-child').first();
toggleTree($treeChild);
saveCurrentState();
PerfectSb().update_all();
var sidebarBody = $(SIDEBAR_CONTAINER).find('.sidebar-body');
var scrollBar = new PerfectScrollbar(sidebarBody[0], {
wheelSpeed: 0.5, minScrollbarLength: 20
});
$(SIDEBAR_ID).find('.tree').scroll(function() {
sessionStorage.setItem(STORAGE_SCROLL_TREE_KEY, $(this).scrollTop());
$(SIDEBAR_CONTAINER).data('scrollBar', scrollBar);
$(SIDEBAR_CONTAINER).on('click', '.toggle-branch', function() {
$(this).toggleClass('collapsed fa-caret-down fa-caret-right');
$(SIDEBAR_CONTAINER).data('scrollBar').update();
});
$('#wrapper').show();
loadLastState();
}
return {
init: () => {
if ($(SIDEBAR_ID).length) {
if ($(SIDEBAR_CONTAINER).length) {
initSideBar();
showSelectedLeaf();
$('#wrapper').show();
}
},
loadLastState: () => {
loadLastState();
reload: (params = {}) => {
reloadSidebar(params);
}
};
}());

View file

@ -1,69 +1,59 @@
(function(global) {
'use strict';
global.SideBarToggle = (function() {
var STORAGE_TOGGLE_KEY = "scinote-sidebar-toggled";
var SideBarToggle = (function() {
var STORAGE_TOGGLE_KEY = "scinote-sidebar-toggled";
var WRAPPER = '#wrapper'
var SIDEBAR_CONTAINER = ".sidebar-container"
function show() {
$('#wrapper').removeClass('hidden2');
$('#wrapper').css('paddingLeft', '280px');
$('.navbar-secondary').css(
{ 'margin-left': '-280px', 'padding-left': '280px' }
);
$('#sidebar-arrow').attr('data-shown', '');
sessionStorage.setItem(STORAGE_TOGGLE_KEY, "un-toggled");
$('#wrapper').trigger('sideBar::show');
$('#wrapper').one("transitionend", function() {
$('#wrapper').trigger('sideBar::shown');
})
function show() {
$(SIDEBAR_CONTAINER).removeClass('collapsed');
$(WRAPPER).css('paddingLeft', 'var(--wrapper-width)');
$('.navbar-secondary').removeClass("navbar-without-sidebar");
sessionStorage.setItem(STORAGE_TOGGLE_KEY, "un-toggled");
$(WRAPPER).trigger('sideBar::show');
$(WRAPPER).one("transitionend", function() {
$(WRAPPER).trigger('sideBar::shown');
})
}
function hide() {
$(SIDEBAR_CONTAINER).addClass('collapsed');
$(WRAPPER).css('paddingLeft', '0');
$('.navbar-secondary').addClass("navbar-without-sidebar");
sessionStorage.setItem(STORAGE_TOGGLE_KEY, "toggled");
$(WRAPPER).trigger('sideBar::hide');
$(WRAPPER).one("transitionend", function() {
$(WRAPPER).trigger('sideBar::hidden');
})
}
function isToggledStorage() {
var val = sessionStorage.getItem(STORAGE_TOGGLE_KEY);
if (val === null) {
return null;
}
return val === "toggled";
}
function hide() {
$('#wrapper').addClass('hidden2');
$('#wrapper').css('paddingLeft', '0');
$('.navbar-secondary').css({
'margin-left': '0',
'padding-left': '0'
});
$('#sidebar-arrow').removeAttr('data-shown');
sessionStorage.setItem(STORAGE_TOGGLE_KEY, "toggled");
$('#wrapper').trigger('sideBar::hide');
$('#wrapper').one("transitionend", function() {
$('#wrapper').trigger('sideBar::hidden');
})
}
function toggle() {
var btn = $('#sidebar-arrow');
if (btn.is('[data-shown]')) {
function init() {
$(document).on('click', `${SIDEBAR_CONTAINER} .close-sidebar`, function() {
hide();
}).on('click', `${SIDEBAR_CONTAINER} .show-sidebar`, function() {
show();
}).on('turbolinks:load', function() {
if (isToggledStorage()) {
hide();
} else {
show();
}
}
function isShown() {
var btn = $('#sidebar-arrow');
return btn.is('[data-shown]');
}
function isToggledStorage() {
var val = sessionStorage.getItem(STORAGE_TOGGLE_KEY);
if (val === null) {
return null;
}
return val === "toggled";
}
return Object.freeze({
show: show,
hide: hide,
toggle: toggle,
isShown: isShown,
isToggledStorage: isToggledStorage
$(WRAPPER).show();
})
})();
if (SideBarToggle.isToggledStorage()) {
SideBarToggle.hide();
}
})(window);
return Object.freeze({
init: init,
show: show,
hide: hide,
isToggledStorage: isToggledStorage
})
}());
SideBarToggle.init();

View file

@ -0,0 +1,154 @@
/* global SmartAnnotation */
var CommentsSidebar = (function() {
const SIDEBAR = '.comments-sidebar';
var commentsCounter;
function loadCommentsList() {
var commentsUrl = $(SIDEBAR).data('comments-url');
$.get(commentsUrl, {
object_type: $(SIDEBAR).data('object-type'),
object_id: $(SIDEBAR).data('object-id')
}, function(result) {
$(SIDEBAR).removeClass('loading');
$(SIDEBAR).find('.comments-subject-title').text(result.object_name);
$(SIDEBAR).find('.comments-list').html(result.comments);
if (result.comment_addable) {
$(SIDEBAR).find('.comment-input-container').removeClass('hidden');
} else {
$(SIDEBAR).find('.comment-input-container').addClass('hidden');
}
});
}
function updateCounter() {
var commentsAmount = $(SIDEBAR).find('.comments-list .comment-container').length;
if (commentsCounter.length) {
// Replace the number in comment element
commentsCounter.text(commentsCounter.text().replace(/\d+/g, commentsAmount));
}
}
function initOpenButton() {
$(document).on('click', '.open-comments-sidebar', function() {
commentsCounter = $(`#comment-count-${$(this).data('objectId')}`);
CommentsSidebar.open($(this).data('objectType'), $(this).data('objectId'));
});
}
function initCloseButton() {
$(document).on('click', `${SIDEBAR} .close-btn`, function() {
CommentsSidebar.close();
});
}
function initSendButton() {
$(document).on('click', `${SIDEBAR} .send-comment, ${SIDEBAR} .update-comment`, function() {
var requestUrl;
var requestType;
var updateMode = $(SIDEBAR).find('.sidebar-footer').hasClass('update');
var inputField = $(SIDEBAR).find('.comment-input-field');
if (updateMode) {
requestType = 'PATCH';
requestUrl = inputField.data('update-url');
} else {
requestType = 'POST';
requestUrl = $(SIDEBAR).data('comments-url');
}
$.ajax({
url: requestUrl,
type: requestType,
dataType: 'json',
data: {
object_type: $(SIDEBAR).data('object-type'),
object_id: $(SIDEBAR).data('object-id'),
message: inputField.val()
},
success: (result) => {
if (updateMode) {
$('.comment-container.edit').replaceWith(result.html);
} else {
$(result.html).appendTo(`${SIDEBAR} .comments-list`);
}
$(SIDEBAR).find('.comment-input-field').val('');
$(SIDEBAR).find('.sidebar-footer').removeClass('update');
$('.error-container').empty();
updateCounter();
},
error: (result) => {
$('.error-container').text(result.responseJSON.errors.message);
}
});
});
}
function initCancelButton() {
$(document).on('click', `${SIDEBAR} .cancel-button`, function() {
$(SIDEBAR).find('.comment-input-field').val('');
$(SIDEBAR).find('.sidebar-footer').removeClass('update');
});
}
function initDeleteButton() {
$(document).on('click', `${SIDEBAR} .delete-comment`, function(e) {
var deleteUrl = $(this).data('delete-url');
var commentContainer = $(this).closest('.comment-container');
e.preventDefault();
$.ajax({
url: deleteUrl,
type: 'DELETE',
dataType: 'json',
success: () => {
commentContainer.remove();
updateCounter();
}
});
});
}
function initEditButton() {
$(document).on('click', `${SIDEBAR} .edit-comment`, function(e) {
e.preventDefault();
$('.comment-container').removeClass('edit');
$(this).closest('.comment-container').addClass('edit');
$(SIDEBAR).find('.sidebar-footer').addClass('update');
$(SIDEBAR).find('.comment-input-field')
.val($(this).data('comment-raw'))
.data('update-url', $(this).data('update-url'));
});
}
function initInputField() {
if ($(SIDEBAR).find('.comment-input-field').length) {
SmartAnnotation.init($(SIDEBAR).find('.comment-input-field'));
}
}
return {
init: function() {
initOpenButton();
initCloseButton();
initSendButton();
initDeleteButton();
initEditButton();
initCancelButton();
},
open: function(objectType, objectId) {
$(SIDEBAR).find('.comments-subject-title').empty();
$(SIDEBAR).find('.comments-list').empty();
$(SIDEBAR).find('.comment-input-field').val('');
$('.error-container').empty();
$(SIDEBAR).find('.sidebar-footer').removeClass('update');
$(SIDEBAR).data('object-type', objectType).data('object-id', objectId);
$(SIDEBAR).addClass('open loading');
initInputField();
loadCommentsList();
},
close: function() {
$(SIDEBAR).removeClass('open');
}
};
}());
CommentsSidebar.init();

View file

@ -0,0 +1,116 @@
var filterDropdown = (function() {
var $filterContainer = '';
function initClearButton() {
$('.clear-button', $filterContainer).click(function(e) {
e.stopPropagation();
e.preventDefault();
$filterContainer.trigger('filter:clear');
});
}
function preventDropdownClose() {
$filterContainer.on('click', '.dropdown-menu', function(e) {
if (!$(e.target).is('input,a')) {
e.stopPropagation();
e.preventDefault();
$('#textSearchFilterHistory').hide();
$('#textSearchFilterInput', $filterContainer).closest('.dropdown').removeClass('open');
$filterContainer.trigger('filter:clickBody');
}
});
}
function initSearchField() {
var $textFilter = $('#textSearchFilterInput', $filterContainer);
$filterContainer.on('show.bs.dropdown', function() {
let $filterDropdown = $filterContainer.find('.dropdown-menu');
let teamId = $filterDropdown.data('team-id');
$('#textSearchFilterHistory').find('li').remove();
try {
let storagePath = `${$filterDropdown.data('search-field-history-key')}/${teamId}/recent_search_keywords`;
let recentSearchKeywords = JSON.parse(localStorage.getItem(storagePath));
$.each(recentSearchKeywords, function(i, keyword) {
$('#textSearchFilterHistory').append(
$(`<li class="dropdown-item">
<a class="projects-search-keyword" href="#" data-keyword="${keyword}">
<i class="fas fa-history"></i>
<span class="keyword-text">${keyword}</span>
</a>
</li>`)
);
});
} catch (error) {
console.error(error);
}
}).on('hide.bs.dropdown', function() {
$('#textSearchFilterHistory').hide();
$('.apply-filters', $filterContainer).click();
});
$textFilter.click(function(e) {
e.stopPropagation();
$('#textSearchFilterHistory').toggle();
$(this).closest('.dropdown').toggleClass('open');
}).on('input', () => {
$('#textSearchFilterHistory').hide();
$(this).closest('.dropdown').removeClass('open');
});
$filterContainer.on('click', '.projects-search-keyword', function(e) {
e.stopPropagation();
e.preventDefault();
$textFilter.val($(this).data('keyword'));
$('#textSearchFilterHistory').hide();
$textFilter.closest('.dropdown').removeClass('open');
});
}
function initApplyButton() {
$('.apply-filters', $filterContainer).click(function(e) {
e.stopPropagation();
e.preventDefault();
let $filterDropdown = $filterContainer.find('.dropdown-menu');
let teamId = $filterDropdown.data('team-id');
let projectsViewSearch = $('#textSearchFilterInput').val();
try {
let storagePath = `${$filterDropdown.data('search-field-history-key')}/${teamId}/recent_search_keywords`;
let recentSearchKeywords = JSON.parse(localStorage.getItem(storagePath));
if (!Array.isArray(recentSearchKeywords)) recentSearchKeywords = [];
if (recentSearchKeywords.indexOf(projectsViewSearch) !== -1) {
recentSearchKeywords.splice(recentSearchKeywords.indexOf(projectsViewSearch), 1);
}
if (recentSearchKeywords.length > 4) {
recentSearchKeywords = recentSearchKeywords.slice(0, 4);
}
recentSearchKeywords.unshift(projectsViewSearch);
localStorage.setItem(storagePath, JSON.stringify(recentSearchKeywords));
} catch (error) {
console.error(error);
}
$filterContainer.trigger('filter:apply');
$(this).closest('.dropdown').removeClass('open');
});
}
return {
init: function() {
$filterContainer = $('.filter-container');
initClearButton();
preventDropdownClose();
initApplyButton();
initSearchField();
return $filterContainer;
},
toggleFilterMark: function(filterContainer, filtersEnabled) {
if (filtersEnabled) {
filterContainer.addClass('filters-applied');
} else {
filterContainer.removeClass('filters-applied');
}
}
};
}());

View file

@ -88,10 +88,11 @@ $.fn.checkboxTreeLogic = function(dependencies, checkAll) {
* submit gets JSON response, displays errors if any or either refreshes the
* page or redirects it (if 'url' parameter is specified in JSON response).
* @param {string} modalID Modal ID
* @param {string} modelName Modal Name
* @param {object} $fn Link objects for opening the modal (can have more
* links for same modal)
*/
$.fn.initializeModal = function(modalID) {
$.fn.initSubmitModal = function(modalID, modelName) {
/**
* Popup modal validator
* @param {object} $modal Modal object
@ -107,7 +108,7 @@ $.fn.initializeModal = function(modalID) {
}
})
.on('ajax:error', function(e, data) {
$(this).renderFormErrors('repository', data.responseJSON);
$(this).renderFormErrors(modelName, data.responseJSON);
})
.animateSpinner(true);
}

View file

@ -17,6 +17,7 @@
@import "bootstrap-colorselector";
@import "bootstrap-tagsinput";
@import "bootstrap-tagsinput-typeahead";
@import "jstree_style.min";
@import "shared_styles/elements/*";

View file

@ -5,7 +5,6 @@
.dashboard-container .calendar-widget {
--calendar-day-size: 32px;
min-height: 320px;
.dashboard-calendar {
height: 100%;
@ -40,9 +39,9 @@
flex-basis: calc(100% - 42px);
flex-grow: 1;
grid-column-gap: 6px;
grid-row-gap: 6px;
grid-row-gap: 2px;
grid-template-columns: repeat(7, 1fr);
grid-template-rows: repeat(7, 1fr);
grid-template-rows: repeat(auto-fit, minmax(1em, 1fr));
justify-items: center;
padding: 6px;
@ -86,16 +85,10 @@
}
}
&::after {
background: $brand-danger;
border-radius: 50%;
content: "";
height: 4px;
left: calc((var(--calendar-day-size) / 2) - 2px);
position: absolute;
top: calc((var(--calendar-day-size) / 2) + 8px);
width: 4px;
@include red-dot;
right: calc((var(--calendar-day-size) / 2) - 4px);
top: calc((var(--calendar-day-size) / 2) + 6px);
}
}
@ -104,8 +97,8 @@
&.event {
&::after {
left: 13px;
top: 23px;
left: 12px;
top: 21px;
}
}
}

View file

@ -62,6 +62,7 @@
.filter-container {
height: 36px;
margin-right: 4px;
position: relative;
width: 36px;
.current-tasks-filters {
@ -111,15 +112,9 @@
}
&.filters-applied::after {
background: $brand-danger;
border: 1px solid $color-white;
border-radius: 50%;
content: "";
height: .5em;
left: 1.5em;
position: absolute;
top: .5em;
width: .5em;
@include red-dot;
right: .45em;
top: .4em;
}
}

View file

@ -12,19 +12,20 @@
.dashboard-view {
--dashboard-widgets-gap: 30px;
padding: calc(var(--dashboard-widgets-gap) / 2)
calc(var(--dashboard-widgets-gap) / 2)
padding: 15px
var(--dashboard-widgets-gap)
15px
var(--dashboard-widgets-gap);
}
.dashboard-header {
padding-bottom: calc(var(--dashboard-widgets-gap) / 2);
padding-bottom: 15px;
}
.dashboard-container {
--widget-header-size: 44px;
display: grid;
grid-auto-rows: 30em;
grid-auto-rows: 26em;
grid-column-gap: var(--dashboard-widgets-gap);
grid-row-gap: var(--dashboard-widgets-gap);
grid-template-columns: repeat(auto-fit, minmax(7em, 1fr));
@ -99,20 +100,21 @@
@media (max-height: 800px) {
.dashboard-container {
grid-auto-rows: 24em;
grid-auto-rows: 20em;
}
.dashboard-view {
--dashboard-widgets-gap: 15px;
}
}
@media (min-height: 1300px) {
@media (min-height: 1080px) {
.dashboard-container {
grid-auto-rows: 36em;
grid-auto-rows: 32em;
}
}
@media (max-width: 700px) {
.dashboard-view {
--dashboard-widgets-gap: 15px;
}
.dashboard-container {
--widget-header-size: 72px;

View file

@ -0,0 +1,361 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable SelectorFormat
// scss-lint:disable IdSelector
// New experiments page
.projects-show {
.experiment-actions-menu {
.dropdown-menu {
a,
button {
@include font-button;
padding: .5em 1em;
.fas {
margin-right: .4em;
}
}
}
}
.content-header {
.project-name {
align-items: center;
display: flex;
max-width: calc(100% - 7em);
.fas {
margin-right: .5em;
}
}
.edit-experiments-form,
.clone-experiments-form,
.move-experiments-form,
.archive-experiments-form,
.new-experiment-form,
.restore-experiments-form {
display: inline-block;
}
}
.project-show-container {
margin: 1.5em 0;
.cards-wrapper {
--card-min-width: 350px;
--list-columns-number: 7;
.card {
grid-row: span 6;
&.experiment-card {
border-radius: 4px;
box-shadow: $flyout-shadow;
.workflow-img-wrapper {
background-color: $color-concrete;
border-radius: 4px;
height: 76px;
width: 76px;
.archived-icon-plceholder {
color: $color-silver-chalice;
font-size: 3.5em;
line-height: 76px;
text-align: center;
}
.workflowimg-container {
text-align: center;
img {
border-radius: 4px;
max-height: 76px;
}
}
}
.experiment-name-cell {
@include font-h3;
-webkit-box-orient: vertical;
display: -webkit-box;
height: 3em;
-webkit-line-clamp: 2;
margin: .25em 1.75em 0;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
a {
color: inherit;
display: inline-block;
line-height: 21px;
}
}
.actions {
position: absolute;
right: .2em;
top: .2em;
}
.dates-and-img-container {
display: flex;
height: 7em;
width: 100%;
.dates-container {
flex-grow: 1;
}
}
.data-row {
display: flex;
line-height: 34px;
.card-label {
width: 7em;
}
.card-value {
font-weight: 600;
}
}
.progress {
box-shadow: none;
height: 4px;
margin-bottom: 0;
width: 100%;
.progress-bar {
min-width: 0 !important;
}
}
.completed-task-cell {
width: 100%;
}
.description-cell {
.description-text {
-webkit-box-orient: vertical;
display: -webkit-box;
height: 3em;
-webkit-line-clamp: 2;
overflow: hidden;
padding-top: .25em;
&::after {
background: linear-gradient(to right, transparent, $color-white 50%);
bottom: .75em;
content: "";
height: 1.75em;
position: absolute;
right: 0;
text-align: right;
width: 25%;
}
}
.more-button {
bottom: .8em;
position: absolute;
right: 1em;
}
}
}
}
&.list {
grid-auto-rows: 1px 5em;
grid-template-columns: max-content repeat(calc(var(--list-columns-number) - 2), minmax(100px, auto)) max-content;
grid-template-rows: 3em;
.card {
&.experiment-card {
.card-value {
font-weight: normal;
line-height: 2em;
}
.workflow-img-wrapper {
flex-shrink: 0;
height: 3.5em;
margin: .25em 1em .25em .5em;
width: 3.5em;
.archived-icon-plceholder {
font-size: 2em;
line-height: 1.75em;
}
.workflowimg-container {
text-align: center;
img {
max-height: 3em;
}
}
}
.dates-and-img-container,
.dates-container {
display: contents;
}
.checkbox-cell {
align-items: normal;
padding-top: .5em;
}
.experiment-name-cell {
@include font-button;
color: $brand-primary;
display: flex;
font-weight: normal;
grid-column: 2;
height: 100%;
margin: 0;
padding: .25em 0;
a {
overflow: hidden;
}
}
.start-date-cell {
grid-column: 3;
}
.modified-date-cell {
grid-column: 4;
}
.completed-task-cell {
grid-column: 5;
}
.description-cell {
grid-column: 6;
position: relative;
.description-text {
height: 4.5em;
-webkit-line-clamp: 3;
&::after {
bottom: .5em;
right: .5em;
}
}
.more-button {
bottom: .5em;
}
}
.actions-cell {
grid-column: 7;
padding-top: 3px;
position: initial;
}
}
&:hover {
.description-text::after {
background: linear-gradient(to right, transparent, $color-concrete 50%);
}
}
}
}
&.readonly {
.experiment-name-cell {
margin-left: 0 !important;
}
}
}
}
&.active {
[data-view-mode="archived"] {
display: none !important;
}
}
&.archived {
[data-view-mode="active"] {
display: none !important;
}
.project-show-container {
.experiment-actions-menu {
.btn-light:hover {
background: $color-alto;
}
}
.cards-wrapper {
.card.experiment-card {
.workflow-img-wrapper {
background-color: $color-alto;
}
.progress-bar {
background-color: $color-silver-chalice;
}
.description-cell {
width: 100%;
.description-text::before {
background: $color-alto;
content: "";
display: block;
height: 4px;
}
.description-text::after {
background: linear-gradient(to right, transparent, $color-concrete 50%);
}
}
}
&.list {
.card.experiment-card {
.archived-date-cell {
grid-column: 5;
}
.description-cell {
.description-text::before {
content: unset;
}
}
&:hover {
.description-text::after {
background: linear-gradient(to right, transparent, $color-alto 50%);
}
}
}
}
}
}
}
}
@media (max-height: 700px) {
.projects-show {
.experiments-filters {
max-height: calc(100vh - var(--navbar-height) - var(--content-header-size));
overflow: auto;
}
}
}

View file

@ -210,7 +210,7 @@
padding: 5px 0 5px 40px;
&:hover {
background-color: $brand-primary-light;
background-color: $brand-focus-light;
border-radius: 5px;
}

View file

@ -13,14 +13,6 @@
font-size: $font-size-base;
padding: 0 !important;
.preview-close {
background: transparent;
border: 0;
color: $color-white;
display: inline-block;
float: right;
}
.modal-dialog {
height: 100%;
margin: 0;
@ -32,14 +24,12 @@
background: transparent;
border: 0;
box-shadow: none;
color: $color-white;
height: 100%;
width: auto;
}
.modal-header {
background: $color-black;
border: 0;
background: $color-white;
display: flex;
height: 60px;
line-height: 40px;
@ -123,14 +113,6 @@
}
}
}
.file-save-link {
color: $color-white;
cursor: pointer;
display: inline-block;
float: right;
margin-right: 20px;
}
}
#new-step-sketch {

View file

@ -12,6 +12,7 @@
-o-transform: rotate($degrees);
transform: rotate($degrees);
}
@mixin rotate-important($degrees) {
-webkit-transform: rotate($degrees) !important;
-moz-transform: rotate($degrees) !important;
@ -49,6 +50,7 @@
transition-property: transform !important;
@include rotate-important($degrees);
}
@mixin rotate-animation($duration, $degrees) {
-webkit-transition-duration: $duration;
-moz-transition-duration: $duration;
@ -63,6 +65,18 @@
@include rotate($degrees);
}
@mixin red-dot {
background: $brand-danger;
border: 1px solid $color-white;
border-radius: 50%;
content: "";
height: .5em;
position: absolute;
right: 0;
top: 0;
width: .5em;
}
// Material design mixins

View file

@ -190,3 +190,81 @@
}
}
}
#experiment-canvas {
[data-view-mode="archived"] {
display: none;
}
}
#module-archive {
[data-view-mode="active"] {
display: none;
}
.module-container {
min-width: 220px;
&.active-card {
z-index: 1000;
}
}
.panel-default {
border: 0;
box-shadow: unset;
position: unset;
width: unset;
.task-selector-container {
padding: .75em .75em 0 1em;
}
.panel-heading {
background-color: $color-concrete;
border-color: $color-white;
.panel-title {
color: $color-volcano;
}
}
.panel-body {
background-color: $color-concrete;
font-weight: normal;
.archived-overdue-date {
.date-label {
color: $color-volcano;
display: inline-block;
font-weight: normal;
width: 90px;
}
.date-value {
color: $color-black;
}
}
}
.panel-footer-scinote {
background: $color-concrete;
border-color: $color-white;
height: 2.5em;
.nav {
border: 0;
}
.tab-content {
background-color: $color-concrete;
box-shadow: $flyout-shadow;
.tab-pane > .text-center {
margin-top: .3em;
}
}
}
}
}

View file

@ -10,80 +10,6 @@
white-space: nowrap;
}
.my-module-inventories {
.main-actions {
align-items: center;
display: flex;
.filter-container {
flex-grow: 1;
}
}
.dataTables_scroll {
.dataTables_scrollBody {
thead {
opacity: 0;
}
}
}
tbody {
tr {
.assigned-column {
.repository-row-lock-icon {
display: none !important;
}
}
}
tr:hover {
.assigned-column {
.repository-row-edit-icon {
display: none !important;
}
.circle-icon {
margin-left: 30px !important;
}
}
}
}
.pagination-row {
align-items: center;
display: flex;
.pagination-info,
.pagination-actions {
flex-grow: 1;
}
.pagination-info {
align-items: center;
display: flex;
.dataTables_info {
padding-top: 0;
}
.dataTables_length {
margin-right: 24px;
width: 170px;
.dropdown-selector-container {
width: inherit;
}
label {
margin-bottom: 0;
}
}
}
}
}
#assigned-items-container {
padding-top: 10px;

View file

@ -4,6 +4,9 @@
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
@ -11,83 +14,196 @@
--wrapper-width: 280px;
}
@mixin sidebar-shown {
// This rule is always overriden (show()) in JS
// after document is loaded
#wrapper {
display: none;
padding-left: var(--wrapper-width);
padding-right: 0;
transition: .4s $timing-function-sharp;
#sidebar-arrow {
background-color: $color-concrete;
border-bottom-right-radius: 10px;
border-top-right-radius: 10px;
bottom: 50%;
display: block;
position: absolute;
right: -18px;
span {
padding: 9px 5px;
}
}
#sidebar-arrow:hover {
background-color: $color-concrete;
cursor: pointer;
}
#sidebar-arrow > span {
transform: rotateY(0deg);
transition: .6s; }
#sidebar-arrow[data-shown] > span {
padding-left: 7px;
padding-right: 3px;
transform: rotateY(180deg);
transition: .6s;
}
#sidebar-wrapper {
background-color: $color-concrete;
height: 100%;
left: 83px;
position: fixed;
transition: .4s $timing-function-sharp;
width: var(--wrapper-width);
z-index: 999;
#slide-panel {
height: 100%;
overflow: hidden;
.disabled {
opacity: 1;
}
.tree {
margin-bottom: 0;
opacity: 1;
overflow-y: auto;
padding: 20px 0;
position: absolute;
right: 0;
width: var(--wrapper-width);
}
}
}
}
@mixin sidebar-hidden {
padding-left: 0;
.sidebar-container {
background-color: $color-concrete;
display: flex;
flex-direction: column;
height: calc(100vh - var(--navbar-height));
left: var(--menu-bar-width);
position: fixed;
transition: .4s $timing-function-sharp;
width: var(--wrapper-width);
z-index: 999;
#sidebar-wrapper {
left: calc(83px - var(--wrapper-width));
.show-sidebar {
display: none;
}
#slide-panel {
.tree {
@include transition(opacity .5s ease);
.sidebar-header {
align-items: center;
color: $color-silver-chalice;
display: flex;
flex-shrink: 0;
height: 2.5em;
padding: 0 1em;
.sidebar-title {
@include font-small;
}
.close-sidebar {
cursor: pointer;
display: inline-block;
line-height: 2em;
margin-left: auto;
text-align: center;
width: 2em;
}
}
.sidebar-body {
background: linear-gradient($color-concrete 30%, hsla(0, 0%, 100%, 0)),
linear-gradient(rgba(0, 0, 0, .1), transparent 70%);
background-attachment: local, scroll;
background-repeat: no-repeat;
background-size: 100% 1em, 100% .5em;
flex-basis: calc(100% - 2.5em);
flex-grow: 1;
overflow: auto;
position: relative;
}
.sidebar-footer {
flex-grow: 1;
flex-shrink: 0;
}
&.collapsed {
left: calc(var(--menu-bar-width) - var(--wrapper-width));
.show-sidebar {
background: $color-concrete;
border-radius: 0 $border-radius-default $border-radius-default 0;
cursor: pointer;
display: block;
line-height: 3em;
margin-right: -2em;
position: absolute;
right: 0;
text-align: center;
top: .5em;
width: 2em;
}
}
.sidebar-branch {
flex-basis: 100%;
flex-grow: 1;
list-style-type: none;
padding-left: 2.5em;
}
.delimiter {
background: $color-alto;
height: 1px;
margin: .5em 2.5em .5em 0;
}
.sidebar-leaf {
align-items: center;
display: flex;
flex-wrap: wrap;
.toggle-branch {
cursor: pointer;
display: inline-block;
line-height: 4em;
margin-left: -2em;
margin-right: .5em;
position: relative;
text-align: center;
width: 1.5em;
&:hover ~ .sidebar-link:not(.selected) {
background: $color-alto;
}
&.collapsed ~ .sidebar-branch {
display: none;
}
}
.sidebar-link {
color: $color-black;
display: inline-block;
flex-grow: 1;
line-height: 2em;
margin-left: -2.5em;
max-width: var(--wrapper-width);
overflow: hidden;
padding: 1em 2.5em;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:hover,
&.module-hover {
background: $color-alto;
}
&.selected {
background: $color-white;
color: $brand-primary;
pointer-events: none;
}
.fa-folder {
color: $brand-primary-light;
margin-right: .5em;
}
&.back-button::before {
@include font-awesome;
content: "\f060";
left: 1em;
line-height: 26px;
position: absolute;
}
}
.canvas-center-on {
cursor: pointer;
display: inline-block;
line-height: 4em;
margin-left: -2.5em;
position: relative;
text-align: center;
width: 2.5em;
&:hover {
color: $brand-primary;
}
}
.repository-link {
padding-right: 3em;
position: relative;
.repository-share-status {
display: contents !important;
position: absolute;
right: -3em;
&.hidden {
display: none !important;
}
}
.fas-custom {
height: 4em;
padding: 1.25em .75em;
position: absolute;
right: 0;
top: 0;
width: 3em;
}
}
}
@ -102,22 +218,6 @@
top: 25px;
}
#wrapper {
@include sidebar-shown;
}
#wrapper.no-animation * {
@include no-animation;
}
#wrapper.toggled {
@include sidebar-hidden;
}
#wrapper.hidden2 {
@include sidebar-hidden;
}
.sidebar-no-module-group {
color: $color-silver-chalice;
}

View file

@ -1,5 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable IdSelector
@import "constants";
@import "mixins";
@ -7,27 +8,6 @@
$color-group-hover: $color-alabaster;
$color-module-hover: $brand-primary;
#sortMenu {
border-color: $color-white;
&:not(:focus) {
color: $color-silver-chalice;
}
&:hover {
color: inherit;
}
}
/* Secondary navigation */
.navbar-nav {
.projects-view-mode-switch {
margin: 8px 10px 12px;
}
}
/* Canvas index page */
#canvas-container:not(.canvas-container-edit-mode) {
@ -402,7 +382,6 @@ li.module-hover {
/* Edit module tags modal window */
#manage-module-tags-modal {
.add-tag-form {
display: inline-block;
margin-left: 15px;
@ -474,194 +453,430 @@ li.module-hover {
}
#project-show {
@media (min-width: 1400px) {
.col-md-6 {
width: 33.33%; // fallback if needed
width: calc(100% / 3);
}
// New projects page
#breadcrumbsWrapper {
background: $color-white;
height: 1em;
margin-left: -2em;
padding: 0 2em;
width: calc(100% + 4em);
.projects-breadcrumbs {
@include font-small;
padding: .75em 0;
}
}
// EXPERIMENT PANEL
.experiment-panel {
@include box-shadow(0 4px 8px 0 $color-dove-gray);
display: flex;
flex-direction: column;
height: 400px;
margin: 0 auto;
margin-bottom: 35px;
margin-top: 15px;
max-width: 700px;
.panel-title {
margin-bottom: 14px;
}
.panel-heading .clone-experiment,
.panel-heading .dropdown {
display: none;
}
&:hover .clone-experiment,
&:hover .dropdown {
display: block;
}
.panel-date {
color: $color-silver-chalice;
}
.panel-heading > .clone-experiment {
color: $color-silver-chalice;
padding-left: 4px;
padding-top: 2px;
}
.dropdown {
color: $color-silver-chalice;
button {
padding-left: 6px;
.projects-index {
.project-users-list {
hr {
margin: .5em 0;
}
}
.panel-body {
display: flex;
flex: 1 1 auto;
flex-direction: column;
height: 100%;
a {
height: 100%;
}
.delete-folders-form,
.delete-folders-btn {
display: inline-block;
}
.experiment-description {
margin-top: 10px;
max-height: 86px;
overflow-x: hidden;
.filter-container {
.projects-filters {
.select-block {
&.folders {
align-items: center;
display: flex;
p {
margin: 0;
}
}
.experiment-no-description {
@include font-h3;
color: $color-alto;
display: block;
font-weight: bold;
margin-top: 10px;
text-align: center;
}
.no-workflowimg {
color: $color-alto;
display: block;
text-align: center;
text-decoration: none;
}
.no-tasks {
color: $color-alto;
display: block;
font-size: 1.5em;
font-weight: bold;
margin: 1em 0;
max-height: 200px;
padding-bottom: 70px;
padding-top: 50px;
text-align: center;
}
}
.workflowimg-container {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
.workflowimg-spinner {
color: $color-alto;
top: 50%;
}
img {
max-height: 190px;
max-width: 100%;
}
}
// SHOW
.center-btn {
display: block;
margin: 0 auto;
max-width: 200px;
}
.big-plus {
color: $color-gainsboro;
display: block;
font-size: 180px;
margin: 20px 0;
text-align: center;
&:hover {
color: $color-alto;
}
&:focus {
color: $color-alto;
}
}
/// icon override
.panel-project {
.nav-tabs[data-hook="project-footer-icons"] {
.btn-link {
display: inline-block;
min-width: 30px;
}
.badge-indicator {
background: transparent;
color: $color-silver-chalice;
font-size: 12px;
margin-left: 0;
padding: 0;
top: 0;
}
}
.tab-content[data-hook="project-dropdown-panel"] {
.over-due {
.title {
border-top: 1px solid $color-concrete;
font-size: 14px;
line-height: 15px;
padding: 10px 15px 0;
}
.notification {
padding-left: 35px;
.date-time {
position: relative;
.folder-search-label {
@include font-button;
margin: 0 .3em;
}
.fas {
font-size: 14px;
left: -20px;
color: inherit;
cursor: pointer;
text-decoration: none;
}
.folder-search-popover {
@include font-button;
left: -140px;
padding: 1.25em;
width: 220px;
}
}
}
}
.users-dropdown-list {
.item-avatar {
border-radius: 50%;
height: 20px;
margin: 0 .5em 0 0;
width: 20px;
}
}
}
.projects-toolbar {
.form-group {
width: 100%;
}
.archive-projects-form {
display: inline-block;
}
.restore-projects-form {
display: inline-block;
}
}
.projects-container {
margin: 1.5em 0;
.cards-wrapper {
--card-min-width: 291px;
--list-columns-number: 6;
.projects-group {
grid-column: 1/-1;
margin: 0;
}
.card {
.project-users-link {
color: $color-silver-chalice;
display: inline;
&:hover {
text-decoration: none;
}
}
&.folder-card {
text-align: center;
.icon-folder {
color: $brand-primary-light;
font-size: 5em;
width: 100%;
}
.name {
color: $color-volcano;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.description {
color: $color-volcano;
width: 100%;
}
.project-folder-link {
color: $color-volcano;
display: contents;
text-decoration: none;
}
}
&.project-card {
border-radius: 4px;
box-shadow: $flyout-shadow;
.project-name-cell {
align-items: center;
display: flex;
height: 2em;
margin: 0 1.75em;
overflow: hidden;
a {
color: inherit;
overflow: hidden;
white-space: nowrap;
}
.name {
line-height: 2em;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
}
}
.actions {
position: absolute;
top: 2px;
right: .2em;
top: .2em;
.project-actions-menu {
a {
@include font-button;
padding: .5em 1em;
.fas {
margin-right: .4em;
}
}
&.new-comments::after {
@include red-dot;
right: .4em;
top: .4em;
}
&.new-comments {
.fa-comment {
position: relative;
&::after {
@include red-dot;
right: -.4em;
top: -.3em;
}
}
}
}
}
.data-row {
@include font-button;
align-items: center;
color: $color-black;
display: flex;
flex-basis: 100%;
font-weight: bold;
line-height: 2em;
.card-label {
color: $color-volcano;
font-weight: normal;
width: 5.5em;
}
.cell-value {
display: none;
}
&.user-cell {
a:hover {
text-decoration: none;
}
.value {
display: flex;
flex-wrap: wrap;
}
.global-avatar-container {
height: 28px;
margin-right: .25em;
width: 28px;
}
.more-users {
align-items: center;
background: $color-volcano;
border-radius: 50%;
color: $color-white;
cursor: pointer;
display: flex;
height: 2em;
justify-content: center;
margin-right: .25em;
width: 2em;
}
.new-user {
background: $color-concrete;
text-align: center;
}
}
}
}
}
&.list {
grid-template-columns: max-content repeat(calc(var(--list-columns-number) - 3), minmax(100px, auto)) max-content max-content;
.projects-group {
display: contents;
.projects-breadcrumbs {
grid-column: inherit;
}
&::after {
background: $color-concrete;
content: "";
display: inline-block;
grid-column: inherit;
height: 1px;
}
}
.card {
.data-row {
font-weight: normal;
line-height: 1.25em;
}
.card-label {
display: none;
}
.cell-value {
display: block !important;
}
.name {
@include font-button;
color: $brand-primary;
font-weight: normal;
}
&.folder-card {
text-align: left;
.icon-folder {
display: none;
font-size: 2em;
margin: 0;
}
.name {
grid-column: 5 span;
line-height: 3em;
&:before {
@include font-awesome;
content: "\f07b";
margin-right: .25em;
}
}
.description {
display: none;
}
}
&.project-card {
.card-value {
display: none;
}
.project-name-cell {
grid-column: 2;
height: 100%;
margin: 0;
a:hover {
color: $brand-primary-light;
}
}
.start-date-cell {
grid-column: 3;
}
.visibility-cell {
grid-column: 4;
}
.user-cell {
grid-column: 5;
}
.actions-cell {
align-items: center;
display: flex;
grid-column: 6;
position: initial;
}
}
}
}
}
}
&.active {
[data-view-mode="archived"] {
display: none !important;
}
}
&.archived {
[data-view-mode="active"] {
display: none !important;
}
.projects-container {
.project-actions-menu {
.btn-light:hover {
background: $color-alto;
}
}
.cards-wrapper {
grid-auto-rows: 2.5em;
.card.project-card {
.data-row {
color: $color-silver-chalice;
.card-label {
color: $color-silver-chalice;
}
&.archived-date-cell {
color: $color-volcano;
.card-label {
color: $color-volcano;
}
}
}
}
&.list {
--list-columns-number: 7;
grid-auto-rows: 3em 1px;
grid-template-columns: max-content repeat(calc(var(--list-columns-number) - 2), minmax(100px, auto)) max-content;
.card {
&.folder-card {
.name {
grid-column: 6 span;
}
}
.archived-date-cell {
grid-column: 6;
}
.actions-cell {
grid-column: 7;
position: initial;
}
}
}
}
}
}
}
#move-to-modal {
.button-to-inline-form {
display: inline;
position: relative;
}
.sci-input-container.left-icon {
margin: 1em 0;
}
}

View file

@ -244,7 +244,7 @@
}
&:hover {
background-color: $brand-primary-light;
background-color: $brand-focus-light;
}
.external-import-btn {

View file

@ -368,6 +368,10 @@ label {
.file-name {
margin-left: 15px;
}
.image-icon.report {
display: none;
}
}
img {
@ -464,6 +468,10 @@ label {
margin-left: 5px;
white-space: nowrap;
}
.image-icon.report {
display: none;
}
}
&:hover > .report-element-header .file-name {

View file

@ -97,6 +97,14 @@ div.print-report {
img {
max-width: 100%;
}
.image-icon.preview {
display: none;
}
.image-icon.report {
display: initial !important;
}
}
.report-step-table-element {
@ -199,6 +207,14 @@ div.print-report {
}
}
.image-icon.preview {
display: none;
}
.image-icon.report {
display: initial !important;
}
img {
max-width: 100%;
}

View file

@ -31,66 +31,70 @@
#repository-toolbar {
align-items: center;
background-color: $color-white;
border: 0;
display: flex;
left: var(--repository-sidebar-margin);
padding: 0 2em;
position: fixed;
transition: .4s $timing-function-sharp;
width: calc(100% - var(--repository-sidebar-margin));
z-index: 100;
.toolbar-delimiter {
border-bottom: $border-tertiary;
bottom: 0;
position: absolute;
width: calc(100% - 4em);
}
.repository-share-icon {
flex-shrink: 0;
margin-top: -2px;
.fas-custom {
margin-left: 5px;
}
}
.dropdown-menu {
@include font-button;
}
.repository-title-name {
@include font-h2;
.title-row {
align-items: center;
background-color: $color-white;
border: 0;
display: flex;
flex-direction: column;
flex-grow: 1;
line-height: 32px;
margin-right: 20px;
overflow: hidden;
padding-left: 5px;
text-overflow: ellipsis;
white-space: nowrap;
left: var(--repository-sidebar-margin);
margin-left: 0em;
padding: 0 2em;
position: fixed;
transition: .4s $timing-function-sharp;
width: calc(100% - var(--repository-sidebar-margin));
z-index: 100;
.name-container {
align-items: center;
display: inline-flex;
height: 32px;
margin: 0;
.toolbar-delimiter {
border-bottom: $border-tertiary;
bottom: 0;
margin-left: -2em;
position: absolute;
width: 100%;
}
.read-only-name {
display: inline-block;
line-height: 32px;
max-width: calc(100% - 30px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.repository-share-icon {
flex-shrink: 0;
margin-top: -2px;
.fas-custom {
margin-left: 5px;
}
}
.inline-editing-container {
width: 100%;
.dropdown-menu {
@include font-button;
}
.repository-title-name {
@include font-h2;
display: flex;
flex-direction: column;
flex-grow: 1;
line-height: 32px;
margin-right: 20px;
overflow: hidden;
padding-left: 5px;
text-overflow: ellipsis;
white-space: nowrap;
.name-container {
align-items: center;
display: inline-flex;
height: 32px;
margin: 0;
.read-only-name {
display: inline-block;
line-height: 32px;
max-width: calc(100% - 30px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.inline-editing-container {
width: 100%;
}
}
}
}
@ -249,14 +253,6 @@
}
}
.repository-share-status {
display: contents !important;
&.hidden {
display: none !important;
}
}
.repository-cog {
display: inline-block;
float: right;

View file

@ -101,6 +101,7 @@
}
.repo-columns-list {
@include font-button;
height: 390px;
margin-bottom: 0;
overflow-y: auto;

View file

@ -4,7 +4,6 @@
@include md-card-style;
grid-row: span 6;
height: 23em;
overflow: hidden;
padding: 1em;
position: relative;
width: var(--attachment-column-width);

View file

@ -0,0 +1,178 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable SelectorFormat
.cards-wrapper {
--card-min-width: 200px;
--list-columns-number: 5;
align-items: center;
display: grid;
grid-auto-rows: 2em;
grid-column-gap: 1em;
grid-row-gap: 1em;
grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
width: 100%;
.table-header {
display: none;
}
&.no-results {
.no-results-container {
grid-column: 1 / -1;
grid-row: 8;
}
.no-results-img {
display: block;
margin: auto;
max-height: 230px;
}
.no-results-title {
@include font-h1;
margin-bottom: .25em;
margin-top: 1.25em;
text-align: center;
}
.no-results-description {
@include font-main;
color: $color-silver-chalice;
text-align: center;
}
}
.card {
background-color: $color-white;
color: $color-volcano;
display: flex;
flex-wrap: wrap;
grid-row: span 4;
height: 100%;
padding: .5em 1em;
position: relative;
width: 100%;
.checkbox-cell {
align-items: center;
display: flex;
height: 2em;
justify-content: center;
left: .5em;
position: absolute;
top: .5em;
width: 2em;
}
}
&:not(.list) {
[list-render="true"] {
display: none !important;
}
}
&.list {
grid-auto-flow: dense;
grid-auto-rows: 3em 1px;
grid-column-gap: 0;
grid-row-gap: 0;
grid-template-columns: repeat(var(--list-columns-number), minmax(100px, auto));
[cards-render="true"] {
display: none !important;
}
.no-results-container {
grid-column: 1 / -1;
grid-row: 12;
}
.card {
display: contents;
// Border element
&::after {
background: $color-concrete;
content: "";
display: inline-block;
grid-column: 1/-1;
height: 1px;
}
&:hover {
.table-cell {
background: $color-concrete;
}
}
.table-cell {
height: 100%;
padding: 0 .5em;
width: 100%;
}
.checkbox-cell {
grid-column: 1;
position: initial;
}
}
.table-header {
display: contents;
&::after {
content: "";
grid-column: 1/-1;
}
.table-header-cell {
align-items: center;
border: 1px solid $color-white;
display: flex;
height: 3em;
padding: 0 .5em;
position: sticky;
position: -webkit-sticky;
top: calc(var(--content-header-size) + var(--navbar-height));
z-index: 2;
&.select-all-checkboxes {
justify-content: center;
}
}
& > * {
background-color: $color-concrete;
}
}
}
}
.content-pane.archived {
.cards-wrapper {
.card {
background: $color-concrete;
box-shadow: none !important;
}
&.list {
.card {
&::after {
background: $color-white;
}
.table-cell {
background: $color-concrete;
color: $color-volcano;
}
&:hover {
.table-cell {
background: $color-alto;
}
}
}
}
}
}

View file

@ -0,0 +1,294 @@
// scss-lint:disable SelectorDepth NestingDepth
.comments-sidebar {
--comments-sidebar-width: 280px;
animation-timing-function: $timing-function-sharp;
height: calc(100vh - var(--navbar-height));
position: fixed;
right: 0;
top: var(--navbar-height);
transition: width .3s;
width: 0;
z-index: 1000;
&.open {
width: var(--comments-sidebar-width);
}
.sidebar-content {
background: $color-concrete;
border-left: 1px solid $color-white;
display: flex;
flex-direction: column;
height: 100%;
position: relative;
width: var(--comments-sidebar-width);
.sidebar-header {
align-items: center;
border-bottom: $border-default;
display: flex;
flex-basis: 5em;
flex-shrink: 0;
padding: 1em;
.comments-subject-title {
@include font-h3;
flex-grow: 1;
height: 2em;
line-height: 2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.close-btn {
flex-shrink: 0;
}
}
.sidebar-body {
flex-basis: calc(100% - 10em);
flex-grow: 1;
overflow: auto;
padding: 1em;
.no-comments-placeholder {
display: none;
padding: 1em;
.no-comments-image {
display: block;
margin: 0 auto;
}
.description {
@include font-main;
color: $color-silver-chalice;
}
}
.comments-list:empty + .no-comments-placeholder {
display: block;
}
}
.sidebar-footer {
border-top: $border-default;
flex-basis: 5em;
flex-grow: 1;
flex-shrink: 0;
padding: 1em;
.comment-input-container {
background: $color-white;
border-radius: $border-radius-tag;
padding-right: 2.5em;
position: relative;
.comment-input-field {
animation-timing-function: $timing-function-sharp;
border: 0;
display: block;
line-height: 1.25em;
max-height: 160px;
outline: none;
padding: .5em;
transition: height .3s;
width: 100%;
}
.send-comment {
color: $brand-primary;
cursor: pointer;
display: inline-block;
line-height: 2.5em;
position: absolute;
right: 0;
text-align: center;
top: 0;
width: 2.5em;
}
}
.update-buttons {
display: none;
margin-top: .5em;
}
.error-container {
@include font-small;
color: $brand-danger;
}
&.update {
.update-buttons {
display: block;
}
}
}
}
.comment-container {
margin: 0 1em 2em 0;
.comment-header {
align-items: center;
display: flex;
margin-bottom: .5em;
min-height: 1.75em;
.user-name {
margin: 0 .5em;
order: 2;
}
.user-avatar {
max-width: 1.75em;
}
}
.comment-body {
background: $color-white;
border-radius: $border-radius-default;
.comment-message {
@include font-main;
color: $color-volcano;
padding: .5em 1em;
}
}
.comment-footer {
align-items: center;
display: flex;
padding: 0 1em .5em;
.comment-menu-container {
margin-left: auto;
.open-dropdown-btn {
cursor: pointer;
line-height: 2em;
text-align: center;
width: 2em;
}
.comment-dropdown-menu {
@include font-button;
a {
padding: .5em 1em;
}
.fas {
margin-right: .5em;
}
}
}
.comment-create-date {
@include font-small;
color: $color-volcano;
opacity: .5;
}
}
&.current-user {
margin: 0 0 2em 1em;
.comment-body {
background: $color-alto;
}
.comment-header {
justify-content: flex-end;
.user-avatar {
order: 3;
}
}
}
}
.loading-placeholder {
display: none;
@mixin placeholder-avatar {
@include pulse-animation;
background: $color-alto;
border-radius: 50%;
content: "";
display: inline-block;
height: 1.5em;
width: 1.5em;
}
@mixin placeholder-name {
@include pulse-animation;
background: $color-alto;
content: "";
display: inline-block;
height: 1em;
margin: .25em;
width: 6em;
}
.comment-placeholder {
padding-bottom: 1em;
.comment-body-placeholder {
@include pulse-animation;
background: $color-alto;
height: 5em;
}
&.left {
margin-right: 1em;
.comment-user-placeholder {
&::before {
@include placeholder-avatar;
}
&::after {
@include placeholder-name;
}
}
}
&.right {
margin-left: 1em;
.comment-user-placeholder {
text-align: right;
&::before {
@include placeholder-name;
}
&::after {
@include placeholder-avatar;
}
}
}
}
}
&.loading {
.comments-subject-title {
@include pulse-animation;
background: $color-alto;
}
.loading-placeholder {
display: initial;
}
.sidebar-body {
.comments-list:empty + .no-comments-placeholder {
display: none;
}
}
}
}

View file

@ -1,57 +1,153 @@
// scss-lint:disable SelectorDepth SelectorFormat
// scss-lint:disable NestingDepth QualifyingElement
.content-pane {
--content-header-size: 9.5em;
background-color: $color-white;
margin: 20px 0;
padding: 25px 20px;
&.flexible {
margin: 0;
padding: 0 .5em;
padding: 0 1em;
}
.content-header {
align-items: center;
border-bottom: $border-tertiary;
display: flex;
height: 5em;
h1 {
margin: 0;
&.sticky-header {
background: $color-white;
position: sticky;
position: -webkit-sticky;
top: var(--navbar-height);
z-index: 10;
}
.view-switch {
margin-left: auto;
.title-row {
align-items: center;
background: $color-white;
border-bottom: $border-tertiary;
display: flex;
height: 4em;
margin-left: -2em;
padding: 0 2em;
width: calc(100% + 4em);
.caret {
h1 {
flex-grow: 1;
margin: 0;
}
.header-actions {
align-items: center;
display: flex;
margin-left: auto;
}
.view-switch {
margin-left: auto;
.caret {
margin: 8px 0 8px 8px;
}
&.open {
.caret {
transform: rotateX(180deg)
&.open {
.caret {
transform: rotateX(180deg);
}
}
.dropdown-menu {
@include font-button;
min-width: auto;
.divider-label {
@include font-small;
color: $color-silver-chalice;
padding: .25em 1em;
}
li {
cursor: pointer;
padding: 1em;
white-space: nowrap;
.button-icon {
margin-right: .5em;
}
&:hover {
background: $color-concrete;
}
}
}
.cards-switch {
&.active::after {
@include font-awesome;
content: "\f00c";
position: absolute;
right: 1em;
}
}
}
.dropdown-menu {
@include font-button;
min-width: auto;
.sort-menu {
display: inline-block;
li {
cursor: pointer;
padding: 1em;
white-space: nowrap;
#sortMenu {
background: $color-white;
.button-icon {
margin-right: .5em;
&:focus,
&:active {
box-shadow: none;
}
&:hover {
background: $color-concrete;
}
}
.dropdown-menu {
@include font-button;
min-width: 150px;
padding: .5em 0;
a {
border-radius: unset;
cursor: pointer;
padding: .5em 1em;
text-align: left;
&:hover {
background: $color-concrete;
}
&.selected::after {
@include font-awesome;
content: $font-fas-check;
margin-left: auto;
position: absolute;
right: 1em;
}
}
}
}
}
.toolbar-row {
background: $color-white;
border-bottom: $border-tertiary;
margin-left: -2em;
padding: 1em 0;
padding-left: 2em;
width: calc(100% + 4em);
}
}
.content-body {
&[data-toolbar-visible="false"] {
--content-header-size: 5em;
.toolbar-row {
display: none;
}
}
}

View file

@ -75,6 +75,7 @@
flex-shrink: 0;
line-height: 13px;
margin: 2px 3px;
max-height: 24px;
max-width: calc(100% - 11px);
overflow: hidden;
padding: 5px 8px;
@ -227,7 +228,7 @@
user-select: none;
&:hover {
background: $brand-primary-light;
background: $brand-focus-light;
}
}
@ -241,7 +242,7 @@
background: $color-concrete;
&:hover {
background: $brand-primary-light;
background: $brand-focus-light;
}
&::before {

View file

@ -0,0 +1,124 @@
// scss-lint:disable NestingDepth SelectorDepth
.filter-container {
position: initial;
.filter-dropdown {
padding: 0;
width: 230px;
.header {
align-items: center;
border-bottom: $border-default;
display: flex;
height: 2.75em;
margin-bottom: 1em;
padding: 0 .3em 0 1em;
.title {
@include font-h2;
flex-grow: 1;
user-select: none;
}
}
.select-block {
display: inline-block;
padding: 0 1em 1em;
position: relative;
width: 100%;
label {
@include font-small;
font-weight: bold;
margin-bottom: .3em;
user-select: none;
}
}
.text-search-filter {
&.open {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
.recent-searches {
border-top-left-radius: 0;
border-top-right-radius: 0;
left: auto;
margin-top: -1px;
top: auto;
width: calc(100% - 2em);
label {
@include font-small;
color: $color-silver-chalice;
font-weight: bold;
margin-bottom: .3em;
padding: 0 1.5em;
user-select: none;
}
.projects-search-keyword {
@include font-button;
padding: .5em 1.25em;
.keyword-text {
margin-left: .25em;
}
}
}
.footer {
align-items: center;
border-top: $border-default;
display: flex;
height: 4.25em;
justify-content: center;
padding: 0 1em;
position: relative;
width: 100%;
}
}
&.filters-applied .filter-button::after {
@include red-dot;
right: .35em;
top: .3em;
}
.connect-line {
background: $input-border;
height: 10px;
margin: 5px auto;
width: 2px;
}
@media (min-width: 768px) {
.filter-dropdown {
width: 460px;
}
.footer:not(.center) {
.btn:last-child {
margin-left: auto;
}
}
.datetime-picker-container {
display: inline-block;
width: 46%;
}
.connect-line {
display: inline-block;
margin: 0 11px;
position: relative;
top: 2px;
transform: rotate(90deg);
}
}
}

View file

@ -0,0 +1,82 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable IdSelector
@import "constants";
.folders-tree-container {
--row-height: 36px;
background-color: $color-concrete;
border-radius: 4px;
height: 250px;
overflow: auto;
padding: .5em;
.jstree-wholerow {
border-radius: 4px;
height: var(--row-height);
}
.jstree-wholerow-hovered {
background: $color-alto;
}
.jstree-wholerow-clicked {
background: $color-white;
}
.jstree-search {
color: unset;
font-style: unset;
font-weight: unset;
}
.jstree-leaf {
height: var(--row-height);
.jstree-clicked {
height: var(--row-height);
}
.jstree-hovered {
height: var(--row-height);
}
}
.jstree-closed {
line-height: var(--row-height);
}
.jstree-open {
line-height: var(--row-height);
}
.jstree-icon {
&.root-folder {
color: $color-volcano;
}
&.icon-folder {
color: $brand-primary-light;
}
}
.jstree-default-large .jstree-icon {
background-image: image-url("32px.png");
}
.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl {
background: image-url("throbber.gif") center no-repeat;
}
li.jstree-node {
i.jstree-ocl,
a.jstree-anchor {
margin-top: 2px;
}
}
// Not in use but needs to be defined for proper compiling
.jstree-default-responsive .jstree-icon {
background-image: image-url("40px.png");
}
}

View file

@ -178,3 +178,9 @@
text-decoration: none;
}
}
.atwho-user-container {
.atwho-user-popover {
cursor: pointer;
}
}

View file

@ -12,6 +12,7 @@ $color-black: #231f20;
$brand-primary: #104da9;
$brand-primary-hover: #0c3a80;
$brand-primary-press: #07244f;
$brand-primary-light: #7094cb;
$brand-academy: #a52068;
$brand-academy-dark: #8c1b58;
@ -40,8 +41,6 @@ $marvinjs-color: #29999c;
$pdf-color: #f40f02;
// Don't use them
$color-alabaster: $color-concrete;
$color-gainsboro: $color-concrete;
@ -52,6 +51,7 @@ $brand-default: $color-white;
$brand-info: $brand-focus;
$brand-other: $brand-success;
$brand-extra: $brand-focus;
$brand-primary-light: $brand-focus-light;
$brand-light-blue: $brand-focus-light;
// This color was removed from constants, but it is still in use for DD hover. Need it for button in DD
$color-dd-hover: #f5f5f5;

View file

@ -2,3 +2,14 @@ $timing-function-deceleration: cubic-bezier(0, 0, .2, 1) !default;
$timing-function-standard: cubic-bezier(.4, 0, .2, 1) !default;
$timing-function-acceleration: cubic-bezier(.4, 0, 1, 1) !default;
$timing-function-sharp: cubic-bezier(.4, 0, .6, 1) !default;
@keyframes pulse {
0% {opacity: 1;}
50% {opacity: .7;}
100% {opacity: 1;}
}
@mixin pulse-animation {
animation: pulse 1s infinite;
animation-timing-function: ease-in-out;
}

View file

@ -1,3 +1,7 @@
// scss-lint:disable SelectorDepth, NestingDepth, ImportantRule
@import "constants";
.sci-dropdown {
[data-toggle="dropdown"] {
&:focus {
@ -33,5 +37,20 @@
}
}
}
}
.dropdown-menu {
.form-dropdown-item {
button {
border-radius: 0;
color: $color-black !important;
padding-left: .9em;
text-align: left;
width: 100%;
&:hover {
background-color: $color-dd-hover !important;
}
}
}
}

View file

@ -1,6 +1,10 @@
@import "constants";
@import "mixins";
:root {
--menu-bar-width: 83px;
}
.menu-bar {
background-color: $color-white;
box-shadow: $flyout-shadow;
@ -8,13 +12,13 @@
left: 0;
padding-bottom: 50px;
position: fixed;
width: 83px;
width: var(--menu-bar-width);
z-index: 1001;
.scroll-wrapper {
height: 100%;
padding-top: 16px;
width: 83px;
width: var(--menu-bar-width);
overflow-x: hidden;
}
@ -23,7 +27,7 @@
& > a,
& > span {
@include font-small;
color: $color-silver-chalice;
color: $color-volcano;
display: grid;
margin-left: auto;
margin-right: auto;

View file

@ -54,14 +54,6 @@ table {
margin-left: 15px;
}
#projects-toolbar {
margin-bottom: 15px;
}
#projects-toolbar .form-group {
width: 100%;
}
.form-inline {
.form-group .dropdown {
display: inline-block;
@ -640,7 +632,6 @@ ul.double-line > li {
}
#project-show,
#experiment-archive,
#module-archive,
#result-archive {
.panel-default {
@ -665,84 +656,6 @@ ul.double-line > li {
}
}
.panel-project {
box-shadow: 0 3px 6px $color-alto;
color: $color-silver-chalice;
&:not(.selected) .panel-heading .project-card-selector,
&:not(.selected) .panel-heading .dropdown {
display: none;
}
&:not(.selected):hover .project-card-selector,
&:not(.selected):hover .dropdown {
display: block;
}
.nav .btn-link {
padding: 10px 5px;
}
&.selected {
border-color: $brand-primary;
box-shadow: 0 3px 10px $brand-primary;
}
&.archived {
&,
.panel-heading,
.panel-body,
.panel-footer-scinote {
background-color: $color-concrete;
background-image: none;
}
}
.panel-heading {
background-color: $color-white;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
color: $color-silver-chalice;
.fas {
margin-right: 10px;
}
}
.panel-title {
color: $brand-primary;
.fas {
color: $color-silver-chalice;
}
}
.panel-body {
padding: 10px 15px;
.row {
padding: 2px;
}
}
.panel-footer {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
.nav {
padding: 0 10px;
}
.nav-tabs {
border-bottom: 0;
}
}
.tab-pane {
color: $color-emperor;
}
}
.panel-archive {
.panel-heading {
background-color: darken($color-gainsboro, 5%);
@ -750,7 +663,8 @@ ul.double-line > li {
}
}
#canvas-container {
#canvas-container,
#module-archive {
.panel-heading {
padding: 10px 15px 4px;
}

View file

Before

Width:  |  Height:  |  Size: 474 KiB

After

Width:  |  Height:  |  Size: 474 KiB

View file

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 187 KiB

File diff suppressed because it is too large Load diff

View file

@ -595,7 +595,7 @@
"step": {
"id": 4382,
"name": "Prepare antibiotic dilutions",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Prepare antibiotic dilutions following steps bellow.</p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Prepare antibiotic dilutions following steps below.</p></body></html>",
"position": 0,
"completed": false,
"completed_on": null,
@ -808,7 +808,7 @@
"step": {
"id": 4370,
"name": "Prepare agar plates",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Prepare agar plates following guidelines bellow.</p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Prepare agar plates following guidelines below.</p></body></html>",
"position": 3,
"completed": false,
"completed_on": null,
@ -1401,7 +1401,7 @@
"step": {
"id": 4362,
"name": "Isolate preparation",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow steps bellow for isolate preparation.</p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow steps below for isolate preparation.</p></body></html>",
"position": 1,
"completed": false,
"completed_on": null,

View file

@ -700,7 +700,7 @@
"step": {
"id": 4414,
"name": "Preparation",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Guidelines for samples preparation bellow. </p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Guidelines for samples preparation below. </p></body></html>",
"position": 0,
"completed": false,
"completed_on": null,

View file

@ -88,7 +88,7 @@
"step": {
"id": 4533,
"name": "Examine the plates",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines bellow. </p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines below. </p></body></html>",
"position": 0,
"completed": false,
"completed_on": null,
@ -863,7 +863,7 @@
"step": {
"id": 5495,
"name": "Slide test",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines bellow. </p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines below. </p></body></html>",
"position": 0,
"completed": false,
"completed_on": null,
@ -1020,7 +1020,7 @@
"step": {
"id": 5492,
"name": "Oxidase test",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines bellow: </p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow the guidelines below: </p></body></html>",
"position": 0,
"completed": false,
"completed_on": null,
@ -1604,7 +1604,7 @@
"step": {
"id": 5475,
"name": "Reagents",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>Reagents bellow can be made or purchased.<br><strong><br>Crystal Violet Staining Reagent:<br></strong><span style=\"text-decoration: underline;\"><br>Solution A for crystal violet staining reagent</span></p>\n<ul>\n<li>Crystal violet (certified 90% dye content), 2g </li>\n<li>Ethanol, 95% (vol/vol), 20 mL</li>\n</ul>\n<span style=\"text-decoration: underline;\">Solution B for crystal violet staining reagent<br></span>\n<ul>\n<li>Ammonium oxalate, 0.8 g</li>\n<li>Distilled water, 80 mL</li>\n</ul>\nMix A and B to obtain crystal violet staining reagent. Store for<strong> 24 h</strong> and filter through paper prior to use.<br><br><strong>Gram's Iodine:<br></strong><br>\n<ul>\n<li>Iodine, 1.0 g</li>\n<li>Potassium iodide, 2.0 g</li>\n<li>Distilled water, 300 mL</li>\n</ul>\nGrind the iodine and potassium iodide in a mortar and add water slowly with continuous grinding until the iodine is dissolved. Store in amber bottles.<br><br><strong>Safranin:<br><br></strong><span style=\"text-decoration-line: underline;\">Stock solution:</span><br>\n<ul>\n<li>2.5g Safranin O</li>\n<li>100 ml 95% Ethanol</li>\n</ul>\n<p><span style=\"text-decoration: underline;\">Working Solution:</span></p>\n<ul>\n<li>10 mL Stock Solution </li>\n<li>90 mL Distilled water</li>\n</ul>\n</body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>Reagents below can be made or purchased.<br><strong><br>Crystal Violet Staining Reagent:<br></strong><span style=\"text-decoration: underline;\"><br>Solution A for crystal violet staining reagent</span></p>\n<ul>\n<li>Crystal violet (certified 90% dye content), 2g </li>\n<li>Ethanol, 95% (vol/vol), 20 mL</li>\n</ul>\n<span style=\"text-decoration: underline;\">Solution B for crystal violet staining reagent<br></span>\n<ul>\n<li>Ammonium oxalate, 0.8 g</li>\n<li>Distilled water, 80 mL</li>\n</ul>\nMix A and B to obtain crystal violet staining reagent. Store for<strong> 24 h</strong> and filter through paper prior to use.<br><br><strong>Gram's Iodine:<br></strong><br>\n<ul>\n<li>Iodine, 1.0 g</li>\n<li>Potassium iodide, 2.0 g</li>\n<li>Distilled water, 300 mL</li>\n</ul>\nGrind the iodine and potassium iodide in a mortar and add water slowly with continuous grinding until the iodine is dissolved. Store in amber bottles.<br><br><strong>Safranin:<br><br></strong><span style=\"text-decoration-line: underline;\">Stock solution:</span><br>\n<ul>\n<li>2.5g Safranin O</li>\n<li>100 ml 95% Ethanol</li>\n</ul>\n<p><span style=\"text-decoration: underline;\">Working Solution:</span></p>\n<ul>\n<li>10 mL Stock Solution </li>\n<li>90 mL Distilled water</li>\n</ul>\n</body></html>",
"position": 0,
"completed": false,
"completed_on": null,

View file

@ -1210,7 +1210,7 @@
"step": {
"id": 5154,
"name": "Elution and collection of samples",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow elution and collection guidelines bellow.</p></body></html>",
"description": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>Follow elution and collection guidelines below.</p></body></html>",
"position": 1,
"completed": false,
"completed_on": null,

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
module ActiveStorage
module Blobs
class RedirectController < CustomBaseController
include ActiveStorage::SetBlob
include ActiveStorage::CheckBlobPermissions
def show
expires_in ActiveStorage.service_urls_expire_in
redirect_to @blob.url(disposition: params[:disposition])
end
end
end
end

View file

@ -1,13 +0,0 @@
# frozen_string_literal: true
module ActiveStorage
class BlobsController < CustomBaseController
include ActiveStorage::SetBlob
include ActiveStorage::CheckBlobPermissions
def show
expires_in ActiveStorage.service_urls_expire_in
redirect_to @blob.service_url(disposition: params[:disposition])
end
end
end

View file

@ -8,5 +8,11 @@ module ActiveStorage
prepend_before_action :authenticate_request!, if: -> { request.headers['Authorization'].present? }
skip_before_action :authenticate_user!, if: -> { current_user.present? }
private
def stream(_blob)
raise NotImplementedError
end
end
end

View file

@ -5,7 +5,7 @@ module ActiveStorage
before_action :check_file_size, only: :create
def create
blob = ActiveStorage::Blob.create_before_direct_upload!(blob_args)
blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
render json: direct_upload_json(blob)
end
@ -13,7 +13,7 @@ module ActiveStorage
def blob_args
args = params.require(:blob)
.permit(:filename, :byte_size, :checksum, :content_type, :metadata)
.permit(:filename, :byte_size, :checksum, :content_type, metadata: {})
.to_h
.symbolize_keys
args[:content_type] = 'application/octet-stream' if args[:content_type].blank?

View file

@ -0,0 +1,44 @@
# frozen_string_literal: true
module ActiveStorage
module Representations
class RedirectController < CustomBaseController
include ActiveStorage::SetBlob
include ActiveStorage::CheckBlobPermissions
def show
if @blob.attachments.take.record_type == 'Asset'
return render plain: '', status: :accepted unless preview_ready?
end
expires_in ActiveStorage.service_urls_expire_in
redirect_to @blob.representation(params[:variation_key]).processed.url(disposition: params[:disposition])
end
private
def preview_ready?
processing = @blob.attachments.take.record.file_processing
return false if processing
preview_exists =
if @blob.variable?
@blob.service.exist?(@blob.representation(params['variation_key']).key)
else
@blob.preview(params['variation_key']).image.attached?
end
return true if preview_exists
unless processing
ActiveStorage::PreviewJob.perform_later(@blob.id)
ActiveRecord::Base.no_touching do
@blob.attachments.take.record.update(file_processing: true)
end
end
false
end
end
end
end

View file

@ -1,42 +0,0 @@
# frozen_string_literal: true
module ActiveStorage
class RepresentationsController < CustomBaseController
include ActiveStorage::SetBlob
include ActiveStorage::CheckBlobPermissions
def show
if @blob.attachments.take.record_type == 'Asset'
return render plain: '', status: :accepted unless preview_ready?
end
expires_in ActiveStorage.service_urls_expire_in
redirect_to @blob.representation(params[:variation_key]).processed.service_url(disposition: params[:disposition])
end
private
def preview_ready?
processing = @blob.attachments.take.record.file_processing
return false if processing
preview_exists =
if @blob.variable?
@blob.service.exist?(@blob.representation(params['variation_key']).key)
else
@blob.preview(params['variation_key']).image.attached?
end
return true if preview_exists
unless processing
ActiveStorage::PreviewJob.perform_later(@blob.id)
ActiveRecord::Base.no_touching do
@blob.attachments.take.record.update(file_processing: true)
end
end
false
end
end
end

View file

@ -36,11 +36,6 @@ module Api
def health
User.new && Team.new && Project.new
User.first if params[:db]
if Rails.application.secrets.system_notifications_uri.present? &&
Rails.application.secrets.system_notifications_channel.present? &&
!Notifications::SyncSystemNotificationsService.available?
return render plain: 'SYSTEM NOTIFICATIONS SERVICE CHECK FAILED', status: :error
end
render plain: 'RUNNING'
end

View file

@ -25,7 +25,7 @@ module Api
if @form_multipart_upload
asset = @step.assets.new(asset_params.merge({ team_id: @team.id }))
else
blob = ActiveStorage::Blob.create_after_upload!(
blob = ActiveStorage::Blob.create_and_upload!(
io: StringIO.new(Base64.decode64(asset_params[:file_data])),
filename: asset_params[:file_name],
content_type: asset_params[:file_type]

View file

@ -0,0 +1,56 @@
# frozen_string_literal: true
module Api
module V1
class ProjectFoldersController < BaseController
before_action :load_team
before_action :load_project_folder, only: %i(show update)
def index
project_folders = @team.project_folders
.page(params.dig(:page, :number))
.per(params.dig(:page, :size))
render jsonapi: project_folders, each_serializer: ProjectFolderSerializer
end
def show
render jsonapi: @project_folder, serializer: ProjectFolderSerializer
end
def create
folder = @team.project_folders.create!(folder_params)
render jsonapi: folder, serializer: ProjectFolderSerializer, status: :created
end
def update
@project_folder.attributes = update_folder_params
if @project_folder.changed? && @project_folder.save!
render jsonapi: @project_folder, serializer: ProjectFolderSerializer
else
render jsonapi: nil, status: :no_content
end
end
private
def load_project_folder
@project_folder = @team.project_folders.find(params.require(:id))
end
def folder_params
raise TypeError unless params.require(:data).require(:type) == 'project_folders'
params.permit(data: { attributes: %i(name parent_folder_id) })[:data][:attributes]
end
def update_folder_params
raise IDMismatchError unless params.require(:data).require(:id).to_i == params[:id].to_i
folder_params
end
end
end
end

View file

@ -61,7 +61,7 @@ module Api
def project_params
raise TypeError unless params.require(:data).require(:type) == 'projects'
params.require(:data).require(:attributes).permit(:name, :visibility, :archived)
params.require(:data).require(:attributes).permit(:name, :visibility, :archived, :project_folder_id)
end
def load_project_for_managing

View file

@ -129,7 +129,7 @@ module Api
end
def create_blob_from_params
blob = ActiveStorage::Blob.create_after_upload!(
blob = ActiveStorage::Blob.create_and_upload!(
io: StringIO.new(Base64.decode64(result_file_params[:file_data])),
filename: result_file_params[:file_name],
content_type: result_file_params[:file_type]

View file

@ -168,6 +168,7 @@ class AssetsController < ApplicationController
render_403 && return unless can_manage_protocol_in_module?(step.protocol) ||
can_manage_protocol_in_repository?(step.protocol)
step_asset = StepAsset.create!(step: step, asset: asset)
asset.update!(view_mode: step.assets_view_mode)
step.protocol&.update(updated_at: Time.zone.now)
edit_url = edit_asset_url(step_asset.asset_id)

View file

@ -201,7 +201,7 @@ class CanvasController < ApplicationController
end
end
@my_modules = @experiment.active_modules
@my_modules = @experiment.my_modules.active
end
def check_edit_canvas

View file

@ -0,0 +1,107 @@
# frozen_string_literal: true
class CommentsController < ApplicationController
include ActionView::Helpers::TextHelper
include InputSanitizeHelper
include ApplicationHelper
include CommentHelper
before_action :load_object, only: %i(index create)
before_action :load_comment, only: %i(update destroy)
before_action :check_view_permissions, only: :index
before_action :check_create_permissions, only: :create
before_action :check_manage_permissions, only: %i(update destroy)
def index
comments = @commentable.comments.order(created_at: :asc)
render json: {
object_name: @commentable.name,
comment_addable: comment_addable?(@commentable),
comments: render_to_string(partial: 'shared/comments/comments_list.html.erb',
locals: { comments: comments })
}
end
def create
@comment = @commentable.comments.new(
message: params[:message],
user: current_user,
associated_id: @commentable.id
)
comment_create_helper(@comment, 'comment')
end
def update
old_text = @comment.message
@comment.message = params[:message]
comment_update_helper(@comment, old_text, 'comment')
end
def destroy
comment_destroy_helper(@comment)
end
private
def load_object
@commentable = case params[:object_type]
when 'Project'
Project.find_by(id: params[:object_id])
when 'MyModule'
MyModule.find_by(id: params[:object_id])
when 'Step'
Step.find_by(id: params[:object_id])
when 'Result'
Result.find_by(id: params[:object_id])
end
render_404 and return unless @commentable
end
def load_comment
@comment = Comment.find_by(id: params[:id])
render_404 and return unless @comment
@commentable = @comment.commentable
render_404 and return unless @commentable
end
def comment_params
params.permit(:message)
end
def check_view_permissions
case @commentable
when Project
render_403 and return unless can_read_project?(@commentable)
when MyModule
render_403 and return unless can_read_experiment?(@commentable.experiment)
when Step
render_403 and return unless can_read_protocol_in_module?(@commentable.protocol)
when Result
render_403 and return unless can_read_experiment?(@commentable.my_module.experiment)
else
render_403 and return
end
end
def check_create_permissions
case @commentable
when Project
render_403 and return unless can_create_comments_in_project?(@commentable)
when MyModule
render_403 and return unless can_create_comments_in_module?(@commentable)
when Step
render_403 and return unless can_create_comments_in_module?(@commentable.protocol.my_module)
when Result
render_403 and return unless can_create_comments_in_module?(@commentable.my_module)
else
render_403 and return
end
end
def check_manage_permissions
comment_editable?(@comment)
end
end

View file

@ -11,7 +11,10 @@ module ActiveStorage
private
def check_read_permissions
case @blob.attachments.first.record_type
attachment = @blob.attachments.take
return render_404 if attachment.blank?
case attachment.record_type
when 'Asset'
check_asset_read_permissions
when 'TinyMceAsset'

Some files were not shown because too many files have changed in this diff Show more