[FIX] website: convert non-standard HTML metatag to data attribute

This commit is contained in:
Richard Mathot 2014-05-23 10:03:47 +02:00
parent df94bddac8
commit e28c810123
3 changed files with 5 additions and 5 deletions

View 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

View File

@ -296,7 +296,7 @@
});
},
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();

View 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