~mzanetti/qtcreator-plugin-ubuntu/fix-device_run_app-for-mir

« back to all changes in this revision

Viewing changes to share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js

  • Committer: Tarmac
  • Author(s): Kyle Nitzsche
  • Date: 2013-10-03 19:06:35 UTC
  • mfrom: (48.1.4 qtcreator-plugin-ubuntu)
  • Revision ID: tarmac-20131003190635-gn0go18jiqix0ceg
Convert default SDK cordova app to use Ubuntu HTML5 per LP: #1234822.

Approved by Alexandre Abreu, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Create UI instance */
 
2
 
 
3
var UI = new UbuntuUI();
 
4
 
 
5
/* Initializatino after window load */
 
6
window.onload = function () {
 
7
    /* REQUIRED: initialize UI */
 
8
    UI.init();
 
9
    
 
10
    /* Start pagestack with main page */
 
11
    UI.pagestack.push("main");
 
12
 
 
13
    /* GUI intial state: show loading dialog (is removed on deviceready event) */
 
14
    UI.dialog("loading").show();
 
15
 
 
16
    /* Connect button to function */
 
17
    UI.button("devicereadyOK").click(function() {
 
18
        UI.dialog("deviceready").hide();
 
19
    });
 
20
 
 
21
};
 
22
 
 
23
/* Respond to deviceready event */
 
24
document.addEventListener("deviceready", function() {
 
25
    UI.dialog("loading").hide();
 
26
    UI.dialog("deviceready").show();
 
27
    }, false);