LgcAssetBrowser_wev8.js
2.26 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
/**
'*********************************
'Show the lgc selecting browser.
'@author lupeng
'@version 04/08/03
'*********************************
'****************************************************************************************
'Show the lgc selecting browser, not need.
'@param inputname the hidden or not input object name, it stores the selected lgc's id.
'@param spanname the span object name, it shows the selected lgc's name.
'****************************************************************************************
*/
function onShowLgcAsset(inputname, spanname) {
onShowLgcAssetBase(inputname, spanname, false);
}
/**
'****************************************************************************************
'Show the lgc selecting browser, need.
'@param inputname the hidden or not input object name, it stores the selected lgc's id.
'@param spanname the span object name, it shows the selected lgc's name.
'****************************************************************************************
*/
function onShowLgcAssetNeeded(inputname, spanname) {
onShowLgcAssetBase(inputname, spanname, true);
}
/**
'****************************************************************************************
'Show the lgc selecting browser, the base function.
'@param inputname the hidden or not input object name, it stores the selected lgc's id.
'@param spanname the span object name, it shows the selected lgc's name.
'@param needed the flag that whether or not to need input.
'****************************************************************************************
*/
function onShowLgcAssetBase(inputname, spanname, needed) {
var retValue = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/lgc/asset/LgcAssetBrowser.jsp", "", "dialogWidth:550px;dialogHeight:550px;");
if (retValue != null) {
if (wuiUtil.getJsonValueByIndex(retValue, 0) != "" ) {
$G(spanname).innerHTML = "<A href='/lgc/asset/LgcAsset.jsp?paraid=" + wuiUtil.getJsonValueByIndex(retValue, 0) + "'>" + wuiUtil.getJsonValueByIndex(retValue, 1) + "</A>";
$G(inputname).value = wuiUtil.getJsonValueByIndex(retValue, 0);
} else {
$G(inputname).value = "";
if (needed) {
$G(spanname).innerHTML = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>";
} else {
$G(spanname).innerHTML = "";
}
}
}
}