mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 19:05:37 +08:00
Merge branch 'master-with-note-section' into feature/marvinjs-integration
This commit is contained in:
commit
dcf94e78e1
29 changed files with 373 additions and 341 deletions
|
@ -3,7 +3,7 @@ AllCops:
|
|||
- "vendor/**/*"
|
||||
- "db/schema.rb"
|
||||
UseCache: false
|
||||
TargetRubyVersion: 2.4
|
||||
TargetRubyVersion: 2.5
|
||||
|
||||
##################### Style ####################################
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ruby:2.4.5
|
||||
FROM ruby:2.5.5
|
||||
MAINTAINER BioSistemika <info@biosistemika.com>
|
||||
|
||||
# additional dependecies
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ruby:2.4.5
|
||||
FROM ruby:2.5.5
|
||||
MAINTAINER BioSistemika <info@biosistemika.com>
|
||||
|
||||
# additional dependecies
|
||||
|
|
18
Gemfile
18
Gemfile
|
@ -2,21 +2,21 @@
|
|||
|
||||
source 'http://rubygems.org'
|
||||
|
||||
ruby '2.4.5'
|
||||
ruby '2.5.5'
|
||||
|
||||
|
||||
gem 'webpacker', '~> 3.5'
|
||||
gem 'bootstrap-sass', '~> 3.3.7'
|
||||
gem 'bootstrap-sass', '~> 3.4'
|
||||
gem 'bootstrap_form'
|
||||
gem 'devise', '~> 4.3.0'
|
||||
gem 'devise', '~> 4.6.2'
|
||||
gem 'devise_invitable'
|
||||
gem 'figaro'
|
||||
gem 'pg', '~> 0.18'
|
||||
gem 'pg_search' # PostgreSQL full text search
|
||||
gem 'rails', '~> 5.1.6.2'
|
||||
gem 'rails', '~> 5.1.7'
|
||||
gem 'recaptcha', require: 'recaptcha/rails'
|
||||
gem 'sanitize', '~> 4.4'
|
||||
gem 'sass-rails', '~> 5.0.6'
|
||||
gem 'sassc-rails'
|
||||
gem 'simple_token_authentication', '~> 1.15.1' # Token authentication for Devise
|
||||
gem 'yomu'
|
||||
|
||||
|
@ -35,9 +35,9 @@ gem 'rack-attack'
|
|||
# JS datetime library, requirement of datetime picker
|
||||
gem 'momentjs-rails', '~> 2.17.1'
|
||||
# JS datetime picker
|
||||
gem 'bootstrap3-datetimepicker-rails', '~> 4.15.35'
|
||||
gem 'bootstrap3-datetimepicker-rails', '~> 4.17.47'
|
||||
# Select elements for Bootstrap
|
||||
gem 'bootstrap-select-rails', '~> 1.12.4'
|
||||
gem 'bootstrap-select-rails', '~> 1.13.8'
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
# jQuery & plugins
|
||||
gem 'autosize-rails' # jQuery autosize plugin
|
||||
|
@ -68,7 +68,7 @@ gem 'nested_form_fields'
|
|||
gem 'nokogiri', '~> 1.8.1' # HTML/XML parser
|
||||
gem 'rails_autolink', '~> 1.1', '>= 1.1.6'
|
||||
gem 'rgl' # Graph framework for project diagram calculations
|
||||
gem 'roo', '~> 2.7.1' # Spreadsheet parser
|
||||
gem 'roo', '~> 2.8.2' # Spreadsheet parser
|
||||
gem 'rubyzip'
|
||||
gem 'scenic', '~> 1.4'
|
||||
gem 'sdoc', '~> 1.0', group: :doc
|
||||
|
@ -116,8 +116,6 @@ group :development, :test do
|
|||
gem 'rails-controller-testing'
|
||||
gem 'rspec-rails'
|
||||
gem 'rubocop', '>= 0.59.0', require: false
|
||||
gem 'scss_lint', require: false
|
||||
gem 'starscope', require: false
|
||||
gem 'timecop'
|
||||
end
|
||||
|
||||
|
|
419
Gemfile.lock
419
Gemfile.lock
|
@ -1,9 +1,9 @@
|
|||
GIT
|
||||
remote: https://github.com/biosistemika/canaid
|
||||
revision: 943ae9b9801819fd2513f6ab9e1143ad8de523ce
|
||||
revision: 6c02dfe7e8354e130d543ec0b398ab6411892d13
|
||||
branch: master
|
||||
specs:
|
||||
canaid (1.0.2)
|
||||
canaid (1.0.3)
|
||||
devise (>= 3.4.1)
|
||||
docile (>= 1.1.0)
|
||||
rails (>= 4)
|
||||
|
@ -17,9 +17,9 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: https://github.com/einzige/sneaky-save
|
||||
revision: 7e7596720e76a3c243042be2f5f916525b143a54
|
||||
revision: ee71d0a00cd4ecdd575bd2a9aa8b8693915f4871
|
||||
specs:
|
||||
sneaky-save (0.1.2)
|
||||
sneaky-save (0.1.3)
|
||||
activerecord (>= 3.2.0)
|
||||
|
||||
GIT
|
||||
|
@ -42,51 +42,51 @@ GIT
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
actioncable (5.1.6.2)
|
||||
actionpack (= 5.1.6.2)
|
||||
actioncable (5.1.7)
|
||||
actionpack (= 5.1.7)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (~> 0.6.1)
|
||||
actionmailer (5.1.6.2)
|
||||
actionpack (= 5.1.6.2)
|
||||
actionview (= 5.1.6.2)
|
||||
activejob (= 5.1.6.2)
|
||||
actionmailer (5.1.7)
|
||||
actionpack (= 5.1.7)
|
||||
actionview (= 5.1.7)
|
||||
activejob (= 5.1.7)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (5.1.6.2)
|
||||
actionview (= 5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
actionpack (5.1.7)
|
||||
actionview (= 5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
rack (~> 2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionview (5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
actionview (5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
active_model_serializers (0.10.7)
|
||||
active_model_serializers (0.10.9)
|
||||
actionpack (>= 4.1, < 6)
|
||||
activemodel (>= 4.1, < 6)
|
||||
case_transform (>= 0.2)
|
||||
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
||||
activejob (5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
activejob (5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
activerecord (5.1.6.2)
|
||||
activemodel (= 5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
activemodel (5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
activerecord (5.1.7)
|
||||
activemodel (= 5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
arel (~> 8.0)
|
||||
activerecord-import (0.23.0)
|
||||
activerecord-import (1.0.1)
|
||||
activerecord (>= 3.2)
|
||||
activesupport (5.1.6.2)
|
||||
activesupport (5.1.7)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
addressable (2.6.0)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
aes_key_wrap (1.0.1)
|
||||
ajax-datatables-rails (0.3.1)
|
||||
|
@ -94,56 +94,57 @@ GEM
|
|||
arel (8.0.0)
|
||||
aspector (0.14.0)
|
||||
ast (2.4.0)
|
||||
auto_strip_attributes (2.2.0)
|
||||
activerecord (>= 3.0)
|
||||
autoprefixer-rails (7.2.5)
|
||||
auto_strip_attributes (2.5.0)
|
||||
activerecord (>= 4.0)
|
||||
autoprefixer-rails (9.5.1)
|
||||
execjs
|
||||
autosize-rails (1.18.17)
|
||||
rails (>= 3.1)
|
||||
awesome_print (1.8.0)
|
||||
aws-sdk (2.10.123)
|
||||
aws-sdk-resources (= 2.10.123)
|
||||
aws-sdk-core (2.10.123)
|
||||
aws-eventstream (1.0.3)
|
||||
aws-sdk (2.11.264)
|
||||
aws-sdk-resources (= 2.11.264)
|
||||
aws-sdk-core (2.11.264)
|
||||
aws-sigv4 (~> 1.0)
|
||||
jmespath (~> 1.0)
|
||||
aws-sdk-resources (2.10.123)
|
||||
aws-sdk-core (= 2.10.123)
|
||||
aws-sigv4 (1.0.2)
|
||||
babel-source (5.8.35)
|
||||
babel-transpiler (0.7.0)
|
||||
babel-source (>= 4.0, < 6)
|
||||
execjs (~> 2.0)
|
||||
backports (3.11.0)
|
||||
aws-sdk-resources (2.11.264)
|
||||
aws-sdk-core (= 2.11.264)
|
||||
aws-sigv4 (1.1.0)
|
||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||
backports (3.14.0)
|
||||
base62 (1.0.0)
|
||||
bcrypt (3.1.11)
|
||||
better_errors (2.4.0)
|
||||
bcrypt (3.1.12)
|
||||
better_errors (2.5.1)
|
||||
coderay (>= 1.0.0)
|
||||
erubi (>= 1.0.0)
|
||||
rack (>= 0.9.0)
|
||||
bindata (2.4.3)
|
||||
bindata (2.4.4)
|
||||
binding_of_caller (0.8.0)
|
||||
debug_inspector (>= 0.0.1)
|
||||
bootstrap-sass (3.3.7)
|
||||
bootstrap-sass (3.4.1)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sass (>= 3.3.4)
|
||||
bootstrap-select-rails (1.12.4)
|
||||
bootstrap3-datetimepicker-rails (4.15.35)
|
||||
sassc (>= 2.0.0)
|
||||
bootstrap-select-rails (1.13.8)
|
||||
bootstrap3-datetimepicker-rails (4.17.47)
|
||||
momentjs-rails (>= 2.8.1)
|
||||
bootstrap_form (2.7.0)
|
||||
bootstrap_form (4.2.0)
|
||||
actionpack (>= 5.0)
|
||||
activemodel (>= 5.0)
|
||||
builder (3.2.3)
|
||||
bullet (5.7.5)
|
||||
bullet (6.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.11.0)
|
||||
byebug (9.1.0)
|
||||
capybara (2.18.0)
|
||||
uniform_notifier (~> 1.11)
|
||||
byebug (11.0.1)
|
||||
capybara (3.18.0)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (>= 2.0, < 4.0)
|
||||
capybara-email (2.5.0)
|
||||
capybara (~> 2.4)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (~> 1.2)
|
||||
xpath (~> 3.2)
|
||||
capybara-email (3.0.1)
|
||||
capybara (>= 2.4, < 4.0)
|
||||
mail
|
||||
case_transform (0.2)
|
||||
activesupport
|
||||
|
@ -164,57 +165,57 @@ GEM
|
|||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.4)
|
||||
cucumber (3.1.0)
|
||||
cucumber (3.1.2)
|
||||
builder (>= 2.1.2)
|
||||
cucumber-core (~> 3.1.0)
|
||||
cucumber-expressions (~> 5.0.4)
|
||||
cucumber-core (~> 3.2.0)
|
||||
cucumber-expressions (~> 6.0.1)
|
||||
cucumber-wire (~> 0.0.1)
|
||||
diff-lcs (~> 1.3)
|
||||
gherkin (~> 5.0)
|
||||
gherkin (~> 5.1.0)
|
||||
multi_json (>= 1.7.5, < 2.0)
|
||||
multi_test (>= 0.1.2)
|
||||
cucumber-core (3.1.0)
|
||||
cucumber-core (3.2.1)
|
||||
backports (>= 3.8.0)
|
||||
cucumber-tag_expressions (~> 1.1.0)
|
||||
gherkin (>= 5.0.0)
|
||||
cucumber-expressions (5.0.13)
|
||||
cucumber-rails (1.5.0)
|
||||
capybara (>= 1.1.2, < 3)
|
||||
cucumber (>= 1.3.8, < 4)
|
||||
gherkin (~> 5.0)
|
||||
cucumber-expressions (6.0.1)
|
||||
cucumber-rails (1.7.0)
|
||||
capybara (>= 2.3.0, < 4)
|
||||
cucumber (>= 3.0.2, < 4)
|
||||
mime-types (>= 1.17, < 4)
|
||||
nokogiri (~> 1.5)
|
||||
railties (>= 4, < 5.2)
|
||||
nokogiri (~> 1.8)
|
||||
railties (>= 4.2, < 7)
|
||||
cucumber-tag_expressions (1.1.1)
|
||||
cucumber-wire (0.0.1)
|
||||
database_cleaner (1.6.2)
|
||||
database_cleaner (1.7.0)
|
||||
debug_inspector (0.0.3)
|
||||
deface (1.3.0)
|
||||
nokogiri (~> 1.6)
|
||||
deface (1.3.2)
|
||||
nokogiri (>= 1.6)
|
||||
polyglot
|
||||
rails (>= 4.1)
|
||||
rainbow (>= 2.1.0)
|
||||
delayed_job (4.1.4)
|
||||
activesupport (>= 3.0, < 5.2)
|
||||
delayed_job_active_record (4.1.2)
|
||||
activerecord (>= 3.0, < 5.2)
|
||||
delayed_job (4.1.5)
|
||||
activesupport (>= 3.0, < 5.3)
|
||||
delayed_job_active_record (4.1.3)
|
||||
activerecord (>= 3.0, < 5.3)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
devise (4.3.0)
|
||||
devise (4.6.2)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
railties (>= 4.1.0, < 6.0)
|
||||
responders
|
||||
warden (~> 1.2.3)
|
||||
devise_invitable (1.7.2)
|
||||
actionmailer (>= 4.1.0)
|
||||
devise (>= 4.0.0)
|
||||
devise_invitable (2.0.1)
|
||||
actionmailer (>= 5.0)
|
||||
devise (>= 4.6)
|
||||
diff-lcs (1.3)
|
||||
discard (1.0.0)
|
||||
activerecord (>= 4.2, < 6)
|
||||
docile (1.1.5)
|
||||
doorkeeper (5.0.0)
|
||||
railties (>= 4.2)
|
||||
docile (1.3.1)
|
||||
doorkeeper (5.1.0)
|
||||
railties (>= 5)
|
||||
erubi (1.8.0)
|
||||
et-orbi (1.1.7)
|
||||
et-orbi (1.2.0)
|
||||
tzinfo
|
||||
execjs (2.7.0)
|
||||
factory_bot (4.8.2)
|
||||
|
@ -224,50 +225,49 @@ GEM
|
|||
railties (>= 3.0.0)
|
||||
faker (1.8.7)
|
||||
i18n (>= 0.7)
|
||||
faraday (0.12.2)
|
||||
faraday (0.15.4)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.9.18)
|
||||
ffi (1.10.0)
|
||||
figaro (1.1.1)
|
||||
thor (~> 0.14)
|
||||
fugit (1.1.8)
|
||||
et-orbi (~> 1.1, >= 1.1.7)
|
||||
fugit (1.2.0)
|
||||
et-orbi (~> 1.1, >= 1.1.8)
|
||||
raabro (~> 1.1)
|
||||
gherkin (5.0.0)
|
||||
globalid (0.4.1)
|
||||
gherkin (5.1.0)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
hammerjs-rails (2.0.8)
|
||||
hashdiff (0.3.8)
|
||||
hashie (3.5.7)
|
||||
hashdiff (0.3.9)
|
||||
hashie (3.6.0)
|
||||
httparty (0.13.7)
|
||||
json (~> 1.8)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (0.9.5)
|
||||
i18n (1.6.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.0.3)
|
||||
i18n (~> 0.6, >= 0.6.6)
|
||||
i18n-js (3.2.1)
|
||||
i18n (>= 0.6.6)
|
||||
iniparse (1.4.4)
|
||||
jaro_winkler (1.5.1)
|
||||
jbuilder (2.7.0)
|
||||
jaro_winkler (1.5.2)
|
||||
jbuilder (2.8.0)
|
||||
activesupport (>= 4.2.0)
|
||||
multi_json (>= 1.2)
|
||||
jmespath (1.3.1)
|
||||
jquery-rails (4.3.1)
|
||||
jmespath (1.4.0)
|
||||
jquery-rails (4.3.3)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (6.0.1)
|
||||
railties (>= 3.2.16)
|
||||
js_cookie_rails (2.1.4)
|
||||
js_cookie_rails (2.2.0)
|
||||
railties (>= 3.1)
|
||||
json (1.8.6)
|
||||
json-jwt (1.9.4)
|
||||
activesupport
|
||||
json-jwt (1.10.0)
|
||||
activesupport (>= 4.2)
|
||||
aes_key_wrap
|
||||
bindata
|
||||
json-schema (2.8.0)
|
||||
addressable (>= 2.4)
|
||||
json_matchers (0.7.2)
|
||||
json-schema (~> 2.7)
|
||||
json_matchers (0.11.0)
|
||||
json_schema
|
||||
json_schema (0.20.4)
|
||||
jsonapi-renderer (0.2.0)
|
||||
jwt (1.5.6)
|
||||
kaminari (1.1.1)
|
||||
|
@ -294,12 +294,12 @@ GEM
|
|||
loofah (2.2.3)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.0)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
method_source (0.9.2)
|
||||
mime-types (1.25.1)
|
||||
mimemagic (0.3.2)
|
||||
mini_mime (1.0.0)
|
||||
mimemagic (0.3.3)
|
||||
mini_mime (1.0.1)
|
||||
mini_portile2 (2.3.0)
|
||||
minitest (5.11.3)
|
||||
momentjs-rails (2.17.1)
|
||||
|
@ -312,30 +312,28 @@ GEM
|
|||
coffee-rails (>= 3.2.1)
|
||||
jquery-rails
|
||||
rails (>= 3.2.0)
|
||||
newrelic_rpm (4.7.1.340)
|
||||
newrelic_rpm (6.2.0.354)
|
||||
nio4r (2.3.1)
|
||||
nokogiri (1.8.5)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
nokogumbo (1.5.0)
|
||||
nokogiri
|
||||
oauth2 (1.4.0)
|
||||
faraday (>= 0.8, < 0.13)
|
||||
jwt (~> 1.0)
|
||||
oauth2 (1.4.1)
|
||||
faraday (>= 0.8, < 0.16.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
oj (3.3.10)
|
||||
omniauth (1.8.1)
|
||||
hashie (>= 3.4.6, < 3.6.0)
|
||||
omniauth (1.9.0)
|
||||
hashie (>= 3.4.6, < 3.7.0)
|
||||
rack (>= 1.6.2, < 3)
|
||||
omniauth-linkedin-oauth2 (0.2.5)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-linkedin-oauth2 (1.0.0)
|
||||
omniauth-oauth2
|
||||
omniauth-oauth2 (1.5.0)
|
||||
omniauth-oauth2 (1.6.0)
|
||||
oauth2 (~> 1.1)
|
||||
omniauth (~> 1.2)
|
||||
omniauth (~> 1.9)
|
||||
orm_adapter (0.5.0)
|
||||
overcommit (0.46.0)
|
||||
overcommit (0.47.0)
|
||||
childprocess (~> 0.6, >= 0.6.3)
|
||||
iniparse (~> 1.4)
|
||||
paperclip (5.3.0)
|
||||
|
@ -344,54 +342,53 @@ GEM
|
|||
mime-types
|
||||
mimemagic (~> 0.3.0)
|
||||
terrapin (~> 0.6.0)
|
||||
parallel (1.12.1)
|
||||
parser (2.5.1.2)
|
||||
parallel (1.17.0)
|
||||
parser (2.6.3.0)
|
||||
ast (~> 2.4.0)
|
||||
pg (0.21.0)
|
||||
pg_search (2.1.4)
|
||||
pg_search (2.1.7)
|
||||
activerecord (>= 4.2)
|
||||
activesupport (>= 4.2)
|
||||
phantomjs (2.1.1.0)
|
||||
poltergeist (1.17.0)
|
||||
capybara (~> 2.1)
|
||||
poltergeist (1.18.1)
|
||||
capybara (>= 2.1, < 4)
|
||||
cliver (~> 0.3.1)
|
||||
websocket-driver (>= 0.2.0)
|
||||
polyglot (0.3.5)
|
||||
powerpack (0.1.2)
|
||||
pry (0.11.3)
|
||||
pry (0.12.2)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
pry-byebug (3.5.1)
|
||||
byebug (~> 9.1)
|
||||
pry-byebug (3.7.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.10)
|
||||
pry-rails (0.3.6)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
public_suffix (3.0.2)
|
||||
puma (3.11.2)
|
||||
public_suffix (3.0.3)
|
||||
puma (3.12.1)
|
||||
raabro (1.1.6)
|
||||
rack (2.0.7)
|
||||
rack-attack (5.4.1)
|
||||
rack-attack (6.0.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rack-proxy (0.6.5)
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (5.1.6.2)
|
||||
actioncable (= 5.1.6.2)
|
||||
actionmailer (= 5.1.6.2)
|
||||
actionpack (= 5.1.6.2)
|
||||
actionview (= 5.1.6.2)
|
||||
activejob (= 5.1.6.2)
|
||||
activemodel (= 5.1.6.2)
|
||||
activerecord (= 5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
rails (5.1.7)
|
||||
actioncable (= 5.1.7)
|
||||
actionmailer (= 5.1.7)
|
||||
actionpack (= 5.1.7)
|
||||
actionview (= 5.1.7)
|
||||
activejob (= 5.1.7)
|
||||
activemodel (= 5.1.7)
|
||||
activerecord (= 5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 5.1.6.2)
|
||||
railties (= 5.1.7)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.2)
|
||||
actionpack (~> 5.x, >= 5.0.1)
|
||||
actionview (~> 5.x, >= 5.0.1)
|
||||
activesupport (~> 5.x)
|
||||
rails-controller-testing (1.0.4)
|
||||
actionpack (>= 5.0.1.x)
|
||||
actionview (>= 5.0.1.x)
|
||||
activesupport (>= 5.0.1.x)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
|
@ -404,30 +401,30 @@ GEM
|
|||
rails (> 3.1)
|
||||
rails_serve_static_assets (0.0.5)
|
||||
rails_stdout_logging (0.0.5)
|
||||
railties (5.1.6.2)
|
||||
actionpack (= 5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
railties (5.1.7)
|
||||
actionpack (= 5.1.7)
|
||||
activesupport (= 5.1.7)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
rake (12.3.2)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rdoc (6.0.4)
|
||||
recaptcha (4.6.3)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
rdoc (6.1.1)
|
||||
recaptcha (4.14.0)
|
||||
json
|
||||
responders (2.4.0)
|
||||
actionpack (>= 4.2.0, < 5.3)
|
||||
railties (>= 4.2.0, < 5.3)
|
||||
rgl (0.5.3)
|
||||
regexp_parser (1.4.0)
|
||||
responders (2.4.1)
|
||||
actionpack (>= 4.2.0, < 6.0)
|
||||
railties (>= 4.2.0, < 6.0)
|
||||
rgl (0.5.4)
|
||||
lazy_priority_queue (~> 0.1.0)
|
||||
stream (~> 0.5.0)
|
||||
rkelly-remix (0.0.7)
|
||||
roo (2.7.1)
|
||||
stream (~> 0.5.2)
|
||||
roo (2.8.2)
|
||||
nokogiri (~> 1)
|
||||
rubyzip (~> 1.1, < 2.0.0)
|
||||
rubyzip (>= 1.2.1, < 2.0.0)
|
||||
rspec-core (3.7.1)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-expectations (3.7.0)
|
||||
|
@ -445,42 +442,36 @@ GEM
|
|||
rspec-mocks (~> 3.7.0)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-support (3.7.0)
|
||||
rubocop (0.59.0)
|
||||
rubocop (0.68.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.5, != 2.5.1.1)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
ruby-graphviz (1.2.3)
|
||||
unicode-display_width (>= 1.4.0, < 1.6)
|
||||
ruby-graphviz (1.2.4)
|
||||
ruby-progressbar (1.10.0)
|
||||
ruby_dep (1.5.0)
|
||||
rubyzip (1.2.1)
|
||||
rufus-scheduler (3.5.2)
|
||||
fugit (~> 1.1, >= 1.1.5)
|
||||
safe_yaml (1.0.4)
|
||||
rubyzip (1.2.2)
|
||||
rufus-scheduler (3.6.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
safe_yaml (1.0.5)
|
||||
sanitize (4.6.6)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.4.4)
|
||||
nokogumbo (~> 1.4)
|
||||
sass (3.5.5)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sass-rails (5.0.7)
|
||||
railties (>= 4.0.0, < 6)
|
||||
sass (~> 3.1)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
scenic (1.4.1)
|
||||
sassc (2.0.1)
|
||||
ffi (~> 1.9)
|
||||
rake
|
||||
sassc-rails (2.1.1)
|
||||
railties (>= 4.0.0)
|
||||
sassc (>= 2.0)
|
||||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
scenic (1.5.1)
|
||||
activerecord (>= 4.0.0)
|
||||
railties (>= 4.0.0)
|
||||
scss_lint (0.56.0)
|
||||
rake (>= 0.9, < 13)
|
||||
sass (~> 3.5.3)
|
||||
sdoc (1.0.0)
|
||||
rdoc (>= 5.0)
|
||||
shoulda-matchers (3.1.2)
|
||||
|
@ -490,12 +481,11 @@ GEM
|
|||
actionmailer (>= 3.2.6, < 6)
|
||||
actionpack (>= 3.2.6, < 6)
|
||||
devise (>= 3.2, < 6)
|
||||
simplecov (0.15.1)
|
||||
docile (~> 1.1.0)
|
||||
simplecov (0.16.1)
|
||||
docile (~> 1.1)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
sourcemap (0.1.1)
|
||||
spinjs-rails (1.4)
|
||||
rails (>= 3.1)
|
||||
sprockets (3.7.2)
|
||||
|
@ -505,34 +495,27 @@ GEM
|
|||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
starscope (1.5.6)
|
||||
babel-transpiler (~> 0.7)
|
||||
oj (~> 3.3)
|
||||
parser (~> 2.4)
|
||||
rkelly-remix (~> 0.0.7)
|
||||
ruby-progressbar (~> 1.9)
|
||||
sourcemap (~> 0.1)
|
||||
stream (0.5)
|
||||
stream (0.5.2)
|
||||
terrapin (0.6.0)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.8)
|
||||
tilt (2.0.9)
|
||||
timecop (0.9.1)
|
||||
tinymce-rails (4.9.3)
|
||||
railties (>= 3.1.1)
|
||||
turbolinks (5.1.1)
|
||||
turbolinks-source (~> 5.1)
|
||||
turbolinks-source (5.1.0)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.1.4)
|
||||
uglifier (4.1.20)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
underscore-rails (1.8.3)
|
||||
unicode-display_width (1.4.0)
|
||||
uniform_notifier (1.11.0)
|
||||
warden (1.2.7)
|
||||
rack (>= 1.0)
|
||||
unicode-display_width (1.5.0)
|
||||
uniform_notifier (1.12.1)
|
||||
warden (1.2.8)
|
||||
rack (>= 2.0.6)
|
||||
webmock (3.5.1)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
|
@ -547,7 +530,7 @@ GEM
|
|||
whacamole (1.2.0)
|
||||
wicked_pdf (1.1.0)
|
||||
wkhtmltopdf-heroku (2.12.4.0)
|
||||
xpath (3.0.0)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yomu (0.2.4)
|
||||
json (~> 1.8)
|
||||
|
@ -569,9 +552,9 @@ DEPENDENCIES
|
|||
bcrypt (~> 3.1.10)
|
||||
better_errors
|
||||
binding_of_caller
|
||||
bootstrap-sass (~> 3.3.7)
|
||||
bootstrap-select-rails (~> 1.12.4)
|
||||
bootstrap3-datetimepicker-rails (~> 4.15.35)
|
||||
bootstrap-sass (~> 3.4)
|
||||
bootstrap-select-rails (~> 1.13.8)
|
||||
bootstrap3-datetimepicker-rails (~> 4.17.47)
|
||||
bootstrap_form
|
||||
bullet
|
||||
byebug
|
||||
|
@ -584,7 +567,7 @@ DEPENDENCIES
|
|||
deface (~> 1.0)
|
||||
delayed_job_active_record
|
||||
delayed_paperclip!
|
||||
devise (~> 4.3.0)
|
||||
devise (~> 4.6.2)
|
||||
devise-async!
|
||||
devise_invitable
|
||||
discard (~> 1.0)
|
||||
|
@ -623,22 +606,21 @@ DEPENDENCIES
|
|||
pry-rails
|
||||
puma
|
||||
rack-attack
|
||||
rails (~> 5.1.6.2)
|
||||
rails (~> 5.1.7)
|
||||
rails-controller-testing
|
||||
rails_12factor
|
||||
rails_autolink (~> 1.1, >= 1.1.6)
|
||||
recaptcha
|
||||
rgl
|
||||
roo (~> 2.7.1)
|
||||
roo (~> 2.8.2)
|
||||
rspec-rails
|
||||
rubocop (>= 0.59.0)
|
||||
ruby-graphviz (~> 1.2)
|
||||
rubyzip
|
||||
rufus-scheduler (~> 3.5)
|
||||
sanitize (~> 4.4)
|
||||
sass-rails (~> 5.0.6)
|
||||
sassc-rails
|
||||
scenic (~> 1.4)
|
||||
scss_lint
|
||||
sdoc (~> 1.0)
|
||||
shoulda-matchers
|
||||
silencer
|
||||
|
@ -646,7 +628,6 @@ DEPENDENCIES
|
|||
simplecov
|
||||
sneaky-save!
|
||||
spinjs-rails
|
||||
starscope
|
||||
timecop
|
||||
tinymce-rails (~> 4.9.3)
|
||||
turbolinks (~> 5.1.1)
|
||||
|
@ -661,7 +642,7 @@ DEPENDENCIES
|
|||
yomu
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.4.5p335
|
||||
ruby 2.5.5p157
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.2
|
||||
1.17.3
|
||||
|
|
|
@ -290,7 +290,8 @@ function initTagsSelector() {
|
|||
closeOnSelect: true,
|
||||
withoutArrow: true,
|
||||
dynamicCreation: true,
|
||||
dynamicCreationDelimiter: [',']
|
||||
dynamicCreationDelimiter: [','],
|
||||
placeholderSize: '250px'
|
||||
}).on('select2:select', (e) => {
|
||||
var params = e.params.data;
|
||||
var newTag = null;
|
||||
|
|
|
@ -146,8 +146,8 @@
|
|||
var $nameInput = $form.find('#result_name');
|
||||
var nameValid = textValidator(ev, $nameInput, 0,
|
||||
<%= Constants::NAME_MAX_LENGTH %>);
|
||||
var $descrTextarea = $form.find("#result_result_text_attributes_text");
|
||||
var $tinyMCEInput = TinyMCE.init('#result_result_text_attributes_text');;
|
||||
var $descrTextarea = $form.find("#result_text_attributes_textarea");
|
||||
var $tinyMCEInput = TinyMCE.getContent();
|
||||
textValidator(ev, $descrTextarea, 1, <%= Constants::RICH_TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
break;
|
||||
case ResultTypeEnum.COMMENT:
|
||||
|
@ -216,6 +216,7 @@
|
|||
event.stopImmediatePropagation();
|
||||
$(form).remove();
|
||||
toggleResultEditButtons(true);
|
||||
TinyMCE.destroyAll();
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
animateSpinner(null, false);
|
||||
FilePreviewModal.init();
|
||||
DragNDropSteps.clearFiles();
|
||||
if (tinyMCE.editors.step_description_textarea) tinyMCE.editors.step_description_textarea.remove();
|
||||
TinyMCE.init('#step_description_textarea');
|
||||
$("#new-step-checklists fieldset.nested_step_checklists ul").each(function () {
|
||||
enableCheckboxSorting(this);
|
||||
|
@ -531,7 +532,7 @@
|
|||
var $nameInput = $form.find("#step_name");
|
||||
var nameValid = textValidator(ev, $nameInput, 1,
|
||||
<%= Constants::NAME_MAX_LENGTH %>);
|
||||
var $descrTextarea = $form.find("#step_description");
|
||||
var $descrTextarea = $form.find("#step_description_textarea");
|
||||
var $tinyMCEInput = TinyMCE.getContent();
|
||||
var descriptionValid = textValidator(ev, $descrTextarea, 0,
|
||||
<%= Constants::RICH_TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
formAjaxResultText($form);
|
||||
Results.initCancelFormButton($form, initNewReslutText);
|
||||
Results.toggleResultEditButtons(false);
|
||||
TinyMCE.refresh();
|
||||
TinyMCE.highlight();
|
||||
TinyMCE.init('#result_text_attributes_textarea');
|
||||
$('#result_name').focus();
|
||||
},
|
||||
error: function() {
|
||||
|
@ -55,11 +54,11 @@
|
|||
$form.after($prevResult);
|
||||
$form.remove();
|
||||
applyEditResultTextCallback();
|
||||
TinyMCE.destroyAll();
|
||||
Results.toggleResultEditButtons(true);
|
||||
});
|
||||
Results.toggleResultEditButtons(false);
|
||||
TinyMCE.refresh();
|
||||
TinyMCE.init('#result_result_text_attributes_text');
|
||||
TinyMCE.init('#result_text_attributes_textarea');
|
||||
$('#result_name').focus();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -57,7 +57,9 @@ $.fn.extend({
|
|||
// Placeholder fix for ajax fields
|
||||
if (config.ajax) {
|
||||
setTimeout(() => {
|
||||
select2.next().find('.select2-search__field').css('width', 'auto');
|
||||
select2.next().find('.select2-search__field').css(
|
||||
'width', config.placeholderSize || 'auto'
|
||||
);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
@ -145,12 +147,15 @@ $.fn.extend({
|
|||
|
||||
$('.select2').find('input, .select2-selection__rendered').off('keydown').on('keydown', function(e) {
|
||||
var activeElement = $('.select2-results .arrow_pointer');
|
||||
var firstElement = $('.select2-results .select2-results__option').first();
|
||||
var groupElement = activeElement.find('.select2-results__group');
|
||||
if (e.keyCode === 13) {
|
||||
if (groupElement.length > 0) {
|
||||
groupElement.click();
|
||||
} else {
|
||||
} else if (activeElement.length > 0) {
|
||||
activeElement.mouseup();
|
||||
} else {
|
||||
firstElement.mouseup();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
|
15
app/assets/javascripts/sitewide/tiny_mce.js
vendored
15
app/assets/javascripts/sitewide/tiny_mce.js
vendored
|
@ -119,7 +119,7 @@ var TinyMCE = (function() {
|
|||
// Hide element containing HTML view of RTE field
|
||||
tinyMceContainer = $(selector).closest('form').find('.tinymce-view');
|
||||
tinyMceInitSize = tinyMceContainer.height();
|
||||
$(selector).closest('form').find('.form-group')
|
||||
$(selector).closest('.form-group')
|
||||
.before('<div class="tinymce-placeholder" style="height:' + tinyMceInitSize + 'px"></div>');
|
||||
tinyMceContainer.addClass('hidden');
|
||||
plugins = 'autosave autoresize customimageuploader link advlist codesample autolink lists charmap hr anchor searchreplace wordcount visualblocks visualchars insertdatetime nonbreaking save directionality paste textcolor colorpicker textpattern';
|
||||
|
@ -212,6 +212,7 @@ var TinyMCE = (function() {
|
|||
setTimeout(() => {
|
||||
$(editor.editorContainer).addClass('show');
|
||||
$('.tinymce-placeholder').remove();
|
||||
moveToolbar(editor, editorToolbar, editorToolbaroffset);
|
||||
}, 400);
|
||||
// Init saved status label
|
||||
if (editor.getContent() !== '') {
|
||||
|
@ -219,8 +220,6 @@ var TinyMCE = (function() {
|
|||
}
|
||||
|
||||
// Init Floating toolbar
|
||||
|
||||
moveToolbar(editor, editorToolbar, editorToolbaroffset);
|
||||
$(window).on('scroll', function() {
|
||||
moveToolbar(editor, editorToolbar, editorToolbaroffset);
|
||||
});
|
||||
|
@ -228,6 +227,14 @@ var TinyMCE = (function() {
|
|||
// Init image toolbar
|
||||
initImageToolBar(editor);
|
||||
|
||||
|
||||
// Update scroll position after exit
|
||||
function updateScrollPosition() {
|
||||
if (editorForm.offset().top < $(window).scrollTop()) {
|
||||
$(window).scrollTop(editorForm.offset().top - 150);
|
||||
}
|
||||
}
|
||||
|
||||
// Init Save button
|
||||
editorForm
|
||||
.find('.tinymce-save-button')
|
||||
|
@ -239,6 +246,7 @@ var TinyMCE = (function() {
|
|||
editor.setProgressState(1);
|
||||
editor.save();
|
||||
editorForm.submit();
|
||||
updateScrollPosition();
|
||||
});
|
||||
|
||||
// After save action
|
||||
|
@ -268,6 +276,7 @@ var TinyMCE = (function() {
|
|||
editorForm.find('.tinymce-status-badge').addClass('hidden');
|
||||
editorForm.find('.tinymce-view').removeClass('hidden');
|
||||
editor.remove();
|
||||
updateScrollPosition();
|
||||
})
|
||||
.removeClass('hidden');
|
||||
|
||||
|
|
|
@ -293,14 +293,24 @@
|
|||
return null;
|
||||
}
|
||||
|
||||
// Create hidden field for images
|
||||
function createImageHiddenField() {
|
||||
textAreaElement.parent().find('input#tiny-mce-images').remove();
|
||||
$('<input type="hidden" id="tiny-mce-images" name="tiny_mce_images" value="[]">').insertAfter(textAreaElement);
|
||||
}
|
||||
|
||||
// Finding images in text
|
||||
function updateActiveImages() {
|
||||
var images;
|
||||
var imageContainer = $('#' + editor.id).next()[0];
|
||||
iframe = $('#' + editor.id).prev().find('.mce-edit-area iframe').contents();
|
||||
images = $.map($('img', iframe), e => {
|
||||
return e.dataset.mceToken;
|
||||
});
|
||||
$('#' + editor.id).next()[0].value = JSON.stringify(images);
|
||||
if (imageContainer === undefined) {
|
||||
createImageHiddenField();
|
||||
}
|
||||
imageContainer.value = JSON.stringify(images);
|
||||
return JSON.stringify(images);
|
||||
}
|
||||
|
||||
|
@ -319,12 +329,14 @@
|
|||
onclick: showDialog
|
||||
});
|
||||
|
||||
ed.on('NodeChange', () => {
|
||||
updateActiveImages(ed);
|
||||
ed.on('NodeChange', function() {
|
||||
// Check editor status
|
||||
if (this.initialized) {
|
||||
updateActiveImages(ed);
|
||||
}
|
||||
});
|
||||
|
||||
textAreaElement.parent().find('input#tiny-mce-images').remove();
|
||||
$('<input type="hidden" id="tiny-mce-images" name="tiny_mce_images" value="[]">').insertAfter(textAreaElement);
|
||||
createImageHiddenField();
|
||||
}
|
||||
|
||||
|
||||
|
@ -334,4 +346,4 @@
|
|||
'customimageuploader',
|
||||
tinymce.plugins.CustomImageUploader
|
||||
);
|
||||
})();
|
||||
}());
|
||||
|
|
|
@ -14,27 +14,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
.my-modules-protocols-index {
|
||||
padding-top: 15px !important;
|
||||
.module-header {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.first-row {
|
||||
max-height: 40px;
|
||||
.header-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
float: left;
|
||||
width: calc(100% - 180px);
|
||||
|
||||
.date-block {
|
||||
max-width: 250px;
|
||||
.flex-block {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
div {
|
||||
height: 45px;
|
||||
}
|
||||
.complete-button-container {
|
||||
float: right;
|
||||
width: 165px;
|
||||
|
||||
.complete-button-container {
|
||||
float: right;
|
||||
max-width: 165px;
|
||||
|
||||
.my_module-state-buttons {
|
||||
padding-top: 0;
|
||||
}
|
||||
.my_module-state-buttons {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,25 +53,42 @@
|
|||
padding-right: 5px;
|
||||
|
||||
+ .well-sm {
|
||||
margin-left: 32px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.module-description {
|
||||
float: left;
|
||||
padding-left: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.module-tags {
|
||||
float: left;
|
||||
width: 100%;
|
||||
|
||||
#module-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.badge-icon {
|
||||
line-height: 32px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
.tags-title {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.badge-icon {
|
||||
line-height: 32px;
|
||||
padding: 9px 5px 9px 10px;
|
||||
}
|
||||
|
||||
.select-container {
|
||||
float: right;
|
||||
display: flex;
|
||||
flex-basis: 100px;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
position: relative;
|
||||
width: calc(100% - 35px);
|
||||
|
||||
select {
|
||||
display: none;
|
||||
|
|
|
@ -418,4 +418,3 @@
|
|||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class Project < ApplicationRecord
|
|||
.where(
|
||||
'visibility = 1 OR user_projects.user_id = :id',
|
||||
id: user.id
|
||||
)
|
||||
).distinct
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class TinyMceAsset < ApplicationRecord
|
|||
def self.update_old_tinymce(description)
|
||||
description.scan(/\[~tiny_mce_id:(\w+)\]/).flatten.each do |token|
|
||||
old_format = /\[~tiny_mce_id:#{token}\]/
|
||||
new_format = "<img src=\"\" class=\"img-responsive\" data-mce-token=\"#{token}\"/>"
|
||||
new_format = "<img src=\"\" class=\"img-responsive\" data-mce-token=\"#{Base62.encode(token)}\"/>"
|
||||
description.sub!(old_format, new_format)
|
||||
end
|
||||
description
|
||||
|
|
|
@ -5,12 +5,21 @@ module Api
|
|||
class UserSerializer < ActiveModel::Serializer
|
||||
type :users
|
||||
attributes :full_name, :initials, :email
|
||||
attribute :avatar_file_name,
|
||||
if: -> { object.avatar.present? } { object.avatar_file_name }
|
||||
attribute :avatar_file_size,
|
||||
if: -> { object.avatar.present? } { object.avatar.size }
|
||||
attribute :avatar_url,
|
||||
if: -> { object.avatar.present? } { object.avatar.url(:icon) }
|
||||
attribute :avatar_file_name, if: -> { object.avatar.present? }
|
||||
attribute :avatar_file_size, if: -> { object.avatar.present? }
|
||||
attribute :avatar_url, if: -> { object.avatar.present? }
|
||||
|
||||
def avatar_file_name
|
||||
object.avatar_file_name
|
||||
end
|
||||
|
||||
def avatar_file_size
|
||||
object.avatar.size
|
||||
end
|
||||
|
||||
def avatar_url
|
||||
object.avatar.url(:icon)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -312,7 +312,11 @@ class TeamImporter
|
|||
end
|
||||
unless activity.values['message_items'].blank?
|
||||
activity.values['message_items'].each_value do |item|
|
||||
next unless item['type']
|
||||
|
||||
mappings = instance_variable_get("@#{item['type'].underscore}_mappings")
|
||||
next unless mappings
|
||||
|
||||
item['id'] = mappings[item['id']]
|
||||
end
|
||||
end
|
||||
|
@ -331,27 +335,25 @@ class TeamImporter
|
|||
) do |tiny_mce_file|
|
||||
orig_tmce_id = tiny_mce_asset.id
|
||||
tiny_mce_asset.id = nil
|
||||
if tiny_mce_asset.step_id.present?
|
||||
tiny_mce_asset.step_id = @step_mappings[tiny_mce_asset.step_id]
|
||||
end
|
||||
if tiny_mce_asset.result_text_id.present?
|
||||
tiny_mce_asset.result_text_id =
|
||||
@result_text_mappings[tiny_mce_asset.result_text_id]
|
||||
if tiny_mce_asset.object_id.present?
|
||||
mappings = instance_variable_get("@#{tiny_mce_asset.object_type.underscore}_mappings")
|
||||
tiny_mce_asset.object_id = mappings[tiny_mce_asset.object_id]
|
||||
end
|
||||
tiny_mce_asset.team = team
|
||||
tiny_mce_asset.image = tiny_mce_file
|
||||
tiny_mce_asset.save!
|
||||
@mce_asset_counter += 1
|
||||
if tiny_mce_asset.step_id.present?
|
||||
step = Step.find_by_id(tiny_mce_asset.step_id)
|
||||
step.description.sub!("[~tiny_mce_id:#{orig_tmce_id}]",
|
||||
"[~tiny_mce_id:#{tiny_mce_asset.id}]")
|
||||
step.save!
|
||||
end
|
||||
if tiny_mce_asset.result_text_id.present?
|
||||
result_text = ResultText.find_by_id(tiny_mce_asset.result_text_id)
|
||||
result_text.text.sub!("[~tiny_mce_id:#{orig_tmce_id}]",
|
||||
"[~tiny_mce_id:#{tiny_mce_asset.id}]")
|
||||
if tiny_mce_asset.object_id.present?
|
||||
object = tiny_mce_asset.object
|
||||
object_field = Extends::RICH_TEXT_FIELD_MAPPINGS[object.class.name]
|
||||
encoded_id = Base62.encode(tiny_mce_asset.id)
|
||||
object.public_send(object_field).sub!("data-mce-token=\"#{Base62.encode(orig_tmce_id)}\"",
|
||||
"data-mce-token=\"#{encoded_id}\"")
|
||||
# Check for old fields
|
||||
new_asset_format = "<img src=\"\" class=\"img-responsive\" data-mce-token=\"#{encoded_id}\"/>"
|
||||
object.public_send(object_field).sub!("[~tiny_mce_id:#{orig_tmce_id}]",
|
||||
new_asset_format)
|
||||
object.save!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="row first-row">
|
||||
<div class="col-xs-6 col-sm-6 col-md-4 col-lg-4 date-block">
|
||||
<div class="header-container">
|
||||
<div class="flex-block date-block">
|
||||
<div class="badge-icon">
|
||||
<span class="fas fa-calendar-alt"></span>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-4 col-lg-4 help_tooltips date-block"
|
||||
<div class="flex-block help_tooltips date-block"
|
||||
data-tooltiplink="<%= I18n.t('tooltips.link.task.due_date_specific') %>"
|
||||
data-tooltipcontent="<%= I18n.t('tooltips.text.task.due_date_specific') %>">
|
||||
<div class="badge-icon">
|
||||
|
@ -39,11 +39,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-3 complete-button-container">
|
||||
<%= render partial: "my_modules/state_buttons.html.erb" %>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
||||
|
||||
<div class="flex-block">
|
||||
<div class="badge-icon">
|
||||
<span class="fas fa-tachometer-alt"></span>
|
||||
</div>
|
||||
|
@ -55,20 +53,23 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row module-tags">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12" id="module-tags" data-module-tags-url="<%= my_module_my_module_tags_url(@my_module, format: :json) %>">
|
||||
|
||||
<div class="complete-button-container">
|
||||
<%= render partial: "my_modules/state_buttons.html.erb" %>
|
||||
</div>
|
||||
|
||||
<div class="module-tags">
|
||||
<div id="module-tags" data-module-tags-url="<%= my_module_my_module_tags_url(@my_module, format: :json) %>">
|
||||
<div class="badge-icon">
|
||||
<span class="fas fa-tags"></span>
|
||||
</div>
|
||||
<div class="well well-sm">
|
||||
<span class="hidden-xs hidden-sm tags-title"><%=t "my_modules.module_header.tags" %></span>
|
||||
<%= render partial: "my_modules/tags", locals: { my_module: @my_module, editable: can_manage_module?(@my_module) } %>
|
||||
</div>
|
||||
<span class="hidden-xs hidden-sm tags-title"><%=t "my_modules.module_header.tags" %></span>
|
||||
<%= render partial: "my_modules/tags", locals: { my_module: @my_module, editable: can_manage_module?(@my_module) } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="module-description">
|
||||
<h4>
|
||||
<%= t('my_modules.module_header.description_label') %>
|
||||
</h4>
|
||||
|
@ -84,7 +85,6 @@
|
|||
<%= t('my_modules.module_header.no_description') %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit description modal -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<button class="btn btn-default">
|
||||
<span class="fas fa-times"></span>
|
||||
<span class="fas fa-undo-alt"></span>
|
||||
<%= t("my_modules.buttons.uncomplete") %>
|
||||
</button>
|
|
@ -14,7 +14,9 @@
|
|||
} %>
|
||||
|
||||
<div class="content-pane my-modules-protocols-index">
|
||||
<%= render partial: "module_header" %>
|
||||
<span class="module-header">
|
||||
<%= render partial: "module_header" %>
|
||||
</span>
|
||||
|
||||
<h2>
|
||||
<%= t('Protocol') %>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<%= bootstrap_form_for(@result, url: result_text_path(format: :json), remote: :true) do |f| %>
|
||||
<%= f.text_field :name, style: "margin-top: 10px;" %><br />
|
||||
<%= f.fields_for :result_text do |ff| %>
|
||||
<div class="form-group">
|
||||
<%= ff.tiny_mce_editor(:text,
|
||||
value: @result.result_text.tinymce_render(:text),
|
||||
data: { object_type: 'result_text',
|
||||
object_id: @result.result_text.id }) %>
|
||||
</div>
|
||||
<%= ff.tiny_mce_editor(:text,
|
||||
id: :result_text_attributes_textarea,
|
||||
value: @result.result_text.tinymce_render(:text),
|
||||
data: { object_type: 'result_text',
|
||||
object_id: @result.result_text.id,
|
||||
highlightjs_path: asset_path('highlightjs-github-theme.css') }) %>
|
||||
<% end %><br />
|
||||
<div class="align-right">
|
||||
<button type="button" class="btn btn-default cancel-edit">
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
<%= bootstrap_form_for(@result, url: my_module_result_texts_path(format: :json), remote: true) do |f| %>
|
||||
<%= f.text_field :name, style: "margin-top: 10px;" %><br />
|
||||
<%= f.fields_for :result_text do |ff| %>
|
||||
<div class="form-group">
|
||||
<%= ff.tiny_mce_editor(:text, data: { object_type: 'result_text',
|
||||
object_id: @result.result_text.id }) %>
|
||||
</div>
|
||||
<%= ff.tiny_mce_editor(:text,
|
||||
id: :result_text_attributes_textarea,
|
||||
data: { object_type: 'result_text',
|
||||
object_id: @result.result_text.id,
|
||||
highlightjs_path: asset_path('highlightjs-github-theme.css') }) %>
|
||||
<% end %><br />
|
||||
<div class="align-right">
|
||||
<button type="button" class="btn btn-default cancel-new">
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<div class="well">
|
||||
<%= bootstrap_form_for(@step, url: step_path(id: @step.id, format: :json), remote: true, authenticity_token: true, multipart: true, data: { role: "edit-step-form", type: :json }) do |f| %>
|
||||
<h4><%= t("protocols.steps.edit.edit_step_title") %></h4>
|
||||
<hr>
|
||||
<%= render partial: "empty_step.html.erb", locals: {step: @step, f: f} %>
|
||||
<hr>
|
||||
<div class="align-right">
|
||||
<a type="button" data-action="cancel-edit" class="btn btn-default" href="<%= step_path(id: @step, format: :json) %>" data-remote="true">
|
||||
<%= t("general.cancel")%>
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<div class="well">
|
||||
<%= bootstrap_form_for(@step, url: protocol_steps_path(@protocol, format: :json), authenticity_token: true, multipart: true, data: { role: "new-step-form", type: :json }) do |f| %>
|
||||
<h4><%= t("protocols.steps.new.add_step_title") %></h4>
|
||||
<hr>
|
||||
<%= render partial: "empty_step.html.erb", locals: {step: @step, f: f} %>
|
||||
<hr>
|
||||
<div class="align-right">
|
||||
<button type="button" data-action="cancel-new" class="btn btn-default">
|
||||
<%= t("general.cancel")%>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pseudo-attachment-container" style="order: <%= assets_count - i %>">
|
||||
<div class="pseudo-attachment-container" style="order: <%= assets_count - i %>">
|
||||
<%= link_to download_asset_path(asset),
|
||||
class: 'file-preview-link',
|
||||
id: "modal_link#{asset.id}",
|
||||
|
|
|
@ -118,7 +118,7 @@ Rails.application.configure do
|
|||
if Rails.root.join('tmp/caching-dev.txt').exist?
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.cache_store = :memory_store, { size: (ENV['RAILS_MEM_CACHE_SIZE_MB'] || 32).to_i.megabytes }
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
|
||||
}
|
||||
|
|
|
@ -78,9 +78,6 @@ Rails.application.configure do
|
|||
# Use a different logger for distributed setups.
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||
|
||||
|
@ -90,7 +87,7 @@ Rails.application.configure do
|
|||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
config.i18n.fallbacks = [I18n.default_locale]
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
@ -129,7 +126,7 @@ Rails.application.configure do
|
|||
end
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
config.cache_store = :memory_store, { size: (ENV['RAILS_MEM_CACHE_SIZE_MB'] || 32).to_i.megabytes }
|
||||
|
||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
||||
config.active_job.queue_adapter = :delayed_job
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe Comment::ProjectComment, type: :model do
|
||||
describe ProjectComment, type: :model do
|
||||
it 'should be of class MyModuleTag' do
|
||||
expect(subject.class).to eq Comment::ProjectComment
|
||||
expect(subject.class).to eq ProjectComment
|
||||
end
|
||||
|
||||
describe 'Database table' do
|
||||
|
|
Loading…
Add table
Reference in a new issue