Skip to content

Commit 0f3b20d

Browse files
marcgurneykangas
authored andcommitted
INT-971 Tour CSS bug on window resize (#453)
Moved pager list to bottom of modal to make room for all the new steps we've added (cherry picked from commit 3838c56)
1 parent adb6c45 commit 0f3b20d

File tree

3 files changed

+65
-65
lines changed

3 files changed

+65
-65
lines changed

src/app/tour/index.jade

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
.pager
1919
button.previous-slide.hide Previous
2020
button.next-slide Next
21-
ul
22-
each feature, i in features
23-
- var id = 'f' + i
24-
- var cls = (i === 0) ? 'selected' : null
25-
li(id='#{id}', class='#{cls}', data-n='#{i}', title='#{feature.title}')
2621
.get-started-button-holder
2722
button#tour-remove.hide(type="button", class="btn btn-info") Get Started
23+
.clearfix
24+
.pager
25+
ul
26+
each feature, i in features
27+
- var id = 'f' + i
28+
- var cls = (i === 0) ? 'selected' : null
29+
li(id='#{id}', class='#{cls}', data-n='#{i}', title='#{feature.title}')

src/app/tour/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var TourView = View.extend({
7979
}
8080
},
8181
events: {
82-
'click #features ul': 'showFeature',
82+
'click .pager ul': 'showFeature',
8383
'click .previous-slide': 'showPreviousFeature',
8484
'click .next-slide': 'showNextFeature',
8585
'click #tour-remove': 'tourRemove',
@@ -170,7 +170,7 @@ var TourView = View.extend({
170170
var nFeature = parseInt(nCLick, 10);
171171

172172
// deselect old
173-
$('#features li.selected').removeClass('selected');
173+
$('.pager li.selected').removeClass('selected');
174174
$('.feature-content.active').removeClass('active');
175175

176176
// select new
@@ -194,11 +194,11 @@ var TourView = View.extend({
194194
var that = this;
195195

196196
// deselect old
197-
$('#features li.selected').removeClass('selected');
197+
$('.pager li.selected').removeClass('selected');
198198
$('.feature-content.active').removeClass('active');
199199

200200
// select new
201-
$('#features li#f' + previousFeature).addClass('selected');
201+
$('.pager li#f' + previousFeature).addClass('selected');
202202

203203
$('#animation-gif').one('webkitTransitionEnd', function() {
204204
that.$animationGIF.src = path.join(that.tourImagesFolder, that.features[previousFeature].image);
@@ -218,11 +218,11 @@ var TourView = View.extend({
218218
var that = this;
219219

220220
// deselect old
221-
$('#features li.selected').removeClass('selected');
221+
$('.pager li.selected').removeClass('selected');
222222
$('.feature-content.active').removeClass('active');
223223

224224
// select new
225-
$('#features li#f' + nextFeature).addClass('selected');
225+
$('.pager li#f' + nextFeature).addClass('selected');
226226

227227
$('#animation-gif').one('webkitTransitionEnd', function() {
228228
that.$animationGIF.src = path.join(that.tourImagesFolder, that.features[nextFeature].image);

src/app/tour/index.less

Lines changed: 52 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -76,72 +76,70 @@
7676
color: @gray4;
7777
height: 120px;
7878
}
79-
.pager {
80-
position: relative;
81-
-webkit-user-select: none;
82-
83-
button {
84-
position: absolute;
85-
display: block;
86-
color: @green2;
87-
border: none;
88-
background: none;
79+
.get-started-button-holder {
80+
text-align: center;
81+
margin-top: 100px;
8982

90-
&:hover {
91-
text-decoration: none;
92-
cursor: pointer;
93-
}
94-
}
95-
button.previous-slide {
96-
float: left;
97-
background: url('images/tour/pager-arrow-left.png') left 0 no-repeat;
98-
background-size: 10px 22px;
99-
padding: 1px 0 0 20px;
100-
left: 0;
83+
#tour-remove {
84+
opacity: 0;
85+
animation: fade-in 750ms ease-out 500ms forwards;
10186
}
102-
button.next-slide {
103-
float: right;
104-
background: url('images/tour/pager-arrow-right.png') right 0 no-repeat;
105-
background-size: 10px 22px;
106-
padding: 1px 20px 0 0;
107-
right: 0;
87+
}
88+
}
89+
.pager {
90+
position: relative;
91+
-webkit-user-select: none;
92+
margin-top: 0;
93+
94+
button {
95+
position: absolute;
96+
display: block;
97+
color: @green2;
98+
border: none;
99+
background: none;
100+
101+
&:hover {
102+
text-decoration: none;
103+
cursor: pointer;
108104
}
109105
}
106+
button.previous-slide {
107+
background: url('images/tour/pager-arrow-left.png') left 0 no-repeat;
108+
background-size: 10px 22px;
109+
padding: 1px 0 0 20px;
110+
left: 0;
111+
}
112+
button.next-slide {
113+
background: url('images/tour/pager-arrow-right.png') right 0 no-repeat;
114+
background-size: 10px 22px;
115+
padding: 1px 20px 0 0;
116+
right: 0;
117+
}
110118
ul {
111-
// position: absolute;
112119
display: block;
113120
margin-left: auto;
114121
margin-right: auto;
115122
padding: 0;
116-
// left: 120px;
117123
top: 2px;
118-
}
119-
li {
120-
display: inline-block;
121-
margin: 0 10px;
122-
width: 10px;
123-
height: 10px;
124-
border-radius: 6px;
125-
border: 1px solid @gray5;
126-
list-style: none;
127-
cursor: pointer;
128-
text-indent: -9999px;
129124

130-
&:hover {
131-
border-color: @green2;
132-
}
133-
}
134-
li.selected {
135-
background: @green2;
136-
border-color: @green2;
137-
}
138-
.get-started-button-holder {
139-
text-align: center;
140-
margin-top: 100px;
125+
li {
126+
display: inline-block;
127+
margin: 0 10px;
128+
width: 10px;
129+
height: 10px;
130+
border-radius: 6px;
131+
border: 1px solid @gray5;
132+
list-style: none;
133+
cursor: pointer;
134+
text-indent: -9999px;
141135

142-
#tour-remove {
143-
opacity: 0;
144-
animation: fade-in 750ms ease-out 500ms forwards;
136+
&:hover {
137+
border-color: @green2;
138+
}
139+
}
140+
li.selected {
141+
background: @green2;
142+
border-color: @green2;
145143
}
146144
}
147145
}

0 commit comments

Comments
 (0)