Adjusted panels and fixed bugs; version up 70/18470/1
authorwenchao.wang <wenchao.wang@intel.com>
Mon, 24 Mar 2014 12:06:40 +0000 (20:06 +0800)
committerwenchao.wang <wenchao.wang@intel.com>
Mon, 24 Mar 2014 12:06:40 +0000 (20:06 +0800)
Adjustd Message Port panel
Added Secure Element support in System Info

Change-Id: Ie35a7ae3b6a5e1c9d99a37101dd8140020e0521b
Signed-off-by: wenchao.wang <wenchao.wang@intel.com>
package/changelog
package/pkginfo.manifest
web/cache.manifest
web/dbsamples/dbmessageport.json
web/ripple.html
web/ripple.js

index fb0312f..317db4b 100644 (file)
@@ -1,3 +1,8 @@
+* 2.0.30
+- Adjustd Message Port panel
+- Added Secure Element support in System Info
+- Bugs fixing
+== wenchao.wang <wenchao.wang@intel.com> 2014-03-17 18:30
 * 2.0.29
 - Added Web Setting module
 - Added Secure Element module and related panel
index 6b58bc4..868007e 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.29
+Version:2.0.30
 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 622e6cd..ed6d567 100644 (file)
@@ -98,4 +98,4 @@ images/AboutLogo.png
 images/refreshIcon.png
 images/ui-bg-hashed.png
 images/tizen-sdk-menu.png
-# Manifest build date: Mon Mar 17 2014 18:32:39 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Mon Mar 24 2014 20:05:23 GMT+0800 (CST)
\ No newline at end of file
index d9c5ba2..e6dea15 100644 (file)
             "value": "OK"
         }],
         "certificate": true
+    },
+    "w5GBmFbY00app2": {
+        "name": "app2",
+        "ports": {
+            "MessagePortC": true,
+            "MessagePortD": false
+        },
+        "reply": [{
+            "key": "Result",
+            "value": "OK"
+        }],
+        "certificate": false
     }
 }
index 0034616..99d9262 100644 (file)
@@ -3075,18 +3075,19 @@ border-width:3px; border-bottom-width:0px; border-color: gray;"></div>
             <h3 class="PanelSectionTitle">Remote Message Ports</h3>
             <div id="current-app-remote-port" style="padding-left: 1em;"></div>
         </div>
+        <hr>
         <div id="messagePort-remote-template" style="display: none;">
             <div id="#RemoteApplicationId-container" class="ui-corner-all">
                 <h3 class="config-accordion-node-title" role="tab" tabindex="0">
                     <span class="ui-icon ui-icon-triangle-1-e"></span>
-                    <a href="#" style="padding: 0.4em 1em !important; color: #80ac27 !important;">#RemoteApplicationName(#RemoteApplicationId)</a>
+                    <a href="#" style="padding: 0.4em 1em; color: #80AC27;">#RemoteApplicationName&nbsp;(#RemoteApplicationId)</a>
                 </h3>
                 <div class="ui-accordion-content" role="tabpanel" style="padding: 0;">
                     <div id="#RemoteApplicationId-operations" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
                         <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
                             <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="##RemoteApplicationId-receiving">Receiving</a></li>
                             <li class="ui-state-default ui-corner-top"><a href="##RemoteApplicationId-sending">Sending</a></li>
-                            <li class="ui-state-default ui-corner-top"><a href="##RemoteApplicationId-options">Options</a></li>
+                            <li class="ui-state-default ui-corner-top"><a href="##RemoteApplicationId-options">Properties</a></li>
                         </ul>
                         <div id="#RemoteApplicationId-receiving" class="ui-tabs-panel ui-widget-content clearfix ui-corner-bottom">
                             #RemoteApplicationPortHtml
@@ -3095,7 +3096,7 @@ border-width:3px; border-bottom-width:0px; border-color: gray;"></div>
                             <table class="panel-table" style="border-spacing: 6px;">
                                 <tr>
                                     <td style="font-weight: bold;">
-                                        To current application's message port.
+                                        To current application's message port
                                     </td>
                                 </tr>
                                 <tr>
@@ -3142,9 +3143,7 @@ border-width:3px; border-bottom-width:0px; border-color: gray;"></div>
                                 <tr>
                                     <td>
                                         <p><strong>Certificate</strong></p>
-                                        <p><input id="#RemoteApplicationId-isTrusted" type="checkbox" value="true" checked />
-                                        <label for="#RemoteApplicationId-isTrusted">Same as current application</label>
-                                        </p>
+                                        <p>#RemoteApplicationIsTrusted</p>
                                     </td>
                                 </tr>
                             </table>
