Skip to content

Conversation

@bitshark
Copy link

@bitshark bitshark commented Oct 1, 2013

Added feature to have default value in options so the user
can set whether the datepicker in jTable forms lets
the user directly change the month and the year. This is
done via options defaultDateChangeYear and
defaultDateChangeMonth which by default are set to false,
but either one or both can be set to true by the user
during jTable initialization. Doing so modifies the behavior
of the datepicker object in table create/edit forms, letting
the user optionally direct select the year and/or month
(rather than having to scroll through time).

A second feature to allows the user to call public jTable.allRows(),
analogous to jTable.selectedRows(). In addition to just
returning the selected rows, we now return all the rows
in the jTable (and thus underlying data) by calling allRows().

Modified both the jquery.jtable.js source with these changes,
as well as the underlying dev source with identical changes.

Added feature to have default value in options so the user
can select whether the datepicker in jTable forms let's
the user directly change the month and the year.

Added feature to allow user to call public jTable.getAllRows(),
analogous to jTable.getSelectedRows().  Instead of just
returning the selected rows, we now return all the rows
in the jTable (and thus underlying data).

Modified both the jquery.jtable.js source with these changes,
as well as the underlying dev source with identical changes.
@ComLock
Copy link

ComLock commented Oct 13, 2013

I'd like the allRows Public Method

Then I can make unread rows bold in recordsLoaded, something like:

for allRows {
if (!row.data('record').download_time) {
row.addClass('bold');
}
}

@ComLock
Copy link

ComLock commented Oct 13, 2013

Workaround:

$('.jtable-data-row').each(function (index) {
    var key = $(this).attr('data-record-key');
    var row = $('#id').jtable('getRowByKey',key);
    var record = row.data('record');
    if(!record.download_time) {
        row.addClass('bold');
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants