website_event.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. odoo.define("website_event.tour", function (require) {
  2. "use strict";
  3. const {_t} = require("web.core");
  4. const {Markup} = require('web.utils');
  5. const wTourUtils = require('website.tour_utils');
  6. wTourUtils.registerWebsitePreviewTour("website_event_tour", {
  7. test: true,
  8. url: "/",
  9. }, [{
  10. content: _t("Click here to add new content to your website."),
  11. trigger: ".o_menu_systray .o_new_content_container > a",
  12. consumeVisibleOnly: true,
  13. position: 'bottom',
  14. }, {
  15. trigger: "a[data-module-xml-id='base.module_website_event']",
  16. content: _t("Click here to create a new event."),
  17. position: "bottom",
  18. }, {
  19. trigger: '.modal-dialog div[name="name"] input',
  20. content: Markup(_t("Create a name for your new event and click <em>\"Continue\"</em>. e.g: Technical Training")),
  21. run: 'text Technical Training',
  22. position: "left",
  23. }, {
  24. trigger: '.modal-dialog div[name=date_begin]',
  25. content: _t("Open date range picker. Pick a Start date for your event"),
  26. run: function () {
  27. $('input[id="date_begin"]').val('09/30/2020 08:00:00').change();
  28. $('input[id="date_end"]').val('10/02/2020 23:00:00').change();
  29. $('input[id="date_begin"]').click();
  30. }
  31. }, {
  32. content: _t("Apply change."),
  33. trigger: '.daterangepicker[data-name=date_begin] .applyBtn',
  34. in_modal: false,
  35. }, {
  36. trigger: '.modal-footer button.btn-primary',
  37. extra_trigger: '.modal-dialog input[type=text][value!=""]',
  38. content: Markup(_t("Click <em>Continue</em> to create the event.")),
  39. position: "right",
  40. }, {
  41. trigger: "#oe_snippets.o_loaded #snippet_structure .oe_snippet:eq(2) .oe_snippet_thumbnail",
  42. content: _t("Drag this block and drop it in your page."),
  43. position: "bottom",
  44. run: "drag_and_drop",
  45. }, {
  46. trigger: "button[data-action=save]",
  47. content: _t("Once you click on save, your event is updated."),
  48. position: "bottom",
  49. extra_trigger: "iframe .o_dirty",
  50. }, {
  51. trigger: ".o_menu_systray_item .o_switch_danger_success",
  52. extra_trigger: "iframe body:not(.editor_enable)",
  53. content: _t("Click to publish your event."),
  54. position: "top",
  55. }, {
  56. trigger: ".o_website_edit_in_backend > a",
  57. content: _t("Click here to customize your event further."),
  58. position: "bottom",
  59. }]);
  60. });