Custom Ui direct update

This commit is contained in:
Eudes Inácio
2021-04-07 09:13:07 +01:00
parent a84fdfee68
commit 116db6e8d3
6 changed files with 125 additions and 4 deletions
+22
View File
@@ -0,0 +1,22 @@
function wlCommonInit(){
// Override the default Direct Update interface.
//uncomment below function to get custom DU
wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData, directUpdateContext) {
// Create a dialog.
navigator.notification.confirm(
'Custom dialog body text',
// Handle dialog buttons.
function(buttonIndex) {
if (buttonIndex == 1) {
directUpdateContext.start();
} else {
wl_directUpdateChallengeHandler.submitFailure();
}
},
'Custom dialog title text',
['Update']
);
};
}