|
@@ -79,19 +79,19 @@ KindEditor.plugin('filemanager', function(K) {
|
|
|
}
|
|
|
var elList = [];
|
|
|
function bindEvent(el, result, data, createFunc) {
|
|
|
- var fileUrl = K.formatUrl(result.current_url + data.filename, 'absolute'),
|
|
|
- dirPath = encodeURIComponent(result.current_dir_path + data.filename + '/');
|
|
|
+ var fileUrl = K.formatUrl(result.current_url + data.file, 'absolute'),
|
|
|
+ dirPath = encodeURIComponent(result.current_dir_path + data.file + '/');
|
|
|
if (data.is_dir) {
|
|
|
el.click(function(e) {
|
|
|
reloadPage(dirPath, orderTypeBox.val(), createFunc);
|
|
|
});
|
|
|
} else if (data.is_photo) {
|
|
|
el.click(function(e) {
|
|
|
- clickFn.call(this, fileUrl, data.filename);
|
|
|
+ clickFn.call(this, fileUrl, data.file);
|
|
|
});
|
|
|
} else {
|
|
|
el.click(function(e) {
|
|
|
- clickFn.call(this, fileUrl, data.filename);
|
|
|
+ clickFn.call(this, fileUrl, data.file);
|
|
|
});
|
|
|
}
|
|
|
elList.push(el);
|
|
@@ -167,7 +167,8 @@ KindEditor.plugin('filemanager', function(K) {
|
|
|
K(this).removeClass('ke-on');
|
|
|
});
|
|
|
div.append(photoDiv);
|
|
|
- var fileUrl = result.current_url + data.filename,
|
|
|
+ alert(data.file);
|
|
|
+ var fileUrl = result.current_url + data.file,
|
|
|
iconUrl = data.is_dir ? imgPath + 'folder-64.gif' : (data.is_photo ? fileUrl : imgPath + 'file-64.gif');
|
|
|
var img = K('<img src="' + iconUrl + '" width="80" height="80" alt="' + data.filename + '" />');
|
|
|
if (!data.is_dir || data.has_file) {
|