diff --git a/_attachments/index.html b/_attachments/index.html index fd5173e..34d190f 100644 --- a/_attachments/index.html +++ b/_attachments/index.html @@ -51,7 +51,8 @@
  • Dashboard
  • -
  • Reports browser
  • +
  • Reports
  • +
  • Bugs
  • Admin
  • @@ -131,6 +132,7 @@ + diff --git a/_attachments/partials/bugs-browser.html b/_attachments/partials/bugs-browser.html index dd11498..f732369 100644 --- a/_attachments/partials/bugs-browser.html +++ b/_attachments/partials/bugs-browser.html @@ -3,7 +3,7 @@
    - +
    ' + + '', + replace: false, + compile: function compile(tElement, tAttrs, transclude) { + return { + pre: function preLink(scope, iElement, iAttrs, controller) { + scope.pageSizeList = [5, 10, 20, 50, 100]; + scope.paginator = { + pageSize: 5, + currentPage: 0 + }; + + scope.isFirstPage = function () { + return scope.paginator.currentPage === 0; + }; + scope.isLastPage = function () { + return scope.paginator.currentPage >= scope.items().length / scope.paginator.pageSize - 1; + }; + scope.incPage = function () { + if (!scope.isLastPage()) { + scope.paginator.currentPage++; + } + }; + scope.decPage = function () { + if (!scope.isFirstPage()) { + scope.paginator.currentPage--; + } + }; + scope.firstPage = function () { + scope.paginator.currentPage = 0; + }; + scope.numberOfPages = function () { + return Math.ceil(scope.items().length / scope.paginator.pageSize); + }; + scope.$watch('paginator.pageSize', function(newValue, oldValue) { + if (newValue !== oldValue) { + scope.firstPage(); + } + }); + + // ---- Functions available in parent scope ----- + + scope.$parent.firstPage = function () { + scope.firstPage(); + }; + // Function that returns the reduced items list, to use in ng-repeat + scope.$parent.pageItems = function () { + var start = scope.paginator.currentPage * scope.paginator.pageSize; + var limit = scope.paginator.pageSize; + console.log(scope.items()); + return scope.items().slice(start, start + limit); + }; + }, + post: function postLink(scope, iElement, iAttrs, controller) {} + }; + } + }; + }); })(window.acralyzerConfig, window.angular, window.jQuery, window.acralyzerEvents); diff --git a/_attachments/style/main.css b/_attachments/style/main.css index a022696..7b1e09b 100644 --- a/_attachments/style/main.css +++ b/_attachments/style/main.css @@ -262,4 +262,19 @@ report-summary .label-androidversion { .icon-phone { background-image: url(../img/device-black.png); background-position: 0px; +} + +.icon-bug-unsolved { + background-image: url(../img/bug.png); + background-position: 0px; +} + +.icon-bug-unsolved:hover, .icon-bug-solved:hover { + background-image: url(../img/bug-rollover.png); + background-position: 0px; +} + +.icon-bug-solved { + background-image: url(../img/bug-solved.png); + background-position: 0px; } \ No newline at end of file