-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
353 lines (290 loc) · 13.9 KB
/
index.html
File metadata and controls
353 lines (290 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<html manifest="quicker.appcache">
<head>
<script src="jquery.js"></script>
<script src="jQuery.tubeplayer.min.js"></script>
<title>Zap Guitar</title>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
</style>
<script>
//var isAnalytics = !true;
function pressedSongsButton(){
//alert("hii");
window.location.href="command?action=toggleSongsScreen&attrib=1";
}
function changeVideo(_num){
//GANT T&T page: selected category 1
if(isAnalytics){
window.location.href='command?GANTevent=TipsAndTricks,select tab,'+_num;
}
var noInfoYoutube = "?HD=1;rel=0;showinfo=0;enablejsapi=1";
var link;
if (_num ==1 ){
link = "http://54.235.156.79/zapguitar/youtube/video1.html";
}else{
link = "http://54.235.156.79/zapguitar/youtube/video2.html";
}
$("#player").attr("src", link + noInfoYoutube);
//tips text selector
$(".tips").addClass("hideTips");
var openTips = "#tipsTricksText" + _num;
$(openTips).removeClass("hideTips");
//video#Button highlight
var selectedTTTab;
for (var i=1; i<=2; i++){
selectedTTTab = "#video" + i +"Button" ;
$(selectedTTTab).removeClass("checkedTab");
}
//alert(selectedTTTab);
selectedTTTab = "#video" + _num +"Button"
setTimeout(function(){
$(selectedTTTab).addClass("checkedTab");
},10);
}
function closeTipsWindow(){
//tipsAndTricksWindow
// var myTextField = document.getElementById('tipsAndTricksWindow');
//document.getElementById('tipsAndTricksWindow').style.visibility = 'hidden';
//document.getElementById('tipsAndTricksWindow').style.left = '1000px';
//player = document.getElementById('ytplayer');
setTimeout(function(){stopVideo();},100);
$('#tipsAndTricksWindow').css('-webkit-transform', 'translate(1024px,0px)').css('opacity','0.0');
setTimeout(function(){$("#tipsAndTricksWindow").hide()},1000);
//GANT T&T page: "Back"
if(isAnalytics){
window.location.href="command?GANTview=Home Screen";
}
}
function closeFeedbackWindow(){
$('#feedbackScreen').css('-webkit-transform', 'translate(0px,-500px)').css('opacity','0.0');
setTimeout(function(){$("#feedbackScreen").hide()},1000);
//GANT Feedback pop-up close (x)
if(isAnalytics){
window.location.href="command?GANTevent=Feedback,close,close";
}
}
function isStringEmpty(_string) {
if (!_string.match(/\S/)) {
return (true);
} else {
return false;
}
}
function openTipsWindow(){
// alert(navigator.onLine);
document.getElementById('tipsAndTricksWindow').style.visibility = 'visible';
$("#tipsAndTricksWindow").show();
setTimeout(function(){
$('#tipsAndTricksWindow').css('-webkit-transform', 'translate(0px,0px)').css('opacity','1.0');
},0);
setTimeout(function(){
changeVideo(1);
},0);
//GANT Entered Tips & Tricks page
if(isAnalytics){
window.location.href="command?GANTcustomVar=6,YES&GANTevent=TipsAndTricks,enter tnt page,enter tnt page&GANTview=TipsAndTricks";
}
//setTimeout($('#tipsAndTricksWindow').css('-webkit-transform', 'translate(0px,200px)'), 4000);
}
function openFeedbackWindow(){
document.getElementById('feedbackScreen').style.visibility = 'visible';
$("#feedbackScreen").show();
setTimeout(function(){
$('#feedbackScreen').css('-webkit-transform', 'translate(0px,0px)').css('opacity','1.0');
},0);
//GANT Feedback pop-up
if(isAnalytics){
window.location.href="command?GANTevent=Feedback,popup,popup";
}
//setTimeout($('#tipsAndTricksWindow').css('-webkit-transform', 'translate(0px,200px)'), 4000);
}
//stop playback video
function scrollScreenToZero(){
setTimeout(function() {
window.scrollTo(0, 0);
},0);
}
window.onload = function (){
setTimeout(function(){
changeVideo(2);
},300);
}
function facebookLink(){
//alert('facebook');
//window.location.href="command?openInBrowser=fb://profile/372793639441679";
//GANT Click on FB link AND go to Facebook
if(isAnalytics){
window.location.href="command?GANTevent=Facebook link,Facebook link,Facebook link&openInBrowser=fb://profile/372793639441679";
}
}
</script>
</head>
<body ontouchstart="">
<!-- <img src="songsButton.png" class="butonClass" alt="songs" name="songsButon" width="293" height="200" id="songsButon" onClick="pressedSongsButton()" /> -->
<div class="butonClass" id="songsButon" onClick="pressedSongsButton()"><br>Songs</div>
<div class="butonClass" id="tipsButon" onClick="openTipsWindow()"><br>Tips & Tricks</div>
<!-- <img src="tipsButton.png" class="butonClass" alt="songs" name="songsButon" width="293" height="200" id="tipsButon" onClick="openTipsWindow()"/>
--> <div id="feedbackButton" class="butonClass" onClick="openFeedbackWindow()">
<div style="font-size: 32px; padding-top: 12px;">We hear you!</div>
<div style="font-size: 4px; color: transparent;"> -</div>
<div> Bugs? Requests?</div>
<div>Let us know...</div>
</div>
<div id="poweredBy">Powered by</div>
<img src="img/instrumagic_logo1@2x~ipad.png" class="" alt="songs" name="songsButon" width="293" height="200" id="instrumagicLogo" onClick=""/>
<div alt="FB" name="facebookLinkButon" width="45" height="45" id="facebookLink" onClick="facebookLink()"></div>
<!-- <a id="facebookLink" onclick="facebookLink();">Link</a> -->
<img src="img/zapGuitarLogo.png" alt="ZapGuitar" name="zapGuitarLogo" width="461" height="111" id="zapGuitarLogo" />
<img src="img/ZGBlackFret@2x~ipad.png" alt="ZapGuitar" name="zapGuitarLogo" width="146" height="124" id="zapGuitarLogoPick" />
<div id="tipsAndTricksWindow">
<!-- <img src="zapGuitarLogo.png" alt="ZapGuitar" name="zapGuitarLogo" width="461" height="111" id="zapGuitarLogoTips" /> -->
<div id="tipsTricksExtraLogo" onClick="changeVideo(1)">Tips & Tricks</div>
<div id="tipsTricksMainText">
Choose a song or add a new one <br>
Edit songs - enter your own lyrics and chords <br>
Have fun playing!
</div>
<div id="subTipsBackground"></div>
<div id="tipsTricksText1" class="tips">
Strum the strings and ZAP to the next chord <br>
Shake iPad for vibrato effect <br>
Tap below the strings to choke the sound <br>
***Turn Multitasking Gestures off! <br>
</div>
<div id="tipsTricksText2" class="tips">
Add a new song<br>
Type in or paste your lyrics & chords<br>
Use the chords keyboard<br>
You can play while editing<br>
Undo not available yet - type carefully...<br>
When you’re done, press “Save & Play”<br>
</div>
<div id="tipsTricksText3" class="tips">
-aaa<br>
-aaa <br>
-ff <br>
-ddd
</div>
<div id="video1Button" class="butonClass" onClick="changeVideo(1)">How to play</div>
<div id="video2Button" class="butonClass" onClick="changeVideo(2)">Add / edit songs</div>
<!-- <div id="video3Button" class="butonClass" onClick="changeVideo(3)">Advanced</div> -->
<div id="closeTipsButton" class="butonClass" onClick="closeTipsWindow()">Back</div>
<div id="noInternet">Searching for internet</div>
<div id="youtubeVideo">
<div id="player"></div>
</div>
</div>
<div id="feedbackScreen">
<div id="feedbackScreenPreText">
Any feedback is welcome
</div>
<br>
<!-- MAILTO:someone@example.com -->
<form method="post" id="feedbackForm" action="">
Your name:<br><input id="nameTextArea" type="text" class="textInput" name="name_of_user" placeholder="myname" onFocus="scrollScreenToZero()"><br>
Your email:<br><input id="emailTextArea" type="text" class="textInput" name="email_of_user" placeholder="my@email.com" onFocus="scrollScreenToZero()"><br>
talk to us<br>
<textarea id="commentTextArea" class="textInput" name="free_text" cols="25" rows="4" placeholder="wassup" onFocus="scrollScreenToZero()"></textarea>
<input id="nameTextArea" type="text" class="textInput" name="app_name" value="ZapGuitar" onFocus="scrollScreenToZero()" style="visibility: hidden;"></input>
<input id="submitButton" type="submit" value="Send feedback" />
</form>
<div id="closeFeedbackButton" class="butonClass" onClick="closeFeedbackWindow()">Close</div>
</div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
// This is a protocol-relative URL as described here:
// http://paulirish.com/2010/the-protocol-relative-url/
// If you're testing a local page accessed via a file:/// URL, please set tag.src to
// "https://www.youtube.com/iframe_api" instead.
//tag.src = "https://www.youtube.com/iframe_api";
tag.src = "iframe_api.html"
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '300',
width: '530',
videoId: 'G3Py8hojFlY',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
//event.target.playVideo();
}
// 5. The API calls this function when the player's state changes.
// The function indicates that when playing a video (state=1),
// the player should play for six seconds and then stop.
//var done = false;
function onPlayerStateChange(event) {
//alert('ready');
}
function stopVideo() {
player.stopVideo();
changeVideo(1);
}
function msgbox(_msg){
var iframe = document.createElement("IFRAME");
iframe.setAttribute("src", 'data:text/plain,');
document.documentElement.appendChild(iframe);
window.frames[1].window.alert(_msg);
iframe.parentNode.removeChild(iframe);
}
//check email
function validateEmail(email)
{
var re = /\S+@\S+\.\S+/;
return re.test(email);
}
$("#feedbackForm").submit(function() {
// $("#emailTextArea").val();
// $("#commentTextArea").val();
//Send the serialized data to formProcessor.php.
if(!validateEmail($("#emailTextArea").val())){
msgbox("Please enter your email");
}else{
$.post("http://instru-magic.com/zg/songfull_feedback.php", $("#feedbackForm").serialize(),
//Take our repsonse, and replace whatever is in the "formResponse"
//div with it.
function(data) {
// $("#feedbackForm").html(data);
msgbox("Thank you");
setTimeout(function(){closeFeedbackWindow();},100);
var feedbackText = "{";
feedbackText += $("#nameTextArea").val();
feedbackText += "}";
var emailFB = $("#emailTextArea").val();
// alert(_name);
if (emailFB!=""){
feedbackText += "{";
feedbackText += $("#emailTextArea").val();
feedbackText += "}";
}
feedbackText += "{";
feedbackText += $("#commentTextArea").val();
feedbackText += "}";
//alert(feedbackText);
//GANT T&T page: selected category 1
if(isAnalytics){
window.location.href='command?GANTevent=Feedback,send,'+feedbackText;
}
}
)
.error(function() {
msgbox("I was not able to send your feedback");
});
}
return false;
});
</script>
</body>
</html>