summaryrefslogtreecommitdiff
path: root/misc/ahah.js
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-12 18:29:32 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-12 18:29:32 +0000
commit21ac9f1917595492fa9997e565bf11ec8d8cd14f (patch)
treec90c3c454de850d5a315f5a4cae2404e87a56b94 /misc/ahah.js
parentb3fe5b9cbff70dd29a574e6770f32bcb48c6a78c (diff)
downloadbrdo-21ac9f1917595492fa9997e565bf11ec8d8cd14f.tar.gz
brdo-21ac9f1917595492fa9997e565bf11ec8d8cd14f.tar.bz2
#174708 by multiple contributors: update jQuery to 1.2
Diffstat (limited to 'misc/ahah.js')
-rw-r--r--misc/ahah.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/misc/ahah.js b/misc/ahah.js
index 7f48bb91d..87ab19404 100644
--- a/misc/ahah.js
+++ b/misc/ahah.js
@@ -69,7 +69,9 @@ Drupal.ahah.prototype.onsubmit = function () {
margin: '0 0 0 20px'
});
button.css('float', 'left').attr('disabled', true).after(progress_element);
- eval('progress_element.' + this.showEffect + '()');
+ if (progress_element[this.showEffect]) {
+ progress_element[this.showEffect]();
+ }
};
/**
@@ -93,10 +95,12 @@ Drupal.ahah.prototype.oncomplete = function (data) {
if (this.method == 'replace') {
wrapper.empty().append(new_content);
}
- else {
- eval('wrapper.' + this.method + '(new_content)');
+ else if (wrapper[this.method]) {
+ wrapper[this.method](new_content);
+ }
+ if (new_content[this.showEffect]) {
+ new_content[this.showEffect]();
}
- eval('new_content.' + this.showEffect + '()');
button.css('float', 'none').attr('disabled', false);
Drupal.attachBehaviors(new_content);