index 7aa6235..b834968 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Mon Mar 17 2014 18:32:39 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Mon Mar 24 2014 20:05:21 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -69863,7 +69863,6 @@ function _initializeMessagePortPanel() {
 
     _makeRemoteApplicationsHtml();
     _sendingRemoteMessage();
-    _setSameCertificate();
 
     try {
         jQuery("#messagePort-remote-applications h3").click(function (event) {
@@ -69904,10 +69903,14 @@ function _makeRemoteApplicationsHtml() {
     var htmlTemplate = jQuery("#messagePort-remote-template").html(),
         portHtmlTemplate = '<h3><span style="font-weight: bold;">#isTrustedIcon</span>&nbsp;#messagePortName</h3>' +
             '<div class="#portContainterAddr" style="border: 1px solid #DCDCDC; height: 10em; overflow: auto; border-radius: 8px;"></div>',
-        appId, appName, portName, abbr, isTrusted, html = '', portHtml, tabSelectors = [];
+        optionTemplate = '<input id="#RemoteApplicationId-isTrusted" type="checkbox" value="true" #CHECKED disabled>' +
+            '<label for="#RemoteApplicationId-isTrusted">Same as current application</label>',
+        appId, appName, portName, abbr, isTrusted, html = '', portHtml,
+        tabSelectors = [], portSelectors = [], certificate, option;
 
     for (appId in _db) {
         appName = _db[appId].name;
+        certificate= _db[appId].certificate;
 
         portHtml = '';
         for (portName in _db[appId].ports) {
@@ -69921,15 +69924,26 @@ function _makeRemoteApplicationsHtml() {
         }
 
         tabSelectors.push("#" + appId + "-operations");
+        portSelectors.push("#" + appId + "-local-port");
+
+        option = optionTemplate.replace(/#RemoteApplicationId/g, appId)
+            .replace(/#CHECKED/g, certificate ? "checked" : "");
 
         html += htmlTemplate.replace(/#RemoteApplicationId/g, appId)
             .replace(/#RemoteApplicationName/g, appName)
-            .replace(/#RemoteApplicationPortHtml/g, portHtml);
+            .replace(/#RemoteApplicationPortHtml/g, portHtml)
+            .replace(/#RemoteApplicationIsTrusted/g, option)
+            .replace(/#80AC27/g, !certificate ? "#FF4500" : "#80AC27");
     }
 
     jQuery("#messagePort-remote-applications").html(html);
 
     jQuery(tabSelectors.join(",")).tabs();
+    jQuery(portSelectors.join(",")).change(function () {
+        var appId = this.id.replace("-local-port", "");
+
+        jQuery("#" + appId + "-access").hide();
+    });
 }
 
 function _sendingRemoteMessage() {
@@ -69948,6 +69962,9 @@ function _sendingRemoteMessage() {
             messagePortName = jQuery("#" + appId + "-local-port").val(),
             certificate = _db[appId].certificate;
 
+        if ((key.length === 0) || (value.length === 0))
+            return;
+
         data = [{
             key: key,
             value: value
@@ -69966,9 +69983,6 @@ function _sendingRemoteMessage() {
                 'from this application.';
             jQuery("#" + appId + "-access").html(errorHtml);
             jQuery("#" + appId + "-access").show();
-            window.setTimeout(function () {
-                jQuery("#" + appId + "-access").hide();
-            }, 5000);
             return;
         }
 
@@ -69983,22 +69997,6 @@ function _sendingRemoteMessage() {
     });
 }
 
-function _setSameCertificate(){
-    var appId, certificateSelector = [];
-
-    for (appId in _db) {
-        certificateSelector.push("#" + appId + "-isTrusted");
-    }
-
-    jQuery(certificateSelector.join(",")).bind("change", function () {
-        var appId = this.id.replace("-isTrusted", "");
-
-        _db[appId].certificate = this.checked ? true : false;
-
-        db.saveObject("tizen-messageport", _db);
-    });
-}
-
 function _showRequestMessagePort(id, messagePortName, isTrusted, isRemote, appId) {
     var htmlTemplate, port, html, remoteKey;
 
@@ -70018,6 +70016,7 @@ function _showRequestMessagePort(id, messagePortName, isTrusted, isRemote, appId
         jQuery(id).append(html);
 
         if (!isRemote) {
+            _messagePortGlobal.localMessagePorts[messagePortName] = isTrusted;
             _addLocalMessagePortOptions(remoteKey);
         }
     }
@@ -71321,7 +71320,7 @@ var db = require('ripple/db'),
     utils = require('ripple/utils'),
     event = require('ripple/event'),
     deviceSettings = require('ripple/deviceSettings'),
-    //dbinit = require('ripple/platform/tizen/2.0/dbinit'),
+    dbinit = require('ripple/platform/tizen/2.0/dbinit'),
     _NFC_TAG = "tizen1.0-nfc-tag",
     _NFC_PEER = "tizen1.0-nfc-peer",
     _NFC_OUTPUT_MESSAGE = "tizen1.0-nfc-output-message",
@@ -71897,8 +71896,7 @@ module.exports = {
         btNodes = jQuery("#network-bt-device-select");
         btNodes.html("");
 
-        //_btBluetoothDB = dbinit.Bluetooth;
-        _btBluetoothDB = db.retrieveObject("bt-simulated-devices");
+        _btBluetoothDB = db.retrieveObject("bt-simulated-devices") || dbinit.Bluetooth;
         utils.forEach(_btBluetoothDB, function (item, index) {
             btNodes.append(utils.createElement("option", {
                 "value": index,
@@ -81074,7 +81072,7 @@ SystemInfoDeviceCapability = function () {
         return false;
     });
     this.__defineGetter__("secureElement", function () {
-        return false;
+        return true;
     });
     this.__defineGetter__("nativeOspCompatible", function () {
         return false;
@@ -92952,6 +92950,7 @@ function _initialize() {
                     _data.listeners[i].onSEReady(_data.readers[index]);
                 }
             } else {
+                _data.readers[index].closeSessions();
                 for (i in _data.listeners) {
                     _data.listeners[i].onSENotReady(_data.readers[index]);
                 }