From 0b65c82938600e66d0234b3ed3f122b5a790690c Mon Sep 17 00:00:00 2001 From: Rob Misiorowski Date: Thu, 2 Jun 2016 15:01:43 -0700 Subject: [PATCH 1/3] fixing 1623, where discover tabs don't show after clearing search --- js/views/homeVw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/views/homeVw.js b/js/views/homeVw.js index 0aa4c22b2..2050cb87a 100644 --- a/js/views/homeVw.js +++ b/js/views/homeVw.js @@ -527,8 +527,9 @@ module.exports = pageVw.extend({ //clear address bar window.obEventBus.trigger("setAddressBar", {'addressText': ""}); - + this.$el.find('.js-discoverHeading').html(window.polyglot.t('Discover')); + this.$el.find('.js-homeListingToggle').removeClass('hide'); // change loading text copy this.$el.find('.js-loadingText').html(this.$el.find('.js-loadingText').data('defaultText')); From bac14a77343b51a06f863dffd29bc3b7cd9b115a Mon Sep 17 00:00:00 2001 From: Rob Misiorowski Date: Thu, 2 Jun 2016 15:17:03 -0700 Subject: [PATCH 2/3] 1164 - displaying reviews in reverse chronological order --- js/collections/ratingCl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/collections/ratingCl.js b/js/collections/ratingCl.js index 513532849..f9b46107c 100644 --- a/js/collections/ratingCl.js +++ b/js/collections/ratingCl.js @@ -17,6 +17,6 @@ module.exports = Backbone.Collection.extend({ return []; } - return response; + return response.reverse(); } }); \ No newline at end of file From 69931d2c40289f592c8208f27c78323335326f20 Mon Sep 17 00:00:00 2001 From: Rob Misiorowski Date: Thu, 2 Jun 2016 15:33:24 -0700 Subject: [PATCH 3/3] showing loading spinner when settings is initially loading --- css/obBase.css | 8 -------- js/router.js | 2 -- js/views/settingsVw.js | 8 +++++++- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/css/obBase.css b/css/obBase.css index 52fc38c4d..12f25162e 100644 --- a/css/obBase.css +++ b/css/obBase.css @@ -419,13 +419,6 @@ h6, .h6 { -webkit-app-region: no-drag; } -#appBar .title { - /* since the loading spinners are centered in a manner - where chat is excluded from the width, we'll follow - suit here so our title is centered with the spinners */ - width: calc(100% - 45px); -} - #pageNav .btn { -webkit-app-region: no-drag; } @@ -4434,7 +4427,6 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff { left: 0; top: 50%; margin-top: 117px; - margin-left: -40px; opacity: 1; transition: opacity 1s 5s ease; box-sizing: border-box; diff --git a/js/router.js b/js/router.js index b97afdd8b..464aaa2cf 100644 --- a/js/router.js +++ b/js/router.js @@ -444,8 +444,6 @@ module.exports = Backbone.Router.extend({ }, settings: function(state){ - $('.js-loadingModal').addClass('show'); - this.newView(settingsView, { viewArgs: { userModel: this.userModel, diff --git a/js/views/settingsVw.js b/js/views/settingsVw.js index 5e26a2d44..8f5619f8d 100644 --- a/js/views/settingsVw.js +++ b/js/views/settingsVw.js @@ -68,6 +68,8 @@ module.exports = pageVw.extend({ initialize: function(options){ var self = this; + + $('.js-loadingModal').removeClass('hide'); this.options = options || {}; /* expected options: userModel @@ -175,7 +177,6 @@ module.exports = pageVw.extend({ getBTPrice("USD", function (btAve, currencyList) { self.availableCurrenciesList = currencyList; self.render(); - $('.js-loadingModal').removeClass('show'); }); } }); @@ -183,6 +184,11 @@ module.exports = pageVw.extend({ error: function(model, response){ console.log(response); messageModal.show(window.polyglot.t('errorMessages.getError'), window.polyglot.t('errorMessages.userError')); + }, + complete: function() { + if (!self.isRemoved()) { + $('.js-loadingModal').addClass('hide'); + } } }); },