Skip to content

Commit

Permalink
Make the whole repeater-item clickable for expansion (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin authored Oct 5, 2024
1 parent 1a3b477 commit 651486f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/backend/formwidgets/repeater/assets/js/repeater.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@

this.$el.on('ajaxDone', '> .field-repeater-items > .field-repeater-item > .repeater-item-remove > [data-repeater-remove]', this.proxy(this.onRemoveItemSuccess))
this.$el.on('ajaxDone', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess))
this.$el.on('click', '> ul > li > .repeater-item-collapse .repeater-item-collapse-one', this.proxy(this.toggleCollapse))
this.$el.on('click', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add-group]', this.proxy(this.clickAddGroupButton))

var $item = this.$el.find('> ul > li.field-repeater-item')
$item.css('cursor', 'pointer')
$item.on('click', this.proxy(this.toggleCollapse))
$item.on('click', '> .repeater-item-collapse-one', this.proxy(this.toggleCollapse))

this.$el.one('dispose-control', this.proxy(this.dispose))

this.togglePrompt()
Expand Down

0 comments on commit 651486f

Please sign in to comment.