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

Commit 70b51de

Browse files
authored
Merge pull request #1705 from OpenBazaar/restoreDottedBorderOnCustomize
Fix Missing Dotted Line on Customize
2 parents 41db76b + 68e133a commit 70b51de

File tree

8 files changed

+22
-25
lines changed

8 files changed

+22
-25
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"no-extend-native": 2,
5151
"no-extra-bind": 2,
5252
"no-extra-boolean-cast": 2,
53-
"no-extra-parens": [2, "all", {"nestedBinaryExpressions": false}],
5453
"no-extra-semi": 2,
5554
"no-fallthrough": 2,
5655
"no-floating-decimal": 2,

css/obBase.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ h6, .h6 {
356356
#obContainer.customizeUserPage {
357357
overflow: hidden;
358358
border: 5px dashed #fff;
359-
height: 100%;
359+
height: calc(100% - 76px);
360360
animation: borderDashedFade .35s normal linear;
361361
}
362362

js/languages/en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"SSLIsOn": "SSL is on",
186186
"SSLIsOff": "SSL is off",
187187
"LibbitcoinServerAddress": "Libbitcoin Server Address",
188-
"LibbitcoinOfflineWarning":"The Libbitcoin Server is not responding. Transactions can still be made, but payments will not complete until Libbitcoin is back online.",
188+
"LibbitcoinOfflineWarning":"Contacting the Libbitcoin Server. Transactions may be delayed until the Libbitcoin server is connected.",
189189
"libbitcoinPlaceholder": "tcp://serveraddress:port or leave this field blank to use the default value (recommended)",
190190
"SMTPNotificationsWarning": "Turn email notifications on/off",
191191
"SMTPNotifications": "SMTP Notifications",

