mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Repeaters Firefox compatibility fixes (#2738)
* Repeaters fix Firefox collapse/expand buttons not working * Repeaters fix Firefox open new tab when CTRL + click on Expand/Collapse buttons
This commit is contained in:
parent
982bc43348
commit
9e74fe6a53
@ -51,7 +51,7 @@
|
||||
|
||||
Repeater.prototype.dispose = function() {
|
||||
this.$sortable.sortable('destroy')
|
||||
|
||||
|
||||
this.$el.off('ajaxDone', '> .field-repeater-items > .field-repeater-item > .repeater-item-remove > [data-repeater-remove]', this.proxy(this.onRemoveItemSuccess))
|
||||
this.$el.off('ajaxDone', '> .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess))
|
||||
this.$el.off('click', '> .field-repeater-items > .field-repeater-item > .repeater-item-collapse .repeater-item-collapse-one', this.proxy(this.toggleCollapse))
|
||||
@ -102,7 +102,9 @@
|
||||
var $item = $(ev.target).closest('.field-repeater-item'),
|
||||
isCollapsed = $item.hasClass('collapsed')
|
||||
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
ev.preventDefault()
|
||||
|
||||
if (ev.ctrlKey || ev.metaKey) {
|
||||
isCollapsed ? this.expandAll() : this.collapseAll()
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user