Skip to content

Commit 01e5c13

Browse files
author
Matt Karl
committed
Better mobile support for preview client
1 parent e5e5553 commit 01e5c13

File tree

10 files changed

+48
-38
lines changed

10 files changed

+48
-38
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpringRollStudio",
3-
"version": "0.2.12",
3+
"version": "0.2.13",
44
"private": true,
55
"dependencies": {
66
"jqueryui": "*",

deploy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SpringRollStudio",
33
"description": "Application for SpringRoll projects",
4-
"version": "0.2.12",
4+
"version": "0.2.13",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/SpringRoll/SpringRollStudio"

installer/win32.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# These three must be integers
55
!define VERSIONMAJOR 0
66
!define VERSIONMINOR 2
7-
!define VERSIONBUILD 12
7+
!define VERSIONBUILD 13
88
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
99
# It is possible to use "mailto:" links in here to open the email client
1010
!define HELPURL "https://github.com/SpringRoll/SpringRollStudio/issues"

installer/win64.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# These three must be integers
55
!define VERSIONMAJOR 0
66
!define VERSIONMINOR 2
7-
!define VERSIONBUILD 12
7+
!define VERSIONBUILD 13
88
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
99
# It is possible to use "mailto:" links in here to open the email client
1010
!define HELPURL "https://github.com/SpringRoll/SpringRollStudio/issues"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SpringRollStudio",
33
"private": true,
4-
"version": "0.2.12",
4+
"version": "0.2.13",
55
"dependencies": {
66
"grunt": "^0.4.5",
77
"grunt-appdmg": "^0.3.1",

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpringRollStudio",
3-
"version": "0.2.12",
3+
"version": "0.2.13",
44
"main": [
55
"components/node-webkit-app/src/utils/UpdateChecker.js",
66
"components/node-webkit-app/src/utils/Browser.js",

src/jade/preview-client.jade

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ html
55
meta(charset='utf-8')
66
title Preview
77
include partials/libraries
8+
meta(name="apple-mobile-web-app-capable" content="yes")
9+
meta(name="apple-touch-fullscreen" content="yes")
810

911
block head
1012

1113
link(href='assets/css/shared.css', rel='stylesheet')
1214
link(href='assets/css/preview.css', rel='stylesheet')
1315
script(src='assets/js/preview-client.js')
14-
meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
16+
meta(name="viewport" content="minimal-ui, width=device-width, initial-scale=1.0, maximum-scale=1.0")
17+
1518
body(class=bodyClass)
1619
#frame.loading.show-title.show-controls
1720
block frame
@@ -23,9 +26,9 @@ html
2326
| Resume
2427
#appTitle Loading...
2528
.controls.text-right
26-
button#helpButton.btn.btn-primary.main.disabled(data-toggle='tooltip', title='Play Help')
29+
button#helpButton.btn.btn-primary.main.disabled(data-placement='bottom', data-toggle='tooltip', title='Play Help')
2730
span.icon.icon-help
28-
button#soundButton.btn.btn-primary.main.muted.disabled(data-toggle='tooltip', title='Toggle All Sounds')
31+
button#soundButton.btn.btn-primary.main.muted.disabled(data-placement='bottom', data-toggle='tooltip', title='Toggle All Sounds')
2932
span.icon.icon-sound.on
3033
span.icon.icon-sound-off.off
3134
button#soundToggle.btn.btn-primary.main.drop-handle.disabled(data-toggle-div='#soundContexts')
@@ -51,7 +54,7 @@ html
5154
span.icon.icon-vo-off.off
5255
span.label.on Voice-Over On
5356
span.label.off Voice-Over Off
54-
button#captionsButton.btn.btn-primary.main.muted.disabled(data-toggle='tooltip', title='Toggle Captions')
57+
button#captionsButton.btn.btn-primary.main.muted.disabled(data-placement='bottom', data-toggle='tooltip', title='Toggle Captions')
5558
span.icon.icon-captions.on
5659
span.icon.icon-captions-off.off
5760
button#captionsToggle.btn.btn-primary.main.drop-handle.disabled(data-toggle-div='#captionsStyles')
@@ -63,12 +66,12 @@ html
6366
| Captions Style
6467
.form-group
6568
label.col-xs-4.control-label Align
66-
.col-xs-8: select.form-control(name='align')
69+
.col-xs-8: select.pause-on-focus.form-control(name='align')
6770
option(value='top', selected='') Top
6871
option(value='bottom') Bottom
6972
.form-group
7073
label.col-xs-4.control-label Text Color
71-
.col-xs-8: select.form-control(name='color')
74+
.col-xs-8: select.pause-on-focus.form-control(name='color')
7275
option(value='white', selected='') White
7376
option(value='white-semi') White (50%)
7477
option(value='black') Black
@@ -81,7 +84,7 @@ html
8184
option(value='blue-semi') Blue (50%)
8285
.form-group
8386
label.col-xs-4.control-label Background Color
84-
.col-xs-8: select.form-control(name='background')
87+
.col-xs-8: select.pause-on-focus.form-control(name='background')
8588
option(value='none') [None]
8689
option(value='white') White
8790
option(value='white-semi') White (50%)
@@ -95,23 +98,23 @@ html
9598
option(value='blue-semi') Blue (50%)
9699
.form-group
97100
label.col-xs-4.control-label Edge Style
98-
.col-xs-8: select.form-control(name='edge')
101+
.col-xs-8: select.pause-on-focus.form-control(name='edge')
99102
option(value='none', selected='') [None]
100103
option(value='raise') Beveled Up
101104
option(value='depress') Beveled Down
102105
option(value='uniform') Stroke
103106
option(value='drop') Drop Shadow
104107
.form-group
105108
label.col-xs-4.control-label Size
106-
.col-xs-8: select.form-control(name='size')
109+
.col-xs-8: select.pause-on-focus.form-control(name='size')
107110
option(value='xs') Extra Small
108111
option(value='sm') Small
109112
option(value='md', selected='') Medium
110113
option(value='lg') Large
111114
option(value='xl') Extra Large
112115
.form-group
113116
label.col-xs-4.control-label Font
114-
.col-xs-8: select.form-control(name='font')
117+
.col-xs-8: select.pause-on-focus.form-control(name='font')
115118
option(value='arial', selected='') Arial
116119
option(value='arial-black') Arial Black
117120
option(value='comic-sans') Comic Sans MS
@@ -125,7 +128,7 @@ html
125128
option(value='times') Times New Roman
126129
option(value='trebuchet') Trebuchet MS
127130
option(value='verdana') Verdana
128-
button#settingsButton.btn.btn-primary.main.disabled(data-toggle-div='#settings', data-toggle='tooltip', title='Logging Service')
131+
button#settingsButton.btn.btn-primary.main.disabled(data-toggle-div='#settings', data-placement='bottom', data-toggle='tooltip', title='Logging Service')
129132
span.icon.icon-gear
130133
form#settings.drop-down.form.form-horizontal
131134
.form-group.form-title
@@ -134,15 +137,15 @@ html
134137
| Logging Service
135138
.form-group
136139
label.col-xs-4.control-label Host or IP
137-
.col-xs-8: input.form-control#remoteHost(type='text', name='remoteHost')
140+
.col-xs-8: input.pause-on-focus.form-control#remoteHost(type='text', name='remoteHost')
138141
.form-group
139142
label.col-xs-4.control-label Channel Name
140-
.col-xs-8: input.form-control#remoteChannel(type='text', name='remoteChannel')
143+
.col-xs-8: input.pause-on-focus.form-control#remoteChannel(type='text', name='remoteChannel')
141144
.form-group.text-center
142145
.col-xs-8.col-xs-offset-4
143146
button#remoteConnect.btn.btn-primary.btn-block.disabled(data-toggle-div='#settings')
144147
| Connect
145-
button#pauseButton.btn.btn-primary.main.unpaused.disabled(data-toggle='tooltip', title='Play/Pause')
148+
button#pauseButton.btn.btn-primary.main.unpaused.disabled(data-placement='bottom', data-toggle='tooltip', title='Play/Pause')
146149
span.icon.icon-pause.on
147150
span.icon.icon-play.off
148151

src/jade/preview.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ block frame
1212
#browserLink
1313

1414
block controls
15-
button#refreshButton.btn.btn-primary.main(data-toggle='tooltip', title='Reload')
15+
button#refreshButton.btn.btn-primary.main(data-placement='bottom', data-toggle='tooltip', title='Reload')
1616
span.glyphicon.glyphicon-refresh
17-
button#devToolsButton.btn.btn-primary.main(data-toggle='tooltip', title='Toggle Console')
17+
button#devToolsButton.btn.btn-primary.main(data-placement='bottom', data-toggle='tooltip', title='Toggle Console')
1818
span.glyphicon.glyphicon-list

src/js/preview/PreviewContainer.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@
147147
if (!Features.touch)
148148
{
149149
// Turn on the tooltips
150-
$('[data-toggle="tooltip"]').tooltip({
151-
placement: 'bottom'
152-
});
150+
$('[data-toggle="tooltip"]').tooltip();
153151
}
154152

155153
// Turn off the tool tip for the help button initially
@@ -242,9 +240,7 @@
242240
var helpButton = this.helpButton;
243241
if (enabled)
244242
{
245-
helpButton.tooltip({
246-
placement: 'bottom'
247-
});
243+
helpButton.tooltip();
248244
}
249245
else
250246
{

src/less/preview/Preview.less

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import 'preview-mixins';
33

44
@uiHeight: 40px;
5-
@uiHeightSmall: 80px;
65
@smBreak: 500px;
76

87
* {
@@ -62,11 +61,27 @@ body {
6261
}
6362
}
6463
@media screen and (max-width: @smBreak) {
65-
width:100%;
66-
margin-left:0;
64+
.scrollDropDowns();
65+
}
66+
.touch & {
67+
.scrollDropDowns();
6768
}
6869
}
6970

71+
.scrollDropDowns()
72+
{
73+
width:100%;
74+
margin-left:0;
75+
position:fixed;
76+
top:@uiHeight;
77+
bottom:0;
78+
left:0;
79+
right:0;
80+
overflow: auto;
81+
overflow-x: hidden;
82+
-webkit-overflow-scrolling: touch;
83+
}
84+
7085
#pausedScreen {
7186
z-index: 2;
7287
position: fixed;
@@ -137,15 +152,9 @@ body {
137152
}
138153
#pausedScreen {
139154
top:@uiHeight;
140-
@media screen and (max-width: @smBreak) {
141-
top:@uiHeightSmall;
142-
}
143155
}
144156
.appWrapper {
145157
top:@uiHeight;
146-
@media screen and (max-width: @smBreak) {
147-
top:@uiHeightSmall;
148-
}
149158
}
150159
}
151160
.controls {
@@ -216,7 +225,6 @@ body {
216225
.paused .on,
217226
.muted .on { display:none !important }
218227
@media screen and (max-width: @smBreak) {
219-
top:@uiHeight;
220228
width:100%;
221229
}
222230
}
@@ -232,6 +240,9 @@ body {
232240
.show-title & {
233241
display:block;
234242
}
243+
@media screen and (max-width: @smBreak) {
244+
display:none !important;
245+
}
235246
}
236247

237248
.appWrapper {

0 commit comments

Comments
 (0)