From 40e36126820935a5d3bfe404b5d76ea653051508 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 5 Feb 2015 14:05:29 +0100 Subject: [PATCH] [gen] New ajax system: more bugfixes. --- fields/ref.py | 12 +++++------ fields/search.py | 8 +++---- gen/mixins/ToolMixin.py | 8 +++---- gen/mixins/__init__.py | 2 +- gen/ui/appy.js | 43 ++++++++++++++++++++++--------------- gen/wrappers/ToolWrapper.py | 2 +- gen/wrappers/__init__.py | 8 +++++-- 7 files changed, 48 insertions(+), 35 deletions(-) diff --git a/fields/ref.py b/fields/ref.py index 28b69f0..63054f0 100644 --- a/fields/ref.py +++ b/fields/ref.py @@ -176,7 +176,7 @@ class Ref(Field): :obj.pxViewAsTied + rowCss=loop.tied.odd and 'even' or 'odd'">:tied.pxViewAsTied :field.pxGlobalActions :tool.pxNavigate - + ''') @@ -437,8 +437,8 @@ class Ref(Field): collapse=field.getCollapseInfo(obj, False); showSubTitles=req.get('showSubTitles', 'true') == 'true'"> - + :field.pxViewPickList @@ -1265,7 +1265,7 @@ class Ref(Field): code = "\nnode['_appy_%%s_cbs']={};\nnode['_appy_%%s_sem']='%s';" % \ default poss = (self.link == 'list') and (code % ('poss', 'poss')) or '' - return "var node=document.getElementById('%s_%s');%s%s" % \ + return "var node=findNode(this, '%s_%s');%s%s" % \ (obj.id, self.name, code % ('objs', 'objs'), poss) def getAjaxData(self, hook, zobj, **params): diff --git a/fields/search.py b/fields/search.py index 7b0cca2..fe7c7fc 100644 --- a/fields/search.py +++ b/fields/search.py @@ -202,8 +202,8 @@ class UiSearch: :_('query_no_result') :obj.pxViewAsResult + var2="rowCss=loop.zobj.odd and 'even' or 'odd'; + @currentNumber=currentNumber + 1">:zobj.appy().pxViewAsResult
@@ -241,7 +241,7 @@ class UiSearch:
- ''') # The page footer diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index ff5ac99..e944131 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -728,12 +728,16 @@ class AbstractWrapper(object): x=resp.setHeader('Content-Language', lang); x=resp.setHeader('Cache-Control', 'no-cache')"> - + - + + + + :getattr(obj, px[0]) :getattr(field, px[-1]) ''')