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
This commit is contained in:
parent
ec97c2e760
commit
cbaaf86bae
2 changed files with 12 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ var app = {
|
|||
setupGlobalViews: function() {
|
||||
app.hovercard = new app.views.Hovercard();
|
||||
app.aspectMemberships = new app.views.AspectMembership();
|
||||
app.sidebar = new app.views.Sidebar();
|
||||
},
|
||||
|
||||
/* mixpanel wrapper function */
|
||||
|
|
|
|||
11
app/assets/javascripts/app/views/sidebar.js
Normal file
11
app/assets/javascripts/app/views/sidebar.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
app.views.Sidebar = app.views.Base.extend({
|
||||
el: '.rightBar',
|
||||
|
||||
events: {
|
||||
'click input#invite_code': 'selectInputText'
|
||||
},
|
||||
|
||||
selectInputText: function(event) {
|
||||
event.target.select();
|
||||
}
|
||||
});
|
||||
Loading…
Reference in a new issue