[fusion-commits] r2522 - in sandbox/adsk/2.4j: lib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Jan 18 21:32:07 EST 2012
Author: hubu
Date: 2012-01-18 18:32:07 -0800 (Wed, 18 Jan 2012)
New Revision: 2522
Modified:
sandbox/adsk/2.4j/lib/Widget.js
sandbox/adsk/2.4j/widgets/BufferPanel.js
sandbox/adsk/2.4j/widgets/FeatureInfo.js
sandbox/adsk/2.4j/widgets/Help.js
sandbox/adsk/2.4j/widgets/InvokeURL.js
sandbox/adsk/2.4j/widgets/Measure.js
sandbox/adsk/2.4j/widgets/Query.js
sandbox/adsk/2.4j/widgets/QuickPlot.js
sandbox/adsk/2.4j/widgets/Redline.js
sandbox/adsk/2.4j/widgets/SelectWithin.js
sandbox/adsk/2.4j/widgets/TaskPane.js
sandbox/adsk/2.4j/widgets/Theme.js
Log:
on behalf of libr(Bruce li)
integrate from revision 2521 of trunk
Modified: sandbox/adsk/2.4j/lib/Widget.js
===================================================================
--- sandbox/adsk/2.4j/lib/Widget.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/lib/Widget.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -158,7 +158,7 @@
/**
*/
shouldActivateWith: function(widget) {
- return false;
+ return true;
},
/**
Modified: sandbox/adsk/2.4j/widgets/BufferPanel.js
===================================================================
--- sandbox/adsk/2.4j/widgets/BufferPanel.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/BufferPanel.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -118,7 +118,10 @@
}
url += params.join('&');
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
if ( pageElement ) {
pageElement.src = url;
Modified: sandbox/adsk/2.4j/widgets/FeatureInfo.js
===================================================================
--- sandbox/adsk/2.4j/widgets/FeatureInfo.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/FeatureInfo.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -72,7 +72,10 @@
}
url += params.join('&');
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
if ( pageElement ) {
pageElement.src = url;
Modified: sandbox/adsk/2.4j/widgets/Help.js
===================================================================
--- sandbox/adsk/2.4j/widgets/Help.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/Help.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -84,7 +84,10 @@
/* check to see if this is going into a task pane */
var taskPaneTarget = Fusion.getWidgetById(this.target);
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
/* check to see if it is going into a frame in the page */
var pageElement = $(this.target);
Modified: sandbox/adsk/2.4j/widgets/InvokeURL.js
===================================================================
--- sandbox/adsk/2.4j/widgets/InvokeURL.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/InvokeURL.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -112,7 +112,10 @@
url += params.join('&');
var taskPaneTarget = Fusion.getWidgetById(this.sTarget);
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
var pageElement = $(this.sTarget);
if ( pageElement ) {
Modified: sandbox/adsk/2.4j/widgets/Measure.js
===================================================================
--- sandbox/adsk/2.4j/widgets/Measure.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/Measure.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -468,7 +468,10 @@
var taskPaneTarget = Fusion.getWidgetById(this.sTarget);
var outputWin = window;
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
outputWin = taskPaneTarget.iframe.contentWindow;
} else {
outputWin = window.open(url, this.sTarget, this.sWinFeatures);
Modified: sandbox/adsk/2.4j/widgets/Query.js
===================================================================
--- sandbox/adsk/2.4j/widgets/Query.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/Query.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -72,7 +72,10 @@
}
url += params.join('&');
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
if ( pageElement ) {
pageElement.src = url;
Modified: sandbox/adsk/2.4j/widgets/QuickPlot.js
===================================================================
--- sandbox/adsk/2.4j/widgets/QuickPlot.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/QuickPlot.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -156,7 +156,10 @@
if (taskPaneTarget)
{
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
}
else
{
Modified: sandbox/adsk/2.4j/widgets/Redline.js
===================================================================
--- sandbox/adsk/2.4j/widgets/Redline.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/Redline.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -114,7 +114,10 @@
var outputWin = window;
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
outputWin = taskPaneTarget.iframe.contentWindow;
} else {
outputWin = window.open(url, this.widget.sTarget, this.widget.sWinFeatures);
Modified: sandbox/adsk/2.4j/widgets/SelectWithin.js
===================================================================
--- sandbox/adsk/2.4j/widgets/SelectWithin.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/SelectWithin.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -111,7 +111,10 @@
}
url += params.join('&');
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
if ( pageElement ) {
pageElement.src = url;
Modified: sandbox/adsk/2.4j/widgets/TaskPane.js
===================================================================
--- sandbox/adsk/2.4j/widgets/TaskPane.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/TaskPane.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -161,13 +161,8 @@
this.setContent(url);
},
- setContent: function(url) {
- Fusion.triggerEvent(Fusion.Event.TASK_PANE_LOADED);
-
- if (this.nCurrentTask < this.aExecutedTasks.length-1) {
- //this.aExecutedTasks.splice(this.nCurrentTask, this.aExecutedTasks.length - this.nCurrentTask);
- }
-
+
+ addCommonParams:function(url){
//add in some common parameters if they aren't supplied already
var baseUrl = url.split("?");
var params = OpenLayers.Util.getParameters(url);
@@ -182,7 +177,17 @@
params["mapname"] = widgetLayer.getMapName();
}
var newUrl = baseUrl[0] + "?" + OpenLayers.Util.getParameterString(params);
+ return newUrl;
+ },
+
+ isSameWithLast:function(url){
+ return this.aExecutedTasks[this.aExecutedTasks.length-1] == this.addCommonParams(url) ;
+ },
+
+ setContent: function(url) {
+ Fusion.triggerEvent(Fusion.Event.TASK_PANE_LOADED);
+ var newUrl = this.addCommonParams(url);
this.aExecutedTasks.push(newUrl);
++this.nCurrentTask;
this.loadFrame(newUrl);
Modified: sandbox/adsk/2.4j/widgets/Theme.js
===================================================================
--- sandbox/adsk/2.4j/widgets/Theme.js 2012-01-19 02:04:27 UTC (rev 2521)
+++ sandbox/adsk/2.4j/widgets/Theme.js 2012-01-19 02:32:07 UTC (rev 2522)
@@ -71,7 +71,10 @@
}
url += params.join('&');
if ( taskPaneTarget ) {
- taskPaneTarget.setContent(url);
+ if(!taskPaneTarget.isSameWithLast(url))
+ {
+ taskPaneTarget.setContent(url);
+ }
} else {
if ( pageElement ) {
pageElement.src = url;
More information about the fusion-commits
mailing list