Skip to content

Commit

Permalink
Remove bootstrap datepicker and Modernizr
Browse files Browse the repository at this point in the history
  • Loading branch information
isc committed Nov 3, 2023
1 parent 56182af commit 41b73e9
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 27 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/advanced_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const setupAdvancedSearch = () => {
filterDiv = $('<tr>').append(resp).appendTo($('.filters'))
selectFilter = filterDiv.find('td.operators select').focus()
updateFilterForm(selectFilter)
initDatepickers()
})
})
}
Expand Down
2 changes: 0 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//= require jquery-2.1.4.min
//= require bootstrap-3.3.6.min
//= require modernizr-custom
//= require jquery_ujs
//= require jquery-ui-1.11.4.custom.min
//= require sh_main.min
Expand All @@ -9,6 +8,5 @@
//= require bootstrap-wysihtml5
//= require jquery.csv-0.8.1.min
//= require select2
//= require bootstrap-datepicker.min
//= require clipboard.min
//= require_tree .
2 changes: 0 additions & 2 deletions app/assets/javascripts/bootstrap.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ adminiumSelect2Matcher = (params, data) ->
else
if data.text.match(r) then data else null

window.initDatepickers = -> $('input[type=date]').datepicker autoclose: true, format: 'yyyy-mm-dd' unless Modernizr.inputtypes['date']
$ ->
$('span[rel=tooltip], button[rel=tooltip], a[rel*=tooltip], i[rel=tooltip]').tooltip(container: 'body')
$("a.text-more, span.text-more, i.text-more").popover(trigger: 'hover', html: true)
initDatepickers()
sh_highlightDocument()

$.fn.select2.defaults.set('theme', 'bootstrap')
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/in_place_editing.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class InPlaceEditing
else
input.attr('name', name).addClass('form-control').focus()
input.data('null-value', true) if td.hasClass('nilclass')
initDatepickers()
new EnumerateInput(input, 'open') if type is 'enum'
new NullifiableInput(input, false, type) unless input.prop('tagName') is 'SPAN'

Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/listing.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class BulkActions
$.get "#{path}?#{item_ids.join('&')}", (data) =>
$('#bulk-edit-modal').html(data)
AutocompleteAssociationsForm.setup()
initDatepickers()
false

setupBulkDestroy: ->
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*= require font-awesome
*= require select2
*= require select2-bootstrap
*= require bootstrap-datepicker3.min
*= require types
*= require resources
*= require in_place_editing
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/form_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def default_input_type resource, name, value
end

def datetime_input input_options, input_value, input_name, input_type
input_options[:class] = 'datepicker form-control'
input_options[:class] = 'form-control'
res = ''.html_safe
if %i(date datetime).include? input_type
input_value = Time.now if input_value.is_a? Sequel::SQL::Constant
Expand Down
8 changes: 0 additions & 8 deletions vendor/assets/javascripts/bootstrap-datepicker.min.js

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/assets/javascripts/modernizr-custom.js

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/assets/stylesheets/bootstrap-datepicker3.min.css

This file was deleted.

0 comments on commit 41b73e9

Please sign in to comment.