- create_new_folder
- upload_file
+
+ create_new_folder
+ upload_file
+
+ manage_search
+
+
@@ -38,10 +44,6 @@
{{ currentSortType }}
-
-
-
this.onbackButtonPressed());
}
-
+
ngOnDestroy(): void {
var p: IonBackButtonDelegate
@@ -123,7 +125,7 @@ export class ShowFolderComponent implements OnInit, OnDestroy, AfterViewInit {
res.forEach(i => {
var localItem = new WSItem(i);
tmpItems$.push(localItem);
- if (segmentFilterFunction(localItem)){
+ if (segmentFilterFunction(localItem)) {
tmpFilteredBySegment$.push(localItem);
}
});
@@ -138,6 +140,12 @@ export class ShowFolderComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
+ changeSearchEnabled() {
+ this.searchenabled = !this.searchenabled;
+ if (!this.searchenabled)
+ this.searchCleared()
+ }
+
onbackButtonPressed() {
if (!this.root) {
console.log("back clicked (not root)");
@@ -166,15 +174,15 @@ export class ShowFolderComponent implements OnInit, OnDestroy, AfterViewInit {
filterBy(value: string) {
if (value == this.selectedSegment) return;
-
+
this.filtereBySearchItems = undefined;
this.selectedSegment = value;
-
+
if (this.selectedSegment == "all")
- this.filtereBySearchItems = this._items;
- else
+ this.filteredBySegmentItems = this._items;
+ else
this.filteredBySegmentItems = this._items?.filter(this.getSegmentFilterFunction());
-
+
if (this.currentSearch.length != 0)
this.filtereBySearchItems = this.filteredBySegmentItems?.filter(d => d.getTitle().toLowerCase().indexOf(this.currentSearch) > -1);
else this.filtereBySearchItems = this.filteredBySegmentItems;
@@ -197,13 +205,13 @@ export class ShowFolderComponent implements OnInit, OnDestroy, AfterViewInit {
updateSort() {
this._items = this._items?.sort(Sorting.getSortFunction(this.currentSortName, this.currentSortType));
-
+
if (this.selectedSegment == "all")
this.filteredBySegmentItems = this._items;
else
this.filteredBySegmentItems = this.filteredBySegmentItems?.sort(Sorting.getSortFunction(this.currentSortName, this.currentSortType));
-
- if (this.currentSearch.length!=0 )
+
+ if (this.currentSearch.length != 0)
this.filtereBySearchItems = this.filtereBySearchItems?.sort(Sorting.getSortFunction(this.currentSortName, this.currentSortType));
else this.filtereBySearchItems = this.filteredBySegmentItems;
}
@@ -214,9 +222,9 @@ export class ShowFolderComponent implements OnInit, OnDestroy, AfterViewInit {
this.filtereBySearchItems = this.filteredBySegmentItems?.filter(d => d.getTitle().toLowerCase().indexOf(query) > -1);
}
- searchCleared(){
+ searchCleared() {
this.currentSearch = "";
- this.filtereBySearchItems = this.filteredBySegmentItems
+ this.filtereBySearchItems = this.filteredBySegmentItems
}
itemClicked(item: WSItem) {
diff --git a/src/app/trash/trash.page.html b/src/app/trash/trash.page.html
index ce7f7c0..dfca5a2 100644
--- a/src/app/trash/trash.page.html
+++ b/src/app/trash/trash.page.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/app/vres/vres.page.html b/src/app/vres/vres.page.html
index f3817f7..cb6a3fc 100644
--- a/src/app/vres/vres.page.html
+++ b/src/app/vres/vres.page.html
@@ -1,3 +1,3 @@
-
+
diff --git a/src/app/vres/vres.page.ts b/src/app/vres/vres.page.ts
index c4c674e..b9563af 100644
--- a/src/app/vres/vres.page.ts
+++ b/src/app/vres/vres.page.ts
@@ -27,6 +27,10 @@ export class VresPage implements OnInit {
private route: ActivatedRoute,
private alertCtrl: AlertController) { }
+
+ enableCreateOperations() : boolean {
+ return this.getCurrentItem() != undefined;
+ }
ngOnInit() {
var folderId: string | undefined = this.route.snapshot.paramMap.get('folderId') || undefined;
diff --git a/src/app/ws/ws.page.html b/src/app/ws/ws.page.html
index cae9aa5..7e5d0be 100644
--- a/src/app/ws/ws.page.html
+++ b/src/app/ws/ws.page.html
@@ -1,3 +1,3 @@
-
+
diff --git a/src/app/ws/ws.page.ts b/src/app/ws/ws.page.ts
index 639c8c9..a1a3d57 100644
--- a/src/app/ws/ws.page.ts
+++ b/src/app/ws/ws.page.ts
@@ -92,4 +92,8 @@ export class WsPage implements OnInit {
return this.root ? "My Workspace" : this.item?.getTitle()
}
+ enableCreateOperations() : boolean {
+ return this.getCurrentItem() != undefined;
+ }
+
}