summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejas Tank <tta@openerp.com>2012-07-09 18:39:05 +0530
committerTejas Tank <tta@openerp.com>2012-07-09 18:39:05 +0530
commitfa95e1dbbdbdfbbc9cc6b3b3720440cc6ab6ecd3 (patch)
tree5a1ff511ada4962cc4231f5535f63b8aa37dfa71
parent3925f76ce85854e5d4834902a05f57bcfc5ace85 (diff)
parentbe2e95656aaa113addea2b510fcdcf2f890eaaa4 (diff)
merge vba branch for title fix
bzr revid: tta@openerp.com-20120709130905-2l6385bqh3jp0yi0
-rw-r--r--addons/survey/static/src/css/survey.css14
-rw-r--r--addons/survey/static/src/js/survey.js28
2 files changed, 42 insertions, 0 deletions
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);
+ }
+ });
+ },
+ });
+};