Révision c6f5c60f
Ajouté par Jérôme Schneider il y a environ 10 ans
calebasse/dossiers/templates/dossiers/patientcontact_new.html | ||
---|---|---|
135 | 135 |
<tr {% if object.id == request.session.patientrecord_id %}style="display: none;"{%endif%}> |
136 | 136 |
<td> |
137 | 137 |
{{ form.addresses.label_tag }} : |
138 |
<p id="contact-add-address"> |
|
139 |
<a href="#tab=2&newcontact" id="contact-add-address" role="button" title="Ajouter une adresse" onClick="javascript: load_add_address_dialog();"> |
|
140 |
<span class="icon-plus" title="Ajouter une adresse"></Span> |
|
141 |
Ajouter une adresse |
|
142 |
</a> |
|
143 |
</p> |
|
138 | 144 |
{{ form.addresses }} |
139 | 145 |
{{ form.addresses.errors }} |
140 | 146 |
</td> |
... | ... | |
147 | 153 |
{{ form.contact_comment.errors }} |
148 | 154 |
</p> |
149 | 155 |
</form> |
156 |
<div id="address-dlg"></div> |
calebasse/static/css/style.css | ||
---|---|---|
804 | 804 |
margin: 0; |
805 | 805 |
} |
806 | 806 |
|
807 |
#contact-add-address { |
|
808 |
margin-top: 5px; |
|
809 |
margin-left: 10px; |
|
810 |
} |
|
811 |
|
|
807 | 812 |
div#tabs-3 div.right { |
808 | 813 |
text-align: right; |
809 | 814 |
border: 0; |
... | ... | |
1413 | 1418 |
.icon-lock:before { content: "\f023"; } |
1414 | 1419 |
.icon-remove-sign:before { content: "\f057"; } |
1415 | 1420 |
.icon-remove:before { content: "\f00d"; } |
1416 |
.icon-plus:before { content: "\f067"; } |
|
1421 |
.icon-plus:before { content: "\f067"; }
|
|
1417 | 1422 |
.icon-minus:before { content: "\f068"; } |
1418 | 1423 |
.icon-envelope:before { content: "\f003"; } |
1419 | 1424 |
.icon-comment:before { content: "\f075"; } |
calebasse/static/js/calebasse.dossiers.js | ||
---|---|---|
8 | 8 |
$('input#id_prolongation_date', that).datepicker({dateFormat: 'd/m/yy', showOn: 'button' }); |
9 | 9 |
} |
10 | 10 |
|
11 |
function load_add_address_dialog() { |
|
12 |
generic_ajaxform_dialog('address/new', 'Ajouter une adresse', |
|
13 |
'#address-dlg', '600px', 'Ajouter'); |
|
14 |
} |
|
15 |
|
|
11 | 16 |
function state_dialog(url, state_title, state_type) { |
12 | 17 |
$('#change-record').load(url, |
13 | 18 |
function () { |
... | ... | |
48 | 53 |
$(function() { |
49 | 54 |
var $tabs = $('#tabs').tabs(); |
50 | 55 |
|
56 |
|
|
51 | 57 |
$('.atabs').click(function() { |
52 | 58 |
location.hash = 'tab=' + $(this).data('id'); |
53 | 59 |
}); |
... | ... | |
343 | 349 |
$tabs.tabs('select', parseInt(tabid)); |
344 | 350 |
} |
345 | 351 |
}); |
352 |
|
|
346 | 353 |
})(window.jQuery) |
354 |
|
|
355 |
$( document ).ready(function(){ |
|
356 |
var hashes = location.hash.split('&'); |
|
357 |
for (i in hashes) { |
|
358 |
console.log(hashes[i]); |
|
359 |
if (hashes[i] == "newcontact") { |
|
360 |
$('#new-contact-btn').first().click(); |
|
361 |
} |
|
362 |
} |
|
363 |
location.hash = hashes[0]; |
|
364 |
}); |
Formats disponibles : Unified diff
dossiers: add option to create an address from a new contact
Closes #2738