This commit is contained in:
Jon Lambson 2017-10-05 17:34:27 -06:00
rodzic d7ca0346ec
commit 60d1cd0716
3 zmienionych plików z 69 dodań i 27 usunięć

Wyświetl plik

@ -636,27 +636,59 @@ h2.ssb-title {
multiselect {
display:block;
display:block;
}
multiselect .btn {
width: 100%;
background-color: #FFF;
width: 100%;
display: inline-block;
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #333333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
border: 1px solid #cccccc;
border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
.btn .caret {
margin-top: 9px;
}
multiselect .btn.error{
border: 1px solid #da4f49 !important;
border: 1px solid #da4f49 !important;
}
multiselect .dropdown-menu {
max-height: 300px;
overflow-y: auto;
max-height: 300px;
overflow-y: auto;
}
multiselect .dropdown-menu {
width: 100%;
box-sizing: border-box;
padding: 2px;
width: 100%;
margin-top: -2px;
box-sizing: border-box;
padding: 2px;
}
multiselect .dropdown-menu > li > a {
padding: 3px 10px;
cursor:pointer;
padding: 3px 10px;
cursor:pointer;
}
.icon-ok:before {
content: "\f00c";
@ -676,7 +708,9 @@ multiselect .dropdown-menu > li > a {
color: #000;
font-size: 14px;
}
.error-notice {
margin-bottom: 15px;
}
.error-notice .oaerror {
width: 95%; /* Configure it fit in your design */
margin: 0 auto; /* Centering Stuff */

Wyświetl plik

@ -7,6 +7,7 @@ var app = window.app;
//
// TODO modularize for reuse
function analyzeFile(file, vm) {
vm.triggerFileRefresh = 'changed';
vm.isZip = /\.zip$/.test(file.name);
vm.unzip = vm.isZip;
vm.stripZip = vm.isZip;
@ -73,7 +74,9 @@ app.controller('websiteCtrl', [
var vm = this;
var angular = window.angular;
vm.domains = [];
vm.copyUploadPath = '';
vm.displaySpinner = '';
vm.deleteAll = '';
vm.alertNotification = {
hidden: 'hidden'
};
@ -203,7 +206,6 @@ app.controller('websiteCtrl', [
});
};
vm._uploadFile = function (pkg, opts) {
debugger;
vm.newFileUploaded = opts.newFile.name;
opts.progress = opts.progress || opts;
return pkg.add({
@ -336,6 +338,7 @@ app.controller('websiteCtrl', [
};
vm.Sites.setUpload = function (r) {
console.log("Hey! At least it can tell if there's a change!");
if (r.newFile === undefined) {
r.newFile = vm.newFile;
}
@ -348,6 +351,8 @@ app.controller('websiteCtrl', [
if (r.uploadPath === undefined) {
r.uploadPath = vm.autoPopulateWebPath;
}
vm.copyUploadPath = r.uploadPath;
vm.copyr = r;
var pkg = Auth.oauth3.pkg('www@daplie.com');
//analyzeFile(r.newFile, r);
vm._uploadFile(pkg, r);
@ -396,6 +401,7 @@ app.controller('websiteCtrl', [
confirmMessage = "Delete all files for this site?";
opts.path = '/';
opts.confirm = true;
vm.deleteAll = 'true';
} else if (path.includes(".")) {
confirmMessage = "Delete this file?";
if (vm.autoPopulateWebPath === undefined) {
@ -536,12 +542,12 @@ app.controller('websiteCtrl', [
};
vm.triggerDeleteFolder = function (folder, r) {
console.log('DELETE FOLDER ->', folder);
vm.deleteFilesFrom(r, folder);
};
vm.Shares = {};
vm.Shares.invite = function (r) {
vm.domainName = r.domain;
if (vm.copiedShareMode === undefined) {
r.shareMode = '';
} else {
@ -722,8 +728,8 @@ app.controller('websiteCtrl', [
vm.websiteTiles = true;
vm.showBackBtn = true;
vm.displayFileTree = true;
if (vm.autoPopulateWebPath === undefined) {
vm.autoPopulateWebPath = '/';
if (vm.currentFolder === undefined) {
vm.currentFolder = 'All Folders/Files';
}
break;
case 'shares':
@ -741,8 +747,6 @@ app.controller('websiteCtrl', [
};
vm.buildNotification = function (result, msg) {
console.log('THE RESULT ->', result);
console.log('THE MSG', msg);
if (result.data.error) {
vm.alertNotification = {
className: 'danger',

Wyświetl plik

@ -156,7 +156,7 @@
</div>
<div class="col-md-3">
<div class="square-service-block">
<a ng-click="vm.showAction('files'); vm.Sites.contents(r)" class="cp">
<a ng-click="vm.showAction('files'); vm.Sites.contents(r)" 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>
@ -191,22 +191,26 @@
</div>
</div>
<div ng-show="vm.showInviteContainer">
<h1><i class="fa fa-folder"></i> Name</h1>
<h1><i class="fa fa-folder"></i> {{ vm.currentFolder | capitalize }}</h1>
<form class="form-horizontal">
<div class="form-group">
<label class="col-md-1 control-label" for="">To:</label>
<div class="col-md-10">
<div class="col-md-8">
<input type="text" ng-model="r.shareEmail" class="form-control" placeholder="ex: john@example.com" />
<input type="hidden" ng-model="vm.autoPopulateWebPath" class="form-control" placeholder="/" disabled />
</div>
<div class="col-md-3">
<multiselect class="input-xlarge" multiple="true"
ng-model="selectedAccess"
options="c.name for c in accessLevel"
change="selected()">
</multiselect>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-success text-center" ng-click="vm.Shares.invite(r)">Share</button>
</div>
<multiselect class="input-xlarge" multiple="true"
ng-model="selectedAccess"
options="c.name for c in accessLevel"
change="selected()">
</multiselect>
<button type="submit" class="btn btn-success" ng-click="vm.Shares.invite(r)">Invite</button>
</form>
</div>
<div ng-show="vm.showSharesContainer">