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

Commit 7ade1db

Browse files
committed
Remove customize class in remove function of userPage
- closes #1765
1 parent 5bdf3ad commit 7ade1db

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

js/views/userPageVw.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ UserPageVw = pageVw.extend({
311311
self.model.set({ownPage: self.options.ownPage});
312312
self.render();
313313
!self.currentItemHash && self.loadingDeferred.resolve();
314-
314+
315315
// Handle was requested
316316
if (profile.handle) {
317317
window.obEventBus.trigger('handleObtained', profile);
@@ -428,7 +428,7 @@ UserPageVw = pageVw.extend({
428428
console.log(errorMessage);
429429
}
430430
});
431-
431+
432432
self.scrollHandler = __.bind(
433433
__.throttle(self.onScroll, 100),
434434
self
@@ -461,7 +461,7 @@ UserPageVw = pageVw.extend({
461461
.show();
462462
this.$('.user-page-navigation-buttons').removeClass('positionFixed positionTop68');
463463
this.$backToTop.removeClass('slideUp');
464-
}
464+
}
465465
},
466466

467467
clickBackToTop: function() {
@@ -470,7 +470,7 @@ UserPageVw = pageVw.extend({
470470
this.$backToTop.removeClass('slideUp');
471471
}
472472
});
473-
},
473+
},
474474