js/router.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,10 @@ module.exports = Backbone.Router.extend({
178178

179179
if (callback) callback.apply(this, args);
180180
},
181-
181+
182182
cleanup: function() {
183183
app.loadingModal.close();
184184
app.simpleMessageModal.close();
185-
$('#obContainer').removeClass('customizeUserPage box-borderDashed noScrollBar overflowHidden');
186185
window.obEventBus.trigger('cleanNav');
187186
},
188187

js/start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var Polyglot = require('node-polyglot'),
4747
cCode = "",
4848
$html = $('html'),
4949
LoadingModal = require('./views/loadingModal'),
50-
SimpleMessageModal = require('./views/SimpleMessageModal'),
50+
SimpleMessageModal = require('./views/simpleMessageModal'),
5151
ServerConfigsCl = require('./collections/serverConfigsCl'),
5252
ServerConnectModal = require('./views/serverConnectModal'),
5353
OnboardingModal = require('./views/onboardingModal'),
@@ -460,7 +460,7 @@ var loadProfile = function(landingRoute, onboarded) {
460460
};
461461

462462
// any lang changes after our app has loaded will need an app re-start to fully take effect
463-
user.on('change:language', function(md, lang) {
463+
user.on('change:language', function() {
464464
var restartWarning;
465465

466466
restartWarning = new Dialog({

js/views/baseModal.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ baseModal = baseVw.extend({
5353
},
5454

5555
__onDocKeypress: function(e) {
56-
var openModals = baseModal.__openModals,
57-
topModal = this.__getTopModal();
56+
var topModal = this.__getTopModal();
5857

5958
if (this.__options.dismissOnEscPress && e.keyCode === 27 &&
6059
topModal && topModal === this) {
@@ -83,11 +82,10 @@ baseModal = baseVw.extend({
8382
var aZindex = parseInt(window.getComputedStyle(a.modal.el).zIndex) || 0,
8483
bZindex = parseInt(window.getComputedStyle(b.modal.el).zIndex) || 0;
8584

86-
if (aZindex === bZindex) {
85+
if (aZindex === bZindex) {
8786
return (a.index < b.index) ? -1 : (a.index > b.index) ? 1 : 0;
88-
} else {
89-
return (aZindex < bZindex) ? -1 : (aZindex > bZindex) ? 1 : 0;
90-
}
87+
}
88+
return (aZindex < bZindex) ? -1 : (aZindex > bZindex) ? 1 : 0;
9189
});
9290

9391
return openModals[openModals.length - 1] && openModals[openModals.length - 1].modal;

js/views/transactionsVw.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@ module.exports = pageVw.extend({
367367
tempAnchor.href = window.URL.createObjectURL(dataBlob);
368368
tempAnchor.download = ('export_'+saveDate.toLocaleString(window.lang)+'.csv').replace(/,/g, '_');
369369
tempAnchor.click();
370-
},
371-
self = this;
370+
};
372371

373372
//clear existing data
374373
this.currentExportData = [];
@@ -399,12 +398,10 @@ module.exports = pageVw.extend({
399398

400399
return $.when.apply(null, calls)
401400
.fail(function(){
402-
self.registerChild(
403-
new Dialog({
404-
title: window.polyglot.t('errorMessages.getError'),
405-
message: window.polyglot.t('errorMessages.serverError')
406-
})
407-
);
401+
app.simpleMessageModal.open({
402+
title: window.polyglot.t('errorMessages.getError'),
403+
message: window.polyglot.t('errorMessages.serverError')
404+
});
408405

409406
calls.forEach(call => {
410407
call.abort();

js/views/userPageVw.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ UserPageVw = pageVw.extend({
185185
this.followerFetchTotal = 0;
186186
this.itemFetchParameters = {};
187187
this.model = new Backbone.Model();
188-
this.globalUserProfile = options.userProfile;
188+
//this.globalUserProfile = options.userProfile;
189189
this.userProfile = new userProfileModel();
190190
//models have to be passed the dynamic URL
191191
this.userProfile.urlRoot = options.userModel.get('serverUrl') + "profile";
@@ -211,6 +211,7 @@ UserPageVw = pageVw.extend({
211211
this.showNSFWContent = this.showNSFW;
212212
this.currentItemHash = options.itemHash;
213213
this.$obContainer = $('#obContainer');
214+
/*
214215
//hold changes to the page for undoing, such as custom colors
215216
this.undoCustomAttributes = {
216217
profile: {
@@ -220,6 +221,7 @@ UserPageVw = pageVw.extend({
220221
background_color: ""
221222
}
222223
};
224+
*/
223225

224226
this.loadingDeferred = $.Deferred();
225227

@@ -383,11 +385,13 @@ UserPageVw = pageVw.extend({
383385
self.fetchFollowing();
384386
self.getIsModerator();
385387
self.fetchListings();
388+
/*
386389
//save state of the page
387390
self.undoCustomAttributes.background_color = self.model.get('page').profile.background_color;
388391
self.undoCustomAttributes.primary_color = self.model.get('page').profile.primary_color;
389392
self.undoCustomAttributes.secondary_color = self.model.get('page').profile.secondary_color;
390393
self.undoCustomAttributes.text_color = self.model.get('page').profile.text_color;
394+
*/
391395
self.setCustomStyles();
392396
self.setState(self.state, self.currentItemHash, { replaceHistory: true });
393397
self.$backToTop = self.$('.backToTop');
@@ -573,7 +577,7 @@ UserPageVw = pageVw.extend({
573577
this.$el.find('.js-unfollow').removeClass('confirm');
574578
this.$el.find('.js-removemoderator').removeClass('confirm');
575579
this.$el.find('.user-page-header-slim-bg-cover').removeClass('user-page-header-slim-bg-cover-customize');
576-
this.$obContainer[0].classList.remove("box-borderDashed", "noScrollBar", "overflowHidden");
580+
this.$obContainer.removeClass("customizeUserPage", "noScrollBar", "overflowHidden");
577581
//unhide the ones that are needed
578582
if (this.options.ownPage === true) {
579583
if (state === "listing" || state === "listingOld") {
@@ -584,7 +588,7 @@ UserPageVw = pageVw.extend({
584588
this.$el.find('.js-pageCustomizationButtons').removeClass('hide');
585589
this.$el.find('#customizeControls').removeClass('hide');
586590
this.$el.find('.user-page-header-slim-bg-cover').addClass('user-page-header-slim-bg-cover-customize');
587-
this.$obContainer[0].classList.add("box-borderDashed", "noScrollBar", "overflowHidden");
591+
this.$obContainer.addClass("customizeUserPage", "noScrollBar", "overflowHidden");
588592
} else {
589593
this.$el.find('.js-pageButtons').removeClass('hide');
590594
}
@@ -1483,7 +1487,7 @@ UserPageVw = pageVw.extend({
14831487
}
14841488

14851489
//refresh the universal profile model
1486-
self.globalUserProfile.fetch();
1490+
//self.globalUserProfile.fetch();
14871491
} else if (data.success === false && !self.isRemoved()){
14881492
app.simpleMessageModal.open({
14891493
title: window.polyglot.t('errorMessages.serverError'),

0 commit comments

Comments
 (0)