diff --git a/data/cubes.comment.js b/data/cubes.comment.js index 2b97e776053768e6e07f0afd44e15a4b303a33c4_ZGF0YS9jdWJlcy5jb21tZW50Lmpz..bacbad3c5f29dc17717d5c723a1b30fe36a14fa6_ZGF0YS9jdWJlcy5jb21tZW50Lmpz 100644 --- a/data/cubes.comment.js +++ b/data/cubes.comment.js @@ -1,6 +1,6 @@ /* * :organization: Logilab - * :copyright: 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. + * :copyright: 2003-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. * :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr */ diff --git a/views.py b/views.py index 2b97e776053768e6e07f0afd44e15a4b303a33c4_dmlld3MucHk=..bacbad3c5f29dc17717d5c723a1b30fe36a14fa6_dmlld3MucHk= 100644 --- a/views.py +++ b/views.py @@ -164,6 +164,7 @@ __select__ = implements('Comment') jsfunc = "processComment(%s, '%s')" + jsonmeth = 'edit_comment' def cell_call(self, row, col): self.comment_form(self.entity(row, col)) @@ -175,7 +176,7 @@ # hack to avoid tabindex conflicts caused by Ajax requests self.req.next_tabindex = count(20).next jseid = dumps(commented.eid) - buttons = [Button(onclick=self.jsfunc % (jseid, 'add_comment')), + buttons = [Button(onclick=self.jsfunc % (jseid, self.jsonmeth)), Button(stdmsgs.BUTTON_CANCEL, onclick=self.jsfunc % (jseid, ''))] form = self.vreg.select_object('forms', 'edition', self.req, @@ -192,6 +193,8 @@ id = 'inlinecommentform' __select__ = match_kwargs('commented') # explicit call when it makes sense + jsonmeth = 'add_comment' + def call(self, commented): self.initialize_varmaker() newcomment = self.vreg.etype_class('Comment')(self.req)