bug fix; version up 42/15342/1
authorziv.chang <ziv.chang@intel.com>
Mon, 20 Jan 2014 03:05:39 +0000 (11:05 +0800)
committerziv.chang <ziv.chang@intel.com>
Mon, 20 Jan 2014 03:05:39 +0000 (11:05 +0800)
Resolved that starting web simulator, three times pages switchings occured.
When device is ivi, hide HWKeys

Change-Id: I368646587cde9c0d90375a87fb046d78c1d6be56
Signed-off-by: ziv.chang <ziv.chang@intel.com>
package/changelog
package/pkginfo.manifest
web/cache.manifest
web/ripple.js

index 38fd3ca..e707ec4 100644 (file)
@@ -1,3 +1,8 @@
+* 2.0.27
+- bug fix
+- resolved that starting web simulator, three times pages switchings occured.
+- when device is ivi, hide HWKeys
+== ziv.chang <ziv.chang@intel.com> 2014-01-20 11:00
 * 2.0.26
 - bug fix
 == ziv.chang <ziv.chang@intel.com> 2014-01-16 10:40
index bc76d72..f4da0fa 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.26
+Version:2.0.27
 Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
 
 Package:websimulator-core
index 7ba6c39..5d9425e 100644 (file)
@@ -97,4 +97,4 @@ themes/light/images/ui-icons_454545_256x240.png
 themes/light/images/ui-icons_888888_256x240.png
 themes/light/images/ui-icons_cd0a0a_256x240.png
 themes/light/theme.css
-# Manifest build date: Thu Jan 16 2014 10:33:05 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Mon Jan 20 2014 11:00:23 GMT+0800 (CST)
\ No newline at end of file
index 4fb5623..a811a80 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Thu Jan 16 2014 10:33:05 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Mon Jan 20 2014 11:00:22 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -139461,6 +139461,30 @@ function _getPlatform() {
     return require('ripple/platform/' + _current.name + "/" + _current.version + "/spec");
 }
 
