}
// if it's not a text file.. download it..
- _this.viewLayout.load(baseURL+ '/Ftp/View' + s[0].data.id + '?html=1');
+ var mt = s[0].data.mimetype;
+ if (mt.match(/^text\//)) {
+ _this.viewLayout.load(baseURL+ '/Ftp/View' + s[0].data.id + '?html=1');
+ return;
+ }
+ if (mt.match(/\/xml$/)) {
+ _this.viewLayout.load(baseURL+ '/Ftp/View' + s[0].data.id + '?html=1');
+ return;
+ }
+ // download
+ new Pman.Download({
+ url: baseURL+ '/Ftp/View' + s[0].data.id;
+ })
+
+
}
}
}