Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Issue #2888535 by Dane Powell, phenaproxima: Double-click to select i…
Browse files Browse the repository at this point in the history
…tems in media browser
  • Loading branch information
phenaproxima authored and balsama committed Jun 29, 2017
1 parent 7b1456b commit cef319b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/lightning_features/lightning_media/js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
var Selection = Backbone.View.extend({

events: {
'click [data-selectable]': 'onClick'
'click [data-selectable]': 'onClick',
'dblclick [data-selectable]': 'onClick'
},

initialize: function () {
Expand Down Expand Up @@ -82,6 +83,10 @@
else if (this.cardinality === 1) {
this.deselectAll();
this.select(chosen_one);

if (event.type === 'dblclick') {
this.$('.form-actions input').click().prop('disabled', true);
}
}
else if (chosen_one.hasClass('selected')) {
this.deselect(chosen_one);
Expand Down

0 comments on commit cef319b

Please sign in to comment.