addObjectInCell and onclick method

View: New views
3 Messages — Rating Filter:   Alert me  

addObjectInCell and onclick method

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi folks,

there is a small problem with the addObjectInCell method.
Indeed, when I add an Image to a cell by using addObjectInCell, clicking on the image doesn't select/unselect the line if there is no onclickInGrid method associated to the image.
A better behaviour would be (in my opinion) :
if a onclickInGrid method is declared
     execute the onclickInGrid method
fi
select/unselect the line

This could be done the following way in the rialto.js file:
line 4658.
Replace
objPar.onclick = function (e) {
        if (objPar.onclickInGrid) {
                objPar.onclickInGrid(indL,indC
                        ,oThis.getCellText(indL,indC)
                        ,oThis.getCellData(indL,indC)
                        ,e);
    oThis.afterOnClick(indL,indC,true);
    }
}
With
objPar.onclick = function (e) {
        if (objPar.onclickInGrid) {
                objPar.onclickInGrid(indL,indC
    ,oThis.getCellText(indL,indC)
    ,oThis.getCellData(indL,indC)
    ,e);
    }
    oThis.afterOnClick(indL,indC,true);
}

Thanks...
Fred


Re: addObjectInCell and onclick method

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Fred,

I change the code in rialto. For your other prolem i need to check first with François. It can take more time


Cyril

--- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote:

>
> Hi folks,
>
> there is a small problem with the addObjectInCell method.
> Indeed, when I add an Image to a cell by using addObjectInCell, clicking on the image doesn't select/unselect the line if there is no onclickInGrid method associated to the image.
> A better behaviour would be (in my opinion) :
> if a onclickInGrid method is declared
>      execute the onclickInGrid method
> fi
> select/unselect the line
>
> This could be done the following way in the rialto.js file:
> line 4658.
> Replace
> objPar.onclick = function (e) {
> if (objPar.onclickInGrid) {
> objPar.onclickInGrid(indL,indC
> ,oThis.getCellText(indL,indC)
> ,oThis.getCellData(indL,indC)
> ,e);
>     oThis.afterOnClick(indL,indC,true);
>     }
> }
> With
> objPar.onclick = function (e) {
> if (objPar.onclickInGrid) {
> objPar.onclickInGrid(indL,indC
>     ,oThis.getCellText(indL,indC)
>     ,oThis.getCellData(indL,indC)
>     ,e);
>     }
>     oThis.afterOnClick(indL,indC,true);
> }
>
> Thanks...
> Fred
>



Re: addObjectInCell and onclick method

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Cyril,

first of all, sorry for answering so late.
I've tested your correction and everything works fine!
Thanks again!
Fred

--- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote:

>
> Hello Fred,
>
> I change the code in rialto. For your other prolem i need to check first with François. It can take more time
>
>
> Cyril
>
> --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@> wrote:
> >
> > Hi folks,
> >
> > there is a small problem with the addObjectInCell method.
> > Indeed, when I add an Image to a cell by using addObjectInCell, clicking on the image doesn't select/unselect the line if there is no onclickInGrid method associated to the image.
> > A better behaviour would be (in my opinion) :
> > if a onclickInGrid method is declared
> >      execute the onclickInGrid method
> > fi
> > select/unselect the line
> >
> > This could be done the following way in the rialto.js file:
> > line 4658.
> > Replace
> > objPar.onclick = function (e) {
> > if (objPar.onclickInGrid) {
> > objPar.onclickInGrid(indL,indC
> > ,oThis.getCellText(indL,indC)
> > ,oThis.getCellData(indL,indC)
> > ,e);
> >     oThis.afterOnClick(indL,indC,true);
> >     }
> > }
> > With
> > objPar.onclick = function (e) {
> > if (objPar.onclickInGrid) {
> > objPar.onclickInGrid(indL,indC
> >     ,oThis.getCellText(indL,indC)
> >     ,oThis.getCellData(indL,indC)
> >     ,e);
> >     }
> >     oThis.afterOnClick(indL,indC,true);
> > }
> >
> > Thanks...
> > Fred
> >
>