+function _getCurrentPlatform() {
+    var uriParams, platform = {};
+
+    uriParams = utils.getURIParams(document.documentURI);
+    if (uriParams && uriParams.platform) {
+        var platformName = uriParams.platform.split("-")[0], platformVersion;
+
+        if (platformName === "mobile" || platformName === "tizen") {
+            platformName = "tizen";
+            platformVersion = "2.0";
+        }
+        else {
+            platformName = "ivi";
+            platformVersion = "3.0";
+        }
+        platform.name = platformName;
+        platform.version = platformVersion;
+
+        return platform;
+    }
+
+    return undefined;
+}
+
 _self = {
     initialize: function () {
         var firstAvailablePlatform = utils.map(this.getList(), function (platform) {
@@ -139469,8 +139493,10 @@ _self = {
             })[0];
         })[0];
 
-        _current = _getRequestedPlatform() || db.retrieveObject("api-key") || firstAvailablePlatform;
+        _current = _getRequestedPlatform() || _getCurrentPlatform() ||
+                db.retrieveObject("api-key") || firstAvailablePlatform;
         _current = _validatePlatform(_current, firstAvailablePlatform);
+
         db.saveObject("api-key", _current);
 
         _console.prefix = _current.name;
@@ -141953,6 +141979,8 @@ function _showConfigWindow() {
 
         jQuery("#item_container :nth-child(2)").hide();
         jQuery("#item_container :nth-child(3)").hide();
+
+        jQuery("#hwkeys-panel").hide();
     }
     else {
         jQuery("#configuration-window-save-btn").show();
@@ -141960,6 +141988,8 @@ function _showConfigWindow() {
 
         jQuery("#item_container :nth-child(2)").show();
         jQuery("#item_container :nth-child(3)").show();
+
+        jQuery("#hwkeys-panel").show();
     }
 }
 
@@ -145578,6 +145608,7 @@ define('ripple/ui/plugins/omnibar', function (require, exports, module) {
 var emulatorBridge = require('ripple/emulatorBridge'),
     platform = require('ripple/platform'),
     db = require('ripple/db'),
+    utils = require('ripple/utils'),
     devices = require('ripple/devices'),
     constants = require('ripple/constants'),
     _event = require('ripple/event'),
@@ -145716,16 +145747,6 @@ _event.on("FrameHistoryChange", function (url) {
     _persistRoot(url);
 });
 
-function _getUrlParams(url) {
-    var params = {};
-
-    url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str, key, value) {
-        params[key] = value;
-    });
-
-    return params;
-}
-
 module.exports = {
     initialize: function () {
         var omnibar = _omnibar(), loc, tmp,
@@ -145740,37 +145761,7 @@ module.exports = {
 
         $(".omni-bar").show();
 
-        uriParams = _getUrlParams(document.documentURI);
-        if (uriParams.platform !== undefined) {
-            platformName = uriParams.platform.split("-")[0];
-
-            if (platformName === "mobile" || platformName === "tizen") {
-                platformName = "tizen";
-                platformVersion = "2.0";
-            }
-            else {
-                platformName = "ivi";
-                platformVersion = "3.0";
-            }
-
-            if (platform.current().id !== platformName) {
-                deviceId = devices.getCurrentDevice().id;
-                if (deviceId == "CUSTOM") {
-                    deviceId = "custom";
-                }
-
-                platform.changeEnvironment({
-                    "name": platformName,
-                    "version": platformVersion
-                }, deviceId, function () {
-                    window.tinyHipposReload = true;
-                    newUrl = location.href.replace(/&platform=(.+?)-(.+?)$/, "&platform=" + platformName + "-" + platformVersion);
-                    location.href = newUrl;
-                    //location.reload();
-                });
-            }
-        }
-
+        uriParams = utils.getURIParams(document.documentURI);
         if (uriParams.url !== undefined) {
             url = uriParams.url;
             if (url.match(/^\.[\.]?/) !== null) {
@@ -146532,6 +146523,8 @@ function _updatePlatformDeviceSelect(platformID, currentDeviceKey) {
 
         jQuery("#item_container :nth-child(2)").hide();
         jQuery("#item_container :nth-child(3)").hide();
+
+        jQuery("#hwkeys-panel").hide();
     }
     else {
         jQuery("#configuration-window-save-btn").show();
@@ -146539,6 +146532,8 @@ function _updatePlatformDeviceSelect(platformID, currentDeviceKey) {
 
         jQuery("#item_container :nth-child(2)").show();
         jQuery("#item_container :nth-child(3)").show();
+
+        jQuery("#hwkeys-panel").show();
     }
 }
 
@@ -150885,26 +150880,26 @@ self = module.exports = {
     },
 
     navHelper: function () {
-        return {\r
-            getHeading: function (lat1, lon1, lat2, lon2) {\r
+        return {
+            getHeading: function (lat1, lon1, lat2, lon2) {
                 var dLon = this.rad(lon2 - lon1),
                     llat1 = this.rad(lat1),
                     llat2 = this.rad(lat2),
                     y = Math.sin(dLon) * Math.cos(llat2),
                     x = Math.cos(llat1) * Math.sin(llat2) - Math.sin(llat1) * Math.cos(llat2) * Math.cos(dLon);
-                return (this.deg(Math.atan2(y, x)) + 360) % 360;\r
+                return (this.deg(Math.atan2(y, x)) + 360) % 360;
             },
 
-            getDistance: function (lat1, lon1, lat2, lon2) {\r
+            getDistance: function (lat1, lon1, lat2, lon2) {
                 var dLat = this.rad(lat2 - lat1),
                     dLon = this.rad(lon2 - lon1),
                     a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(this.rad(lat1)) * Math.cos(this.rad(lat2)) * Math.sin(dLon / 2) * Math.sin(dLon / 2),
                     c = 2 * Math.asin(Math.sqrt(a)),
                     d = 6378100 * c;
-                return d;\r
+                return d;
             },
 
-            simulateTravel: function (lat, lon, hdg, dist) {\r
+            simulateTravel: function (lat, lon, hdg, dist) {
                 var lat1 = this.rad(lat),
                     lon1 = this.rad(lon),
                     brng = this.rad(hdg),
@@ -150913,20 +150908,30 @@ self = module.exports = {
                     lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(angularDistance) * Math.cos(lat1), Math.cos(angularDistance) - Math.sin(lat1) * Math.sin(lat2));
                 lon2 = (lon2 + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // Normalise to -180..+180
 
-                return {\r
-                    latitude: this.deg(lat2),\r
-                    longitude: this.deg(lon2)\r
-                };\r
+                return {
+                    latitude: this.deg(lat2),
+                    longitude: this.deg(lon2)
+                };
             },
 
-            deg: function (num) {\r
-                return num * 180 / Math.PI;\r
+            deg: function (num) {
+                return num * 180 / Math.PI;
             },
 
-            rad: function (num) {\r
-                return num * Math.PI / 180;\r
-            }\r
+            rad: function (num) {
+                return num * Math.PI / 180;
+            }
         };
+    },
+
+    getURIParams: function (uriString) {
+        var params = {};
+
+        uriString.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str, key, value) {
+            params[key] = value;
+        });
+
+        return params;
     }
 };