From edae3f7b6fa0ed38a3d54bb339d7c55182f82281 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 6 May 2020 18:54:10 -0300 Subject: refactor to use 'select' instead of 'selected' --- ui.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui.js b/ui.js index 7bbfd84..d223f18 100644 --- a/ui.js +++ b/ui.js @@ -736,7 +736,7 @@ class AppElement extends FocusElement { grouplikeListing.pathElement.on('select', item => this.reveal(item)) grouplikeListing.on('menu', (item, el) => this.showMenuForItemElement(el, grouplikeListing)) /* - grouplikeListing.on('selected', item => this.editNotesFile(item, false)) + grouplikeListing.on('select', item => this.editNotesFile(item, false)) grouplikeListing.on('edit-notes', item => { this.reveal(item) this.editNotesFile(item, true) @@ -1623,11 +1623,11 @@ class GrouplikeListingElement extends Form { this.form = this.getNewForm() this.addInput(this.form) - this.form.on('selected', input => { + this.form.on('select', input => { if (input && this.pathElement) { this.pathElement.showItem(input.item) this.autoscroll() - this.emit('selected', input.item) + this.emit('select', input.item) } }) @@ -1680,7 +1680,7 @@ class GrouplikeListingElement extends Form { selected() { this.curIndex = 0 this.root.select(this.form) - this.emit('selected', this.currentItem) + this.emit('select', this.currentItem) } clicked(button) { @@ -2027,7 +2027,7 @@ class GrouplikeListingForm extends ListScrollForm { set curIndex(newIndex) { this.setDep('curIndex', newIndex) - this.emit('selected', this.inputs[this.curIndex]) + this.emit('select', this.inputs[this.curIndex]) return newIndex } @@ -3515,7 +3515,7 @@ class Tabber extends FocusElement { this.listElement = new TabberList(this) this.addChild(this.listElement) - this.listElement.on('selected', item => this.selectTab(item)) + this.listElement.on('select', item => this.selectTab(item)) this.listElement.on('next tab', () => this.nextTab()) this.listElement.on('previous tab', () => this.previousTab()) } @@ -3649,7 +3649,7 @@ class TabberList extends ListScrollForm { const element = new TabberListItem(item, this.tabber) this.addInput(element) element.fixLayout() - element.on('selected', () => this.emit('selected', item)) + element.on('select', () => this.emit('select', item)) } this.scrollToEnd() @@ -3722,7 +3722,7 @@ class TabberListItem extends FocusElement { clicked(button) { if (button === 'left') { - this.emit('selected') + this.emit('select') return false } } -- cgit 1.3.0-6-gf8a5