From e10b956bf7c52fde1c46696d1c5398a712e097f7 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 13 Feb 2016 13:44:55 -0600 Subject: [PATCH] "Fix" the stupid styles for the grid tools section..sort of..for now. At least this gets us back to the basics somewhat. Still ugly as hell though. --- tailbone/static/css/newgrids.css | 11 +++++++++++ tailbone/templates/master/index.mako | 14 ++++---------- tailbone/templates/messages/index.mako | 13 ------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/tailbone/static/css/newgrids.css b/tailbone/static/css/newgrids.css index 59327e24..2fb1728c 100644 --- a/tailbone/static/css/newgrids.css +++ b/tailbone/static/css/newgrids.css @@ -79,6 +79,17 @@ } +/****************************** + * tools + ******************************/ + +.grid-tools { + float: right; + margin-bottom: 4px; +} + + + /****************************** * table ******************************/ diff --git a/tailbone/templates/master/index.mako b/tailbone/templates/master/index.mako index 5376c37b..f11f369d 100644 --- a/tailbone/templates/master/index.mako +++ b/tailbone/templates/master/index.mako @@ -2,7 +2,8 @@ ## ############################################################################## ## ## Default master 'index' template. Features a prominent data table and -## exposes a way to filter and sort the data, etc. +## exposes a way to filter and sort the data, etc. Some index pages also +## include a "tools" section, just above the grid on the right. ## ## ############################################################################## <%inherit file="/base.mako" /> @@ -17,18 +18,11 @@ $('.newgrid-wrapper').gridwrapper(); }); - <%def name="context_menu_items()"> - % if master.creatable and request.has_perm('{0}.create'.format(grid.permission_prefix)): -
  • ${h.link_to("Create a new {0}".format(grid.model_title), url('{0}.create'.format(grid.route_prefix)))}
  • + % if master.creatable and request.has_perm('{}.create'.format(grid.permission_prefix)): +
  • ${h.link_to("Create a new {}".format(grid.model_title), url('{}.create'.format(grid.route_prefix)))}
  • % endif diff --git a/tailbone/templates/messages/index.mako b/tailbone/templates/messages/index.mako index aebd91e1..dbc13fe3 100644 --- a/tailbone/templates/messages/index.mako +++ b/tailbone/templates/messages/index.mako @@ -43,19 +43,6 @@ }); -## TODO: This "fixes" styles for some browsers, while breaking them for others... -## Need to look into how to really fix this at some point. For now, the "broken" -## browsers will have a big gap between the grid table and controls above. -## <%def name="context_menu_items()">