source: sipes/0.3-modules/ente_planificador_sector/js/ente_planificador_sector.js @ c64f646

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

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 3.2 KB
Línea 
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 - Msc. Jose puentes
22  * @date 2015-01-12 // (a&#241;o-mes-dia)
23  * @version 0.1 // (0.1)
24  */
25
26/*
27 * mostrar los campos seleccionados asi como el ocultarlos
28 */
29Drupal.behaviors.ente_planificador_sector = function (context) {
30  //mostrando el campo ente ascrito a un organismo
31  $("#organismo_ente").hide();
32  $("#sector_ente_planificador").hide();
33  $("#sub_ente").hide();
34  var nivel = $("#nivel option:selected").text();
35  $('#nivel select option').ready(function() {
36    if (nivel == 'Organismo rector en planificación.') {
37      $("#organismo").hide();
38      $("#sector_ente_planificador").show();
39          $("#sub_ente").hide();
40          }
41    else if (nivel == 'Organismo público.') {
42      $("#organismo").hide();
43      $("#sector_ente_planificador").show();
44          $("#sub_ente").hide();
45          }
46    else if (nivel == 'Ente adscrito a un organismo público.') {
47      $("#organismo_ente").hide();
48      $("#sector_ente_planificador").hide();
49          $("#sub_ente").hide();
50          }
51    else if (nivel == 'Ente adscrito a otro ente adscrito (sub-ente adscrito).') {
52      $("#sector_ente_planificador").hide();
53      $("#sub_ente").show();
54          }
55          else if (nivel == 'Organismo rector en planificación.') { // si es un organismo publico
56      $("#sector_ente_planificador").hide();
57    }
58    else {
59                  $("#organismo_ente").hide();
60      $("#sector_ente_planificador").show();
61          }
62        });
63        $('#nivel select option').click(function() {
64          if (($(this).text() == 'Ente adscrito a un organismo público.')) { // si es un organismo publico
65      $("#organismo_ente").show();
66      $("#sector_ente_planificador").hide();           
67                        $("#sub_ente").hide();
68    }
69                else if (($(this).text() == 'Ente adscrito a otro ente adscrito (sub-ente adscrito).')) { // si es un organismo publico
70      $("#sector_ente_planificador").hide();
71      $("#organismo_ente").hide();
72                $("#sub_ente").show();
73    }
74                else if ($(this).text() == 'Organismo rector en planificación.') { // si es un organismo publico
75          $("#sector_ente_planificador").hide();
76        }
77    else {
78      $("#organismo_ente").hide();
79                $("#sub_ente").hide();
80      $("#sector_ente_planificador").show();
81                }
82  });
83}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.