function set_header_row(cols,classes,footer,container)
{	var c_ele = "#view_table";
	if (typeof container !== 'undefined')
		c_ele = container;
	$(c_ele+" thead tr").empty();
	if(footer)
	{	
		$("<tr>").prependTo(c_ele+" tfoot");
	}
	$.each(cols,function(key,val){
		if(typeof val=='object')
			val=key;
		var th=$("<th>",{html:val});
		if(classes && typeof classes=='object' && typeof classes[key]!='undefined')
			th.addClass(classes[key]);
		th.appendTo(c_ele+" thead tr");
		if(footer)
			$("<th>",{html:val}).appendTo(c_ele+" tfoot tr:first-child");
	});
	$(c_ele + " .ts-pager").prop('colspan',count(cols));
	initViewTable(c_ele + " table.tablesorter");
}
function count(obj) {
   var count=0;
   for(var prop in obj) {
      if (obj.hasOwnProperty(prop)) {
         ++count;
      }
   }
   return count;
}
function updateViewTable(container)
{	var con = "#view_table";
	if(typeof container !== 'undefined')
		con = container;
	$(con + " table.tablesorter").trigger("update");
	$(con + " table.tablesorter").trigger("applyWidgets");
	var p=$("<i>",{class:"glyphicon glyphicon-filter"});
	$(con + " .tablesorter-filter").addClass("form-control").wrap("<div class='input-filter-wrapper'></div>").parent().append(p);
}
function fillViewTable(master,data,cols,data_attr,modifiers,callback,method)
{	$("#view_table tbody").empty();
	if(typeof method == 'undefined')
		var method = "POST";
	$.ajax({
		type: method,
		url: getUrl+master,
		"data": data,
		datatype: "JSON",
		success: function(data){
			if(data[0].hasOwnProperty("req_aborted"))
			{	alert(data[0].error);
			}
			else
			{	
				$.each(data,function(key,val){
					var p=$("<tr>").appendTo("#view_table tbody");
					$.each(cols,function(k,v){
						if(typeof v=='object')
						{	
							var value="";
							$.each(v,function(i,j){
								if(val[j]!=null)
									value+=val[j]+" ";
							});
						}
						else
							var value=val[k];
						if(typeof modifiers=='object' && typeof modifiers[k]!='undefined')
						{	
							value=modifiers[k][val[k]];
						}
						$("<td>",{html:value}).appendTo(p);
					});
					$.each(data_attr,function(k,v){
						p.data(v,val[v]);
					});
				});
			}
		}
	}).done(function(){
		updateViewTable();
		$("#view_table table colgroup").remove();
		var access = master.toLowerCase() + "_access";
		if(json_rights.hasOwnProperty(access) && json_rights[access].charAt(2)=='1')
		{	
			$("#view_table tbody tr").each(function(){
				$(this).addClass('cursor-pointer');
				$(this).attr('title','Double click to edit');
				$(this).tooltip({track:true});
			});
			$("#view_table").on("dblclick","tbody tr",function(){
				var id=$(this).data(data_attr[0]);
				var QS=$.addUrlVar('id',id,true);
				$.changeUrlVar('act','update',QS);
			});
		}
        typeof callback === "function" && callback();
	}).fail(function(){
		alert("Some error occured!!");
	});
}
@@ -617,16 +617,26 @@
 n',count
+Properties
 (cols));
@@ -701,16 +701,26 @@
 on count
+Properties
 (obj) %7B%0D
@@ -1426,20 +1426,16 @@
 ed')%0D%0A%09%09
-var 
 method =
@@ -1444,16 +1444,16 @@
 POST%22;%0D%0A
+
 %09$.ajax(
@@ -1651,24 +1651,37 @@
 %09else%0D%0A%09%09%09%7B%09
+var value=%22%22;
 %0D%0A%09%09%09%09$.each
@@ -1841,24 +1841,22 @@
 %09%09%09%09%09%09va
-r value=
+lue = 
 %22%22;%0D%0A%09%09%09
@@ -1976,19 +1976,15 @@
 se%0D%0A
+
 %09%09%09%09%09%09%09
-var 
 valu

fix scrutinizer issues in view_table.js