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

Commit 737574f

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into internationalBTCFormatting
2 parents aacd6ab + 0303040 commit 737574f

File tree

13 files changed

+118
-33
lines changed

13 files changed

+118
-33
lines changed

css/obBase.css

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -587,20 +587,21 @@ form {
587587
position: relative;
588588
background-position: center;
589589
background-size: cover;
590-
border-radius: 3px;
590+
background-repeat: no-repeat;
591+
border-radius: 2px;
591592
height: 230px;
592593
width: 250px;
593594
}
594595

595596
.itemImg.itemImg-large {
596597
/* flex row collapses unless a specific height is set */
597-
height: 380px;
598-
width: 100%;
598+
height: 472px;
599+
width: 514px;
599600
border-radius: 0;
600601
}
601602

602603
.itemImg.itemImg-small {
603-
height: 82px;
604+
height: 111px;
604605
width: 121px;
605606
margin: 0 10px 10px 0;
606607
border-radius: 1px;
@@ -2583,11 +2584,6 @@ div.chatSearchOut .chatSearchIcon {
25832584
border-top-right-radius: 0;
25842585
}
25852586

2586-
.btn.btn-back:before,
2587-
.btn.btn-fwd:before {
2588-
opacity: 0.3;
2589-
}
2590-
25912587
.btn.btn-back.active:before,
25922588
.btn.btn-fwd.active:before {
25932589
opacity: 1;
@@ -5603,6 +5599,15 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
56035599
opacity: 0.7;
56045600
}
56055601

5602+
#ov1 .disabled-icon {
5603+
pointer-events: none;
5604+
}
5605+
5606+
#ov1 .disabled-icon:before,
5607+
#ov1 .disabled [class *= "ion-"]:before {
5608+
opacity: 0.2;
5609+
}
5610+
56065611
#ov1 .overflowVisible {
56075612
overflow: visible;
56085613
}
@@ -5872,7 +5877,31 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
58725877

58735878
#ov1.notFancy .notFancyDarkBackground,
58745879
#ov1.notFancy #obContainer .notFancyDarkBackground {
5875-
background: #262626;
5880+
background: #262626 !important;
5881+
}
5882+
5883+
#ov1.notFancy .disabled,
5884+
#ov1.notFancy #userPage .disabled,
5885+
#ov1.notFancy #obContainer .disabled,
5886+
#ov1.notFancy #overlay .disabled,
5887+
#ov1.notFancy #sideBar .disabled,
5888+
#ov1.notFancy #pageNav .disabled,
5889+
#ov1.notFancy #modalHolder .disabled,
5890+
#ov1.notFancy #messageModal .disabled,
5891+
#ov1.notFancy #statusBar .disabled {
5892+
opacity: 0.2 !important;
5893+
}
5894+
5895+
#ov1.notFancy .disabled2,
5896+
#ov1.notFancy #userPage .disabled2,
5897+
#ov1.notFancy #obContainer .disabled2,
5898+
#ov1.notFancy #overlay .disabled2,
5899+
#ov1.notFancy #sideBar .disabled2,
5900+
#ov1.notFancy #pageNav .disabled2,
5901+
#ov1.notFancy #modalHolder .disabled2,
5902+
#ov1.notFancy #messageModal .disabled2,
5903+
#ov1.notFancy #statusBar .disabled2 {
5904+
opacity: 0.7 !important;
58765905
}
58775906

58785907
/* add a shadow and a glow, so modal close buttons are still barely visible if the user picks a bad color */

index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ <h2 class="txt-center">
8181
<i class="ion-android-sync spinner fontSize30 spinner-with-logo-icon"></i>
8282
</div>
8383
<div class="width100 positionTop">
84-
<a class="btn btn-txt rowTop10 marginRight10 pull-right js-indexReload"><i class="ion-android-sync"></i> Reload</a>
85-
<a class="btn btn-txt rowTop10 marginRight10 pull-right" href="#home"><i class="ion-home"></i> Load Index</a>
84+
<a class="btn btn-txt rowTop10 marginRight10 pull-right js-indexReload"><i class="ion-android-sync"></i> <span class="js-translate" data-translate="Reload"></span></a>
85+
<a class="btn btn-txt rowTop10 marginRight10 pull-right" href="#home"><i class="ion-home"></i> <span class="js-translate" data-translate="LoadIndex"></span></a>
8686
</div>
8787
</div>
8888

@@ -92,6 +92,13 @@ <h2 class="txt-center">
9292
<script>
9393
var app = require('./js/main'),
9494
remote = require('remote');
95+
96+
window.translateIndex = function(){
97+
$('.js-translate').each(function() {
98+
$(this).text(polyglot.t($(this).data("translate")));
99+
});
100+
};
101+
translateIndex();
95102
$('.js-closeIndexModal').on('click', function(){
96103
$(this).closest('.modal').addClass('hide');
97104
});

js/languages/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"EnterMessage": "Enter message...",
77
"Recommended": "Recommended",
88
"Reload": "Reload",
9+
"LoadIndex": "Load Index",
910
"You": "You",
1011
"Skip": "Skip",
1112
"Done": "Done",

