mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-01 10:44:21 +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,24 +119,28 @@ function bindEditDueDateAjax() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var resultsTab = $('#results-nav-tab');
|
||||
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');
|
||||
var steps = [{
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-step-text')
|
||||
}, {
|
||||
element: $('#protocol-copy-to-repository')[0],
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-save-step-text'),
|
||||
position: 'right'
|
||||
}, {
|
||||
element: resultsTab[0],
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-click-results-step-text'),
|
||||
position: 'right'
|
||||
}];
|
||||
initPageTutorialSteps(12, 14, nextPage, function() {}, function() {}, steps);
|
||||
var nextPage = resultsTab.find('a').attr('href');
|
||||
var steps = [{
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-step-text')
|
||||
}, {
|
||||
element: $('#protocol-copy-to-repository')[0],
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-save-step-text'),
|
||||
position: 'right'
|
||||
}, {
|
||||
element: resultsTab[0],
|
||||
intro: $("[data-role='tutorial-data']")
|
||||
.attr('data-module-protocols-click-results-step-text'),
|
||||
position: 'right'
|
||||
}];
|
||||
initPageTutorialSteps(12, 14, nextPage,
|
||||
function() {}, function() {}, steps);
|
||||
}
|
||||
}
|
||||
|
||||
function initCopyToRepository() {
|
||||
|
|
|
@ -123,19 +123,23 @@ function renderTable(table) {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var samplesTab = $('#module-samples-nav-tab');
|
||||
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');
|
||||
var steps = [{
|
||||
element: $('#results-toolbar')[0],
|
||||
intro: $('#results').attr('data-module-protocols-step-text')
|
||||
}, {
|
||||
element: samplesTab[0],
|
||||
intro: $('#results')
|
||||
.attr('data-module-protocols-click-samples-step-text'),
|
||||
position: 'left'
|
||||
}];
|
||||
initPageTutorialSteps(15, 16, nextPage, function() {}, function() {}, steps);
|
||||
var nextPage = samplesTab.find('a').attr('href');
|
||||
var steps = [{
|
||||
element: $('#results-toolbar')[0],
|
||||
intro: $('#results').attr('data-module-protocols-step-text')
|
||||
}, {
|
||||
element: samplesTab[0],
|
||||
intro: $('#results')
|
||||
.attr('data-module-protocols-click-samples-step-text'),
|
||||
position: 'left'
|
||||
}];
|
||||
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,8 +67,11 @@
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var nextPage = $('[data-canvas-link]').data('canvasLink');
|
||||
initPageTutorialSteps(4, 5, nextPage, tutorialBeforeCb, tutorialAfterCb);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -717,8 +717,11 @@ function initImport() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var nextPage = $('.navbar-brand').attr('href');
|
||||
initPageTutorialSteps(23, 24, nextPage, function() {}, function() {});
|
||||
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,14 +167,17 @@
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var nextPage = $('#new-report-btn').attr('href');
|
||||
var steps = [{
|
||||
element: $('#new-report-btn')[0],
|
||||
intro: $('#content').attr('data-reports-click-new-report-step-text'),
|
||||
position: 'right'
|
||||
}];
|
||||
initPageTutorialSteps(19, 19, nextPage, function() {}, function() {},
|
||||
steps);
|
||||
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],
|
||||
intro: $('#content').attr('data-reports-click-new-report-step-text'),
|
||||
position: 'right'
|
||||
}];
|
||||
initPageTutorialSteps(19, 19, nextPage, function() {}, function() {},
|
||||
steps);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(init);
|
||||
|
|
|
@ -1147,12 +1147,14 @@ function initializeReportSidebartruncation() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
ignoreUnsavedWorkAlert = true;
|
||||
|
||||
var nextPage = $('.navbar-brand').attr('href');
|
||||
initPageTutorialSteps(20, 21, nextPage, function() {}, function() {
|
||||
ignoreUnsavedWorkAlert = false;
|
||||
});
|
||||
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() {
|
||||
|
|
|
@ -158,16 +158,20 @@ function sampleAlertMsgHide() {
|
|||
* Initializes tutorial
|
||||
*/
|
||||
function initTutorial() {
|
||||
var nextPage = $('#reports-nav-tab a').attr('href');
|
||||
var steps = [{
|
||||
element: $('#importSamplesButton')[0],
|
||||
intro: $('#samples-toolbar').attr('data-samples-step-text'),
|
||||
position: 'right'
|
||||
}, {
|
||||
element: $('#secondary-menu')[0],
|
||||
intro: $('#samples-toolbar').attr('data-breadcrumbs-step-text')
|
||||
}];
|
||||
initPageTutorialSteps(17, 18, nextPage, function() {}, function() {}, steps);
|
||||
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],
|
||||
intro: $('#samples-toolbar').attr('data-samples-step-text'),
|
||||
position: 'right'
|
||||
}, {
|
||||
element: $('#secondary-menu')[0],
|
||||
intro: $('#samples-toolbar').attr('data-breadcrumbs-step-text')
|
||||
}];
|
||||
initPageTutorialSteps(17, 18, nextPage,
|
||||
function() {}, function() {}, steps);
|
||||
}
|
||||
}
|
||||
|
||||
initTutorial();
|
||||
|
|
Loading…
Add table
Reference in a new issue