Remove jquery-validation-rails gem

#744
This commit is contained in:
Artur Beljajev 2018-02-28 12:10:39 +02:00
parent bf422387aa
commit b72bc2a0b0
5 changed files with 0 additions and 29 deletions

View file

@ -42,7 +42,6 @@ gem 'sass-rails', '5.0.6' # sass style
gem 'coffee-rails', '4.1.0' # coffeescript support
gem 'jquery-rails', '4.0.4' # jquery
gem 'selectize-rails', '0.12.1' # include selectize.js for select
gem 'jquery-validation-rails', '1.13.1' # validate on client side
# view helpers
gem 'kaminari', '0.16.3' # pagination

View file

@ -241,9 +241,6 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
jquery-validation-rails (1.13.1)
railties (>= 3.2, < 5.0)
thor (~> 0.14)
json (1.8.6)
kaminari (0.16.3)
actionpack (>= 3.0.0)
@ -508,7 +505,6 @@ DEPENDENCIES
jbuilder (= 2.2.16)
jquery-rails (= 4.0.4)
jquery-ui-rails (= 5.0.5)
jquery-validation-rails (= 1.13.1)
kaminari (= 0.16.3)
liquid (= 3.0.6)
mina (= 0.3.1)

View file

@ -5,7 +5,6 @@
#= require admin/autocomplete
#= require jquery.nested_attributes
#= require selectize
#= require shared/jquery.validate.bootstrap
#= require jquery-ui/datepicker
#= require select2
#= require jquery.doubleScroll

View file

@ -6,10 +6,6 @@ $(window).load ->
allowEmptyOption: true, create: true
})
# client side validate all forms
$('form').each ->
$(this).validate()
$('[data-toggle="popover"]').popover()
# doublescroll

View file

@ -1,19 +0,0 @@
#= require jquery.validate
#= require jquery.validate.additional-methods
# override jquery validate plugin defaults
$.validator.setDefaults
highlight: (element) ->
$(element).closest('.form-group').addClass 'has-error'
return
unhighlight: (element) ->
$(element).closest('.form-group').removeClass 'has-error'
return
errorElement: 'span'
errorClass: 'help-block'
errorPlacement: (error, element) ->
if element.parent('.input-group').length
error.insertAfter element.parent()
else
error.insertAfter element
return