mail: move the next/prev page buttons to header
aligns with other ui like activity and mailbox
This commit is contained in:
@@ -82,7 +82,16 @@
|
||||
<br/>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>Event Log <button class="btn btn-sm btn-primary btn-outline pull-right" ng-click="activity.refresh()" ng-disabled="activity.busy"><i class="fa fa-sync"></i></button></h3>
|
||||
<h3>Event Log
|
||||
|
||||
<button class="btn btn-sm btn-default btn-outline pull-right" ng-click="activity.showNextPage()" ng-disabled="activity.busy || activity.perPage > activity.eventLogs.length">next <i class="fa fa-angle-double-right"></i></button>
|
||||
<button class="btn btn-sm btn-default btn-outline pull-right" ng-click="activity.showPrevPage()" ng-disabled="activity.busy || activity.currentPage <= 1"><i class="fa fa-angle-double-left"></i> prev</button>
|
||||
<button class="btn btn-sm btn-primary btn-outline pull-right" ng-click="activity.refresh()" ng-disabled="activity.busy"><i class="fa fa-sync"></i></button>
|
||||
|
||||
<!--
|
||||
<input class="form-control pull-right" style="width: 200px;" placeholder="Search" type="text" ng-model="activity.search"/>
|
||||
-->
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-bottom: 15px;">
|
||||
@@ -141,9 +150,6 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<button class="btn btn-default btn-outline" ng-click="activity.showPrevPage()" ng-disabled="activity.busy || activity.currentPage <= 1"><i class="fa fa-angle-double-left"></i> prev</button>
|
||||
<button class="btn btn-default btn-outline" ng-click="activity.showNextPage()" ng-disabled="activity.busy || activity.perPage > activity.eventLogs.length">next <i class="fa fa-angle-double-right"></i></button>
|
||||
|
||||
<a class="btn btn-primary pull-right" href="/logs.html?id=mail" target="_blank">Show Raw Logs</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,12 +16,13 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
eventLogs: [],
|
||||
activeEventLog: null,
|
||||
currentPage: 1,
|
||||
perPage: 100,
|
||||
perPage: 5,
|
||||
search: '',
|
||||
|
||||
refresh: function () {
|
||||
$scope.activity.busy = true;
|
||||
|
||||
Client.getMailEventLogs($scope.activity.currentPage, $scope.activity.perPage, function (error, result) {
|
||||
Client.getMailEventLogs($scope.activity.search, $scope.activity.currentPage, $scope.activity.perPage, function (error, result) {
|
||||
if (error) return console.error('Failed to fetch mail eventlogs.', error);
|
||||
|
||||
$scope.activity.busy = false;
|
||||
|
||||
Reference in New Issue
Block a user