DocDsp_wev8.js
3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
var DocAllPropPanel;
var DocSetTabPanel;
var DocContentPanel;
Ext.onReady(function(){
try{
onLoad();
} catch(e){}
//document.title=wmsg.base.view+":"+docTitle;
var strTable="<table><tr>";
if (canViewLog) {
strTable+="<td style='padding-right:5px'><a onClick='DocAllPropPanel.expand(true);DocSetTabPanel.setActiveTab(\"DocDetailLog\");'><img align='absmiddle' src='/images/docs/read_wev8.png'> "+wmsg.base.readcount+":<font color='red'>"+readCount_int+"</font></a></td>";
} else {
strTable+="<td style='padding-right:5px'><img align='absmiddle' src='/images/docs/read_wev8.png'> "+wmsg.base.readcount+":<font color='red'>"+readCount_int+"</font></td>";
}
if (canReplay) {
strTable+="<td style='padding-right:5px'><a onClick='DocAllPropPanel.expand(true);DocSetTabPanel.setActiveTab(\"DocReply\");'><img align='absmiddle' src='/images/docs/reply_wev8.png'> "+wmsg.base.replycount+":<font color='red' id='fontReply'>0</font></a></td>";
}
strTable+="<td width='100px'><a onClick='DocAllPropPanel.expand(true);DocSetTabPanel.setActiveTab(\"DocImgs\");'><img align='absmiddle' src='/images/docs/acc_wev8.png'> "+wmsg.base.acccount+":<font color='red' id='fontImgAcc'>0</font></a></td>"+
"<td width='16px'><img align='absmiddle' src='/images/docs/expand_wev8.png'></td>"+
"</tr></table> ";
var tt = new Ext.Template(
'<span style="width:100%;text-align:right;cursor:hand">'+strTable+'</span>'
);
tt.disableFormats = true;
tt.compile();
Ext.override(Ext.layout.BorderLayout.Region, {
toolTemplate:tt
});
//define DocSetTabPanel
DocSetTabPanel = new Ext.TabPanel({
id: 'DocAllPanel',
border: false,
activeTab: 0,
tabPosition: 'bottom',
items: [DocCommonExt.getDocPropPanel('divProp')]
});
DocSetTabPanel.add(DocCommonExt.getDocImgPanel(maxUploadImageSize,"view",docid,canEdit,""));
if (canReplay) {
DocSetTabPanel.add(DocCommonExt.getDocReplyPanel());
}
DocSetTabPanel.add(new DocShareSnip(docid,canShare).getGrid());
DocSetTabPanel.add(DocCommonExt.getDocVerPanel());
if(canViewLog){
DocSetTabPanel.add(getDocDetailLogPane(docid,500,300,true));
}
if (canDocMark) {
DocSetTabPanel.add(DocCommonExt.getDocMarkPanel());
}
if(relationable) {
DocSetTabPanel.add(new DocRelationable(docid).getGrid());
}
//define DocAllPropPanel
DocAllPropPanel=DocCommonExt.getDocAllPropPanel(isFromWf,DocSetTabPanel);
//define DocContentPanel
if(isPDF&&isPDF==1)
DocContentPanel=DocCommonExt.getDocPDFContentPanel(docTitle,"divContent",menubar,menubarForwf,isFromWf,"view",pagename,docid,isPDF,canPrint,canEdit,imagefileId);
else
DocContentPanel=DocCommonExt.getDocContentPanel(docTitle,"divContent",menubar,menubarForwf,isFromWf,"view",pagename,docid);
//define viewport
var viewport= new Ext.Viewport({
layout:'border',
items:[ DocContentPanel, DocAllPropPanel ]
});
Ext.get("divContentTab").on('resize', function(){
adjustContentHeight("resize");
});
adjustContentHeight("load");
if(isFromWf) {
try{
if(isFromWfTH && isFromWfSN){
Ext.getCmp('signature_id1').hide();
Ext.getCmp('signature_id2').hide();
}
Ext.getCmp('hide_id').hide();
} catch(e){}
}
DocCommonExt.finalDo("view");
document.getElementById("divContent").style.display = '';
try {
document.getElementById("divProp").style.display = '';
document.getElementById('rightMenu').style.visibility = "hidden";
document.getElementById("divMenu").style.display = '';
}
catch (e) {
}
try{
onLoadEnd();
} catch(e){}
if(isAutoExtendInfo&&isAutoExtendInfo>0&&accessorycount&&accessorycount>0){
DocAllPropPanel.expand(true);
DocSetTabPanel.setActiveTab("DocImgs");
}
});