Permalink
Browse files

MINOR Shrinking GridField button column to fit, rather than hardcodin…

…g a width for it that depends on the amount and styling of buttons in the table
  • Loading branch information...
1 parent efc30fd commit 3ef3a6df99ea554342e4e41e28b24543454b83f1 @chillu chillu committed Mar 27, 2012
Showing with 25 additions and 11 deletions.
  1. +1 −0 admin/css/ie7.css
  2. +10 −4 admin/scss/ie7.scss
  3. +3 −2 css/GridField.css
  4. +11 −5 scss/GridField.scss
View
@@ -20,6 +20,7 @@ html { overflow: hidden; }
.jstree li a .ui-icon { text-indent: 0px !important; }
+.cms table.ss-gridfield-table tbody td { width: auto; }
.cms table.ss-gridfield-table tr th.extra span input { height: 23px; }
.ss-gridfield-button-filter.ss-ui-button { margin: -1px -5px; background: #e6e6e6 url(../images/filter-icons.png) no-repeat -40px 6px; filter: none; }
View
@@ -68,10 +68,16 @@ html {
text-indent: 0px !important;
}
-//fix for filter and reset icons on datagrid
-
-.cms table.ss-gridfield-table tr th.extra span input {
- height:23px;
+.cms table.ss-gridfield-table {
+ tbody td {
+ // Overrule width: 100% setting to trigger "shrink fit"
+ // of button row, which IE7 doesn't support
+ width: auto;
+ }
+ tr th.extra span input {
+ //fix for filter and reset icons on datagrid
+ height:23px;
+ }
}
.ss-gridfield-button-filter.ss-ui-button {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -98,6 +98,16 @@ $gf_grid_x: 16px;
tbody {
background: #FFF;
td {
+ // Give browser some hints on which cols take priority:
+ // The last column (buttons) should always shrink to fit.
+ // Overwritten for IE7, which doesn't support this.
+ width: 100%;
+ &.col-buttons {
+ width: auto;
+ text-align: right;
+ white-space: nowrap;
+ }
+
button {
border: none;
background: none;
@@ -118,13 +128,9 @@ $gf_grid_x: 16px;
display:inline-block;
width:$gf_grid_x;
height:20px; //min height to fit the edit icon
- text-indent:-9999em;
+ text-indent:9999em;
background: url(../images/icons/document--pencil.png) no-repeat 0 1px;
}
-
- &.col-buttons {
- white-space: nowrap;
- }
}
}

0 comments on commit 3ef3a6d

Please sign in to comment.