powerOn: function Model_powerOn(callback) {
if (!this.adapter.powered) {
- this.adapter.setPowered(true, function () { setTimeout(function () { callback(); }, 500); }, function () {});
+ try {
+ this.adapter.setPowered(true,
+ function () {
+ setTimeout(function () { callback(); }, 500);
+ }
+ );
+ } catch (error) {
+ alert(error.message);
+ app.ui.showPowerOnButton();
+ }
} else {
callback();
}
-<div data-role="page" id="keyboard" data-add-back-btn="none">
+<div data-role="page" id="keyboard">
<div data-role="header" id="keyboard-header" data-position="fixed">
<h1></h1>
</div>
<div data-role="content" id="keyboard-content">
<input type="text" id="keyboard-text" maxlength="20"/>
- <div data-role="button" class="ui-btn-start" id="keyboard-ok-button">OK</div>
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <div data-role="tabbar" data-style="tabbar">
+ <ul>
+ <li id="keyboard-ok-button"><a href="#">OK</a></li>
+ </ul>
+ </div>
</div>
</div>
\ No newline at end of file