Merge lp:~knitzsche/qtcreator-plugin-ubuntu/qtcreator-plugin-ubuntu-bug234822 into lp:qtcreator-plugin-ubuntu

Proposed by Kyle Nitzsche
Status: Merged
Approved by: Alexandre Abreu
Approved revision: 52
Merged at revision: 49
Proposed branch: lp:~knitzsche/qtcreator-plugin-ubuntu/qtcreator-plugin-ubuntu-bug234822
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 201 lines (+83/-78)
3 files modified
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js (+27/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css (+0/-58)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html (+56/-20)
To merge this branch: bzr merge lp:~knitzsche/qtcreator-plugin-ubuntu/qtcreator-plugin-ubuntu-bug234822
Reviewer Review Type Date Requested Status
Alexandre Abreu (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+189137@code.launchpad.net

Description of the change

Convert default SDK cordova app to use Ubuntu HTML5 per LP: #1234822

To post a comment you must log in.
50. By Kyle Nitzsche

revert leading spaces in license to 4

51. By Kyle Nitzsche

revert to two spaces after period in license text

52. By Kyle Nitzsche

reverting another two spaces after period

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandre Abreu (abreu-alexandre) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 2013-10-03 17:19:50 +0000
@@ -0,0 +1,27 @@
1/* Create UI instance */
2
3var UI = new UbuntuUI();
4
5/* Initializatino after window load */
6window.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 */
24document.addEventListener("deviceready", function() {
25 UI.dialog("loading").hide();
26 UI.dialog("deviceready").show();
27 }, false);
028
=== modified file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 2013-08-08 07:26:20 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 2013-10-03 17:19:50 +0000
@@ -44,59 +44,6 @@
44 text-transform:uppercase;44 text-transform:uppercase;
45 width:100%;45 width:100%;
46}46}
47
48/* Portrait layout (default) */
49.app {
50 background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
51 position:absolute; /* position in the center of the screen */
52 left:50%;
53 top:50%;
54 height:50px; /* text area height */
55 width:225px; /* text area width */
56 text-align:center;
57 padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
58 margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
59 /* offset horizontal: half of text area width */
60}
61
62/* Landscape layout (with min-width) */
63@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
64 .app {
65 background-position:left center;
66 padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
67 margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
68 /* offset horizontal: half of image width and text area width */
69 }
70}
71
72h1 {
73 font-size:24px;
74 font-weight:normal;
75 margin:0px;
76 overflow:visible;
77 padding:0px;
78 text-align:center;
79}
80
81.event {
82 border-radius:4px;
83 -webkit-border-radius:4px;
84 color:#FFFFFF;
85 font-size:12px;
86 margin:0px 30px;
87 padding:2px 0px;
88}
89
90.event.listening {
91 background-color:#333333;
92 display:block;
93}
94
95.event.received {
96 background-color:#4B946A;
97 display:none;
98}
99
100@keyframes fade {47@keyframes fade {
101 from { opacity: 1.0; }48 from { opacity: 1.0; }
102 50% { opacity: 0.4; }49 50% { opacity: 0.4; }
@@ -108,8 +55,3 @@
108 50% { opacity: 0.4; }55 50% { opacity: 0.4; }
109 to { opacity: 1.0; }56 to { opacity: 1.0; }
110}57}
111
112.blink {
113 animation:fade 3000ms infinite;
114 -webkit-animation:fade 3000ms infinite;
115}
11658
=== modified file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 2013-08-08 07:26:20 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 2013-10-03 17:19:50 +0000
@@ -13,7 +13,7 @@
13 Unless required by applicable law or agreed to in writing,13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations17 specific language governing permissions and limitations
18 under the License.18 under the License.
19-->19-->
@@ -23,29 +23,65 @@
23 <meta name="format-detection" content="telephone=no" />23 <meta name="format-detection" content="telephone=no" />
24 <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />24 <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
25 <link rel="stylesheet" type="text/css" href="css/index.css" />25 <link rel="stylesheet" type="text/css" href="css/index.css" />
26 <title>Hello World</title>26
27 <!-- Use Ubuntu Cordova -->
28 <script language="javascript" type="text/javascript" src="file:///usr/share/cordova-ubuntu-2.8/www/cordova-2.8.js"></script>
29
30 <!-- Ubuntu UI Style imports - Ambiance theme -->
31 <link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
32
33 <!-- Ubuntu UI javascript imports - Ambiance theme -->
34 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
35 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
36 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
37 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
38 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>
39
40 <!-- Application script -->
41 <script src="app.js"></script>
42
43 <title>Hello World Cordova</title>
27 </head>44 </head>
45
28 <body>46 <body>
29 <div class="app">47
30 <h1>Apache Cordova</h1>48 <div data-role="page">
31 <div id="deviceready" class="blink">49
32 <p class="event listening">Connecting to Device</p>50 <header data-role="header">
33 <p class="event received">Device is Ready</p>51 <nav data-role="navbar" class="tabs" >
52 <div class="tabs-inner">
53 <ul>
54 <li class="active" role="tab">
55 <a href="#item1" class="tab-item">HTML5/Cordova</a>
56 </li>
57 </ul>
58 </div>
59 </nav>
60 </header>
61
62 <div data-role="content">
63 <div data-role="pagestack">
64 <div data-role="page" id="main">
65 <h1>Apache Cordova Loaded</h1>
66 <img src="img/logo.png"/>
67 </div>
68 </div>
69 </div>
70
71 <div data-role="dialog" id="loading">
72 <section>
73 <h1>Apache Cordova Loading</h1>
74 <progress></progress>
75 </section>
76 </div>
77
78 <div data-role="dialog" id="deviceready">
79 <section>
80 <h1>Deviceready event received</h1>
81 <button data-role="button" id="devicereadyOK" class="success">OK</button>
82 </section>
34 </div>83 </div>
35 </div>84 </div>
36
37 <script language="javascript" type="text/javascript" src="file:///usr/share/cordova-ubuntu-2.8/www/cordova-2.8.js"></script>
38 <script language="javascript" type="text/javascript">
39 document.addEventListener("deviceready", function() {
40 var parentElement = document.getElementById("deviceready");
41 var listeningElement = parentElement.querySelector('.listening');
42 var receivedElement = parentElement.querySelector('.received');
43
44 listeningElement.setAttribute('style', 'display:none;');
45 receivedElement.setAttribute('style', 'display:block;');
46 }, false);
47 </script>
48
49 </body>85 </body>
50</html>86</html>
5187

Subscribers

People subscribed via source and target branches

to all changes: