Skip to content

Commit ec7d11c

Browse files
committed
- popover unit: fix width, and use filter to format units
- ES Market: allow to buy a market record on small device - fix #216 - ES Market: fix price conversion and price display unit
1 parent bac0f8d commit ec7d11c

File tree

19 files changed

+213
-148
lines changed

19 files changed

+213
-148
lines changed

app/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"timeWarningExpire": 7776000,
174174
"useLocalStorage": true,
175175
"useRelative": true,
176-
"initPhase": true,
176+
"initPhase": false,
177177
"expertMode": true,
178178
"helptip": {
179179
"enable": false,

scss/ionic.app.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,19 @@ $screen-menu: 845px;
545545

546546
}
547547

548+
/**********
549+
Unit popover
550+
**********/
551+
552+
.popover-unit {
553+
height: 108px;
554+
max-width: 115px;
555+
}
556+
557+
/**********
558+
Notifications view
559+
**********/
560+
548561
.view-notification {
549562

550563
.item.unread {
@@ -563,6 +576,8 @@ $screen-menu: 845px;
563576
}
564577
}
565578

579+
580+
566581
/* ============
567582
Buttons
568583
=============== */
@@ -1592,6 +1607,7 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0";
15921607
font-size: 12px;
15931608
font-style: italic;
15941609
top: 37px !important;
1595-
right: 25px !important;
15961610
font-weight: normal !important;
1611+
margin-right: 0px;
1612+
padding-right: 0px;
15971613
}

www/css/ionic.app.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14080,6 +14080,16 @@ a {
1408014080
top: 12px;
1408114081
left: 10px; }
1408214082

14083+
/**********
14084+
Unit popover
14085+
**********/
14086+
.popover-unit {
14087+
height: 108px;
14088+
max-width: 115px; }
14089+
14090+
/**********
14091+
Notifications view
14092+
**********/
1408314093
.view-notification .item.unread {
1408414094
background-color: #ecf0f7 !important;
1408514095
border-color: #dddfe2 !important; }
@@ -14906,5 +14916,6 @@ a.underline:hover,
1490614916
font-size: 12px;
1490714917
font-style: italic;
1490814918
top: 37px !important;
14909-
right: 25px !important;
14910-
font-weight: normal !important; }
14919+
font-weight: normal !important;
14920+
margin-right: 0px;
14921+
padding-right: 0px; }

www/css/ionic.app.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/css/style.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@
157157
background-color: #f5f5f5;
158158
}
159159

160-
#unitPopover {
161-
height: 108px;
162-
}
163160

164161
.no-margin {
165162
margin: 0 !important;

www/js/app.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
3434
return;
3535
}
3636
var amount = input / currentUD;
37-
if (Math.abs(amount) < minValue) return '~ 0';
38-
amount = numeral(amount).format(format);
37+
if (Math.abs(amount) < minValue) {
38+
amount = '~ 0';
39+
}
40+
else {
41+
amount = numeral(amount).format(format);
42+
}
3943
if (options && options.currency) {
4044
return amount + ' ' + $filter('currencySymbol')(options.currency, true);
4145
}
@@ -67,6 +71,16 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
6771
};
6872
})
6973

74+
.filter('currencySymbolNoHtml', function($rootScope, $filter, csSettings) {
75+
return function(input, useRelative) {
76+
if (!input) return '';
77+
return (angular.isDefined(useRelative) ? useRelative : csSettings.data.useRelative) ?
78+
($rootScope.translations.UD + ' ' + $filter('abbreviate')(input)) :
79+
$filter('abbreviate')(input);
80+
};
81+
})
82+
83+
7084
.filter('formatDecimal', function(csConfig, $rootScope) {
7185
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
7286
var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');

www/js/config.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,35 @@ angular.module("cesium.config", [])
1010

1111
.constant("csConfig", {
1212
"cacheTimeMs": 60000,
13-
"fallbackLanguage": "en",
14-
"rememberMe": false,
13+
"fallbackLanguage": "fr-FR",
14+
"defaultLanguage": "fr-FR",
15+
"rememberMe": true,
1516
"showUDHistory": false,
16-
"timeout": 10000,
17+
"timeout": 6000,
1718
"timeWarningExpireMembership": 5184000,
1819
"timeWarningExpire": 7776000,
1920
"useLocalStorage": true,
2021
"useRelative": true,
21-
"initPhase": false,
22-
"expertMode": false,
23-
"decimalCount": 4,
24-
"compatProtocol_0_80": true,
22+
"initPhase": true,
23+
"expertMode": true,
2524
"helptip": {
26-
"enable": true,
27-
"installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
25+
"enable": false,
26+
"installDocUrl": {
27+
"fr-FR": "http://www.le-sou.org/devenir-noeud/",
28+
"en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
29+
}
2830
},
2931
"node": {
30-
"host": "cgeek.fr",
31-
"port": "9330"
32+
"host": "fakenet.cgeek.fr",
33+
"port": "10900"
3234
},
3335
"plugins": {
3436
"es": {
35-
"enable": true,
37+
"enable": false,
3638
"askEnable": false,
37-
"host": "data.duniter.fr",
38-
"port": "80",
39+
"host": "localhost",
40+
"port": 9200,
41+
"wsPort": 9400,
3942
"notifications": {
4043
"txSent": true,
4144
"txReceived": true,
@@ -45,7 +48,7 @@ angular.module("cesium.config", [])
4548
}
4649
},
4750
"version": "0.9.5",
48-
"build": "2017-01-16T11:25:54.878Z",
51+
"build": "2017-01-16T12:53:56.991Z",
4952
"newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug"
5053
})
5154

www/plugins/es/i18n/locale-en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"COMMON": {
116116
"PRICE": "Price",
117117
"BTN_BUY": "Buy",
118+
"BTN_BUY_DOTS": "Buy...",
118119
"BTN_NEW_AD": "New ad"
119120
},
120121
"SEARCH": {

www/plugins/es/i18n/locale-fr-FR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"COMMON": {
116116
"PRICE": "Prix",
117117
"BTN_BUY": "Acheter",
118+
"BTN_BUY_DOTS": "Acheter...",
118119
"BTN_NEW_AD": "je dépose une annonce"
119120
},
120121
"SEARCH": {

0 commit comments

Comments
 (0)