Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading indicator support #6

Open
clyfe opened this issue Feb 14, 2011 · 2 comments
Open

loading indicator support #6

clyfe opened this issue Feb 14, 2011 · 2 comments

Comments

@clyfe
Copy link

clyfe commented Feb 14, 2011

When I click the text input,
while the list of records is not yet showing,
I should see a loading indicator.

@@ -226,10 +226,16 @@ RecordSelect.Abstract = Class.extend({
       //dataType: options.ajax_data_type,
       success: function(data){
         _this.container.html(data);
         _this.show();
         $(document.body).mousedown(jQuery.proxy(_this, "onbodyclick"));
+      },
+      beforeSend: function(event) {
+        _this.obj.nextAll('img.loading-indicator').css('visibility','visible');
+      },
+      complete: function(event) {
+        _this.obj.nextAll('img.loading-indicator').css('visibility','hidden');
       }
     });
   },

   /**

The loading Indicator image should either be a RS asset or explicitly provided by the user, or if this RS fork is meant to be used with AS only, the liading-indicator image is already there.

@vhochstein
Copy link
Owner

Thanks a lot for your explanation.
Well, I would prefer an RS asset, cause recordselect is nt bound to AS only.
Do you submit a pull request for this feature?

@clyfe
Copy link
Author

clyfe commented Feb 15, 2011

I'll submit one, but not too soon (at least not today).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants