summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/prado
diff options
context:
space:
mode:
authorwei <>2006-08-12 05:34:54 +0000
committerwei <>2006-08-12 05:34:54 +0000
commit54d4919e3f1b00b644fa3c107acdf20159a1b154 (patch)
tree1c3e9cc679d4e08cc4beb06eee6f79838a34cb31 /framework/Web/Javascripts/prado
parent6dd529fdc25404da07cf9256d92f2a94985c65fc (diff)
Update active controls.
Diffstat (limited to 'framework/Web/Javascripts/prado')
-rw-r--r--framework/Web/Javascripts/prado/activecontrols3.js11
-rw-r--r--framework/Web/Javascripts/prado/ajax3.js17
-rw-r--r--framework/Web/Javascripts/prado/element.js15
3 files changed, 38 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/prado/activecontrols3.js b/framework/Web/Javascripts/prado/activecontrols3.js
index 71719f35..f75d3684 100644
--- a/framework/Web/Javascripts/prado/activecontrols3.js
+++ b/framework/Web/Javascripts/prado/activecontrols3.js
@@ -15,6 +15,10 @@ Prado.WebUI.CallbackControl = Class.extend(Prado.WebUI.PostBackControl,
* TActiveButton control.
*/
Prado.WebUI.TActiveButton = Class.extend(Prado.WebUI.CallbackControl);
+/**
+ * TActiveLinkButton control.
+ */
+Prado.WebUI.TActiveLinkButton = Class.extend(Prado.WebUI.CallbackControl);
/**
* Active check box.
@@ -29,6 +33,12 @@ Prado.WebUI.TActiveCheckBox = Class.extend(Prado.WebUI.CallbackControl,
});
/**
+ * TActiveRadioButton control.
+ */
+Prado.WebUI.TActiveRadioButton = Class.extend(Prado.WebUI.TActiveCheckBox);
+
+
+/**
* TActiveTextBox control, handles onchange event.
*/
Prado.WebUI.TActiveTextBox = Class.extend(Prado.WebUI.TTextBox,
@@ -212,3 +222,4 @@ Prado.WebUI.ActiveListControl = Base.extend(
});
Prado.WebUI.TActiveDropDownList = Prado.WebUI.ActiveListControl;
+Prado.WebUI.TActiveListBox = Prado.WebUI.ActiveListControl;
diff --git a/framework/Web/Javascripts/prado/ajax3.js b/framework/Web/Javascripts/prado/ajax3.js
index 8de0b0fe..de5af4ca 100644
--- a/framework/Web/Javascripts/prado/ajax3.js
+++ b/framework/Web/Javascripts/prado/ajax3.js
@@ -120,6 +120,13 @@ Object.extend(Prado.CallbackRequest,
addPostLoaders : function(ids)
{
this.PostDataLoaders = this.PostDataLoaders.concat(ids);
+ list = [];
+ this.PostDataLoaders.each(function(id)
+ {
+ if(list.indexOf(id) < 0)
+ list.push(id);
+ });
+ this.PostDataLoaders = list;
},
/**
@@ -477,9 +484,13 @@ Prado.CallbackRequest.prototype =
{
$A(document.getElementsByName(name)).each(function(element)
{
- var value = $F(element);
- if(typeof(value) != "undefined")
- data[name] = value;
+ //IE will try to get elements with ID == name as well.
+ if(element.type && element.name == name)
+ {
+ value = $F(element);
+ if(typeof(value) != "undefined")
+ data[name] = value;
+ }
})
})
}
diff --git a/framework/Web/Javascripts/prado/element.js b/framework/Web/Javascripts/prado/element.js
index 9b7bd120..d234e71b 100644
--- a/framework/Web/Javascripts/prado/element.js
+++ b/framework/Web/Javascripts/prado/element.js
@@ -33,10 +33,20 @@ Prado.Element =
setAttribute : function(element, attribute, value)
{
var el = $(element);
- if(attribute == "disabled" && value==false)
+ if((attribute == "disabled" || attribute == "multiple") && value==false)
el.removeAttribute(attribute);
else if(attribute.match(/^on/i)) //event methods
- el[attribute] = eval("(function(event){"+value+"})");
+ {
+ try
+ {
+ eval("(func = function(event){"+value+"})");
+ el[attribute] = func;
+ }
+ catch(e)
+ {
+ throw "Error in evaluating '"+value+"' for attribute "+attribute+" for element "+element.id;
+ }
+ }
else
el.setAttribute(attribute, value);
},
@@ -110,6 +120,7 @@ Prado.Element.Selection =
case 'checkbox':
case 'radio':
case 'select':
+ case 'select-multiple':
case 'select-one':
return true;
}