[REF] survey: update to the new module system

This commit is contained in:
Géry Debongnie
2015-03-18 09:09:23 +01:00
parent 0e274fde7d
commit 88fbbd7362
2 changed files with 16 additions and 10 deletions
+7 -5
View File
@@ -1,3 +1,7 @@
odoo.define('survey.survey', ['website.website'], function (require) {
'use strict';
var website = require('website.website');
/*
* OpenERP, Open Source Management Solution
* Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
@@ -21,13 +25,10 @@
* the website engine.
*/
(function () {
'use strict';
openerp.website.if_dom_contains('.js_surveyform', function (the_form) {
website.if_dom_contains('.js_surveyform', function (the_form) {
console.debug("[survey] Custom JS for survey is loading...");
var prefill_controller = the_form.attr("data-prefill");
var validate_controller = the_form.attr("data-validate");
var submit_controller = the_form.attr("data-submit");
var scores_controller = the_form.attr("data-scores");
var print_mode = false;
@@ -180,4 +181,5 @@ openerp.website.if_dom_contains('.js_surveyform', function (the_form) {
console.debug("[survey] Custom JS for survey loaded!");
});
})();
});
+9 -5
View File
@@ -1,3 +1,8 @@
odoo.define('survey.result', ['website.website'], function (require) {
'use strict';
var website = require('website.website');
/*
* OpenERP, Open Source Management Solution
* Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
@@ -16,9 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function () {
'use strict';
openerp.website.if_dom_contains('.js_surveyresult', function () {
website.if_dom_contains('.js_surveyresult', function () {
console.debug("[survey] Survey Result JS is loading...");
//Script For Pagination
@@ -52,7 +55,7 @@ openerp.website.if_dom_contains('.js_surveyresult', function () {
.staggerLabels(true);
// Replacing Library's Default Tooltip with our Custom One
chart.tooltip(function(key, x, y, e, graph) {
chart.tooltip(function(key, x, y, e) {
return '<h5 class="panel-primary"><div class="panel-heading">' + x + '</div></h5>' +
'<p>' + '<b>Responses : </b>' + key + '</p>' +
'<p>' + "<b>Total Vote : </b>" + y + '</p>';
@@ -176,4 +179,5 @@ openerp.website.if_dom_contains('.js_surveyresult', function () {
console.debug("[survey] Survey Result JS loaded!");
});
})();
});