lib/letter_opener/web/assets/javascripts/application.js in letter_opener-web-0.1.2 vs lib/letter_opener/web/assets/javascripts/application.js in letter_opener-web-0.2.0
- old
+ new
@@ -18,8 +18,22 @@
$('#delete').on('submit', function(e) {
var ids = $('.message input[type="checkbox"]:checked').map(function(){ return $(this).val(); }).toArray().join(',');
if (ids.length <= 0) { return false; }
var self = $(this), message = self.data('confirm');
if (message && !confirm(message)) { return false; }
- $(this).find(':hidden[name=message_ids]').val(ids);
+ self.find('button[type=submit]').attr("disabled", "disabled");
+ self.find(':hidden[name=message_ids]').val(ids);
+ });
+ $('#refresh').on('click', function(e) {
+ var self = $(this);
+ var icon = self.find( ".glyphicon" );
+ icon.addClass( "glyphicon-animate" );
+ });
+ $('#search').on('submit', function(e) {
+ e.preventDefault();
+ });
+ $('.message_list').searcher({
+ itemSelector: 'li',
+ textSelector: 'dt',
+ inputSelector: '#search_input'
});
});