|

楼主 |
发表于 2013-4-27 08:44:37
|
显示全部楼层
本帖最后由 763558331wdp 于 2013-4-27 08:47 编辑
763558331wdp 发表于 2013-4-27 08:44 
方法调用的代码如下: var imageUrl = "";
var bo = false;
attachment.attachmentEditor = function(attachname, imgname) {
$(function() {
$('#attachmentEditor1' + ' a').live('mouseover', function() {
var $this = $(this);
var fileName = $this.html();
var type = fileName.substring(fileName.indexOf("."));
if (type == '.jpg') {
debugger;
bo = false;
$this.attr('onclick', 'function() {return;}');
} else {
bo = true;
}
});
});
if (bo == false) {
alert(bo);
$('#' + attachname + ' a ').live(
'click',
Myclick = function() {
var $this = $(this);
debugger;
if ($this.attr('name').indexOf('_docDisplay') != -1) {
var docpath = $this.attr('docpath');
var fileID = $this.attr('fileID');
var url = justep.Doc.getdocServerAction(docpath,
'/repository/file/view/' + fileID
+ '/last/content');
imageUrl = url;
var pic = document.getElementById(imgname);
pic.src = imageUrl;
}
});
}
};- mainActivity.tabPage4Select = function(event) {
- attachment.attachmentEditor('attachmentEditor1', 'image1');
-
- };
复制代码 |
|