Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






Wrong hovering effect in actions formatter of jqGrid 4.1.0

UserPost

10:15
15/06/2011


OlegK

Germany

Member

posts 1210

Hello Tony,

The bug report is based on this my answer on the stackoverflow. The 4.1.0 version of the actions formatter has new hovering effects on the action buttons which works wrong on the line which is in the inline editing mode after the clicking of the "Edit" action button. The hovering shows wrong image from the middle of the corresponding background image:

I suggest to change the action onmouseover for div.ui-inline-save, div.ui-inline-cancel from

jQuery(this).addClass('ui-state-hover');

to

jQuery(this).addClass('ui-state-hover');
jQuery('span',this).removeClass('ui-state-hover'); 

Moreover there are exist another problem if one select another row during a row is in inline mode started with respect of "Edit" action button. The Save and Cancel buttons stay visable:

To fix the problem one have to use the code like

var tr = grid[0].rows.namedItem(lastSel);
$("div.ui-inline-edit, div.ui-inline-del",tr).show();
$("div.ui-inline-save, div.ui-inline-cancel",tr).hide(); 

after calling of restoreRow in the onSelectRow event handle. I don't tested editformbutton mode, but I suppose one will have the same problems in the case.

One should fix the problem or at least introduce new public which should be called after restoreRow for example.

One more remark about the code of the action formatter. One should use jqID method in many places of the code. Morover, like you Tony as good knows, the usage of .rows.namedItem constructs are much more effective as the usage of '#' selector in many places of the current code. Example:

$("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid).show();

Best regards
Oleg


11:22
15/06/2011


tony

Sofia, Bulgaria

Moderator

posts 7375

Thanks Oleg.

I'm considering to remove these effects.


Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

12:31
15/06/2011


OlegK

Germany

Member

posts 1210

Hello Tony,

in general the hovering effects on the icons seems good in my opinion. One should just fix the code. The demo looks prity good. I added here the switching of action buttons in case of the standard editing.

The only thing which I personally not like in the actions formatter code is the usage of "onmouseover" and "onmouseout" instead of unobtrusive style binding. The best way of implementation in my opinion are described here. I mean that it would be good to use additional event handler for onCellSelect or beforeSelectRow events in the code of formatter. I understand that there are one general design problem which need be solved, but one can solve the problem in many way. One should just think a little and decide which way is the best.

Best regards
Oleg 

10:33
16/06/2011


tony

Sofia, Bulgaria

Moderator

posts 7375

Post edited 10:34 – 16/06/2011 by tony
Post edited 10:36 – 16/06/2011 by tony


Oleg,

I have fixed the problem. It was really travial copy/paste problem Smile


Not sure that unobtrusive style is applicable in these days.

Imagine which current internet user can work with Java Script disabled Wink

Every solution which work and is usefull for the users is a good solution

I have finished the demos for 4.0 version. You can look here:

http://trirand.com/blog/jqgrid…..qgrid.html


Regards

Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

13:59
16/06/2011


OlegK

Germany

Member

posts 1210

Tony,

I find your fix very good (it looks better as my suggestion), but you don't insterted jqID method calls in the lines like

$("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid).show();

or rewrote such lines usaging .rows.namedItem constructs like I mention before.

About reducing of the number of "onmouseover", "onmouseout" and "onclick" handles in the jqGrid I'll write better in the separate "Feature Request" and explain more exactly what I mean.

Best regards
Oleg

P.S. If you prepare the 4.1.1 version, please read another bug report. Currently 1) after clicking on "Reset" button in the Single Search filter dilalog some fields will be visable (all will be afther resetting like in the "Advance Searching" dialog) 2) In both "Single Search" and "Advance Searching" dialog the last rule can be removed which has no sence and which was not permitted in the previous version of the "Advance Searching" dialog. 3) The focus in the Searching dialog is not optimal 4) there are no more keyboard support (Esc or Enter).

16:58
16/06/2011


tony

Sofia, Bulgaria

Moderator

posts 7375

Oh, Forgot for these. Will do the needed.

Thanks.

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

10:29
17/06/2011


tony

Sofia, Bulgaria

Moderator

posts 7375

Post edited 10:36 – 17/06/2011 by tony
Post edited 10:37 – 17/06/2011 by tony


Oleg,


1) I can not reproduce this. (it work ok for me. If I remember right I have fixed this)

2) Will see

3) What you mean with this? The script (using jqModal) try to focus on the first input field.

4) Esc is supported with closeOnEscape : true in the options (I just checked this and closeOnEscape worked for me) . Enter will be added maybe later.


Kind Regards

Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

13:06
17/06/2011


OlegK

Germany

Member

posts 1210

You are right Tony, the most of problems not exist more in the 4.1 version.

The problem with Reset button in the Singe Value Search dialog you can reproduce on the demo, which uses jqGrid 4.0, but the same demo work correct with jqGrid 4.1.

The problem with deleting of the last rule is the following. I mean that it is possible to click on the buttom which I mark red:

After that one receive the dialog

which is misunderstandable for many people.

The setting of focus in the Serching Dialog is probably more the question of the taste or ergonomy. Currently you have it on ADD/OR:

In my opinion the best place would be the last edit field:

See the demo from the answer.

Some additional problem is that it is not so easy to impelment change focus behavior in the new searching dialog because the fields of the dialog fill be repaint. I have to overwrite/chain the reDraw method. It would be nice to have some additional events in the the Filter dialog. For example new events like beforeRedraw and event more important afterRedraw and so on would be very helpfull for the Filter dialog customization.

Best regards
Oleg

11:02
13/08/2011


kobruleht

Member

posts 144

In 4.1.2 if inline edit is started using edit action button and clicked in other row, old row remains in edit mode.

How to fix this so that inline edit is terminated if other row editing starts or if other row is clicked ?

09:43
14/08/2011


tony

Sofia, Bulgaria

Moderator

posts 7375

Hello,

This is not a bug, but feature and a way the action formatter work.

You can simulate the behaviour without the formatter action – look at the demos.


Kind REgards

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

14:30
14/08/2011


OlegK

Germany

Member

posts 1210

Hello Tony,

in my opinion kobruleht described the problem not correct. Nevertheless the problem is really exist. I can reformulate the problem so. To be able to implement inline editing jqGrid provide not only the editRow method but the restoreRow method which can be used inside of onSelectRow for example to implement the behavior of inline editing like one needs. The formatter:'actions' hide or make visible the divs with actions. So the usage of restoreRow method along is not enough.

I see the problem so that one should provide public restoreActionIcons method which is close to the internal restorerow method. So one will not need to have the knowladge about the dives names to be able to cancel the row editing. See the answer for details.

Best regards
Oleg 


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

95 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10271

Posts: 30350

Membership:

There are 11036 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7375 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information