Select Git revision
notification-controllers.js
Forked from
clients / Cesium-grp / Cesium
Source project has a limited visibility.
-
Benoit Lavenier authoredBenoit Lavenier authored
notification-controllers.js 9.16 KiB
angular.module('cesium.es.notification.controllers', ['cesium.es.services'])
.config(function($stateProvider) {
'ngInject';
$stateProvider
.state('app.view_notifications', {
url: "/notifications",
views: {
'menuContent': {
templateUrl: "plugins/es/templates/notification/view_notifications.html",
controller: 'NotificationsCtrl'
}
},
data: {
login: true
}
})
.state('app.view_notifications_by_id', {
url: "/wallets/:id/notifications",
views: {
'menuContent': {
templateUrl: "plugins/es/templates/notification/view_notifications.html",
controller: 'NotificationsCtrl'
}
},
data: {
login: true
}
})
;
})
.controller('NotificationsCtrl', NotificationsController)
.controller('PopoverNotificationsCtrl', PopoverNotificationsController)
;
function NotificationsController($scope, $ionicPopover, $state, $timeout, UIUtils, esHttp, csWallet, esNotification) {
'ngInject';
var defaultSearchLimit = 40;
$scope.preventSelect = false;
$scope.search = {
loading : true,
results: null,
hasMore : false,
loadingMore : false,
limit: defaultSearchLimit,
options: {
codes: {
excludes: esNotification.constants.EXCLUDED_CODES
}
}
};
$scope.listeners = [];
var wallet;
$scope.setWallet = function(aWallet) {
wallet = aWallet;
};
$scope.$on('$ionicView.enter', function(e, state) {
if ($scope.search.loading) {