summaryrefslogtreecommitdiff
path: root/addons/website_sale/static/src/js/tours
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/website_sale/static/src/js/tours
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/website_sale/static/src/js/tours')
-rw-r--r--addons/website_sale/static/src/js/tours/website_sale_shop.js75
-rw-r--r--addons/website_sale/static/src/js/tours/website_sale_shop_backend.js8
-rw-r--r--addons/website_sale/static/src/js/tours/website_sale_shop_frontend.js11
3 files changed, 94 insertions, 0 deletions
diff --git a/addons/website_sale/static/src/js/tours/website_sale_shop.js b/addons/website_sale/static/src/js/tours/website_sale_shop.js
new file mode 100644
index 00000000..6edb36dd
--- /dev/null
+++ b/addons/website_sale/static/src/js/tours/website_sale_shop.js
@@ -0,0 +1,75 @@
+odoo.define("website_sale.tour_shop", function (require) {
+ "use strict";
+
+ var core = require("web.core");
+ var _t = core._t;
+
+ // return the steps, used for backend and frontend
+
+ return [{
+ trigger: "#new-content-menu > a",
+ content: _t("Let's create your first product."),
+ extra_trigger: ".js_sale",
+ position: "bottom",
+ }, {
+ trigger: "a[data-action=new_product]",
+ content: _t("Select <b>New Product</b> to create it and manage its properties to boost your sales."),
+ position: "bottom",
+ }, {
+ trigger: ".modal-dialog #editor_new_product input[type=text]",
+ content: _t("Enter a name for your new product"),
+ position: "right",
+ }, {
+ trigger: ".modal-footer button.btn-primary.btn-continue",
+ content: _t("Click on <em>Continue</em> to create the product."),
+ position: "right",
+ }, {
+ trigger: ".product_price .oe_currency_value:visible",
+ extra_trigger: ".editor_enable",
+ content: _t("Edit the price of this product by clicking on the amount."),
+ position: "bottom",
+ run: "text 1.99",
+ }, {
+ trigger: "#wrap img.product_detail_img",
+ extra_trigger: ".product_price .o_dirty .oe_currency_value:not(:containsExact(1.00))",
+ content: _t("Double click here to set an image describing your product."),
+ position: "top",
+ run: function (actions) {
+ actions.dblclick();
+ },
+ }, {
+ trigger: ".o_select_media_dialog .o_upload_media_button",
+ content: _t("Upload a file from your local library."),
+ position: "bottom",
+ run: function (actions) {
+ actions.auto(".modal-footer .btn-secondary");
+ },
+ }, {
+ trigger: "button.o_we_add_snippet_btn",
+ auto: true,
+ }, {
+ trigger: "#snippet_structure .oe_snippet:eq(3) .oe_snippet_thumbnail",
+ extra_trigger: "body:not(.modal-open)",
+ content: _t("Drag this website block and drop it in your page."),
+ position: "bottom",
+ run: "drag_and_drop",
+ }, {
+ trigger: "button[data-action=save]",
+ content: _t("Once you click on <b>Save</b>, your product is updated."),
+ position: "bottom",
+ }, {
+ trigger: ".js_publish_management .js_publish_btn .css_publish",
+ extra_trigger: "body:not(.editor_enable)",
+ content: _t("Click on this button so your customers can see it."),
+ position: "bottom",
+ }, {
+ trigger: ".o_main_navbar .o_menu_toggle, #oe_applications .dropdown-toggle",
+ content: _t("Let's now take a look at your administration dashboard to get your eCommerce website ready in no time."),
+ position: "bottom",
+ }, { // backend
+ trigger: '.o_apps > a[data-menu-xmlid="website.menu_website_configuration"], #oe_main_menu_navbar a[data-menu-xmlid="website.menu_website_configuration"]',
+ content: _t("Open your website app here."),
+ extra_trigger: ".o_apps,#oe_applications",
+ position: "bottom",
+ }];
+});
diff --git a/addons/website_sale/static/src/js/tours/website_sale_shop_backend.js b/addons/website_sale/static/src/js/tours/website_sale_shop_backend.js
new file mode 100644
index 00000000..ab605852
--- /dev/null
+++ b/addons/website_sale/static/src/js/tours/website_sale_shop_backend.js
@@ -0,0 +1,8 @@
+odoo.define("website_sale.tour_shop_backend", function (require) {
+"use strict";
+
+var tour = require("web_tour.tour");
+var steps = require("website_sale.tour_shop");
+tour.register("shop", {url: "/shop"}, steps);
+
+});
diff --git a/addons/website_sale/static/src/js/tours/website_sale_shop_frontend.js b/addons/website_sale/static/src/js/tours/website_sale_shop_frontend.js
new file mode 100644
index 00000000..afefddef
--- /dev/null
+++ b/addons/website_sale/static/src/js/tours/website_sale_shop_frontend.js
@@ -0,0 +1,11 @@
+odoo.define("website_sale.tour_shop_frontend", function (require) {
+"use strict";
+
+var tour = require("web_tour.tour");
+var steps = require("website_sale.tour_shop");
+tour.register("shop", {
+ url: "/shop",
+ sequence: 130,
+}, steps);
+
+});