diff --git a/addons/gamification_sale_crm/sale_crm_goals_demo.xml b/addons/gamification_sale_crm/sale_crm_goals_demo.xml index fd69c36162f..d8e26551c32 100644 --- a/addons/gamification_sale_crm/sale_crm_goals_demo.xml +++ b/addons/gamification_sale_crm/sale_crm_goals_demo.xml @@ -14,7 +14,7 @@ - + 2000 inprogress diff --git a/addons/website/data/website_data.xml b/addons/website/data/website_data.xml index 50f2d8e381e..4eff1b8a60d 100644 --- a/addons/website/data/website_data.xml +++ b/addons/website/data/website_data.xml @@ -59,7 +59,7 @@ Website With Tutorial - /?tutorial.banner=true + /#tutorial.banner=true self diff --git a/addons/website/static/src/js/website.tour.banner.js b/addons/website/static/src/js/website.tour.banner.js index 2c26ae34e98..b079c4a670c 100644 --- a/addons/website/static/src/js/website.tour.banner.js +++ b/addons/website/static/src/js/website.tour.banner.js @@ -13,7 +13,7 @@ website.BannerTour = website.Tour.extend({ id: 'banner', name: "Insert a banner", - path: '/page/website.homepage', + path: '/', init: function (editor) { var self = this; self.steps = [ @@ -52,9 +52,9 @@ placement: 'top', title: "Customize banner's text", content: "Click in the text and start editing it. Click continue once it's done.", + template: self.popover({ next: "Continue" }), }, { - waitNot: '#wrap [data-snippet-id=carousel]:first .carousel-caption:contains("Your Banner Title")', element: '.oe_overlay_options .oe_options', placement: 'left', title: "Customize the banner", diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 39eaa5b7279..1db813e4cd4 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -7,10 +7,6 @@ website.add_template_file('/website/static/src/xml/website.tour.xml'); website.EditorBar.include({ tours: [], start: function () { - // $('.tour-backdrop').click(function (e) { - // e.stopImmediatePropagation(); - // e.preventDefault(); - // }); var self = this; var menu = $('#help-menu'); _.each(this.tours, function (tour) { @@ -113,11 +109,13 @@ website.Tour = openerp.Class.extend({ this.localStorage.setItem("tour-"+this.id+"-test-automatic", true); } - // redirect to begin of the tour if (this.path) { - var path = this.path.split('?'); - window.location.href = path[0] + "?tutorial."+this.id+"=true" + path.slice(1, path.length).join("?"); - return; + // redirect to begin of the tour in function of the language + if (!this.testUrl(this.path+"(#.*)?$")) { + var path = this.path.split('#'); + window.location.href = "/"+this.getLang()+path[0] + "#tutorial."+this.id+"=true&" + path.slice(1, path.length).join("#"); + return; + } } var self = this; @@ -125,12 +123,12 @@ website.Tour = openerp.Class.extend({ website.Tour.waitReady.call(this, function () {self._running();}); }, running: function () { - if (+this.localStorage.getItem("tour-"+this.id+"-test") >= this.steps.length) { + if (+this.localStorage.getItem("tour-"+this.id+"-test") >= this.steps.length-1) { this.endTour(); return; } - if (website.Tour.is_busy() || !this.testUrl()) return; + if (website.Tour.is_busy() || !this.testPathUrl()) return; // launch tour with url this.checkRunningUrl(); @@ -143,7 +141,6 @@ website.Tour = openerp.Class.extend({ var self = this; website.Tour.waitReady.call(this, function () {self._running();}); }, - _running: function () { var stepId = this.localStorage.getItem("tour-"+this.id+"-test"); var automatic = !!this.localStorage.getItem("tour-"+this.id+"-test-automatic"); @@ -174,13 +171,19 @@ website.Tour = openerp.Class.extend({ $('.popover.tour').remove(); }, - testUrl: function () { - return !this.testPath || this.testPath.test(window.location.href); + getLang: function () { + return $("html").attr("lang").replace(/-/, '_'); + }, + testUrl: function (url) { + return new RegExp("(/"+this.getLang()+")?"+url, "i").test(window.location.href); + }, + testPathUrl: function () { + if (!this.testPath || this.testUrl(this.testPath)) return true; }, checkRunningUrl: function () { - if (window.location.search.indexOf("tutorial."+this.id+"=true") > -1) { + if (window.location.hash.indexOf("tutorial."+this.id+"=true") > -1) { this.localStorage.setItem("tour-"+this.id+"-test", 0); - window.location.href = window.location.href.replace(/tutorial.+=true&?/, ''); + window.location.hash = window.location.hash.replace(/tutorial.+=true&?/, ''); } }, @@ -315,7 +318,11 @@ website.Tour = openerp.Class.extend({ } }, endTour: function () { - console.log('{ "event": "success" }'); + if (parseInt(this.localStorage.getItem("tour-"+this.id+"-test"),10) >= this.steps.length-1) { + console.log('{ "event": "success" }'); + } else { + console.log('{ "event": "canceled" }'); + } this.reset(); }, autoNextStep: function () { diff --git a/addons/website_blog/data/website_blog_data.xml b/addons/website_blog/data/website_blog_data.xml index 4eb70186d52..a5a3aa3d8c9 100644 --- a/addons/website_blog/data/website_blog_data.xml +++ b/addons/website_blog/data/website_blog_data.xml @@ -20,7 +20,7 @@ Website Blogs self - + diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index 1bd9f22fa31..ffbd6e7ecc8 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -13,7 +13,7 @@ website.BlogTour = website.Tour.extend({ id: 'blog', name: "Create a blog post", - testPath: /\/(blog|blogpost)\/[0-9]+\//, + testPath: '/(blog|blogpost)', init: function (editor) { var self = this; self.steps = [ diff --git a/addons/website_crm_partner_assign/controllers/main.py b/addons/website_crm_partner_assign/controllers/main.py index 17a666cf2e3..fbfb1908a14 100644 --- a/addons/website_crm_partner_assign/controllers/main.py +++ b/addons/website_crm_partner_assign/controllers/main.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- +import werkzeug + import openerp from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.tools.translate import _ from openerp.addons.web.http import request from openerp.addons.website_partner.controllers import main as website_partner -import werkzeug.urls class WebsiteCrmPartnerAssign(http.Controller): _references_per_page = 20 @@ -14,16 +15,25 @@ class WebsiteCrmPartnerAssign(http.Controller): @http.route([ '/partners/', '/partners/page//', + + '/partners/grade/', + '/partners/grade//page//', + '/partners/country/', '/partners/country/-', '/partners/country//page//', '/partners/country/-/page//', + + '/partners/grade//country//', + '/partners/grade//country/-', + '/partners/grade//country//page//', + '/partners/grade//country/-/page//', + ], type='http', auth="public", website=True, multilang=True) - def partners(self, country_id=0, page=0, **post): + def partners(self, country_id=0, grade_id=0, page=0, **post): country_obj = request.registry['res.country'] partner_obj = request.registry['res.partner'] post_name = post.get('search', '') - grade_id = post.get('grade', '') country = None # format displayed membership lines domain @@ -83,7 +93,7 @@ class WebsiteCrmPartnerAssign(http.Controller): context=request.context, count=True) grades.insert(0, { 'grade_id_count': grades_partners, - 'grade_id': ("all", _("All Levels")) + 'grade_id': (0, _("All Categories")) }) values = { diff --git a/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml b/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml index cd06e515a3e..cd2e3cb58bd 100644 --- a/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml +++ b/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml @@ -35,13 +35,27 @@ Contact a reseller +
-

Resellers by Country

+ + + +
+
@@ -103,7 +109,7 @@