From d2491a18a4a0e82fb9f5c341a36054919b90b730 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 9 Nov 2016 14:57:26 +0100 Subject: [PATCH 1/2] Tutorial Save Protocol step added [SCI-571] --- .../javascripts/my_modules/protocols.js | 29 ++++++++----- app/views/my_modules/protocols.html.erb | 1 + .../protocols/_protocol_buttons.html.erb | 4 +- config/locales/en.yml | 43 ++++++++++--------- 4 files changed, 44 insertions(+), 33 deletions(-) diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index dac362b1e..bb1e80702 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -100,10 +100,15 @@ function bindEditDueDateAjax() { function initTutorial() { var currentStep = Cookies.get('current_tutorial_step'); - if (showTutorial() && (currentStep > 8 && currentStep < 12)) { - var resultsTab = $("#results-nav-tab"); - var moduleProtocolsTutorial = $("[data-role='tutorial-data']").attr("data-module-protocols-step-text"); - var moduleProtocolsClickResultsTutorial = $("[data-role='tutorial-data']").attr("data-module-protocols-click-results-step-text"); + if (showTutorial() && (currentStep > 8 && currentStep < 13)) { + var resultsTab = $('#results-nav-tab'); + var saveRepositoryButton = $('#protocol-copy-to-repository').get(0); + var moduleProtocolsTutorial = $("[data-role='tutorial-data']") + .attr('data-module-protocols-step-text'); + var moduleProtocolsSaveTutorial = $("[data-role='tutorial-data']") + .attr('data-module-protocols-save-step-text'); + var moduleProtocolsClickResultsTutorial = $("[data-role='tutorial-data']") + .attr('data-module-protocols-click-results-step-text'); introJs() .setOptions({ @@ -111,6 +116,10 @@ function initTutorial() { { intro: moduleProtocolsTutorial }, + { + intro: moduleProtocolsSaveTutorial, + element: saveRepositoryButton + }, { intro: moduleProtocolsClickResultsTutorial, element: resultsTab[0], @@ -127,28 +136,28 @@ function initTutorial() { exitOnEsc: false, tooltipClass: 'custom' }) - .onafterchange(function(tarEl) { + .onafterchange(function() { Cookies.set('current_tutorial_step', this._currentStep + 10); - if (this._currentStep == 1) { + if (this._currentStep === 2) { setTimeout(function() { $('.next-page-link a.introjs-nextbutton') .removeClass('introjs-disabled') - .attr('href', resultsTab.find("a").attr('href')); + .attr('href', resultsTab.find('a').attr('href')); positionTutorialTooltip(); }, 500); } else { positionTutorialTooltip(); } }) - .goToStep(currentStep == 11 ? 2 : 1) + .goToStep(currentStep === 11 ? 2 : 1) .start(); window.onresize = positionTutorialTooltip; // Destroy first-time tutorial cookies when skip tutorial // or end tutorial is clicked - $(".introjs-skipbutton").each(function (){ - $(this).click(function (){ + $('.introjs-skipbutton').each(function() { + $(this).click(function() { Cookies.remove('tutorial_data'); Cookies.remove('current_tutorial_step'); }); diff --git a/app/views/my_modules/protocols.html.erb b/app/views/my_modules/protocols.html.erb index aed62bfba..ff4b97a1a 100644 --- a/app/views/my_modules/protocols.html.erb +++ b/app/views/my_modules/protocols.html.erb @@ -18,6 +18,7 @@ diff --git a/app/views/my_modules/protocols/_protocol_buttons.html.erb b/app/views/my_modules/protocols/_protocol_buttons.html.erb index 74c91f588..e10fd2370 100644 --- a/app/views/my_modules/protocols/_protocol_buttons.html.erb +++ b/app/views/my_modules/protocols/_protocol_buttons.html.erb @@ -29,10 +29,10 @@  <%= t("my_modules.protocols.buttons.export") %> <% end %> <% if can_copy_protocol_to_repository(@my_module) %> - <%= link_to copy_to_repository_modal_protocol_path(@protocol, format: :json), class: "btn btn-default", remote: true, data: { action: "copy-to-repository" } do %> + <%= link_to copy_to_repository_modal_protocol_path(@protocol, format: :json), id: "protocol-copy-to-repository", class: "btn btn-default", remote: true, data: { action: "copy-to-repository" } do %>  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %> <% else %>  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %> - \ No newline at end of file + diff --git a/config/locales/en.yml b/config/locales/en.yml index 1150cad54..fcf04ae44 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1468,27 +1468,28 @@ en: skip_tutorial: "Skip tutorial" end_tutorial: "End tutorial" finish_tutorial: "Start using sciNote" - tutorial_welcome_title_html: 'Welcome to sciNote, your electronic lab notebook. sciNote organizes your work in Projects. You can reorder them by clicking the Sort by button. (Step 1/21)' - create_project_html: "Click here to create a Project and it will appear under the Team you've chosen. Choose public if you want everyone from the Team to view the Project or choose private so only the people who you invite to the project can see it. (Step 2/21)" - project_options_html: "In the bottom row of the Project card you can check the latest activity , invite collaborators , see the notifications and write comments . You can also edit the Project's name and visibility or archive it. You can recall the Project from the Archive in the top right side of the Dashboard at any time. (Step 3/21)" - create_experiment_html: "Inside of a Project you can create Experiments. To create one click on this button and edit Experiment’s name and description. (Step 4/21)" - edit_experiment_html: "By clicking on the down arrow of an Experiment card you can choose between different actions. You can Edit details to the Experiment, such as experiment name and description, Clone it inside of a Project, where cloned Experiment is identical to the original one, Move it from one Project to another or Archive it in the Archive . (Step 5/21)" - canvas_overview_html: "A Task is a basic unit of your Experiment. Within a Task, you can add Protocols, Results and add Samples. You can connect Tasks into Workflows to assure traceability of your work. You can grab a Task or entire Workflow and move it in all directions on the canvas. (Step 6/21)" - canvas_click_edit_workflow_html: " Click Edit experiment to add new Tasks or to modify an existing Experiment. (Step 7/21)" - edit_workflow_html: "To add a new Task to the Experiment, click on New task and drag it onto canvas. (Step 8/21)" - edit_workflow_click_save_html: "Click Save experiment to save changes you’ve made to the Experiment. (Step 9/21)" - sidebar_html: "Navigation bar helps you orient on which Experiment you are currently working. It also helps you to find a specific Task on the canvas by clicking the navigate icon . The line that follows down the Tasks on their left side signifies they are connected into a Workflow. (Step 10/21)" - sidebar_click_module_html: "Click on the Task name qPCR to see its contents. (Step 11/21)" - module_protocols_html: "Inside of a Task you can create Protocol steps and upload existing protocol files. After you have finished a certain step, click the Complete step button. Exact time and the person who completed the step are recorded and can be seen in the Activity tab in the top right side of the Dashboard. (Step 12/21)" - module_protocols_click_results_html: "Click on the Results tab to upload experiment results. (Step 13/21)" - module_results_html: "You can upload any type of a file, insert table or write comments. (Step 14/21)" - module_results_click_samples_html: "Click on the Samples tab to import, export or assign samples to the Task. (Step 15/21)" - samples_html: "You can easily import sample tables from Excel or tab-delimited files. If you assign samples to a certain Task, these samples will be automatically assigned downstream the Workflow. (Step 16/21)" - breadcrumbs_html: "You can always use these breadcrumbs to navigate all the way back to the Dashboard. Click on the Reports tab to generate reports for meetings, projects, patents or thesis. (Step 17/21)" - reports_index_click_new_report_html: "When inside of Reports, click the New report button to create a new report. (Step 18/21)" - new_report_html: "To add report elements to the report, click on the —+— sign on the sheet. Select the report contents in the tabs and click Add to report. You can save the report as a PDF on your computer or save it within sciNote for later viewing and modification. (Step 19/21)" - new_report_click_org_html: "Click on %{private_org} in breadcrumbs to return to the Dashboard. (Step 20/21)" - archive_project_html: "Archive Demo project - qPCR by clicking on the down arrow . You can always access the Archive by clicking the icon on the top right side of the Dashboard and restore any item you have archived. (Step 21/21)" + tutorial_welcome_title_html: 'Welcome to sciNote, your electronic lab notebook. sciNote organizes your work in Projects. You can reorder them by clicking the Sort by button. (Step 1/22)' + create_project_html: "Click here to create a Project and it will appear under the Team you've chosen. Choose public if you want everyone from the Team to view the Project or choose private so only the people who you invite to the project can see it. (Step 2/22)" + project_options_html: "In the bottom row of the Project card you can check the latest activity , invite collaborators , see the notifications and write comments . You can also edit the Project's name and visibility or archive it. You can recall the Project from the Archive in the top right side of the Dashboard at any time. (Step 3/22)" + create_experiment_html: "Inside of a Project you can create Experiments. To create one click on this button and edit Experiment’s name and description. (Step 4/22)" + edit_experiment_html: "By clicking on the down arrow of an Experiment card you can choose between different actions. You can Edit details to the Experiment, such as experiment name and description, Clone it inside of a Project, where cloned Experiment is identical to the original one, Move it from one Project to another or Archive it in the Archive . (Step 5/22)" + canvas_overview_html: "A Task is a basic unit of your Experiment. Within a Task, you can add Protocols, Results and add Samples. You can connect Tasks into Workflows to assure traceability of your work. You can grab a Task or entire Workflow and move it in all directions on the canvas. (Step 6/22)" + canvas_click_edit_workflow_html: " Click Edit experiment to add new Tasks or to modify an existing Experiment. (Step 7/22)" + edit_workflow_html: "To add a new Task to the Experiment, click on New task and drag it onto canvas. (Step 8/22)" + edit_workflow_click_save_html: "Click Save experiment to save changes you’ve made to the Experiment. (Step 9/22)" + sidebar_html: "Navigation bar helps you orient on which Experiment you are currently working. It also helps you to find a specific Task on the canvas by clicking the navigate icon . The line that follows down the Tasks on their left side signifies they are connected into a Workflow. (Step 10/22)" + sidebar_click_module_html: "Click on the Task name qPCR to see its contents. (Step 11/22)" + module_protocols_html: "Inside of a Task you can create Protocol steps and upload existing protocol files. After you have finished a certain step, click the Complete step button. Exact time and the person who completed the step are recorded and can be seen in the Activity tab in the top right side of the Dashboard. (Step 12/22)" + module_protocols_save_html: "You can save the protocol to Protocol repository. Everyone within the same Team will be able to use it. (Step 13/22)" + module_protocols_click_results_html: "Click on the Results tab to upload experiment results. (Step 14/22)" + module_results_html: "You can upload any type of a file, insert table or write comments. (Step 15/22)" + module_results_click_samples_html: "Click on the Samples tab to import, export or assign samples to the Task. (Step 16/22)" + samples_html: "You can easily import sample tables from Excel or tab-delimited files. If you assign samples to a certain Task, these samples will be automatically assigned downstream the Workflow. (Step 17/22)" + breadcrumbs_html: "You can always use these breadcrumbs to navigate all the way back to the Dashboard. Click on the Reports tab to generate reports for meetings, projects, patents or thesis. (Step 18/22)" + reports_index_click_new_report_html: "When inside of Reports, click the New report button to create a new report. (Step 19/22)" + new_report_html: "To add report elements to the report, click on the —+— sign on the sheet. Select the report contents in the tabs and click Add to report. You can save the report as a PDF on your computer or save it within sciNote for later viewing and modification. (Step 20/22)" + new_report_click_org_html: "Click on %{private_org} in breadcrumbs to return to the Dashboard. (Step 21/22)" + archive_project_html: "Archive Demo project - qPCR by clicking on the down arrow . You can always access the Archive by clicking the icon on the top right side of the Dashboard and restore any item you have archived. (Step 22/22)" goodbye_message: "To repeat the tutorial, go to your Settings and open My preferences tab. Click on the Repeat tutorial button and watch the tutorial as many times needed." notifications: From b9f982ead7d95926545a525cc5900689fbfff2f2 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 11 Nov 2016 09:54:19 +0100 Subject: [PATCH 2/2] Additional steps added to tutorial and numbering of the steps fixed [SCI-571] --- .../javascripts/my_modules/protocols.js | 6 +-- .../javascripts/my_modules/results.js.erb | 6 +-- app/assets/javascripts/projects/canvas.js.erb | 17 ++++--- app/assets/javascripts/projects/index.js.erb | 10 ++-- app/assets/javascripts/projects/show.js | 2 +- app/assets/javascripts/protocols/index.js | 42 ++++++++++++++++ app/assets/javascripts/reports/index.js | 7 +-- app/assets/javascripts/reports/new.js.erb | 9 ++-- app/assets/javascripts/samples/samples.js | 8 ++-- app/views/experiments/canvas.html.erb | 4 +- app/views/protocols/index.html.erb | 4 +- .../reports/elements/_new_element.html.erb | 4 +- .../reports/new/_report_navigation.html.erb | 2 +- config/locales/en.yml | 48 ++++++++++--------- 14 files changed, 106 insertions(+), 63 deletions(-) diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index bb1e80702..540a3d189 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -100,7 +100,7 @@ function bindEditDueDateAjax() { function initTutorial() { var currentStep = Cookies.get('current_tutorial_step'); - if (showTutorial() && (currentStep > 8 && currentStep < 13)) { + if (showTutorial() && (currentStep > 10 && currentStep < 15)) { var resultsTab = $('#results-nav-tab'); var saveRepositoryButton = $('#protocol-copy-to-repository').get(0); var moduleProtocolsTutorial = $("[data-role='tutorial-data']") @@ -137,7 +137,7 @@ function initTutorial() { tooltipClass: 'custom' }) .onafterchange(function() { - Cookies.set('current_tutorial_step', this._currentStep + 10); + Cookies.set('current_tutorial_step', this._currentStep + 12); if (this._currentStep === 2) { setTimeout(function() { $('.next-page-link a.introjs-nextbutton') @@ -149,7 +149,7 @@ function initTutorial() { positionTutorialTooltip(); } }) - .goToStep(currentStep === 11 ? 2 : 1) + .goToStep(currentStep === 13 ? 2 : 1) .start(); window.onresize = positionTutorialTooltip; diff --git a/app/assets/javascripts/my_modules/results.js.erb b/app/assets/javascripts/my_modules/results.js.erb index c024550f0..188148d37 100644 --- a/app/assets/javascripts/my_modules/results.js.erb +++ b/app/assets/javascripts/my_modules/results.js.erb @@ -85,7 +85,7 @@ function renderTable(table) { // Initialize first-time tutorial function initTutorial() { var currentStep = Cookies.get('current_tutorial_step'); - if (showTutorial() && (currentStep > 10 && currentStep < 14)) { + if (showTutorial() && (currentStep > 13 && currentStep < 17)) { var moduleResultsTutorial = $("#results").attr("data-module-protocols-step-text"); var moduleResultsClickSamplesTutorial = $("#results").attr("data-module-protocols-click-samples-step-text"); var samplesTab = $("#module-samples-nav-tab"); @@ -116,7 +116,7 @@ function initTutorial() { disableInteraction: true }) .onafterchange(function (tarEl){ - Cookies.set('current_tutorial_step', this._currentStep + 12); + Cookies.set('current_tutorial_step', this._currentStep + 15); if (this._currentStep == 1) { setTimeout(function() { $('.next-page-link a.introjs-nextbutton') @@ -130,7 +130,7 @@ function initTutorial() { positionTutorialTooltip(); } }) - .goToStep(currentStep == 13 ? 2 : 1) + .goToStep(currentStep == 16 ? 2 : 1) .start(); window.onresize = positionTutorialTooltip; diff --git a/app/assets/javascripts/projects/canvas.js.erb b/app/assets/javascripts/projects/canvas.js.erb index 6cc7d2238..9a22a6e18 100644 --- a/app/assets/javascripts/projects/canvas.js.erb +++ b/app/assets/javascripts/projects/canvas.js.erb @@ -3126,7 +3126,7 @@ function initializeTutorial(isEditMode) { canvas_tutorial_helper(); var currentStep = Cookies.get('current_tutorial_step'); // Add edit canvas tutorial step and show it - if (!isEditMode && currentStep > 2 && currentStep < 6) { + if (!isEditMode && currentStep > 4 && currentStep < 8) { var $introJs = introJs(); $introJs .setOptions({ @@ -3141,7 +3141,7 @@ function initializeTutorial(isEditMode) { tooltipClass: 'custom next-page-link' }) .onafterchange(function (tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 4); + Cookies.set('current_tutorial_step', this._currentStep + 6); if (this._currentStep == 1) { $introJs.setOption("disableInteraction", true); // Go to project canvas @@ -3160,13 +3160,13 @@ function initializeTutorial(isEditMode) { }); } }) - .goToStep(currentStep == "5" ? 2 : 1) + .goToStep(currentStep == "6" ? 2 : 1) .start(); window.onresize = function() { $(".introjs-tooltip").css("right", ($("#canvas-container").width() + 20) + "px"); }; - } else if (isEditMode && currentStep > 4 && currentStep < 7) { + } else if (isEditMode && currentStep > 6 && currentStep < 10) { canvas_tutorial_helper(); var editWorkflowTutorial = $("#canvas-container").attr("data-edit-workflow-step-text"); var editWorkflowClickSaveTutorial = $("#canvas-container").attr("data-edit-workflow-click-save-step-text"); @@ -3200,7 +3200,7 @@ function initializeTutorial(isEditMode) { }) .onafterchange(function (tarEl) { // Go to edit workflow mode - Cookies.set('current_tutorial_step', this._currentStep + 6); + Cookies.set('current_tutorial_step', this._currentStep + 8); if (this._currentStep == 0) { $(".introjs-tooltipReferenceLayer").addClass("max"); $(".introjs-tooltip").css("left", "0"); @@ -3228,11 +3228,10 @@ function initializeTutorial(isEditMode) { }); }); }, 600); - } else if (!isEditMode && currentStep > 5 || currentStep < 10) { + } else if (!isEditMode && currentStep > 8 && currentStep < 13) { canvas_tutorial_helper(); var sidebarTutorial = $("#canvas-container").attr("data-sidebar-step-text"); var sidebarClickModuleTutorial = $("#canvas-container").attr("data-sidebar-click-module-step-text"); - Cookies.set('current_tutorial_step', '8'); var qpcrModuleLeaf = $("li.leaf[data-module-id='" + tutorialData[0].qpcr_module + "']"); introJs() @@ -3260,7 +3259,7 @@ function initializeTutorial(isEditMode) { tooltipClass: 'custom next-page-link' }) .onafterchange(function(tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 8); + Cookies.set('current_tutorial_step', this._currentStep + 10); if (this._currentStep == 1) { setTimeout(function() { $('.next-page-link a.introjs-nextbutton') @@ -3271,7 +3270,7 @@ function initializeTutorial(isEditMode) { $(".introjs-tooltipReferenceLayer").css("top", $("#slide-panel .tree").height()/3 + "px"); } }) - .goToStep(currentStep == "9" ? 2 : 1) + .goToStep(currentStep == "10" ? 2 : 1) .start(); } diff --git a/app/assets/javascripts/projects/index.js.erb b/app/assets/javascripts/projects/index.js.erb index 3138f3266..345818510 100644 --- a/app/assets/javascripts/projects/index.js.erb +++ b/app/assets/javascripts/projects/index.js.erb @@ -398,10 +398,9 @@ } }; } - else if (goToStep > 18) { + else if (goToStep > 21) { var archiveProjectTutorial = $("#projects-toolbar").attr("data-archive-project-step-text"); var goodbye_message = $("#projects-toolbar").attr("data-goodbye-tutorial"); - Cookies.set('current_tutorial_step', '20'); var position = "right"; if (demoProject.offset().left > window.innerWidth / 2 || window.innerWidth < demoProject.width() + 100) { if (demoProject.offset().top > 500 && demoProject.offset().top > window.innerHeight / 2) { @@ -410,8 +409,8 @@ position = "bottom"; } } - - introJs() + var $introjs = introJs(); + $introjs .setOptions({ steps: [{ element: document.getElementById(demoProjectId), @@ -432,6 +431,9 @@ exitOnEsc: false, tooltipClass: 'custom next-page-link' }) + .onafterchange(function() { + Cookies.set('current_tutorial_step', this._currentStep + 24); + }) .oncomplete(function () { Cookies.remove('tutorial_data'); Cookies.remove('current_tutorial_step'); diff --git a/app/assets/javascripts/projects/show.js b/app/assets/javascripts/projects/show.js index 968caf871..ab6ed951f 100644 --- a/app/assets/javascripts/projects/show.js +++ b/app/assets/javascripts/projects/show.js @@ -84,7 +84,7 @@ disableInteraction: true }) .onafterchange(function (tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 2); + Cookies.set('current_tutorial_step', this._currentStep + 4); if (this._currentStep == 1) { setTimeout(function() { diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index d35c82e5e..649e2b723 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -698,6 +698,47 @@ function initImport() { }); } +/* Initilize first-time tutorial if needed */ +function initTutorial() { + var currentStep = Cookies.get('current_tutorial_step'); + var protocolButtons = $('.nav-tab .nav-settings').get(0); + if (currentStep && (currentStep > 20 && currentStep < 23)) { + introJs() + .setOptions({ + overlayOpacity: '0.1', + nextLabel: 'Next', + doneLabel: 'End tutorial', + skipLabel: 'End tutorial', + showBullets: false, + showStepNumbers: false, + exitOnOverlayClick: false, + exitOnEsc: false, + tooltipClass: 'custom' + }) + .onafterchange(function() { + Cookies.set('current_tutorial_step', this._currentStep + 22); + + if (this._currentStep === 1) { + Cookies.set('current_tutorial_step', this._currentStep + 22); + setTimeout(function() { + $('.introjs-tooltipbuttons a.introjs-nextbutton') + .removeClass('introjs-disabled') + .attr('href', '/'); + }, 500); + } + }).start(); + + // Destroy first-time tutorial cookies when skip tutorial + // or end tutorial is clicked + $('.introjs-skipbutton').each(function() { + $(this).click(function() { + Cookies.remove('tutorial_data'); + Cookies.remove('current_tutorial_step'); + }); + }); + } +} + // Initialize everything updateButtons(); initProtocolsTable(); @@ -707,3 +748,4 @@ initLinkedChildrenModal(); initCreateNewModal(); initModals(); initImport(); +initTutorial(); diff --git a/app/assets/javascripts/reports/index.js b/app/assets/javascripts/reports/index.js index 7090fd6e8..67c4ab375 100644 --- a/app/assets/javascripts/reports/index.js +++ b/app/assets/javascripts/reports/index.js @@ -141,11 +141,12 @@ /* Initilize first-time tutorial if needed */ function initTutorial() { var currentStep = Cookies.get('current_tutorial_step'); - if (showTutorial() && (currentStep > 14 && currentStep < 18)) { + if (showTutorial() && (currentStep > 17 && currentStep < 20)) { var reportsClickNewReportTutorial = $("#content").attr("data-reports-click-new-report-step-text"); introJs() .setOptions({ - steps: [{}, + steps: [ + {}, { element: document.getElementById("new-report-btn"), intro: reportsClickNewReportTutorial, @@ -163,7 +164,7 @@ tooltipClass: 'custom' }) .onafterchange(function (tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 16); + Cookies.set('current_tutorial_step', this._currentStep + 18); if (this._currentStep == 1) { setTimeout(function() { diff --git a/app/assets/javascripts/reports/new.js.erb b/app/assets/javascripts/reports/new.js.erb index feb28df16..01a2072da 100644 --- a/app/assets/javascripts/reports/new.js.erb +++ b/app/assets/javascripts/reports/new.js.erb @@ -1144,13 +1144,12 @@ function initializeTutorial() { disableInteraction: true }) .onafterchange(function (tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 18); - + Cookies.set('current_tutorial_step', this._currentStep + 20); if (this._currentStep == 1) { setTimeout(function() { $('.next-page-link a.introjs-nextbutton') .removeClass('introjs-disabled') - .attr('href', tarEl.href); + .attr('href', '/protocols'); $('.introjs-disableInteraction').remove(); }, 500); } else { @@ -1160,7 +1159,7 @@ function initializeTutorial() { .start(); window.onresize = function() { - if (Cookies.get('current_tutorial_step') == 18) { + if (Cookies.get('current_tutorial_step') == 20) { $(".introjs-tooltip").css("right", ($(".new-element.initial").width() + 60) + "px"); } }; @@ -1183,7 +1182,7 @@ function showTutorial() { else return false; var currentStep = Cookies.get('current_tutorial_step'); - if (currentStep < 16 || currentStep > 18) + if (currentStep < 18 && currentStep > 22) return false; var tutorialProjectId = tutorialData[0].project; var currentProjectId = $("#data-holder").attr("data-project-id"); diff --git a/app/assets/javascripts/samples/samples.js b/app/assets/javascripts/samples/samples.js index 09b6659a7..916457cfb 100644 --- a/app/assets/javascripts/samples/samples.js +++ b/app/assets/javascripts/samples/samples.js @@ -156,9 +156,7 @@ function sampleAlertMsgHide() { function initTutorial() { var currentStep = parseInt(Cookies.get('current_tutorial_step'), 10); - if (currentStep == 8) - currentStep++; - if (showTutorial() && (currentStep > 12 && currentStep < 16)) { + if (showTutorial() && (currentStep > 15 && currentStep < 19)) { var samplesTutorial =$("#samples-toolbar").attr("data-samples-step-text"); var breadcrumbsTutorial = $("#samples-toolbar").attr("data-breadcrumbs-step-text"); @@ -187,7 +185,7 @@ function initTutorial() { tooltipClass: "custom" }) .onafterchange(function (tarEl) { - Cookies.set('current_tutorial_step', this._currentStep + 14); + Cookies.set('current_tutorial_step', this._currentStep + 17); if (this._currentStep == 1) { setTimeout(function() { @@ -201,7 +199,7 @@ function initTutorial() { positionTutorialTooltip(); } }) - .goToStep(currentStep == 15 ? 2 : 1) + .goToStep(currentStep == 18 ? 2 : 1) .start(); // Destroy first-time tutorial cookies when skip tutorial diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index 76a2f7d40..8c7347da6 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -14,7 +14,7 @@ data: { action: 'edit', intro: t('tutorial.canvas_click_edit_workflow_html'), - step: '5', + step: '7', position: 'left' } do %> @@ -63,7 +63,7 @@
<%= render partial: "protocols/breadcrumbs.html.erb", locals: { organizations: @organizations, current_organization: @current_organization, type: @type } %> -
- diff --git a/app/views/reports/new/_report_navigation.html.erb b/app/views/reports/new/_report_navigation.html.erb index c5ce0abad..c4782f717 100644 --- a/app/views/reports/new/_report_navigation.html.erb +++ b/app/views/reports/new/_report_navigation.html.erb @@ -5,7 +5,7 @@