summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/debug/ajax.js
diff options
context:
space:
mode:
authorwei <>2007-03-30 13:09:22 +0000
committerwei <>2007-03-30 13:09:22 +0000
commit9d2b8de5699f51ca253bac7d188ac109b3aa84b2 (patch)
treea9f6aa471130da0025692862a6e5c268a23abfeb /framework/Web/Javascripts/js/debug/ajax.js
parentf4f802efe3cccd68f3a6b40eb8312bfd8e24d643 (diff)
Fixed #557.
Diffstat (limited to 'framework/Web/Javascripts/js/debug/ajax.js')
-rw-r--r--framework/Web/Javascripts/js/debug/ajax.js35
1 files changed, 31 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js
index 4b20a8de..1016f435 100644
--- a/framework/Web/Javascripts/js/debug/ajax.js
+++ b/framework/Web/Javascripts/js/debug/ajax.js
@@ -1978,6 +1978,7 @@ Prado.WebUI.TAutoComplete = Class.extend(Prado.WebUI.TAutoComplete,
initialize : function(options)
{
this.options = options;
+ this.hasResults = false;
this.baseInitialize(options.ID, options.ResultPanel, options);
Object.extend(this.options,
{
@@ -2014,12 +2015,38 @@ Prado.WebUI.TAutoComplete = Class.extend(Prado.WebUI.TAutoComplete,
Prado.Callback(this.options.EventTarget, options, null, this.options);
},
- onComplete : function(request, boundary)
+ /**
+ * Overrides parent implements, don't update if no results.
+ */
+ selectEntry: function()
+ {
+ if(this.hasResults)
+ {
+ this.active = false;
+ this.updateElement(this.getCurrentEntry());
+ }
+ },
+
+ onComplete : function(request, boundary)
{
var result = Prado.Element.extractContent(request.transport.responseText, boundary);
- if(typeof(result) == "string" && result.length > 0)
- this.updateChoices(result);
- }
+ if(typeof(result) == "string")
+ {
+ if(result.length > 0)
+ {
+ this.hasResults = true;
+ this.updateChoices(result);
+ }
+ else
+ {
+ this.active = false;
+ this.hasResults = false;
+ this.hide();
+ }
+ }
+ },
+
+
});
/**