doesnt work

This commit is contained in:
Jon Lambson 2017-10-04 13:35:28 -06:00
parent 7ce1d1b850
commit 5cc01ded59
3 changed files with 9 additions and 6 deletions

View File

@ -320,6 +320,9 @@ app.controller('websiteCtrl', [
}; };
vm.Sites.setUpload = function (r) { vm.Sites.setUpload = function (r) {
console.log("Hey! At least it can tell if there's a change!"); console.log("Hey! At least it can tell if there's a change!");
if (r.newFile === undefined) {
r.newFile = vm.newFile;
}
analyzeFile(r.newFile, r); analyzeFile(r.newFile, r);
vm.showCompleteFileUploadBtn = true; vm.showCompleteFileUploadBtn = true;
console.log(r); console.log(r);
@ -352,7 +355,6 @@ app.controller('websiteCtrl', [
vm.Sites.remove = function (r, opts) { vm.Sites.remove = function (r, opts) {
var pkg = Auth.oauth3.pkg('www@daplie.com'); var pkg = Auth.oauth3.pkg('www@daplie.com');
debugger;
return pkg.remove({ return pkg.remove({
hostname: r.domain hostname: r.domain
@ -645,6 +647,7 @@ app.controller('websiteCtrl', [
$scope.$watch('vm.selectedDomain', function (domainSelected) { $scope.$watch('vm.selectedDomain', function (domainSelected) {
if (domainSelected !== undefined) { if (domainSelected !== undefined) {
vm.dom = domainSelected.description;
vm.selectDomain(vm.selectedDomain.description); vm.selectDomain(vm.selectedDomain.description);
} }
}); });

View File

@ -55,7 +55,7 @@
<div class="input-group"> <div class="input-group">
<div> <div>
<label>Select .zip upload</label> <label>Select .zip upload</label>
<input type="file" class="js-file-upload this-has-a-special-non-angular-event-handler" /> <input type="file" ng-model="vm.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(vm.dom)" />
</div> </div>
<div ng-if="vm.isZip" > <div ng-if="vm.isZip" >
<label> <label>

View File

@ -11,12 +11,12 @@
<ul class="tree ls-none"> <ul class="tree ls-none">
<li class="directories-go-here" ng-repeat="directory in vm.siteDirectories track by $index"> <li class="directories-go-here" ng-repeat="directory in vm.siteDirectories track by $index">
<input type="checkbox" id="{{ r.challenge }}{{ $index }}" /> <input type="checkbox" id="{{ r.challenge }}{{ $index }}" />
<label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory); vm.showUploadContainer = false; vm.showUploadFolderContainer = false; vm.showUploadFilesContainer = false;" data="{{ directory }}">{{ directory }}</label><span class="pull-right"><button type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, directory)" data="{{ directory }}" data="{{ r }}"><i class="fa fa-trash"></i></button></span> <label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory); vm.showUploadContainer = false; vm.showUploadFolderContainer = false; vm.showUploadFilesContainer = false;" data="{{ directory }}">{{ directory }}</label><span class="pull-right"><button type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, directory)" data="{{ directory }}" ><i class="fa fa-trash"></i></button></span>
</li> </li>
</ul> </ul>
<ul class="tree files-only 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 filez">{{ file }}</span><span class="pull-right"><button type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file)" data="{{ file }}" data="{{ r }}"><i class="fa fa-trash"></i></button></span><br> <span class="tree_label filez">{{ file }}</span><span class="pull-right"><button 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>
</li> </li>
</ul> </ul>
<div class="folder-actions"> <div class="folder-actions">
@ -27,7 +27,7 @@
<ul class="ls-none folder-actions-list"> <ul class="ls-none folder-actions-list">
<li class="" ng-hide="vm.showFolderAction"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.showUploadFilesContainer = true; vm.autoPopulateFolderName(); vm.showUploadFolderContainer = false;" class="cp">Upload files</a></span></li> <li class="" ng-hide="vm.showFolderAction"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.showUploadFilesContainer = true; vm.autoPopulateFolderName(); vm.showUploadFolderContainer = false;" class="cp">Upload files</a></span></li>
<li class=""><span><i class="fa fa-folder cp"></i> <a ng-click="vm.showUploadFolderContainer = true; vm.cleanPath(); vm.showUploadFilesContainer = false;" class="cp">New folder</a></span></li> <li class=""><span><i class="fa fa-folder cp"></i> <a ng-click="vm.showUploadFolderContainer = true; vm.cleanPath(); vm.showUploadFilesContainer = false;" class="cp">New folder</a></span></li>
<li ng-hide="vm.showUploadButton"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r)" data="{{ vm.currentFolder }}" data="{{ r }}" class="cp">Delete {{ vm.currentFolder | capitalize }} Folder</a></span></li> <li ng-hide="vm.showUploadButton"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r)" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} Folder</a></span></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -49,7 +49,7 @@
<ul class="ls-none"> <ul class="ls-none">
<li class="add-folder"> <li class="add-folder">
<span> <span>
<i class="fa fa-folder"></i> <input type="text" class="form-control {{ vm.hideFolderInput }}" ng-model="vm.autoPopulateWebPath" ng-blur="vm.createNewFolder(r)" data="{{ r }}" style="width: 85%;"/> <i class="fa fa-folder"></i> <input type="text" class="form-control {{ vm.hideFolderInput }}" ng-model="vm.autoPopulateWebPath" ng-blur="vm.createNewFolder(r)" style="width: 85%;"/>
<label ng-show="vm.showFileUploadBtn">{{ vm.autoPopulateWebPath }}</label> <label ng-show="vm.showFileUploadBtn">{{ vm.autoPopulateWebPath }}</label>
</span> </span>
</li> </li>