Update to new WTFE URL and behaviour;
authorRichard Fairhurst <richard@systemeD.net>
Sun, 4 Dec 2011 12:16:09 +0000 (12:16 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Sun, 4 Dec 2011 12:16:09 +0000 (12:16 +0000)
make licence highlight colours darker to avoid confusion with NCN routes

net/systemeD/halcyon/connection/StatusFetcher.as
net/systemeD/potlatch2/options/OptionsDialog.mxml
potlatch2.mxml
resources/stylesheets/potlatch.css

index 25cf8ca..3b83fff 100644 (file)
@@ -60,12 +60,13 @@ package net.systemeD.halcyon.connection {
 
                                // **** Specific WTFE-parsing code starts here
                                // FIXME: should be generalised
-                               //              if all users are "yes" or "auto", status is 'ok' (green)
-                               //              if first user is "no", status is 'no' (red)
-                               //              if any other users are no, status is 'partial' (softer red)
-                               //              otherwise, status is 'unsure' (yellow)
+                               //              if all users are "yes" or "auto", status is 'ok' (3, green)
+                               //              if first user is "no", status is 'no' (0, red)
+                               //              if any other users are no, status is 'partial' (1, softer red)
+                               //              otherwise, status is 'unsure' (2, yellow)
                                var s:uint=3;   // ok
                                for each (var user:XML in exml.user) {
+                                       if (user.@severity=='harmless') continue;                                               // ignore if harmless
                                        if (user.@decision=='no' && user.@version=='first') { s=0; }    // no from v1
                                        else if (user.@decision=='no') { s=Math.min(s,1); }                             // no from later version
                                        else if (user.@decision=='undecided' || user.@decision=='anonymous') { s=Math.min(s,2); }       // unsure
index ab17648..2ab31fa 100644 (file)
@@ -54,7 +54,7 @@
                        conn.statusFetcher=null;
                        userState.setProperty("licence_status",false);
                } else {
-                       conn.statusFetcher=new StatusFetcher("http://wtfe.gryph.de/api/0.6/userlist",conn);
+                       conn.statusFetcher=new StatusFetcher("http://wtfe.gryph.de/api/0.6/problems",conn);
                        conn.statusFetcher.fetch(conn.getAllLoadedEntities());
                        userState.setProperty("licence_status",true);
                        // ** FIXME: needs to also switch map style
index fc3c224..32bb6d1 100644 (file)
                        conn.addEventListener(MapEvent.ERROR, onMapError);
                        conn.addEventListener(AttentionEvent.ATTENTION, onAttention);
                        conn.addEventListener(AttentionEvent.ALERT, onAlert);
-                       if (params['licence_status']) conn.statusFetcher=new StatusFetcher("http://wtfe.gryph.de/api/0.6/userlist",conn);
+                       if (params['licence_status']) conn.statusFetcher=new StatusFetcher("http://wtfe.gryph.de/api/0.6/problems",conn);
                        theMap.addLayer(conn, Stylesheets.instance().selected, false, true);
 
             // Auto-load vector backgrounds from config
index 88094fc..1598735 100644 (file)
@@ -20,9 +20,9 @@ way .area_small_name {text-color: black; font-size: 9; text: name; text-halo: #f
 
 /* Rendering for licence status */
 
-way[_status=no]::status       { z-index: 0; width: eval('_width+7'); color: red; }
-way[_status=partial]::status  { z-index: 0; width: eval('_width+7'); color: red; opacity: 0.4; }
-way[_status=unsure]::status   { z-index: 0; width: eval('_width+7'); color: orange; opacity: 0.4; }
-node[_status=no]::status      { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: red; }
-node[_status=partial]::status { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: red; opacity: 0.4; }
-node[_status=unsure]::status  { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: orange; opacity: 0.4; }
+way[_status=no]::status       { z-index: 0; width: eval('_width+7'); color: #AA0000; }
+way[_status=partial]::status  { z-index: 0; width: eval('_width+7'); color: #AA0000; opacity: 0.6; }
+way[_status=unsure]::status   { z-index: 0; width: eval('_width+7'); color: darkorange; opacity: 0.6; }
+node[_status=no]::status      { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: #AA0000; }
+node[_status=partial]::status { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: #AA0000; opacity: 0.6; }
+node[_status=unsure]::status  { z-index: 0; icon-image: square; icon-width: eval('_width+7'); color: darkorange; opacity: 0.6; }