[FIX] work around distribute_branding
authorXavier Morel <xmo@openerp.com>
Mon, 10 Feb 2014 13:28:55 +0000 (14:28 +0100)
committerXavier Morel <xmo@openerp.com>
Mon, 10 Feb 2014 13:28:55 +0000 (14:28 +0100)
distribute_branding is applied after view inheritance is applied, and does not
take it in account. As a result, altering an existing view "from the top"
(e.g. adding a div element preceding an existing div) will alter the xpath
leading to whatever element we need to deal with.

Move fakebar injection to the bottom of the body, where it can't have any
impact on preceding node paths.

bzr revid: xmo@openerp.com-20140210132855-lwh1ow1tq1e0pidp

addons/website/views/website_templates.xml

index bf61f64..9073ccb 100644 (file)
     <xpath expr="//body" position="attributes">
         <attribute name="style">padding-top: 51px;</attribute>
     </xpath>
-    <xpath expr="//body/*[1]" position="before">
+    <xpath expr="//body" position="inside">
         <div id="website-top-navbar-placeholder" class="navbar navbar-inverse navbar-fixed-top hidden-xs">
             <div class="navbar-header">
                 <form class="navbar-form navbar-left">