From d7b75724cb3d0f96941304d3736590e7f0f6d202 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 4 Oct 2013 18:37:54 +0200 Subject: [IMP] Building Block Zone, SEO Style, bootstrap style by default bzr revid: fp@tinyerp.com-20131004163754-rwa3t1gcmfok4v0w --- addons/website/static/src/js/website.seo.js | 35 +++++++++++++---------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'addons/website/static/src/js') diff --git a/addons/website/static/src/js/website.seo.js b/addons/website/static/src/js/website.seo.js index 3da7c1ed8f1..635b80bb192 100644 --- a/addons/website/static/src/js/website.seo.js +++ b/addons/website/static/src/js/website.seo.js @@ -17,13 +17,13 @@ function analyzeKeyword(htmlPage, keyword) { return htmlPage.isInTitle(keyword) ? { - title: 'keyword-in-title', + title: 'label label-primary', description: "This keyword is used in the page title", } : htmlPage.isInDescription(keyword) ? { - title: 'keyword-in-description', + title: 'label label-info', description: "This keyword is used in the page description", } : htmlPage.isInBody(keyword) ? { - title: 'keyword-in-body', + title: 'label label-info', description: "This keyword is used in the page content." } : { title: "", description: "" }; } @@ -58,7 +58,7 @@ }); website.seo.SuggestionList = openerp.Widget.extend({ - template: 'website.seo_list', + template: 'website.seo_suggestion_list', init: function (parent, options) { this.root = options.root; this.htmlPage = options.page; @@ -155,7 +155,9 @@ }); } else { var companyName = self.htmlPage.company().toLowerCase(); - self.add(companyName); + if (companyName != 'yourcompany') { + self.add(companyName); + } } }, keywords: function () { @@ -361,24 +363,19 @@ }).appendTo(self.$('.js_seo_tips')); } var htmlPage = this.htmlPage; - if (htmlPage.headers('h1').length === 0) { - tips.push({ - type: 'warning', - message: "This page seems to be missing an <h1> tag.", - }); - } - if (htmlPage.headers('h1').length > 1) { - tips.push({ - type: 'warning', - message: "The page contains more than one <h1> tag.", - }); - } + + // desactivated as too complex for end-users + // if (htmlPage.headers('h1').length === 0) { + // tips.push({ + // type: 'warning', + // message: "This page seems to be missing a title.", + // }); + // } + if (tips.length > 0) { _.each(tips, function (tip) { displayTip(tip.message, tip.type); }); - } else { - displayTip("The markup on this page is appropriate for search engines.", 'success'); } }, confirmKeyword: function (e) { -- cgit v1.2.3