-
Notifications
You must be signed in to change notification settings - Fork 755
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
column min width, ajax loading icon and column drag-drop #257
Comments
Hi Jorge! What do you mean by fix a column? As in sideways scrolling (see issue #135) or fix it's width? If you mean fix the width, try setting the There is an option named Drag and drop sorting of columns is on my to do list (see issue #186), but as it stands now, it would require a complete update of all table contents, which is not very efficient, especially with large tables. It would be better to manipulate the internal cache, and that doesn't seem like an easy task to do. Additionally, right now I don't have the time to work on anything complex other than simple fixes and issue updates. Thanks for the suggestions though! |
Hi, As for the drag and drop...just an idea ;) Thanks, |
Hi Jorge! Just set the width of that column. For example: CSS th.narrow { width: 50px; } HTML <table>
<thead>
<th class="narrow">...</th>
...
</thead>
<tbody>
...
</tbody>
</table> |
lol..damn you are quick :) Regarding the loading issue I forgot to comment...I did show the show processing in column and that´s very nice, but I am referring to the first time the table is loaded. I´ve remembered 2 more features what would made table sorter really perfect (now it´s just perfect :) ), the ability to print or to export to excel, ou cvs. I´m having a doubt with metadata, but I will open a new issue. Once again many thanks for this wonderfull job. |
I'm not sure this will work for you, but you could just add a table cell with a loading icon when the table initializes or updates, as shown in the code below. You may need to clear out all other tbodies, and if you do, just uncomment out the CSS ( td.loading-tbody, td.loading-tbody:hover {
background-image: url(http://mottie.github.com/tablesorter/addons/pager/icons/loading.gif) !important;
background-position: center center !important;
background-repeat: no-repeat !important;
} Script $('table')
.on('tablesorter-initialized updateComplete update', function (e) {
if (e.type !== 'updateComplete') {
// $.tablesorter.clearTableBody(this); // empty out all tbodies within the table
var $overlay = $('<td/>', {
class: 'loading-tbody',
colspan: 4,
height: '200px'
})
.appendTo($(this))
.wrap('<tbody><tr/></tbody>');
} else {
$('.loading-tbody').closest('tbody').remove();
}
})
.tablesorter({
theme: 'blue'
}); |
Thanks, Regarding the column width didn´t work. I´ve checked with firebug and a style element fixing the width is added to the column, overriding my css. Don´t know if is bootstrap or table sorter who is changing it... I´m also using tablesorte resizable plugin. Maybe it´s him..and since I´m using it, fixing the size woud be a nice feature to have here. Thanks, |
Hi Jorge! If you are using the resizable widget, then yes it will change the width if you resize it, unless you add a |
Hi, |
Hi, th.narrow { min-width: 50px; } Thanks, |
just be careful with min-width if you need to support legacy browsers. |
Hi, |
thanks |
HI,
Great work you have done here !!
I have a doubt. Is it possible to fix only a column to not have less than x% ?
I need this because I have a table with some columns that keep compressing one that I want to be the greatest of all. Any way to accomplish this ?
Here are some ideas that could be useful.
Thanks and keep the good work :)
Jorge Correia
The text was updated successfully, but these errors were encountered: