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

Commit 641811a

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into pr/1454
2 parents ab6d481 + 6a998eb commit 641811a

File tree

16 files changed

+314
-32
lines changed

16 files changed

+314
-32
lines changed

css/obBase.css

Lines changed: 95 additions & 3 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;
@@ -2370,7 +2407,6 @@ div.chatSearchOut .chatSearchIcon {
23702407

23712408
.chatConversationMessageTimestamp {
23722409
font-size: 11px;
2373-
color: #fff;
23742410
opacity: .35;
23752411
font-weight: 500;
23762412
letter-spacing: 0;
@@ -3378,7 +3414,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
33783414
padding: 10px 0;
33793415
width: 230px;
33803416
overflow: hidden;
3381-
transform: translateY(-330px);
3417+
transform: translateY(-110%);
33823418
transition: transform 200ms;
33833419
}
33843420

@@ -4045,6 +4081,14 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
40454081
top: 100%;
40464082
}
40474083
4084+
.tooltip.tooltip-box2:hover:after {
4085+
height: auto;
4086+
width: 200px;
4087+
white-space: normal;
4088+
bottom: auto;
4089+
top: 100%;
4090+
}
4091+
40484092
.tooltip.tooltip-box.tooltip-boxUp:hover:after {
40494093
bottom: 120%;
40504094
}
@@ -4261,7 +4305,53 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42614305
42624306
}
42634307
4264-
/* protect customize controls from custom page styles */
4308+
.violatorTR {
4309+
/* sets triangle to be in the top right corner */
4310+
/* must be given equal height and width properties */
4311+
/* text or icons inside the violator should have positionTopRight and a right and top margin or padding based on the violator size */
4312+
position: absolute;
4313+
top: 0;
4314+
right: 0;
4315+
-webkit-clip-path: polygon(50% 0, 100% 0, 100% 50%);
4316+
z-index: 1; /* this shouldn't need to be higher. Make it the last element in its container */
4317+
text-align: center;
4318+
}
4319+
4320+
.violator1 {
4321+
width: 50px;
4322+
height: 50px;
4323+
background: #215175; /* this should be overridden with a color class */
4324+
color: #fff;
4325+
}
4326+
4327+
.violatorTxt{
4328+
/* use on content of a violator to rotate it to match the violator */
4329+
display: block;
4330+
transform: rotate(45deg);
4331+
}
4332+
4333+
.listingTypeDigital:before {
4334+
color: #EFEF4C;
4335+
content: "\f137";
4336+
font-family: Ionicons;
4337+
font-size: 12px;
4338+
}
4339+
4340+
.listingTypePhysical:before {
4341+
color: #805C17;
4342+
content: "\f318";
4343+
font-family: Ionicons;
4344+
font-size: 12px;
4345+
}
4346+
4347+
.listingTypeService:before {
4348+
color: #DEDEDE;
4349+
content: "\f2ad";
4350+
font-family: Ionicons;
4351+
font-size: 12px;
4352+
}
4353+
4354+
/* protect customize controls from custom page styles */
42654355
#ov1 #customizeControls .labelWrap {
42664356
height: 40px;
42674357
border-radius: 0;
@@ -4517,11 +4607,13 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
45174607
#ov1 .positionBottom {
45184608
position: absolute;
45194609
bottom: 0;
4610+
right: 0;
45204611
}
45214612

45224613
#ov1 .positionTop {
45234614
position: absolute;
45244615
top: 0;
4616+
left: 0;
45254617
}
45264618

45274619
#ov1 .positionTopRight {

imgs/helpdesk-icon.png

20.7 KB
Loading

