Last active
July 25, 2017 16:58
-
-
Save Vishwas1/073f88d134ba38995f6a247fefd2d55d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Utility = { | |
onFileSystemSuccess : function(){ | |
fileSystem.getDirectory("batch", { | |
create: false, | |
exclusive: false | |
}, onGetDirectorySuccess, onGetDirectoryFail); | |
} | |
}; | |
function onGetDirectorySuccess(dir) | |
{ | |
dir.getFile('product.json', { | |
create: false, | |
exclusive: false | |
}, gotFileEntry, onError); | |
} | |
function onGetDirectoryFail(err) | |
{ | |
console.log('Direcotory Error :'+err); | |
} | |
//////////////////////////////////// | |
function gotFileEntry(dir){ | |
Dialog.create({ | |
title: 'Confirm', | |
message: 'Select option to progress..', | |
buttons: [ | |
{ | |
label: 'Synch', | |
handler () { | |
console.log('Synching to server...') | |
} | |
}, | |
{ | |
label: 'Continue', | |
handler () { | |
console.log('Please wait..!') | |
} | |
} | |
] | |
}); | |
} | |
function onError(e) { | |
console.log(e); | |
Dialog.create({ | |
title: 'Confirm', | |
message: 'Select option to progress..', | |
buttons: [ | |
{ | |
label: 'Continue', | |
handler () { | |
console.log('Please wait..!') | |
} | |
} | |
] | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment