Hi,
Do you have any plan to port this module for drupal7? if yes than can you plz let me know, how much it will take or if you can guide me how to upgrade this module i ll be grateful to you. i have chane values in .info file but it says there CONTENT_HANDLE_MODULE not found.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave.Ingram’s picture

Title: plan for d7 » Plans For D7

I am formulating plans still for a D7 version of this module. There are a lot of changes in how Drupal does fields which give some great opportunity to this module, but a lot of the things need to be rethought.

davycw’s picture

subscribe

zatarain21’s picture

subscribe

jason.fisher’s picture

subscribe

ay13’s picture

subscribe

vabue’s picture

subscribe

ay13’s picture

subscribe

chrisroditis’s picture

subscribe

nhytros’s picture

subscribe

pixelsweatshop’s picture

sub

freshaspect’s picture

I needed to use this module for a prototype D7 project that we're doing. Did a quick and dirty D7 upgrade which seems to work fine for text fields (not tested the others so far).

Main things were adding new hook_field_formatter_view():

function jeditable_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $elements = array();
  foreach ($items as $delta => $item) {
    $elements[$delta] = array(
      '#markup' => theme('jeditable_formatter_'. $display['type'], array('element' => $item, 'field' => $instance, 'entity' => $entity)),
    );
  }
  return $elements;
}

Adjusting the theme functions along these lines:

/**
 * Theme a CCK text field as a jeditable textfield.
 *
 * @ingroup themeable
 */
function theme_jeditable_formatter_jeditable_textfield($variables) {
  $element = $variables['element'];
  $field = $variables['field'];
  $entity = $variables['entity'];
  return '<span id="cck-' . $entity->nid . '-' . $field['field_name'] . '" class="jeditable-textfield">' . $element['value'] . '</span>';
}

drupal_jeditable.js also had to be wrapped in the standard way to play nice with D7

content_fields() calls need to be cut over to use field_info_field() as well

If all goes well with prototyping will aim to contribute rather more solid code.

Paul

chrisroditis’s picture

@freshaspect that'd be great!

JohnnyX’s picture

Subscribe

tomlurge’s picture

@freshaspect That would be really great! :-)
Alternatively, or in the meantime, if someone could make the above instructions more fool proof it would be very much appreciated as well!

Anonymous’s picture

subscribe

thechanceg’s picture

subscribe

iaminawe’s picture

Subscribe

Murz’s picture

subscribe

eriknewby’s picture

++ We will be adding this to a larger project, so I'll hopefully be able to contribute our implementation in the near future as well.

khanz’s picture

subscribe

duellj’s picture

Status: Active » Needs work
FileSize
12.24 KB

Here's a *very* basic patch that provides a D7 version (based on freshaspect's work from #11). I've only tested text fields and text areas integration, more work needs to be done to make sure references, date, and workflow integration works.

Murz’s picture

duellj, thanks! With your patch all works for me normally on Drupal 7.x - within node and within views too!

Murz’s picture

I have found the issue with last patch. When I try to change integer field, I see only one letter from changed value.
Seems that the problem in this string:
$node->{$field_name}[$node->language][0] = $value;
$value is not an array, but field item is array('value'), so for correct changing we must change the 'value' array item:
$node->{$field_name}[$node->language][0]['value'] = $value;
After this change patched module works for me normally.

Murz’s picture

Seems that problem is not in this place, jeditable must detect those fields as cck and save in "cck" switch part. But it detect them as node embedded field like title, date, etc. Because in D7 cck have moved to core fields, detection of cck fields can be broken and must changed. I'll try to fix this problem.

Murz’s picture

Here is my patch that fixes described problems.
Also I add support for deltas, so now jeditable supports multiple values in one field, also starting with offset > 0.

Murz’s picture

Status: Needs work » Needs review
FileSize
6.73 KB
12.77 KB

