summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/details/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/lib/views/details/files.js')
-rw-r--r--public/assets/js/lib/views/details/files.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js
index 915f90b..beed3e6 100644
--- a/public/assets/js/lib/views/details/files.js
+++ b/public/assets/js/lib/views/details/files.js
@@ -16,12 +16,17 @@ var FilesView = FormView.extend({
},
load: function(files, thread){
- if (! files.length) {
+ this.files = this.options.parent.data.files
+ window.ok = this.options.parent
+ if (! this.files.length) {
+ console.log("hiding")
this.$el.hide()
+ }else{
+ console.log("showing")
+ this.$el.show()
}
var total = 0, has_music = false
- this.files = this.files.concat(files)
this.thread = thread || this.thread
this.files.forEach(function(file){
if (is_image(file.filename)) {
@@ -44,7 +49,6 @@ var FilesView = FormView.extend({
}
},
- files: [],
sortedFiles: [],
currentSort: 'name',
reversed: false,