mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-29 02:54:49 +00:00
Upgrade handsontable to version 6.1.1
This commit is contained in:
parent
6989c29d33
commit
31d010cfc6
6 changed files with 74 additions and 120 deletions
|
|
@ -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
37
wagtail/contrib/table_block/static/table_block/css/vendor/handsontable-6.1.1.full.min.css
vendored
Normal file
37
wagtail/contrib/table_block/static/table_block/css/vendor/handsontable-6.1.1.full.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
34
wagtail/contrib/table_block/static/table_block/js/vendor/handsontable-6.1.1.full.min.js
vendored
Normal file
34
wagtail/contrib/table_block/static/table_block/js/vendor/handsontable-6.1.1.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue