Upgrade handsontable to version 6.1.1

This commit is contained in:
Samuel Mendes 2018-11-15 17:15:22 +01:00 committed by Matt Westcott
parent 6989c29d33
commit 31d010cfc6
6 changed files with 74 additions and 120 deletions

View file

@ -106,8 +106,8 @@ class TableBlock(FieldBlock):
@property
def media(self):
return forms.Media(
css={'all': ['table_block/css/vendor/handsontable-0.24.2.full.min.css']},
js=['table_block/js/vendor/handsontable-0.24.2.full.min.js', 'table_block/js/table.js']
css={'all': ['table_block/css/vendor/handsontable-6.1.1.full.min.css']},
js=['table_block/js/vendor/handsontable-6.1.1.full.min.js', 'table_block/js/table.js']
)
def get_table_options(self, table_options=None):
@ -132,8 +132,6 @@ class TableBlock(FieldBlock):
if 'language' not in collected_table_options:
# attempt to gather the current set language of not provided
language = translation.get_language()
if language is not None and len(language) > 2:
language = language[:2]
collected_table_options['language'] = language
return collected_table_options

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -219,8 +219,6 @@ class TestTableBlockForm(WagtailTestUtils, SimpleTestCase):
}
# set language from testing envrionment
language = translation.get_language()
if language is not None and len(language) > 2:
language = language[:2]
self.default_table_options = DEFAULT_TABLE_OPTIONS.copy()
self.default_table_options['language'] = language
@ -251,7 +249,7 @@ class TestTableBlockForm(WagtailTestUtils, SimpleTestCase):
# French
translation.activate('fr-fr')
block_fr = TableBlock()
self.assertEqual('fr', block_fr.table_options['language'])
self.assertEqual('fr-fr', block_fr.table_options['language'])
translation.activate('it')
# Italian
block_it = TableBlock()