Adjusted panels and fixed bugs; version up 84/18684/1
authorwenchao.wang <wenchao.wang@intel.com>
Fri, 28 Mar 2014 05:53:16 +0000 (13:53 +0800)
committerwenchao.wang <wenchao.wang@intel.com>
Fri, 28 Mar 2014 05:53:16 +0000 (13:53 +0800)
Adjusted Bluetooth panel
Resolved the communication issue in network panel

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

index 317db4b..4952277 100644 (file)
@@ -1,8 +1,13 @@
+* 2.0.31
+- Adjustd Bluetooth panel
+- Resolved the communication issue in network panel
+- Bugs fixing
+== wenchao.wang <wenchao.wang@intel.com> 2014-03-28 15:00
 * 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
+== wenchao.wang <wenchao.wang@intel.com> 2014-03-24 20:05
 * 2.0.29
 - Added Web Setting module
 - Added Secure Element module and related panel
index 868007e..27aa291 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.30
+Version:2.0.31
 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 ed6d567..c9e0e49 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 24 2014 20:05:23 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Fri Mar 28 2014 13:51:04 GMT+0800 (CST)
\ No newline at end of file
index 99d9262..8b92d24 100644 (file)
             <section id="left" class="left sortable main" style="position: relative;"></section>
             </div>
             <div id="middle_div">
-                <section class="middle">
+                <section class="middle" style="overflow-x: hidden;">
                     <table id="device-layout" style="padding:0;">
                         <tr><td style="padding-bottom:0; padding-left:43px; padding-right:44px;">
                             <div id="deviceTitleBar"style="background-color:#dddddd; height:25px; width:100%; border-width:1px;border-style:solid; border-color:#888888;"><span style="margin-top:3px; margin-left:20px;float:left;" id="deviceTitle"></span><span style="margin-top:7px;background-color:#55555; background:url(images/menuDraggerIcon.png) no-repeat;display:block;width:12px;height:8px;margin-right:10px;float:right;"></span></div>
index b834968..bf66cf8 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Mon Mar 24 2014 20:05:21 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Fri Mar 28 2014 13:51:03 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -70111,6 +70111,7 @@ define('ripple/ui/plugins/platform', function (require, exports, module) {
 var constants = require('ripple/constants'),
     utils = require('ripple/utils'),
     devices = require('ripple/devices'),
+    deviceSettings = require('ripple/deviceSettings'),
     platform = require('ripple/platform'),
     db = require('ripple/db');
 
@@ -70145,6 +70146,7 @@ function _updatePlatformDeviceSelect(platformID, currentDeviceKey) {
         jQuery("#item_container :nth-child(2)").hide();
         jQuery("#item_container :nth-child(3)").hide();
 
+        _unlockScreen();
         //jQuery("#hwkeys-panel").hide();
     }
     else {
@@ -70158,6 +70160,17 @@ function _updatePlatformDeviceSelect(platformID, currentDeviceKey) {
     }
 }
 
+function _unlockScreen() {
+    if (!deviceSettings.retrieve("Config.lockScreen"))
+        return;
+
+    if ($("#device-settings-Config-lockScreen").length === 0) {
+        deviceSettings.persist("Config.lockScreen", false);
+    } else {
+        $("#device-settings-Config-lockScreen")[0].click();
+    }
+}
+
 function checkResolutionSize(evt) {
        var query_str, id_str, len;
        query_str = "#resolution-custom-" + evt.data.msg;
@@ -70196,7 +70209,6 @@ module.exports = {
                 });
             });
             _updatePlatformDeviceSelect(newPlatform, newDevice);
-
         });
 
         jQuery("#device-select").bind("focus", function () {
@@ -71630,7 +71642,7 @@ function _initializeElements() {
                 return;
             }
             db.saveObject(_NFC_PEER, _peerNDEF);
-            event.trigger("nfc-peer-sending-ndef", []);
+            event.trigger("nfc-peer-sending-ndef", [_peerNDEF]);
         });
 
         // Initialize network bearer selection
