diff --git a/fields/ref.py b/fields/ref.py index 1fe3c27..777daf8 100644 --- a/fields/ref.py +++ b/fields/ref.py @@ -115,10 +115,12 @@ class Ref(Field): - + onclick=":'onDeleteObject(%s,%s)' % (q(tiedUid), back)"/> <\/div>"); + injectChunk(hookElem, "
<\/div>", true); } if (xhrObjects[pos].xhr.readyState == 4) { // We have received the HTML chunk var hookElem = getAjaxHook(hook); if (hookElem) { - injectChunk(hookElem, xhrObjects[pos].xhr.responseText); + var content = xhrObjects[pos].xhr.responseText; + var searchTop = hook[0] == ':'; + var injected = injectChunk(hookElem, content, false, searchTop); // Call a custom Javascript function if required if (xhrObjects[pos].onGet) { - xhrObjects[pos].onGet(xhrObjects[pos], hookElem); - } - // Eval inner scripts if any - var innerScripts = getElementsHavingName('div', 'appyHook'); - for (var i=0; i::ztool.getJavascriptMessages() -
- - + +
@@ -133,7 +132,7 @@ class ToolWrapper(AbstractWrapper):
+ action=":'%s/doPod' % tool.url"> diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index f8cba60..670c8d9 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -602,13 +602,14 @@ class AbstractWrapper(object): tied=obj; zobj=ztool.getObject(sourceId); obj=zobj.appy(); + inMenu=False; field=zobj.getAppyType(refFieldName); layoutType='view'; render=field.getRenderMode(layoutType); linkList=field.link == 'list'; numberWidth=len(str(totalNumber)); tiedClassName=ztool.getPortalType(field.klass); - target=ztool.getLinksTargetInfo(field.klass); + target=ztool.getLinksTargetInfo(field.klass, zobj.id); mayEdit=not field.isBack and zobj.mayEdit(field.writePermission); mayLink=not inPickList and mayEdit and \ field.mayAdd(zobj, mode='link', checkMayEdit=False);