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

View File

@ -8,7 +8,7 @@ $(document).ready(function () {
return;
}
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) {
var tx_node = $('div.oe_website_sale_tx_status');
_poll_nbr += 1;