Repaired clipboard case for behavior
authorTan.Shiyou <shiyoux.tan@intel.com>
Tue, 4 Jun 2013 14:48:29 +0000 (22:48 +0800)
committerwanmingx.lin <wanmingx.lin@intel.com>
Wed, 5 Jun 2013 10:58:06 +0000 (18:58 +0800)
Signed-off-by: Tan.Shiyou <shiyoux.tan@intel.com>
tests/Clipboard/Clipboard.html
tests/Clipboard/js/main.js
tests/Clipboard/res/Clipboard

index 14f5cd7..3b3286d 100755 (executable)
@@ -47,10 +47,11 @@ Authors:
       </div>
       <div data-role= "content">
         <ul data-role="listview">
-          <li data-role="list-divider">Clipboard Install</li>
-            <li><div data-role="button" id="install">Install</div></li>
-          <li data-role="list-divider">Clipboard Application Launch</li>
-            <li><div data-role="button" id="launch1">Launch</div></li>
+          <li>Clipboard Install</li>
+            <li>
+              <div data-role="button" data-theme="a" data-inline="true" id="install">Install</div>
+              <div data-role="button" data-theme="a" data-inline="true" id="launch1">Launch</div>
+          </li>
         </ul>
       </div>
       <div data-role="footer" data-position="fixed">
@@ -63,10 +64,12 @@ Authors:
       </div>
       <div data-role="popup" id="popup_info">
         <p>The test verifies that clipboard can get the copy, cut and paste events</p>
-        <p>1.Click the install button to install the wgt</p>
-        <p>2.Click the launch button to launch</p>
-        <p>3.Follow the steps in test page</p>
-        <p>4.Click the Exit button to exit app</p>
+        <p>1.Click the install button to install the app</p>
+        <p>2.Click the launch button to launch app</p>
+        <p>3.Copy any characters of "COPYME" in app page</p>
+        <p>4.Paste the copied characters to the NO.1 box, the box content will be "COPYME" </p>
+        <p>5.Cut any characters of "COPYME" in NO.1 box</p>
+        <p>4.Paste the cuted characters to the NO.2 box, the box content will be "COPYME"</p>
       </div>
     </div>
   </body>
index 4e85a22..32d5648 100644 (file)
@@ -47,6 +47,7 @@ $(document).delegate("#main", "pageinit", function() {
 
 var packageEventCallback = {
         oninstalled: function(packageInfo) {
+            hideProcess();
             alert("The package " + packageInfo.name + " is installed");
             flag = true;
         },
@@ -85,10 +86,12 @@ function install(url) {
             onprogress: function(packageId, percentage)
             {
                 console.log("On installation(" + packageId + "): progress(" + percentage + ")");
+                showProcess();
             },
             oncomplete: function(packageId)
             {
                 console.log("Installation(" + packageId + ") Complete");
+                hideProcess();
             }
     }
 
@@ -152,3 +155,21 @@ function packagePre() {
         }, "rw"
     );
 }
+
+function hideProcess() {
+    $.mobile.loading('hide');
+    $("#popup_info-screen").addClass("ui-screen-hidden");
+    $("#popup_info-screen").removeClass("in");
+}
+
+function showProcess() {
+    $.mobile.loading('show', {
+        text: 'Install...',
+        textVisible: false,
+        theme: 'a',
+        textonly: false,
+        html: ""
+    });
+    $("#popup_info-screen").removeClass("ui-screen-hidden");
+    $("#popup_info-screen").addClass("in");
+}
index f0a86b1..2f5de46 100644 (file)
Binary files a/tests/Clipboard/res/Clipboard and b/tests/Clipboard/res/Clipboard differ