diaspora/app/assets/javascripts/app/views/sidebar.js
Srihari Sriraman cbaaf86bae Single click selects the invite link
- Earlier, triple-clicking or drag & select had to be performed to select
- Should consider a copy button

Moving away from the inline onClick handler

It didn't feel right to be writing js in a helper.

Refactoring setupInviteLinks into a sidebar Backbone View
2013-08-28 20:40:28 +02:00

11 lines
203 B
JavaScript

app.views.Sidebar = app.views.Base.extend({
el: '.rightBar',
events: {
'click input#invite_code': 'selectInputText'
},
selectInputText: function(event) {
event.target.select();
}
});