diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php old mode 100644 new mode 100755 diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php old mode 100644 new mode 100755 diff --git a/Apollo/assets/images/logo.png b/Apollo/assets/images/logo.png old mode 100644 new mode 100755 diff --git a/Apollo/assets/js/controllers/reportCtrl.js b/Apollo/assets/js/controllers/reportCtrl.js old mode 100644 new mode 100755 diff --git a/Apollo/assets/js/controllers/studentViewCtrl.js b/Apollo/assets/js/controllers/studentViewCtrl.js index 1701bcb9..85c44313 100755 --- a/Apollo/assets/js/controllers/studentViewCtrl.js +++ b/Apollo/assets/js/controllers/studentViewCtrl.js @@ -71,6 +71,76 @@ app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter", }]); + +/*Header Fixed */ +app.directive('fixedHeader', function($timeout){ + return { + restrict: 'A', + link: link + }; + + function link($scope, $elem, $attrs, $ctrl) { + var elem = $elem[0]; + + // wait for data to load and then transform the table + $scope.$watch(tableDataLoaded, function(isTableDataLoaded) { + if (isTableDataLoaded) { + transformTable(); + } + }); + + function tableDataLoaded() { + // first cell in the tbody exists when data is loaded but doesn't have a width + // until after the table is transformed + var firstCell = elem.querySelector('tbody tr:first-child td:first-child'); + return firstCell && !firstCell.style.width; + } + + function transformTable() { + // reset display styles so column widths are correct when measured below + angular.element(elem.querySelectorAll('thead, tbody')).css('display', ''); + + // wrap in $timeout to give table a chance to finish rendering + $timeout(function () { + // set widths of columns + angular.forEach(elem.querySelectorAll('tr:first-child th'), function (thElem, i) { + + var tdElems = elem.querySelector('tbody tr:first-child td:nth-child(' + (i + 1) + ')'); + var tfElems = elem.querySelector('tfoot tr:first-child td:nth-child(' + (i + 1) + ')'); + + var columnWidth = tdElems ? tdElems.offsetWidth : thElem.offsetWidth; + if (tdElems) { + tdElems.style.width = columnWidth + '150px'; + } + if (thElem) { + thElem.style.width = columnWidth + '150px'; + } + + }); + + // set css styles on thead and tbody + angular.element(elem.querySelectorAll('thead, tfoot')).css('display', 'block'); + + angular.element(elem.querySelectorAll('tbody')).css({ + 'display': 'block', + 'height': $attrs.tableHeight || 'inherit', + 'overflow': 'auto' + }); + + // reduce width of last column by width of scrollbar + var tbody = elem.querySelector('tbody'); + var scrollBarWidth = tbody.offsetWidth - tbody.clientWidth; + if (scrollBarWidth > 0) { + // for some reason trimming the width by 2px lines everything up better + scrollBarWidth -= 2; + var lastColumn = elem.querySelector('tbody tr:first-child td:last-child'); + lastColumn.style.width = (lastColumn.offsetWidth - scrollBarWidth) + 'px'; + } + }); + } + } +}); + /*modal controller * */ app.controller('FeesModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", function ($scope, $rootScope, $modal, $log) { diff --git a/Apollo/assets/views/partials/sidebar.html b/Apollo/assets/views/partials/sidebar.html index 0af8683d..377b562a 100755 --- a/Apollo/assets/views/partials/sidebar.html +++ b/Apollo/assets/views/partials/sidebar.html @@ -1,3 +1,3 @@ - + diff --git a/Apollo/assets/views/partials/top-navbar.html b/Apollo/assets/views/partials/top-navbar.html index 86e1419b..8271fd51 100755 --- a/Apollo/assets/views/partials/top-navbar.html +++ b/Apollo/assets/views/partials/top-navbar.html @@ -6,10 +6,10 @@ - {{app.name}} + {{app.name}} - {{app.name}} + {{app.name}} diff --git a/Apollo/assets/views/report_certificate_status.html b/Apollo/assets/views/report_certificate_status.html old mode 100644 new mode 100755 diff --git a/Apollo/assets/views/report_expense.html b/Apollo/assets/views/report_expense.html old mode 100644 new mode 100755 diff --git a/Apollo/assets/views/report_mark_certificate_status.html b/Apollo/assets/views/report_mark_certificate_status.html old mode 100644 new mode 100755 diff --git a/Apollo/assets/views/report_markcardstatus.html b/Apollo/assets/views/report_markcardstatus.html old mode 100644 new mode 100755 diff --git a/Apollo/assets/views/report_studymaterialstatus.html b/Apollo/assets/views/report_studymaterialstatus.html old mode 100644 new mode 100755 diff --git a/Apollo/assets/views/student/studentView.html b/Apollo/assets/views/student/studentView.html index 8afde980..d0b26955 100755 --- a/Apollo/assets/views/student/studentView.html +++ b/Apollo/assets/views/student/studentView.html @@ -247,13 +247,13 @@ -
+
- +
@@ -449,13 +449,13 @@ -
+
-
Sem/Year
+
@@ -499,13 +499,13 @@ -
+
-
+
@@ -571,13 +571,13 @@ -
+
-
Sem/Year
+
diff --git a/Apollo/bower_components/ng-table-excel-export/alasql.js b/Apollo/bower_components/ng-table-excel-export/alasql.js old mode 100644 new mode 100755 diff --git a/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.js b/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.js old mode 100644 new mode 100755 diff --git a/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.min b/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.min old mode 100644 new mode 100755 diff --git a/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.min.js b/Apollo/bower_components/ng-table-excel-export/ng-table-excel-export.min.js old mode 100644 new mode 100755
Sem/Year