Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AFA510D4E for ; Thu, 29 May 2014 02:34:52 +0000 (UTC) Received: (qmail 55562 invoked by uid 500); 29 May 2014 02:34:52 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 55456 invoked by uid 500); 29 May 2014 02:34:52 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 55377 invoked by uid 99); 29 May 2014 02:34:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 02:34:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2A3944ED9B; Thu, 29 May 2014 02:34:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Thu, 29 May 2014 02:34:56 -0000 Message-Id: <4e728019e15e40848fb14c671e6bd905@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/6] git commit: Add iconURL to Installer (to be shown in the UI in a future commit) Add iconURL to Installer (to be shown in the UI in a future commit) Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/91d27cf7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/91d27cf7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/91d27cf7 Branch: refs/heads/master Commit: 91d27cf7bf28a0d97377f974389bb0c971e69857 Parents: e780338 Author: Andrew Grieve Authored: Wed May 28 22:22:22 2014 -0400 Committer: Andrew Grieve Committed: Wed May 28 22:25:11 2014 -0400 ---------------------------------------------------------------------- www/cdvah/js/Installer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/91d27cf7/www/cdvah/js/Installer.js ---------------------------------------------------------------------- diff --git a/www/cdvah/js/Installer.js b/www/cdvah/js/Installer.js index 1363c31..04c6d38 100644 --- a/www/cdvah/js/Installer.js +++ b/www/cdvah/js/Installer.js @@ -33,6 +33,7 @@ // Asset manifest is a cache of what files have been downloaded along with their etags. ret.appId = null; // Read from config.xml ret.appName = null; // Read from config.xml + ret.iconURL = null; // Read from config.xml ret.startPage = null; // Read from config.xml ret.plugins = {}; // Read from orig-cordova_plugins.js ret.appId = appId; @@ -73,8 +74,13 @@ self.appId = xmlDoc.firstChild.getAttribute('id'); var el = lastEl(xmlDoc.getElementsByTagName('content')); self.startPage = el ? el.getAttribute('src') : 'index.html'; + el = lastEl(xmlDoc.getElementsByTagName('icon')); + self.iconURL = el ? el.getAttribute('src') : null; + if (self.iconURL) { + self.iconURL = self.directoryManager.rootURL + self.iconURL; + } el = lastEl(xmlDoc.getElementsByTagName('name')); - self.appName = el ? el.nodeValue : 'Unnamed'; + self.appName = el ? el.textContent : null; }); };