</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">
</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>
var packageEventCallback = {
oninstalled: function(packageInfo) {
+ hideProcess();
alert("The package " + packageInfo.name + " is installed");
flag = true;
},
onprogress: function(packageId, percentage)
{
console.log("On installation(" + packageId + "): progress(" + percentage + ")");
+ showProcess();
},
oncomplete: function(packageId)
{
console.log("Installation(" + packageId + ") Complete");
+ hideProcess();
}
}
}, "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");
+}