Skip to content

Commit

Permalink
Fix: downgrade knockoutjs and lodash + fix invalid ko code
Browse files Browse the repository at this point in the history
Fixes a couple issues found by Knockout 3.5 but still downgrade the
library as it still doesn't work properly. Also vendors the asset file
as the gem can't be installed along with rails 5 and the gem does
nothing.

Also downgrades lodash since there was error popping out.
  • Loading branch information
ysbaddaden committed Nov 28, 2023
1 parent d687de7 commit 8c15cfe
Show file tree
Hide file tree
Showing 5 changed files with 5,308 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ gem 'haml-magic-translations'

# assets
gem 'coffee-rails', '~> 4.1.1'
gem 'lodash-rails'
gem 'knockoutjs-rails', '~> 3.5.0'
gem 'lodash-rails', '~> 2.4.1'
gem 'rails-assets-knockout-sortable', :source => 'https://rails-assets.org'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 2.5.0'
Expand Down
7 changes: 2 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@ GEM
aes_key_wrap
bindata
jwt (2.3.0)
knockoutjs-rails (3.5.1.1)
railties (>= 3.1)
locale (2.1.3)
lodash-rails (4.17.21)
lodash-rails (2.4.1)
railties (>= 3.1)
loofah (2.20.0)
crass (~> 1.0.2)
Expand Down Expand Up @@ -488,8 +486,7 @@ DEPENDENCIES
instedd_telemetry!
intercom-rails
jasmine (~> 2.7.0)
knockoutjs-rails (~> 3.5.0)
lodash-rails
lodash-rails (~> 2.4.1)
loofah (= 2.20.0)
machinist (= 1.0.6)
mini_magick
Expand Down
1 change: 0 additions & 1 deletion app/views/layers/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
//ko
%br/
//ko
- if current_user_snapshot.at_present? && collection_admin?
/ko if: !savingLayer()
Expand Down
13 changes: 6 additions & 7 deletions plugins/alerts/views/thresholds/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,13 @@
.rightbuttons
%button.cadd.right
//ko
//ko
-# New threshold link
/ko if: fields().length
.box.grey.add{ ko(visible: 'state() == "listing"', click: 'showAddThreshold'), style: 'display:none'}
.toptitle
%span
Add Alert
.rightbuttons
%button.cadd.right
/.box.grey.add{ ko(visible: 'state() == "listing"', click: 'showAddThreshold'), style: 'display:none'}
/ .toptitle
/ %span
/ Add Alert
/ .rightbuttons
/ %button.cadd.right
//ko
Loading

0 comments on commit 8c15cfe

Please sign in to comment.