From: Vincent Vanwaelscappel Date: Tue, 19 Apr 2022 12:34:56 +0000 (+0200) Subject: wait #5189 @7 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d53ab4a5835e5432fdf79be658d25b2f117fefe9;p=Animations.git wait #5189 @7 --- diff --git a/RedbullShopper101/HaveAGuess/HaveAGuess.zip b/RedbullShopper101/HaveAGuess/HaveAGuess.zip index 3df7058..652025c 100644 Binary files a/RedbullShopper101/HaveAGuess/HaveAGuess.zip and b/RedbullShopper101/HaveAGuess/HaveAGuess.zip differ diff --git a/RedbullShopper101/HaveAGuess/haveaguess.js b/RedbullShopper101/HaveAGuess/haveaguess.js index d4720ec..03c05fb 100644 --- a/RedbullShopper101/HaveAGuess/haveaguess.js +++ b/RedbullShopper101/HaveAGuess/haveaguess.js @@ -88,12 +88,19 @@ $(function () { $(document).on('click', '#prev', function () { showScreen(window.currentQuestion - 1, true); + return false; }); $(document).on('click', '#next', function () { showScreen(window.currentQuestion + 1, true); + return false; + }); + $(document).on('click', '#nextpage', function () { + parent.fluidbook.goNextPage(); + return false; + }); }); function showScreen(n, isQ) { @@ -107,13 +114,16 @@ function showScreen(n, isQ) { if (isQ) { $("#submit").show(); + $("#nextpage").hide(); setChoices(n); } else { $("#submit").hide(); if (n === 5) { $("#next").hide(); + $("#nextpage").show(); } else { $("#next").show(); + $("#nextpage").hide(); } revealAnswers(n); } diff --git a/RedbullShopper101/HaveAGuess/index.html b/RedbullShopper101/HaveAGuess/index.html index 765c17d..1a6298b 100644 --- a/RedbullShopper101/HaveAGuess/index.html +++ b/RedbullShopper101/HaveAGuess/index.html @@ -28,7 +28,7 @@ font-style: normal; } - body{ + body { opacity: 0; } @@ -199,6 +199,7 @@
+
Next
Submit
diff --git a/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164036.png b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164036.png new file mode 100644 index 0000000..9180184 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164036.png differ diff --git a/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164805.png b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164805.png new file mode 100644 index 0000000..5037176 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 164805.png differ diff --git a/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 165159.png b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 165159.png new file mode 100644 index 0000000..2b5c405 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/Screenshot 2022-03-30 165159.png differ diff --git a/RedbullShopper101/VisualTriggers/VisualTriggers.pdf b/RedbullShopper101/VisualTriggers/VisualTriggers.pdf new file mode 100644 index 0000000..e988542 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/VisualTriggers.pdf differ diff --git a/RedbullShopper101/VisualTriggers/VisualTriggers.zip b/RedbullShopper101/VisualTriggers/VisualTriggers.zip new file mode 100644 index 0000000..5774d7a Binary files /dev/null and b/RedbullShopper101/VisualTriggers/VisualTriggers.zip differ diff --git a/RedbullShopper101/VisualTriggers/bt-contrast.png b/RedbullShopper101/VisualTriggers/bt-contrast.png new file mode 100644 index 0000000..026fda6 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/bt-contrast.png differ diff --git a/RedbullShopper101/VisualTriggers/bt-movement.png b/RedbullShopper101/VisualTriggers/bt-movement.png new file mode 100644 index 0000000..6d12f27 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/bt-movement.png differ diff --git a/RedbullShopper101/VisualTriggers/bt-pattern.png b/RedbullShopper101/VisualTriggers/bt-pattern.png new file mode 100644 index 0000000..799485f Binary files /dev/null and b/RedbullShopper101/VisualTriggers/bt-pattern.png differ diff --git a/RedbullShopper101/VisualTriggers/bt-recognition.png b/RedbullShopper101/VisualTriggers/bt-recognition.png new file mode 100644 index 0000000..4a3a2a8 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/bt-recognition.png differ diff --git a/RedbullShopper101/VisualTriggers/bt-repetition.png b/RedbullShopper101/VisualTriggers/bt-repetition.png new file mode 100644 index 0000000..f78ea63 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/bt-repetition.png differ diff --git a/RedbullShopper101/VisualTriggers/fc.woff b/RedbullShopper101/VisualTriggers/fc.woff new file mode 100644 index 0000000..3521d4c Binary files /dev/null and b/RedbullShopper101/VisualTriggers/fc.woff differ diff --git a/RedbullShopper101/VisualTriggers/index.html b/RedbullShopper101/VisualTriggers/index.html new file mode 100644 index 0000000..a92c127 --- /dev/null +++ b/RedbullShopper101/VisualTriggers/index.html @@ -0,0 +1,229 @@ + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-1.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-1.jpg new file mode 100644 index 0000000..ad83df3 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-1.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-2.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-2.jpg new file mode 100644 index 0000000..b0c8a3c Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-2.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-3.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-3.jpg new file mode 100644 index 0000000..ce3f0e8 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-3.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-4.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-4.jpg new file mode 100644 index 0000000..022f64a Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-4.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-5.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-5.jpg new file mode 100644 index 0000000..1808434 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-5.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers-6.jpg b/RedbullShopper101/VisualTriggers/visualtriggers-6.jpg new file mode 100644 index 0000000..9901630 Binary files /dev/null and b/RedbullShopper101/VisualTriggers/visualtriggers-6.jpg differ diff --git a/RedbullShopper101/VisualTriggers/visualtriggers.js b/RedbullShopper101/VisualTriggers/visualtriggers.js new file mode 100644 index 0000000..b8cebce --- /dev/null +++ b/RedbullShopper101/VisualTriggers/visualtriggers.js @@ -0,0 +1,109 @@ +$(function () { + window.activeScreen = 0; + window.answers = {}; + + $(document).on('click', "#submit,#next,#start", function () { + if (window.activeScreen == 6) { + parent.fluidbook.goNextPage(); + } else { + setActiveScreen(window.activeScreen + 1); + } + return false + }); + + $(document).on('click', "[data-a]:not(.active,.done)", function () { + $('[data-a].active').removeClass('active'); + $(this).addClass('active'); + var a = $(this).data('a'); + $('[data-t]').hide(); + $('[data-t="' + a + '"],[data-t="wrong"]').show(); + return false; + }); + + $(document).on('click', '[data-t]', function (e) { + var aa = $('[data-a].active'); + if (aa.length === 0) { + return false; + } + if (window.answers[window.activeScreen] === undefined || window.answers[window.activeScreen] === null) { + window.answers[window.activeScreen] = {}; + } + var a = aa.data('a'); + var t = $(this).data('t'); + window.answers[window.activeScreen][a] = t; + + $('body').append('
'); + + aa.addClass('done').removeClass('active'); + }); + + + for (var i = 1; i <= 6; i++) { + $('#screen_' + i).html(''); + var map = $('map[name="map_' + i + '"]'); + if (map.length === 0) { + continue; + } + var coef = $(map).data('coef'); + if (coef === null) { + coef = 1; + } + $(map).find('area').each(function () { + var a = $(''); + var coords = splitCoords($(this).attr('coords'), coef); + $(a).css({top: coords[1], left: coords[0], width: coords[2] - coords[0], height: coords[3] - coords[1]}); + $("#screen_" + i).append($(a)); + }); + } + + setActiveScreen(0) +}); + +function splitCoords(c, coef) { + if (coef === undefined) { + coef = 1; + } + c = c.replace(/\s,/g, ','); + var r = c.split(','); + var res = []; + for (var i = 0; i < r.length; i++) { + res[i] = parseFloat(r[i]) * coef; + } + return res; +} + +function setActiveScreen(i) { + window.activeScreen = i; + $('body').attr('data-screen', i); + $('[data-screens]').each(function () { + if ($(this).data('screens').toString().split(',').indexOf(i.toString()) >= 0) { + $(this).show(); + } else { + $(this).hide(); + } + }); + setTimeout(function () { + $('#screens > div:not(#screen_' + i + ')').removeClass('show'); + }, 300) + $("#screen_" + i).addClass('show'); + $(".m").remove(); + $(".done,.active").removeClass('active').removeClass('done'); + updateScore(); +} + +function updateScore() { + var s = 0; + $.each(window.answers, function (k, v) { + var ok = true; + $.each(v, function (kk, vv) { + if (vv === 'wrong') { + ok = false; + } + }); + if (ok) { + s++; + } + }); + + $("#score").text(s + "/3"); +} \ No newline at end of file