From bb15c21dc9f76609876c01ef6665d69ff4da7fd8 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 10:44:23 +0100 Subject: [PATCH 01/13] [IMP] Blog tour scaffolding bzr revid: ddm@openerp.com-20131120094423-ra4e6xmmty6pmpk2 --- addons/website_blog/controllers/main.py | 4 ++-- addons/website_blog/data/website_blog_data.xml | 2 +- addons/website_blog/views/website_blog_templates.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index bf344a18eae..aa032a56dbc 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -38,7 +38,7 @@ class WebsiteBlog(http.Controller): def nav_list(self): blog_post_obj = request.registry['blog.post'] - groups = blog_post_obj.read_group(request.cr, request.uid, [], ['name', 'create_date'], + groups = blog_post_obj.read_group(request.cr, request.uid, [], ['name', 'create_date'], groupby="create_date", orderby="create_date asc", context=request.context) for group in groups: group['date'] = "%s_%s" % (group['__domain'][0][2], group['__domain'][1][2]) @@ -76,7 +76,7 @@ class WebsiteBlog(http.Controller): '/blog/cat//tag//date//', '/blog/cat//tag//date//page//', ], type='http', auth="public", multilang=True) - def blog(self, category=None, tag=None, date=None, page=1): + def blog(self, category=None, tag=None, date=None, page=1, **opt): """ Prepare all values to display the blog. :param category: category currently browsed. diff --git a/addons/website_blog/data/website_blog_data.xml b/addons/website_blog/data/website_blog_data.xml index ab8a8b87dd4..e16128f0697 100644 --- a/addons/website_blog/data/website_blog_data.xml +++ b/addons/website_blog/data/website_blog_data.xml @@ -21,7 +21,7 @@ Website Blogs self - + diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml index 26fd8806422..abf91e3c99f 100644 --- a/addons/website_blog/views/website_blog_templates.xml +++ b/addons/website_blog/views/website_blog_templates.xml @@ -4,6 +4,7 @@ @@ -59,7 +60,7 @@
  - In + In   From e7872e0f9368c53a8db6d55c09ec99d973fca51c Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 11:24:20 +0100 Subject: [PATCH 02/13] [IMP] Blog tutorial first steps bzr revid: ddm@openerp.com-20131120102420-idavehs3hgb8y7v6 --- .../static/src/js/website.tour.blog.js | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 addons/website_blog/static/src/js/website.tour.blog.js diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js new file mode 100644 index 00000000000..25a4cc8a302 --- /dev/null +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -0,0 +1,99 @@ +(function () { + 'use strict'; + + var website = openerp.website; + + var render = website.tour.render; + + website.BlogTour = website.EditorTour.extend({ + id: 'blog-tutorial', + name: "Create a blog post", + startPath: '/blog/cat/1/', + init: function (editor) { + var self = this; + var $body = $(document.body); + self.steps = [ + { + stepId: 'welcome-blog', + orphan: true, + backdrop: true, + title: "Blog", + content: "We will show how to create a new blog post.", + template: render('website.tour_popover', { next: "Start Tutorial", end: "Skip It" }), + }, + { + stepId: 'content-menu', + element: '#content-menu-button', + placement: 'left', + reflex: true, + title: "Edit the content", + content: "Click here to add content to your site.", + template: render('website.tour_popover'), + }, + { + stepId: 'new-post-entry', + element: 'a[data-action=new_blog_post]', + placement: 'left', + title: "New blog post", + content: "Click here to create a blog post.", + template: render('website.tour_popover'), + onShow: function () { + $(document).one('shown.bs.modal', function () { + $('.modal button.btn-primary').click(function () { + self.movetoStep('post-page'); + }); + self.movetoStep('choose-category'); + }); + }, + }, + { + stepId: 'choose-category', + element: '.modal select', + placement: 'right', + title: "Choose the post category", + content: "Select the 'News' category and click 'Continue'.", + template: render('website.tour_popover'), + }, + { + stepId: 'post-page', + orphan: true, + backdrop: true, + title: "New blog post created", + content: "You just created a new blog post. We are now going to edit it.", + template: render('website.tour_popover', { next: "OK" }), + }, + { + stepId: 'add-block', + element: 'button[data-action=snippet]', + placement: 'bottom', + reflex: true, + title: "Layout your blog post", + content: "Insert blocks like text-image to layout the body of your blog post.", + template: render('website.tour_popover'), + }, + ]; + return this._super(); + }, + postPage: function () { + var currentStepIndex = this.currentStepIndex(); + var postPageIndex = this.indexOfStep('post-page'); + return (currentStepIndex === postPageIndex) && !this.tour.ended(); + }, + continueTour: function () { + return this.postPage(); + }, + isTriggerUrl: function (url) { + url = url || new website.UrlParser(window.location.href); + var addPostPattern = /^\/blog\/[0-9]+\/\?enable_editor=1/; + return (this.postPage && addPostPattern.test(url.pathname+url.search)) || this._super(); + }, + }); + + website.EditorBar.include({ + start: function () { + this.registerTour(new website.BlogTour(this)); + return this._super(); + }, + }); + +}()); From 6e043bca3b6ba090db1281d467d8565dde9d7c6b Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 11:39:07 +0100 Subject: [PATCH 03/13] [IMP] Blog tour code cleanup bzr revid: ddm@openerp.com-20131120103907-06dfmxjhq7ad18wz --- .../static/src/js/website.tour.blog.js | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) 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 25a4cc8a302..5cb78dd122e 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -5,6 +5,13 @@ var render = website.tour.render; + website.EditorBar.include({ + start: function () { + this.registerTour(new website.BlogTour(this)); + return this._super(); + }, + }); + website.BlogTour = website.EditorTour.extend({ id: 'blog-tutorial', name: "Create a blog post", @@ -74,25 +81,13 @@ ]; return this._super(); }, - postPage: function () { - var currentStepIndex = this.currentStepIndex(); - var postPageIndex = this.indexOfStep('post-page'); - return (currentStepIndex === postPageIndex) && !this.tour.ended(); - }, continueTour: function () { - return this.postPage(); + return (this.currentStepIndex() === this.indexOfStep('post-page')) && !this.tour.ended(); }, isTriggerUrl: function (url) { url = url || new website.UrlParser(window.location.href); var addPostPattern = /^\/blog\/[0-9]+\/\?enable_editor=1/; - return (this.postPage && addPostPattern.test(url.pathname+url.search)) || this._super(); - }, - }); - - website.EditorBar.include({ - start: function () { - this.registerTour(new website.BlogTour(this)); - return this._super(); + return (this.continueTour() && addPostPattern.test(url.pathname+url.search)) || this._super(); }, }); From be6c14c5b6863a8f1d6942d0acad790ffea4c035 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 11:41:07 +0100 Subject: [PATCH 04/13] [IMP] Shop tour code cleanup bzr revid: ddm@openerp.com-20131120104107-hoiu7n6cq68qf69u --- .../static/src/js/website.tour.shop.js | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index afe51eedc10..7f68056012e 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -5,6 +5,13 @@ var render = website.tour.render; + website.EditorBar.include({ + start: function () { + this.registerTour(new website.EditorShopTour(this)); + return this._super(); + }, + }); + website.EditorShopTour = website.EditorTour.extend({ id: 'shop-tutorial', name: "Create a product", @@ -83,25 +90,13 @@ ]; return this._super(); }, - productPage: function () { - var currentStepIndex = this.currentStepIndex(); - var productPageIndex = this.indexOfStep('product-page'); - return (currentStepIndex === productPageIndex) && !this.tour.ended(); - }, continueTour: function () { - return this.productPage(); + return (this.currentStepIndex() === this.indexOfStep('product-page')) && !this.tour.ended(); }, isTriggerUrl: function (url) { url = url || new website.UrlParser(window.location.href); var addProductPattern = /^\/shop\/product\/[0-9]+\/\?enable_editor=1/; - return (this.productPage() && addProductPattern.test(url.pathname+url.search)) || this._super(); - }, - }); - - website.EditorBar.include({ - start: function () { - this.registerTour(new website.EditorShopTour(this)); - return this._super(); + return (this.continueTour() && addProductPattern.test(url.pathname+url.search)) || this._super(); }, }); From 10e7a76ae49a4b57801f14165b5550962c83ef04 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 11:52:05 +0100 Subject: [PATCH 05/13] [IMP] Simplify tour declaration bzr revid: ddm@openerp.com-20131120105205-u5w4167rposrfazd --- addons/website/static/src/js/website.tour.js | 7 +++++++ addons/website_blog/static/src/js/website.tour.blog.js | 8 +++----- addons/website_sale/static/src/js/website.tour.shop.js | 6 ++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index d70405e3601..ec4319560a2 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -52,6 +52,9 @@ }); return index; }, + isCurrentStep: function (stepId) { + return this.currentStepIndex() === this.indexOfStep(stepId); + }, movetoStep: function (stepId) { $('.popover.tour').remove(); var index = this.indexOfStep(stepId); @@ -83,6 +86,10 @@ var urlTrigger = this.id + "=true"; return url.search.indexOf(urlTrigger) >= 0; }, + testUrl: function (pattern) { + var url = new website.UrlParser(window.location.href); + return pattern.test(url.pathname+url.search); + }, }); website.UrlParser = openerp.Class.extend({ 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 5cb78dd122e..d51cd1e9d37 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -82,12 +82,10 @@ return this._super(); }, continueTour: function () { - return (this.currentStepIndex() === this.indexOfStep('post-page')) && !this.tour.ended(); + return this.isCurrentStep('post-page') && !this.tour.ended(); }, - isTriggerUrl: function (url) { - url = url || new website.UrlParser(window.location.href); - var addPostPattern = /^\/blog\/[0-9]+\/\?enable_editor=1/; - return (this.continueTour() && addPostPattern.test(url.pathname+url.search)) || this._super(); + isTriggerUrl: function () { + return (this.continueTour() && this.testUrl(/^\/blog\/[0-9]+\/\?enable_editor=1/)) || this._super(); }, }); diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index 7f68056012e..4aa714fa102 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -91,12 +91,10 @@ return this._super(); }, continueTour: function () { - return (this.currentStepIndex() === this.indexOfStep('product-page')) && !this.tour.ended(); + return this.isCurrentStep('product-page') && !this.tour.ended(); }, isTriggerUrl: function (url) { - url = url || new website.UrlParser(window.location.href); - var addProductPattern = /^\/shop\/product\/[0-9]+\/\?enable_editor=1/; - return (this.continueTour() && addProductPattern.test(url.pathname+url.search)) || this._super(); + return (this.continueTour() && this.testUrl(/^\/shop\/product\/[0-9]+\/\?enable_editor=1/)) || this._super(); }, }); From e8858b02a678c52b6812d2149025f237822dcec6 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 12:02:33 +0100 Subject: [PATCH 06/13] [IMP] Simplify tour declaration II bzr revid: ddm@openerp.com-20131120110233-1hoc40q2wrs0739d --- .../static/src/js/website.tour.banner.js | 24 +++++++------------ .../static/src/js/website.tour.install-app.js | 16 ++++++------- addons/website/static/src/js/website.tour.js | 2 +- .../static/src/js/website.tour.menu-editor.js | 16 ++++++------- .../static/src/js/website.tour.blog.js | 2 +- .../static/src/js/website.tour.shop.js | 2 +- 6 files changed, 28 insertions(+), 34 deletions(-) diff --git a/addons/website/static/src/js/website.tour.banner.js b/addons/website/static/src/js/website.tour.banner.js index 3bf21deee5a..874f219c69f 100644 --- a/addons/website/static/src/js/website.tour.banner.js +++ b/addons/website/static/src/js/website.tour.banner.js @@ -5,7 +5,14 @@ var render = website.tour.render; - website.EditorBannerTour = website.EditorTour.extend({ + website.EditorBar.include({ + start: function () { + this.registerTour(new website.AddBannerTour(this)); + return this._super(); + }, + }); + + website.AddBannerTour = website.Tour.extend({ id: 'banner-tutorial', name: "Insert a banner", startPath: '/page/website.homepage', @@ -127,21 +134,8 @@ ]; return this._super(); }, - startOfPart2: function () { - var currentStepIndex = this.currentStepIndex(); - var secondPartIndex = this.indexOfStep('part-2'); - var showTutorialsIndex = this.indexOfStep('show-tutorials'); - return (currentStepIndex === secondPartIndex || currentStepIndex === showTutorialsIndex) && !this.tour.ended(); - }, continueTour: function () { - return this.startOfPart2() || this._super(); - }, - }); - - website.EditorBar.include({ - start: function () { - this.registerTour(new website.EditorBannerTour(this)); - return this._super(); + return (this.isCurrentStep('part-2') || this.isCurrentStep('show-tutorials')) && !this.tour.ended(); }, }); diff --git a/addons/website/static/src/js/website.tour.install-app.js b/addons/website/static/src/js/website.tour.install-app.js index ef920b51b3c..f10c5c951ca 100644 --- a/addons/website/static/src/js/website.tour.install-app.js +++ b/addons/website/static/src/js/website.tour.install-app.js @@ -5,7 +5,14 @@ var render = website.tour.render; - website.InstallAppTour = website.EditorTour.extend({ + website.EditorBar.include({ + start: function () { + this.registerTour(new website.InstallAppTour(this)); + return this._super(); + }, + }); + + website.InstallAppTour = website.Tour.extend({ id: 'install-app', name: "Install a new App", init: function (editor) { @@ -47,11 +54,4 @@ }, }); - website.EditorBar.include({ - start: function () { - this.registerTour(new website.InstallAppTour(this)); - return this._super(); - }, - }); - }()); diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index ec4319560a2..60bbf2487b9 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -10,7 +10,7 @@ } }; - website.EditorTour = openerp.Class.extend({ + website.Tour = openerp.Class.extend({ tour: undefined, steps: [], tourStorage: window.localStorage, diff --git a/addons/website/static/src/js/website.tour.menu-editor.js b/addons/website/static/src/js/website.tour.menu-editor.js index f4a56713e2b..b4dedc11c3b 100644 --- a/addons/website/static/src/js/website.tour.menu-editor.js +++ b/addons/website/static/src/js/website.tour.menu-editor.js @@ -5,7 +5,14 @@ var render = website.tour.render; - website.EditorBuilderTour = website.EditorTour.extend({ + website.EditorBar.include({ + start: function () { + this.registerTour(new website.EditorBuilderTour(this)); + return this._super(); + }, + }); + + website.EditorBuilderTour = website.Tour.extend({ id: 'menu-editor', name: "Add a new page", init: function (editor) { @@ -98,11 +105,4 @@ }, }); - website.EditorBar.include({ - start: function () { - this.registerTour(new website.EditorBuilderTour(this)); - return this._super(); - }, - }); - }()); 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 d51cd1e9d37..9ffb89b975b 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -12,7 +12,7 @@ }, }); - website.BlogTour = website.EditorTour.extend({ + website.BlogTour = website.Tour.extend({ id: 'blog-tutorial', name: "Create a blog post", startPath: '/blog/cat/1/', diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index 4aa714fa102..35035853fe3 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -12,7 +12,7 @@ }, }); - website.EditorShopTour = website.EditorTour.extend({ + website.EditorShopTour = website.Tour.extend({ id: 'shop-tutorial', name: "Create a product", startPath: '/shop', From c706db9b79d6f89e4f6a3f2811aeccb9c988e2e4 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 12:07:57 +0100 Subject: [PATCH 07/13] [IMP] Tour code cleanup bzr revid: ddm@openerp.com-20131120110757-lq4gnmxj9nf1e7p0 --- addons/website/static/src/js/website.tour.banner.js | 3 +-- addons/website/static/src/js/website.tour.install-app.js | 1 - addons/website/static/src/js/website.tour.menu-editor.js | 1 - addons/website_blog/static/src/js/website.tour.blog.js | 1 - addons/website_sale/static/src/js/website.tour.shop.js | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/website/static/src/js/website.tour.banner.js b/addons/website/static/src/js/website.tour.banner.js index 874f219c69f..bb4b576ba24 100644 --- a/addons/website/static/src/js/website.tour.banner.js +++ b/addons/website/static/src/js/website.tour.banner.js @@ -18,7 +18,6 @@ startPath: '/page/website.homepage', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome', @@ -62,6 +61,7 @@ content: "Drag the Banner block and drop it in your page.", template: render('website.tour_popover'), onShow: function () { + var $body = $(document.body); function beginDrag () { $('.popover.tour').remove(); function goToNextStep () { @@ -72,7 +72,6 @@ $body.off('mousedown', beginDrag); $body.on('mouseup', goToNextStep); } - $body.on('mousedown', beginDrag); }, }, diff --git a/addons/website/static/src/js/website.tour.install-app.js b/addons/website/static/src/js/website.tour.install-app.js index f10c5c951ca..d7d98fb5430 100644 --- a/addons/website/static/src/js/website.tour.install-app.js +++ b/addons/website/static/src/js/website.tour.install-app.js @@ -17,7 +17,6 @@ name: "Install a new App", init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-install-app', diff --git a/addons/website/static/src/js/website.tour.menu-editor.js b/addons/website/static/src/js/website.tour.menu-editor.js index b4dedc11c3b..b37d3c3813e 100644 --- a/addons/website/static/src/js/website.tour.menu-editor.js +++ b/addons/website/static/src/js/website.tour.menu-editor.js @@ -17,7 +17,6 @@ name: "Add a new page", init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-menu-editor', 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 9ffb89b975b..02c69530ce5 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -18,7 +18,6 @@ startPath: '/blog/cat/1/', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-blog', diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index 35035853fe3..6b67836ac84 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -18,7 +18,6 @@ startPath: '/shop', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-shop', From f5fc2dd4ff98a115cd50b14161c630ab980e9ca5 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 12:17:21 +0100 Subject: [PATCH 08/13] [IMP] Event tour scaffholding bzr revid: ddm@openerp.com-20131120111721-uw7xiizsh0wd7n3y --- addons/website_event/data/event_data.xml | 4 +-- .../static/src/js/website.tour.event.js | 28 +++++++++++++++++++ addons/website_event/views/website_event.xml | 1 + 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 addons/website_event/static/src/js/website.tour.event.js diff --git a/addons/website_event/data/event_data.xml b/addons/website_event/data/event_data.xml index baf732b781b..d2e717ebb3e 100644 --- a/addons/website_event/data/event_data.xml +++ b/addons/website_event/data/event_data.xml @@ -11,14 +11,14 @@ Website Home self - /event + /event?event-tutorial=true open - + view_event_twitter_form event.event diff --git a/addons/website_event/static/src/js/website.tour.event.js b/addons/website_event/static/src/js/website.tour.event.js new file mode 100644 index 00000000000..be2cd1be77e --- /dev/null +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -0,0 +1,28 @@ +(function () { + 'use strict'; + + var website = openerp.website; + + var render = website.tour.render; + + website.EditorBar.include({ + start: function () { + this.registerTour(new website.EventTour(this)); + return this._super(); + }, + }); + + website.EventTour = website.Tour.extend({ + id: 'event-tutorial', + name: "Create an event", + startPath: '/event', + init: function (editor) { + var self = this; + self.steps = [ + + ]; + return this._super(); + }, + }); + +}()); diff --git a/addons/website_event/views/website_event.xml b/addons/website_event/views/website_event.xml index e41ab05494e..fbb75e49736 100644 --- a/addons/website_event/views/website_event.xml +++ b/addons/website_event/views/website_event.xml @@ -5,6 +5,7 @@ From 2420f814e888dcde2814a6b784dc4daccfa968d7 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 12:18:17 +0100 Subject: [PATCH 09/13] [IMP] Event tour steps bzr revid: ddm@openerp.com-20131120111817-0c9s61c433mlw901 --- .../static/src/js/website.tour.event.js | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/addons/website_event/static/src/js/website.tour.event.js b/addons/website_event/static/src/js/website.tour.event.js index be2cd1be77e..69d6eba82bc 100644 --- a/addons/website_event/static/src/js/website.tour.event.js +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -19,7 +19,64 @@ init: function (editor) { var self = this; self.steps = [ - + { + stepId: 'welcome-event', + orphan: true, + backdrop: true, + title: "Event", + content: "We will show how to create a new event.", + template: render('website.tour_popover', { next: "Start Tutorial", end: "Skip It" }), + }, + { + stepId: 'content-menu', + element: '#content-menu-button', + placement: 'left', + reflex: true, + title: "Edit the content", + content: "Click here to add content to your site.", + template: render('website.tour_popover'), + }, + { + stepId: 'new-post-entry', + element: 'a[data-action=new_event]', + placement: 'left', + title: "New event", + content: "Click here to create an event.", + template: render('website.tour_popover'), + onShow: function () { + $(document).one('shown.bs.modal', function () { + $('.modal button.btn-primary').click(function () { + self.movetoStep('event-page'); + }); + self.movetoStep('choose-category'); + }); + }, + }, + { + stepId: 'choose-name', + element: '.modal input', + placement: 'right', + title: "Choose the event name", + content: "Choose a name for the new event and click 'Continue'.", + template: render('website.tour_popover'), + }, + { + stepId: 'event-page', + orphan: true, + backdrop: true, + title: "New event created", + content: "You just created a new event. We are now going to edit it.", + template: render('website.tour_popover', { next: "OK" }), + }, + { + stepId: 'add-block', + element: 'button[data-action=snippet]', + placement: 'bottom', + reflex: true, + title: "Layout your event", + content: "Insert blocks like text-image to layout the body of your event.", + template: render('website.tour_popover'), + }, ]; return this._super(); }, From 00580f106ecc3f7530f9856c601d963545699fa2 Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 12:18:41 +0100 Subject: [PATCH 10/13] [IMP] Event tour continue bzr revid: ddm@openerp.com-20131120111841-vrei1vmt14trw5kh --- addons/website_event/static/src/js/website.tour.event.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website_event/static/src/js/website.tour.event.js b/addons/website_event/static/src/js/website.tour.event.js index 69d6eba82bc..8bbd470d1e6 100644 --- a/addons/website_event/static/src/js/website.tour.event.js +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -80,6 +80,12 @@ ]; return this._super(); }, + continueTour: function () { + return this.isCurrentStep('event-page') && !this.tour.ended(); + }, + isTriggerUrl: function () { + return (this.continueTour() && this.testUrl(/^\/event\/[0-9]+\/\?enable_editor=1/)) || this._super(); + }, }); }()); From 6b10be15b245e05adac2a54f0321305c6d5076d9 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 20 Nov 2013 12:52:50 +0100 Subject: [PATCH 11/13] [IMP] website snippet: add group for styles snippets, add custom picture with style snippet, mouseover and mouseout preview, fix dark css class in demo data bzr revid: chm@openerp.com-20131120115250-etqv5ofqguze0zsj --- addons/website/static/src/css/website.css | 151 ++++++++++-------- addons/website/static/src/css/website.sass | 140 +++++++++------- .../website/static/src/js/website.editor.js | 6 + .../static/src/js/website.snippets.editor.js | 130 ++++++++++++--- addons/website/views/snippets.xml | 28 +++- .../website_blog/data/website_blog_demo.xml | 2 +- addons/website_event/data/event_demo.xml | 6 +- .../data/website_hr_recruitment_demo.xml | 14 +- .../views/website_hr_recruitment.xml | 4 +- addons/website_sale/website_sale_demo.xml | 14 +- 10 files changed, 318 insertions(+), 177 deletions(-) diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index 99ba04e2a96..41c04e6b702 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -257,6 +257,73 @@ footer { margin-bottom: 0px; } +/* ---- HOMEPAGE THEME CUSTOMIZATION ---- */ +.nav-hierarchy { + padding-left: 16px; +} + +#themes-list .well { + padding: 0 0 20px 0; +} + +/* -- Hack for removing double scrollbar from mobile preview -- */ +div#mobile-preview.modal { + overflow: hidden; + overflow-y: hidden; +} + +ul.nav-stacked > li > a { + padding: 2px 15px; +} + +#customize-menu .dropdown-header { + text-transform: uppercase; +} + +/* ---- PUBLISH ---- */ +.css_unpublish, .css_publish { + display: none; +} + +.css_published .css_unpublish, .css_unpublished .css_publish { + display: block; +} + +[data-publish='off'] { + opacity: 0.5; +} + +/* ---- END of PUBLISH ---- */ +::selection { + background: rgba(150, 150, 220, 0.3); +} + +.logo-img { + width: 220px; +} + +.oe_demo { + position: relative; +} +.oe_demo img { + width: 100%; +} +.oe_demo div { + position: absolute; + left: 0; + background-color: rgba(0, 0, 0, 0.4); + opacity: 0.85; + bottom: 0px; + width: 100%; + padding: 7px; + color: white; + font-weight: bold; +} +.oe_demo div a { + color: white; +} + +/* ---- SNIPPETS --- */ .carousel-inner .item { height: 100%; background-size: 100%; @@ -331,23 +398,6 @@ footer { right: 10px; } -/* ---- HOMEPAGE THEME CUSTOMIZATION ---- */ -.dark { - background: #eff8f8; - background: rgba(100, 200, 200, 0.14); - -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; - -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; - box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; -} - -.nav-hierarchy { - padding-left: 16px; -} - -#themes-list .well { - padding: 0 0 20px 0; -} - /* Parallax Theme */ .parallax_quote { background: url("/website/static/src/img/parallax/quote.png") center center no-repeat fixed; @@ -374,59 +424,32 @@ footer { height: 450px; } -/* -- Hack for removing double scrollbar from mobile preview -- */ -div#mobile-preview.modal { - overflow: hidden; - overflow-y: hidden; +/* Background */ +.oe_dark { + background: #eff8f8; + background: rgba(100, 200, 200, 0.14); + -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; + -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; + box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; + background-image: none !important; } -ul.nav-stacked > li > a { - padding: 2px 15px; +.oe_black { + background-color: rgba(0, 0, 0, 0.9); + background-image: none !important; } -#customize-menu .dropdown-header { - text-transform: uppercase; +.oe_green { + background-color: rgba(0, 128, 0, 0.8); + background-image: none !important; } -/* ---- PUBLISH ---- */ -.css_unpublish, .css_publish { - display: none; +.oe_red { + background-color: rgba(255, 0, 0, 0.8); + background-image: none !important; } -.css_published .css_unpublish, .css_unpublished .css_publish { - display: block; -} - -[data-publish='off'] { - opacity: 0.5; -} - -/* ---- END of PUBLISH ---- */ -::selection { - background: rgba(150, 150, 220, 0.3); -} - -.logo-img { - width: 220px; -} - -.oe_demo { - position: relative; -} -.oe_demo img { - width: 100%; -} -.oe_demo div { - position: absolute; - left: 0; - background-color: rgba(0, 0, 0, 0.4); - opacity: 0.85; - bottom: 0px; - width: 100%; - padding: 7px; - color: white; - font-weight: bold; -} -.oe_demo div a { - color: white; +.oe_custom_bg { + height: 100%; + background-size: 100%; } diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index f947a163a28..cd1c99dda27 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -186,6 +186,65 @@ footer // .nav > li a // display: block +/* ---- HOMEPAGE THEME CUSTOMIZATION ---- */ + +.nav-hierarchy + padding-left: 16px + +#themes-list .well + padding: 0 0 20px 0 + +/* -- Hack for removing double scrollbar from mobile preview -- */ +div#mobile-preview.modal + overflow: hidden + overflow-y: hidden + +ul.nav-stacked > li > a + padding: 2px 15px + +#customize-menu .dropdown-header + text-transform: uppercase + +/* ---- PUBLISH ---- */ +.css_unpublish, .css_publish + display: none +.css_published .css_unpublish, .css_unpublished .css_publish + display: block + +[data-publish='off'] + opacity: 0.5 + +/* ---- END of PUBLISH ---- */ + + + +::selection + background: rgba(150, 150, 220, 0.3) + +.logo-img + width: 220px + + +.oe_demo + position: relative + img + width: 100% + div + position: absolute + left: 0 + background-color: rgba(0,0,0,0.4) + opacity: 0.85 + bottom: 0px + width: 100% + padding: 7px + color: white + font-weight: bold + a + color: white + + +/* ---- SNIPPETS --- */ + .carousel-inner .item height: 100% background-size: 100% @@ -249,20 +308,6 @@ footer &.right span right: 10px -/* ---- HOMEPAGE THEME CUSTOMIZATION ---- */ - -.dark - background: #eff8f8 - background: rgba(100, 200, 200, 0.14) - -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset - -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset - box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset - -.nav-hierarchy - padding-left: 16px - -#themes-list .well - padding: 0 0 20px 0 /* Parallax Theme */ @@ -284,50 +329,25 @@ footer height: 300px &.oe_big height: 450px -/* -- Hack for removing double scrollbar from mobile preview -- */ -div#mobile-preview.modal - overflow: hidden - overflow-y: hidden -ul.nav-stacked > li > a - padding: 2px 15px - -#customize-menu .dropdown-header - text-transform: uppercase - -/* ---- PUBLISH ---- */ -.css_unpublish, .css_publish - display: none -.css_published .css_unpublish, .css_unpublished .css_publish - display: block - -[data-publish='off'] - opacity: 0.5 - -/* ---- END of PUBLISH ---- */ - - - -::selection - background: rgba(150, 150, 220, 0.3) - -.logo-img - width: 220px - - -.oe_demo - position: relative - img - width: 100% - div - position: absolute - left: 0 - background-color: rgba(0,0,0,0.4) - opacity: 0.85 - bottom: 0px - width: 100% - padding: 7px - color: white - font-weight: bold - a - color: white +/* Background */ + +.oe_dark + background: #eff8f8 + background: rgba(100, 200, 200, 0.14) + -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset + -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset + box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset + background-image: none !important +.oe_black + background-color: rgba(0, 0, 0, 0.9) + background-image: none !important +.oe_green + background-color: rgba(0, 128, 0, 0.8) + background-image: none !important +.oe_red + background-color: rgba(255, 0, 0, 0.8) + background-image: none !important +.oe_custom_bg + height: 100% + background-size: 100% diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 895bc8864c6..feb8e403c54 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -834,6 +834,7 @@ events: { 'hidden.bs.modal': 'destroy', 'click button.save': 'save', + 'click button[data-dismiss="modal"]': 'cancel', }, init: function (editor) { this._super(); @@ -847,6 +848,8 @@ save: function () { this.close(); }, + cancel: function () { + }, close: function () { this.$el.modal('hide'); }, @@ -1127,6 +1130,9 @@ }); return this._super(); }, + cancel: function () { + this.trigger('cancel'); + }, /** * Sets the provided image url as the dialog's value-to-save and diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 2523c53231f..7d7aade081f 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -151,11 +151,12 @@ self.style_templates[snipped_id] = { 'snipped-id' : snipped_id, 'selector': $style.data('selector'), - 'class': $style.find(".oe_snippet_class").text(), - 'label': $style.find(".oe_snippet_label").text() + 'class': $style.data("class"), + 'label': $style.find(".oe_snippet_label").text(), + 'group': $style.find(".oe_snippet_group").text() }; }); - $styles.remove(); + $styles.addClass("hidden"); self.$snippets = $html.find(".tab-content > div > div").addClass("oe_snippet"); self.$el.append($html); @@ -530,11 +531,11 @@ website.snippet.editorRegistry = {}; website.snippet.Editor = openerp.Class.extend({ - init: function (parent, dom) { + init: function (parent, dom, force_snippet_id) { this.parent = parent; this.$target = $(dom); this.$overlay = this.$target.data('overlay'); - this.snippet_id = this.$target.data("snippet-id"); + this.snippet_id = force_snippet_id || this.$target.data("snippet-id"); this._readXMLData(); this.load_style_options(); this.get_parent_block(); @@ -651,6 +652,10 @@ }, load_style_options: function () { + if (this.$target.data('snippetStyles')) { + return; + } + var self = this; var $styles = this.$overlay.find('.oe_options'); var $ul = $styles.find('ul:first'); @@ -660,30 +665,77 @@ } var $li = $("
  • ").data(val); $li.append($('').text(val.label)); - $ul.append($li); - if (self.$target.hasClass( "oe_snippet_" + $li.data("snipped-id") )) { + if (self.$target.hasClass( val.class )) { $li.addClass("active"); } - $styles.removeClass("hidden"); - }); - $styles.on('click', 'li.oe_style a', _.bind(this.change_style, this)); - }, - change_style: function (event) { - var $li = $(event.currentTarget).parent(); - var snipped_id = $li.data("snipped-id"); - var active = $li.hasClass("active"); - if (website.snippet.editorRegistry[snipped_id]) { - var snippet = new website.snippet.editorRegistry[snipped_id](this, this.$target); - snippet.drop_and_build_snippet(this.$target); + if (val.group.length) { + var $group = $ul.find("li.dropdown-submenu").filter(function () { + return $("a:first", this).text() === val.group; + }); + if (!$group.length) { + $group = $('
  • -
    +
    @@ -555,7 +555,7 @@ Button
    -
    +
    @@ -792,12 +792,26 @@
    diff --git a/addons/website_blog/data/website_blog_demo.xml b/addons/website_blog/data/website_blog_demo.xml index 41f272c628d..13687fdc19a 100644 --- a/addons/website_blog/data/website_blog_demo.xml +++ b/addons/website_blog/data/website_blog_demo.xml @@ -73,7 +73,7 @@
    -
    +
    diff --git a/addons/website_event/data/event_demo.xml b/addons/website_event/data/event_demo.xml index 35654f0282e..4da5b931d32 100644 --- a/addons/website_event/data/event_demo.xml +++ b/addons/website_event/data/event_demo.xml @@ -142,7 +142,7 @@
    -
    +

    A great content...

    @@ -305,7 +305,7 @@
    -
    +

    A great content...

    @@ -480,7 +480,7 @@
    -
    +

    A great content...

    diff --git a/addons/website_hr_recruitment/data/website_hr_recruitment_demo.xml b/addons/website_hr_recruitment/data/website_hr_recruitment_demo.xml index e2a64d5505b..c65d4a02ee0 100644 --- a/addons/website_hr_recruitment/data/website_hr_recruitment_demo.xml +++ b/addons/website_hr_recruitment/data/website_hr_recruitment_demo.xml @@ -5,7 +5,7 @@ True -
    +
    @@ -137,7 +137,7 @@ True -
    +
    @@ -270,7 +270,7 @@ True -
    +
    @@ -403,7 +403,7 @@ -
    +
    @@ -532,7 +532,7 @@ -
    +
    @@ -660,7 +660,7 @@ -
    +
    @@ -788,7 +788,7 @@ -
    +
    diff --git a/addons/website_hr_recruitment/views/website_hr_recruitment.xml b/addons/website_hr_recruitment/views/website_hr_recruitment.xml index 03b0454f68f..aee5995ebbd 100644 --- a/addons/website_hr_recruitment/views/website_hr_recruitment.xml +++ b/addons/website_hr_recruitment/views/website_hr_recruitment.xml @@ -86,7 +86,7 @@
    -
    +
    @@ -220,7 +220,7 @@ we will get back to you soon.

    -
    +
    diff --git a/addons/website_sale/website_sale_demo.xml b/addons/website_sale/website_sale_demo.xml index ef47ae7db59..981d66a28ee 100644 --- a/addons/website_sale/website_sale_demo.xml +++ b/addons/website_sale/website_sale_demo.xml @@ -13,7 +13,7 @@ 5 -
    +
    @@ -97,7 +97,7 @@
    -
    +
    @@ -175,7 +175,7 @@ Ultrafast wireless iOS7 -
    +
    @@ -213,7 +213,7 @@ iOS7
    -
    +
    @@ -251,7 +251,7 @@ iOS7
    -
    +
    @@ -358,7 +358,7 @@ Weight: 0.4 ounce
    -
    +
    @@ -450,7 +450,7 @@ Weight: 1.1 ounces
    -
    +
    From aa2208f580d1b189b9cf2d79cea72b4694f0da3d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 20 Nov 2013 13:44:51 +0100 Subject: [PATCH 12/13] [IMP] sass/compass use in website.sass bzr revid: xmo@openerp.com-20131120124451-25m26kao051x6tam --- addons/website/static/src/css/common.css | 0 addons/website/static/src/css/common.sass | 25 ++++++++++++++++++++++ addons/website/static/src/css/editor.css | 5 ++++- addons/website/static/src/css/editor.sass | 21 ++---------------- addons/website/static/src/css/website.css | 10 +++++++-- addons/website/static/src/css/website.sass | 25 +++++++--------------- 6 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 addons/website/static/src/css/common.css create mode 100644 addons/website/static/src/css/common.sass diff --git a/addons/website/static/src/css/common.css b/addons/website/static/src/css/common.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/addons/website/static/src/css/common.sass b/addons/website/static/src/css/common.sass new file mode 100644 index 00000000000..86e1f6655ef --- /dev/null +++ b/addons/website/static/src/css/common.sass @@ -0,0 +1,25 @@ +@import "compass/css3" +@import "compass/css3/user-interface" +@import "compass/css3/transition" + +//smartphones, iPhone, portrait 480x320 phones +$smart_phone: 320px +//portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide.*/ +$small-tablet: 481px +//portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones +$portrait-tablet: 641px +//tablet, landscape iPad, lo-res laptops ands desktops +$tablet: 961px +//big landscape tablets, laptops, and desktops +$desktop: 1025px + +@mixin editor-font + font-size: 14px + font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace + line-height: normal + +@mixin selection() + ::-moz-selection + @content + ::selection + @content diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 8aada166018..7a71740671b 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -1,4 +1,3 @@ -@charset "utf-8"; /* ---- CKEditor Minimal Reset ---- */ .navbar.navbar-inverse .cke_chrome { border: none; @@ -380,6 +379,10 @@ ul.oe_menu_editor .disclose { margin: 0px -24px !important; } .oe_drop_zone.oe_insert.oe_overlay { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; border-radius: 3px; background: rgba(153, 0, 255, 0.5); } diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index 3896ced8648..ea7bbb1480a 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -1,19 +1,6 @@ @charset "utf-8" -@import "compass/css3" -@import "compass/css3/user-interface" -@import "compass/css3/transition" - -//smartphones, iPhone, portrait 480x320 phones -$smart_phone: 320px -//portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide.*/ -$small-tablet: 481px -//portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones -$portrait-tablet: 641px -//tablet, landscape iPad, lo-res laptops ands desktops -$tablet: 961px -//big landscape tablets, laptops, and desktops -$desktop: 1025px +@import "common" /* ---- CKEditor Minimal Reset ---- */ @@ -303,7 +290,7 @@ ul.oe_menu_editor position: relative margin: 0px -24px !important &.oe_overlay - border-radius: 3px + +border-radius(3px) //@include background-image( repeating-linear-gradient(45deg, rgba(255,255,255,.1) ,rgba(255,255,255,.1) 35px, rgba(0,0,0,.1) 35px, rgba(0,0,0,.1) 75px)) //background-size: 100px 100px background: rgba(153, 0, 255,.5) @@ -507,10 +494,6 @@ $editorbar_height: 30px // TODO Fix => might break with themes $navbar_height: 51px -@mixin editor-font - font-size: 14px - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace - line-height: normal .oe_ace_view_editor position: fixed top: $navbar_height diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index 41c04e6b702..68e40e9118b 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -1,4 +1,3 @@ -@charset "utf-8"; /* THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY * * css for editor buttons, openerp widget included in the website and other @@ -192,6 +191,8 @@ h1.text-muted, h2.text-muted, h3.text-muted { /* ----- BOOTSTRAP HACK FOR STICKY FOOTER ----- */ html, body, #wrapwrap { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; height: 100%; } @@ -290,10 +291,15 @@ ul.nav-stacked > li > a { } [data-publish='off'] { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); opacity: 0.5; } /* ---- END of PUBLISH ---- */ +::-moz-selection { + background: rgba(150, 150, 220, 0.3); +} + ::selection { background: rgba(150, 150, 220, 0.3); } @@ -428,10 +434,10 @@ ul.nav-stacked > li > a { .oe_dark { background: #eff8f8; background: rgba(100, 200, 200, 0.14); + background-image: none !important; -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset; - background-image: none !important; } .oe_black { diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index cd1c99dda27..ec992256d6e 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -1,5 +1,7 @@ @charset "utf-8" +@import "common" + /* * THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY * @@ -103,14 +105,8 @@ /* Extra Styles */ img.shadow - -webkit-border-radius: 3px - -moz-border-radius: 3px - -ms-border-radius: 3px - -o-border-radius: 3px - border-radius: 3px - -webkit-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2) - -moz-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2) - box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2) + +border-radius(3px) + +box-shadow(0px 3px 8px rgba(0, 0, 0, 0.2)) margin: 0 auto h1.text-muted, h2.text-muted, h3.text-muted @@ -124,7 +120,7 @@ h1.text-muted, h2.text-muted, h3.text-muted /* ----- BOOTSTRAP HACK FOR STICKY FOOTER ----- */ html,body, #wrapwrap - box-sizing: border-box + +box-sizing(border-box) height: 100% #wrapwrap @@ -212,13 +208,11 @@ ul.nav-stacked > li > a display: block [data-publish='off'] - opacity: 0.5 + +opacity(0.5) /* ---- END of PUBLISH ---- */ - - -::selection +@include selection background: rgba(150, 150, 220, 0.3) .logo-img @@ -242,7 +236,6 @@ ul.nav-stacked > li > a a color: white - /* ---- SNIPPETS --- */ .carousel-inner .item @@ -335,10 +328,8 @@ ul.nav-stacked > li > a .oe_dark background: #eff8f8 background: rgba(100, 200, 200, 0.14) - -webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset - -moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset - box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset background-image: none !important + +box-shadow(0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset) .oe_black background-color: rgba(0, 0, 0, 0.9) background-image: none !important From bdafd44f06eefed2687a5f61fbce781600dae59e Mon Sep 17 00:00:00 2001 From: ddm Date: Wed, 20 Nov 2013 14:32:34 +0100 Subject: [PATCH 13/13] [IMP] Tour cleanup bzr revid: ddm@openerp.com-20131120133234-s0r81qnqg74l4wlt --- addons/website/static/src/js/website.tour.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 60bbf2487b9..25317f06aac 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -32,13 +32,10 @@ $('.popover.tour').remove(); }, start: function () { - if (this.canResume()) { + if (this.continueTour() || ((this.currentStepIndex() === 0) && !this.tour.ended())) { this.tour.start(); } }, - canResume: function () { - return this.continueTour() || ((this.currentStepIndex() === 0) && !this.tour.ended()); - }, currentStepIndex: function () { var index = this.tourStorage.getItem(this.id+'_current_step') || 0; return parseInt(index, 10);