Guidedtour.AddToGuidedTourRequest
Add guide to guided tour.
Use cases
- add bundle to guided tour
Description
Adds the requesting bundle to the guided tour. The request parameter is a delegate object that has configuration and methods for generating the content of the dialog.
Parameters
(* means the parameter is required)
Name | Type | Description | Default value |
---|---|---|---|
* delegate | Object | guided tour delegate |
Parameters for delegate-object:
Name | Type | Description | Default value |
---|---|---|---|
bundleName | String | Bundle name to register guided tour | |
priority | Integer | Guided tour priority, 0 is highest | |
show | Function | Function to show wanted functionality, for example open flyout. | |
hide | Function | Function to hide wanted functionality, for example close flyout. | |
getTitle | String | Guided tour step title | |
getContent | String | Guided tour step content | |
getLinks | String | Guided tour step links |
Examples
Add example guide step to latest step in fuided tour:
var sb = Oskari.getSandbox();
sb.postRequestByName('Guidedtour.AddToGuidedTourRequest', [{
bundleName: 'Test_guide',
priority: 1000,
show: function() {
console.log('show test guide step');
},
hide: function() {
console.log('hide test guide step');
},
getTitle: function(){
return 'test';},
getContent: function(){
var content = jQuery('<div></div>');
content.append('test message');
return content;
},
getLinks: function(){
return null
}
}]);