added timeout to alerts

This commit is contained in:
Jon Lambson 2017-10-31 17:03:40 -06:00
parent 8f987882d2
commit e9d0ce0846
1 changed files with 23 additions and 7 deletions

View File

@ -617,13 +617,20 @@ app.controller('websiteCtrl', [
return pkg.acceptInvite({ return pkg.acceptInvite({
token: vm.Shares.inviteToken token: vm.Shares.inviteToken
}).then(function (result) { }).then(function (result) {
if (result.data.error) {
debugger;
var msg = result.data.error.message + '.';
vm.buildNotification(result, msg);
} else {
debugger;
var person = result.data.comment; var person = result.data.comment;
var path = result.data.path; var path = result.data.path;
var shareMode = result.data.mode; var shareMode = result.data.mode;
var domain = result.data.domain; var domain = result.data.domain;
var msg = 'You accepted a share ' + "'" + domain + "'" + ' from ' + person + '. Take a look at your vefrified websites below.'; var msg = 'You accepted a share ' + "'" + domain + "'" + ' from ' + person + '. Take a look at your verified websites below.';
vm.buildNotification(result, msg); vm.buildNotification(result, msg);
vm.listSites(); vm.listSites();
}
}); });
}; };
@ -861,6 +868,15 @@ app.controller('websiteCtrl', [
message: msg message: msg
}; };
} }
//Hide notification
$timeout(function() {
vm.alertNotification = {
className: '',
title: '',
hidden: 'hidden',
message: ''
};
}, 7000);
}; };
vm.closeAllOpenActions = function () { vm.closeAllOpenActions = function () {