mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-05 20:54:27 +08:00
Added additional checks for tutorial steps [SCI-703]
This commit is contained in:
parent
cc86ff268f
commit
be59b85d3b
8 changed files with 81 additions and 58 deletions
|
@ -119,6 +119,8 @@ function bindEditDueDateAjax() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 12 && stepNum <= 14) {
|
||||
var resultsTab = $('#results-nav-tab');
|
||||
|
||||
var nextPage = resultsTab.find('a').attr('href');
|
||||
|
@ -136,7 +138,9 @@ function initTutorial() {
|
|||
.attr('data-module-protocols-click-results-step-text'),
|
||||
position: 'right'
|
||||
}];
|
||||
initPageTutorialSteps(12, 14, nextPage, function() {}, function() {}, steps);
|
||||
initPageTutorialSteps(12, 14, nextPage,
|
||||
function() {}, function() {}, steps);
|
||||
}
|
||||
}
|
||||
|
||||
function initCopyToRepository() {
|
||||
|
|
|
@ -123,6 +123,8 @@ function renderTable(table) {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 15 && stepNum <= 16) {
|
||||
var samplesTab = $('#module-samples-nav-tab');
|
||||
|
||||
var nextPage = samplesTab.find('a').attr('href');
|
||||
|
@ -135,7 +137,9 @@ function initTutorial() {
|
|||
.attr('data-module-protocols-click-samples-step-text'),
|
||||
position: 'left'
|
||||
}];
|
||||
initPageTutorialSteps(15, 16, nextPage, function() {}, function() {}, steps);
|
||||
initPageTutorialSteps(15, 16, nextPage, function() {},
|
||||
function() {}, steps);
|
||||
}
|
||||
}
|
||||
|
||||
var ResultTypeEnum = Object.freeze({
|
||||
|
|
|
@ -3164,7 +3164,7 @@ function initTutorial() {
|
|||
tutorialAfterCb();
|
||||
}, steps);
|
||||
}, 1000);
|
||||
} else if (stepNum >= 10 || stepNum <= 11) {
|
||||
} else if (stepNum >= 10 && stepNum <= 11) {
|
||||
var qpcrModuleLeaf =
|
||||
$("li.leaf[data-module-id='" + tutorialData[0].qpcr_module + "']");
|
||||
|
||||
|
|
|
@ -67,9 +67,12 @@
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 4 && stepNum <= 5) {
|
||||
var nextPage = $('[data-canvas-link]').data('canvasLink');
|
||||
initPageTutorialSteps(4, 5, nextPage, tutorialBeforeCb, tutorialAfterCb);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to be executed before tutorial starts
|
||||
|
|
|
@ -717,8 +717,11 @@ function initImport() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 23 && stepNum <= 24) {
|
||||
var nextPage = $('.navbar-brand').attr('href');
|
||||
initPageTutorialSteps(23, 24, nextPage, function() {}, function() {});
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
|
|
|
@ -167,6 +167,8 @@
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum === 19) {
|
||||
var nextPage = $('#new-report-btn').attr('href');
|
||||
var steps = [{
|
||||
element: $('#new-report-btn')[0],
|
||||
|
@ -176,6 +178,7 @@
|
|||
initPageTutorialSteps(19, 19, nextPage, function() {}, function() {},
|
||||
steps);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(init);
|
||||
}());
|
||||
|
|
|
@ -1147,13 +1147,15 @@ function initializeReportSidebartruncation() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 20 && stepNum <= 21) {
|
||||
ignoreUnsavedWorkAlert = true;
|
||||
|
||||
var nextPage = $('.navbar-brand').attr('href');
|
||||
initPageTutorialSteps(20, 21, nextPage, function() {}, function() {
|
||||
ignoreUnsavedWorkAlert = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// Check if we are actually at new report page
|
||||
|
|
|
@ -158,6 +158,8 @@ function sampleAlertMsgHide() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var stepNum = parseInt(Cookies.get('current_tutorial_step'), 10);
|
||||
if (stepNum >= 17 && stepNum <= 18) {
|
||||
var nextPage = $('#reports-nav-tab a').attr('href');
|
||||
var steps = [{
|
||||
element: $('#importSamplesButton')[0],
|
||||
|
@ -167,7 +169,9 @@ function initTutorial() {
|
|||
element: $('#secondary-menu')[0],
|
||||
intro: $('#samples-toolbar').attr('data-breadcrumbs-step-text')
|
||||
}];
|
||||
initPageTutorialSteps(17, 18, nextPage, function() {}, function() {}, steps);
|
||||
initPageTutorialSteps(17, 18, nextPage,
|
||||
function() {}, function() {}, steps);
|
||||
}
|
||||
}
|
||||
|
||||
initTutorial();
|
||||
|
|
Loading…
Add table
Reference in a new issue