[fusion-commits] r2518 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jan 17 04:29:49 EST 2012
Author: jng
Date: 2012-01-17 01:29:49 -0800 (Tue, 17 Jan 2012)
New Revision: 2518
Modified:
trunk/lib/Widget.js
Log:
Submitted on behalf of Bruce Li (libr). Fix tickets #505, #512 and #513
Modified: trunk/lib/Widget.js
===================================================================
--- trunk/lib/Widget.js 2012-01-13 05:44:58 UTC (rev 2517)
+++ trunk/lib/Widget.js 2012-01-17 09:29:49 UTC (rev 2518)
@@ -119,11 +119,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({
@@ -134,11 +132,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();
@@ -147,11 +143,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();
@@ -164,7 +158,7 @@
/**
*/
shouldActivateWith: function(widget) {
- return true;
+ return false;
},
/**
More information about the fusion-commits
mailing list