Added notification when a new share has completed

This commit is contained in:
Jon Lambson 2017-11-02 10:14:58 -06:00
parent b897d8275a
commit d97c6ab369
1 changed files with 7 additions and 2 deletions

View File

@ -566,7 +566,9 @@ app.controller('websiteCtrl', [
vm.shareFolderFrom = function (r, opts) {
var sharePath;
if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
if (vm.breadcrumbsPath === undefined && vm.breadcrumbs === undefined) {
sharePath = '/';
} else if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
sharePath = '/';
} else {
sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
@ -608,7 +610,10 @@ app.controller('websiteCtrl', [
var arr = r.sharedWith || [];
arr.push(result.data);
r.sharedWith = arr;
window.alert(JSON.stringify(result.data));
var path = result.data.path;
var person = result.data.comment;
var msg = "You have shared " + "'" + path + "'" + ' with ' + person + ".";
vm.buildNotification(result, msg);
});
};