Changeset 1994


Ignore:
Timestamp:
Jun 23, 2016, 12:36:21 PM (3 years ago)
Author:
fercavi
Message:

fixed the json sended in save method of llx-ltsconf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/js/llx-ltsconf.js

    r1663 r1994  
    232232  Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){
    233233
     234    // BEGIN TRUNYO
     235    var resJSONs ='{"Default":{\"__name__\":"Default",';
     236    for(var i=0;i<resultat.length;i++){
     237        resJSONs+= '"' +  resultat[i].name +'"' + ':"' + resultat[i].valor.toString().replace(/\"/gi," ") + '"';
     238        if (i!=(resultat.length-1)) resJSONs+=",";
     239
     240    }
     241    resJSONs += "}}";
     242    //resJSON = JSON.parse(resJSONs);
     243    var n4dmethod ="setLtsConf";
     244    //argList = [resJSONs];
     245    var argList = [];
     246    argList.push(resJSONs);
     247     Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){
     248
     249    });
     250
     251    // END TRUNYO
     252
    234253  });
    235   var resJSONs ='{"Default":{ __name__:"",';
     254  /*var resJSONs ='{"Default":{\"__name__\":"Default",';
    236255  for(i=0;i<resultat.length;i++){
    237       resJSONs+= '"' +  resultat[i].name +'"' + ':"' + resultat[i].valor + '"';
     256      resJSONs+= '"' +  resultat[i].name +'"' + ':"' + resultat[i].valor.toString().replace(/\"/gi," ") + '"';
    238257      if (i!=(resultat.length-1)) resJSONs+=",";
    239258
     
    242261  //resJSON = JSON.parse(resJSONs);
    243262  n4dmethod ="setLtsConf";
    244   argList = [resJSONs];
     263  //argList = [resJSONs];
     264  argList = [];
     265  argList.push(resJSONs);
    245266   Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){
    246     //alert(response)
    247   });
     267    alert(response)
     268  });*/
    248269}
    249270Llx_ltsconf.prototype.esborrarCamp=function(index){
Note: See TracChangeset for help on using the changeset viewer.