patterns.js
34 lines
| 1.2 KiB
| application/javascript
|
JavascriptLexer
|
r134 | /** | |
* @author Jose Antonio Sal y Rosas Celi | |||
* @contact: jose.salyrosas@jro.igp.gob.pe, arturo.jasyrc@gmail.com | |||
*/ | |||
$(document).on('ready',function(){ | |||
$('#listProfiles').change(function() { | |||
if($(this).val() != -1){ | |||
|
r177 | location.href = "/abscontrol/view/" + $(this).val(); | |
|
r134 | } | |
}); | |||
|
r175 | $('#lnkAdd').click(function() { | |
profile_id = $("#profile_id").val(); | |||
|
r177 | location.href = "/abscontrol/" + profile_id + "/add/"; | |
|
r175 | }); | |
|
r134 | $('#lnkSave').click(function() { | |
$('#frmPattern').submit(); | |||
}); | |||
$('#lnkCancel').click(function() { | |||
if ($("#pattern_id").val() == 0){ | |||
|
r177 | location.href = "/abscontrol/edit/" + $("#profile_id").val(); | |
|
r134 | }else{ | |
|
r177 | //location.href="/abscontrol/" + $("#profile_id").val() + "/view/" + $("#pattern_id").val(); | |
location.href = "/abscontrol/edit/" + $("#profile_id").val(); | |||
|
r134 | } | |
}); | |||
|
r156 | $('#lnkExport').click(function(){ | |
profile_id = $(this).attr("alt"); | |||
|
r177 | location.href = "/abscontrol/export/" + profile_id + "/"; | |
|
r156 | }); | |
|
r167 | $('#lnkSendFile').click(function(){ | |
profile_id = $(this).attr("alt"); | |||
|
r177 | location.href = "/abscontrol/send/" + profile_id + "/"; | |
|
r167 | }); | |
|
r134 | }); |