1 | /** |
---|
2 | * Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
3 | * @file ente_planificador_sipp_mcti.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. Jose puentes |
---|
22 | * @date 2015-01-12 // (año-mes-dia) |
---|
23 | * @version 0.1 // (0.1) |
---|
24 | */ |
---|
25 | |
---|
26 | /* |
---|
27 | * Implementacion valores iniciales |
---|
28 | */ |
---|
29 | var entePlanificadorSippMcti = {}; |
---|
30 | Drupal.behaviors.entePlanificadorSippMcti = function (context) { |
---|
31 | //mostrando el campo ambito |
---|
32 | var roles = Drupal.settings.roles_user; |
---|
33 | $("#ambito_user").hide(); |
---|
34 | $("#roles_user input").each(function() { |
---|
35 | if (this.checked) { |
---|
36 | if ((this.value == roles[0]) || (this.value == roles[1])) { |
---|
37 | $("#ambito_user").show(); |
---|
38 | } |
---|
39 | } |
---|
40 | }); |
---|
41 | $("#roles_user input").change(function() { |
---|
42 | if (this.checked) { |
---|
43 | if ((this.value == roles[0]) || (this.value == roles[1])) { |
---|
44 | $("#ambito_user").show(); |
---|
45 | } |
---|
46 | } |
---|
47 | else { |
---|
48 | $("#ambito_user").hide(); |
---|
49 | $("#ambito_user select").val(0); |
---|
50 | } |
---|
51 | }); |
---|
52 | } |
---|