no more need for specific handling of table view's displayaction stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 04 Jun 2010 13:07:57 +0200
branchstable
changeset 5668 7bd6a8a126b8
parent 5667 04cbd80fd5dc
child 5669 1340f14c38c9
no more need for specific handling of table view's displayaction it's handled as other view arguments in vidargs
view.py
web/data/cubicweb.facets.js
web/views/tableview.py
--- a/view.py	Fri Jun 04 13:07:07 2010 +0200
+++ b/view.py	Fri Jun 04 13:07:57 2010 +0200
@@ -51,7 +51,6 @@
  cubicweb:accesskey         CDATA   #IMPLIED
  cubicweb:actualrql         CDATA   #IMPLIED
  cubicweb:dataurl           CDATA   #IMPLIED
- cubicweb:displayactions    CDATA   #IMPLIED
  cubicweb:facetName         CDATA   #IMPLIED
  cubicweb:facetargs         CDATA   #IMPLIED
  cubicweb:fallbackvid       CDATA   #IMPLIED
--- a/web/data/cubicweb.facets.js	Fri Jun 04 13:07:07 2010 +0200
+++ b/web/data/cubicweb.facets.js	Fri Jun 04 13:07:57 2010 +0200
@@ -1,6 +1,6 @@
 /*
  *  :organization: Logilab
- *  :copyright: 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+ *  :copyright: 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
  *  :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
  */
 
@@ -56,9 +56,7 @@
 	}
 	var toupdate = result[1];
 	var extraparams = vidargs;
-	var displayactions = jQuery('#' + divid).attr('cubicweb:displayactions');
-	if (displayactions) { extraparams['displayactions'] = displayactions; }
-	if (paginate) { extraparams['paginate'] = '1'; }
+	if (paginate) { extraparams['paginate'] = '1'; } // XXX in vidargs
 	// copy some parameters
 	// XXX cleanup vid/divid mess
 	// if vid argument is specified , the one specified in form params will
--- a/web/views/tableview.py	Fri Jun 04 13:07:07 2010 +0200
+++ b/web/views/tableview.py	Fri Jun 04 13:07:57 2010 +0200
@@ -165,16 +165,13 @@
                                             displayactions)
         elif displayfilter:
             actions += self.show_hide_actions(divid, True)
-        self.w(u'<div id="%s"' % divid)
+        self.w(u'<div id="%s">' % divid)
         if displayactions:
             actionsbycat = self._cw.vreg['actions'].possible_actions(req, self.cw_rset)
             for action in actionsbycat.get('mainactions', ()):
                 for action in action.actual_actions():
                     actions.append( (action.url(), req._(action.title),
                                      action.html_class(), None) )
-            self.w(u' cubicweb:displayactions="1">') # close <div tag
-        else:
-            self.w(u'>') # close <div tag
         # render actions menu
         if actions:
             self.render_actions(divid, actions)