@@ -71896,7 +71908,7 @@ module.exports = {
         btNodes = jQuery("#network-bt-device-select");
         btNodes.html("");
 
-        _btBluetoothDB = db.retrieveObject("bt-simulated-devices") || dbinit.Bluetooth;
+        _btBluetoothDB = dbinit.Bluetooth;
         utils.forEach(_btBluetoothDB, function (item, index) {
             btNodes.append(utils.createElement("option", {
                 "value": index,
@@ -71939,12 +71951,16 @@ module.exports = {
 
         //Default "Tizen Phone" is nearby
         //_btSimulatedDevs["00:02:60:00:05:63"] = _btBluetoothDB["00:02:60:00:05:63"];
-        for (var address in _btBluetoothDB) {
-            _btSimulatedDevs[address] = _btBluetoothDB[address];
-            break;
+        _btSimulatedDevs = db.retrieveObject("bt-simulated-devices") || {};
+        if (Object.keys(_btSimulatedDevs).length === 0) {
+            for (var address in _btBluetoothDB) {
+                _btSimulatedDevs[address] = _btBluetoothDB[address];
+                break;
+            }
+
+            db.saveObject("bt-simulated-devices", _btSimulatedDevs);
         }
 
-        db.saveObject("bt-simulated-devices", _btSimulatedDevs);
         _btRender();
     }
 };
@@ -72420,7 +72436,8 @@ module.exports = {
         }
 
         event.on("ReadersClosed", function () {
-            var i, reader, prefix, containerId, radioLabelInsert, radioLabelEject;
+            var i, reader, prefix, containerId, radioLabelInsert, radioLabelEject,
+                radioInsert, radioEject;
 
             for (i = 0; _data.dbStorage && i < _data.dbStorage.length; i++) {
                 reader = _data.dbStorage[i];
@@ -72431,9 +72448,16 @@ module.exports = {
                 containerId = prefix + "-radio";
                 radioLabelInsert = $("#" + containerId + "1-label");
                 radioLabelEject = $("#" + containerId + "2-label");
+                radioInsert = $("#" + containerId + "1");
+                radioEject = $("#" + containerId + "2");
 
+                radioInsert.prop('checked', false);
                 radioLabelInsert.css({'color': '#bbbbbb'});
-                radioLabelEject.css({'color': '#222222'});
+                radioInsert.button("refresh");
+
+                radioEject.prop('checked', true);
+                radioLabelEject.css({'color': '#000000'});
+                radioEject.button("refresh");
             }
         });
     }
@@ -73392,282 +73416,6 @@ module.exports = {
 };
 
 });
-define('ripple/ui/plugins/nfc', function (require, exports, module) {
-/*
- *  Copyright 2012 Intel Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var db = require('ripple/db'),
-    event = require('ripple/event'),
-    _NFC_TAG = "tizen1.0-nfc-tag",
-    _NFC_PEER = "tizen1.0-nfc-peer",
-    _NFC_OUTPUT_MESSAGE = "tizen1.0-nfc-output-message",
-    powered = false,
-    polling = false,
-    isConnected = false,
-    _tagNDEF = {
-        type: "GENERIC_TARGET",
-        isSupportedNDEF: true,
-        ndefSize: 2,
-        ndefs: [{
-            recordCount: 2,
-            records: [{
-                tnf: 1,
-                type: "TypeA",
-                id: "ID001",
-                payload: "This is 1st payload"
-            }, {
-                tnf: 1,
-                type: "TypeA",
-                id: "ID002",
-                payload: "This is 2nd payload"
-            }]
-        },
-            {
-            recordCount: 2,
-            records: [{
-                tnf: 1,
-                type: "TypeA",
-                id: "ID001",
-                payload: "This is 1st payload"
-            }, {
-                tnf: 1,
-                type: "TypeA",
-                id: "ID002",
-                payload: "This is 2nd payload"
-            }]
-        }]
-    },
-    _tagRaw = {
-        type: "GENERIC_TARGET",
-        isSupportedNDEF: false,
-        rawData : ""
-    },
-    _peerNDEF = {
-        ndef: {
-            recordCount: 2,
-            records: [{
-                tnf: 1,
-                type: "TypeA",
-                id: "ID001",
-                payload: "This is 1st payload"
-            }, {
-                tnf: 1,
-                type: "TypeA",
-                id: "ID002",
-                payload: "This is 2nd payload"
-            }]
-        }
-    };
-
-function elementEnableDisableSetting(prop) {
-    jQuery("#nfc-attach-msg").text("\xa0");
-    jQuery("#nfc-peer-send-msg").text("\xa0");
-    if (prop && prop.power !== undefined && prop.power !== null) {
-        if (prop.power) {
-            $("#nfc-polling").removeAttr("disabled");
-            $("#nfc-main-container").show();
-        } else {
-            $("#nfc-polling").attr("disabled", "disabled");
-            $("#nfc-type").removeAttr("disabled");
-            $("#nfc-main-container").hide();
-        }
-    }
-    if (prop && prop.connectedState !== undefined && prop.connectedState !== null) {
-        if (prop.connectedState) {
-            $("#nfc-type").attr("disabled", "disabled");
-            $("#nfc-tag-type-text").text($("#nfc-tag-type option:selected").text());
-            $("#nfc-tag-type").hide();
-            $("#nfc-tag-type-text").show();
-            $("#nfc-tag-NDEF-support-text").text($("#nfc-tag-NDEF-support option:selected").text());
-            $("#nfc-tag-NDEF-support").hide();
-            $("#nfc-tag-NDEF-support-text").show();
-            $("#nfc-raw-data").attr("disabled", "disabled");
-        } else {
-            $("#nfc-type").removeAttr("disabled");
-            $("#nfc-tag-type").show();
-            $("#nfc-tag-type-text").hide();
-            $("#nfc-tag-NDEF-support").show();
-            $("#nfc-tag-NDEF-support-text").hide();
-            $("#nfc-raw-data").removeAttr("disabled");
-        }
-    }
-}
-
-function _initializeElements() {
-
-    jQuery(function () {
-        var stop = false,
-            isSupportNDEF, type;
-
-        jQuery("nfc-tag-ndef-container h3").click(function (event) {
-            if (stop) {
-                event.stopImmediatePropagation();
-                event.preventDefault();
-                stop = false;
-            }
-        });
-        jQuery("#nfc-tag-ndef-container").accordion("destroy").accordion({
-            header: "> div > h3",
-            autoHeight: false
-        });
-        jQuery("nfc-nfcpeer h3").click(function (event) {
-            if (stop) {
-                event.stopImmediatePropagation();
-                event.preventDefault();
-                stop = false;
-            }
-        });
-        jQuery("#nfc-nfcpeer").accordion("destroy").accordion({
-            header: "> div > h3",
-            autoHeight: false
-        });
-        jQuery("#nfc-tag-NDEF-support").bind("change", function () {
-            isSupportNDEF = jQuery("#nfc-tag-NDEF-support").val();
-            if (isSupportNDEF === "Yes") {
-                jQuery("#nfc-tag-ndef-container").fadeIn();
-                jQuery("#nfc-tag-raw-container").hide();
-            } else {
-                jQuery("#nfc-tag-ndef-container").hide();
-                jQuery("#nfc-tag-raw-container").fadeIn();
-            }
-        });
-        jQuery("#nfc-type").bind("change", function () {
-            type = jQuery("#nfc-type").val();
-            if (type === "Tag") {
-                jQuery("#nfc-nfctag").fadeIn();
-                jQuery("#nfc-nfcpeer").hide();
-            } else {
-                jQuery("#nfc-nfctag").hide();
-                jQuery("#nfc-nfcpeer").fadeIn();
-            }
-            elementEnableDisableSetting();
-        });
-        jQuery("#nfc-power").bind("change", function () {
-            var status;
-            status = jQuery("#nfc-power").val() === "On" ? true : false;
-            event.trigger("nfc-power-setting", [status]);
-        });
-        jQuery("#nfc-polling").bind("change", function () {
-            var status;
-            status = jQuery("#nfc-polling").val() === "On" ? true : false;
-            event.trigger("nfc-polling-setting", [status]);
-        });
-        jQuery("#nfc-attach").bind("click", function () {
-            var type, isAttached;
-            isAttached = jQuery("#nfc-attach").children().text() === "Attach" ? true : false;
-            jQuery("#nfc-attach-msg").text("\xa0");
-
-            if (!polling && isAttached) {
-                jQuery("#nfc-attach-msg").text("Polling:Off, attach won't work");
-                return;
-            }
-            type = jQuery("#nfc-type").val();
-            event.trigger("nfc-attach-setting", [type, isAttached]);
-        });
-        jQuery("#nfc-peer-send").bind("click", function () {
-            jQuery("#nfc-peer-send-msg").text("\xa0");
-            if (!isConnected) {
-                jQuery("#nfc-peer-send-msg").text("Disconnected. Send won't work");
-                return;
-            }
-            db.saveObject(_NFC_PEER, _peerNDEF);
-            event.trigger("nfc-peer-sending-ndef", []);
-        });
-    });
-}
-
-module.exports = {
-    panel: {
-        domId: "nfc-container",
-        collapsed: true,
-        pane: "left",
-        titleName: "NFC",
-        display: true
-    },
-    initialize: function () {
-        _initializeElements();
-        event.on("nfc-power-changed", function (status) {
-            powered = status;
-            if (powered === true) {
-                $("#nfc-power").val("On");
-            } else {
-                $("#nfc-power").val("Off");
-            }
-            elementEnableDisableSetting({power: status});
-        });
-        event.on("nfc-polling-changed", function (status) {
-            polling = status;
-            if (polling === true) {
-                $("#nfc-polling").val("On");
-            } else {
-                $("#nfc-polling").val("Off");
-            }
-            elementEnableDisableSetting();
-        });
-        event.on("nfc-connectedState-changed", function (state) {
-            var i, type, isSupportedNDEF, str, bytes = [];
-            isConnected = state;
-            elementEnableDisableSetting({connectedState: state});
-            type = jQuery("#nfc-type").val();
-            if (state) {
-                jQuery("#nfc-attach").children().text("Detach");
-                jQuery("#nfc-tag-connection").text("Connected");
-                jQuery("#nfc-peer-connection").text("Connected");
-                if (type === "Tag") {
-                    isSupportedNDEF = jQuery("#nfc-tag-NDEF-support").val() === "Yes" ? true : false;
-                    if (isSupportedNDEF) {
-                        _tagNDEF.type = jQuery("#nfc-tag-type").val();
-                        db.saveObject(_NFC_TAG, _tagNDEF);
-                    } else {
-                        _tagRaw.type = jQuery("#nfc-tag-type").val();
-                        str = jQuery("#nfc-raw-data").val();
-                        for (i = 0; i < str.length; i++) {
-                            bytes.push(str.charCodeAt(i));
-                        }
-                        _tagRaw.rawData = bytes;
-                        db.saveObject(_NFC_TAG, _tagRaw);
-                    }
-                    event.trigger("nfc-tag-send", [true]);
-                } else {
-                    event.trigger("nfc-peer-send", [true]);
-                }
-            } else {
-                jQuery("#nfc-attach").children().text("Attach");
-                jQuery("#nfc-tag-connection").text("Disconnected");
-                jQuery("#nfc-peer-connection").text("Disconnected");
-                jQuery("#nfc-output").text("");
-                jQuery("#nfc-output-table").hide();
-                if (type === "Tag") {
-                    event.trigger("nfc-tag-send", [false]);
-                } else {
-                    event.trigger("nfc-peer-send", [false]);
-                }
-            }
-        });
-        event.on("nfc-output-msg", function () {
-            var msg;
-            msg = db.retrieve(_NFC_OUTPUT_MESSAGE);
-            jQuery("#nfc-output").text(msg);
-            jQuery("#nfc-output-table").show();
-        });
-    }
-};
-
-
-});
 define('ripple/ui/plugins/settings-dialog', function (require, exports, module) {
 /*
  *  Copyright 2011 Research In Motion Limited.
@@ -75776,7 +75524,6 @@ define('ripple/ui/plugins/configWindow', function (require, exports, module) {
  * limitations under the License.
  */
 var utils = require('ripple/utils'),
-    event = require('ripple/event'),
     db = require('ripple/db'),
     tooltip = require('ripple/ui/plugins/tooltip'),
     platform = require('ripple/platform'),
@@ -75800,6 +75547,12 @@ function _hideConfigWindow() {
     $("#overlayBackground").hide("fade", "slow");
 }
 
+function _cancelConfig() {
+    $("#platform-select").val(platform.current().id);
+    $("#platform-select").trigger("change");
+
+    _hideConfigWindow();
+}
 
 function checkResolutionValue(val) {
     var ret = false;
@@ -75819,7 +75572,7 @@ function _showConfigWindow() {
 
     $("#content_container").show();
     $("#" + items[0].id).show("fast");
-    
+
     $(".configuration-window-item:eq(0)").css("background-color", "#003399");
     $(".configuration-window-item:eq(0)").css("color", "#ffffff");
 
@@ -75827,7 +75580,7 @@ function _showConfigWindow() {
     $(".configuration-window-item").bind("click", function () {
         $(".configuration-window-item").css("background-color", "#eeeeee");
         $(".configuration-window-item").css("color", "#333333");
-       
+
         $(this).css("background-color", "#003399");
         $(this).css("color", "#ffffff");
 
@@ -75899,7 +75652,7 @@ function _showConfigWindow() {
     $("#configuration-window-close-btn").unbind('click');
     $("#configuration-window-close-btn").bind("click", function () {
         if ($("#configure-window-popup").is(":visible")) {
-            _hideConfigWindow();
+            _cancelConfig();
             return;
         }
     });
@@ -75929,13 +75682,11 @@ function _showConfigWindow() {
         db.saveObject(_KEY, _settings);
         programs = db.retrieveObject(_DB_APPLICATION_KEY);
         db.saveObject(_DB_APPLICATION_SAVE_KEY, programs);
-
     });
     tooltip.create("#configuration-window-load-btn", "Load Configuration");
     $("#configuration-window-load-btn").unbind('click');
     $("#configuration-window-load-btn").bind("click", function () {
         var platformList,
-            programs,
             deviceInfo,
             _settings,
             versionSelect = document.getElementById("version-select");
@@ -79913,6 +79664,12 @@ _self = {
         _setOrientation(layout);
 
         _win.onorientationchange = undefined;
+
+        $(".middle").scroll(function () {
+            if (this.scrollLeft > 0) {
+                this.scrollLeft = 0;
+            }
+        });
     },
     // TODO: redo/refactor this in general, seems bloated, also devices REQUIRE viewport schemas which they shouldnt
     resize: function (device) {
@@ -93229,7 +92986,7 @@ Session = function (channels) {
 
         t.Session("getATR", arguments);
 
-        return atr.slice(0);
+        return t.byte(atr.slice(0), "[]");
     }
 
     function close() {
@@ -93294,7 +93051,7 @@ Channel = function (isBasic, aid) {
         if (!command[1])
             return [0x67, 0x00];
 
-        response = _data.APDU_COMMANDS[command[1]];
+        response = _data.APDU_COMMANDS[t.octet(command[1])];
         if (!response)
             return [0x6d, 0x00];
 
@@ -93324,7 +93081,7 @@ Channel = function (isBasic, aid) {
             throw new WebAPIException(errorcode.SECURITY_ERR);
         }
 
-        t.Channel("transmit", arguments);
+        t.Channel("transmit", arguments, true);
 
         window.setTimeout(function () {
             var response;
@@ -93346,7 +93103,7 @@ Channel = function (isBasic, aid) {
 
             event.trigger("SETransmitted", [aid, command]);
 
-            successCallback(response);
+            successCallback(t.byte(response, "[]"));
         }, 1);
     }
 
@@ -107629,10 +107386,13 @@ NFCAdapterPrototype = function () {
         }
         if (!status) {
             updateIsNear(_data.isDetectTag, false);
-            _data.listener.onTagDetected = null;
-            _data.listener.onPeerDetected = null;
-            _data.listener.onNDEFReceived = null;
-            _data.listener.onCardEmulationChanged = null;
+            if (_data.listener.onTagDetected) {
+                _data.listener.onTagDetected.ondetach();
+            }
+
+            if (_data.listener.onPeerDetected) {
+                _data.listener.onPeerDetected.ondetach();
+            }
         }
         powered = status;
         updatePollingStatus(status);
@@ -107700,9 +107460,6 @@ NFCAdapterPrototype = function () {
         t.NFCAdapter("setTagListener", arguments);
 
         //TODO: tagFilter support
-        if (!powered) {
-            return;
-        }
         _data.listener.onTagDetected = detectCallback;
     }
 
@@ -107714,9 +107471,6 @@ NFCAdapterPrototype = function () {
 
         t.NFCAdapter("setPeerListener", arguments);
 
-        if (!powered) {
-            return;
-        }
         _data.listener.onPeerDetected = detectCallback;
     }
 
@@ -107726,7 +107480,7 @@ NFCAdapterPrototype = function () {
             throw new WebAPIException(errorcode.SECURITY_ERR);
         }
 
-        if (!powered || !_data.listener.onTagDetected) {
+        if (!_data.listener.onTagDetected) {
             return;
         }
 
@@ -107739,7 +107493,7 @@ NFCAdapterPrototype = function () {
             throw new WebAPIException(errorcode.SECURITY_ERR);
         }
 
-        if (!powered || !_data.listener.onPeerDetected) {
+        if (!_data.listener.onPeerDetected) {
             return;
         }