MDL-31901: filemanger: fixed bug with switching to treeview in empty folder
authorMarina Glancy <marina@moodle.com>
Mon, 7 May 2012 03:03:23 +0000 (11:03 +0800)
committerMarina Glancy <marina@moodle.com>
Mon, 21 May 2012 03:57:52 +0000 (11:57 +0800)
lib/form/filemanager.js

index 5933303..bf2ab08 100644 (file)
@@ -450,7 +450,7 @@ M.form_filemanager.init = function(Y, options) {
         },
         view_files: function(appendfiles) {
             this.filemanager.removeClass('fm-updating').removeClass('fm-noitems');
-            if ((appendfiles == null) && (!this.options.list || this.options.list.length == 0)) {
+            if ((appendfiles == null) && (!this.options.list || this.options.list.length == 0) && this.viewmode != 2) {
                 this.filemanager.addClass('fm-noitems');
                 return;
             }