diff options
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/css/editor.css | 1 | ||||
| -rw-r--r-- | addons/website/static/src/css/editor.sass | 9 | ||||
| -rw-r--r-- | addons/website/static/src/js/website.seo.js | 35 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.seo.xml | 35 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.snippets.xml | 2 |
5 files changed, 39 insertions, 43 deletions
diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index e08157124c5..5604c62af75 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -330,6 +330,7 @@ table.editorbar-panel td.selected { color: white; height: 48px; margin-bottom: 32px; + padding-top: 12px; } /* ---- SNIPPET MANIPULATOR ---- */ diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index c8854b210ec..7b2800bd849 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -429,15 +429,6 @@ $highlighted_text_color: #ffffff .oe_seo_keyword padding: .2em .4em .2em .5em +border-radius(.4em) - .keyword-in-title - background-color: $in_title_color+pointer - color: $highlighted_text_color - .keyword-in-description - background-color: $in_description_color - color: $highlighted_text_color - .keyword-in-body - background-color: $in_body_color - color: $highlighted_text_color /* ---- ACE EDITOR ---- */ 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) { diff --git a/addons/website/static/src/xml/website.seo.xml b/addons/website/static/src/xml/website.seo.xml index 4630e1f294b..96a38a75d32 100644 --- a/addons/website/static/src/xml/website.seo.xml +++ b/addons/website/static/src/xml/website.seo.xml @@ -6,16 +6,18 @@ <div class="modal-content"> <div class="modal-header"> <button title="Close" type="button" class="close" data-dismiss="modal">×</button> - <h3 class="modal-title js_seo_page_url"></h3> - <h4 class="text-muted">Get this page efficiently referenced in Google to attract more visitors.</h4> + <div class="h2">Promote This Page</div> + <div class="text-muted"> + Get this page efficiently referenced in Google to attract more visitors. + </div> </div> <div class="modal-body"> <div class="js_seo_tips" /> <section class="js_seo_keywords_list"> - <h3 class="page-header">1. Define keywords <small>describing your page content</small></h3> + <h3 class="page-header mt16">1. Define Keywords <small>describing your page content</small></h3> <div class="form-horizontal" role="form"> <div class="form-group"> - <label for="seo_page_keywords" class="col-lg-2 control-label">New keyword</label> + <label for="seo_page_keywords" class="col-lg-2 control-label">Add keywords:</label> <div class="col-lg-4"> <div class="input-group"> <input type="text" name="seo_page_keywords" class="form-control" maxlength="30"/> @@ -26,12 +28,12 @@ </div> </div> </div> - <span class="text-muted">Most searched topics related your keywords, ordered by importance:</span> + <span class="text-muted">Most searched topics related to your keywords, ordered by importance:</span> <!-- filled in JS --> </section> <section> - <h3 class="page-header">2. Choose a title and description <small>containing keywords relevant to what people are searching on the web</small></h3> - <div class="form-horizontal" role="form"> + <h3 class="page-header">2. Reference Your Page <small>using above suggestions</small></h3> + <div class="form-horizontal mt16" role="form"> <div class="form-group"> <label for="seo_page_title" class="col-lg-2 control-label">Title</label> <div class="col-lg-8"> @@ -52,22 +54,27 @@ <!-- filled in JS --> </div> </section> - <hr/> - <section> - <button type="button" data-action="update" class="btn btn-primary">Apply changes</button> or <a data-action="discard" data-dismiss="modal" href="#">Discard</a> - </section> + </div><div class="modal-footer"> + <button data-action="discard" data-dismiss="modal" href="#" class="btn btn-default">Discard</button> + <button type="button" data-action="update" class="btn btn-primary">Apply Changes</button> </div> </div> </div> </div> </t> - <t t-name="website.seo_list"> - <ul class="list-inline"> + <t t-name="website.seo_suggestion_list"> + <ul class="list-inline mb0"> <!-- filled in JS --> </ul> </t> + <t t-name="website.seo_list"> + <div> + <!-- filled in JS --> + </div> + </t> + <t t-name="website.seo_tip"> <div t-attf-class="alert alert-#{ widget.type }"> <t t-raw="widget.message"/> @@ -75,7 +82,7 @@ </t> <t t-name="website.seo_keyword"> - <dl class="dl-horizontal"> + <dl class="dl-horizontal mt8 mb8"> <dt> <span t-attf-title="#{ widget.tooltip() }" t-attf-class="oe_seo_keyword #{ widget.highlight() } js_seo_keyword" t-att-data-keyword="widget.keyword"> <a href="#" class="oe_remove" data-action="remove-keyword">x</a> <t t-raw="widget.keyword"/> diff --git a/addons/website/static/src/xml/website.snippets.xml b/addons/website/static/src/xml/website.snippets.xml index 38e3b82529d..e5dde368154 100644 --- a/addons/website/static/src/xml/website.snippets.xml +++ b/addons/website/static/src/xml/website.snippets.xml @@ -40,7 +40,7 @@ OpenERP shows you a preview of the building block in the page. You must release the block when the preview is visible. - </p> + </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> |