js/config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ module.exports = {
1515
keyShortcuts: {
1616
undo: 'z',
1717
discover: 'd',
18-
myPage: 'h',
18+
myPage: 't',
1919
customizePage: 'e',
2020
create: 'n',
21-
purchases: 't',
22-
sales: 'y',
21+
purchases: 'k',
22+
sales: 'm',
2323
cases: 'j',
2424
settings: 'g',
2525
addressBar: 'l',
2626
save: 's',
27-
restart: 'r'
27+
refresh: 'r',
28+
restart: 'f'
2829
},
2930

3031
setTestnet: function(testNetBoolean){

js/languages/en-US.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@
333333
"Avatar": "Avatar",
334334
"AdditionalPaymentData": "Additional payment data",
335335
"AdditionalPaymentDataInfo": "Include name of purchase and order number in payment QR code?",
336+
"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.",
336337
"firewall": {
337338
"Open": "Open",
338339
"Restricted": "Restricted",
@@ -496,7 +497,8 @@
496497
"UpdatingOrder": "Updating your transaction",
497498
"UpdateComplete": "Your transaction update is complete",
498499
"UpdateFailed": "Your transaction update did not complete. Open the transaction and try again",
499-
"UpdateInvalid": "Your transaction update returned invalid data. Open the transaction and try again"
500+
"UpdateInvalid": "Your transaction update returned invalid data. Open the transaction and try again",
501+
"ExportCSV": "Export to CSV"
500502
},
501503
"errorMessages": {
502504
"saveError": "Data could not be saved.",
@@ -517,7 +519,8 @@
517519
"tooManyPhotosBody": "Some or all of your photos were prevented from being uploaded because you would exceeded the maximum allowable amount.",
518520
"badJSON": "The JSON data returned from the server was malformed",
519521
"refundAlreadySent": "The refund has already been successfully sent for this order",
520-
"serverTimeout": "No response was received from the server. It may be unreachable or taking a very long time to respond."
522+
"serverTimeout": "No response was received from the server. It may be unreachable or taking a very long time to respond.",
523+
"noData": "No data is available for the options you have selected."
521524
},
522525
"pageConnectingMessages": {
523526
"listingConnect": "Connecting to listing ${listing}",
@@ -564,6 +567,7 @@
564567
"cases": "Cases",
565568
"notifications": "Notifications",
566569
"settings": "Settings",
570+
"refresh": "Refresh Page",
567571
"restart": "Restart Application",
568572
"about": "About OpenBazaar",
569573
"support": "Support OpenBazaar",

js/main.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@ $(window).bind('keydown', function(e) {
192192
var char = String.fromCharCode(e.which).toLowerCase(),
193193
ctrl = (e.ctrlKey || e.metaKey) && !e.altKey, //test for alt key to prevent international keyboard issues
194194
route = null;
195-
196-
if (event.keyCode == 116) { //on F5 press
195+
196+
if (e.keyCode == 116) { //on F5 press
197197
Backbone.history.loadUrl();
198198
}
199199

200200
if (ctrl) {
201201
switch (char) {
202202
case config.keyShortcuts.undo:
203-
//run undo programmatically to avoid crash
204203
e.preventDefault();
204+
//run undo programmatically to avoid crash
205205
document.execCommand('undo');
206206
break;
207207
case config.keyShortcuts.discover:
@@ -235,6 +235,13 @@ $(window).bind('keydown', function(e) {
235235
case config.keyShortcuts.save:
236236
window.obEventBus.trigger('saveCurrentForm');
237237
break;
238+
case config.keyShortcuts.refresh:
239+
e.preventDefault();
240+
Backbone.history.loadUrl();
241+
break;
242+
case config.keyShortcuts.restart:
243+
location.reload();
244+
break;
238245
}
239246

240247
if (route !== null) {

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/itemShort.html

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1+
<%
2+
var shipsToYou = false;
3+
if(_.intersection(ob.userCountries, ob.ships_to).length > 0 || ob.ships_to == "ALL" || ob.ships_to.length == 0){
4+
shipsToYou = true;
5+
}
6+
%>
7+
8+
19
<div class="gridItem clearfix custCol-border">
2-
<div class="itemImg row10 color-secondary custCol-secondary overflowHidden js-item" data-id="<%= ob.contract_hash %>">
10+
11+
<div class="itemImg row10 color-secondary custCol-secondary overflowHidden js-item <% if(!shipsToYou){ %>textOpacity25<% } %>" data-id="<%= ob.contract_hash %>">
312
<div class="itemImg <% if(ob.cloak){ %> nsfw <% } %>" style="background-image: url(<%= ob.imageURL %>), url(imgs/defaultItem.png);"></div>
413
</div>
5-
<div class="table">
14+
<div class="table <% if(!shipsToYou){ %>textOpacity25<% } %>">
615
<div>
716
<% if(ob.showAvatar) { %>
817
<div class="thumbnail-small js-avatar tooltip" data-tooltip="<% if(ob.handle) { %><%= ob.handle %><% }else{ %><%= ob.guid %><% } %>" data-handle="<%= ob.handle %>"
918
style="background-image: <% if(ob.avatar_hash && ob.avatarURL) { %> url(<%= ob.avatarURL %>), <% } %>url(imgs/defaultUser.png);"></div>
1019
<% } %>
11-
<div class="js-item pad8Left <% if(ob.title.length >= 30) { %>tooltip<% } %>" <% if(ob.title.length >= 30) { %>data-tooltip="<%= ob.title.substring(0, 40) %>"<% } %> data-id="<%= ob.contract_hash %>">
12-
<div class="textSize14px noOverflow textOpacity1 js-searchTitle"><%= ob.title %></div>
20+
<div class="js-item pad8Left <% if(ob.title.length >= 30) { %>tooltip<% } %>"
21+
<% if(ob.title.length >= 30) { %>data-tooltip="<%= ob.title.substring(0, 40) %>"<% } %> data-id="<%= ob.contract_hash %>">
22+
<div class="textSize14px noOverflow textOpacity1 js-searchTitle">
23+
<%= ob.title %>
24+
</div>
1325
<div class="textSize13px txt-fade textWeightNormal">
1426
<%= ob.intlNumFormat(ob.vendorBTCPrice, 4) %> BTC
1527
<% if(ob.userCurrencyCode != 'BTC'){ %>
16-
(<%= ob.displayPrice %>)
28+
(<%= ob.displayPrice %>)
1729
<% } %>
1830
</div>
1931
</div>
@@ -69,7 +81,22 @@
6981
</div>
7082
</div>
7183
</div>
84+
85+
<% if(ob.type){ %><!-- type is not yet implemented -->
86+
<div class="listingType borderRadius3 js-item <% if(shipsToYou){ %>textOpacity90<% }else{ %>textOpacity25<% } %>">
87+
<span class="<% print('listingType'+ob.type) %>"></span>
88+
</div>
89+
<% } %>
90+
91+
<% if(!shipsToYou && ob.ships_to.length != 0){ %>
92+
<div class="listingDoesNotShipToYou">
93+
<span class="ion-alert-circled fontSize11" style="color: #EFEF4C"></span>
94+
Does not ship to you
95+
</div>
96+
<% } %>
97+
7298
</div>
99+
73100
<% if(ob.cloak){ %>
74101
<div class="fullCentered btn btn-large custCol-secondary div-fade">
75102
NSFW

js/templates/onboardingModal.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,22 @@
423423
</div>
424424
</label>
425425
</li>
426+
427+
<li class="rowItem paddingLeft5 paddingTop20 paddingBottom20 borderBottom custCol-border">
428+
<input class="fieldItem pull-left marginTop12" type="checkbox" id="e1c6340228691a6fe97d3acee4b2517db412e1a2" data-handle="helpdesk" checked />
429+
<label for="e1c6340228691a6fe97d3acee4b2517db412e1a2" class="textOpacity1 checkboxLabel">
430+
<div class="pull-left marginRight10">
431+
<div class="thumbnail pull-left" style="background-image: url(imgs/helpdesk-icon.png);"></div>
432+
</div>
433+
<div class="pull-left marginTop6 marginLeft2 marginRight5 fontSize16 width360">
434+
<div class="marginBottom2">
435+
Helpdesk
436+
<span class="fontSize15 textOpacity50">@helpdesk</span>
437+
</div>
438+
<span class="fontSize14 textOpacity75">Ask questions about OpenBazaar. Anything goes!</span>
439+
</div>
440+
</label>
441+
</li>
426442
</ul>
427443
</div>
428444
</div>

js/templates/orderShort.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<table class="floatLeft custCol-text fontSize14 width450 fontWeight500">
2222
<tr>
2323
<td class="textOpacity50 padding2"><%= polyglot.t('Listing') %></td>
24-
<td class="js-searchTitle textOpacity75 padding2"><%= ob.title %></td>
24+
<td class="js-searchTitle textOpacity75 padding2"><div class="noOverflow width260"><%= ob.title %></div></td>
2525
</tr>
2626
<tr>
2727
<td class="textOpacity50 padding2"><%= polyglot.t('transactions.OrderTotal') %> </td>

js/templates/pageNav.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ <h3 class="margin0 marginTop25"><%= polyglot.t('Discover') %></h3>
123123
<%= polyglot.t('nav.settings') %>
124124
<span class="pull-right txt-muted"><%= config.keyShortcutPrefix + config.keyShortcuts.settings.toUpperCase() %></span>
125125
</a>
126-
<a class="js-navRestart">
127-
<span class="ion-refresh fontSize11 marginRight2 textOpacity1"></span>
128-
<%= polyglot.t('nav.restart') %>
129-
<span class="pull-right txt-muted"><%= config.keyShortcutPrefix + config.keyShortcuts.restart.toUpperCase() %></span>
130-
</a>
131126
<hr/>
132127
<a class="js-showAboutModal">
133128
<span class="ion-ios-book fontSize11 marginRight2 textOpacity1"></span>
@@ -160,7 +155,7 @@ <h3 class="margin0 marginTop25"><%= polyglot.t('Discover') %></h3>
160155
<a class="btn btn-togRight btn-fwd ion-chevron-right js-navFwd custCol-primary custCol-text fontSize13 tooltip" data-tooltip="<%= polyglot.t('nav.Forward') %>"></a>
161156
</div>
162157
<div class="ctrlGroup">
163-
<a class="btn btn-home ion-refresh custCol-primary custCol-text js-navRefresh tooltip" data-tooltip="<%= polyglot.t('Reload') %>"></a>
158+
<a class="btn btn-home ion-refresh custCol-primary custCol-text js-navRefresh tooltip" data-tooltip="<%= polyglot.t('Reload') %> <%= config.keyShortcutPrefix + config.keyShortcuts.refresh.toUpperCase() %>"> </a>
164159
</div>
165160
<div class="ctrlGroup flexExpand">
166161
<div class="txtFieldWrapper searchWrapper mainSearchWrapper js-mainSearchWrapper">

0 commit comments

Comments
 (0)