[MERGE] forward porting fixes from saas-3
authorFrédéric van der Essen <fva@openerp.com>
Mon, 10 Feb 2014 15:56:28 +0000 (16:56 +0100)
committerFrédéric van der Essen <fva@openerp.com>
Mon, 10 Feb 2014 15:56:28 +0000 (16:56 +0100)
bzr revid: fva@openerp.com-20140210155628-75mgw7qcq9k5ncem

1  2 
addons/website/static/src/js/website.tour.banner.js
addons/website/views/website_templates.xml

@@@ -13,8 -13,8 +13,8 @@@
  
      website.Tour.Banner = website.Tour.extend({
          id:   'banner',
 -        name: "Insert a banner",
 -        path: '/',
 +        name: "Build a page",
 +        path: '/page/website.homepage',
          init: function () {
              var self = this;
              self.steps = [
@@@ -49,8 -49,8 +49,8 @@@
                      waitFor:   '.oe_overlay_options .oe_options:visible',
                      element:   '#wrap [data-snippet-id=carousel]:first .carousel-caption',
                      placement: 'top',
 -                    title:     _t("Customize banner's text"),
 -                    content:   _t("Click in the text and start editing it. Click continue once it's done."),
 +                    title:     _("Customize banner's text"),
 +                    content:   _("Click in the text and start editing it."),
                      popover:   { next: _t("Continue") },
                  },
                  {
@@@ -71,8 -71,8 +71,8 @@@
                  {
                      snippet:   'three-columns',
                      placement: 'bottom',
-                     title:     _t("Drag & Drop a Block"),
-                     content:   _t("Drag the <em>'3 Columns'</em> block and drop it below the banner."),
+                     title:     _t("Drag & Drop This Block"),
+                     content:   _t("Drag the <em>'Three Columns'</em> block and drop it below the banner."),
                      popover:   { fixed: true },
                  },
                  {
@@@ -85,8 -85,8 +85,8 @@@
                  },
                  {
                      waitFor:   'button[data-action=edit]:visible',
 -                    title:     _t("Congratulation!"),
 -                    content:   _t("Your homepage has been updated."),
 +                    title:     _("Good Job!"),
 +                    content:   _("Well done, you created your homepage."),
                      popover:   { next: _t("Continue") },
                  },
                  {
                      popover:   { fixed: true },
                  },
                  {
-                     element:   'button[data-dismiss=modal]',
+                     element:   '.modal:has(#mobile-viewport) button[data-dismiss=modal]',
                      placement: 'right',
                      title:     _t("Close Mobile Preview"),
                      content:   _t("Scroll in the mobile preview to test the rendering. Once it's ok, close this dialog."),
                  },
                  {
-                     title:     "Congratulation",
-                     element:   'a[id=content-menu-button]',
+                     waitNot:   '.modal',
+                     element:   '#content-menu-button',
                      placement: 'bottom',
-                     content:   _t("This tour is finished. You can continue discovering features with the <em>'Content'</em> menu."),
-                     popover:   { fixed: true, next: _t("Close Tutorial") },
+                     title:     _t("Add new pages and menus"),
+                     content:   _t("The 'Content' menu allows you to add pages or add the top menu."),
+                     popover:   { next: _t("Close Tutorial") },
                  },
              ];
              return this._super();
      </html>
  </template>
  
 -<template id="layout_logo_show" inherit_option_id="website.layout" name="Show Logo">
 +<template id="layout_logo_show" inherit_id="website.layout" inherit_option_id="website.layout" name="Show Logo">
      <xpath expr="//header//a[@class='navbar-brand']" position="replace">
          <a href="/" class="navbar-brand logo">
              <img src="/logo.png"/>
      <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">
@@@ -672,11 -672,11 +672,11 @@@ Sitemap: <t t-esc="url_root"/>sitemap.x
  </template>
  
  <template id="company_description" name="Company Description">
 -    <address>
 -        <div t-field="res_company.name">Name</div>
 +    <address itemscope="itemscope" itemtype="http://schema.org/Organization">
 +        <div itemprop="name" t-field="res_company.name">Name</div>
          <br />
 -        <div><i class="fa fa-phone"/> <span t-field="res_company.phone"/></div>
 -        <div><i class="fa fa-envelope"/> <span t-field="res_company.email"/></div>
 +        <div><i class="fa fa-phone"/> <span itemprop="telephone" t-field="res_company.phone"/></div>
 +        <div><i class="fa fa-envelope"/> <span itemprop="email" t-field="res_company.email"/></div>
      </address>
       <a t-att-href="res_company.google_map_link()" target="_BLANK">
          <img class="thumbnail img-responsive" t-att-src="res_company.google_map_img()" />
  </template>
  
  <template id="contact">
 -    <address t-ignore="true" class="mb0">
 -        <div t-att-class="'name' not in fields and 'css_non_editable_mode_hidden'"><span t-esc="name"/></div>
 -        <div t-if="address and 'address' in fields" class='css_editable_mode_hidden'>
 -            <i class='fa fa-map-marker'/> <span t-raw="address.replace('\n', options.get('no_tag_br') and ', ' or '&lt;br/&gt; &amp;nbsp; &amp;nbsp; ')"/>
 -        </div>
 -        <div t-if="city and 'city' in fields" class='css_editable_mode_hidden'>
 -            <i class='fa fa-map-marker'/> <span t-raw="city"/>, <span t-raw="country_id"/>
 +    <address t-ignore="true" class="mb0" itemscope="itemscope" itemtype="http://schema.org/Organization">
 +        <div t-att-class="'name' not in fields and 'css_non_editable_mode_hidden'"><span itemprop="name" t-esc="name"/></div>
 +        <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress">
 +            <div t-if="address and 'address' in fields" class='css_editable_mode_hidden'>
 +                <i class='fa fa-map-marker'/> <span itemprop="streetAddress" t-raw="address.replace('\n', options.get('no_tag_br') and ', ' or '&lt;br/&gt; &amp;nbsp; &amp;nbsp; ')"/>
 +            </div>
 +            <div t-if="city and 'city' in fields" class='css_editable_mode_hidden'>
 +                <i class='fa fa-map-marker'/> <span itemprop="addressLocality" t-raw="city"/>, <span itemprop="addressCountry" t-raw="country_id"/>
 +            </div>
 +            <div t-if="phone and 'phone' in fields" class='css_editable_mode_hidden'><i class='fa fa-phone'/> <span itemprop="telephone" t-esc="phone"/></div>
 +            <div t-if="mobile and 'mobile' in fields" class='css_editable_mode_hidden'><i class='fa fa-mobile-phone'/> <span itemprop="telephone" t-esc="mobile"/></div>
 +            <div t-if="fax and 'fax' in fields" class='css_editable_mode_hidden'><i class='fa fa-file-text-o'/> <span itemprop="faxNumber" t-esc="fax"/></div>
 +            <div t-if="email and 'email' in fields" class='css_editable_mode_hidden'><i class='fa fa-envelope'/> <span itemprop="email" t-esc="email"/></div>
          </div>
 -        <div t-if="phone and 'phone' in fields" class='css_editable_mode_hidden'><i class='fa fa-phone'/> <span t-esc="phone"/></div>
 -        <div t-if="mobile and 'mobile' in fields" class='css_editable_mode_hidden'><i class='fa fa-mobile-phone'/> <span t-esc="mobile"/></div>
 -        <div t-if="fax and 'fax' in fields" class='css_editable_mode_hidden'><i class='fa fa-file-text-o'/> <span t-esc="fax"/></div>
 -        <div t-if="email and 'email' in fields" class='css_editable_mode_hidden'><i class='fa fa-envelope'/> <span t-esc="email"/></div>
      </address>
  </template>