move the save button to the left where new users expect it to be
authorSteveC <steve@asklater.com>
Wed, 7 Sep 2011 22:08:50 +0000 (15:08 -0700)
committerSteveC <steve@asklater.com>
Wed, 7 Sep 2011 22:08:50 +0000 (15:08 -0700)
build.xml
potlatch2.mxml
resources/potlatch2.html
resources/server.rb [changed mode: 0644->0755]

index 19b91a5..aa58536 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,4 +1,4 @@
-<project name="Potlatch2 ├╝ber compile system" default="debug">
+<project name="Potlatch 2" default="debug">
 
   <!-- load properties from the environment -->
   <property environment="env" />
@@ -45,7 +45,7 @@
   </target>
 
   <!-- Build and output potlatch2.swf in release mode -->
-  <target name="release" depends="init">
+  <target name="release" depends="init"> <!-- FIXME convention is dist not release -->
     <mxmlc file="potlatch2.mxml">
       <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
       <source-path path-element="${FLEX_HOME}/frameworks"/>
     <deployLocale locale="pl_PL" />
   </target>
 
+
+  <target name="clean"
+    description="clean up" >
+    <!-- Delete the ${build} and ${dist} directory trees -->
+    <!--
+
+    FIXME what is supposed to be cleaned?
+
+    <delete dir="${build}"/>
+    <delete dir="${dist}"/>
+
+    -->
+  </target>
+
+
 </project>
index c02febf..c0663bc 100644 (file)
@@ -28,6 +28,8 @@
     <mx:WipeRight id="wipeIn" duration="250"/>
 
     <mx:ApplicationControlBar dock="true">
+        <mx:Button label="Save" icon="@Embed('embedded/upload.svg')" disabledIcon="@Embed('embedded/upload_disabled.svg')" styleName="appBarButton"
+                       click="SaveManager.saveChanges(theMap.editableLayer.connection);" id="saveButton" enabled="false"/>
         <mx:PopUpButton id="bgButton" label="Background" openAlways="true" styleName="appBarButton"
             creationComplete="bgButton.popUp = new BackgroundSelector();"/>
         <mx:PopUpButton id="styleButton" label="Map Style" openAlways="true" styleName="appBarButton"
@@ -56,8 +58,6 @@
         <mx:Spacer width="100%"/>
         <mx:Button id="helpButton" label="Help" click="new HelpDialog().init();" styleName="appBarButton" />
         <mx:Button id="optionsButton" label="Options" click="new OptionsDialog().init();" styleName="appBarButton" />
-        <mx:Button label="Save" icon="@Embed('embedded/upload.svg')" disabledIcon="@Embed('embedded/upload_disabled.svg')" styleName="appBarButton"
-                       click="SaveManager.saveChanges(theMap.editableLayer.connection);" id="saveButton" enabled="false"/>
     </mx:ApplicationControlBar>
     
     <mx:HDividedBox width="100%" height="100%">
index cb1f0a9..801b38d 100644 (file)
@@ -1,93 +1,90 @@
 <html>
+  <!-- Potlatch 2 script -->
+  <head>
+    <title>Potlatch Two</title>
+    <script type="text/javascript" src="swfobject.js"></script>
+
+    <script>
+      function getArgs() {
+        var args = new Object();
+        var query = location.search.substring(1);
+        var pairs = query.split("&");
+        for(var i = 0; i < pairs.length; i++) {
+          var pos = pairs[i].indexOf('=');
+          if (pos == -1) continue;
+          var argname = pairs[i].substring(0,pos);
+          var value = pairs[i].substring(pos+1);
+          args[argname] = unescape(value);
+        }
+        return args;
+      }
+
+      var changesaved=true;
 
