Permalink
Browse files

Fixing issues with Request.Spinner and Keyboard.

- Request.Spinner not showing message on Spinner.
- Keyboard.toggleActive() not actually toggling.

Fixes Core ticket #1000.
  • Loading branch information...
timwienk committed Sep 13, 2010
1 parent 1ef434e commit 21e0b29a1d137b27592103ef52d9ff43b40cc19c
Showing with 5 additions and 2 deletions.
  1. +1 −1 Source/Interface/Keyboard.js
  2. +1 −1 Source/Interface/Spinner.js
  3. +3 −0 Tests/Interface/Spinner.html
@@ -80,7 +80,7 @@ provides: [Keyboard]
},
toggleActive: function(){
- return this[this.active ? 'deactivate' : 'activate']();
+ return this[this.isActive() ? 'deactivate' : 'activate']();
},
activate: function(instance){
@@ -168,8 +168,8 @@ Request = Class.refactor(Request, {
if (!this.spinner) {
var update = document.id(this.options.spinnerTarget) || document.id(this.options.update);
if (this.options.useSpinner && update) {
+ update.set('spinner', this.options.spinnerOptions);
var spinner = this.spinner = update.get('spinner');
- spinner.setOptions(this.options.spinnerOptions);
['complete', 'exception', 'cancel'].each(function(event){
this.addEvent(event, spinner.hide.bind(spinner));
}, this);
@@ -93,6 +93,9 @@
fn: function(){
var req = new Request.HTML({
url: '/ajax_html_echo/?html=<p>This+was+fetched+via+AJAX</p>',
+ spinnerOptions: {
+ message: 'testing....'
+ },
method: 'get',
useSpinner: true,
update: $('foo2')

0 comments on commit 21e0b29

Please sign in to comment.