Also I have fixed a problem with empty fields (before if field empty, user can't edit it). Here is updated version.

Murz’s picture

Fixed space in span id.

Murz’s picture

Also fixed problem with non-translatable fields

bennos’s picture

Status: Needs review » Needs work

subscribing

Murz’s picture

Some fixes:
- Corrected menu items: moved to settings, ajax items changed to MENU_CALLBACK
- Add default placeholder for empty fields (for ability to edit empty fields), but at now can't got working show in node view, works only in views table cells.

Murz’s picture

Bennos, you change issue status to Need work - did you find some issues in this patch? If yes, please describe them here, I'll try to fix them.

Murz’s picture

I have created the sandbox with my updates of this module: http://drupal.org/sandbox/murz/1291492
So other updates and fixes I will do in my sandbox.

bennos’s picture

the issue state change was a mistake. sorry for confusion.

Murz’s picture

Status: Needs work » Needs review
Lukas von Blarer’s picture

I can't get it to work. Am I missing some setting?

Murz’s picture

Lukas von Blarer, please describe which version did you use and which problems you got?

Lukas von Blarer’s picture

I just cloned your sandbox and installed the module. When I go to a node the javascript isn't loaded. Also no classes are being apllied. In the display setting there is no option for jEditable as it is described in the readme.

Murz’s picture

Title: Plans For D7 » jEditable: port for Drupal 7.x

I test now the sources from current git, and all works. Which type of fields did you try to use? Try this way:
1. Go to Manage Fields, create new Text textfield.
2 Go to Manage Display and in widget column you must see jEditable Textfield.
If it is absent, try to clear cache. If isn't help, try to go at page /admin/config/jeditable and tell me what did you see in it.
Also check permissions, jEditable have 'Use jEditable' special permission.

Lukas von Blarer’s picture

Oh, I am sorry. Is it currently only available for textfields? Could you point me in the right direction to make it available for more fields? Right now I would need it for the following:

User Reference
Term Reference
Postal address
Email
Phone Number

Basically all of them are text and dropdown fields. What do I have to do?

It doesn't work for users. I get the following Warnings:
Notice: Undefined index: views_field in jeditable_field_formatter_view() (line 106 of /Users/lukasvonblarer/Sites/adresses/sites/all/modules/jeditable/jeditable.module).
Notice: Trying to get property of non-object in jeditable_field_formatter_view() (line 106 of /Users/lukasvonblarer/Sites/adresses/sites/all/modules/jeditable/jeditable.module).
Notice: Undefined variable: id in theme_jeditable_formatter_jeditable_textfield() (line 183 of /Users/lukasvonblarer/Sites/adresses/sites/all/modules/jeditable/jeditable.module).

Murz’s picture

It works only for textfields at now, I try to add checkboxes and selectlist, but at now this is not ready.
So, current version works only for those fields:
'text', 'number_integer', 'number_decimal', 'number_float', 'list_boolean'

Murz’s picture

In lastest 2 commits of my sandbox http://drupal.org/sandbox/murz/1291492I have added basic editing status (published), sticky and promote (on frontpage) values of node. At now they are displaying as integer and edited as 0-1 values, in future versions I'll try convert this to checkbox.
For use them you must find in field with name "status - jeditable", etc.

Lukas von Blarer’s picture

Added support for address field, phone and email fields. Email Field support does not work yet. I created a issue for this: #1315746: Why does this module use the index 'email' and not 'value'?

Lukas von Blarer’s picture

Fixed the placeholder setting and added a setting for the event trigger

raincloud’s picture

subscribe

GiorgosK’s picture

got project from Murz's sandbox and everything seems to load properly with integer field
clicking on field presents edit form, clicking save seems to try to post change
but the change is not saved

maybe incompatibility with some other module

Murz’s picture

GiorgosK, which type of fields did you try to update? Did you press "Save" button via mouse or only Enter key in keyboard?

Murz’s picture

I have committed all changes from my sandbox to project, so now you can download 7.x-1.x version.
It is not fully tested and may contain bugs, so not ready for production. Please test it and report bugs.

Murz’s picture

Status: Needs review » Closed (fixed)
mojiro’s picture

1) It still has some 'krumo' and other debugging commands inside.
2) It does not support Entity Reference. I added it (and partially works), but I cannot bring the node-edit-form widget, which is autocomplete.

mojiro’s picture

Also there is a "broken" patch... that has only

[...]
    ),
  );
}

/**
 * Returns the id fo

/**
 * Theme a text field as a jeditable textfield.
 *
 * @ingroup themeable
 */
function theme_jeditable_formatter_jeditable($variables) {
  $element     = $variables['element'];
[...]

I think that should write "Returns the id format" or something like that