diff --git a/controllers/feedback/views/index.jade b/controllers/feedback/views/index.jade index 8e5edb3..fd194e8 100644 --- a/controllers/feedback/views/index.jade +++ b/controllers/feedback/views/index.jade @@ -1,21 +1,41 @@ extends ../../../views/base.jade -mixin question(id, qu) - label(for="#{id}") #{qu} +mixin question(id, qu, info) + label(for="#{id}", style={'margin-right':'10px'}) #{qu} + if (info !== undefined) + span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}') input.form-control(name="answer#{id}", type="text", placeholder="Answer") +mixin rate(id, qu, info) + label(for="anwser#{id}", style={'margin-right':'10px'}) #{qu} + if (info !== undefined) + span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}') + input.rating(id="answer#{id}", name="answer#{id}", type="number", min='0', max='5', step='1', default='3') + block extrahead link(rel="stylesheet", href="/static/css/feedback.css") + link(rel="stylesheet", href="/static/css/star-rating.min.css") + +block extrajs + script(src="/static/js/star-rating.min.js") + script $(function () { $('[data-toggle="tooltip"]').tooltip() }) + script. + var liste = [1,2]; + for (var i = 0; i < liste.length; i++) { + $("#answer" + liste[i]).rating({showClear: false, showCaption: false, size:'xs'}); + $("#answer" + liste[i]).rating('update', 3); + } block content form.form-signin(method="POST", action='/feedback-target') h2 Please give us your feedback - +question(1, "Did you have trouble to find the coins without the recommendations ?") - +question(2, "Did the recommendations helped you to find the coins ?") - +question(3, "Did the recommendations helped you to browser the scene ?") - +question(4, "Do you think recommendations can be helpful ?") - +question(5, "Which recommendation style do you prefer and why ?") + +rate(1, "What was the difficulty level without recommendation ?", "1 star if it was very easy, 5 stars if it was very difficult") + +rate(2, "What was the difficulty level with recommendation ?", "1 star if it was very easy, 5 stars if it was very difficult") + +question(3, "Did the recommendations help you to find the coins ?") + +question(4, "Did the recommendations help you to browse the scene ?") + +question(5, "Do you think recommendations can be helpful ?") + +question(6, "Which recommendation style do you prefer and why ?") //-label(for='input1') Did you have trouble to find the coins during the first step ? //-input#input1.form-control(name="input1", type="text", placeholder='Id') diff --git a/controllers/intro/views/index.jade b/controllers/intro/views/index.jade index af20e75..0a9547c 100644 --- a/controllers/intro/views/index.jade +++ b/controllers/intro/views/index.jade @@ -9,4 +9,12 @@ block content li When you finish the tutorial, the main part will start. There will be 3 scenes and you will be asked to complete tasks. li Once you finished, there will be a short questionnary so we can know what you think of our interface. - h2 You can now start when you are ready + h2#start + +block extrajs + script. + if ($.browser.chrome || $.browser.mozilla) { + $('#start').html('You can now start when you are ready'); + } else { + $('#start').html('Sorry, your browser is not compatible... please try again with Firefox or Chrome'); + } diff --git a/controllers/prototype/views/user_study.jade b/controllers/prototype/views/user_study.jade index d413401..aa6eb53 100644 --- a/controllers/prototype/views/user_study.jade +++ b/controllers/prototype/views/user_study.jade @@ -13,6 +13,7 @@ block extrajs size: 'xs' }); $('#3dgames').rating('update', 3); + script $(function () { $('[data-toggle="tooltip"]').tooltip() }) block extrabody if identificationFailed @@ -52,11 +53,14 @@ block content option(value='55-60') Between 55 and 60 option(value='60-') More than 60 - label(for='3dgames') Rate your 3D game skills (1 star if you never played) + label(for='3dgames', style={'margin-right':'10px'}) Rate your 3D game skills + span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='1 star if you never played any 3D games, 5 stars if you are used to 3D video games.') + input#3dgames(type='number', class='rating', min='0', max='5', step='1', default='3', name='input3dskills') .form-group - label(for='se21') When is the last time you played a 3D video game ? + label(for='se21', style={'margin-right':'10px'}) When is the last time you played a 3D video game ? + span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='Any game will count (PC or console, old or recent)') select.form-control#sel2(name="inputLastTime") option(value='3') This week option(value='2') This month @@ -67,4 +71,3 @@ block content button.btn.btn-lg.btn-primary.btn-block(type='submit') Sign in - diff --git a/js/l3d/apps/prototype/tutorial/TutorialSteps.js b/js/l3d/apps/prototype/tutorial/TutorialSteps.js index 80885c3..297e7bb 100644 --- a/js/l3d/apps/prototype/tutorial/TutorialSteps.js +++ b/js/l3d/apps/prototype/tutorial/TutorialSteps.js @@ -55,7 +55,7 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick: false }, { - text: "There is a red coin on the top of the castle, just if front of you ! Go and get it !", + text: "There is a red coin on the roof of the castle, just in front of you ! Go and get it !", justclick: false }, { @@ -63,7 +63,7 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick: false }, { - text: "Nice ! Let me introduce you to recommendations", + text: "Nice ! Let me introduce you to recommendations", justclick: true }, { @@ -75,7 +75,7 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick:true }, { - text: "Recommendations can be displayed as arrows, or as viewports", + text: "Recommendations can be displayed as 3D arrows, or as viewports", justclick: false }, { @@ -83,31 +83,31 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick:false }, { - text:"Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text:"Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, { - text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", justclick:false }, { diff --git a/static/bootstrap/js/jquery-browser.js b/static/bootstrap/js/jquery-browser.js new file mode 100644 index 0000000..f86b881 --- /dev/null +++ b/static/bootstrap/js/jquery-browser.js @@ -0,0 +1 @@ +var matched,browser;jQuery.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}};matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version}if(browser.chrome){browser.webkit=true}else{if(browser.webkit){browser.safari=true}}jQuery.browser=browser; \ No newline at end of file diff --git a/views/base.jade b/views/base.jade index 8b79d95..15fc3d0 100644 --- a/views/base.jade +++ b/views/base.jade @@ -37,6 +37,7 @@ html(lang='fr') script(src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js") script(src="/static/bootstrap/js/bootstrap.min.js") + script(src='/static/bootstrap/js/jquery-browser.js') block js block extrajs