mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-01-14 08:57:53 -05:00
27 lines
909 B
JavaScript
Executable File
27 lines
909 B
JavaScript
Executable File
|
|
|
|
var app = {
|
|
initialize: function() {
|
|
this.bind();
|
|
},
|
|
bind: function() {
|
|
document.addEventListener('deviceready', this.deviceready, false);
|
|
},
|
|
deviceready: function() {
|
|
// note that this is an event handler so the scope is that of the event
|
|
// so we need to call app.report(), and not this.report()
|
|
app.report('deviceready');
|
|
|
|
},
|
|
report: function(id) {
|
|
console.log("report:" + id);
|
|
// hide the .pending <p> and show the .complete <p>
|
|
document.querySelector('#' + id + ' .pending').className += ' hide';
|
|
var completeElem = document.querySelector('#' + id + ' .complete');
|
|
completeElem.className = completeElem.className.split('hide').join('');
|
|
},
|
|
openExternalDoc: function() {
|
|
ExternalFileUtil.openWith( "http://www.tricedesigns.com/temp/drm.pdf", "com.adobe.pdf" );
|
|
}
|
|
};
|