Fix close buttons

master
Nick Sergeant 2012-01-25 20:26:53 -05:00
parent 8b847dc2fb
commit dec2a294af
2 changed files with 5 additions and 6 deletions

View File

@ -16,7 +16,6 @@
this.keyboardShortcuts(); this.keyboardShortcuts();
this.inFieldLabels(); this.inFieldLabels();
// Init snipts
if (this.$snipts.length) { if (this.$snipts.length) {
SniptListView = Snipt.Views.SniptListView; SniptListView = Snipt.Views.SniptListView;
SniptList = new SniptListView({ 'snipts': this.$snipts }); SniptList = new SniptListView({ 'snipts': this.$snipts });
@ -28,13 +27,17 @@
}); });
} }
// Search
this.$search_query.focus(function() { this.$search_query.focus(function() {
if (window.$selected) { if (window.$selected) {
$selected.trigger('deselect'); $selected.trigger('deselect');
} }
}); });
$('div.modal a.close').click(function() {
$(this).parent().parent().modal('hide');
return false;
});
}, },
events: { events: {
'showKeyboardShortcuts': 'showKeyboardShortcuts' 'showKeyboardShortcuts': 'showKeyboardShortcuts'

View File

@ -29,10 +29,6 @@
this.$copyModal.on('hidden', function(e) { this.$copyModal.on('hidden', function(e) {
$(this).parent().trigger('copyClose'); $(this).parent().trigger('copyClose');
}); });
this.$copyModalClose.click(function() {
$(this).parent().parent().modal('hide');
return false;
});
}, },
events: { events: {
'click a.copy': 'copyFromClick', 'click a.copy': 'copyFromClick',