ezajaxrelations_jquery.js AND object attributes

Author Message

Hugo Sandoval

Monday 29 November 2010 6:41:47 am

Good morning my friends.

I am looking the method to fetch some attributes from objects returned in a search with ezajaxrelations_jquery.js, inside object relation attribute in editing mode.

Searching text in edition mode, for a object relation attribute, returns matching object as links, i need to check some attributes of the returned object in order to activate or not the onclick method in ezajaxrelations_jquery.js:

for ( var i = 0, l = arr.length; i < l; i++ )
                {
                        html += '<a onclick="return ezajaxrelationsSearchAddObject( 
                                        this, \'' + boxID + '\', ' + arr[i].id + 
                                        ',\'' + arr[i].name + '\',\'' + 
                                         arr[i].class_name + '\',\'' + 
                                         arr[i].section.name + '\',\'' + 
                                         pub.val() + '\'  );">' + 
                                         arr[i].name + '<\/a><br \/>';

                }
                $( boxID + ' div.ezobject-relation-search-browse'  ).html( html ).show();

In the above code, if i want to show the name of the returned object i must use arr[i].name, this is equivalent to $node.name or $object.name, so , i want to be able to retrieve any object's attribute like $node.data_map.myattribute.content or $node.data_map.myattribute.data_text, etc. How can i do it?

.·. .·. .·. .·. .·. .·. .·.
http://www.softwarelibre.com.ve/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.