diff -Nru qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/debian/changelog qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/debian/changelog --- qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/debian/changelog 2014-02-18 21:16:12.000000000 +0000 +++ qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/debian/changelog 2014-02-18 21:16:12.000000000 +0000 @@ -1,8 +1,8 @@ -qtcreator-plugin-ubuntu (2.8.1.2bzr95precise0) precise; urgency=low +qtcreator-plugin-ubuntu (2.8.1.2bzr96precise0) precise; urgency=low - * Automatic build of revision 95 + * Automatic build of revision 96 - -- PS Jenkins bot Tue, 18 Feb 2014 18:38:43 +0000 + -- PS Jenkins bot Tue, 18 Feb 2014 21:13:56 +0000 qtcreator-plugin-ubuntu (2.8.1.2-0ubuntu2) trusty; urgency=medium diff -Nru qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/index.html qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/index.html --- qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/index.html 2014-02-18 18:38:35.000000000 +0000 +++ qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/index.html 2014-02-18 21:13:48.000000000 +0000 @@ -2,9 +2,9 @@ - A multipage HTML5 UI using the Tabs component - - + An Ubuntu HTML5 application + + @@ -18,11 +18,15 @@ + + + +
@@ -33,50 +37,92 @@
+ +
My List Header
-
- - - +
+ +
+
+ +
+ +
+
+
+

+ + + +
diff -Nru qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/js/app.js qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/js/app.js --- qtcreator-plugin-ubuntu-2.8.1.2bzr95precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/js/app.js 2014-02-18 18:38:35.000000000 +0000 +++ qtcreator-plugin-ubuntu-2.8.1.2bzr96precise0/share/qtcreator/templates/wizards/ubuntu/html5-simple/js/app.js 2014-02-18 21:13:48.000000000 +0000 @@ -5,8 +5,56 @@ var UI = new UbuntuUI(); UI.init(); + // Wire all the simple logic + document.getElementById('no').addEventListener('click', function() { + UI.dialog('dialog1').hide(); + }); + + function getContacts() { + return [].slice.call(document.querySelectorAll('#contacts li')); + }; + + var contacts = getContacts(); + contacts.forEach(function (contact) { + contact.addEventListener('click', function() { + contact.classList.add('selected'); + }); + }); + + function getSelectedContacts() { + var selectedContactInputs = [].slice.call(document.querySelectorAll('#contacts li label input:checked')); + return selectedContactInputs.map(function (contactInputElement) { return contactInputElement.parentNode.parentNode; }); + } + + function getContactName(contact) { + return contact.querySelector('p').innerHTML; + } + + function displayMessage(message) { + document.querySelector('#dialog1 h1').innerHTML = message; + UI.dialog('dialog1').show(); + }; + + document.getElementById('call').addEventListener('click', function() { + var sc = getSelectedContacts(); + if (! sc || sc.length !== 1) { + displayMessage('Please select one and only one contact'); + return; + } + displayMessage('Calling: ' + getContactName(sc[0])); + }); + + document.getElementById('text').addEventListener('click', function() { + var sc = getSelectedContacts(); + if (! sc || sc.length !== 1) { + displayMessage('Please select one and only one contact'); + return; + } + displayMessage('Texting: ' + getContactName(sc[0])); + }); + // Add an event listener that is pending on the initialization - // of the platform layer API + // of the platform layer API, if it is being used. document.addEventListener("deviceready", function() { if (console && console.log) console.log('Platform layer API ready');