|
4#
楼主 |
发表于 2008-12-26 11:03:24
|
只看该作者
回复#2
你好,这里是图片。谢谢!
实际上这是一个Portal的PDM里的上传功能,其他网站的上传我测过,没有问题。 使用JS写的上传脚本。回放的时候这个对应的 toolbar就无法显示了。具体JS如下:
红色部分是进行响应的URL,同一个session内持续有效,不同session就无效了。 自动关联找不到。
<script>
var PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389 = new WcfToolbar("toolbar");
if ( PC_7_ESM5DFH2009KC02F6LCG3210K5_view.addChild )
PC_7_ESM5DFH2009KC02F6LCG3210K5_view.addChild(PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389);
var onSelectionChange = function(event,eventObj) {
var selection = event.properties['selection'];
for (var i=0; i<PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389.children.length; i++)
{
var child = PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389.children;
if ( child && child.selectionConstraint )
{
var bEnabled = child.selectionConstraint(selection);
if ( bEnabled )
child.enable();
else
child.disable();
}
}
};
PC_7_ESM5DFH2009KC02F6LCG3210K5_controller.addListener(WCF_SELECTION_CHANGE_EVENT_ID,onSelectionChange);
var registerNewMenuItems = function(id, object, sourceData) {
if ( sourceData && sourceData.length > 9 )
object.selectionConstraint = sourceData[9];
PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389.addChild(object);
}
</script><div><SCRIPT Language="javascript" TYPE="text/javascript">
var PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0 = new WcfButton('PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0',true,new WcfWclButtonStyle(),'PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0', "Import File", "Upload a new document into the current folder", "/wps/images/icons/Import_Task.gif", "PC_7_ESM5DFH2009KC02F6LCG3210K5_view.executeCommandUrl(\'/wps/myportal/!ut/p/c1/04_SB8K8xLLM9MSSzPy8xBz9CP0os3jXYF9TFzcPIwN3V3cnAyM3TydfHxN3AwMTY6B8pFm8n79RqJuJp6GhhZmroYGRmYeJk0-Yp4G7izEB3eEg-_DrB8kb4ACOBvp-Hvm5qfoFuREGWSaOigAvgkFZ/dl2/d1/L0lDU0NTSUpKZ2tLQ2xFS0NsRUtDbEVLQ2xFS0NsRUtDbEVLQ2xFQSEvWU8wRUFBQUlJQ0lBQU1NTU1LS01JR09CT0JHT0pGSkZHSk5ETkRHTkxITEhHTFBBdkFtUElrb2ttSXNpc2ltTWdBISEvNEJFaWNHalRvMDVOMmtMb2lUSnVLSGttUzhVZkpNbjRvQlNaSUpSQ2t5WVNoRkprb2xHS1RKeEtDUSEhLzdfRVNNNURGSDIwMDlLQzAyRjZMQ0czMjEwSzUvRlcyS0YxMi9jdi5wYXRoLyUwL2RtLmNvbGxhdGVPcmRlci9hc2NlbmRpbmcvZG0ucGFnZS8xL2NvbW1hbmRJZC93Y2YuY21kLkNoYW5nZVZpZXcjMTQ3L2RtLmZvbGRlci8lMGNvbnRlbnRSb290JTBpY206bGlicmFyaWVzWzhdL2FJZC9lLmNtZC52aWV3L3ZJZC9kbS52aWV3LkNvbnRlbnQ!/#7_ESM5DFH2009KC02F6LCG3210K5\',false);");
PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0.selectionConstraint = null;
PC_7_ESM5DFH2009KC02F6LCG3210K5_tbr91854389.addChild(PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0);
PC_7_ESM5DFH2009KC02F6LCG3210K5_btn_0.writeHtml();
</script> |
|