|
|
@@ -24795,19 +24795,29 @@ UE.plugin.register('insertfile', function (){ |
|
|
|
|
|
|
|
var i, item, icon, title, |
|
|
|
html = '', |
|
|
|
URL = me.getOpt('UEDITOR_HOME_URL'), |
|
|
|
iconDir = URL + (URL.substr(URL.length - 1) == '/' ? '':'/') + 'dialogs/attachment/fileTypeImages/'; |
|
|
|
|
|
|
|
// 原代码 |
|
|
|
// URL = me.getOpt('UEDITOR_HOME_URL'), |
|
|
|
// iconDir = URL + (URL.substr(URL.length - 1) == '/' ? '':'/') + 'dialogs/attachment/fileTypeImages/'; |
|
|
|
// 去掉地址的域名 |
|
|
|
URL = '/Content/ueditor/', |
|
|
|
iconDir = URL + 'dialogs/attachment/fileTypeImages/'; |
|
|
|
|
|
|
|
for (i = 0; i < filelist.length; i++) { |
|
|
|
item = filelist[i]; |
|
|
|
icon = iconDir + getFileIcon(item.url); |
|
|
|
title = item.title || item.url.substr(item.url.lastIndexOf('/') + 1); |
|
|
|
// html += '<p style="line-height: 16px;">' + |
|
|
|
// '<img style="vertical-align: middle; margin-right: 2px;" src="'+ icon + '" _src="' + icon + '" />' + |
|
|
|
// '<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' + |
|
|
|
// '</p>'; |
|
|
|
|
|
|
|
// 原代码 |
|
|
|
html += '<p style="line-height: 16px;">' + |
|
|
|
'<img style="vertical-align: middle; margin-right: 2px;" src="'+ icon + '" _src="' + icon + '" />' + |
|
|
|
'<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' + |
|
|
|
'</p>'; |
|
|
|
// 去除图标 |
|
|
|
// html += '<p style="line-height: 16px;">' + |
|
|
|
// '<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' + |
|
|
|
// '</p>'; |
|
|
|
|
|
|
|
} |
|
|
|
me.execCommand('insertHtml', html); |
|
|
|
} |
|
|
|