added some stuff

This commit is contained in:
Jon Lambson 2017-09-20 15:53:42 -06:00
parent 451d6e578a
commit b07b484f9f
3 changed files with 39 additions and 181 deletions

View File

@ -298,117 +298,3 @@
list-style: none;
-webkit-padding-start: 0px;
}
/*
Tree core styles
*/
.tree { margin: 1em; }
.tree input {
position: absolute;
clip: rect(0, 0, 0, 0);
}
.tree input ~ ul { display: none; }
.tree input:checked ~ ul { display: block; }
/*
Tree rows
*/
.tree li {
line-height: 1.2;
position: relative;
padding: 0 0 1em 1em;
}
.tree ul li { padding: 1em 0 0 1em; }
.tree > li:last-child { padding-bottom: 0; }
/*
Tree labels
*/
.tree_label {
position: relative;
display: inline-block;
background: #fff;
}
label.tree_label { cursor: pointer; }
label.tree_label:hover { color: #666; }
/*
Tree expanded icon
*/
label.tree_label:before {
background: #000;
color: #fff;
position: relative;
z-index: 1;
float: left;
margin: 0 1em 0 -2em;
width: 1em;
height: 1em;
border-radius: 1em;
content: '+';
text-align: center;
line-height: .9em;
}
:checked ~ label.tree_label:before { content: ''; }
/*
Tree branches
*/
/*.tree li:before {
position: absolute;
top: 0;
bottom: 0;
left: -.5em;
display: block;
width: 0;
border-left: 1px solid #777;
content: "";
}*/
.tree_label:after {
position: absolute;
top: 0;
left: -1.5em;
display: block;
height: 0.5em;
width: 1em;
border-bottom: 1px solid #777;
border-left: 1px solid #777;
border-radius: 0 0 0 .3em;
content: '';
}
label.tree_label:after { border-bottom: 0; }
:checked ~ label.tree_label:after {
border-radius: 0 .3em 0 0;
border-top: 1px solid #777;
border-right: 1px solid #777;
border-bottom: 0;
border-left: 0;
bottom: 0;
top: 0.5em;
height: auto;
}
.tree li:last-child:before {
height: 1em;
bottom: auto;
}
.tree > li:last-child:before { display: none; }
.tree_custom {
display: block;
background: #eee;
padding: 1em;
border-radius: 0.3em;
}

View File

@ -347,15 +347,18 @@ app.controller('websiteCtrl', [
//, sub: r.sub
, path: r.newPath
}).then(function (result) {
// window.alert(JSON.stringify(result));
vm.fileTree = result;
console.log(result);
console.log('data ' , result.data);
result.data.forEach(function(file) {
vm.directories = [];
vm.files = [];
window.alert(JSON.stringify(result.data));
result.data.forEach(function(dir) {
if (dir.directory) {
vm.directories.push(dir.name);
} else if (dir.file) {
vm.files.push(dir.name);
}
});
});
};
vm.Shares = {};
vm.Shares.invite = function (r) {
var pkg = Auth.oauth3.pkg('www@daplie.com');

View File

@ -5,7 +5,7 @@
<button class="btn btn-primary btn-lg" title="..." data-toggle="modal" data-target=".create-website-modal">
Create Website
</button>
<hr>
<div class="modal fade create-website-modal" tabindex="-1" role="dialog" aria-labelledby="create-website-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
@ -87,7 +87,6 @@
</div>
</div>
<div class="invite-card-container">
<div class="invite-option">
<h1>Invite Code</h1>
@ -105,6 +104,8 @@
</div>
</div>
<hr>
<div class="row">
<div>
<table class="table table-striped">
@ -144,9 +145,10 @@
</form>
<form class="form-inline text-center">
<h4 class="text-left">Shares:</h4>
<button class="btn btn-info" ng-click="vm.Shares.list(r)" ng-hide="vm.showSharesList">View Shares</button>
<button class="btn btn-info" ng-click="vm.Shares.list(r)" ng-hide="vm.showSharesList">View Shared With</button>
<button class="btn btn-info" ng-click="vm.showSharesList = false" ng-show="vm.showSharesList">Hide Shares</button>
<div class="white-well" ng-show="vm.showSharesList">
<span class="text-muted" ng-if="r.sharedWith.length === 1">Currently not shared with anyone...</span>
<ul class="shares-container" ng-repeat="share in r.sharedWith" ng-if="!share.me">
<li>
<div class="media">
@ -159,7 +161,7 @@
<p><b>Actions Allowed:</b> <span ng-bind="share.mode">rwx</span></p>
</div>
<div class="media-right align-self-center">
<button class="btn btn-danger" ng-click="vm.Shares.remove(r, share)"><i class="fa fa-trash"></i></button>
<button class="btn btn-danger" ng-click="vm.Shares.remove(r, share)">Remove Access</button>
</div>
</div>
</li>
@ -169,59 +171,32 @@
<form class="form-inline text-center">
<h4 class="text-left">List Files:</h4>
<div class="form-group">
<input type="text" class="form-control" ng-model="r.newPath" placeholder="/" />
<input type="text" class="form-control" ng-model="r.newPath" placeholder="Ex: Directory Name" />
</div>
<button class="btn btn-info" ng-click="vm.Sites.contents(r)">List Files</button>
<button class="btn btn-primary" ng-click="vm.showListFiles = false" ng-show="vm.showListFiles">Hide Files</button>
<button class="btn btn-info trigger-search" ng-click="vm.Sites.contents(r)">List Files</button>
<div class="white-well" ng-show="vm.showListFiles">
<div class="">
<span>{{ vm.fileTree }}</span>
<button type="button" class="close" ng-click="vm.showListFiles = false" ng-show="vm.showListFiles"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<div class="text-left">
<h4>Directories</h4>
<ul class="ls-none" ng-repeat="directory in vm.directories track by $index">
<li>{{ directory }}</li>
</ul>
<h4>Files</h4>
<ul class="ls-none" ng-repeat="file in vm.files track by $index">
<li>{{ file }}</li>
</ul>
</div>
<ul class="tree ls-none">
<li class="ls-none">
<input type="checkbox" id="c1" />
<label class="tree_label" for="c1">Level 0</label>
<ul class="ls-none">
<li class="ls-none">
<input type="checkbox" id="c2" />
<label for="c2" class="tree_label">Level 1</label>
<ul class="ls-none">
<li><span class="tree_label">Level 2</span></li>
<li><span class="tree_label">Level 2</span></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="tree ls-none">
<li class="ls-none">
<input type="checkbox" id="c1" />
<label class="tree_label" for="c1">Level 0</label>
<ul class="ls-none">
<li class="ls-none">
<input type="checkbox" id="c2" />
<label for="c2" class="tree_label">Level 1</label>
<ul class="ls-none">
<li><span class="tree_label">Level 2</span></li>
<li><span class="tree_label">Level 2</span></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</form>
<div class="">
<h4 class="text-left">Select Upload:</h4>
<h4 class="text-left">Upload Files:</h4>
<div>
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
@ -270,16 +245,14 @@
<!--
<div class="home-container">
<div class="white-well">
<h1>Create a new Website</h1>
<h3>Select a Domain</h3>
<div class="input-group">
<input type="text" class="form-control" placeholder="www" ng-model="vm.newRecord" ng-change="vm.setRecord()" />
<div class="input-group-btn">
<!-- Single button -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span>
</button>
@ -302,7 +275,7 @@
match-class="highlight">
</div>
<!-- <input type="text" class="form-control" placeholder="Select a domain" aria-label="Domain Name" ng-model="vm.newDomain" ng-change="vm.setDomain()" /> -->
<input type="text" class="form-control" placeholder="Select a domain" aria-label="Domain Name" ng-model="vm.newDomain" ng-change="vm.setDomain()" />
<div class="input-group-btn">
<div class="btn-group">
<button type="button" class="btn btn-default trigger-dropdown" aria-haspopup="true" aria-expanded="false" ng-click="vm.triggerDropdown()"><span class="caret"></span>
@ -313,10 +286,8 @@
</div>
<div class="panel panel-default">
<div class="panel-body">
<!--
Choose or create a public shared folder <button class="btn btn-default">Select Daplie Folder</button>
<br>
-->
<div class="input-group">
<div><label>Select .zip upload</label> <input type="file" class="js-file-upload this-has-a-special-non-angular-event-handler" /></div>
@ -324,7 +295,7 @@
<div ng-if="vm.unzip" ><label><input type="checkbox" ng-model="vm.stripZip" /> Strip zip directory root</label></div>
<!-- div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div -->
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>
<div ng-if="vm.uploadTotal"><span ng-bind="vm.uploadPercent">99</span>% | <span ng-bind="vm.uploadProgress">1</span> MiB / <span ng-bind="vm.uploadTotal">100</span> MiB</div>
@ -332,18 +303,16 @@
</div>
</div>
</div>
<!--
<div class="panel panel-default">
<div class="panel-body">
Who can edit and upload to this site? <input placeholder="Type contact name or email address" type="text" class="form-control">
</div>
</div>
-->
<!-- <div class="form-group">
<div class="pull-right"> -->
<div class="form-group">
<div class="pull-right">
<button ng-click="vm.Sites.create()" type="button" name="button" class="btn btn-default">Create Website</button>
<!-- </div>
</div> -->
</div>
</div>
<div class="input-group">
<div><label>Invite Code</label> <input type="text" ng-model="vm.Shares.inviteToken" /></div>
<button ng-click="vm.Shares.accept()" type="button" name="button" class="btn btn-default">Accept Invite</button>
@ -357,11 +326,11 @@
<tr>
<td><a ng-href="https://{{r.domain}}" target="_blank" ng-bind="r.domain">example.com</a>
<a ng-href="{{r.download}}" target="_blank">Download</a>
<!-- button class="btn btn-link" ng-click="vm.Sites.archive(r)">download</button -->
<button class="btn btn-link" ng-click="vm.Sites.archive(r)">download</button>
<button class="btn btn-link" ng-click="vm.Sites.remove(r)">Clear</button></td>
<td>
<input type="text" ng-model="r.newPath" placeholder="/" />
<!-- <button class="btn btn-default" ng-click="vm.Sites.contents(r)">List Files</button> -->
<button class="btn btn-default" ng-click="vm.Sites.contents(r)">List Files</button>
</td>
<td ng-bind="r.path">Sites > blogs > blog.jane.smith.net</td>
<td><span ng-repeat="share in r.sharedWith" ng-if="!share.me">
@ -386,7 +355,7 @@
<div ng-if="r.unzip" ><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
<!-- div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div -->
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>
<div ng-if="r.uploadTotal"><span ng-bind="r.uploadPercent">99</span>% | <span ng-bind="r.uploadProgress">1</span> MiB / <span ng-bind="r.uploadTotal">100</span> MiB</div>
@ -396,4 +365,4 @@
</div>
</div>
</div>
</div>
</div> -->