mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/PushNotification_Cordova' into developer
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
function wlCommonInit() {
|
||||
|
||||
WLAuthorizationManager.obtainAccessToken()
|
||||
|
||||
.then(
|
||||
|
||||
function (accessToken) {
|
||||
alert('Index sucsse: ', accessToken)
|
||||
|
||||
},
|
||||
|
||||
function (error) {
|
||||
alert('Index error: ', error)
|
||||
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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(
|
||||
'Actualização Disponivel',
|
||||
// Handle dialog buttons.
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 1) {
|
||||
directUpdateContext.start();
|
||||
} else {
|
||||
wl_directUpdateChallengeHandler.submitFailure();
|
||||
}
|
||||
},
|
||||
'ctualização Disponivel',
|
||||
['Actualizar']
|
||||
);
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user