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

Commit 6e70da7

Browse files
committed
Merge remote-tracking branch 'upstream' into server-configs
2 parents 1c58763 + 27adfff commit 6e70da7

30 files changed

+677
-141
lines changed

css/obBase.css

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,32 @@ form {
477477
flex-grow: 1;
478478
}
479479

480+
.listingType {
481+
background-color: #252525;
482+
color: #ffffff;
483+
position: absolute;
484+
padding: 6px;
485+
top: 40px;
486+
right: 40px;
487+
font-size: 11px;
488+
font-weight: 500;
489+
transition: top .3s cubic-bezier(0, 0, 0.2, 1);
490+
}
491+
492+
.listingDoesNotShipToYou {
493+
background-color: rgba(37, 37, 37, 0.65);
494+
/*border-radius: 20px;*/
495+
height: 20px;
496+
left: 32px;
497+
line-height: 20px;
498+
padding: 8px 4px;
499+
position: absolute;
500+
text-align: center;
501+
top: calc(50% - 32px);
502+
width: 242px;
503+
transition: top .3s cubic-bezier(0, 0, 0.2, 1);
504+
}
505+
480506
.noPointerEvents {
481507
pointer-events: none;
482508
}
@@ -533,6 +559,17 @@ form {
533559
padding-top: 20px;
534560
}
535561

562+
.userPage-subViews .gridItem:hover > .listingType,
563+
.homeView .gridItem:hover > .listingType {
564+
opacity: 1;
565+
top: 26px;
566+
}
567+
568+
.userPage-subViews .gridItem:hover > .listingDoesNotShipToYou,
569+
.homeView .gridItem:hover > .listingDoesNotShipToYou {
570+
top: calc(50% - 46px);
571+
}
572+
536573
.userPage-subViews .gridItem:hover .gridItemControls,
537574
.homeView .gridItem:hover .gridItemControls{
538575
opacity: 1;
@@ -707,7 +744,7 @@ label.fieldItem {
707744
}
708745

709746
[class |= "flexCol"] > .fieldItem {
710-
margin: 0 -1px -1px 0;
747+
margin: 0 -2px -2px 0; /* prevent collum overflows */
711748
}
712749

713750
.table {
@@ -4045,6 +4082,14 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
40454082
top: 100%;
40464083
}
40474084
4085+
.tooltip.tooltip-box2:hover:after {
4086+
height: auto;
4087+
width: 200px;
4088+
white-space: normal;
4089+
bottom: auto;
4090+
top: 100%;
4091+
}
4092+
40484093
.tooltip.tooltip-box.tooltip-boxUp:hover:after {
40494094
bottom: 120%;
40504095
}
@@ -4313,7 +4358,53 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
43134358
43144359
}
43154360
4316-
/* protect customize controls from custom page styles */
4361+
.violatorTR {
4362+
/* sets triangle to be in the top right corner */
4363+
/* must be given equal height and width properties */
4364+
/* text or icons inside the violator should have positionTopRight and a right and top margin or padding based on the violator size */
4365+
position: absolute;
4366+
top: 0;
4367+
right: 0;
4368+
-webkit-clip-path: polygon(50% 0, 100% 0, 100% 50%);
4369+
z-index: 1; /* this shouldn't need to be higher. Make it the last element in its container */
4370+
text-align: center;
4371+
}
4372+
4373+
.violator1 {
4374+
width: 50px;
4375+
height: 50px;
4376+
background: #215175; /* this should be overridden with a color class */
4377+
color: #fff;
4378+
}
4379+
4380+
.violatorTxt{
4381+
/* use on content of a violator to rotate it to match the violator */
4382+
display: block;
4383+
transform: rotate(45deg);
4384+
}
4385+
4386+
.listingTypeDigital:before {
4387+
color: #EFEF4C;
4388+
content: "\f137";
4389+
font-family: Ionicons;
4390+
font-size: 12px;
4391+
}
4392+
4393+
.listingTypePhysical:before {
4394+
color: #805C17;
4395+
content: "\f318";
4396+
font-family: Ionicons;
4397+
font-size: 12px;
4398+
}
4399+
4400+
.listingTypeService:before {
4401+
color: #DEDEDE;
4402+
content: "\f2ad";
4403+
font-family: Ionicons;
4404+
font-size: 12px;
4405+
}
4406+
4407+
/* protect customize controls from custom page styles */
43174408
#ov1 #customizeControls .labelWrap {
43184409
height: 40px;
43194410
border-radius: 0;
@@ -4569,11 +4660,13 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
45694660
#ov1 .positionBottom {
45704661
position: absolute;
45714662
bottom: 0;
4663+
right: 0;
45724664
}
45734665

45744666
#ov1 .positionTop {
45754667
position: absolute;
45764668
top: 0;
4669+
right: 0;
45774670
}
45784671

45794672
#ov1 .positionTopRight {

imgs/helpdesk-icon.png

20.7 KB
Loading

js/App.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ App.prototype.setUnreadChatMessageCount = function(count) {
123123
}
124124
};
125125

