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