Skip to content

Commit

Permalink
Moved a global <a> mailto: link
Browse files Browse the repository at this point in the history
  • Loading branch information
bnvk committed Oct 17, 2014
1 parent 45c97eb commit da7a4ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 10 additions & 1 deletion static/default/html/jsapi/app/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ $(document).on('click', '.checkbox-item-picker', function(e) {

$(this).data('state', 'selected').addClass('checkbox-item-picker-selected').find('input[type=checkbox]').val('selected').prop('checked', true);
}
});
});


/* Compose - Create a new email to an address */
$(document).on('click', 'a', function(e) {
if ($(this).attr('href').startsWith('mailto:')) {
e.preventDefault();
Mailpile.activities.compose($(this).attr('href').replace('mailto:', ''));
}
});
9 changes: 0 additions & 9 deletions static/default/html/jsapi/compose/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@ $(document).on('click', '.compose-show-details', function(e) {
});


/* Compose - Create a new email to an address */
$(document).on('click', 'a', function(e) {
if ($(this).attr('href').startsWith('mailto:')) {
e.preventDefault();
Mailpile.activities.compose($(this).attr('href').replace('mailto:', ''));
}
});


/* Compose - Delete message that's in a composer */
$(document).on('click', '.compose-message-trash', function() {
var mid = $(this).data('mid');
Expand Down

0 comments on commit da7a4ae

Please sign in to comment.