This commit is contained in:
parent
fcfbf97f54
commit
65480ffee7
2 changed files with 25 additions and 6 deletions
|
@ -31,6 +31,12 @@ button{
|
||||||
float:right;
|
float:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#reset-search {
|
||||||
|
color: #2485AE;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
form{
|
form{
|
||||||
margin-top:70px;
|
margin-top:70px;
|
||||||
margin-bottom: -50px;
|
margin-bottom: -50px;
|
||||||
|
|
|
@ -765,8 +765,10 @@ function prepareTableForDataTablePagination(jsonData){
|
||||||
table.append(tbody);
|
table.append(tbody);
|
||||||
tableDiv.append(table);
|
tableDiv.append(table);
|
||||||
|
|
||||||
$('#datatable').dataTable({
|
var searchBarParentContainerDIVClass = "searchbar";
|
||||||
"sDom": '<"searchbar"f><"paginatedtabs"p><"datatablewrapper"t>',
|
|
||||||
|
var entityListTable = $('#datatable').dataTable({
|
||||||
|
"sDom": '<"' + searchBarParentContainerDIVClass + '"f><"paginatedtabs"p><"datatablewrapper"t>',
|
||||||
"aaSorting" : [[2, "desc"]],
|
"aaSorting" : [[2, "desc"]],
|
||||||
"iDisplayLength": 10,
|
"iDisplayLength": 10,
|
||||||
"sPaginationType": "full_numbers",
|
"sPaginationType": "full_numbers",
|
||||||
|
@ -775,11 +777,18 @@ function prepareTableForDataTablePagination(jsonData){
|
||||||
$('tr>td:nth-child(1)>input').bind('click', function () { $(this).parent().parent().children().each(function(){$(this).addClass('datatablerowhighlight');}); });
|
$('tr>td:nth-child(1)>input').bind('click', function () { $(this).parent().parent().children().each(function(){$(this).addClass('datatablerowhighlight');}); });
|
||||||
$('tr>td:nth-child(1)>input').bind('click', function () { if(!$(this).is(':checked')) { $(this).parent().parent().children().each(function(){$(this).removeClass('datatablerowhighlight');});} });
|
$('tr>td:nth-child(1)>input').bind('click', function () { if(!$(this).is(':checked')) { $(this).parent().parent().children().each(function(){$(this).removeClass('datatablerowhighlight');});} });
|
||||||
}
|
}
|
||||||
|
|
||||||
// "bLengthChange": false,
|
// "bLengthChange": false,
|
||||||
// "bAutoWidth": false
|
// "bAutoWidth": false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var searchInputBox = $("." + searchBarParentContainerDIVClass).find("input[type=text]");
|
||||||
|
|
||||||
|
searchInputBox.after("<span id='reset-search' title='Clear Search query'>X</span>");
|
||||||
|
|
||||||
|
$("#reset-search").live('click', function() {
|
||||||
|
entityListTable.fnFilter("");
|
||||||
|
});
|
||||||
|
|
||||||
bindPaginatedTabsToEvents();
|
bindPaginatedTabsToEvents();
|
||||||
|
|
||||||
|
@ -837,18 +846,22 @@ function setEntityLevel(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEntityVisMode(jsonData){
|
function getEntityVisMode(jsonData){
|
||||||
$.each(jsonData, function(index, val){
|
|
||||||
|
$.each(jsonData, function(index, val) {
|
||||||
if (val.visMode == "SCHOOL" || val.visMode == "UNIVERSITY" || val.visMode == "DEPARTMENT"){
|
if (val.visMode == "SCHOOL" || val.visMode == "UNIVERSITY" || val.visMode == "DEPARTMENT"){
|
||||||
entityLevel = "Organizations";
|
entityLevel = "Organizations";
|
||||||
}else {
|
} else {
|
||||||
entityLevel = "People";
|
entityLevel = "People";
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* To provide graceful degradation set entity level to a default error message.*/
|
||||||
|
entityElevel = "ENTITY LEVEL UNDEFINED ERROR";
|
||||||
}
|
}
|
||||||
|
|
||||||
function toCamelCase(string){
|
function toCamelCase(string){
|
||||||
return (string.substr(0,1).toUpperCase() + string.substr(1, string.length-1).toLowerCase());
|
return string ? (string.substr(0,1).toUpperCase() + string.substr(1, string.length-1).toLowerCase()) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSize(map){
|
function getSize(map){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue