Skip to content

Commit

Permalink
[IMP] base_tier_validation: Migrated js for the new Widget tier_valid…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
bizzappdev committed Oct 20, 2022
1 parent 566d043 commit 525a7a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
11 changes: 5 additions & 6 deletions base_tier_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
],
"assets": {
"web.assets_backend": [
"/base_tier_validation/static/src/js/systray.js",
"/base_tier_validation/static/src/js/tier_review_widget.js",
"/base_tier_validation/static/src/scss/systray.scss",
"/base_tier_validation/static/src/scss/review.scss",
],
"web.assets_qweb": [
"base_tier_validation/static/src/xml/systray.xml",
"base_tier_validation/static/src/xml/tier_review_template.xml",
"/base_tier_validation/static/src/js/systray.js",
"/base_tier_validation/static/src/js/tier_review_widget.js",
"/base_tier_validation/static/src/xml/**/*",
# "/base_tier_validation/static/src/xml/systray.xml",
# "/base_tier_validation/static/src/xml/tier_review_template.xml",
],
},
}
11 changes: 9 additions & 2 deletions base_tier_validation/static/src/js/systray.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ odoo.define("tier_validation.systray", function (require) {
this.$reviews_preview = this.$(".o_mail_systray_dropdown_items");
this._updateReviewPreview();
var channel = "base.tier.validation";
// This.call("bus_service", "addChannel", channel);
// this.call("bus_service", "startPolling");
// this.call("bus_service", "onNotification", this, this._updateReviewPreview);
this.call("bus_service", "addChannel", channel);
this.call("bus_service", "startPolling");
this.call("bus_service", "onNotification", this, this._updateReviewPreview);
this.call(
"bus_service",
"addEventListener",
this,
this._updateReviewPreview
);
return this._super();
},

Expand Down
10 changes: 8 additions & 2 deletions base_tier_validation/static/src/js/tier_review_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ odoo.define("base_tier_validation.ReviewField", function (require) {

var ReviewField = AbstractField.extend({
template: "tier.review.Collapse",
events: {
events: _.extend({}, AbstractField.prototype.events, {
"click .o_info_btn": "_onButtonClicked",
"show.bs.collapse": "_showCollapse",
"hide.bs.collapse": "_hideCollapse",
},
}),
// Events: {
// "click .o_info_btn": "_onButtonClicked",
// "show.bs.collapse": "_showCollapse",
// "hide.bs.collapse": "_hideCollapse",
// },

start: function () {
var self = this;
self._renderDropdown();
Expand Down

0 comments on commit 525a7a9

Please sign in to comment.