fixed some weird hiding and showing

This commit is contained in:
Jon Lambson 2017-10-25 14:39:49 -06:00
parent dfc0bd65a2
commit fabac7b5f2
3 changed files with 18 additions and 16 deletions

View File

@ -227,11 +227,10 @@ app.controller('websiteCtrl', [
if (result.data.error) {
var msg = vm.newFileUploaded + " has encountered an error. " + result.data.error.message + '.';
} else {
var msg = vm.newFileUploaded + " has been uploaded";
var msg = vm.newFileUploaded + " has been uploaded.";
}
opts.progress.uploadTotal = 0;
vm.buildNotification(result, msg);
// window.alert(JSON.stringify(result));
});
};
@ -246,7 +245,6 @@ app.controller('websiteCtrl', [
var sub;
var sld;
var tld;
debugger;
/*
//vm.unlock('webpreneur');
if (!vm.currentFiles || !vm.currentFiles.length) {
@ -392,6 +390,11 @@ app.controller('websiteCtrl', [
return vm.cleanedPath;
};
vm.closeFileUploadsContainers = function () {
vm.uploadFolderContainer = false;
vm.uploadFileContainer = false;
};
vm.Sites.contents = function (r, dir) {
vm.siteFiles = [];
vm.siteDirectories = [];
@ -523,7 +526,6 @@ app.controller('websiteCtrl', [
}).then(function (result) {
var msg = "'"+ vm.pathRemoved + "'" + ' has been removed';
vm.buildNotification(result, msg);
window.alert(JSON.stringify(result));
});
};

View File

@ -141,7 +141,7 @@
<div class="row">
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.showAction('invite')" class="cp">
<a ng-click="vm.showAction('invite'); vm.closeFileUploadsContainers();" class="cp">
<div class="ssb-icon"><i class="fa fa-share-square-o" aria-hidden="true"></i></div>
<h2 class="ssb-title">Invite</h2>
</a>
@ -149,7 +149,7 @@
</div>
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.showAction('shares'); vm.Shares.list(r)" class="cp">
<a ng-click="vm.showAction('shares'); vm.Shares.list(r); vm.closeFileUploadsContainers();" class="cp">
<div class="ssb-icon"> <i class="fa fa-list-alt" aria-hidden="true"></i> </div>
<h2 class="ssb-title">Shares</h2>
</a>
@ -157,7 +157,7 @@
</div>
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.cleanArrays(); vm.showAction('files'); vm.Sites.allContents(r);" class="cp trigger-files-list-refresh">
<a ng-click="vm.cleanArrays(); vm.showAction('files'); vm.Sites.allContents(r); vm.closeFileUploadsContainers();" class="cp trigger-files-list-refresh">
<div class="ssb-icon"><i class="fa fa-sitemap" aria-hidden="true"></i></div>
<h2 class="ssb-title">Files</h2>
</a>
@ -175,7 +175,7 @@
</div>
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.Sites.archive(r)" class="cp">
<a ng-click="vm.Sites.archive(r); vm.closeFileUploadsContainers();" class="cp">
<div class="ssb-icon"><i class="fa fa-file-archive-o" aria-hidden="true"></i></div>
<h2 class="ssb-title">Download</h2>
</a>
@ -183,7 +183,7 @@
</div>
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.deleteWebsite(r, r)" class="cp">
<a ng-click="vm.deleteWebsite(r, r); vm.closeFileUploadsContainers();" class="cp">
<div class="ssb-icon"><i class="fa fa-trash" aria-hidden="true"></i></div>
<h2 class="ssb-title">Delete</h2>
</a>

View File

@ -1,7 +1,7 @@
<div class="text-left" ng-hide="vm.displayFileTree">
<div class="row">
<ul class="breadcrumb">
<li ng-repeat="breadcrumb in vm.breadcrumbs track by $index" ng-click="vm.getDirectoriesFromBreadcrumbs(breadcrumb);" data="{{ breadcrumb }}" class="cp breadcrumbs-list">
<li ng-repeat="breadcrumb in vm.breadcrumbs track by $index" ng-click="vm.getDirectoriesFromBreadcrumbs(breadcrumb); vm.closeFileUploadsContainers();" data="{{ breadcrumb }}" class="cp breadcrumbs-list">
{{ breadcrumb | capitalize }}
</li>
</ul>
@ -14,12 +14,12 @@
<ul class="tree ls-none">
<li class="directories-go-here" ng-repeat="directory in vm.siteDirectories track by $index">
<input type="checkbox" id="{{ r.challenge }}{{ $index }}" />
<label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory);" data="{{ directory }}">{{ directory }}</label><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, directory)" data="{{ directory }}" ><i class="fa fa-trash"></i></button></span>
<label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory); vm.closeFileUploadsContainers();" data="{{ directory }}">{{ directory }}</label><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, directory); vm.closeFileUploadsContainers();" data="{{ directory }}" ><i class="fa fa-trash"></i></button></span>
</li>
</ul>
<ul class="tree files-only ls-none">
<li ng-repeat="file in vm.siteFiles track by $index">
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file)" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
</li>
</ul>
<div class="folder-actions">
@ -27,14 +27,14 @@
<div>
<button ng-if="r.shareAccess.invite" type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.showAction('invite');">Share folder</button>
<ul class="ls-none folder-actions-list">
<li ng-if="r.shareAccess.write"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.autoPopulateFolderName();" class="cp">Upload files</a></span></li>
<li ng-if="r.shareAccess.write"><span><i class="fa fa-folder cp"></i> <a ng-click="vm.cleanPath();" class="cp">New folder</a></span></li>
<li ng-if="r.shareAccess.write"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.autoPopulateFolderName(); vm.uploadFileContainer = true; vm.uploadFolderContainer = false;" class="cp">Upload files</a></span></li>
<li ng-if="r.shareAccess.write"><span><i class="fa fa-folder cp"></i> <a ng-click="vm.uploadFolderContainer = true; vm.uploadFileContainer = false;" class="cp">New folder</a></span></li>
<li ng-if="r.shareAccess.write"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.breadcrumbsPath.join('/'), r);" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} Folder</a></span></li>
</ul>
</div>
</div>
<div class="upload-container">
<form>
<form ng-show="vm.uploadFileContainer">
<hr>
<div>
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
@ -46,7 +46,7 @@
<button ng-click="vm.Sites.upload(r)" type="button" name="button" class="btn btn-success" >Add File</button>
</div>
</form>
<form class="form-inline">
<form class="form-inline" ng-show="vm.uploadFolderContainer">
<hr>
<ul class="ls-none">
<li class="add-folder">