From 5a19ff3f6aaaf0f7abec6c32eada5e883b6ff334 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 16:16:52 +0530 Subject: [PATCH 1/5] [fix] [minor] set z-index of communication composer autocomplete field --- public/js/wn/views/communication.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/wn/views/communication.js b/public/js/wn/views/communication.js index 2df34aaa9c..75f91d4a4f 100644 --- a/public/js/wn/views/communication.js +++ b/public/js/wn/views/communication.js @@ -345,6 +345,10 @@ wn.views.CommunicationComposer = Class.extend({ } }); }, + open: function(event, ui) { + var zindex = cint(me.dialog.$wrapper.css("z-index")) + 1 + $(this).autocomplete("widget").css("z-index", zindex); + }, focus: function() { // prevent value inserted on focus return false; From 843e979b3eb7399057510763b8901ef9c26759b5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 16:24:23 +0530 Subject: [PATCH 2/5] [fix] [minor] set appendTo for autocomplete field --- public/js/wn/form/control.js | 5 +---- public/js/wn/views/communication.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/public/js/wn/form/control.js b/public/js/wn/form/control.js index 6f7c41371c..84524c4816 100644 --- a/public/js/wn/form/control.js +++ b/public/js/wn/form/control.js @@ -673,11 +673,8 @@ wn.ui.form.ControlLink = wn.ui.form.ControlData.extend({ }, }); }, + appendTo: cur_dialog ? cur_dialog.$wrapper : null, open: function(event, ui) { - if(cur_dialog) { - var zindex = cint(cur_dialog.$wrapper.css("z-index")) + 1 - $(this).autocomplete("widget").css("z-index", zindex); - } me.autocomplete_open = true; }, close: function(event, ui) { diff --git a/public/js/wn/views/communication.js b/public/js/wn/views/communication.js index 75f91d4a4f..88a5580520 100644 --- a/public/js/wn/views/communication.js +++ b/public/js/wn/views/communication.js @@ -345,10 +345,7 @@ wn.views.CommunicationComposer = Class.extend({ } }); }, - open: function(event, ui) { - var zindex = cint(me.dialog.$wrapper.css("z-index")) + 1 - $(this).autocomplete("widget").css("z-index", zindex); - }, + appendTo: this.dialog.$wrapper, focus: function() { // prevent value inserted on focus return false; From 8d990703a44d6baf1d0dfdb03aceb7074e85031f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 16:39:54 +0530 Subject: [PATCH 3/5] [fix] [minor] communication - remove get query on lead --- core/doctype/communication/communication.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/doctype/communication/communication.js b/core/doctype/communication/communication.js index dfbcb5f498..144342d6f1 100644 --- a/core/doctype/communication/communication.js +++ b/core/doctype/communication/communication.js @@ -5,12 +5,6 @@ cur_frm.cscript.onload = function(doc) { } }; - cur_frm.fields_dict.lead.get_query = function() { - return { - query: "core.doctype.communication.communication.get_user" - } - }; - cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { return{ query:"controllers.queries.customer_query" } } From fff5bcf76a0c3ce5893ac71d2dffd212d24e2212 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 16:41:13 +0530 Subject: [PATCH 4/5] [fix] [minor] communication - fix get query on lead --- core/doctype/communication/communication.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/doctype/communication/communication.js b/core/doctype/communication/communication.js index 144342d6f1..87b601a2ca 100644 --- a/core/doctype/communication/communication.js +++ b/core/doctype/communication/communication.js @@ -5,6 +5,12 @@ cur_frm.cscript.onload = function(doc) { } }; + cur_frm.fields_dict.lead.get_query = function() { + return { + query: "core.doctype.communication.communication.get_lead" + } + }; + cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { return{ query:"controllers.queries.customer_query" } } From 2d0d308e4e74271f4f3e7324390223c328d1cc24 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Aug 2013 23:10:03 +0530 Subject: [PATCH 5/5] [fix] [minor] autocomplete in dialogs --- public/js/wn/form/control.js | 1 - public/js/wn/ui/dialog.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/wn/form/control.js b/public/js/wn/form/control.js index 84524c4816..193e940d52 100644 --- a/public/js/wn/form/control.js +++ b/public/js/wn/form/control.js @@ -673,7 +673,6 @@ wn.ui.form.ControlLink = wn.ui.form.ControlData.extend({ }, }); }, - appendTo: cur_dialog ? cur_dialog.$wrapper : null, open: function(event, ui) { me.autocomplete_open = true; }, diff --git a/public/js/wn/ui/dialog.js b/public/js/wn/ui/dialog.js index dd5b69d6cc..d56c25a9b0 100644 --- a/public/js/wn/ui/dialog.js +++ b/public/js/wn/ui/dialog.js @@ -26,8 +26,9 @@ wn.ui.Dialog = wn.ui.FieldGroup.extend({ $.extend(this, opts); this.make(); }, - make: function() { - this.$wrapper = $('