I recently upgrade to the 2.x version. I'm having some issues with the new way of rendering the [edit] prompt. For one thing, if there are a lot of click to edit fields on a page, it takes a while to load and eats up a lot of CPU on the client computer while JavaScript is hiding the [edit] elements.

The other issue is that I want to be able to edit fields that don't have a value entered yet. If the [edit] prompt is hidden, there is no way to edit empty fields. Is there a way to disable hiding of the [edit] prompt? It would be nice if this were optional.

Comments

Coupon Code Swap’s picture

To answer my own question, remove these two instances from editablefields.js:

    $(".editablefields_clicktoedit_message").fadeOut(3000);
    $(this).mouseover(function(){$(".editablefields_clicktoedit_message",this).fadeIn(500);});
    $(this).mouseout(function(){$(".editablefields_clicktoedit_message",this).fadeOut(500);});
        $(".editablefields_clicktoedit_message").fadeOut(3000);
        $(this).mouseover(function(){$(".editablefields_clicktoedit_message",this).fadeIn(500);});
        $(this).mouseout(function(){$(".editablefields_clicktoedit_message",this).fadeOut(500);});

Still, would be nice to have this configurable.

ManyNancy’s picture

+1

LEternity’s picture

I'd like to see the [edit] field only for empty values. I'll use CSS to manage non-empty field behavior.

markfoodyburton’s picture

Is this still an issue in the latest dev?

Cheers

Mark.

grahamshepherd’s picture

Is this still an issue in the latest dev?

I suspect that it is still an issue. The only change from 6.x-2.0 to 6.x-2.x-dev is line 87 of editablefields.module and I can't see how that can solve the page load time, the client CPU problem and the editing of empty fields which generally seem to be issues of the javascript which remains unchanged.

Line 87 of editablefields.module 6.x-2.0

$node = $element['#node'];

Line 87 of editablefields.module 6.x-2.x-dev

$node = node_load($element['#node']->nid);

Certainly this issue and #703988: No way to edit empty fields and #733426: Does not work in View are related. If a solution is still a fair way off, it may be helpful for them to be brought together under one thread.

markfoodyburton’s picture

Ahh - sorry - I thought there was something else in there
Anyway - I've checked something in that hopefully makes life a little better - basically leaves the [edit] thing on empty values, and fades it out on the others.

(This whole fading in/out thing - wasn't my idea - it's kind of neat, but in my view rather over the top. However, it's there, and I think the issue is that it's not just a matter of the theme - to make the thing look halfway decent, you need some co-operation from the module, and of course the javascript.)

Anyway - if somebody has a better idea - feel free to submit a patch :-)

Cheers

Mark.

LEternity’s picture

Thank you Mark!

I really appreciate your efforts in getting the essential bugs fixed in a timely manner!

markfoodyburton’s picture

Hey - thank me if it works :-))))
Right now Graham seems to have bugs' I can't reproduce, so I'm not at all convinced I've solved all his problems.....

But, I did manage to see the problem with an empty field's [edit] disappear - so - for me - thats working now...

Cheers

Mark.

grahamshepherd’s picture

This works for me, Mark. So from my point of view, thanks to you are definitely in order!
I tried it with a view with 200 nodes all empty and 200 nodes all with data. I no longer got java script errors, no longer excessive CPU load and the page loaded quite quickly.
However, I still have my problem of editing multiline text fields as described in #733426: Does not work in View.

markfoodyburton’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.