Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
Cesium
Commits
a84f2079
Commit
a84f2079
authored
7 years ago
by
ArnaudCerisier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] wot identity : dowload the account statement
parent
ce0d6da2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!486
[enh] wot identity : Improved rendering and adding dowload the account statement
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
www/js/controllers/wot-controllers.js
+25
-10
25 additions, 10 deletions
www/js/controllers/wot-controllers.js
www/js/services/tx-services.js
+3
-0
3 additions, 0 deletions
www/js/services/tx-services.js
www/templates/wot/view_identity_tx.html
+36
-11
36 additions, 11 deletions
www/templates/wot/view_identity_tx.html
with
64 additions
and
21 deletions
www/js/controllers/wot-controllers.js
+
25
−
10
View file @
a84f2079
...
...
@@ -902,34 +902,49 @@ function WotIdentityViewController($scope, $rootScope, $controller, $timeout, UI
/**
* Identity tx view controller
*/
function
WotIdentityTxViewController
(
$q
,
$scope
,
$
filter
,
$translate
,
csTx
,
FileSaver
,
gpColor
,
BMA
,
UIUtils
)
{
function
WotIdentityTxViewController
(
$scope
,
$
timeout
,
csSettings
,
$controller
,
csTx
,
csWallet
,
BMA
,
UIUtils
)
{
'
ngInject
'
;
// Initialize the super class and extend it.
angular
.
extend
(
this
,
$controller
(
'
WotIdentityAbstractCtrl
'
,
{
$scope
:
$scope
}));
$scope
.
formData
=
{};
$scope
.
loading
=
true
;
$scope
.
motion
=
UIUtils
.
motion
.
fadeSlideInRight
;
$scope
.
$on
(
'
$ionicView.enter
'
,
function
(
e
,
state
)
{
$scope
.
formData
=
{
name
:
state
.
stateParams
.
name
,
uid
:
state
.
stateParams
.
uid
,
pubkey
:
state
.
stateParams
.
pubkey
};
$scope
.
pubkey
=
state
.
stateParams
.
pubkey
;
$scope
.
uid
=
state
.
stateParams
.
uid
;
// Load account TX data
csTx
.
load
(
$scope
.
formData
.
pubkey
)
csTx
.
load
(
$scope
.
pubkey
)
.
then
(
function
(
result
)
{
console
.
log
(
result
);
// Allow to discover data structure
if
(
result
&&
result
.
tx
&&
result
.
tx
.
history
)
{
$scope
.
items
=
result
.
tx
.
history
;
$scope
.
tx
=
result
.
tx
;
$scope
.
history
=
result
.
tx
.
history
;
}
$scope
.
balance
=
result
.
balance
;
$scope
.
load
(
$scope
.
pubkey
,
true
,
$scope
.
uid
)
.
then
(
function
(){
$scope
.
motion
.
show
();
$scope
.
loading
=
false
;
});
});
});
$scope
.
downloadHistoryFile
=
function
(
options
)
{
options
=
options
||
{};
options
.
fromTime
=
options
.
fromTime
||
-
1
;
// default: full history
csTx
.
downloadHistoryFile
(
$scope
.
pubkey
,
options
);
};
//TODO :
};
/**
* Certifications controller - extend WotIdentityAbstractCtrl
*/
...
...
This diff is collapsed.
Click to expand it.
www/js/services/tx-services.js
+
3
−
0
View file @
a84f2079
...
...
@@ -169,6 +169,8 @@ angular.module('cesium.tx.services', ['ngApi', 'cesium.bma.services',
}
// get UD history
// FIXME issue#232
/*
if (csSettings.data.showUDHistory) {
jobs.push(
BMA.ud.history({pubkey: pubkey})
...
...
@@ -186,6 +188,7 @@ angular.module('cesium.tx.services', ['ngApi', 'cesium.bma.services',
}, []);
}));
}
*/
// Execute jobs
$q
.
all
(
jobs
)
...
...
This diff is collapsed.
Click to expand it.
www/templates/wot/view_identity_tx.html
+
36
−
11
View file @
a84f2079
...
...
@@ -8,13 +8,24 @@
<ion-content>
<!-- buttons bar -->
<div
class=
"center padding"
>
<div
class=
"buttons"
>
<button
class=
"button button-balanced icon-left icon ion-archive"
ng-click=
"onExportButtonClick()"
>
{{'RML9.BTN_EXPORT' | translate}}
<div
class=
"hidden-xs hidden-sm padding text-center"
ng-if=
"!loading"
>
<button
class=
"button button-stable button-small-padding icon ion-loop ink"
ng-click=
"doUpdate()"
title=
"{{'COMMON.BTN_REFRESH' | translate}}"
>
</button>
<button
class=
"button button-stable button-small-padding icon ion-android-download ink"
ng-click=
"downloadHistoryFile()"
title=
"{{'COMMON.BTN_DOWNLOAD_ACCOUNT_STATEMENT' | translate}}"
>
</button>
<cs-extension-point
name=
"buttons"
></cs-extension-point>
</div>
<div
class=
"center padding"
ng-if=
"loading"
>
<ion-spinner
icon=
"android"
></ion-spinner>
</div>
<div
class=
"list {{motion.ionListClass}}"
ng-if=
"!loading"
>
...
...
@@ -26,17 +37,31 @@
<div
class=
"col"
>
<!-- the balance -->
<div
class=
"item"
>
<div
class=
"item
item-divider item-tx
"
>
{{'RML9.VIEW.BALANCE'|translate}}
<div
class=
"badge badge-
c
al
m
"
>
<div
class=
"badge badge-
b
al
anced
"
>
{{balance|formatAmount}}
<span
ng-bind-html=
"$root.currency.name|currencySymbol"
></span>
</div>
</div>
<span
class=
"item item-divider"
ng-if=
"!loading"
>
{{:locale:'ACCOUNT.LAST_TX'|translate}}
<a
id=
"helptip-wallet-tx"
style=
"position: relative; bottom: 0; right: 0px;"
>
</a>
</span>
<!-- iterate on each TX -->
<div
class=
"item item-tx item-icon-left"
ng-repeat=
"tx in items"
ng-include=
"'templates/wallet/view_tx.html'"
>
ng-repeat=
"tx in history"
ng-include=
"'templates/wallet/item_tx.html'"
>
</div>
<div
class=
"item item-text-wrap text-center"
ng-if=
"tx.fromTime > 0"
>
<p>
<a
ng-click=
"showMoreTx()"
>
{{:locale:'ACCOUNT.SHOW_MORE_TX'|translate}}
</a>
<span
class=
"gray"
translate=
"ACCOUNT.TX_FROM_DATE"
translate-values=
"{fromTime: tx.fromTime}"
></span>
<span
class=
"gray"
>
|
</span>
<a
ng-click=
"showMoreTx(-1)"
translate
>
ACCOUNT.SHOW_ALL_TX
</a>
</p>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment