[gen] Replaced old-style JS calls to 'askAjaxChunk' to calls to 'askAjax'.

This commit is contained in:
Gaetan Delannay 2015-02-13 17:29:51 +01:00
parent 7c58582b9a
commit f842c0ce02
8 changed files with 141 additions and 154 deletions

View file

@ -1247,7 +1247,15 @@ class BaseMixin:
def getHistoryCollapse(self):
'''Gets a Collapsible instance for showing a collapse or expanded
history in this object.'''
return Collapsible('appyHistory', self.REQUEST)
return Collapsible('objectHistory', self.REQUEST)
def getHistoryAjaxData(self, hook, startNumber, batchSize):
'''Gets data allowing to ajax-ask paginated history data.'''
params = {'startNumber': startNumber, 'maxPerPage': batchSize}
# Convert params into a JS dict
params = sutils.getStringDict(params)
return "getAjaxHook('%s',true)['ajax']=new AjaxData('%s','pxHistory', "\
"%s, null, '%s')" % (hook, hook, params, self.absolute_url())
def mayNavigate(self):
'''May the currently logged user see the navigation panel linked to