126+
App.prototype.intlNumFormat = function(numberToFormat, maxDigits){
127+
return new Intl.NumberFormat(window.lang, {maximumFractionDigits: maxDigits}).format(numberToFormat);
128+
};
129+
126130
App.getApp = function() {
127131
if (!_app) {
128132
throw new Error('The app instance was never instantiated and is therefore not available.');
@@ -131,4 +135,4 @@ App.getApp = function() {
131135
return _app;
132136
};
133137

134-
module.exports = App;
138+
module.exports = App;

js/languages/en-US.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"ViewListing": "View Listing",
5151
"Unfollow": "Unfollow",
5252
"ConfirmUnfollow": "Confirm Unfollow",
53+
"AddModerator": "Add as Moderator",
54+
"RemoveModerator": "Remove as Moderator",
5355
"About": "About",
5456
"Version": "Version %{version}",
5557
"NoDescriptionAdded": "No description added",
@@ -96,7 +98,8 @@
9698
"ReturnPolicyPlaceholder": "Enter return policy...",
9799
"CategoryPlaceholder": "Enter category",
98100
"CategoryHelperText": "Categories are used to group and organize listing within your store.",
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",
101+
"KeywordsPlaceholder": "Enter One or More Tags",
102+
"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.",
100103
"ExpirationDateHelperText": "Set a date for the listing to automatically be pulled from your store.",
101104
"ClearExpirationDate": "Clear Expiration Date",
102105
"ReturnPolicy": "Return Policy",
@@ -232,7 +235,9 @@
232235
"SearchForCategory": "Search for category",
233236
"Moderators": "Moderators",
234237
"CurrentModerators": "Current Moderators",
235-
"AddModerators": "Add New Moderators",
238+
"AddModerators": "Add Moderators",
239+
"ManualAddModerator": "Add Moderators by GUID",
240+
"ManualAddModeratorHelp": "Enter the GUIDs of one or more moderators, separated by commas, here. The GUID is on the right side of their About tab on their page. Adding the GUID of a user that is not a moderator will have no effect, that GUID will be ignored.",
236241
"DeselectToRemoveModerator": "Deselect the moderators you want to remove",
237242
"SelectToAddModerator": "Select the moderators you want to add",
238243
"Categories": "Categories",
@@ -325,10 +330,11 @@
325330
"ServerChangeWarningHeadline": "Caution: Record Your Settings",
326331
"ServerChangeWarning": "We recommend you make a copy of your previous settings, shown below. Your previous username and password will no longer be available beyond this point.",
327332
"ModeratorFee": "Fee:",
328-
"PriceForOne": "Price per single item, file, or service.",
333+
"PriceForOne": "Price per single item, file, or service. Based on the listing's base price and the current exchange rate of BTC. This may not match the order total, which is based on the exchange rate of BTC at the time you purchased this listing.",
329334
"Avatar": "Avatar",
330335
"AdditionalPaymentData": "Additional payment data",
331336
"AdditionalPaymentDataInfo": "Include name of purchase and order number in payment QR code?",
337+
"ShippableHelp": "This product can be shipped to one of your currently saved addresses. Add more addresses in the Settings/Addresses section to be able to purchase more listings.",
332338
"firewall": {
333339
"Open": "Open",
334340
"Restricted": "Restricted",
@@ -492,7 +498,8 @@
492498
"UpdatingOrder": "Updating your transaction",
493499
"UpdateComplete": "Your transaction update is complete",
494500
"UpdateFailed": "Your transaction update did not complete. Open the transaction and try again",
495-
"UpdateInvalid": "Your transaction update returned invalid data. Open the transaction and try again"
501+
"UpdateInvalid": "Your transaction update returned invalid data. Open the transaction and try again",
502+
"ExportCSV": "Export to CSV"
496503
},
497504
"errorMessages": {
498505
"saveError": "Data could not be saved.",
@@ -513,7 +520,8 @@
513520
"tooManyPhotosBody": "Some or all of your photos were prevented from being uploaded because you would exceeded the maximum allowable amount.",
514521
"badJSON": "The JSON data returned from the server was malformed",
515522
"refundAlreadySent": "The refund has already been successfully sent for this order",
516-
"serverTimeout": "No response was received from the server. It may be unreachable or taking a very long time to respond."
523+
"serverTimeout": "No response was received from the server. It may be unreachable or taking a very long time to respond.",
524+
"noData": "No data is available for the options you have selected."
517525
},
518526
"pageConnectingMessages": {
519527
"listingConnect": "Connecting to listing ${listing}",

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/models/timezonesMd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module.exports = Backbone.Model.extend({
8888
"offset": 5
8989
},
9090
{
91-
"name":"(GMT +5:30) Bombay, Calcutta, Madras, New Delhi",
91+
"name":"(GMT +5:30) Mumbai, Kolkata, Chennai, New Delhi",
9292
"offset": 5.5
9393
},
9494
{

js/router.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ module.exports = Backbone.Router.extend({
6969
},
7070

7171
translateRoute: function(route) {
72+
if(!route) throw new Error('You must provide a route');
73+
7274
var guid = "",
7375
handle = "",
7476
state = "",

js/templates/buyAddresses.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<% } else { %>
3131
<%= ob.displayDomesticShipping %>
3232
<% if(ob.userCurrencyCode != 'BTC'){ %>
33-
<div class="textOpacity75 textSize12px letterSpacing02">(<%= Number(ob.domesticShippingBTC.toFixed(4)) %> BTC)</div>
33+
<div class="textOpacity75 textSize12px letterSpacing02">(<%= ob.intlNumFormat(ob.domesticShippingBTC, 4) %> BTC)</div>
3434
<% } %>
3535
<% } %>
3636
<% } else { %>
@@ -39,7 +39,7 @@
3939
<% } else { %>
4040
<%= ob.displayInternationalShipping %>
4141
<% if(ob.userCurrencyCode != 'BTC'){ %>
42-
<div class="textOpacity75 textSize12px letterSpacing02">(<%= Number(ob.internationalShippingBTC.toFixed(4)) %> BTC)</div>
42+
<div class="textOpacity75 textSize12px letterSpacing02">(<%= ob.intlNumFormat(ob.internationalShippingBTC, 4) %> BTC)</div>
4343
<% } %>
4444
<% } %>
4545
<% } %>

0 commit comments

Comments
 (0)