filter_formatter don't hide with filter hide
cspeerly opened this issue · 4 comments
The filter_formatter functions don't hide using filter_hideFilters:true
The baxic Filters and select hide but not the formatter filters.
here is the jsfiddle example http://jsfiddle.net/cspeerly/zbg2r/
Also I had to change this in the formatter css file to enlarge the text on the slider flags
From 0.5em to 1em
/**** Sliders ****/
/* shrink the ui sliders to look nicer inside of a table cell */
.ui-slider {
width: 90%;
margin: 12px auto 2px auto; /* add enough top margin so the tooltips will fit */
font-size: 1em;
}
I also added this so the range slider will resize if the column is resizable
.range {
width: 90%;
margin: 12px auto 2px auto; /* add enough top margin so the tooltips will fit */
font-size: 1em;
}
Hi cspeerly!
Thanks for reporting this issue! I'll look into making the other form elements cooperate and hide better!
And honestly, the css stuff is a personal thing that users can modify for themselves. I set it to what looks good to me with full knowledge that others will have different preferences and think what I set up as fugly. It's all good! Anyway, this time I think I will compromise with you and change it to 0.8em
;P
Thank's so much, looking good
I am trying to mock your example but I can't get the spinner and date thing to work.
example at jsfiffle http://jsfiddle.net/cspeerly/zbg2r/
I like to have the date format of yy/mm/dd. I can get that set to work with dateFormat: but still no work.
Hiya!
Here is an updated demo
It looks like the spinner wasn't working because the header filter option was set to true
:
headers: {
5: {
sorter: true,
filter: true,
resizable: true
}
}
The filter option should not be set when using the filter formatter because setting it to true was making the widget think that there was a select there instead of a spinner.
The uiDatePicker
filterFormatter function only needed the dateFormat option added and set. Also, the from
and to
dates needed to match that format:
filter_formatter: {
6: function ($cell, indx) {
return $.tablesorter.filterFormatter.uiDatepicker($cell, indx, {
from: '13/1/1', // default from date
to: '14/12/31', // default to date
changeMonth: true,
changeYear: true,
dateFormat:'yy/mm/dd' // this is a jQuery DatePicker option
});
}
}
Lastly, defining a colgroup
with specific col
widths (in px) was preventing the resizable widget from resizing the columns; it's only set up to work with percentage widths. So I completely removed the colgroup
to demonstrate the difference.
I hope that fixes all of the issues that you were having :)
Thank you very much,.
All is working when I hard code.
I am still having a little problems when I put in int my php pages set from a config.
The filter stays open until I click on reset filters. Then it hides.
The sliders don't always work correctly to the contents in the fields.
It must be in my php code as if I hard code it in it is fine. Although when I browse the source it looks the same.
Thanks, I will work it out on this end
Chuck