[FIX] website: convert non-standard HTML metatag to data attribute
authorRichard Mathot <rim@openerp.com>
Fri, 23 May 2014 08:03:47 +0000 (10:03 +0200)
committerRichard Mathot <rim@openerp.com>
Mon, 26 May 2014 06:51:38 +0000 (08:51 +0200)
addons/report/views/layouts.xml
addons/website/static/src/js/website.seo.js
addons/website/views/website_templates.xml

index 76f2e3d..92887cf 100644 (file)
@@ -9,7 +9,8 @@
           t-att-data-main-object="repr(main_object) if editable else None"
           t-att-data-report-margin-top="data_report_margin_top if data_report_margin_top else None"
           t-att-data-report-header-spacing="data_report_header_spacing if data_report_header_spacing else None"
-          t-att-data-report-dpi="data_report_dpi if data_report_dpi else None">
+          t-att-data-report-dpi="data_report_dpi if data_report_dpi else None"
+          t-att-data-oe-company-name="res_company.name">
         <head>
             <meta name="viewport" content="width=device-width, initial-scale=1"/>
 
@@ -19,7 +20,6 @@
             <t t-if="not title and main_object and 'name' in main_object">
                 <t t-set="additional_title" t-value="main_object.name"/>
             </t>
-            <meta name="openerp.company" t-att-value="res_company.name"/>
             <meta name="description" t-att-value="main_object and 'website_meta_description' in main_object
                 and main_object.website_meta_description or website_meta_description"/>
             <meta name="keywords" t-att-value="main_object and 'website_meta_keywords' in main_object
index 8588b7a..4f14607 100644 (file)
             });
         },
         company: function () {
-            return $('meta[name="openerp.company"]').attr('value');
+            return $('body').attr('data-oe-company-name');
         },
         bodyText: function () {
             return $('body').children().not('.js_seo_configuration').text();
index 2e74cbb..af9c493 100644 (file)
@@ -41,7 +41,8 @@
           t-att-data-editable="'1' if editable else None"
           t-att-data-translatable="'1' if translatable else None"
           t-att-data-view-xmlid="xmlid if editable else None"
-          t-att-data-main-object="repr(main_object) if editable else None">
+          t-att-data-main-object="repr(main_object) if editable else None"
+          t-att-data-oe-company-name="res_company.name">
         <head>
             <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
             <script type="text/javascript" src="/web/static/src/js/watch.js"></script>
@@ -55,7 +56,6 @@
                 <t t-set="title"><t t-raw="res_company.name"/><t t-if="additional_title"> - <t t-raw="additional_title"/></t></t>
             </t>
             <meta name="viewport" content="initial-scale=1"/>
-            <meta name="openerp.company" t-att-content="res_company.name"/>
             <meta name="description" t-att-content="main_object and 'website_meta_description' in main_object
                 and main_object.website_meta_description or website_meta_description"/>
             <meta name="keywords" t-att-content="main_object and 'website_meta_keywords' in main_object