Changeset d25ba66 for public/assets/js/dash_app.js
- Timestamp:
- 02/24/21 17:04:35 (4 years ago)
- Branches:
- master
- Children:
- 0c07a90
- Parents:
- 1f059b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
public/assets/js/dash_app.js
r1f059b0 rd25ba66 25 25 }) 26 26 27 $(".triggerPhaseModal").click(function() { 28 29 if($(this).data("phase-id")) { 30 $(".phaseModal").find("input[name='phase_id']").val($(this).data("phase-id")); 31 $(".phaseModal").find("input[name='name']").val($(this).data("phase-name")); 32 $(".phaseModal").find("select[name='reviewer_role_id']")[0].selectize.setValue($(this).data("phase-reviewer")); 33 } else { 34 $(".phaseModal").find("form")[0].reset(); 35 $(".phaseModal").find("select")[0].selectize.clear(); 36 } 37 38 $(".phaseModal").modal("show"); 39 }) 40 41 $(".triggerPostSecurityModal").click(function() { 42 if($(this).data("post-security-id")) { 43 var phaseIds = $(this).data("post-security-phase-ids"); 44 phaseIds = typeof phaseIds == "string" ? phaseIds.split(",") : phaseIds; 45 $(".postSecurityModal").find("input[name='post_security_id']").val($(this).data("post-security-id")); 46 $(".postSecurityModal").find("select[name='role_id_to_be_reviewed']")[0].selectize.setValue($(this).data("post-security-role")); 47 $(".postSecurityModal").find(".phasesSelect")[0].selectize.setValue(phaseIds); 48 } else { 49 $(".postSecurityModal").find("select").each(function(i, item) { 50 $(item)[0].selectize.clear(); 51 }); 52 } 53 54 $(".postSecurityModal").modal("show"); 55 }); 56 57 if ($(".phasesSelect").length) { 58 $('#phasesSelect').selectize({ 59 persist: false, 60 maxItems: null, 61 }); 62 } 63 64 $(".postSecurityStore").submit(function() { 65 var selectedPhases = $(".phasesSelect")[0].selectize.items; 66 $(this).find("input[name='phase_ids']").val(selectedPhases); 67 }) 68 27 69 var selectedCountry = [null]; 28 70 … … 138 180 }); 139 181 140 $("#dttable ").DataTable({182 $("#dttable, .dttable").DataTable({ 141 183 "processing": true, 142 184 "language": {
Note:
See TracChangeset
for help on using the changeset viewer.