Bug 16048 [Follow-up] Making notices actions buttons

This followup adds a "td.actions" style with "white-space:nowrap" and
replaces the inline styles. Also modified is the way non-sorting table
columns are defined. This corrects a problem with non-sortable columns
introducted by the previous patch's column changes.

To test, apply the patch and clear your browser cache if necessary.

- Go to Tools -> Notices and confirm that even at narrow browser widths
  the "Edit" and "Delete" buttons stay side by side.
- Confirm that all columns are sortable except "Copy notice" and
  "Actions."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2016-03-11 08:06:30 -05:00 committed by Brendan A Gallagher
parent 76fe7ec396
commit 765535c09a
2 changed files with 9 additions and 5 deletions

View file

@ -237,6 +237,10 @@ table.indexes td {
vertical-align : middle;
}
td.actions {
white-space: nowrap;
}
td.borderless {
border-collapse : separate;
border : 0 none;

View file

@ -12,7 +12,7 @@ $(document).ready(function() {
$("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
"sDom": 't',
"aoColumnDefs": [
{ "aTargets": [ -1,-2, -3 ], "bSortable": false, "bSearchable": false }
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'nosort' ] }
],
"bPaginate": false
}));
@ -199,8 +199,8 @@ $(document).ready(function() {
<th>Module</th>
<th>Code</th>
<th>Name</th>
<th>Copy notice</th>
<th>Actions</th>
<th class="nosort">Copy notice</th>
<th class="nosort">Actions</th>
</tr>
</thead>
<tbody>
@ -211,7 +211,7 @@ $(document).ready(function() {
<td>[% lette.module %]</td>
<td>[% lette.code %]</td>
<td>[% lette.name %]</td>
<td style="white-space: nowrap">
<td class="actions">
[% IF !independant_branch || !lette.branchcode %]
<form method="post" action="/cgi-bin/koha/tools/letter.pl">
<input type="hidden" name="op" value="copy_form" />
@ -227,7 +227,7 @@ $(document).ready(function() {
</form>
[% END %]
</td>
<td style="white-space: nowrap">
<td class="actions">
[% IF can_edit %]
<a class="btn btn-mini" href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;branchcode=[% lette.branchcode %]&amp;module=[% lette.module %]&amp;code=[% lette.code %]"><i class="fa fa-pencil"></i> Edit</a>
[% END %]