You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2005/12/22 22:29:56 UTC

svn commit: r358636 - /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js

Author: matzew
Date: Thu Dec 22 13:29:51 2005
New Revision: 358636

URL: http://svn.apache.org/viewcvs?rev=358636&view=rev
Log:
changed script.aculo.us stuff

Modified:
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js?rev=358636&r1=358635&r2=358636&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/resource/myFaces.js Thu Dec 22 13:29:51 2005
@@ -2,28 +2,17 @@
 Ajax.MyFacesAutocompleter.prototype = Object.extend(new Autocompleter.Base(),
 Object.extend(new Ajax.Base(), {
   initialize: function(element, update, url, options) {
-	  this.baseInitialize(element, update, options);
+	  this.base_initialize(element, update, options);
     this.options.asynchronous = true;
     this.options.onComplete   = this.onComplete.bind(this)
     this.options.method       = 'post';
     this.url                  = url;
-    this.options.onShow       =
-        function(element, update){
-          if(!update.style.position || update.style.position=='absolute') {
-            update.style.position = 'absolute';
-            var offsets = Position.cumulativeOffset(element);
-            update.style.top    = (offsets[1] + element.offsetHeight) + 'px';
-            update.style.left   = offsets[0] + 'px';
-//            Position.clone(element, update, {setHeight: false, offsetTop: element.offsetHeight});
-          }
-          Effect.Appear(update,{duration:0.15});
-        };    
   },
 
   getUpdatedChoices: function() {
   	Element.addClassName(this.element, "myFacesInputSuggestAjaxThrobbing");
     entry = encodeURIComponent(this.element.name) + '=' +
-      encodeURIComponent(this.getToken());
+      encodeURIComponent(this.getEntry());
 
       this.options.parameters = this.options.callback ?
         this.options.callback(this.element, entry) : entry;
@@ -34,15 +23,6 @@
   onComplete: function(request) {
 	Element.removeClassName(this.element, "myFacesInputSuggestAjaxThrobbing");
     this.updateChoices(request.responseText);
-    this.resetWidth();
-  },
-
-  resetWidth: function() {
-    this.update.style.width = this.element.offsetWidth + 'px';
-    var offset = this.iefix ? 2 : -8;
-    if ((this.update.scrollWidth + offset) > this.element.offsetWidth) {
-      this.update.style.width = (this.update.scrollWidth + offset) + 'px';
-    }
   }
 
 }));