[FIX] Blog tour was broken by change
authorddm <ddm@openerp.com>
Fri, 29 Nov 2013 13:09:22 +0000 (14:09 +0100)
committerddm <ddm@openerp.com>
Fri, 29 Nov 2013 13:09:22 +0000 (14:09 +0100)
bzr revid: ddm@openerp.com-20131129130922-1l7m0gf9uy4br6rf

addons/website_blog/static/src/js/website.tour.blog.js

index 4b21a96..dd0f2b1 100644 (file)
                     stepId: 'save-changes',
                     element: 'button[data-action=save]',
                     placement: 'right',
-                    reflex: true,
                     title: "Save Your Blog",
                     content: "Click the <em>Save</em> button to record changes on the page.",
+                    triggers: function () {
+                        var $publish = $('button.js_publish_btn');
+                        if ($publish.length > 0 && $publish.is(":visible")) {
+                            self.moveToNextStep();
+                        }
+                    },
                 },
                 {
                     stepId: 'publish-post',
             return this._super();
         },
         resume: function () {
-            return (this.isCurrentStep('post-page') || this.isCurrentStep('publish-post')) && this._super();
+            return (this.isCurrentStep('post-page') || this.isCurrentStep('save-changes')) && this._super();
         },
         trigger: function () {
             return (this.resume() && this.testUrl(/^\/blog\/[0-9]+\//)) || this._super();