Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ctf0 committed Jul 20, 2017
1 parent 83fc729 commit 9fbda5a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/resources/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var manager = new Vue({
$('#file_loader').show()
this.searchFor = ''
this.showFilesOfType('all')
this.currentFilterName = null
this.showBy = null

if (folders != '/') {
var folder_location = '/' + folders.join('/')
Expand Down Expand Up @@ -247,10 +247,12 @@ var manager = new Vue({
}
if (val == 'all') {
this.filterdList = []
this.currentFilterName = null
} else {
this.filterdList = this.files.items.filter((item) => {
return this.fileTypeIs(item, val)
})
this.currentFilterName = val
}

if (!this.isBulkSelecting()) {
Expand All @@ -261,7 +263,6 @@ var manager = new Vue({
this.updateSearchCount()
}

this.currentFilterName = val
},
filterDir(dir) {
// dont show dirs that have similarity with selected item(s)
Expand Down Expand Up @@ -407,9 +408,6 @@ var manager = new Vue({
allFiles(newVal, oldVal) {
if (newVal.length < 1) {
$('#no_files').fadeIn()
if (this.currentFilterName == 'all') {
this.currentFilterName = null
}
} else {
$('#no_files').hide()
}
Expand Down

0 comments on commit 9fbda5a

Please sign in to comment.