Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: removed invalid "name" element, removed redundant nobr spans, added data-column-id to grids #3927

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ public function renderHeader()
if ($this->getColumn()->getDir()) {
$className = 'sort-arrow-' . $dir;
}
$out = '<a href="#" name="' . $this->getColumn()->getId() . '" title="' . $nDir
. '" class="' . $className . '"><span class="sort-title">'
$out = '<a href="#" title="' . $nDir . '" class="' . $className . '"><span class="sort-title">'
. $this->escapeHtml($this->getColumn()->getHeader()) . '</span></a>';
} else {
$out = $this->escapeHtml($this->getColumn()->getHeader());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ $numColumns = count($this->getColumns());
<?php if ($this->getHeadersVisibility()): ?>
<tr class="headings">
<?php foreach ($this->getColumns() as $_column): ?>
<th<?php echo $_column->getHeaderHtmlProperty() ?>><span class="nobr"><?php echo $_column->getHeaderHtml() ?></span></th>
Copy link
Contributor

@kiatng kiatng Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about removing the span element. It may break custom styling that selects it, for example:

.grid tr.headings th span.nobr { ... }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is true (I thought about it as I'm very strict with other changes like modifying the signature of a public method) but as the same time the possibility of this happening and the minor side effect made me go for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could merge this in v21 but... it seems overkill for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I've just removed the .grid tr.headings th span.nobr CSS line which was a hack for firefox 3... firefox 3...

<th<?php echo $_column->getHeaderHtmlProperty() ?> data-column-id="<?php echo $_column->getId() ?>"><?php echo $_column->getHeaderHtml() ?></th>
<?php endforeach ?>
</tr>
<?php endif ?>
Expand Down
2 changes: 1 addition & 1 deletion skin/adminhtml/default/default/boxes.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ table.actions td { vertical-align:top; }

/* Grid - Headings */
.grid tr.headings { background:url(images/sort_row_bg.gif) 0 50% repeat-x; }
.grid tr.headings th { border-width:1px; border-color:#f9f9f9 #d1cfcf #f9f9f9 #f9f9f9; border-style:solid; padding-top:1px; padding-bottom:0; font-size:.9em; }
.grid tr.headings th { border-width:1px; border-color:#f9f9f9 #d1cfcf #f9f9f9 #f9f9f9; border-style:solid; padding-top:1px; padding-bottom:0; font-size:.9em; white-space:nowrap;}
.grid tr.headings th.last { border-right:0; }
.grid tr.headings th.no-link { /* Grid th with no sorting functionality */ padding-top:2px; padding-bottom:1px; color:#67767e; }
.grid tr.headings th span.nobr { display:block; /* FF3 fix */ }
Expand Down
Loading