Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit b7169b3

Browse files
committed
item and order
1 parent aae2888 commit b7169b3

File tree

7 files changed

+17
-16
lines changed

7 files changed

+17
-16
lines changed

css/obBase.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ label.fieldItem {
707707
}
708708

709709
[class |= "flexCol"] > .fieldItem {
710-
margin: 0 -1px -1px 0;
710+
margin: 0 -2px -2px 0; /* prevent collum overflows */
711711
}
712712

713713
.table {

js/languages/en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
"ReturnPolicyPlaceholder": "Enter return policy...",
9696
"CategoryPlaceholder": "Enter category",
9797
"CategoryHelperText": "Categories are used to group and organize listing within your store.",
98-
"KeywordsHelperText": "Adding tags helps your listing to be discovered in the market. You can only have one of each tag, and a maximum of 10 tags",
98+
"KeywordsPlaceholder": "Enter One or More Tags",
99+
"KeywordsHelperText": "Adding tags helps your listing to be discovered in the market. You can only have one of each tag, and a maximum of 10 tags, separated by commas or the enter key.",
99100
"ExpirationDateHelperText": "Set a date for the listing to automatically be pulled from your store.",
100101
"ClearExpirationDate": "Clear Expiration Date",
101102
"ReturnPolicy": "Return Policy",

js/models/itemMd.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var __ = require('underscore'),
22
Backbone = require('backbone'),
33
getBTPrice = require('../utils/getBitcoinPrice'),
4+
app = require('../App').getApp(),
45
countriesMd = require('./countriesMd'),
56
autolinker = require( '../utils/customLinker');
67

@@ -246,21 +247,21 @@ module.exports = window.Backbone.Model.extend({
246247
newAttributes.internationalShippingBTC = vendorInternationalShippingInBitCoin;
247248

248249
if(userCCode != 'BTC'){
249-
newAttributes.price = (vendorPrice*vendToUserBTCRatio).toFixed(2);
250+
newAttributes.price = vendorPrice*vendToUserBTCRatio;
250251
newAttributes.displayPrice = new Intl.NumberFormat(window.lang, {
251252
style: 'currency',
252253
minimumFractionDigits: 2,
253254
maximumFractionDigits: 2,
254255
currency: userCCode
255256
}).format(newAttributes.price);
256-
newAttributes.domesticShipping = (vendorDomesticShipping*vendToUserBTCRatio).toFixed(2);
257+
newAttributes.domesticShipping = vendorDomesticShipping*vendToUserBTCRatio;
257258
newAttributes.displayDomesticShipping = new Intl.NumberFormat(window.lang, {
258259
style: 'currency',
259260
minimumFractionDigits: 2,
260261
maximumFractionDigits: 2,
261262
currency: userCCode
262263
}).format(newAttributes.domesticShipping);
263-
newAttributes.internationalShipping = (vendorInternationalShipping*vendToUserBTCRatio).toFixed(2);
264+
newAttributes.internationalShipping = vendorInternationalShipping*vendToUserBTCRatio;
264265
newAttributes.displayInternationalShipping = new Intl.NumberFormat(window.lang, {
265266
style: 'currency',
266267
minimumFractionDigits: 2,
@@ -269,11 +270,11 @@ module.exports = window.Backbone.Model.extend({
269270
}).format(newAttributes.internationalShipping);
270271
} else {
271272
newAttributes.price = vendorPriceInBitCoin;
272-
newAttributes.displayPrice = vendorPriceInBitCoin.toFixed(4) + " BTC";
273+
newAttributes.displayPrice = app.intlNumFormat(vendorPriceInBitCoin, 4) + " BTC";
273274
newAttributes.domesticShipping = vendorDomesticShippingInBitCoin;
274-
newAttributes.displayDomesticShipping = vendorDomesticShippingInBitCoin.toFixed(4) + " BTC";
275+
newAttributes.displayDomesticShipping = app.intlNumFormat(vendorDomesticShippingInBitCoin, 4) + " BTC";
275276
newAttributes.internationalShipping = vendorInternationalShippingInBitCoin;
276-
newAttributes.displayInternationalShipping = vendorInternationalShippingInBitCoin.toFixed(4) + " BTC";
277+
newAttributes.displayInternationalShipping = app.intlNumFormat(vendorInternationalShippingInBitCoin, 4) + " BTC";
277278
}
278279
//set to random so a change event is always fired
279280
newAttributes.priceSet = Math.random();

js/models/itemShortMd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var __ = require('underscore'),
22
Backbone = require('backbone'),
3+
app = require('../App').getApp(),
34
getBTPrice = require('../utils/getBitcoinPrice');
45

56
module.exports = Backbone.Model.extend({
@@ -50,7 +51,7 @@ module.exports = Backbone.Model.extend({
5051
vendorBitCoinPrice = Number(vendorPrice / btAve);
5152
//if vendor and user currency codes are the same, multiply by one to avoid rounding errors
5253
vendToUserBTCRatio = (userCCode == vendorCCode) ? 1 : window.currentBitcoin/vendorCurrencyInBitcoin;
53-
newAttributes.vendorBTCPrice = vendorBitCoinPrice.toFixed(4);
54+
newAttributes.vendorBTCPrice = vendorBitCoinPrice;
5455

5556
if(userCCode != 'BTC'){
5657
newAttributes.displayPrice = new Intl.NumberFormat(window.lang, {
@@ -60,7 +61,7 @@ module.exports = Backbone.Model.extend({
6061
currency: userCCode
6162
}).format(vendorPrice*vendToUserBTCRatio);
6263
} else {
63-
newAttributes.displayPrice = vendorBitCoinPrice.toFixed(4) + " BTC";
64+
newAttributes.displayPrice = app.intlNumFormat(vendorBitCoinPrice, 4) + " BTC";
6465
}
6566
//set to random so a change event is always fired
6667
newAttributes.priceSet = Math.random();

js/models/orderShortMd.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var __ = require('underscore'),
2-
Backbone = require('backbone');
2+
Backbone = require('backbone'),
3+
app = require('../App').getApp();
34

45
module.exports = window.Backbone.Model.extend({
56
defaults: {
@@ -25,10 +26,7 @@ module.exports = window.Backbone.Model.extend({
2526
maximumFractionDigits: 2,
2627
currency: response.cCode
2728
}).format(response.btc_total*response.btAve);
28-
} else {
29-
response.displayPrice = response.btc_total.toFixed(4) + " BTC";
3029
}
31-
3230
return response;
3331
}
3432
});

js/views/buyDetailsVw.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ module.exports = Backbone.View.extend({
2929
currentShippingBTCPrice = 0,
3030
shippingType = "",
3131
templJSON = {};
32-
console.log(this.model)
3332

3433
//set prices before each render
3534
if(this.model.get('vendor_offer').listing.shipping.free !== true && this.model.get('selectedAddress')) {

js/views/itemEditVw.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ module.exports = baseVw.extend({
193193
self.inputKeyword = new Taggle('inputKeyword', {
194194
tags: keywordTags,
195195
preserveCase: true,
196-
saveOnBlur: true
196+
saveOnBlur: true,
197+
placeholder: polyglot.t('KeywordsPlaceholder')
197198
});
198199
},0);
199200

0 commit comments

Comments
 (0)