[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.
--- 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 {
--- 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) */
/***************************************/
--- 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'<div class="tableactions">')
+ 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'<span>')
- action.render(w)
- w(u'</span>')
- w(u'</div>')
+ menu.append(action)
+ box.render(w=w)
+ w(u'<div class="clear"></div>')
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):