-<!-- Potlatch 2 script -->
-
-<head>
-<title>Potlatch TWO</title>
-<script type="text/javascript" src="swfobject.js"></script>
-
-<script>
-       function getArgs() {
-               var args = new Object();
-               var query = location.search.substring(1);
-               var pairs = query.split("&");
-               for(var i = 0; i < pairs.length; i++) {
-                       var pos = pairs[i].indexOf('=');
-                       if (pos == -1) continue;
-                       var argname = pairs[i].substring(0,pos);
-                       var value = pairs[i].substring(pos+1);
-                       args[argname] = unescape(value);
-               }
-               return args;
-       }
-
-    var changesaved=true;
-  
-    window.onbeforeunload=function() {
+      window.onbeforeunload=function() {
         if (!changesaved) {
-            return 'You have unsaved changes. You need to press the Save button to save them';
+          return 'You have unsaved changes. You need to press the Save button to save them';
         }
-    }
-
-    function markChanged(a) { changesaved=a; } /* called from flash */
-
-       var attributes = {
-               id: "map",
-               name: "map"
-       };
-
-       
-       var args = getArgs();
-       var lat;
-       var lon;
-       var zoom;
-       if (args.lat && args.lon) {
-               lat = parseFloat(args.lat);
-               lon = parseFloat(args.lon);
-       } else {
-               lat=51.875;
-               lon=-1.492;
-               args["lat"] = lat;
-               args["lon"] = lon;
-       }
-
-       if (args.zoom) {
-               zoom = parseInt(args.zoom);
-       } else {
-               zoom = 16;
-               args["zoom"] = 16;
-       }
-
-                       args["api"] = "http://api06.dev.openstreetmap.org/api/0.6/";
-                       args["policy"] = "http://api06.dev.openstreetmap.org/api/crossdomain.xml";
-                       args["connection"] = "XML";
-                       args["oauth_policy"] = "http://api06.dev.openstreetmap.org/oauth/crossdomain.xml";
-                       args["oauth_request_url"] = "http://api06.dev.openstreetmap.org/oauth/request_token";
-                       args["oauth_access_url"] = "http://api06.dev.openstreetmap.org/oauth/access_token";
-                       args["oauth_auth_url"] = "http://api06.dev.openstreetmap.org/oauth/authorize";
-                       args["oauth_consumer_key"] = "fiM1IoqnKJk4JCfcl63DA";
-                       args["oauth_consumer_secret"] = "7fYgJK9M4vB1CvBZ6jEsPGxYK9UD1hEnI6NqTxNGs";
-                       args["serverName"] = "api06 Test On Dev";
-               args["show_help"] = "once";
-               args["site_name"] = "OpenStreetMap";
-               args["force_auth"] = "force";
-       
-       var params = false;
-       
-       swfobject.embedSWF("potlatch2.swf?d="+Math.round(Math.random()*1000), "mapHolder", "100%", "100%", "9.0.0", "expressInstall.swf", args, params, attributes);
-</script>
-
-
-</head>
-
-<body>
-
-<div id="mapHolder" style="width:100%; height: 100%; border: 1px solid black">
-       If you see this message you need to install Flash Play 9.0 or above, from Adobe, <a href="http://get.adobe.com/flashplayer/" target="_blank">available here</a> in order to use Potlatch 2
-</div>
-
-
-
-</body>
+      }
+
+      function markChanged(a) { changesaved=a; } /* called from flash */
+
+      var attributes = {
+        id: "map",
+        name: "map"
+      };
+
+
+      var args = getArgs();
+      var lat;
+      var lon;
+      var zoom;
+      if (args.lat && args.lon) {
+        lat = parseFloat(args.lat);
+        lon = parseFloat(args.lon);
+        } else {
+        lat=51.875;
+        lon=-1.492;
+        args["lat"] = lat;
+        args["lon"] = lon;
+      }
+
+      if (args.zoom) {
+        zoom = parseInt(args.zoom);
+        } else {
+        zoom = 16;
+        args["zoom"] = 16;
+      }
+
+      args["api"] = "http://api06.dev.openstreetmap.org/api/0.6/";
+      args["policy"] = "http://api06.dev.openstreetmap.org/api/crossdomain.xml";
+      args["connection"] = "XML";
+      args["oauth_policy"] = "http://api06.dev.openstreetmap.org/oauth/crossdomain.xml";
+      args["oauth_request_url"] = "http://api06.dev.openstreetmap.org/oauth/request_token";
+      args["oauth_access_url"] = "http://api06.dev.openstreetmap.org/oauth/access_token";
+      args["oauth_auth_url"] = "http://api06.dev.openstreetmap.org/oauth/authorize";
+      args["oauth_consumer_key"] = "fiM1IoqnKJk4JCfcl63DA";
+      args["oauth_consumer_secret"] = "7fYgJK9M4vB1CvBZ6jEsPGxYK9UD1hEnI6NqTxNGs";
+      args["serverName"] = "api06 Test On Dev";
+      args["show_help"] = "once";
+      args["site_name"] = "OpenStreetMap";
+      args["force_auth"] = "force";
+
+      var params = false;
+
+      swfobject.embedSWF("potlatch2.swf?d="+Math.round(Math.random()*1000), "mapHolder", "100%", "100%", "9.0.0", "expressInstall.swf", args, params, attributes);
+    </script>
+
+
+  </head>
+
+  <body>
+
+    <div id="mapHolder" style="width:100%; height: 100%; border: 1px solid black">
+      If you see this message you need to install Flash Play 9.0 or above, from Adobe, <a href="http://get.adobe.com/flashplayer/" target="_blank">available here</a> in order to use Potlatch 2
+    </div>
+
+
+  </body>
 </html>
 
old mode 100644 (file)
new mode 100755 (executable)