From 348d05be82f59d8aac0c1dd1f9d713d7e39569e2 Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (Open ERP)" Date: Thu, 3 Oct 2013 11:00:02 +0530 Subject: [IMP]improved position of m2o autocomplete. bzr revid: kch@tinyerp.com-20131003053002-v4bzzklwzbinxw2a --- addons/web/static/src/js/view_form.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index a00b66cbeda..79fdb3e4f4e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3390,6 +3390,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc minLength: 0, delay: 0 }); + //set position for list of suggetions box + this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } ); this.$input.autocomplete("widget").openerpClass(); // used to correct a bug when selecting an element by pushing 'enter' in an editable list this.$input.keyup(function(e) { -- cgit v1.2.3 From 9ca1c1394c49e3ae505f9daa2bd61f1fad453599 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Wed, 18 Dec 2013 10:37:16 +0530 Subject: [IMP] Improved the name of wizard Instead of Add XXX set Create a XXX bzr revid: cod@tinyerp.com-20131218050716-8zsx7a2k3fme9w0f --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index f20e9053867..89ec4cbeee4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3166,7 +3166,7 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ template: "M2ODialog", init: function(parent) { this._super(parent, { - title: _.str.sprintf(_t("Add %s"), parent.string), + title: _.str.sprintf(_t("Create a %s"), parent.string), width: 312, }); }, -- cgit v1.2.3 From 0abd187bec3126e917959b1c7b67082f98757ce4 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Thu, 23 Jan 2014 18:52:41 +0530 Subject: [IMP]Improved code to set message of quick add wizard bzr revid: cod@tinyerp.com-20140123132241-zfd0e3la6ebrvtd5 --- addons/web/static/src/js/view_form.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 89ec4cbeee4..87cf8c4c886 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3165,6 +3165,7 @@ instance.web.form.CompletionFieldMixin = { instance.web.form.M2ODialog = instance.web.Dialog.extend({ template: "M2ODialog", init: function(parent) { + this.name = parent.string; this._super(parent, { title: _.str.sprintf(_t("Create a %s"), parent.string), width: 312, @@ -3172,6 +3173,8 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ }, start: function() { var self = this; + var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), self.name); + $( "p" ).text( text ); this.$buttons.html(QWeb.render("M2ODialog.buttons")); this.$("input").val(this.getParent().last_query); this.$buttons.find(".oe_form_m2o_qc_button").click(function(){ -- cgit v1.2.3 From faadf0fec4c577e984d916e7fd54c2a42ad621c5 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Mon, 14 Apr 2014 12:53:33 +0200 Subject: [FIX] get_file error: the exception can be the only node and must be json parsed bzr revid: sle@openerp.com-20140414105333-05jona7myntifamw --- addons/web/static/src/js/core.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 90c84ba9cda..45ed6f41c6f 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -460,14 +460,11 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ .appendTo(document.body) .load(function () { try { - if (options.error) { - if (!this.contentDocument.body.childNodes[1]) { - options.error(this.contentDocument.body.childNodes); - } - else { - options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent)); - } - } + if (options.error) { + var body = this.contentDocument.body; + var node = body.childNodes[1] || body.childNodes[0]; + options.error(JSON.parse(node.textContent)); + } } finally { complete(); } -- cgit v1.2.3 From 775e553d5a9b7abb1218bb36b22bad03221d3049 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Fri, 25 Apr 2014 15:43:40 +0530 Subject: [IMP]Improved code for add

tag bzr revid: cod@tinyerp.com-20140425101340-znewo5agt8vdl5mw --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5207794bb39..1db4112d2a4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3365,7 +3365,7 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ start: function() { var self = this; var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), self.name); - $( "p" ).text( text ); + this.$("p").text( text ); this.$buttons.html(QWeb.render("M2ODialog.buttons")); this.$("input").val(this.getParent().last_query); this.$buttons.find(".oe_form_m2o_qc_button").click(function(){ -- cgit v1.2.3