Skip to content

Commit

Permalink
Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadan Gergeo committed Mar 31, 2014
1 parent 458893b commit df6f86f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions _js/rwd-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function updateStickyTableHead(orgTable, stickyTableHead, fixedNavbar) {
$.widget( "filament.table", { // need to come up with a better namespace var...

options: {
idprefix: "col-", // specify a prefix for the values of the id- and columns attributes.
checkContainer: null, // container element where the hide/show checkboxes will be inserted; if none specified, the script creates a menu
addAutoButton: false, // should it have a auto button?
addFocusButton: false, // should it have a focus button?
Expand All @@ -134,7 +133,8 @@ function updateStickyTableHead(orgTable, stickyTableHead, fixedNavbar) {
hdrCells = thead.find("th"),
bodyRows = tbody.find("tr"),
container = o.checkContainer ? $(o.checkContainer) : $('<ul class="dropdown-menu"/>'),
autoHideTrigger = 'auto-on-' + table.attr('id');
autoHideTrigger = 'auto-on-' + table.attr('id'),
idPrefix = table.attr('id') + '-col-';

// wrap table in div for scrolling if needed
if($(table).parent().hasClass('table-scroll-wrapper') === false){
Expand Down Expand Up @@ -187,13 +187,13 @@ function updateStickyTableHead(orgTable, stickyTableHead, fixedNavbar) {

// assign an id to each header, if none is in the markup
if (!id) {
id = o.idprefix + i;
id = idPrefix + i;
th.attr("id", id);
}

// create the hide/show toggle for the current column
if ( th.is("[data-priority]") ) {
var toggle = $('<li class="checkbox-row"><input type="checkbox" name="toggle-cols" id="toggle-col-'+i+'" value="'+id+'" /> <label for="toggle-col-'+i+'">'+th.text()+'</label></li>');
var toggle = $('<li class="checkbox-row"><input type="checkbox" name="toggle-'+id+'" id="toggle-'+id+'" value="'+id+'" /> <label for="toggle-'+id+'">'+th.text()+'</label></li>');

container.append(toggle);

Expand Down Expand Up @@ -282,10 +282,10 @@ function updateStickyTableHead(orgTable, stickyTableHead, fixedNavbar) {
// loop through columns that the cell spans over
for (var k = idStart; k < (idStart + colSpan); k++) {
// add column id
columnsAttr = columnsAttr + " " + o.idprefix + k;
columnsAttr = columnsAttr + " " + idPrefix + k;

// get colulm header
var colHdr = $(tableScrollWrapper).find('#' + o.idprefix + k);
var colHdr = $(tableScrollWrapper).find('#' + idPrefix + k);

// copy class attribute from column header
var classes = colHdr.attr("class");
Expand Down
2 changes: 1 addition & 1 deletion _js/rwd-table.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RWD-Table-Patterns",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "http://gergeo.se/RWD-Table-Patterns",
"authors": [
"Nadan Gergeo <nadan.gergeo@gmail.com>"
Expand Down

0 comments on commit df6f86f

Please sign in to comment.