Changeset 7675
- Timestamp:
- 08/01/08 18:21:50 (4 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Ajax.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Console.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Format.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Format/WFS.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Layer/GML.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/Vector.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Layer/WFS.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Util.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Ajax.js
r7346 r7675 39 39 */ 40 40 OpenLayers.nullHandler = function(request) { 41 alert(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText}));41 OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText})); 42 42 }; 43 43 … … 56 56 * will be called with this set to caller and will receive the request 57 57 * object as an argument. Note that if you do not specify an onComplete 58 * function, <OpenLayers.nullHandler> will be called (which pops up a n59 * alertdialog).58 * function, <OpenLayers.nullHandler> will be called (which pops up a 59 * user friendly error message dialog). 60 60 * onFailure - {Function} Optional callback for failure. In the event of 61 61 * a failure, the callback will be called with this set to caller and will 62 62 * receive the request object as an argument. Note that if you do not 63 63 * specify an onComplete function, <OpenLayers.nullHandler> will be called 64 * (which pops up a n alertdialog).64 * (which pops up a user friendly error message dialog). 65 65 * 66 66 * Returns: trunk/openlayers/lib/OpenLayers/Console.js
r7627 r7675 87 87 */ 88 88 error: function() {}, 89 90 /** 91 * APIFunction: userError 92 * A single interface for showing error messages to the user. The default 93 * behavior is a Javascript alert, though this can be overridden by 94 * reassigning OpenLayers.Console.userError to a different function. 95 * 96 * Expects a single error message 97 * 98 * Parameters: 99 * object - {Object} 100 */ 101 userError: function(error) { 102 alert(error); 103 }, 89 104 90 105 /** trunk/openlayers/lib/OpenLayers/Control.js
r6833 r7675 44 44 * > 45 45 * > notice: function (bounds) { 46 * > alert(bounds);46 * > OpenLayers.Console.userError(bounds); 47 47 * > } 48 48 * > }); trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js
r7627 r7675 498 498 if(this.map.getUnits() != 'degrees') { 499 499 if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) { 500 alert(OpenLayers.i18n("sameProjection"));500 OpenLayers.Console.userError(OpenLayers.i18n("sameProjection")); 501 501 } 502 502 } trunk/openlayers/lib/OpenLayers/Format.js
r6313 r7675 69 69 */ 70 70 read: function(data) { 71 alert(OpenLayers.i18n("readNotImplemented"));71 OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented")); 72 72 }, 73 73 … … 83 83 */ 84 84 write: function(object) { 85 alert(OpenLayers.i18n("writeNotImplemented"));85 OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented")); 86 86 }, 87 87 trunk/openlayers/lib/OpenLayers/Format/WFS.js
r6381 r7675 130 130 */ 131 131 update: function(feature) { 132 if (!feature.fid) { alert(OpenLayers.i18n("noFID")); }132 if (!feature.fid) { OpenLayers.Console.userError(OpenLayers.i18n("noFID")); } 133 133 var updateNode = this.createElementNS(this.wfsns, 'wfs:Update'); 134 134 updateNode.setAttribute("typeName", this.layerName); … … 187 187 remove: function(feature) { 188 188 if (!feature.fid) { 189 alert(OpenLayers.i18n("noFID"));189 OpenLayers.Console.userError(OpenLayers.i18n("noFID")); 190 190 return false; 191 191 } trunk/openlayers/lib/OpenLayers/Layer/GML.js
r7339 r7675 163 163 */ 164 164 requestFailure: function(request) { 165 alert(OpenLayers.i18n("errorLoadingGML", {'url':this.url}));165 OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML", {'url':this.url})); 166 166 this.events.triggerEvent("loadend"); 167 167 }, trunk/openlayers/lib/OpenLayers/Layer/Vector.js
r7652 r7675 110 110 /** 111 111 * APIProperty: reportError 112 * {Boolean} report error message via alert() when loading of renderers112 * {Boolean} report friendly error message when loading of renderer 113 113 * fails. 114 114 */ … … 272 272 displayError: function() { 273 273 if (this.reportError) { 274 alert(OpenLayers.i18n("browserNotSupported",274 OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported", 275 275 {'renderers':this.renderers.join("\n")})); 276 276 } trunk/openlayers/lib/OpenLayers/Layer/WFS.js
r7417 r7675 512 512 */ 513 513 commitReport: function(string, response) { 514 alert(string);514 OpenLayers.Console.userError(string); 515 515 }, 516 516 trunk/openlayers/lib/OpenLayers/Util.js
r7627 r7675 1142 1142 for(var key in urlObj1) { 1143 1143 if (options.test) { 1144 alert(key + "\n1:" + urlObj1[key] + "\n2:" + urlObj2[key]);1144 OpenLayers.Console.userError(key + "\n1:" + urlObj1[key] + "\n2:" + urlObj2[key]); 1145 1145 } 1146 1146 var val1 = urlObj1[key];
