|
发表于 2016-8-12 09:36:36
|
显示全部楼层
1.click中如下修改:
<div class="x-attachment-item x-item-other" data-bind="click:$model.getModel().createFrame.bind($model.getModel(),$object),
2.js中的实现
- Model.prototype.createFrame = function(event){
- var docPath = event.docPath.get();
- var fileID = event.fileID.get();
- var url = DocUtils.InnerUtils.getdocServerAction({
- "docPath" : docPath,
- urlPattern : "/repository/file/view/" + fileID + "/last/content",
- isFormAction : false,
- context : this.getContext()
- });
- var iframe = document.createElement('iframe');
- iframe.src = url;
- iframe.setAttribute("scrolling", "no");
- iframe.setAttribute("frameborder", 0);
- iframe.style.position = "fixed";
- iframe.style.bottom = 0;
- iframe.style.left = 0;
- iframe.style.top = 0;
- iframe.style.width = "1366px";
- iframe.style.height = "768px";
- $(this.getElementByXid("window")).append(iframe);
- }
复制代码 |
|