Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -ra323809fb211042f18bcca38de5108100ddcb81c -r35ddd2ff17fa5c28f316465a7828106a0537511b --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision a323809fb211042f18bcca38de5108100ddcb81c) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 35ddd2ff17fa5c28f316465a7828106a0537511b) @@ -172,6 +172,7 @@ return cellhtml; } + //auxiliary formatter for jqGrid's question column function questionNameFormatter (cellvalue, options, rowObject) { var questionTypeInt = rowObject[2].textContent; @@ -205,7 +206,8 @@ var questionVersion = rowObject[3].textContent; - var text = cellvalue; + var text = cellvalue ? "" + cellvalue + "" : ""; text += ""; text += "v. " + questionVersion; text += ""; Index: lams_central/web/qb/collectionList.jsp =================================================================== diff -u -ra323809fb211042f18bcca38de5108100ddcb81c -r35ddd2ff17fa5c28f316465a7828106a0537511b --- lams_central/web/qb/collectionList.jsp (.../collectionList.jsp) (revision a323809fb211042f18bcca38de5108100ddcb81c) +++ lams_central/web/qb/collectionList.jsp (.../collectionList.jsp) (revision 35ddd2ff17fa5c28f316465a7828106a0537511b) @@ -82,7 +82,8 @@ ], colModel:[ {name:'id', index:'uid', sortable:true, width: 10}, - {name:'name', index:'name', sortable:true, search:true, autoencode:true}, + // formatter gets just question uid and creates a link + {name:'name', index:'name', sortable:true, search:true, autoencode:true, formatter: nameLinkFormatter}, {name:'questionType', index:'questionType', width:0, hidden: true}, {name:'questionVersion', index:'questionVersion', width:0, hidden: true}, {name: 'usage', index: 'usage', hidden: true}, @@ -107,6 +108,12 @@ + "\", \"_blank\")' title='Show stats'>"; } + // Creates a link to display question statistics + function nameLinkFormatter(cellValue, options) { + return cellValue ? "" + + cellValue + "" : ""; + } + // add a new collection function addCollection() { // get collection name from a pop up