diff --git a/embedded/task_next.svg b/embedded/task_next.svg
new file mode 100644
index 00000000..e58d92db
--- /dev/null
+++ b/embedded/task_next.svg
@@ -0,0 +1,104 @@
+
+
+
+
diff --git a/embedded/task_previous.svg b/embedded/task_previous.svg
new file mode 100644
index 00000000..37500b29
--- /dev/null
+++ b/embedded/task_previous.svg
@@ -0,0 +1,117 @@
+
+
+
+
diff --git a/net/systemeD/halcyon/connection/XMLConnection.as b/net/systemeD/halcyon/connection/XMLConnection.as
index f3c40e41..f54a49c8 100644
--- a/net/systemeD/halcyon/connection/XMLConnection.as
+++ b/net/systemeD/halcyon/connection/XMLConnection.as
@@ -81,12 +81,13 @@ package net.systemeD.halcyon.connection {
private function sendLoadRequest(request:URLRequest):void {
var mapLoader:URLLoader = new URLLoader();
- var errorHandler:Function = function(event:IOErrorEvent):void {
+ var errorHandler:Function = function(event:Event):void {
errorOnMapLoad(event, request);
}
mapLoader.addEventListener(Event.COMPLETE, loadedMap);
mapLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
mapLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, mapLoadStatus);
+ mapLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
request.requestHeaders.push(new URLRequestHeader("X-Error-Format", "XML"));
mapLoader.load(request);
dispatchEvent(new Event(LOAD_STARTED));
diff --git a/net/systemeD/potlatch2/EditController.as b/net/systemeD/potlatch2/EditController.as
index cc46dfa3..04b46fc7 100644
--- a/net/systemeD/potlatch2/EditController.as
+++ b/net/systemeD/potlatch2/EditController.as
@@ -18,6 +18,8 @@ package net.systemeD.potlatch2 {
import flash.system.Capabilities;
import flash.text.TextField;
import mx.controls.TextArea;
+ import mx.controls.TextInput;
+ import spark.components.RichEditableText;
/** Controller for the main map editing window itself. The logic that responds to mouse and keyboard events is all
* buried in various ControllerState classes. */
@@ -119,7 +121,7 @@ package net.systemeD.potlatch2 {
}
private function keyDownHandler(event:KeyboardEvent):void {
- if ((event.target is TextField) || (event.target is TextArea)) {
+ if ((event.target is TextField) || (event.target is TextArea) || (event.target is TextInput) || (event.target is RichEditableText)) {
keys[event.keyCode]=new Date().getTime();
return;
}
@@ -128,7 +130,7 @@ package net.systemeD.potlatch2 {
}
private function keyUpHandler(event:KeyboardEvent):void {
- if ((event.target is TextField) || (event.target is TextArea)) return;
+ if ((event.target is TextField) || (event.target is TextArea) || (event.target is TextInput) || (event.target is RichEditableText)) return;
if (event.keyCode==Keyboard.SPACE) spaceHeld=false;
if (keys[event.keyCode] && new Date().getTime()-keys[event.keyCode]<300) return;
delete keys[event.keyCode];
diff --git a/net/systemeD/potlatch2/TasksPalette.mxml b/net/systemeD/potlatch2/TasksPalette.mxml
new file mode 100644
index 00000000..abb3ccb7
--- /dev/null
+++ b/net/systemeD/potlatch2/TasksPalette.mxml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+ 0); }
+ public function updateText():void {
+ taskDescription.text=tasks[taskNumber].text || "("+taskNumber+" of "+tasks.length()+")";
+ controller.map.moveMapFromLatLon(tasks[taskNumber].lat, tasks[taskNumber].lon);
+ }
+
+ public function previousTask():void {
+ taskNumber = (taskNumber==0) ? tasks.length-1 : taskNumber-1;
+ updateText();
+ }
+ public function nextTask():void {
+ taskNumber += 1;
+ if (taskNumber==tasks.length) taskNumber=0;
+ updateText();
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+ super.titleBar.addEventListener(MouseEvent.MOUSE_DOWN,handleDown);
+ }
+
+ private function handleDown(e:Event):void {
+ this.startDrag();
+ stage.addEventListener(MouseEvent.MOUSE_UP,handleUp);
+ }
+
+ private function handleUp(e:Event):void {
+ this.stopDrag();
+ stage.removeEventListener(MouseEvent.MOUSE_UP,handleUp);
+ }
+
+ public function toggle():void { this.visible=!this.visible; }
+
+ ]]>
+
+
diff --git a/net/systemeD/potlatch2/dialogs/TasksDialog.mxml b/net/systemeD/potlatch2/dialogs/TasksDialog.mxml
new file mode 100644
index 00000000..efa828ff
--- /dev/null
+++ b/net/systemeD/potlatch2/dialogs/TasksDialog.mxml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/potlatch2.mxml b/potlatch2.mxml
index 36dac008..d52e7159 100644
--- a/potlatch2.mxml
+++ b/potlatch2.mxml
@@ -62,6 +62,7 @@
+
@@ -458,6 +459,14 @@
var rhCP:Point=rhContent.localToGlobal(new Point(0,0)); // stage co-ordinates of right-hand content area
return rhCP.y + theMap.scrollRect.height - toolbox.height - 5 - yOffset;
}
+ public function suggestTasksPaletteX():int {
+ var rhCP:Point=rhContent.localToGlobal(new Point(0,0));
+ return rhCP.x + 5;
+ }
+ public function suggestTasksPaletteY():int {
+ var rhCP:Point=rhContent.localToGlobal(new Point(0,0));
+ return rhCP.y + theMap.scrollRect.height - 55;
+ }
private function disableMapMouse():void {
map_area.mouseChildren=false;
diff --git a/resources/potlatch2.html b/resources/potlatch2.html
index 08080648..b1cae651 100644
--- a/resources/potlatch2.html
+++ b/resources/potlatch2.html
@@ -68,7 +68,7 @@
args["serverName"] = "api06 Test On Dev";
args["show_help"] = "once";
args["site_name"] = "OpenStreetMap";
- args["force_auth"] = "force";
+// args["force_auth"] = "force";
args["locale"] = 'en_US'; // you can enjoy de_DE, pl_PL, fr_FR, ja_JP, id_ID, en_GB
var params = false;
diff --git a/styles/Application.css b/styles/Application.css
index 5721e22e..b97ba8ee 100644
--- a/styles/Application.css
+++ b/styles/Application.css
@@ -300,7 +300,7 @@ s|FormItem {
/* Toolbox */
-.theToolBox {
+.tasksPalette,.theToolBox {
headerColors: haloBlue, #6495ED;
headerAlphas: 1,1;
headerHeight: 6;