[FIX] Event tour was broken by change
authorddm <ddm@openerp.com>
Fri, 29 Nov 2013 11:34:11 +0000 (12:34 +0100)
committerddm <ddm@openerp.com>
Fri, 29 Nov 2013 11:34:11 +0000 (12:34 +0100)
bzr revid: ddm@openerp.com-20131129113411-oy8zdxt97i14sawt

addons/website_event/static/src/js/website.tour.event.js

index 25eda03..73152fa 100644 (file)
                     stepId: 'save-changes',
                     element: 'button[data-action=save]',
                     placement: 'right',
-                    reflex: true,
                     title: "Save your modifications",
                     content: "Once you click on save, your event is updated.",
+                    triggers: function () {
+                        var $publish = $('button.js_publish_btn');
+                        if ($publish.length > 0 && $publish.is(":visible")) {
+                            self.moveToNextStep();
+                        }
+                    },
                 },
                 {
                     stepId: 'publish-event',
             return this._super();
         },
         resume: function () {
-            return (this.isCurrentStep('event-page') || this.isCurrentStep('publish-event')) && this._super();
+            return (this.isCurrentStep('event-page') || this.isCurrentStep('save-changes')) && this._super();
         },
         trigger: function () {
             return (this.resume() && this.testUrl(/^\/event\/[0-9]+\/register/)) || this._super();