At now by default editablefields for Drupal 7.x adds button "Click to edit" for each field.
But with 6.x-1.2 they adds floating "[edit]" link to each editable element, that don't eats the space and looks more comfortable.
I can't find the way to display edit link in editablefields 1.x for Drupal 7.x like in 1.2 for 6.x, so maybe it miss in core of module.
Can you add this feature in editablefields 1.x for Drupal 7.x?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

This is the job of CSS... we could include a generic CSS in the module, if someone wants to contribute one :)

Murz’s picture

Seems that in 6.x-1.2 this done not with css only, but with javascript in editablefields.js:

  $('div.editablefields', context).filter('.clicktoedit').not('.editablefields-processed').each(function() {
    $(this).prepend(Drupal.settings.editablefields.clicktoedit_message);
    $(".editablefields_clicktoedit_message").fadeOut(3000);
    $(this).mouseover(function(){$(".editablefields_clicktoedit_message",this).fadeIn(500);});
    $(this).mouseout(function(){$(".editablefields_clicktoedit_message",this).fadeOut(500);});
    $(this).click(Drupal.editablefields.init);
  });

Maybe we can reuse this code?

dags’s picture

Status: Active » Needs review
FileSize
3.86 KB

Here's a first attempt. It adds an instance setting for "Click to edit style". The CSS is a work in progress, especially since the D6 was a link and this is a button.

tim.plunkett’s picture

I'm not sure which is easier, making a link behave like a submit button, or making a button look like a link.
And that depends on how closely this should mimic D6.

tim.plunkett’s picture

Title: editablefields: Click to edit as floating link » Click to edit as floating link
FileSize
4.39 KB

Addressed an issue with #states/#dependency for the Views UI.

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Status: Needs review » Needs work

I have a new patch for this but I left it on my work VM so it'll have to wait until tomorrow morning.

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned
Status: Needs work » Needs review
FileSize
4.53 KB

Adds a link with JS that triggers the submit button. Props to xjm for the suggestion.

Steven.Pescador’s picture

Worked a treat for me! Cheers Tim & xjm.

bfr’s picture

Great job! I added a little fade there to make it look nicer.

bfr’s picture

Any chances to to get this commited? I hate to have patched modules in the clients site.

dags’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Murz’s picture

As alternative we can use this module: http://drupal.org/project/editablefields_as_link