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.

eZ debug

Timing: Jan 18 2025 02:16:19
Script start
Timing: Jan 18 2025 02:16:19
Module start 'layout'
Timing: Jan 18 2025 02:16:19
Module start 'content'
Timing: Jan 18 2025 02:16:20
Module end 'content'
Timing: Jan 18 2025 02:16:20
Script end

Main resources:

Total runtime1.5438 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 589.1875152.6406
Module start 'layout' 0.00800.0041 741.828139.4844
Module start 'content' 0.01211.5302 781.3125468.8906
Module end 'content' 1.54230.0015 1,250.20318.1250
Script end 1.5438  1,258.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2126160.0002
Check MTime0.00130.0864160.0001
Mysql Total
Database connection0.00240.155110.0024
Mysqli_queries1.496196.9092460.0325
Looping result0.00050.0322440.0000
Template Total1.488796.420.7444
Template load0.00210.135420.0010
Template processing1.486696.294720.7433
Template load and register function0.00010.007410.0001
states
state_id_array0.00200.129610.0020
state_identifier_array0.00230.147520.0011
Override
Cache load0.00160.103490.0002
Sytem overhead
Fetch class attribute can translate value0.00060.038610.0006
Fetch class attribute name0.00050.035520.0003
XML
Image XML parsing0.00070.043510.0007
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00100.0624160.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs