Index: lams_admin/web/logevent.jsp =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r1ba327f73cb27c822d8a4ef36c386dd5a1432aef --- lams_admin/web/logevent.jsp (.../logevent.jsp) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_admin/web/logevent.jsp (.../logevent.jsp) (revision 1ba327f73cb27c822d8a4ef36c386dd5a1432aef) @@ -1,243 +1,266 @@ + + <%@ include file="/taglibs.jsp"%> - + + + + ${title} - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + +

- $(".tablesorter").each(function() { - $(this).tablesorterPager({ - processAjaxOnInit: false, - initialRows: { - total: 10, - filtered: 10 - }, - savePages: false, - container: $(this).find(".ts-pager"), - output: '{startRow} to {endRow} ({totalRows})', - cssPageDisplay: '.pagedisplay', - cssPageSize: '.pagesize', - cssDisabled: 'disabled', - ajaxUrl : "?method=getEventLog&sessionMapID=${sessionMapID}&page={page}&size={size}&{sortList:column}&{filterList:fcol}&s", - ajaxProcessing: function (data, table) { - if (data && data.hasOwnProperty('rows')) { - var rows = [], - json = {}; - - for (i = 0; i < data.rows.length; i++){ - var logData = data.rows[i]; - - rows += ''; +
+   + +   +   + + +
+ +
+ + + + + + + +
+
- rows += ''; - rows += logData['dateOccurred']; - rows += ''; + +
- rows += ''; - var typeId = logData['typeId']; - var typeDescription; - if ( typeId ) - typeDescription = typeDescriptions[typeId]; - if ( ! typeDescription ) { - // this should never occur but just in case - typeDescription = '['+typeId+']'; - } - rows += typeDescription; - rows += ''; - rows += ''; - if ( logData['userId'] ) { - rows += definePortraitPopover(logData['userPortraitId'], logData['userId'], logData['userName'], logData['userName']); - } else { - rows += '-'; - } - rows += ''; - rows += ''; - if ( logData['targetUserId'] ) { - rows += definePortraitPopover(logData['targetUserPortraitId'], logData['targetUserId'], logData['targetUserName'], logData['targetUserName']); - } else { - rows += '-'; - } - rows += ''; - - rows += ''; - var lesson = null, activity = null, description = null, lineCount = 0; - if ( logData['lessonId'] ) { - lesson = LESSON_LABEL.replace('{0}',logData['lessonName']).replace('{1}',logData['lessonId']); - lineCount++; - } - if ( logData['activityId'] ) { - activity = ACTIVITY_LABEL.replace('{0}',logData['activityName']).replace('{1}',logData['activityId']); - lineCount++; - } - if ( logData['description'] ) { - description = logData['description']; - lineCount++; - } - if ( lesson != null ) { - rows+=lesson; - if ( lineCount > 1 ) - rows+='
'; - } - if ( activity != null ) { - rows+=activity; - if ( lineCount > 1 ) - rows+='
'; - } - if ( description != null ) { - rows+=description; - } - rows += ''; - - rows += ''; - } - - json.total = data.total_rows; - json.rows = $(rows); - return json; - - } - }, - customAjaxUrl: function(table, url) { - var startDate = $("#startDatePicker").datepicker("getDate"); - if ( startDate ) - url += "&startDate="+startDate.getTime(); - var endDate = $("#endDatePicker").datepicker("getDate"); - if ( endDate ) - url += "&endDate="+endDate.getTime(); - var area = $("#areaMenu").val(); - if ( area ) - url += "&area="+area; - var typeId = $("#typeMenu").val(); - if ( typeId ) - url += "&typeId="+typeId; - return url; - }, - }) - .bind('pagerInitialized pagerComplete', function(event, options){ - if ( options.totalRows == 0 ) { - $.tablesorter.showError($(this), ''); - } else { - initializePortraitPopover('${lams}'); - } - }) - - }); - - }); // end document.ready - - function addEventType(typeId, typeDescription, areaCode, areaDescription) { - var areaTypes = areaTypeMenus[areaCode]; - if ( ! areaTypes ) { - areaTypes = []; - areaTypes.push(new Option('','')); - areaTypeMenus[areaCode] = areaTypes; - areaOptions.push(new Option(areaDescription, areaCode)); - } - areaTypes.push(new Option(typeDescription, typeId)); - typeDescriptions[typeId] = typeDescription; - } - - function configureTypeDropdown( areaCode ) { - typeMenu.length = 0; - var newTypeOptions = areaTypeMenus[areaCode]; - if ( newTypeOptions ) { - for ( i=0; i < newTypeOptions.length; i++) { - typeMenu.options[i] = newTypeOptions[i]; - } - } - typeMenu[0].selected = true; - } - - function getEvents() { - $(".tablesorter").trigger('pagerUpdate', 1); - } - - -

- -
-   - -   -   - - -
- -
- - - - - -
- - - \ No newline at end of file