Deselect and match transition speed
parent
1db314ebb5
commit
5c9c0bff29
|
@ -19,6 +19,13 @@
|
|||
SniptList = new SniptListView({ 'snipts': this.$snipts });
|
||||
}
|
||||
|
||||
// Search
|
||||
this.$search_query.focus(function() {
|
||||
if (window.$selected) {
|
||||
$selected.trigger('deselect');
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
keyboardShortcuts: function() {
|
||||
|
||||
|
@ -37,7 +44,9 @@
|
|||
});
|
||||
},
|
||||
inFieldLabels: function () {
|
||||
$('div.infield label', this.el).inFieldLabels();
|
||||
$('div.infield label', this.el).inFieldLabels({
|
||||
fadeDuration: 200
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
'click .container': 'clickSelect',
|
||||
'copy': 'copy',
|
||||
'detail': 'detail',
|
||||
'deselect': 'deselect',
|
||||
'expand': 'expand',
|
||||
'next': 'next',
|
||||
'prev': 'prev',
|
||||
|
@ -48,6 +49,10 @@
|
|||
window.prompt('Text is selected. To copy: press ' + cmd + '+C then <Enter>', this.$raw.text());
|
||||
return false;
|
||||
},
|
||||
deselect: function() {
|
||||
this.$el.removeClass('selected');
|
||||
window.$selected = false;
|
||||
},
|
||||
detail: function() {
|
||||
window.location = this.model.get('url');
|
||||
},
|
||||
|
@ -122,8 +127,7 @@
|
|||
});
|
||||
$(document).bind('keydown', 'esc', function() {
|
||||
if ($selected) {
|
||||
$selected.removeClass('selected');
|
||||
$selected = false;
|
||||
$selected.trigger('deselect');
|
||||
}
|
||||
});
|
||||
$(document).bind('keydown', 'j', function() {
|
||||
|
|
Loading…
Reference in New Issue