Fix protocol update error, rollback bootstrap gems and fix step name

This commit is contained in:
Anton Ignatov 2019-05-08 17:18:19 +02:00
parent d08bdd771e
commit 995408e7fc
5 changed files with 53 additions and 24 deletions

View file

@ -6,8 +6,8 @@ ruby '2.5.5'
gem 'webpacker', '~> 3.5'
gem 'bootstrap-sass', '~> 3.4'
gem 'bootstrap_form'
gem 'bootstrap-sass', '~> 3.3.7'
gem 'bootstrap_form', '~> 2.7.0'
gem 'devise', '~> 4.6.2'
gem 'devise_invitable'
gem 'figaro'
@ -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.17.47'
gem 'bootstrap3-datetimepicker-rails', '~> 4.15.35'
# Select elements for Bootstrap
gem 'bootstrap-select-rails', '~> 1.13.8'
gem 'bootstrap-select-rails', '~> 1.12.4'
gem 'uglifier', '>= 1.3.0'
# jQuery & plugins
gem 'autosize-rails' # jQuery autosize plugin

View file

@ -96,7 +96,7 @@ GEM
ast (2.4.0)
auto_strip_attributes (2.5.0)
activerecord (>= 4.0)
autoprefixer-rails (9.5.1)
autoprefixer-rails (9.5.1.1)
execjs
autosize-rails (1.18.17)
rails (>= 3.1)
@ -121,15 +121,13 @@ GEM
bindata (2.4.4)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.4.1)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-select-rails (1.13.8)
bootstrap3-datetimepicker-rails (4.17.47)
sass (>= 3.3.4)
bootstrap-select-rails (1.12.4)
bootstrap3-datetimepicker-rails (4.15.35)
momentjs-rails (>= 2.8.1)
bootstrap_form (4.2.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
bootstrap_form (2.7.0)
builder (3.2.3)
bullet (6.0.0)
activesupport (>= 3.0.0)
@ -460,6 +458,11 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.4.4)
nokogumbo (~> 1.4)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.0.1)
ffi (~> 1.9)
rake
@ -552,10 +555,10 @@ DEPENDENCIES
bcrypt (~> 3.1.10)
better_errors
binding_of_caller
bootstrap-sass (~> 3.4)
bootstrap-select-rails (~> 1.13.8)
bootstrap3-datetimepicker-rails (~> 4.17.47)
bootstrap_form
bootstrap-sass (~> 3.3.7)
bootstrap-select-rails (~> 1.12.4)
bootstrap3-datetimepicker-rails (~> 4.15.35)
bootstrap_form (~> 2.7.0)
bullet
byebug
canaid!

View file

@ -76,10 +76,36 @@
}
.left-floats {
float: left;
align-items: center;
display: flex;
height: 39px;
> * {
float: left;
.step-name-link {
display: flex;
flex-shrink: 1;
overflow: hidden;
.name-block {
display: inline-block;
height: 39px;
max-width: calc(100% - 300px);
overflow: hidden;
strong {
white-space: nowrap;
}
}
.delimiter {
padding: 0 5px;
}
.author-block {
overflow: hidden;
padding-right: 10px;
white-space: nowrap;
width: 300px;
}
}
}
}

View file

@ -266,7 +266,7 @@ class Protocol < ApplicationRecord
def self.clone_contents(src, dest, current_user, clone_keywords)
assets_to_clone = []
dest.update(description: src.description)
src.clone_tinymce_assets(dest, dest.team)
# Update keywords

View file

@ -63,13 +63,13 @@
<span class="step-number"><%= step.position + 1 %></span>
<a class="step-panel-collapse-link"
<a class="step-panel-collapse-link step-name-link"
href="#step-panel-<%= step.id %>"
data-toggle="collapse"
data-remote="true">
<strong><%= step.name %></strong> |
<span><%= sanitize_input t('protocols.steps.published_on',
<span class="name-block"><strong><%= step.name %></strong></span>
<span class="delimiter">|</span>
<span class="author-block"><%= sanitize_input t('protocols.steps.published_on',
timestamp: l(step.created_at, format: :full),
user: h(step.user.full_name)) %></span>
</a>