[fusion-commits] r1347 - in sandbox/olcore: MapGuide lib
templates/mapguide/standard widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Mar 27 15:52:31 EDT 2008
Author: madair
Date: 2008-03-27 15:52:31 -0400 (Thu, 27 Mar 2008)
New Revision: 1347
Modified:
sandbox/olcore/MapGuide/MapGuide.js
sandbox/olcore/lib/ApplicationDefinition.js
sandbox/olcore/lib/ButtonBase.js
sandbox/olcore/lib/ButtonTool.js
sandbox/olcore/lib/CanvasTool.js
sandbox/olcore/lib/ClickTool.js
sandbox/olcore/lib/Error.js
sandbox/olcore/lib/MGBroker.js
sandbox/olcore/lib/Map.js
sandbox/olcore/lib/MenuBase.js
sandbox/olcore/lib/RectTool.js
sandbox/olcore/lib/Search.js
sandbox/olcore/lib/Widget.js
sandbox/olcore/lib/fusion.js
sandbox/olcore/lib/utils.js
sandbox/olcore/templates/mapguide/standard/ApplicationDefinition.xml
sandbox/olcore/widgets/Help.js
Log:
re #5: files in /lib use OpenLayers.Class for inheritance
Modified: sandbox/olcore/MapGuide/MapGuide.js
===================================================================
--- sandbox/olcore/MapGuide/MapGuide.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/MapGuide/MapGuide.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -29,8 +29,7 @@
* Implements the map widget for MapGuide Open Source services.
*/
-Fusion.Maps.MapGuide = Class.create();
-Fusion.Maps.MapGuide.prototype = {
+Fusion.Maps.MapGuide = OpenLayers.Class(Fusion.Lib.EventMgr, {
arch: 'MapGuide',
session: [null],
bSingleTile: null,
@@ -54,7 +53,6 @@
initialize : function(map, mapTag, isMapWidgetLayer) {
// console.log('MapGuide.initialize');
- Object.inheritFrom(this, Fusion.Lib.EventMgr, []);
this.registerEventID(Fusion.Event.MAP_SESSION_CREATED);
this.registerEventID(Fusion.Event.MAP_SELECTION_ON);
@@ -994,7 +992,7 @@
}
return null;
}
-};
+});
/***************************************************************************
* Class: Fusion.Maps.MapGuide.Group
Modified: sandbox/olcore/lib/ApplicationDefinition.js
===================================================================
--- sandbox/olcore/lib/ApplicationDefinition.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/ApplicationDefinition.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -23,6 +23,14 @@
* DEALINGS IN THE SOFTWARE.
*/
+OpenLayers.Util.extend(Fusion, Fusion.Lib.EventMgr);
+//Fusion.Lib.EventMgr.initialize.apply(Fusion, []);
+
+Fusion.Event.FUSION_INITIALIZED = Fusion.Event.lastEventId++;
+Fusion.Event.FUSION_ERROR = Fusion.Event.lastEventId++;
+Fusion.registerEventID(Fusion.Event.FUSION_INITIALIZED);
+Fusion.registerEventID(Fusion.Event.FUSION_ERROR);
+
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition
*
@@ -30,8 +38,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition = Class.create();
-Fusion.Lib.ApplicationDefinition.prototype = {
+Fusion.Lib.ApplicationDefinition = OpenLayers.Class({
/**
* Property: mapGroups
*
@@ -85,7 +92,6 @@
initialize: function(sessionId) {
//console.log('ApplicationDefinition initialize');
- Fusion.Lib.EventMgr.initialize.apply(this, []);
this.sessionId = sessionId;
this.oBroker = Fusion.getBroker();
this.applicationDefinition = Fusion.getApplicationDefinitionURL();
@@ -381,7 +387,7 @@
}
return widgets;
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.MapGroup
@@ -390,8 +396,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.MapGroup = Class.create();
-Fusion.Lib.ApplicationDefinition.MapGroup.prototype = {
+Fusion.Lib.ApplicationDefinition.MapGroup = OpenLayers.Class({
initialView: null,
maps: null,
@@ -506,7 +511,7 @@
setInitialView: function(view) {
this.initialView = view;
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.Map
@@ -515,8 +520,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.Map = Class.create();
-Fusion.Lib.ApplicationDefinition.Map.prototype = {
+Fusion.Lib.ApplicationDefinition.Map = OpenLayers.Class({
type: null,
singleTile: false,
extension: null,
@@ -537,7 +541,7 @@
Fusion.require(this.type + '/' + this.type + '.js');
}
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.WidgetSet
@@ -546,8 +550,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.WidgetSet = Class.create();
-Fusion.Lib.ApplicationDefinition.WidgetSet.prototype = {
+Fusion.Lib.ApplicationDefinition.WidgetSet = OpenLayers.Class({
containers: null,
containersByName: null,
widgetTags: null,
@@ -707,7 +710,7 @@
getContainerByName: function(name) {
return this.containersByName[name];
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.Container
@@ -716,8 +719,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.Container = Class.create();
-Fusion.Lib.ApplicationDefinition.Container.prototype = {
+Fusion.Lib.ApplicationDefinition.Container = OpenLayers.Class({
name: null,
type: null,
validPositions: ['top', 'left', 'bottom', 'right'],
@@ -773,7 +775,7 @@
}
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.Widget
@@ -782,8 +784,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.Widget = Class.create();
-Fusion.Lib.ApplicationDefinition.Widget.prototype = {
+Fusion.Lib.ApplicationDefinition.Widget = OpenLayers.Class({
name: null,
type: null,
statusText: null,
@@ -870,7 +871,7 @@
}
return widget;
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.Item
@@ -879,8 +880,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.Item = Class.create();
-Fusion.Lib.ApplicationDefinition.Item.prototype = {
+Fusion.Lib.ApplicationDefinition.Item = OpenLayers.Class({
uniqueId: [0],
type: null,
initialize: function(jsonNode) {
@@ -968,7 +968,7 @@
break;
}
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.Flyout
@@ -977,8 +977,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.Flyout = Class.create();
-Fusion.Lib.ApplicationDefinition.Flyout.prototype = {
+Fusion.Lib.ApplicationDefinition.Flyout = OpenLayers.Class({
label: null,
tooltip: null,
description: null,
@@ -1004,7 +1003,7 @@
}
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.SearchDefinition
@@ -1013,8 +1012,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.SearchDefinition = Class.create();
-Fusion.Lib.ApplicationDefinition.SearchDefinition.prototype = {
+Fusion.Lib.ApplicationDefinition.SearchDefinition = OpenLayers.Class({
id: null,
name: null,
category: null,
@@ -1060,7 +1058,7 @@
getFilterUrl: function(params) {
return '&filter='+encodeURIComponent(this.rule.toString(params));
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.SearchJoin
@@ -1069,8 +1067,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.SearchJoin = Class.create();
-Fusion.Lib.ApplicationDefinition.SearchJoin.prototype = {
+Fusion.Lib.ApplicationDefinition.SearchJoin = OpenLayers.Class({
layer: null,
primaryKey: null,
foreignKey: null,
@@ -1079,7 +1076,7 @@
this.primaryKey = json.PrimaryKey ? json.PrimaryKey[0] : '';
this.foreignKey = json.ForeignKey ? json.ForeignKey[0] : '';
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.SearchRule
@@ -1088,8 +1085,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.SearchRule = Class.create();
-Fusion.Lib.ApplicationDefinition.SearchRule.prototype = {
+Fusion.Lib.ApplicationDefinition.SearchRule = OpenLayers.Class({
type: null,
conditions: null,
initialize: function(type) {
@@ -1121,7 +1117,7 @@
}
return '(' + conditions.join(') ' + this.type + ' (') + ')';
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.ApplicationDefinition.SearchCondition
@@ -1130,8 +1126,7 @@
*
*/
-Fusion.Lib.ApplicationDefinition.SearchCondition = Class.create();
-Fusion.Lib.ApplicationDefinition.SearchCondition.prototype = {
+Fusion.Lib.ApplicationDefinition.SearchCondition = OpenLayers.Class({
column: null,
operator: null,
parameter: null,
@@ -1184,4 +1179,4 @@
var wildcard = this.operator == 'like' ? '*' : '';
return upper + '('+this.column + ') ' + this.operator + ' ' + this.quote + prewildcard + value + postwildcard + this.quote;
}
-};
+});
Modified: sandbox/olcore/lib/ButtonBase.js
===================================================================
--- sandbox/olcore/lib/ButtonBase.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/ButtonBase.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -44,8 +44,7 @@
* **********************************************************************/
-Fusion.Tool.ButtonBase = Class.create();
-Fusion.Tool.ButtonBase.prototype = {
+Fusion.Tool.ButtonBase = OpenLayers.Class({
/**
* constructor
*/
@@ -107,6 +106,8 @@
disable: function() {
//console.log('button base disable');
Fusion.Widget.prototype.disable.apply(this,[]);
- this._oButton.disableTool();
+ if (this._oButton) {
+ this._oButton.disableTool();
+ }
}
-};
+});
Modified: sandbox/olcore/lib/ButtonTool.js
===================================================================
--- sandbox/olcore/lib/ButtonTool.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/ButtonTool.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -29,8 +29,7 @@
* Utility base class for the actual buttons used by widgets.
* **********************************************************************/
-Fusion.Tool.Button = Class.create();
-Fusion.Tool.Button.prototype = {
+Fusion.Tool.Button = OpenLayers.Class({
bActive: null,
sActiveClass: 'jxButtonActive',
sDisabledClass: 'jxButtonDisabled',
@@ -108,4 +107,4 @@
clickCB : function(e) { this.activateTool(); },
isActive: function() {return this.bActive;}
-};
+});
Modified: sandbox/olcore/lib/CanvasTool.js
===================================================================
--- sandbox/olcore/lib/CanvasTool.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/CanvasTool.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -29,9 +29,7 @@
* Utility base class for drawing features on the map.
* **********************************************************************/
-Fusion.Tool.Canvas = Class.create();
-Fusion.Tool.Canvas.prototype =
-{
+Fusion.Tool.Canvas = OpenLayers.Class({
context: null,
canvas: null,
width: null,
@@ -175,7 +173,7 @@
* @param e Event the event that happened on the mapObj
*/
dblClick: function(e) { }
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.Point
@@ -183,8 +181,7 @@
* Utility base class for drawing point features on the map.
* **********************************************************************/
-Fusion.Tool.Canvas.Point = Class.create();
-Fusion.Tool.Canvas.Point.prototype = {
+Fusion.Tool.Canvas.Point = OpenLayers.Class({
center: null,
radius: null,
lineStyle: null,
@@ -237,7 +234,7 @@
updatePx: function() {
this.center.updatePx();
}
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.Circle
@@ -245,8 +242,7 @@
* Utility base class for drawing circle features on the map.
* **********************************************************************/
-Fusion.Tool.Canvas.Circle = Class.create();
-Fusion.Tool.Canvas.Circle.prototype = {
+Fusion.Tool.Canvas.Circle = OpenLayers.Class({
map: null,
center: null,
radius: null,
@@ -319,7 +315,7 @@
this.center.updatePx();
this.radiusPx = this.map.geoToPixMeasure(this.radius);
}
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.Polygon
@@ -327,8 +323,7 @@
* Utility base class for drawing polygon features on the map.
* **********************************************************************/
-Fusion.Tool.Canvas.Polygon = Class.create();
-Fusion.Tool.Canvas.Polygon.prototype = {
+Fusion.Tool.Canvas.Polygon = OpenLayers.Class({
segments: null,
lineStyle: null,
fillStyle: null,
@@ -532,7 +527,7 @@
this.segments[i].updatePx();
}
}
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.line
@@ -540,8 +535,7 @@
* Utility base class for drawing line features on the map.
* **********************************************************************/
-Fusion.Tool.Canvas.Line = Class.create();
-Fusion.Tool.Canvas.Line.prototype = {
+Fusion.Tool.Canvas.Line = OpenLayers.Class({
segments: null,
lineStyle: null,
map: null,
@@ -694,7 +688,7 @@
this.segments[i].updatePx();
}
}
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.Segment
@@ -702,8 +696,7 @@
* Utility base class for drawing line segments on the map.
* **********************************************************************/
-Fusion.Tool.Canvas.Segment = Class.create();
-Fusion.Tool.Canvas.Segment.prototype = {
+Fusion.Tool.Canvas.Segment = OpenLayers.Class({
from: null,
to: null,
@@ -799,7 +792,7 @@
this.from.updatePx();
this.to.updatePx();
}
-};
+});
/********************************************
* Class: Fusion.Tool.Canvas.Node
@@ -807,8 +800,7 @@
* Utility base class to hold nodes that make up otherr features
* **********************************************************************/
-Fusion.Tool.Canvas.Node = Class.create();
-Fusion.Tool.Canvas.Node.prototype = {
+Fusion.Tool.Canvas.Node = OpenLayers.Class({
x: null,
y: null,
px: null,
@@ -911,7 +903,7 @@
toString: function() {
return '('+this.uid+') '+ this.x + ' ['+this.px+'px] '+ this.y+ ' ['+this.py+'px] ';
}
-};
+});
/* encapsulate a context style */
/********************************************
@@ -920,8 +912,7 @@
* Utility base class to encapsulate a context style.
* **********************************************************************/
-Fusion.Tool.Canvas.Style = Class.create();
-Fusion.Tool.Canvas.Style.prototype = {
+Fusion.Tool.Canvas.Style = OpenLayers.Class({
properties: ['fillStyle',
'globalAlpha',
'globalCompositeOperation',
@@ -954,4 +945,4 @@
}
}
}
-};
+});
Modified: sandbox/olcore/lib/ClickTool.js
===================================================================
--- sandbox/olcore/lib/ClickTool.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/ClickTool.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -31,9 +31,7 @@
* All classes using this should redefine the execute function
* **********************************************************************/
-Fusion.Tool.Click = Class.create();
-Fusion.Tool.Click.prototype =
-{
+Fusion.Tool.Click = OpenLayers.Class({
/**
* constructor
* @param oMap {Object} a map widget
@@ -72,4 +70,4 @@
this.execute(sPixPoint.x, sPixPoint.y);
}
}
-};
+});
Modified: sandbox/olcore/lib/Error.js
===================================================================
--- sandbox/olcore/lib/Error.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/Error.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -29,13 +29,12 @@
* General purpose Error object
*/
-Fusion.Error = Class.create();
+Fusion.Error = OpenLayers.Class({
-Fusion.Error.FATAL = 0;
-Fusion.Error.WARNING = 1;
-Fusion.Error.NOTICE = 2;
+ FATAL: 0,
+ WARNING: 1,
+ NOTICE: 2,
-Fusion.Error.prototype = {
type: null,
message: null,
initialize: function(type, message) {
@@ -65,4 +64,4 @@
return 'UNKNOWN ('+type+')';
}
}
-};
+});
Modified: sandbox/olcore/lib/MGBroker.js
===================================================================
--- sandbox/olcore/lib/MGBroker.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/MGBroker.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -32,8 +32,7 @@
* send requests to the server via the dispatchRequest method.
*/
-Fusion.Lib.MGBroker = Class.create();
-Fusion.Lib.MGBroker.prototype = {
+Fusion.Lib.MGBroker = OpenLayers.Class({
/**
* the URL to a MapGuide Open Source installation. Set this using
* setSiteURL
@@ -118,7 +117,7 @@
this.mapGuideURL = '';
this.mapAgentURL = '';
}
-};
+});
/****************************************************************************
* Class: Fusion.Lib.MGRequest
@@ -126,8 +125,7 @@
* MGRequest is the base class for all broker-compatible requests. A request
* is a wrapper around an operation that is supported by the mapagent.
*/
-Fusion.Lib.MGRequest = Class.create();
-Fusion.Lib.MGRequest.prototype = {
+Fusion.Lib.MGRequest = OpenLayers.Class({
/**
* core options shared by all requests
*/
@@ -180,16 +178,14 @@
}
return s;
}
-};
+});
-Fusion.Lib.MGRequest.MGEnumerateResources = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGEnumerateResources.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGEnumerateResources
*
* encapsulate a request to the server to enumerate resources in the library.
*/
-Object.extend( Fusion.Lib.MGRequest.MGEnumerateResources.prototype, {
+Fusion.Lib.MGRequest.MGEnumerateResources = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of MGEnumerateResources
@@ -218,14 +214,12 @@
}
});
-Fusion.Lib.MGRequest.MGGetResourceContent = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGGetResourceContent.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGGetResourceContent
*
* encapsulate a request to the server to get resource contents from the library.
*/
-Object.extend( Fusion.Lib.MGRequest.MGGetResourceContent.prototype, {
+Fusion.Lib.MGRequest.MGGetResourceContent = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceContent
@@ -245,14 +239,12 @@
}
});
-Fusion.Lib.MGRequest.MGGetResourceHeader = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGGetResourceHeader.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGGetResourceHeader
*
* encapsulate a request to the server to get resource header from the library.
*/
-Object.extend( Fusion.Lib.MGRequest.MGGetResourceHeader.prototype, {
+Fusion.Lib.MGRequest.MGGetResourceHeader = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceHeader
@@ -272,15 +264,13 @@
}
});
-Fusion.Lib.MGRequest.MGCreateSession = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGCreateSession.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGCreateSession
*
* encapsulate a request to the server to create a new session on the server.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGCreateSession.prototype, {
+Fusion.Lib.MGRequest.MGCreateSession = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGCreateSession
@@ -295,15 +285,13 @@
}
});
-Fusion.Lib.MGRequest.MGCopyResource = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGCopyResource.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGCopyResource
*
* encapsulate a request to the server to copy a resource.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGCopyResource.prototype, {
+Fusion.Lib.MGRequest.MGCopyResource = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGCopyResource
@@ -325,15 +313,13 @@
}
});
-Fusion.Lib.MGRequest.MGDeleteResource = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGDeleteResource.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGDeleteResource
*
* encapsulate a request to the server to delete a resource.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGDeleteResource.prototype, {
+Fusion.Lib.MGRequest.MGDeleteResource = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGDeleteResource
@@ -351,15 +337,13 @@
}
});
-Fusion.Lib.MGRequest.MGMoveResource = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGMoveResource.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGMoveResource
*
* encapsulate a request to the server to move a resource in the repository.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGMoveResource.prototype, {
+Fusion.Lib.MGRequest.MGMoveResource = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource
@@ -381,15 +365,13 @@
}
});
-Fusion.Lib.MGRequest.MGMoveResource = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGMoveResource.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGMoveResource
*
* encapsulate a request to the server to set the content XML of a resource.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGMoveResource.prototype, {
+Fusion.Lib.MGRequest.MGMoveResource = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource
@@ -408,15 +390,13 @@
}
});
-Fusion.Lib.MGRequest.MGDescribeSchema = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGDescribeSchema.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
- * Class: Fusion.Lib.MGRequest.MGDescribeSchema
+ * Class: Fusion.Lib.MGRequest.MGMoveResource
*
- * encapsulate a request to the server to describe the schema of a FeatureSource.
+ * encapsulate a request to the server to set the content XML of a resource.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGDescribeSchema.prototype, {
+Fusion.Lib.MGRequest.MGDescribeSchema = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGDescribeSchema
@@ -436,15 +416,13 @@
}
});
-Fusion.Lib.MGRequest.MGGetSpatialContexts = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGGetSpatialContexts.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGGetSpatialContexts
*
* encapsulate a request to the server to retrieve the spatial context of a resource.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGGetSpatialContexts.prototype, {
+Fusion.Lib.MGRequest.MGGetSpatialContexts = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGGetSpatialContexts
@@ -464,15 +442,13 @@
}
});
-Fusion.Lib.MGRequest.MGEnumerateResourceReferences = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGEnumerateResourceReferences.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGEnumerateResourceReferences
*
* encapsulate a request to the server to enumerate the references to a resource id.
*
*/
-Object.extend( Fusion.Lib.MGRequest.MGEnumerateResourceReferences.prototype, {
+Fusion.Lib.MGRequest.MGEnumerateResourceReferences = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceReferences
@@ -490,8 +466,6 @@
}
});
-Fusion.Lib.MGRequest.MGEnumerateResourceData = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGEnumerateResourceData.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGEnumerateResourceData
*
@@ -501,7 +475,7 @@
* (those referencing files or directories outside the respository)
* Fusion.Lib.MGRequest.MGDescribeSchema should be used for those sources.
*/
-Object.extend( Fusion.Lib.MGRequest.MGEnumerateResourceData.prototype, {
+Fusion.Lib.MGRequest.MGEnumerateResourceData = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceData
@@ -519,8 +493,6 @@
}
});
-Fusion.Lib.MGRequest.MGGetVisibleMapExtent = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGGetVisibleMapExtent.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGGetVisibleMapExtent
*
@@ -530,7 +502,7 @@
* (those referencing files or directories outside the respository)
* Fusion.Lib.MGRequest.MGDescribeSchema should be used for those sources.
*/
-Object.extend( Fusion.Lib.MGRequest.MGGetVisibleMapExtent.prototype, {
+Fusion.Lib.MGRequest.MGGetVisibleMapExtent = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGGetVisibleMapExtent
@@ -578,15 +550,13 @@
});
-Fusion.Lib.MGRequest.MGQueryMapFeatures = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGQueryMapFeatures.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGQueryMapFeatures
*
* encapsulate a request to the server to query map features on
* selectable layers
*/
-Object.extend( Fusion.Lib.MGRequest.MGQueryMapFeatures.prototype, {
+Fusion.Lib.MGRequest.MGQueryMapFeatures = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures
@@ -617,15 +587,13 @@
}
});
-Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope = Class.create();
-Object.extend(Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope.prototype, Fusion.Lib.MGRequest.prototype);
/****************************************************************************
* Class: Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope
*
* encapsulate a request to the server to query map features on
* selectable layers
*/
-Object.extend( Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope.prototype, {
+Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope = OpenLayers.Class(Fusion.Lib.MGRequest, {
/**
* @constructor
* initialize a new instance of Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope
Modified: sandbox/olcore/lib/Map.js
===================================================================
--- sandbox/olcore/lib/Map.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/Map.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -49,10 +49,7 @@
Fusion.Constant.LAYER_RASTER_TYPE = 4;
Fusion.Constant.LAYER_DWF_TYPE = 5;
-Fusion.Widget.Map = Class.create();
-Fusion.Widget.Map.prototype =
-{
-
+Fusion.Widget.Map = OpenLayers.Class(Fusion.Lib.EventMgr, {
_oDomObj : null,
_sDomObj : '',
_sMapname : '',
@@ -75,7 +72,6 @@
* construct a new view Fusion.Widget.Map class.
*/
initialize : function(widgetTag, mapGroup, widgetSet) {
- Object.inheritFrom(this, Fusion.Lib.EventMgr, []);
this.widgetTag = widgetTag;
var name = widgetTag.name;
@@ -822,7 +818,7 @@
//console.log('executefromcontextmenu');
widget.execute(this.contextMenuPosition.x, this.contextMenuPosition.y);
}
-};
+});
/****************************************************************************
* Class: Fusion.Widget.Map.Layer
@@ -830,11 +826,9 @@
* generic class for map layers. This class is primarily for legends.
* **********************************************************************/
Fusion.Event.LAYER_PROPERTY_CHANGED = Fusion.Event.lastEventId++;
-Fusion.Widget.Map.Layer = Class.create();
-Fusion.Widget.Map.Layer.prototype = {
+Fusion.Widget.Map.Layer = OpenLayers.Class(Fusion.Lib.EventMgr, {
name: null,
initialize: function(name) {
- Object.inheritFrom(this, Fusion.Lib.EventMgr, []);
this.name = name;
this.registerEventID(Fusion.Event.LAYER_PROPERTY_CHANGED);
},
@@ -843,7 +837,7 @@
this[property] = value;
this.triggerEvent(Fusion.Event.LAYER_PROPERTY_CHANGED, this);
}
-};
+});
/****************************************************************************
* Class: Fusion.Widget.Map.Group
@@ -851,13 +845,11 @@
* generic class for map layer groups. This class is primarily for legends.
* **********************************************************************/
Fusion.Event.GROUP_PROPERTY_CHANGED = Fusion.Event.lastEventId++;
-Fusion.Widget.Map.Group = Class.create();
-Fusion.Widget.Map.Group.prototype = {
+Fusion.Widget.Map.Group = OpenLayers.Class(Fusion.Lib.EventMgr, {
name: null,
groups: null,
layers: null,
initialize: function(name) {
- Object.inheritFrom(this, Fusion.Lib.EventMgr, []);
this.name = name;
this.groups = [];
this.layers = [];
@@ -925,7 +917,7 @@
}
return null;
}
-};
+});
/**
Modified: sandbox/olcore/lib/MenuBase.js
===================================================================
--- sandbox/olcore/lib/MenuBase.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/MenuBase.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -35,14 +35,6 @@
* constructor
*/
initialize : function() {
- /* overload enable/disable. Normal inheritance should
- * work but because we use inheritFrom, it doesn't overload
- * Widget's enable/disable functions. We do it manually
- * here.
- */
- this.enable = Fusion.Tool.MenuBase.prototype.enable;
- this.disable = Fusion.Tool.MenuBase.prototype.disable;
-
//console.log('Fusion.Tool.MenuBase.initialize');
var options = {};
options.imgPath = this.widgetTag.imageUrl;
Modified: sandbox/olcore/lib/RectTool.js
===================================================================
--- sandbox/olcore/lib/RectTool.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/RectTool.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -30,8 +30,7 @@
* through the doAction function.
* All classes should redifine the doAction function
* **********************************************************************/
-Fusion.Tool.Rectangle = Class.create();
-Fusion.Tool.Rectangle.prototype = {
+Fusion.Tool.Rectangle = OpenLayers.Class({
oRectDiv : null,
_sStartPos : null,
_bIsActive : null,
@@ -159,4 +158,4 @@
}
}
-};
+});
Modified: sandbox/olcore/lib/Search.js
===================================================================
--- sandbox/olcore/lib/Search.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/Search.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -38,9 +38,7 @@
*
* **********************************************************************/
-Fusion.Tool.Search = Class.create();
-
-Fusion.Tool.Search.prototype = {
+Fusion.Tool.Search = OpenLayers.Class({
lastSearch: null,
lastResult: null,
resultOffset: 0,
@@ -127,5 +125,5 @@
ur.y = ur.y + dY;
this.getMap().setExtents(new OpenLayers.Bounds(ll.x,ll.y,ur.x,ur.y));
}
-};
+});
Modified: sandbox/olcore/lib/Widget.js
===================================================================
--- sandbox/olcore/lib/Widget.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/Widget.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -33,8 +33,7 @@
Fusion.Event.WIDGET_STATE_CHANGED = Fusion.Event.lastEventId++;
-Fusion.Widget = Class.create();
-Fusion.Widget.prototype = {
+Fusion.Widget = OpenLayers.Class(Fusion.Lib.EventMgr, {
bIsMutuallyExclusive: null,
sName: null,
sType: null,
@@ -55,7 +54,6 @@
this.sType = widgetTag.type;
this.sName = widgetTag.name;
this.widgetTag = widgetTag;
- Object.inheritFrom(this, Fusion.Lib.EventMgr, []);
this.registerEventID(Fusion.Event.WIDGET_STATE_CHANGED);
var group = widgetTag.extension.Group ? widgetTag.extension.Group[0] : '';
@@ -165,4 +163,4 @@
registerParameter : function(param) {
this.paramRegister.push(param);
}
-};
+});
Modified: sandbox/olcore/lib/fusion.js
===================================================================
--- sandbox/olcore/lib/fusion.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/fusion.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -40,7 +40,7 @@
Fusion.useCompressed = false;
if (Fusion.useCompressed) {
- Fusion.coreScripts = ['lib/OpenLayers/OpenLayersCompressed.js',
+ Fusion.coreScripts = ['lib/OpenLayers/OpenLayers.js',
'jx/lib/jx_compressed.js',
'lib/fusion-compressed.js',
'lib/excanvas/excanvas-compressed.js'];
@@ -948,7 +948,7 @@
/* an array of eventIDs and associated listener functions */
events : null,
- initialize: function() { if (!this.events) {this.events = []; }},
+ //initialize: function() { if (!this.events) {this.events = []; }},
/**
* Method: destroy
@@ -969,6 +969,7 @@
Fusion.reportError(new Fusion.Error(Fusion.Error.WARNING,
OpenLayers.i18n('regsiterEventError')));
}
+ if (!this.events) {this.events = []; }
var ev = new String(eventID);
if (!this.events[eventID]) {
this.events[eventID] = [];
@@ -1043,10 +1044,3 @@
return true;
}
};
-
-Object.inheritFrom(Fusion, Fusion.Lib.EventMgr, []);
-
-Fusion.Event.FUSION_INITIALIZED = Fusion.Event.lastEventId++;
-Fusion.Event.FUSION_ERROR = Fusion.Event.lastEventId++;
-Fusion.registerEventID(Fusion.Event.FUSION_INITIALIZED);
-Fusion.registerEventID(Fusion.Event.FUSION_ERROR);
Modified: sandbox/olcore/lib/utils.js
===================================================================
--- sandbox/olcore/lib/utils.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/lib/utils.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -23,9 +23,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-var DomNode = Class.create();
-
-DomNode.prototype = {
+var DomNode = OpenLayers.Class({
initialize: function( xmlNode /*, parent */ ) {
this.textContent = '';
this.nodeName = xmlNode?xmlNode.nodeName:'';
@@ -203,7 +201,7 @@
return false;
}
}
-};
+});
var DomNodeFactory = {
create: function( name, value ) {
Modified: sandbox/olcore/templates/mapguide/standard/ApplicationDefinition.xml
===================================================================
--- sandbox/olcore/templates/mapguide/standard/ApplicationDefinition.xml 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/templates/mapguide/standard/ApplicationDefinition.xml 2008-03-27 19:52:31 UTC (rev 1347)
@@ -1003,7 +1003,7 @@
<Extension xsi:type="CustomContentType">
<MenuContainer>MapContextMenu</MenuContainer>
</Extension>
- <MapId>gmap-tiled</MapId>
+ <MapId>sheboygan</MapId>
</MapWidget>
<!-- OVERVIEW MAP -->
Modified: sandbox/olcore/widgets/Help.js
===================================================================
--- sandbox/olcore/widgets/Help.js 2008-03-27 19:19:01 UTC (rev 1346)
+++ sandbox/olcore/widgets/Help.js 2008-03-27 19:52:31 UTC (rev 1347)
@@ -30,8 +30,7 @@
*
* **********************************************************************/
-Fusion.Widget.Help = Class.create();
-Fusion.Widget.Help.prototype = {
+Fusion.Widget.Help = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, {
/* popup window initialization parameters */
sFeatures : 'menubar=no,location=no,resizable=no,status=no',
@@ -47,8 +46,8 @@
initialize : function(widgetTag) {
//console.log('Help.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.target = json.Target ? json.Target[0] : "HelpWindow";
@@ -79,4 +78,4 @@
}
}
}
-};
+});
More information about the fusion-commits
mailing list