[FIX] website_sale: payment get status url (ending slash); fix debbuger template url scripts

bzr revid: chm@openerp.com-20140319085700-b4v9iu51a9jtzty3
This commit is contained in:
chm@openerp.com 2014-03-19 09:57:00 +01:00
parent 8db7982726
commit a762af1f21
3 changed files with 32 additions and 25 deletions

View File

@ -3,9 +3,16 @@
var website = openerp.website; var website = openerp.website;
// don't rewrite website.Tour in test mode
if (typeof website.Tour !== "undefined") {
return;
}
// don't need template to use bootstrap Tour in automatic mode // don't need template to use bootstrap Tour in automatic mode
if (typeof QWeb2 !== "undefined") if (typeof QWeb2 !== "undefined") {
website.add_template_file('/website/static/src/xml/website.tour.xml'); website.add_template_file('/website/static/src/xml/website.tour.xml');
}
// don't need to use bootstrap Tour to launch an automatic tour // don't need to use bootstrap Tour to launch an automatic tour
function bootstrap_tour_stub () { function bootstrap_tour_stub () {
@ -19,27 +26,28 @@ function bootstrap_tour_stub () {
if (website.EditorBar) if (website.EditorBar) {
website.EditorBar.include({ website.EditorBar.include({
tours: [], tours: [],
start: function () { start: function () {
var self = this; var self = this;
var menu = $('#help-menu'); var menu = $('#help-menu');
_.each(this.tours, function (tour) { _.each(this.tours, function (tour) {
var $menuItem = $($.parseHTML('<li><a href="#">'+tour.name+'</a></li>')); var $menuItem = $($.parseHTML('<li><a href="#">'+tour.name+'</a></li>'));
$menuItem.click(function () { $menuItem.click(function () {
tour.reset(); tour.reset();
tour.run(); tour.run();
});
menu.append($menuItem);
}); });
menu.append($menuItem); return this._super();
}); },
return this._super(); registerTour: function (tour) {
}, website.Tour.add(tour);
registerTour: function (tour) { this.tours.push(tour);
website.Tour.add(tour); }
this.tours.push(tour); });
} }
});
///////////////////////////////////////////////// /////////////////////////////////////////////////

View File

@ -289,8 +289,7 @@
<template id="debugger" inherit_option_id="website.layout" name="Debugger &amp; Tests"> <template id="debugger" inherit_option_id="website.layout" name="Debugger &amp; Tests">
<xpath expr='//t[@name="layout_head"]' position="after"> <xpath expr='//t[@name="layout_head"]' position="after">
<script type="text/javascript" src="/website/static/src/js/website.tour.test.js"></script> <script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.tour.test.admin.js"></script>
</xpath> </xpath>
</template> </template>

View File

@ -8,7 +8,7 @@ $(document).ready(function () {
return; return;
} }
var order_id = order_node.data('orderId'); var order_id = order_node.data('orderId');
return openerp.jsonRpc('/shop/payment/get_status' + order_id, 'call', { return openerp.jsonRpc('/shop/payment/get_status/' + order_id, 'call', {
}).then(function (result) { }).then(function (result) {
var tx_node = $('div.oe_website_sale_tx_status'); var tx_node = $('div.oe_website_sale_tx_status');
_poll_nbr += 1; _poll_nbr += 1;