(fix #154) show toast upon subscribtion - strings will be added in separate commit
This commit is contained in:
parent
cfe6a30d64
commit
89ae2a3d8d
|
@ -297,8 +297,12 @@
|
||||||
*/
|
*/
|
||||||
function subscribeToFolder(addressbookData) {
|
function subscribeToFolder(addressbookData) {
|
||||||
console.debug('subscribeToFolder ' + addressbookData.owner + addressbookData.name);
|
console.debug('subscribeToFolder ' + addressbookData.owner + addressbookData.name);
|
||||||
AddressBook.$subscribe(addressbookData.owner, addressbookData.name).catch(function(data) {
|
AddressBook.$subscribe(addressbookData.owner, addressbookData.name).then(function(data) {
|
||||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
$mdToast.show(
|
||||||
|
$mdToast.simple()
|
||||||
|
.content(l('Sucessfully subscribed to address book'))
|
||||||
|
.position('top right')
|
||||||
|
.hideDelay(3000));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,8 +313,12 @@
|
||||||
// Callback of sgSubscribe directive
|
// Callback of sgSubscribe directive
|
||||||
function subscribeToFolder(calendarData) {
|
function subscribeToFolder(calendarData) {
|
||||||
$log.debug('subscribeToFolder ' + calendarData.owner + calendarData.name);
|
$log.debug('subscribeToFolder ' + calendarData.owner + calendarData.name);
|
||||||
Calendar.$subscribe(calendarData.owner, calendarData.name).catch(function(data) {
|
Calendar.$subscribe(calendarData.owner, calendarData.name).then(function(data) {
|
||||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
$mdToast.show(
|
||||||
|
$mdToast.simple()
|
||||||
|
.content(l('Sucessfully subscribed to calendar'))
|
||||||
|
.position('top right')
|
||||||
|
.hideDelay(3000));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue