Skip to content
Snippets Groups Projects
Select Git revision
  • c82238cbd81fa4fa38ac803ade0c5c2a705cf653
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

conf.py

Blame
  • wallet-controllers.js 1.58 KiB
    angular.module('cesium.es.wallet.controllers', ['cesium.es.services'])
    
      .config(function(PluginServiceProvider, csConfig) {
        'ngInject';
    
        var enable = csConfig.plugins && csConfig.plugins.es;
        if (enable) {
          PluginServiceProvider.extendState('app.view_wallet', {
              points: {
                'after-general': {
                  templateUrl: "plugins/es/templates/wallet/view_wallet_extend.html",
                  controller: 'ESWalletCtrl'
                }
              }
            })
          ;
        }
    
      })
    
    
      .controller('ESWalletCtrl', ESWalletController)
    
    ;
    
    function ESWalletController($scope, $controller, esModals,csWallet,UIUtils,esProfile) {
      'ngInject';
    
      // Initialize the super class and extend it.
      angular.extend(this, $controller('ESWotIdentityViewCtrl', {$scope: $scope}));
    
      /* -- modals -- */
    
      $scope.showNewPageModal = function() {
        return esModals.showNewPage();
      };
    
      $scope.deleteProfile = function(){    
            return csWallet && csWallet.auth({minData: true}) 
          .then(function(walletData) {
           UIUtils.loading.hide();
           UIUtils.alert.confirm('PROFILE.CONFIRM.DELETE')
             .then(function(confirm) {
                  if (confirm){ 
                      esProfile.remove(walletData.pubkey)
                      .then(function () {
                        $scope.formData.name=null;
                        $scope.formData.profile = null;
                        $scope.doUpdate(true);
                      UIUtils.toast.show('PROFILE.INFO.PROFILE_REMOVED');
                   }).catch(UIUtils.onError('PROFILE.ERROR.REMOVE_PROFILE_FAILED'));
                  }
                });
          });
      };
    }