Merged master script to one
authorEugene Ostroukhov <eugeneo@symbian.org>
Mon, 17 May 2010 15:31:00 -0700
changeset 336 131c321bf080
parent 335 af8f80553198
child 337 afe6a53c0ed4
Merged master script to one
org.symbian.tools.wrttools.previewer/preview/data/location_data.js
org.symbian.tools.wrttools.previewer/preview/data/mediaManagement_data.js
org.symbian.tools.wrttools.previewer/preview/script/lib/loader.js
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/handlers/MasterScriptProvider.java
--- a/org.symbian.tools.wrttools.previewer/preview/data/location_data.js	Mon May 17 15:23:08 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/data/location_data.js	Mon May 17 15:31:00 2010 -0700
@@ -22,7 +22,7 @@
 			"Longitude":77.694589331833,
 			"Latitude":12.942209068513,
 			"Altitude":836.5
-		}
+		};
 		
 var data_genericLocationInfo = {
 			"Longitude":77.694546416505,
--- a/org.symbian.tools.wrttools.previewer/preview/data/mediaManagement_data.js	Mon May 17 15:23:08 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/data/mediaManagement_data.js	Mon May 17 15:31:00 2010 -0700
@@ -124,7 +124,7 @@
 		"MimeType":"audio/mpeg",
 		"MediaType":1,
 		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
-		"FileSize":1002794,
+		"FileSize":1002794
 	},{
 		"FileNameAndPath": "E:\\Sounds\\Simple\\Rooster.mp3",
 		"Type": "Media",
@@ -134,7 +134,7 @@
 		"MimeType": "audio/mpeg",
 		"MediaType": 1,
 		"FileDate": "Friday, 13 February, 2009 12:01:24 am",
-		"FileSize": 911000,
+		"FileSize": 911000
 	
 	}];
 	var image_data = [{
--- a/org.symbian.tools.wrttools.previewer/preview/script/lib/loader.js	Mon May 17 15:23:08 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/script/lib/loader.js	Mon May 17 15:31:00 2010 -0700
@@ -61,7 +61,7 @@
 					obj["e" + type + fn] = fn;
 					obj[type + fn] = function(){
 						obj["e" + type + fn](window.event);
-					}
+					};
 					obj.attachEvent("on" + type, obj[type + fn]);
 				}
 		},
@@ -97,15 +97,11 @@
 		if ((typeof wrtVersion == 'undefined') || (wrtVersion == 'WRT 1.1')) {
 			_BRIDGE_REF.nokia.version = 'WRT 1.1';
 			_BRIDGE_REF.nokia.helper.setPreference('__SYM_WRT_VERSION', 'WRT 1.1');
-			_BRIDGE_REF.helper.loadScript("preview/script/lib/device.js");
 		}
 		else {
 			_BRIDGE_REF.nokia.version = 'WRT 1.0';
 		}
 	}
-	else {
-		_BRIDGE_REF.helper.loadScript("preview/script/lib/device.js");
-	}
 
 	/*
 	 window native functions over-riding
@@ -123,7 +119,7 @@
 		
 		//	prompt
 		window.prompt = function(msg, str){
-			return window.parent.prompt(msg, str)
+			return window.parent.prompt(msg, str);
 		};
 	}
 
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/handlers/MasterScriptProvider.java	Mon May 17 15:23:08 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/handlers/MasterScriptProvider.java	Mon May 17 15:31:00 2010 -0700
@@ -53,23 +53,13 @@
 
     public InputStream getResourceStream(IProject project, IPath resource, Map<String, String[]> parameters)
             throws IOException, CoreException {
-        if (resource.equals(new Path(PATH_LOADER_JS))) {
-            synchronized (this) {
-                if (WRT10 == null) {
-                    loadCoreAPI();
-                }
+        synchronized (this) {
+            if (WRT10 == null) {
+                loadCoreAPI();
+                loadWRT11Services();
             }
-            return new ByteArrayInputStream((WRT10).getBytes("utf8"));
-        } else if (resource.equals(new Path(PATH_DEVICE_JS))) {
-            synchronized (this) {
-                if (WRT11_SERVICES == null) {
-                    loadWRT11Services();
-                }
-            }
-            return new ByteArrayInputStream((WRT11_SERVICES).getBytes("utf8"));
-        } else {
-            return null;
         }
+        return new ByteArrayInputStream((WRT10 + WRT11_SERVICES).getBytes("utf8"));
     }
 
     private void load(String base, String jsfile, StringBuilder builder) throws IOException {