1 | /** |
---|
2 | * Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
3 | * @file proyectos_operativos_generales.js |
---|
4 | * Drupal part Module to Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
5 | * Copyright 2011 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL) |
---|
6 | * |
---|
7 | * This program is free software; you can redistribute it and/or modify |
---|
8 | * it under the terms of the GNU General Public License as published by |
---|
9 | * the Free Software Foundation; either version 2 of the License, or |
---|
10 | * (at your option) any later version. |
---|
11 | * |
---|
12 | * This program is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | * GNU General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License |
---|
18 | * along with this program; if not, write to the Free Software |
---|
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
20 | * |
---|
21 | * @author Cenditel Merida - Ing. José Puentes |
---|
22 | * @date 2012-02-02 // (año-mes-dia) |
---|
23 | * @version 0.1 // (0.1) |
---|
24 | */ |
---|
25 | |
---|
26 | /** |
---|
27 | * Modifica los valores de la lista select para los responsables del proyecto |
---|
28 | */ |
---|
29 | Drupal.behaviors.proyectosOperativosDatosBasicosMcti = function (context) { |
---|
30 | //cambio de institucion |
---|
31 | $('#field_proyecto_ente_datos_basicos').hide(); |
---|
32 | $('.responsable').change(function() { |
---|
33 | var self = $(this); |
---|
34 | $(this).parent().next('table').find('input').each(function(index) { |
---|
35 | if (!self.val() || self.val() == 0) { |
---|
36 | $(this).val(""); |
---|
37 | } |
---|
38 | else { |
---|
39 | var value = Drupal.settings.responsables[self.val()][index]; |
---|
40 | $(this).val(value); |
---|
41 | } |
---|
42 | }); |
---|
43 | }); |
---|
44 | |
---|
45 | //ocultando el campo comentario de no ser seleccionado |
---|
46 | $("#workflow-tab-form input[type='radio']").each(function() { |
---|
47 | if (this.checked == true) { |
---|
48 | var label = this.id; |
---|
49 | var text = $('label[for="'+label+'"]').text(); |
---|
50 | if (text == ' Anulado') { |
---|
51 | $("#edit-workflow-comment-wrapper").show(); |
---|
52 | } |
---|
53 | /*else { |
---|
54 | $("#edit-workflow-comment-wrapper").hide(); |
---|
55 | }*/ |
---|
56 | } |
---|
57 | }); |
---|
58 | $("#workflow-tab-form input[type='radio']").change(function() { |
---|
59 | var label = this.id; |
---|
60 | var text = $('label[for="'+label+'"]').text(); |
---|
61 | if (text == ' Anulado') { |
---|
62 | $("#edit-workflow-comment-wrapper").show(); |
---|
63 | } |
---|
64 | /*else { |
---|
65 | $("#edit-workflow-comment-wrapper").hide(); |
---|
66 | }*/ |
---|
67 | }); |
---|
68 | } |
---|