copying data source display names to WeaveJS.as

Change-Id: I97804844b01c269755f768b6e02d4ad3ba20a211

--- WeaveJS/src/WeaveJS.as
+++ WeaveJS/src/WeaveJS.as
@@ -88,14 +88,14 @@
 			//TODO - traverse weavejs namespace and register all classes with all their interfaces
 			var IDataSource_File:Class = IDataSource;
 			var IDataSource_Service:Class = IDataSource;
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_File, CSVDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_File, DBFDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_File, GeoJSONDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_Service, WeaveDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_Service, CKANDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource_Service, CensusDataSource);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, ForeignDataMappingTransform);
-			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, GroupedDataTransform);
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, CSVDataSource, "CSV file / Delimited text");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, DBFDataSource, "SHP/DBF files");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, GeoJSONDataSource, "GeoJSON file");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, WeaveDataSource, "Weave server");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, CKANDataSource, "CKAN server");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, CensusDataSource, "Census.gov");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, ForeignDataMappingTransform, "Foreign data mapping");
+			WeaveAPI.ClassRegistry.registerImplementation(IDataSource, GroupedDataTransform, "Grouped data transform");

 			Weave.registerClass("ExtendedFillStyle", SolidFillStyle);
 			Weave.registerClass("ExtendedLineStyle", SolidLineStyle);


Apply Jamie's fix for negative numbers here on the actionscript side, too.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5607 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/StringUtil.as
+++ src/as/com/threerings/util/StringUtil.as
@@ -154,7 +154,8 @@
         }

         // hackily add commas
-        while (s.length > 3) {
+        var prefixLength :int = (n < 0) ? 1 : 0;
+        while (s.length - prefixLength > 3) {
             postfix = "," + s.substring(s.length - 3) + postfix;
             s = s.substring(0, s.length - 3);
         }


fix for ExportMenu shown property.

fix for ExportMenu shown property.

--- WeaveUI/src/weave/menus/ExportMenu.as
+++ WeaveUI/src/weave/menus/ExportMenu.as
@@ -26,7 +26,7 @@
 		public function ExportMenu()
 		{
 			super({
-				shown: function():Boolean { return shown; },
+				shown: function():Boolean { return ExportMenu.shown; },
 				label: lang("Weave 2.0"),
 				children: [
 					{


Remove self-disabling based on User-Agent.

This doesn't work across domains. (It causes a Flash exception that
disables the proxy for everyone.) It's going to be replaced with a bit
of JavaScript in the page itself that does the same check.

--- swfcat.as
+++ swfcat.as
@@ -135,55 +135,11 @@
                 return default_addr;
         }

-        /* Are circumstances such that we should self-disable and not be a
-           proxy? We take a best-effort guess as to whether this device runs on
-           a battery or the data transfer might be expensive.
-
-           Matching mobile User-Agents is complex; but we only need to match
-           those devices that can also run a recent version of Adobe Flash,
-           which is a subset of this list:
-           https://secure.wikimedia.org/wikipedia/en/wiki/Adobe_Flash_Player#Mobile_operating_systems
-
-           Other resources:
-           http://www.zytrax.com/tech/web/mobile_ids.html
-           http://googlewebmastercentral.blogspot.com/2011/03/mo-better-to-also-detect-mobile-user.html
-           http://search.cpan.org/~cmanley/Mobile-UserAgent-1.05/lib/Mobile/UserAgent.pm
-        */
-        private function should_disable():Boolean
-        {
-            var ua:String;
-
-            ua = ExternalInterface.call("window.navigator.userAgent.toString");
-            if (ua != null) {
-                const UA_LIST:Array = [
-                    /\bmobile\b/i,
-                    /\bandroid\b/i,
-                    /\bopera mobi\b/i,
-                ];
-
-                for (var i:uint = 0; i < UA_LIST.length; i++) {
-                    var re:RegExp = UA_LIST[i];
-
-                    if (ua.match(re)) {
-                        puts("Disabling because User-Agent matched " + re + ".");
-                        return true;
-                    }
-                }
-            }
-
-            return false;
-        }
-
         /* The main logic begins here, after start-up issues are taken care of. */
         private function proxy_main():void
         {
             var fac_url:String;
             var loader:URLLoader;
-
-            if (should_disable()) {
-                puts("Disabling self.");
-                return;
-            }

             if (proxy_pairs.length >= MAX_NUM_PROXY_PAIRS) {
                 setTimeout(proxy_main, FACILITATOR_POLL_INTERVAL);