source: sipes/0.3-modules/politicas_direccionales/js/estrategias.js @ 2fa3319

stableversion-3.0
Last change on this file since 2fa3319 was 303fae2, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 1.8 KB
Línea 
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&#241;o-mes-dia)
23  * @version 0.1 // (0.1)
24  */
25
26/*
27 * Implementacion valores iniciales
28 */
29var estrategias = {};
30Drupal.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}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.