Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Hover listgrid error

$
0
0
We are showing a message in the hover of a field from the listgrid.
This works ok in Chrome and anothers browsers, but iExplorer shows an error in the console relative to the framework.
I attach for your information both screen captures (ok and fail) and the source code.
There is a bug?


Code:


                                                                    isc.ListGrid.create({
                                                                        ID:"grdAlbaranes",  // Si se usa
                                                                        autoDraw:false,
                                                                        autoFetchData:false,
                                                                        showRecordComponents: true,
                                                                        showRecordComponentsByCell: true,
                                                                        //canFreezeFields: true,
                                                                        showFilterEditor:true,
                                                                        autoFitFieldWidths:false,
                                                                        wrapCells: false,
                                                                        dataSource:"ref:attevccamionalbaranesDS",
                                                                        hoverWidth:150,
                                                                        cellHeight:16,
                                                                        fixedRecordHeights:true,
                                                                        canEdit:false,
                                                                        fields:[{
                                                                                name:"botones",
                                                                                width:60,
                                                                                title: " ",
                                                                                canFilter:false
                                                                                },{
                                                                                name:"ALBS_ID",
                                                                                width:80,
                                                                                showHover:true,
                                                                                hoverHTML: function (record, value, rowNum, colNum, grid){
                                                                                              if ((record.IND_DECISION == "S") && (record.IND_INCIDENCIA == "S")){
                                                                                                  return cargaCamionUIDS.getField("hover.expedicion.faltasIncidencias").title;
                                                                                              } else  if (record.IND_DECISION == "S") {
                                                                                                      return cargaCamionUIDS.getField("hover.expedicion.faltas").title;
                                                                                              } else if (record.IND_INCIDENCIA == "S") {
                                                                                                      return cargaCamionUIDS.getField("hover.expedicion.incidencias").title;
                                                                                              } else if (record.ESTADO == "P") {
                                                                                                      return cargaCamionUIDS.getField("hover.expedicion.pantalla").title;
                                                                                              }else {
                                                                                                      return cargaCamionUIDS.getField("hover.expedicion.correcta").title;
                                                                                              } 
                                                                                }
                                                                                },{
                                                                                name:"IND_PARCIALES",
                                                                                width:40
                                                                            },{
                                                                                name:"SERV_ID",
                                                                                width:35
                                                                            },{
                                                                                name:"CLEM_ID_RMTE",
                                                                                width:80
                                                                            },{
                                                                                name:"CLRG_ID_RMTE",
                                                                                width:80
                                                                            },{
                                                                                name:"CLEM_ID_CONS",
                                                                                width:80
                                                                            },{
                                                                                name:"CLRG_ID_CONS",
                                                                                width:80
                                                                            },{
                                                                                name:"DIRECCION_CONS",
                                                                                width:150
                                                                            },{
                                                                                name:"POBLACION_CONS",
                                                                                width:120
                                                                            },{
                                                                                name:"PLZS_ID_ORG",
                                                                                title:"Org",
                                                                                width:40
                                                                            },{
                                                                                name:"PLZS_ID_DES",
                                                                                title:"Des",
                                                                                width:40
                                                                            },{
                                                                                name:"TOT_BULTOS_CARGA",
                                                                                width:60
                                                                            },{
                                                                                name:"NUM_BULTOS_ESCANEADOS",
                                                                                width:60
                                                                            },{
                                                                                name:"NUM_BULTOS_ESC_ANTES",
                                                                                width:60
                                                                            },{
                                                                                name:"PESO_CARGADO",
                                                                                width:80
                                                                            },{
                                                                                name:"VOLUMEN",
                                                                                width:50
                                                                            },{
                                                                                name:"IND_INCIDENCIA",
                                                                                width:40
                                                                            },{
                                                                                name:"IND_GENERAR_FALTA_TOTAL",
                                                                                width:60
                                                                    }],
                                                                        getCellCSSText: function (record, rowNum, colNum) {
                                                                              if (record.IND_DECISION == "S") {
                                                                                  return "background-color:#ffccff;";
                                                                              } else  if (record.IND_FALTA == "S") {
                                                                                  return "background-color:#FFFF99;";
                                                                              } else if (record.IND_INCIDENCIA == "S") {
                                                                                        return "background-color:#D0A9F5;";
                                                                              } else if (record.ESTADO == "P") {
                                                                                        return "background-color:#99CCCC;";
                                                                              }else {
                                                                                        return "background-color:white;";
                                                                              } 
                                                                        }, 
                                                                        initialSort:[{
                                                                                                property:"IND_DECISION",
                                                                                                direction:"descending"
                                                                                              },{
                                                                                                  property:"CLEM_ID_RMTE",
                                                                                                  direction:"ascending"
                                                                                              },{
                                                                                                property:"IND_INCIDENCIA",
                                                                                                direction:"descending"
                                                                                              },{
                                                                                                  property:"ALBS_ID",
                                                                                                  direction:"ascending"
                                                                      }],
                                                                      /**
                                                                      *  SUBGRID Bultos de Albaranes
                                                                      */
                                                                      canExpandRecords: true,
                                                                      expansionMode: "related",
                                                                      detailDS:"ref:attevccamionbultosDS",
                                                                      expansionCanEdit : false,
                                                                      getExpansionComponent : function (record) {
                                                                                var componenteSubGridBultos = isc.ObjSubgridBultosCC.create({});
                                                                                componenteSubGridBultos.subgridBultosCC._FILTRO_PADRE = {ALBS_ID: record.ALBS_ID, CCAM_ID: record.CCAM_ID};
                                                                                componenteSubGridBultos.subgridBultosCC.filterData({ALBS_ID: record.ALBS_ID, CCAM_ID: record.CCAM_ID});
                                                                                if (record.IND_DECISION != 'S' || record.ESTADO !='A'){
                                                                                        componenteSubGridBultos.botonBuscarObjSubgridBultosCC.disable();
                                                                                        componenteSubGridBultos.botonFaltaParcialObjSubgridBultosCC.disable();
                                                                                }
                                                                            return componenteSubGridBultos;
                                                                      },
                                                                      createRecordComponent : function (record, colNum) { 
                                                                    var fieldName = this.getFieldName(colNum); 
                                                           
                                                                    if (fieldName == "botones") {
                                                                            if ((record["NUM_BULTOS_ESCANEADOS"] == 0) && (record["IND_DECISION"] == "S") && (record["BULTOS_FPARCIAL"] == 0)){ 
                                                                                var recordFalta = isc.HLayout.create({
                                                                                    height: 16,
                                                                                    width:40,
                                                                                    align: "center"
                                                                                });
                                                                                if (record["ESTADO"] == "A") { 

                                                                                        var aceptarFaltaTotal = isc.ImgButton.create({
                                                                                                    showDown: false,
                                                                                                    showRollOver: false,
                                                                                                    layoutAlign: "center",
                                                                                                    src: Page.getAppImgDir()+"/delete2.png",
                                                                                                    prompt: "Aceptar Falta total",
                                                                                                    height: 16,
                                                                                                    width: 16,
                                                                                                    grid: this,
                                                                                                    visible: true,
                                                                                                    click : function () {
                                                                                                        /*Tras preguntar por creacion incidencia falta total, se marca el registro
                                                                                                            para no volver a buscar y en caso necesario para la generación de incidencia.
                                                                                                            Requiere validar que no se han escaneado ninguno de sus bultos y que todos ellos
                                                                                                            tienen como acción el volver a buscar.
                                                                                                            Para la creacion de incidencia es necesario que el numero de bultos del proceso sea igual
                                                                                                            al numero de bultos de la expedicion, en caso contrario
                                                                                                            solo marcar como falta sin incidencia*/
                                                                                                           
                                                                                                            miGrid = this.parentElement.parentElement.parentElement;
                                                                                                                albsId = miGrid.getRecord(miGrid.getEventRow()).ALBS_ID;
                                                                                                                ccamId = miGrid.getRecord(miGrid.getEventRow()).CCAM_ID;
                                                                                                               
                                                                                                            isc.confirm(cargaCamionUIDS.getField("mensaje.confirm.generar.incTotal").title,
                                                                                                                              "marcarFaltaTotal(value)",
                                                                                                                              {toolbarButtons : [Dialog.YES, Dialog.NO, Dialog.CANCEL] }
                                                                                                            );
                                                                                                    }
                                                                                        });
                                                                                        recordFalta.addMember(aceptarFaltaTotal);

                                                                                } else if (record["ESTADO"] == "F") {

                                                                                        var quitarFaltaTotal = isc.ImgButton.create({
                                                                                                    showDown: false,
                                                                                                    showRollOver: false,
                                                                                                    layoutAlign: "center",
                                                                                                    src: Page.getAppImgDir()+"/delete_verde.png",
                                                                                                    prompt: "Quitar falta total",
                                                                                                    height: 16,
                                                                                                    width: 16,
                                                                                                    grid: this,
                                                                                                    visible: true,
                                                                                                    click : function () {

                                                                                                            miGrid = this.parentElement.parentElement.parentElement;
                                                                                                                albsId = miGrid.getRecord(miGrid.getEventRow()).ALBS_ID;
                                                                                                                ccamId = miGrid.getRecord(miGrid.getEventRow()).CCAM_ID;
                                                                                                           
                                                                                                            isc.confirm(cargaCamionUIDS.getField("mensaje.confirm.quitar.incTotal").title,
                                                                                                                              "quitarFaltaTotal(value)"
                                                                                                            ); 
                                                                                                    }
                                                                                        });
                                                                                        recordFalta.addMember(quitarFaltaTotal);
                                                                                }
                                                                                return recordFalta; 

                                                                    } else { 
                                                                        return null; 
                                                                            }       
                                                                    } else { 
                                                                        return null; 
                                                                    }       
                                                                                    }
                                                                    })



v9.1d_2014-02-22/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28

Attached Images
File Type: jpg Captura1.JPG (123.8 KB)
File Type: jpg Captura2.JPG (122.4 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles