Skip to content
Snippets Groups Projects
Select Git revision
  • c07f999f4cbf55164a8e792846c78d3dd7f682cf
  • master default protected
  • patch-1
  • ecma_2015
  • gulp_v4
  • upgrade_js_libs
  • Vivakvo/cesium-patch-8
  • issue_4
  • issue_780
  • gitlab_migration_1
  • dev
  • rml8
  • v1.5.3
  • v1.5.2
  • v1.5.1
  • v1.4.20
  • v1.4.19
  • v1.4.18
  • v1.4.17
  • v1.4.16
  • v1.4.15
  • v1.4.10
  • v1.4.3
  • v1.4.1
  • v1.4.0
  • v1.3.11
  • v1.3.10
  • v1.3.9
  • v1.3.8
  • v1.3.7
  • v1.3.6
  • v1.3.5
32 results

notification-controllers.js

Blame
  • Forked from clients / Cesium-grp / Cesium
    Source project has a limited visibility.
    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) {