js/languages/pl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"EnterMessage": "Wprowadź tekst...",
77
"Recommended": "Rekomendowane",
88
"Reload": "Odśwież",
9+
"LoadIndex": "Strona główna",
910
"You": "Ja",
1011
"Skip": "Pomiń",
1112
"Done": "Gotowe",

js/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ user.on('change:language', function(md, lang) {
8585
window.lang = lang;
8686
extendPolyglot(lang);
8787
localStorage.setItem('lang', lang);
88+
//trigger translation function on index
89+
window.translateIndex();
90+
8891
});
8992

9093
//keep user and profile urls synced with the server configuration

js/router.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ var ipcRenderer = require('ipc-renderer'),
1313

1414
module.exports = Backbone.Router.extend({
1515
initialize: function(options){
16+
var self = this;
17+
1618
var routes;
1719

1820
this.options = options || {};
@@ -48,6 +50,22 @@ module.exports = Backbone.Router.extend({
4850
this.navigate(translatedRoute, { trigger: true });
4951
});
5052
});
53+
54+
var originalHistoryBack = history.back;
55+
history.back = function() {
56+
self.historyAction = 'back';
57+
return originalHistoryBack(arguments);
58+
}
59+
60+
var originalHistoryForward = history.forward;
61+
history.forward = function() {
62+
self.historyAction = 'forward';
63+
return originalHistoryForward(arguments);
64+
}
65+
66+
this.historySize = -1;
67+
this.historyPosition = -1;
68+
this.historyAction = 'default';
5169
},
5270

