summaryrefslogtreecommitdiffstats
path: root/welco/static
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2016-10-12 05:32:37 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2016-10-14 08:09:16 (GMT)
commit908d47ff09fbd11cbc4fc8ed38634db7074b04c3 (patch)
tree286c6fe79d748a36c32ba021ffa30a56f54981ec /welco/static
parenta217cce050d7d6559a21d12b9aae5681edb89355 (diff)
downloadwelco-908d47ff09fbd11cbc4fc8ed38634db7074b04c3.zip
welco-908d47ff09fbd11cbc4fc8ed38634db7074b04c3.tar.gz
welco-908d47ff09fbd11cbc4fc8ed38634db7074b04c3.tar.bz2
mails: add reference field, only for alfortville flavour (#13549)
Diffstat (limited to 'welco/static')
-rw-r--r--welco/static/css/style.css6
-rw-r--r--welco/static/js/welco.js4
2 files changed, 9 insertions, 1 deletions
diff --git a/welco/static/css/style.css b/welco/static/css/style.css
index 0647e7f..3e39b92 100644
--- a/welco/static/css/style.css
+++ b/welco/static/css/style.css
@@ -480,8 +480,12 @@ form#note textarea {
padding: 0.5ex 0.5ex;
}
+#source-mainarea input#id_reference {
+ width: 6em;
+}
+
#source-mainarea input#id_subject {
- width: 40em;
+ width: 25em;
}
#source-mainarea button {
diff --git a/welco/static/js/welco.js b/welco/static/js/welco.js
index fb2f806..549ef97 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_reference').val($(this).data('reference'));
$('#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);
@@ -213,12 +214,14 @@ $(function() {
$('.document').delegate('button.save', 'click', function() {
var post_date = $('#id_post_date').val();
var registered_mail_number = $('#id_registered_mail_number').val();
+ var reference = $('#id_reference').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,
+ reference: reference,
subject: subject,
source_type: source_type,
source_pk: source_pk},
@@ -227,6 +230,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('reference', reference);
$('div.source .active').data('subject', subject);
$('#source-mainarea form').effect('highlight');
if ($('#id_post_date').length && !$('#id_post_date').val()) {