1 | /** |
---|
2 | * Sistema Integral de Planificación y Presupuesto (SIPP) |
---|
3 | * @file estrategias.js |
---|
4 | * Drupal part Module to Sistema Integral de Planificación y Presupuesto (SIPPES) |
---|
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 - Msc. Juan Vizcarrondo |
---|
22 | * @date 2013-12-02 // (año-mes-dia) |
---|
23 | * @version 0.1 // (0.1) |
---|
24 | */ |
---|
25 | |
---|
26 | /* |
---|
27 | * Implementacion valores iniciales |
---|
28 | */ |
---|
29 | var estrategias = {}; |
---|
30 | Drupal.behaviors.estrategias = function (context) { |
---|
31 | var politicas = Drupal.settings.politicas; |
---|
32 | var valores_politicas = $("#edit-estrategia-politica").val(); |
---|
33 | $.each(politicas, function(key) { |
---|
34 | $("#politicas-requerimientos-" + key).hide(); |
---|
35 | }); |
---|
36 | for (var k in valores_politicas){ |
---|
37 | $("#politicas-requerimientos-" + valores_politicas[k]).show(); |
---|
38 | } |
---|
39 | $("#edit-estrategia-politica").change(function(evt) { |
---|
40 | $.each(politicas, function(key) { |
---|
41 | $("#politicas-requerimientos-" + key).hide(); |
---|
42 | }); |
---|
43 | var Var = $(this).val(); |
---|
44 | for (var k in Var){ |
---|
45 | $("#politicas-requerimientos-" + Var[k]).show(); |
---|
46 | } |
---|
47 | }); |
---|
48 | } |
---|