You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2012/08/01 18:39:08 UTC

[7/48] git commit: removed bind + report methods, removed dep on classList

removed bind + report methods, removed dep on classList


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/commit/f8ae936f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/tree/f8ae936f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/diff/f8ae936f

Branch: refs/heads/master
Commit: f8ae936fede5424d2077c54b681e9f4471e6b829
Parents: d0a751c
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jul 18 16:10:41 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jul 18 16:10:41 2012 -0700

----------------------------------------------------------------------
 www/js/index.js |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/blob/f8ae936f/www/js/index.js
----------------------------------------------------------------------
diff --git a/www/js/index.js b/www/js/index.js
index f3894b8..bd37862 100644
--- a/www/js/index.js
+++ b/www/js/index.js
@@ -1,15 +1,10 @@
 var app = {
     initialize: function() {
-        this.bind();
-    },
-    bind: function() {
         document.addEventListener('deviceready', this.deviceready, false);
     },
     deviceready: function() {
-        app.report('deviceready');
-    },
-    report: function(id) {
-        document.querySelector('#' + id + ' .pending').classList.add('hide');
-        document.querySelector('#' + id + ' .complete').classList.remove('hide');
+        document.querySelector('#deviceready .pending').className += ' hide';
+        var completeElem = document.querySelector('#deviceready .complete');
+        completeElem.className = completeElem.className.split('hide').join('');
     }
 };