summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.seo.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2013-10-07 10:57:50 +0200
committerXavier Morel <xmo@openerp.com>2013-10-07 10:57:50 +0200
commit1b232de7652149cb9679e4c8fc05ab362f6f08e4 (patch)
treef1dd87830842452b1fb18277694fb756014056bc /addons/website/static/src/js/website.seo.js
parent0448dff01119d3314f9ebac1b02acc94176f2078 (diff)
parentdd2dd19b234cb5f3de05465215b745d3e93046c7 (diff)
[MERGE] from trunk
bzr revid: xmo@openerp.com-20131007085750-hkv4fgeph0cc65eb
Diffstat (limited to 'addons/website/static/src/js/website.seo.js')
-rw-r--r--addons/website/static/src/js/website.seo.js35
1 files changed, 16 insertions, 19 deletions
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 &lt;h1&gt; tag.",
- });
- }
- if (htmlPage.headers('h1').length > 1) {
- tips.push({
- type: 'warning',
- message: "The page contains more than one &lt;h1&gt; 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) {