summaryrefslogtreecommitdiffstats
path: root/welco/static
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2016-06-14 13:34:04 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-06-22 09:29:23 (GMT)
commite48cfe16e9f880b95a1fc4c8b759a199ec8ebd3c (patch)
treeb00327c89972cc125f2b8aa5dbc904c4a7874a13 /welco/static
parent59faf92760137ebb7d39ee23fc8c8fe82ae2fcb6 (diff)
downloadwelco-e48cfe16e9f880b95a1fc4c8b759a199ec8ebd3c.zip
welco-e48cfe16e9f880b95a1fc4c8b759a199ec8ebd3c.tar.gz
welco-e48cfe16e9f880b95a1fc4c8b759a199ec8ebd3c.tar.bz2
mails: add subject field, only for alfortville flavour (#11289)
Diffstat (limited to 'welco/static')
-rw-r--r--welco/static/css/style.css4
-rw-r--r--welco/static/js/welco.js4
2 files changed, 8 insertions, 0 deletions
diff --git a/welco/static/css/style.css b/welco/static/css/style.css
index c4df9bd..1beb452 100644
--- a/welco/static/css/style.css
+++ b/welco/static/css/style.css
@@ -474,6 +474,10 @@ form#note textarea {
padding: 0.5ex 0.5ex;
}
+#source-mainarea input#id_subject {
+ width: 40em;
+}
+
#source-mainarea button {
position: relative;
top: -2px;
diff --git a/welco/static/js/welco.js b/welco/static/js/welco.js
index de70454..32cd7ce 100644
--- a/welco/static/js/welco.js
+++ b/welco/static/js/welco.js
@@ -79,6 +79,7 @@ $(function() {
$(this).addClass('active');
$('#id_post_date').val($(this).data('post-date'));
$('#id_registered_mail_number').val($(this).data('registered-mail-number'));
+ $('#id_subject').val($(this).data('subject'));
var source_pk = $('div.source .active[data-source-pk]').data('source-pk');
$('#postit > div.content').data('url', $('#postit > div.content').data('base-url') + '?mail=' + source_pk);
$('#postit').trigger('welco:load-mail-note');
@@ -212,11 +213,13 @@ $(function() {
$('.document').delegate('button.save', 'click', function() {
var post_date = $('#id_post_date').val();
var registered_mail_number = $('#id_registered_mail_number').val();
+ var subject = $('#id_subject').val();
var source_type = $('div.source div[data-source-type]').data('source-type');
var source_pk = $('div.source .active[data-source-pk]').data('source-pk');
$.ajax({url: $(this).data('action-url'),
data: {post_date: post_date,
registered_mail_number: registered_mail_number,
+ subject: subject,
source_type: source_type,
source_pk: source_pk},
method: 'POST',
@@ -224,6 +227,7 @@ $(function() {
success: function(data) {
$('div.source .active').data('post-date', post_date);
$('div.source .active').data('registered-mail-number', registered_mail_number);
+ $('div.source .active').data('subject', subject);
$('#source-mainarea form').effect('highlight');
if ($('#id_post_date').length && !$('#id_post_date').val()) {
$('div.qualif button.done').attr('disabled', 'disabled');