summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-07-13 13:29:22 +0200
committerqsm-odoo <qsm@odoo.com>2016-07-18 14:16:35 +0200
commit35a264144e815b005767a92a037ebaa1bbe0a1b0 (patch)
tree3f306bf9aa97c38eaa4b5f109c34eaa7e723202f /addons/web/static/src/js/framework
parent4005cf025e338583b7a8a16084437e9e261f9643 (diff)
[IMP] web_tour: allow automatic tour running
Tours can now be launched flawlessly thanks to the run method of the tour service. In a tour definition, here what you might have to do to make it functionnal in auto mode: * If actions are required between two steps of an onboarding tour: * If the actions have to wait for elements to appear on the screen, define new tour steps with no content and add the "auto" key and set it to "true". * If the actions concern elements which are already on the screen, you can use the "run" key in a step to make the tour faster to execute actions after the step. The "run" key may take several values: * A string with the values "click", "text" or "drag_and_drop". By default, you will not have to specify "click" for normal elements or "text" for form elements as they are the default values for those. Note: the "text" value can be followed by the text to enter (default to "Test") and the "drag_and_drop" value can be followed by a jQuery selector to specify where to drop the element (default to the body element). * A function which takes an "actions" parameter. This allowed to do anything but here are common uses in the run definition : * a call to "actions.auto()" will do the default action on the step element (click on normal element and add text on form elements). * a call to "actions.auto(element)" will do the default action on the given element. Note: this.$anchor is a reference to the step jQuery element. * a call to "actions.text([text], [element])" will add the optional text (default to "Test") to the optional given element (default to the step element). * a call to "actions.click([element])" will click on the optional given element (default to the step element). * a call to "actions.drag_and_drop([to], [element])" will drag and drop the optional given element (default to the step element) in the optional given "to" element (default to the body element). Note 1: all the "element" parameters can be given as a jQuery selector, a DOM node or a jQuery element. Note 2: the run method is designed to do actions on elements which are already on the screen. If this is not the case for some of them, consider using an "auto: true" step as explained above. Note 3: "auto: true" steps can also contain a run definition. When defining a tour, you can also add predefined steps (auto or not). These are defined in the object STEPS of the tour service object. These include opening the "More" menu if any in community before clicking on an app, opening the appswitcher in enterprise, ... The full list is accessible in the tour_manager.js file.
Diffstat (limited to 'addons/web/static/src/js/framework')
0 files changed, 0 insertions, 0 deletions