Commit 8bc24775 authored by Servan42's avatar Servan42
Browse files

Fixed 86.

parent dcd696e3
<div style="width:100%;margin-bottom:5px;" ng-if="filesCtrl.parentFolder || filesCtrl.filePath.length>8">
<div style="margin:20px 0">
<button class="regular" style="display:inline-block; margin-right:5px;" ng-if="filesCtrl.parentFolder" ng-click="filesCtrl.getFile(filesCtrl.parentFolder);filesCtrl.getFileInfos(filesCtrl.parentFolder)" drop="filesCtrl.parentFolder" dropStyle="columnDrop" title="{{::_labels.parentFolder}}"> <span class="fa fa-arrow-left"></span></button>
<button class="regular" style="display:inline-block; margin-right:5px;" ng-if="filesCtrl.parentFolder" ng-click="filesCtrl.getFile(filesCtrl.parentFolder);filesCtrl.getFileInfos(filesCtrl.parentFolder)" drop="filesCtrl" dropStyle="columnDrop" title="{{::_labels.parentFolder}}"> <span class="fa fa-arrow-left"></span></button>
<span ng-if="filesCtrl.parentFolder" class="fa fa-folder"></span>
<span ng-if="filesCtrl.filePath.length>8">... <i class="fa fa-angle-right" aria-hidden="true"></i></span>
<span ng-repeat="file in filesCtrl.filePath track by $index" ng-if='$index>filesCtrl.filePath.length-8'>
......
<div style="width:100%;margin-bottom:5px;" ng-if="filesCtrl.parentFolder || filesCtrl.filePath.length>8">
<div style="margin:20px 0">
<button class="regular" style="display:inline-block; margin-right:5px;" ng-if="filesCtrl.parentFolder" ng-click="filesCtrl.getFile(filesCtrl.parentFolder);filesCtrl.getFileInfos(filesCtrl.parentFolder)" drop="filesCtrl.parentFolder" dropStyle="columnDrop" title="{{::_labels.parentFolder}}"> <span class="fa fa-arrow-left"></span></button>
<button class="regular" style="display:inline-block; margin-right:5px;" ng-if="filesCtrl.parentFolder" ng-click="filesCtrl.getFile(filesCtrl.parentFolder);filesCtrl.getFileInfos(filesCtrl.parentFolder)" drop="filesCtrl" dropStyle="columnDrop" title="{{::_labels.parentFolder}}"> <span class="fa fa-arrow-left"></span></button>
<span ng-if="filesCtrl.parentFolder" class="fa fa-folder"></span>
<span ng-if="filesCtrl.filePath.length>8">... <i class="fa fa-angle-right" aria-hidden="true"></i></span>
<span ng-repeat="file in filesCtrl.filePath track by $index" ng-if='$index>filesCtrl.filePath.length-8'>
......
......@@ -568,7 +568,7 @@ root.controller('FileOverviewCtrl', ['$scope', '$stateParams','$http','$dropList
filesCtrl.moveFile = function(fileId,newParentId){
var session = $scope._getSession();
if(!fileId) fileId = filesCtrl.selectedFile.id;
if(!newParentId) newParentId = filesCtrl.foldersTreeSelectedElement.id;
if(!newParentId && newParentId != 0) newParentId = filesCtrl.foldersTreeSelectedElement.id;
$fileFactory.move_file(fileId,newParentId,$scope._getProject(),function(data){
if(data.status == "success"){
var id;
......@@ -617,6 +617,7 @@ root.controller('FileOverviewCtrl', ['$scope', '$stateParams','$http','$dropList
}
$scope.$on('dropEvent', function(evt, dragged, dropped) {
if(dropped == filesCtrl) dropped = dropped.parentFolder;
filesCtrl.moveFile(dragged.id,dropped.id);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment