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

Commit 88fb0f5

Browse files
committed
Merge pull request #1054 from rmisio/tweaks
Tweaks
2 parents 1bf98ba + df4c9cd commit 88fb0f5

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

js/templates/pageConnectModal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</div>
66

77
<div class="content">
8-
<div class="statusText pad10 marginBottom12 inlineBlock <% ob.tooltip && print('tooltip') %>" <% ob.tooltip && print(`data-tooltip="${ob.tooltip}"`) %>><%= ob.statusText %></div>
8+
<div class="statusText pad10 marginBottom12 inlineBlock custCol-text <% ob.tooltip && print('tooltip') %>" <% ob.tooltip && print(`data-tooltip="${ob.tooltip}"`) %>><%= ob.statusText %></div>
99

1010
<div>
1111
<a class="btn btn-large custCol-secondary js-cancel btn-cancel">Cancel</a>

js/views/pageConnectModal.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@ module.exports = baseModal.extend({
3939
}
4040
},
4141

42-
onBackClick: function(e) {
43-
$(e.target).addClass('disabled');
42+
onBackClick: function() {
4443
this.trigger('back');
4544
},
4645

4746
onRetryClick: function() {
4847
this.trigger('retry');
4948
},
5049

51-
onCancelClick: function(e) {
52-
$(e.target).addClass('disabled');
50+
onCancelClick: function() {
5351
this.trigger('cancel');
5452
},
5553

js/views/userPageVw.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ module.exports = baseVw.extend({
363363
self.undoCustomAttributes.secondary_color = self.model.get('page').profile.secondary_color;
364364
self.undoCustomAttributes.text_color = self.model.get('page').profile.text_color;
365365
self.setCustomStyles();
366-
self.setState(self.state, self.currentItemHash);
366+
self.setState(self.state, self.currentItemHash, { replaceHistory: true });
367367

368368
//check if user is blocked
369369
if(!self.options.ownPage && isBlocked) {
@@ -445,13 +445,15 @@ module.exports = baseVw.extend({
445445
}
446446
},
447447

448-
setState: function(state, hash) {
448+
setState: function(state, hash, options) {
449449
"use strict";
450450
var currentAddress,
451451
addressState,
452452
currentHandle = this.model.get('page').profile.handle,
453453
isItemType = false;
454454

455+
options = options || {};
456+
455457
if(state === "listing"){
456458
//clear old templates
457459
this.$el.find('.js-list4').html("");
@@ -463,19 +465,19 @@ module.exports = baseVw.extend({
463465
}else if(state === "listingNew"){
464466
this.tabClick(this.$el.find(".js-storeTab"), this.$el.find(".js-store"));
465467
$('#obContainer').scrollTop(352);
466-
this.addTabToHistory('listingNew');
468+
this.addTabToHistory('listingNew', options.replaceHistory);
467469
this.sellItem();
468470
} else if(state === "createStore") {
469471
this.tabClick(this.$el.find(".js-aboutTab"), this.$el.find(".js-about"));
470-
this.addTabToHistory('about');
472+
this.addTabToHistory('about', options.replaceHistory);
471473
this.createStore();
472474
} else if(state === "becomeModerator"){
473475
this.tabClick(this.$el.find(".js-aboutTab"), this.$el.find(".js-about"));
474-
this.addTabToHistory('about');
476+
this.addTabToHistory('about', options.replaceHistory);
475477
this.showModeratorModal();
476478
} else if(state === "customize"){
477479
this.tabClick(this.$el.find(".js-aboutTab"), this.$el.find(".js-about"));
478-
this.addTabToHistory('about');
480+
this.addTabToHistory('about', options.replaceHistory);
479481
this.customizePage();
480482
}else if(state == "store"){
481483
//if this page is not a vendor, don't go to their store
@@ -485,7 +487,7 @@ module.exports = baseVw.extend({
485487
state="about";
486488
}
487489
this.tabClick(this.$el.find(".js-" + state + "Tab"), this.$el.find(".js-" + state));
488-
this.addTabToHistory(state);
490+
this.addTabToHistory(state, options.replaceHistory);
489491
}else if(state){
490492
this.tabClick(this.$el.find(".js-" + state + "Tab"), this.$el.find(".js-" + state));
491493
}else{
@@ -949,10 +951,10 @@ module.exports = baseVw.extend({
949951
showContent.removeClass('hide');
950952
},
951953

952-
addTabToHistory: function(state){
954+
addTabToHistory: function(state, replace){
953955
"use strict";
954956
//add action to history if not an item
955-
Backbone.history.navigate('#userPage/'+this.model.get('page').profile.guid + "/" + state);
957+
Backbone.history.navigate('#userPage/'+this.model.get('page').profile.guid + "/" + state, { replace: true });
956958
},
957959

958960
sellItem: function(){

0 commit comments

Comments
 (0)