5371
translateRoute: function(route) {
@@ -103,6 +121,32 @@ module.exports = Backbone.Router.extend({
103121

104122
return deferred.promise();
105123
},
124+
125+
execute: function(callback, args, name) {
126+
if (this.historyAction == 'default') {
127+
this.historyPosition += 1;
128+
this.historySize = this.historyPosition;
129+
} else if (this.historyAction == 'back') {
130+
this.historyPosition -= 1;
131+
} else if(this.historyAction == 'forward' && this.previousName != name && name != "index") {
132+
//don't increment if the same state is navigated to twice
133+
//don't increment on index since that isn't a real state
134+
this.historyPosition += 1;
135+
}
136+
this.historyAction = 'default';
137+
138+
if (this.historyPosition == this.historySize)
139+
$('.js-navFwd').addClass('disabled-icon');
140+
else
141+
$('.js-navFwd').removeClass('disabled-icon');
142+
143+
if (this.historyPosition == 1)
144+
$('.js-navBack').addClass('disabled-icon');
145+
else
146+
$('.js-navBack').removeClass('disabled-icon');
147+
148+
if (callback) callback.apply(this, args);
149+
},
106150

107151
cleanup: function(){
108152
"use strict";

js/templates/buyWizard.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="btn-corner btn-cornerTR btn-cornerTROutR btn-flushTop js-closeBuyWizardModal">
44
<h2 class="ion-android-close custCol-text clickable"></h2>
55
</div>
6-
<div class="modal-hero js-buyWizardHero shadow-inner1-light"
6+
<div class="modal-hero js-buyWizardHero custCol-text shadow-inner1-light"
77
style="background-image: url(<%= ob.serverUrl %>get_image?hash=<%= ob.vendor_offer.listing.item.image_hashes[0] %><%= ob.imageExtension %>), url(imgs/defaultBanner.png);">
88
<div class="js-buyWizardMapPlaceholder hide">
99
<div class="flexContainer">
@@ -19,28 +19,28 @@ <h2 class="ion-android-close custCol-text clickable"></h2>
1919
<div class="modal-hero modal-heroFullHeightNoButtons js-buyWizardSpinner hide background1 custCol-primary">
2020
<div class="width100 txt-center vCentered">
2121
<div class="txt-col1 ion-android-sync spinner spinner-slow icon-gigantic icon-circle-background1 rowTop50 row20"></div>
22-
<h3 class="txt-bright padding30"><%= polyglot.t('CheckExchanges') %> </h3>
22+
<h3 class="custCol-text padding30"><%= polyglot.t('CheckExchanges') %> </h3>
2323
</div>
2424
</div>
2525
<div class="modal-hero modal-heroFullHeightNoButtons padding40 js-buyWizardPay hide background1 custCol-primary">
2626
<div class="width100 row20">
2727
<img class="blockCenter qrCode js-buyWizardPayQRCode" height="250" width="250" src="imgs/defaultItem.png"/>
2828
</div>
2929
<div class="txt-bright pad20">
30-
<div class="txt-center row10 textSize20px">
30+
<div class="txt-center row10 textSize20px custCol-text">
3131
<%= polyglot.t('buyFlow.SendBTCtoAddress', {amount: '<span class="js-buyWizardDetailsTotalBTC"></span>'}) %>
3232
</div>
3333
<div class="txt-center row10">
34-
<a class="textSize16px js-buyWizardPayLink"><span class="js-buyWizardPayURL"></span></a>
34+
<a class="textSize16px js-buyWizardPayLink custCol-text"><span class="js-buyWizardPayURL"></span></a>
3535
</div>
3636
<div class="txt-center row10">
3737
<input type="checkbox" class="textSize11px fieldItem thin" id="BuyWizardQRDetailsInput">
38-
<label for="BuyWizardQRDetailsInput" class="textSize11px"> <%= polyglot.t('AdditionalPaymentDataInfo') %></label>
38+
<label for="BuyWizardQRDetailsInput" class="textSize11px custCol-text"> <%= polyglot.t('AdditionalPaymentDataInfo') %></label>
3939
</div>
40-
<a class="btn btn-txt btn-wide row10 js-buyWizardPayCopy custCol-secondary"><i class="ion-clipboard"></i> <%= polyglot.t('buyFlow.CopyAddress') %></a>
41-
<a class="btn btn-txt btn-wide row10 js-buyWizardPayLink custCol-secondary"><i class="ion-link"></i> <%= polyglot.t('buyFlow.OpenAddress') %></a>
42-
<a class="btn btn-txt btn-wide js-buyWizardPayCheck custCol-secondary"><i class="ion-refresh"></i> <%= polyglot.t('buyFlow.RefreshPayment') %></a>
43-
<div class="rowTop10 txt-center note">
40+
<a class="btn btn-txt btn-wide row10 js-buyWizardPayCopy custCol-secondary custCol-text"><i class="ion-clipboard"></i> <%= polyglot.t('buyFlow.CopyAddress') %></a>
41+
<a class="btn btn-txt btn-wide row10 js-buyWizardPayLink custCol-secondary custCol-text"><i class="ion-link"></i> <%= polyglot.t('buyFlow.OpenAddress') %></a>
42+
<a class="btn btn-txt btn-wide js-buyWizardPayCheck custCol-secondary custCol-text"><i class="ion-refresh"></i> <%= polyglot.t('buyFlow.RefreshPayment') %></a>
43+
<div class="rowTop10 txt-center note custCol-text">
4444
<%= polyglot.t('buyFlow.paymentNote') %>
4545
</div>
4646
</div>

js/templates/item.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ <h4><%= polyglot.t('CanBeShippedTo') %></h4>
166166
<%= polyglot.t('ShippingReturns') %>
167167
</a>
168168
</div>
169-
<div class="flexContainer flex-border custCol-primary js-description js-tabTarg textOpacity75 minHeight300 <% ob.activeTab !== 'description' && print('hide') %>">
169+
<div class="flexContainer flex-border custCol-primary js-description js-tabTarg textOpacity1 minHeight300 <% ob.activeTab !== 'description' && print('hide') %>">
170170
<div class="flexRow">
171-
<div class="rowItem fontSize16 padding30 paddingTop10 lineHeight24 fontWeight400 flexContainer editableContent">
171+
<div class="rowItem fontSize16 padding30 paddingTop20 lineHeight24 fontWeight400 flexContainer editableContent">
172172
<%= ob.vendor_offer.listing.item.displayDescription %>
173173
</div>
174174
</div>

js/utils/setTheme.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ module.exports = function(primaryColor, secondaryColor, backgroundColor, textCol
6161
"#ov1 #userPage input[type='number'].spinButtons::-webkit-inner-spin-button:before { color: " + textColor + ";}" +
6262
"#ov1 #userPage input[type='number'].spinButtons::-webkit-inner-spin-button:after { color: " + textColor + ";}" +
6363
"#ov1 #userPage #obContainer input::-webkit-input-placeholder { color: " + textColor + ";}" +
64-
"#ov1 #userPage #pageNav input::-webkit-input-placeholder { color: " + textColor + ";}" +
64+
//"#ov1 #userPage #pageNav input::-webkit-input-placeholder { color: " + textColor + ";}" +
6565
"#ov1 #userPage #obContainer textarea::-webkit-input-placeholder { color: " + textColor + ";}" +
66-
"#ov1 #userPage #pageNav textarea::-webkit-input-placeholder { color: " + textColor + ";}" +
66+
//"#ov1 #userPage #pageNav textarea::-webkit-input-placeholder { color: " + textColor + ";}" +
6767
"#ov1 #userPage .txtFieldWrapper-bar:before { color: " + textColor + ";}" +
6868
"#ov1 #userPage .mainContainer { box-shadow: 0px 10px 20px " + shadeColor2(backgroundColor, -0.3) + "; }" +
6969
"#ov1 #userPage .mainContainer .txtFieldWrapper:before { color: " + textColor + "; }" +

js/views/homeVw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,10 @@ module.exports = baseVw.extend({
290290
this.searchItemsText = searchItemsText;
291291

292292
//add action to history
293-
Backbone.history.navigate("#home/" + state + "/" + searchItemsText.replace(/ /g, ""));
293+
Backbone.history.navigate("#home/" + state + "/" + searchItemsText.replace(/ /g, ""), { replace: true });
294294
} else {
295295
//add action to history
296-
Backbone.history.navigate("#home/" + state);
296+
Backbone.history.navigate("#home/" + state, { replace: true });
297297
}
298298

299299
this.state = state;

0 commit comments

Comments
 (0)