/** * DataTables configuration file */ define({ /** * Return the configuration JSON object for dataTables, to display files * (see dataTables documentation for more informations). * * @param data - the data to display in the table */ fileOptions: function(data){ return { "sDom": "lfrt<'row'<'span6'i><'span6'p>>", "aaData": data, "aoColumns": [ { "sTitle": "", "mData": function(source, type, val){ return ""; }, "bSortable": false, "sClass": "center", "sWidth": "6%", }, { "sTitle": "Name", "mData": function(source, type, val){ var file = source.depotFile; var lastSlashIndex = file.lastIndexOf("/"); return file.substr(lastSlashIndex + 1, file.length); }, "sWidth": "17%", }, { "sTitle": "In Folder", "mData": function(source, type, val){ var file = source.depotFile; var lastSlashIndex = file.lastIndexOf("/"); return file.substr(0, lastSlashIndex); }, }, { "sTitle": "Status", "mData": function(source, type, val){ var resolveStatus = ""; if (source.resolved == "true"){ resolveStatus = "resolved"; } else if (source.unresolved == "true"){ resolveStatus = "unresolved"; } return resolveStatus; }, "sClass": "center", "sWidth": "12%", }, { "sTitle": "Type", "mData": "type", "sClass": "center", "sWidth": "12%", }, { "sTitle": "Action", "mData": "action", "sClass": "center", "sWidth": "12.5%", } ], "aaSorting": [[ 1, "asc" ]], "sScrollY": "230px", "bScrollCollapse": true, "bFilter": false, "bLengthChange": false, "iDisplayLength": 50, }; }, /** * Return the configuration JSON object for dataTables, to display bugs * (see dataTables documentation for more informations). * * @param data - the data to display in the table */ bugOptions: function(data){ return { "sDom": "lfrt<'row'<'span6'i><'span6'p>>", "aaData": data, "aoColumns": [ { "sTitle": "", "mData": function(source, type, val){ return ""; }, "bSortable": false, "sClass": "center", "sWidth": "6%", }, { "sTitle": "Key", "mData": function(source, type, val){ return "" + source.key + ""; }, "sWidth": "15%", }, { "sTitle": "Summary", "mData": "fields.summary" }, { "sTitle": "Milestone", "mData": function(source, type, val){ if(source.fields.customfield_10160){ var milestone = source.fields.customfield_10160.value; } else{ var milestone = "None"; } return milestone; }, "sWidth": "35%", }, ], "aaSorting": [[ 1, "asc" ]], "sScrollY": "230px", "bScrollCollapse": true, "bFilter": false, "bLengthChange": false, "iDisplayLength": 50, } }, });