Skip to content

Commit

Permalink
💣 Fixed bug. When /price loads button listeners didnt initialized bec…
Browse files Browse the repository at this point in the history
…ause of window.onload function didn't work

Signed-off-by: Vildan Safin <[email protected]>
  • Loading branch information
Enigma228322 committed May 21, 2020
1 parent d82d4e8 commit 6dc1a72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions saas_apps/static/src/js/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ odoo.define('saas_apps.model', function (require) {
'use_strict';

var session = require('web.session');
var Widget = require('web.Widget');
var base = require('web_editor.base');

var price = 0,
per_month = false,
Expand Down Expand Up @@ -152,7 +152,9 @@ odoo.define('saas_apps.model', function (require) {
}

// Downloading apps dependencies
window.onload = function () {


base.ready().then(function() {
// Check needs to avoid js code loading on another pages
if (!window.location.pathname.includes('/price'))
return;
Expand Down Expand Up @@ -294,7 +296,7 @@ odoo.define('saas_apps.model', function (require) {
if (requests_stack === 0) {
$('.loader')[0].classList.add('hid');
}
};
});

function change_border_color(elem) {
if (elem.classList.contains('green-border')) {
Expand Down

0 comments on commit 6dc1a72

Please sign in to comment.