Skip to content

Commit

Permalink
Started tinkering on inline replies
Browse files Browse the repository at this point in the history
  • Loading branch information
bnvk committed Oct 24, 2014
1 parent 562942e commit 49aba78
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 17 additions & 0 deletions static/default/html/jsapi/message/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ Mailpile.get_new_messages = function(actions) {
};


/* Message - */
$(document).on('click', '.message-action-reply', function() {
var mid = $(this).data('mid');
//Mailpile.API.message_reply_post({mid: mid}, function(result) {
$.getJSON('/static/reply.json', function(result) {
console.log(result);
var new_mid = result.result.created[0];
console.log(result.result.data.messages[new_mid].editing_strings);

var composer_template = _.template($('#template-composer').html());
$('#message-' + mid).append(composer_template(result.result.data.messages[new_mid].editing_strings));

});
});



/* Message - Create forward and go to composer */
$(document).on('click', '.message-action-forward', function() {
var mid = $(this).parent().parent().data('mid');
Expand Down
4 changes: 1 addition & 3 deletions static/default/html/partials/thread_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ <h3 class="status {{ crypto.color }}">{{ crypto.text }}</h3>
{% endif %}
</ul>
<ul class="thread-message-actions horizontal right" data-mid="{{mid}}">
{# FIXME: commented out for beta freeze
{% if show_reply %}
<li><a class="message-action-reply" href="#"><span class="icon-reply"></span> {{_("Reply")}}</a></li>
<li class="action"><a class="message-action-reply" data-mid="{{mid}}" href="#"><span class="icon-reply"></span> {{_("Reply")}}</a></li>
{% endif %}
#}
<li class="action"><a class="message-action-forward" href="#"><span class="icon-forward"></span> {{_("Forward")}}</a></li>
<li class="dropdown action">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-move"></span> {{_("Move")}}</a>
Expand Down

0 comments on commit 49aba78

Please sign in to comment.