From b982ea278b33132def3927417b7a854b98b5028a Mon Sep 17 00:00:00 2001 From: Vijaykumar Baladaniya Date: Mon, 9 Jul 2012 18:28:24 +0530 Subject: [PATCH] [IMP]adding js and css to modify title for survey answer bzr revid: vba@tinyerp.com-20120709125824-wgowbnhqmk9guuub --- addons/survey/static/src/css/survey.css | 14 +++++++++++++ addons/survey/static/src/js/survey.js | 28 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 addons/survey/static/src/css/survey.css create mode 100644 addons/survey/static/src/js/survey.js diff --git a/addons/survey/static/src/css/survey.css b/addons/survey/static/src/css/survey.css new file mode 100644 index 00000000000..72cd1d6e106 --- /dev/null +++ b/addons/survey/static/src/css/survey.css @@ -0,0 +1,14 @@ +.oe_survey_title { + font-weight: bold; + font-size: 22px; + margin: 8px 0px 8px 0px; + color: #5B5B5B; +} + +.oe_survey_title_height{ + height: 33px; +} + +.oe_survey_title_page { + font-size: 14px; +} diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js new file mode 100644 index 00000000000..e4711013156 --- /dev/null +++ b/addons/survey/static/src/js/survey.js @@ -0,0 +1,28 @@ +openerp.survey = function (instance) { + var QWeb = instance.web.qweb, + _t = instance.web._t; + instance.web.ViewManagerAction = instance.web.ViewManagerAction.extend({ + init: function(parent, action) { + this._super.apply(this,arguments); + console.log('hello'); + }, + on_mode_switch: function (view_type, no_store, options) { + var self = this; + return $.when(this._super.apply(this, arguments)).then(function () { + var controller = self.views[self.active_view].controller, + fvg = controller.fields_view, + view_id = (fvg && fvg.view_id) || '--'; + self.$element.find('.oe_debug_view').html(QWeb.render('ViewManagerDebug', { + view: controller, + view_manager: self + })); + if (!self.action.name && fvg) { + var title = self.$element.find('.oe_view_title_text'); + if(!_.isEmpty(title)) + title = $('.ui-dialog-title'); + title.text(fvg.arch.attrs.string || fvg.name); + } + }); + }, + }); +};