summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/effects/controls.js
diff options
context:
space:
mode:
authorwei <>2006-08-26 12:27:37 +0000
committerwei <>2006-08-26 12:27:37 +0000
commit5a47e8d5c472bfbe07abb464cdcc5bbc721f8d59 (patch)
tree8e074600b4cba0ef8c5a250f00e125d8b1c3b7d4 /framework/Web/Javascripts/effects/controls.js
parentf29e7b34891d2bb10da8cd1beb55a1b336484d22 (diff)
MINOR BC BREAK (javascript related). Update javascript effect library to 1.6.2, unify javascript event handler function signatures.
Diffstat (limited to 'framework/Web/Javascripts/effects/controls.js')
-rw-r--r--framework/Web/Javascripts/effects/controls.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/effects/controls.js b/framework/Web/Javascripts/effects/controls.js
index de0261ed..ea5ce6ea 100644
--- a/framework/Web/Javascripts/effects/controls.js
+++ b/framework/Web/Javascripts/effects/controls.js
@@ -33,6 +33,9 @@
// useful when one of the tokens is \n (a newline), as it
// allows smart autocompletion after linebreaks.
+if(typeof Effect == 'undefined')
+ throw("controls.js requires including script.aculo.us' effects.js library");
+
var Autocompleter = {}
Autocompleter.Base = function() {};
Autocompleter.Base.prototype = {
@@ -94,7 +97,7 @@ Autocompleter.Base.prototype = {
},
fixIEOverlapping: function() {
- Position.clone(this.update, this.iefix);
+ Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
this.iefix.style.zIndex = 1;
this.update.style.zIndex = 2;
Element.show(this.iefix);
@@ -202,11 +205,13 @@ Autocompleter.Base.prototype = {
markPrevious: function() {
if(this.index > 0) this.index--
else this.index = this.entryCount-1;
+ this.getEntry(this.index).scrollIntoView(true);
},
markNext: function() {
if(this.index < this.entryCount-1) this.index++
else this.index = 0;
+ this.getEntry(this.index).scrollIntoView(false);
},
getEntry: function(index) {
@@ -531,7 +536,7 @@ Ajax.InPlaceEditor.prototype = {
Element.hide(this.element);
this.createForm();
this.element.parentNode.insertBefore(this.form, this.element);
- Field.scrollFreeActivate(this.editField);
+ if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
// stop the event to avoid a page refresh in Safari
if (evt) {
Event.stop(evt);
@@ -636,6 +641,7 @@ Ajax.InPlaceEditor.prototype = {
Element.removeClassName(this.form, this.options.loadingClassName);
this.editField.disabled = false;
this.editField.value = transport.responseText.stripTags();
+ Field.scrollFreeActivate(this.editField);
},
onclickCancel: function() {
this.onComplete();