View difference between Paste ID: tzTuz86e and F6zYeGaM
SHOW: | | - or go back to the newest paste.
1
function processServAction(modo){
2-
                                console.log("Modo: " + modo);
2+
         console.log("Modo: " + modo);
3-
                                 switch(modo){
3+
         switch(modo){
4-
                                              case modes.UpServ:
4+
             case modes.UpServ:
5-
                                                        var jsonArr;
5+
                var jsonArr;
6-
                                                        $.getJSON('../php/query.php',{ T : 3, V : userData.Id }, function(response,status,xhr){
6+
                $.getJSON('../php/query.php',{ T : 3, V : userData.Id }, function(response,status,xhr){
7-
                                                                        jsonArr = response;
7+
                          jsonArr = response;
8-
                                                        });
8+
                });
9-
                                                        //console.info(jsonArr);
9+
                //console.info(jsonArr);
10-
                                                        $('#contenedor').load("addService.htm", function(){
10+
                $('#contenedor').load("addService.htm", function(){
11-
                                                            $.each(jsonArr, function(i,row){
11+
                    $.each(jsonArr, function(i,row){
12-
                                                                $('#domains').append("<option id='" + row.idDominio + "'>" + row.url + "</option>" );
12+
                           $('#domains').append("<option id='" + row.idDominio + "'>" + row.url + "</option>" );
13-
                                                            });
13+
                    });
14
                                            
15-
                                                            //Limit port field to only numbers
15+
               //Limit port field to only numbers
16-
                                                             $('#port').on("keypress", function(e){
16+
               $('#port').on("keypress", function(e){
17-
                                                                if ("01234567890.-\b\0".indexOf(String.fromCharCode(e.which)) < 0) {
17+
                          if ("01234567890.-\b\0".indexOf(String.fromCharCode(e.which)) < 0) {
18-
                                                                        event.preventDefault();
18+
                               event.preventDefault();
19-
                                                                }          
19+
                          }          
20-
                                                            });
20+
              });
21
                                                            
22-
                                                            $('#sCancel').on("click",function(e){cancelAction(e);});
22+
              $('#sCancel').on("click",function(e){cancelAction(e);});
23-
                                                            $('#sAlta').on("click", function(e){ altaServicio(e);});
23+
              $('#sAlta').on("click", function(e){ altaServicio(e);});
24
                                                                                                                                                                    
25
                                                                                                                                                                  
26-
                                                           function altaServicio(e){
26+
             function altaServicio(e){
27-
                                                                            e.preventDeafult();
27+
                      e.preventDeafult();
28
                                                          
29-
                                                                            var jsonObj = { "Frec" : $('#frec').val(), 
29+
                     var jsonObj = { "Frec" : $('#frec').val(), 
30-
                                                                                                         "sendMail" : getCheckVal($('#sendMail')),
30+
                                     "sendMail" : getCheckVal($('#sendMail')),
31-
                                                                                                         "VerifConf" : getCheckVal($('#verifConf')),
31+
                                     "VerifConf" : getCheckVal($('#verifConf')),
32-
                                                                                                         "VerifProcess" : getCheckVal($('#verifProc')) };
32+
                                     "VerifProcess" : getCheckVal($('#verifProc')) };
33
                                                                            
34-
                                                                            $.getJSON('../php/getConfId.pgp', { config : jsonObj }, function(reponse){
34+
                    $.getJSON('../php/getConfId.pgp', { config : jsonObj }, function(reponse){
35-
                                                                                                console.info(response);
35+
                               console.info(response);
36-
                                                                            });
36+
                   });
37-
                                                           }               
37+
           }               
38-
                                                        });
38+
	});
39
                                                        
40-
                                                        function getCheckVal(chk){
40+
	function getCheckVal(chk){
41-
                                                            chk.is(":checked") ? 1 : 0;
41+
        	 chk.is(":checked") ? 1 : 0;
42-
                                                        }
42+
	}
43-
                                              break;
43+
	break;
44-
                                 }
44+
    }
45-
               }
45+
}