remove unused options

as we use flatpickr, we don't need these options
This commit is contained in:
Jean-Baptiste Bellet
2021-01-15 15:34:09 +01:00
parent 4f7f8b559a
commit e06ea6ccd3
3 changed files with 1 additions and 31 deletions

View File

@@ -1,29 +1,4 @@
$(document).ready(function(){
window.JQUERY_UI_DATE_PICKER_DEFAULTS = {
dateFormat: Spree.translations.date_picker,
dayNames: Spree.translations.abbr_day_names,
dayNamesMin: Spree.translations.abbr_day_names,
monthNames: Spree.translations.month_names,
prevText: Spree.translations.previous,
nextText: Spree.translations.next,
oneLine: true,
showOn: 'button',
buttonImage: "<%= asset_path 'datepicker/cal.gif' %>",
buttonImageOnly: true
}
window.JQUERY_UI_DATETIME_PICKER_DEFAULTS = Object.assign(
{},
window.JQUERY_UI_DATE_PICKER_DEFAULTS,
{
currentText: Spree.translations.datetime_ui_current_text,
closeText: Spree.translations.datetime_ui_close_text,
timeText: Spree.translations.datetime_ui_time_text,
timeFormat: 'HH:mm',
controlType: 'select',
stepMinute: 15
}
);
window.FLATPICKR_DATE_DEFAULT = {
dateFormat: Spree.translations.flatpickr_date_format,
locale: I18n.locale

View File

@@ -1,9 +1,6 @@
<script>
Spree.translations = <%==
{ :date_picker => Spree.t(:js_format,
:scope => 'date_picker',
:default => 'yy/mm/dd'),
:flatpickr_date_format => Spree.t(:flatpickr_date_format,
{:flatpickr_date_format => Spree.t(:flatpickr_date_format,
:scope => 'date_picker',
:default => 'Y-m-d H:i'),
:abbr_day_names => I18n.t(:abbr_day_names, :scope => :date),

View File

@@ -3593,8 +3593,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
or_enter_new_card: "Or, enter details for a new card:"
remember_this_card: Remember this card?
date_picker:
format: ! '%Y-%m-%d'
js_format: 'yy-mm-dd'
flatpickr_date_format: "Y-m-d H:i"
orders:
error_flash_for_unavailable_items: "An item in your cart has become unavailable. Please update the selected quantities."