[fusion-commits] r2683 - in trunk/widgets: . widgetinfo
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Mar 28 03:07:17 PDT 2013
Author: jng
Date: 2013-03-28 03:07:16 -0700 (Thu, 28 Mar 2013)
New Revision: 2683
Modified:
trunk/widgets/SelectionPanel.js
trunk/widgets/widgetinfo/selectionpanel.xml
Log:
This submission includes the following changes:
- #564: Add missing extension parameters to the widgetinfo XML of SelectionPanel
- #563: Fix broken horizontal representation of the SelectionPanel
Modified: trunk/widgets/SelectionPanel.js
===================================================================
--- trunk/widgets/SelectionPanel.js 2013-03-28 09:02:03 UTC (rev 2682)
+++ trunk/widgets/SelectionPanel.js 2013-03-28 10:07:16 UTC (rev 2683)
@@ -497,6 +497,20 @@
$(this.featureDiv).removeClass('noSelection');
this.featureDiv.innerHTML = '';
+ var mapWidget = this.getMap();
+ var aMaps = mapWidget.getAllMaps();
+ var mgLayer = null;
+ //NOTE: We are obviously assuming only one Fusion.Layers.MapGuide instance here (if any)
+ for (var i = 0; i < aMaps.length; i++) {
+ if (aMaps[i].arch == "MapGuide") {
+ mgLayer = aMaps[i];
+ break;
+ }
+ }
+
+ if (mgLayer == null)
+ return;
+
var nLayers = this.oSelection.getNumLayers();
for (var i=0; i<nLayers; i++) {
var table = document.createElement('table');
@@ -504,8 +518,9 @@
table.style.marginBottom = "10px";
var layerObj = this.oSelection.getLayer(i);
var aNames = layerObj.getPropertyNames();
+
//find the legend label from the Map layer objects
- var mapLayers = this.getMapLayer().aLayers;
+ var mapLayers = mgLayer.aLayers;
var labelName = layerObj.getName();
for (var j=0; j<mapLayers.length; ++j) {
if (mapLayers[j].layerName == labelName) {
Modified: trunk/widgets/widgetinfo/selectionpanel.xml
===================================================================
--- trunk/widgets/widgetinfo/selectionpanel.xml 2013-03-28 09:02:03 UTC (rev 2682)
+++ trunk/widgets/widgetinfo/selectionpanel.xml 2013-03-28 10:07:16 UTC (rev 2683)
@@ -1,13 +1,53 @@
<WidgetInfo>
- <Type>SelectionPanel</Type>
- <LocalizedType>Selection Panel</LocalizedType>
- <Description>The SelectionPanel widget displays attributes for the features that are selected on the map.</Description>
- <Location></Location>
- <Label>Selection Panel</Label>
- <Tooltip></Tooltip>
- <StatusText></StatusText>
- <ImageUrl></ImageUrl>
- <ImageClass></ImageClass>
- <StandardUi>false</StandardUi>
- <ContainableBy></ContainableBy>
+ <Type>SelectionPanel</Type>
+ <LocalizedType>Selection Panel</LocalizedType>
+ <Description>The SelectionPanel widget displays attributes for the features that are selected on the map.</Description>
+ <Location></Location>
+ <Label>Selection Panel</Label>
+ <Tooltip></Tooltip>
+ <StatusText></StatusText>
+ <ImageUrl></ImageUrl>
+ <ImageClass></ImageClass>
+ <StandardUi>false</StandardUi>
+ <ContainableBy></ContainableBy>
+ <Parameter>
+ <Name>PreviousImageUrl</Name>
+ <Label>Previous Image URL</Label>
+ <Type>string</Type>
+ <Description>Previous Image icon URL</Description>
+ <DefaultValue></DefaultValue>
+ <IsMandatory>false</IsMandatory>
+ </Parameter>
+ <Parameter>
+ <Name>NextImageUrl</Name>
+ <Label>Next Image URL</Label>
+ <Type>string</Type>
+ <Description>Next Image icon URL</Description>
+ <DefaultValue></DefaultValue>
+ <IsMandatory>false</IsMandatory>
+ </Parameter>
+ <Parameter>
+ <Name>ResultsPerPage</Name>
+ <Label>Results Per Page</Label>
+ <Type>integer</Type>
+ <Description>The number of results to show per page</Description>
+ <DefaultValue>0</DefaultValue>
+ <IsMandatory>false</IsMandatory>
+ </Parameter>
+ <Parameter>
+ <Name>SelectionRenderer</Name>
+ <Label>Selection Renderer</Label>
+ <Type>string</Type>
+ <Description>The type of selection renderer to use</Description>
+ <AllowedValue>
+ <Name>Fusion.Widget.SelectionPanel.SelectionRendererDefault</Name>
+ <Label>Default</Label>
+ </AllowedValue>
+ <AllowedValue>
+ <Name>Fusion.Widget.SelectionPanel.SelectionRendererHorizontal</Name>
+ <Label>Horizontal</Label>
+ </AllowedValue>
+ <DefaultValue>Fusion.Widget.SelectionPanel.SelectionRendererDefault</DefaultValue>
+ <IsMandatory>true</IsMandatory>
+ </Parameter>
</WidgetInfo>
More information about the fusion-commits
mailing list