# HG changeset patch # User David Douard # Date 1365432783 -7200 # Node ID 7d1ccaac5ae3de97ad1913173c7f030429d74a4f # Parent c9d18b8dbfea0f69e0fa4618abb641833c930467 [views/tables|css] backout rev 895e34d9ae0d This changeset introduced a GUI behaviour change that has usability side-effects (eg. shows a non-undoable massive action as a first-class action). The idea is good, but it requires a better implementation; tabs are not the proper GUI solution to the original usability issue. diff -r c9d18b8dbfea -r 7d1ccaac5ae3 web/data/cubicweb.css --- a/web/data/cubicweb.css Mon Apr 08 16:43:26 2013 +0200 +++ b/web/data/cubicweb.css Mon Apr 08 16:53:03 2013 +0200 @@ -545,16 +545,6 @@ padding-left: 2em; } -/* actions around tables */ -.tableactions span { - padding: 0 18px; - height: 24px; - background: #F8F8F8; - border: 1px solid #DFDFDF; - border-bottom: none; - border-radius: 4px 4px 0 0; -} - /* custom boxes */ .search_box div.boxBody { diff -r c9d18b8dbfea -r 7d1ccaac5ae3 web/data/cubicweb.old.css --- a/web/data/cubicweb.old.css Mon Apr 08 16:43:26 2013 +0200 +++ b/web/data/cubicweb.old.css Mon Apr 08 16:53:03 2013 +0200 @@ -899,16 +899,6 @@ padding-left: 0.5em; } -/* actions around tables */ -.tableactions span { - padding: 0 18px; - height: 24px; - background: #F8F8F8; - border: 1px solid #DFDFDF; - border-bottom: none; - border-radius: 4px 4px 0 0; -} - /***************************************/ /* error view (views/management.py) */ /***************************************/ diff -r c9d18b8dbfea -r 7d1ccaac5ae3 web/views/tableview.py --- a/web/views/tableview.py Mon Apr 08 16:43:26 2013 +0200 +++ b/web/views/tableview.py Mon Apr 08 16:53:03 2013 +0200 @@ -290,17 +290,20 @@ return attrs def render_actions(self, w, actions): - w(u'
') + box = MenuWidget('', '', _class='tableActionsBox', islist=False) + label = tags.span(self._cw._('action menu')) + menu = PopupBoxMenu(label, isitem=False, link_class='actionsBox', + ident='%sActions' % self.view.domid) + box.append(menu) for action in actions: - w(u'') - action.render(w) - w(u'') - w(u'
') + menu.append(action) + box.render(w=w) + w(u'
') def show_hide_filter_actions(self, currentlydisplayed=False): divid = self.view.domid showhide = u';'.join(toggle_action('%s%s' % (divid, what))[11:] - for what in ('Form', 'Actions')) + for what in ('Form', 'Show', 'Hide', 'Actions')) showhide = 'javascript:' + showhide self._cw.add_onload(u'''\ $(document).ready(function() { @@ -310,8 +313,10 @@ $('#%(id)sShow').attr('class', 'hidden'); } });''' % {'id': divid}) - showlabel = self._cw._('toggle filter') - return [component.Link(showhide, showlabel, id='%sToggle' % divid)] + showlabel = self._cw._('show filter form') + hidelabel = self._cw._('hide filter form') + return [component.Link(showhide, showlabel, id='%sShow' % divid), + component.Link(showhide, hidelabel, id='%sHide' % divid)] class AbstractColumnRenderer(object):