[fusion-commits] r2222 - sandbox/jxlib-3.0/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Sep 10 09:49:41 EDT 2010
Author: pagameba
Date: 2010-09-10 13:49:40 +0000 (Fri, 10 Sep 2010)
New Revision: 2222
Modified:
sandbox/jxlib-3.0/lib/Widget.js
Log:
set buttons active using the API rather than directly using the dom elements.
Modified: sandbox/jxlib-3.0/lib/Widget.js
===================================================================
--- sandbox/jxlib-3.0/lib/Widget.js 2010-09-10 07:08:47 UTC (rev 2221)
+++ sandbox/jxlib-3.0/lib/Widget.js 2010-09-10 13:49:40 UTC (rev 2222)
@@ -102,11 +102,9 @@
if (uiObj.addEvents) {
if (Fusion.Widget.uiInstances[this.type][0].uiObj &&
Fusion.Widget.uiInstances[this.type][0].uiObj.options.active &&
- Fusion.Widget.uiInstances[this.type][0].shouldActivateWith(this)) {
- uiObj.options.active = true;
- if (uiObj.domA) {
- uiObj.domA.addClass('jx' + uiObj.options.type + 'Active');
- }
+ Fusion.Widget.uiInstances[this.type][0].shouldActivateWith(this) &&
+ uiObj.setActive) {
+ uiObj.setActive(true);
}
uiObj.addEvents({
@@ -117,11 +115,9 @@
var instances = Fusion.Widget.uiInstances[this.type];
for (var i=0; i<instances.length; i++) {
var instance = instances[i];
- if (instance.shouldActivateWith(this) && instance.uiObj) {
- instance.uiObj.options.active = false;
- if (instance.uiObj.domA) {
- instance.uiObj.domA.removeClass('jx' + instance.uiObj.options.type + 'Active');
- }
+ if (instance.shouldActivateWith(this) &&
+ instance.uiObj && instance.uiObj.setActive) {
+ instance.uiObj.setActive(false);
}
}
this.deactivate();
@@ -130,11 +126,9 @@
var instances = Fusion.Widget.uiInstances[this.type];
for (var i=0; i<instances.length; i++) {
var instance = instances[i];
- if (instance.shouldActivateWith(this) && instance.uiObj) {
- instance.uiObj.options.active = true;
- if (instance.uiObj.domA) {
- instance.uiObj.domA.addClass('jx' + instance.uiObj.options.type + 'Active');
- }
+ if (instance.shouldActivateWith(this) &&
+ instance.uiObj && instance.uiObj.setActive) {
+ instance.uiObj.setActive(true);
}
}
this.activate();
More information about the fusion-commits
mailing list