Use camelCase rather than Hungarian notation, fix breaks with archived nodes, pagingType not available with bootstrap theme

This commit is contained in:
Eric A. Miller
2014-08-18 23:31:35 -04:00
parent 1d4a66a554
commit 83eccd0ea5

View File

@@ -35,12 +35,11 @@ $(document).ready(function() {
"stateSave": true, "stateSave": true,
"pageLength": [% settings.table_pagesize %], "pageLength": [% settings.table_pagesize %],
"lengthMenu": [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ], "lengthMenu": [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ],
"sDom": '<"top"l<"nd_datatables-pager"p>f>rt<"bottom"><"clear">', "dom": '<"top"l<"nd_datatables-pager"p>f>rt<"bottom"><"clear">',
// "pagingType": "full_numbers",
"language": { "language": {
"search": '_INPUT_', "search": '_INPUT_',
"searchPlaceholder": 'Filter records...', "searchPlaceholder": 'Filter records...',
"sLengthMenu": "Show _MENU_ records." "lengthMenu": "Show _MENU_ records."
}, },
"deferRender": true, "deferRender": true,
"order": [[ 1, "asc" ]], "order": [[ 1, "asc" ]],
@@ -491,7 +490,7 @@ $(document).ready(function() {
} }
if (row.nodes[index].active === 0) { if (row.nodes[index].active === 0) {
[% IF params.n_archived %] [% IF params.n_archived %]
if (index > 0 && row.nodes[index - 1].active) { if (index > 0 ) {
cell_str = cell_str + '<br/>'; cell_str = cell_str + '<br/>';
} }
cell_str = cell_str + '<i class="icon-book"></i>&nbsp; '; cell_str = cell_str + '<i class="icon-book"></i>&nbsp; ';
@@ -499,7 +498,7 @@ $(document).ready(function() {
continue; continue;
[% END %] [% END %]
} }
else if (index !== 0) { else if (index > 0 && row.nodes[index].active !== 0) {
cell_str = cell_str + '<br/>'; cell_str = cell_str + '<br/>';
} }
if (row.remote_type && row.remote_type.match(/ip.phone/i)) { if (row.remote_type && row.remote_type.match(/ip.phone/i)) {
@@ -624,9 +623,9 @@ $(document).ready(function() {
// first remove existing controls, in case indexes have changed // first remove existing controls, in case indexes have changed
$('#nd_column-controls').find('.nd_colvis-checkbox').remove(); $('#nd_column-controls').find('.nd_colvis-checkbox').remove();
if ( $.inArray( 'all', colvis.s.aiExclude ) === -1 ) { if ( $.inArray( 'all', colvis.s.exclude ) === -1 ) {
for ( var i=0, iLen=columns.length ; i<iLen ; i++ ) { for ( var i=0, iLen=columns.length ; i<iLen ; i++ ) {
if ( $.inArray( i, colvis.s.aiExclude ) === -1 ) { if ( $.inArray( i, colvis.s.exclude ) === -1 ) {
var button = colvis.dom.buttons.shift(); var button = colvis.dom.buttons.shift();
if (columns[i]["name"] == "icon") { if (columns[i]["name"] == "icon") {
continue; continue;