css stuff

This commit is contained in:
Jon Lambson 2017-09-27 15:29:35 -06:00
parent 2acc8cb2b4
commit 3cad78d26b
4 changed files with 46 additions and 17 deletions

View File

@ -351,8 +351,8 @@ label.tree_label:hover { color: #666; }
Tree expanded icon Tree expanded icon
*/ */
label.tree_label:before { label.tree_label:before {
background: #000; /*background: #000;*/
color: #fff; color: #000;
position: relative; position: relative;
z-index: 1; z-index: 1;
float: left; float: left;
@ -360,7 +360,8 @@ label.tree_label:before {
width: 1em; width: 1em;
height: 1em; height: 1em;
border-radius: 1em; border-radius: 1em;
content: '+'; font-family: FontAwesome;
content: '\f07b';
text-align: center; text-align: center;
line-height: .9em; line-height: .9em;
} }
@ -394,8 +395,39 @@ label.tree_label:before {
content: ''; content: '';
} }
.tree_label.filez:after {
position: absolute;
font-family: FontAwesome;
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: '\f15c';
}
label.tree_label:active:before, label.tree_label:hover:before {
position: absolute;
font-family: FontAwesome;
top: 0;
display: block;
height: 0.5em;
width: 1em;
border-bottom: 1px solid #777;
border-left: 1px solid #777;
border-radius: 0 0 0 .3em;
content: '\f07c';
}
.breadcrumbs-list:last-child {
color: #777;
}
label.tree_label:after { border-bottom: 0; } label.tree_label:after { border-bottom: 0; }
ul.tree.files-only.ls-none {
margin-left: 30px;
}
:checked ~ label.tree_label:after { :checked ~ label.tree_label:after {
border-radius: 0 .3em 0 0; border-radius: 0 .3em 0 0;
border-top: 1px solid #777; border-top: 1px solid #777;

View File

@ -357,10 +357,9 @@ app.controller('websiteCtrl', [
return this; return this;
}; };
// TODO: finish thissssssss
vm.breadcrumbs = ['Root']; vm.breadcrumbs = ['Root'];
vm.breadcrumbsPath = ['/']; vm.breadcrumbsPath = ['/'];
vm.blah = false; vm.breadcrumbPathClicked = false;
vm.Sites.contents = function (r) { vm.Sites.contents = function (r) {
vm.siteResults = r; vm.siteResults = r;
vm.directoryPath = r.newPath; vm.directoryPath = r.newPath;
@ -376,12 +375,11 @@ app.controller('websiteCtrl', [
vm.breadcrumbs.push(path); vm.breadcrumbs.push(path);
vm.breadcrumbsPath.push(path); vm.breadcrumbsPath.push(path);
} }
if (vm.blah) { if (vm.breadcrumbPathClicked) {
if (path === 'Root') { if (path === 'Root') {
vm.breadcrumbs = ['Root']; vm.breadcrumbs = ['Root'];
vm.breadcrumbsPath = ['/']; vm.breadcrumbsPath = ['/'];
vm.activePath = 'active' vm.breadcrumbPathClicked = false;
vm.blah = false;
} else { } else {
var breadcrumbsPath = vm.breadcrumbsPath; var breadcrumbsPath = vm.breadcrumbsPath;
var breadcrumbs = vm.breadcrumbs; var breadcrumbs = vm.breadcrumbs;
@ -422,11 +420,11 @@ app.controller('websiteCtrl', [
vm.getSiteContents(path, site); vm.getSiteContents(path, site);
}; };
vm.doSomething = function (x) { vm.getDirectoriesFromBreadcrumbs = function (dir) {
vm.blah = true; vm.breadcrumbPathClicked = true;
vm.siteDirectories = []; vm.siteDirectories = [];
vm.siteFiles = []; vm.siteFiles = [];
vm.getSiteContents(x); vm.getSiteContents(dir);
}; };
vm.Shares = {}; vm.Shares = {};

View File

@ -176,7 +176,7 @@
<!-- <div class="form-group"> <!-- <div class="form-group">
<input type="text" class="form-control" ng-model="r.newPath" placeholder="Ex: Directory Name" /> <input type="text" class="form-control" ng-model="r.newPath" placeholder="Ex: Directory Name" />
</div> --> </div> -->
<button class="btn btn-info trigger-search" ng-click="vm.Sites.contents(r)">List Files</button> <button class="btn btn-info trigger-search" ng-click="vm.Sites.contents(r)">List Root Files</button>
<div class="white-well" ng-show="vm.showListFiles"> <div class="white-well" ng-show="vm.showListFiles">
<file-tree r="r"></file-tree> <file-tree r="r"></file-tree>
</div> </div>

View File

@ -2,9 +2,8 @@
<div class="row"> <div class="row">
<ul class="breadcrumb"> <ul class="breadcrumb">
<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> <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>
<li ng-repeat="breadcrumb in vm.breadcrumbs track by $index" class="{{ vm.activePath }}"> <li ng-repeat="breadcrumb in vm.breadcrumbs track by $index" ng-click="vm.getDirectoriesFromBreadcrumbs(breadcrumb)" data="{{ breadcrumb }}" class="cp breadcrumbs-list">
<a ng-click="vm.doSomething(breadcrumb)" data="{{ breadcrumb }}">{{ breadcrumb }}</a> {{ breadcrumb }}
<!-- <li class="active">Data</li> -->
</li> </li>
</ul> </ul>
</div> </div>
@ -15,9 +14,9 @@
<label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory)" data="{{ directory }}">{{ directory }}</label> <label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory)" data="{{ directory }}">{{ directory }}</label>
</li> </li>
</ul> </ul>
<ul class="tree ls-none"> <ul class="tree files-only ls-none">
<li ng-repeat="file in vm.siteFiles track by $index"> <li ng-repeat="file in vm.siteFiles track by $index">
<span class="tree_label">{{ file }}</span> <span class="tree_label filez">{{ file }}</span>
</li> </li>
</ul> </ul>
</div> </div>