[tableview] fix action menu layout (closes #2099011)
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 23 Nov 2011 14:45:13 +0100
changeset 8094 bedf36fb17f1
parent 8093 3efb83e4e8f3
child 8095 5ad0f8ac7561
[tableview] fix action menu layout (closes #2099011) * on the left instead of the right of the table * remove the arrow and the bullets
web/data/cubicweb.tableview.css
web/views/tableview.py
--- a/web/data/cubicweb.tableview.css	Wed Nov 23 12:30:05 2011 +0100
+++ b/web/data/cubicweb.tableview.css	Wed Nov 23 14:45:13 2011 +0100
@@ -20,8 +20,20 @@
   font-weight: bold;
 }
 
+div.tableActionsBox {
+}
 
-div#tableActionsBox {
- direction:rtl;
- float:right
+div.tableActionsBox .popup {
+  border-radius: 5px;
+  background: %(incontextBoxBodyBgColor)s;
+  box-shadow: 3px 3px 3px Grey;
 }
+
+div.tableActionsBox li {
+  background: none;
+  /* we should probably get rid of ul/li structure because
+     of the spurious space consumed by the bullet */
+  margin-right: .3em;
+  margin-left: -.3em;
+}
+
--- a/web/views/tableview.py	Wed Nov 23 12:30:05 2011 +0100
+++ b/web/views/tableview.py	Wed Nov 23 14:45:13 2011 +0100
@@ -289,9 +289,8 @@
         return attrs
 
     def render_actions(self, w, actions):
-        box = MenuWidget('', 'tableActionsBox', _class='', islist=False)
-        label = tags.img(src=self._cw.uiprops['PUCE_DOWN'],
-                         alt=xml_escape(self._cw._('action(s) on this selection')))
+        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)