475475
setCustomStyles: function() {
476476
var self = this,
@@ -617,15 +617,15 @@ UserPageVw = pageVw.extend({
617617
}
618618
}
619619
},
620-
621-
setFollowingPlaceholder: function(totalLength, currentLength) {
620+
621+
setFollowingPlaceholder: function(totalLength, currentLength) {
622622
if (totalLength > currentLength) {
623623
this.$('#inputFollowing').attr('placeholder', window.polyglot.t('SearchForFollowingPlaceholderMore'));
624624
} else {
625625
this.$('#inputFollowing').attr('placeholder', window.polyglot.t('SearchForFollowingPlaceholder'));
626626
}
627627
},
628-
628+
629629
setFollowersPlaceholder: function(totalLength, currentLength) {
630630
if (totalLength > currentLength) {
631631
this.$('#inputFollowers').attr('placeholder', window.polyglot.t('SearchForFollowersPlaceholderMore'));
@@ -682,15 +682,15 @@ UserPageVw = pageVw.extend({
682682
app.simpleMessageModal.open({
683683
title: window.polyglot.t('errorMessages.notFoundError'),
684684
message: window.polyglot.t('Listings')
685-
});
685+
});
686686
},
687687
complete: function (xhr, textStatus) {
688688
if (textStatus == 'parsererror') {
689689
app.simpleMessageModal.open({
690690
title: window.polyglot.t('errorMessages.serverError'),
691691
message: window.polyglot.t('errorMessages.badJSON')
692692
});
693-
693+
694694
throw new Error("The listings data returned from the API has a parsing error.");
695695
}
696696
}
@@ -711,7 +711,7 @@ UserPageVw = pageVw.extend({
711711
app.simpleMessageModal.open({
712712
title: window.polyglot.t('errorMessages.notFoundError'),
713713
message: window.polyglot.t('Reviews')
714-
});
714+
});
715715
}
716716
});
717717
},
@@ -731,7 +731,7 @@ UserPageVw = pageVw.extend({
731731
});
732732
self.renderFollowing(followingArray);
733733
self.setFollowingPlaceholder(followingArray.length, self.ownFollowing.length);
734-
734+
735735
//call followers 2nd so list of following is available
736736
self.fetchFollowers();
737737
} else {
@@ -747,10 +747,10 @@ UserPageVw = pageVw.extend({
747747
});
748748
self.renderFollowing(followingArray);
749749
self.setFollowingPlaceholder(followingArray.length, self.ownFollowing.length);
750-
750+
751751
//call followers 2nd so list of following is available
752752
self.fetchFollowers();
753-
753+
754754
//mark whether page is following you
755755
if (self.options.ownPage === false && Boolean(__.findWhere(followingArray, {guid: self.userID}))){
756756
self.$('.js-followsMe').removeClass('hide');
@@ -769,7 +769,7 @@ UserPageVw = pageVw.extend({
769769
},
770770
error: function(){
771771
if (self.isRemoved()) return;
772-
772+
773773
app.simpleMessageModal.open({
774774
title: window.polyglot.t('errorMessages.notFoundError'),
775775
message: window.polyglot.t('Following')
@@ -796,7 +796,7 @@ UserPageVw = pageVw.extend({
796796
//don't fetch again if all of the followers have been fetched
797797
return;
798798
}
799-
799+
800800
if (this.fetchingFollowers){
801801
//don't cue up multiple calls
802802
return;
@@ -809,7 +809,7 @@ UserPageVw = pageVw.extend({
809809
} else {
810810
fetchFollowersParameters = $.param({'guid': this.pageID, 'start': this.followerFetchStart});
811811
}
812-
812+
813813
this.followers.fetch({
814814
data: fetchFollowersParameters,
815815
success: (model)=> {
@@ -828,11 +828,11 @@ UserPageVw = pageVw.extend({
828828
},
829829
error: function(){
830830
if (self.isRemoved()) return;
831-
831+
832832
app.simpleMessageModal.open({
833833
title: window.polyglot.t('errorMessages.notFoundError'),
834834
message: window.polyglot.t('Followers')
835-
});
835+
});
836836
},
837837
complete: function(xhr, textStatus) {
838838
self.fetchingFollowers = false;
@@ -973,7 +973,7 @@ UserPageVw = pageVw.extend({
973973
});
974974
},
975975

976-
renderFollowing: function (model) {
976+
renderFollowing: function (model) {
977977
model = model || [];
978978
this.followingList = new personListView({
979979
model: model,
@@ -1002,7 +1002,7 @@ UserPageVw = pageVw.extend({
10021002
if (this.followingSearch){
10031003
this.followingSearch.reIndex();
10041004
searchTerms && this.followingSearch.search(searchTerms);
1005-
1005+
10061006
this.setFollowingPlaceholder(model.length, this.followingSearch.size());
10071007
}
10081008
});
@@ -1061,7 +1061,7 @@ UserPageVw = pageVw.extend({
10611061
app.simpleMessageModal.open({
10621062
title: window.polyglot.t('errorMessages.notFoundError'),
10631063
message: window.polyglot.t('Listing')
1064-
});
1064+
});
10651065
},
10661066
complete: function(xhr, textStatus) {
10671067
if (textStatus == 'parsererror'){
@@ -1241,7 +1241,7 @@ UserPageVw = pageVw.extend({
12411241
// set recommendations
12421242
$customColorChoice.css('background', '#fff'); // reset to white to give a cool transition
12431243
$customColorChoice.first().css('background', 'transparent'); // set to transparent
1244-
1244+
12451245
for (var i = 2; i <= 6; i++) {
12461246
$customColorChoice.eq(i).css('background', recommendedPrimaryColors[Math.floor(Math.random() * recommendedPrimaryColors.length)]); // random colors to start
12471247
}
@@ -1296,7 +1296,7 @@ UserPageVw = pageVw.extend({
12961296
// set recommendations
12971297
$customColorChoice.css('background', '#fff'); // reset to white to give a cool transition
12981298
$customColorChoice.first().css('background', 'transparent'); // set to transparent
1299-
1299+
13001300
for (var i = 2; i <= 6; i++) {
13011301
$customColorChoice.eq(i).css('background', shadeColor2(secondaryColor, shades[i-2])); // 70% darker than primary_color
13021302
}
@@ -1310,7 +1310,7 @@ UserPageVw = pageVw.extend({
13101310
},
13111311

13121312
displayCustomizeTextColor: function() {
1313-
1313+
13141314
var $customizeTextColorRecommendations = this.$el.find('.customizeTextColorRecommendations'),
13151315
$customColorChoice = $customizeTextColorRecommendations.find('.customColorChoice');
13161316

@@ -1420,13 +1420,13 @@ UserPageVw = pageVw.extend({
14201420
app.simpleMessageModal.open({
14211421
title: window.polyglot.t('errorMessages.saveError'),
14221422
message: window.polyglot.t('errorMessages.serverError')
1423-
});
1423+
});
14241424
}
14251425
} else if (data.success === false){
14261426
app.simpleMessageModal.open({
14271427
title: window.polyglot.t('errorMessages.serverError'),
14281428
message: '<i>' + data.reason + '</i>'
1429-
});
1429+
});
14301430
}
14311431
},
14321432
error: function (jqXHR, status, errorThrown) {
@@ -1493,7 +1493,7 @@ UserPageVw = pageVw.extend({
14931493
app.simpleMessageModal.open({
14941494
title: window.polyglot.t('errorMessages.serverError'),
14951495
message: '<i>' + data.reason + '</i>'
1496-
});
1496+
});
14971497
}
14981498
},
14991499
error: function(jqXHR, status, errorThrown){
@@ -1595,7 +1595,7 @@ UserPageVw = pageVw.extend({
15951595

15961596
createStore: function() {
15971597
var storeWizardModel = new Backbone.Model();
1598-
1598+
15991599
storeWizardModel.set(this.model.attributes);
16001600
this.storeWizardView && this.storeWizardView.remove();
16011601
this.storeWizardView = new storeWizardVw({
@@ -1833,7 +1833,7 @@ UserPageVw = pageVw.extend({
18331833
this.needsNSFWWarning = false;
18341834
this.showNSFWContent = true;
18351835
this.showNSFW = true;
1836-
1836+
18371837
if (this.state == "listing") {
18381838
this.renderItem(this.currentItemHash);
18391839
}
@@ -1847,7 +1847,7 @@ UserPageVw = pageVw.extend({
18471847
remove: function(){
18481848
// close colorbox to make sure the overlay doesnt remain open when going to a different page
18491849
//$.colorbox.close();
1850-
$('#obContainer').off('scroll', this.onScroll);
1850+
$('#obContainer').off('scroll', this.onScroll).removeClass('customizeUserPage ');
18511851

18521852
pageVw.prototype.remove.apply(this, arguments);
18531853
}

0 commit comments

Comments
 (0)