Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
5cb599ae
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5cb599ae
编写于
10月 25, 2010
作者:
N
nilspreusker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switched from HTML select to YUI menu button for artifact actions, links and downloads
上级
f3d602dc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
71 deletion
+28
-71
modules/activiti-webapp-cycle/src/main/webapp/components/artifact/artifact.css
...pp-cycle/src/main/webapp/components/artifact/artifact.css
+4
-6
modules/activiti-webapp-cycle/src/main/webapp/components/artifact/artifact.js
...app-cycle/src/main/webapp/components/artifact/artifact.js
+24
-65
未找到文件。
modules/activiti-webapp-cycle/src/main/webapp/components/artifact/artifact.css
浏览文件 @
5cb599ae
...
...
@@ -30,11 +30,9 @@
}
#options-div
.active
{
border-bottom
:
1px
dotted
#EEEEEE
;
border-top
:
1px
dotted
#EEEEEE
;
padding
:
5px
;
margin-bottom
:
15px
;
background-color
:
#FFFFF9
;
float
:
right
;
position
:
relative
;
z-index
:
2
;
}
#artifact-actions
,
#artifact-links
,
#artifact-downloads
{
...
...
@@ -42,7 +40,7 @@
margin-right
:
15px
;
}
#artifact-div
.yui-navset
div
.loading
div
{
#artifact-div
.yui-navset
div
.loading
{
background
:
url("/activiti-cycle/res/images/loading.gif")
no-repeat
scroll
center
center
transparent
;
height
:
8em
;
}
...
...
modules/activiti-webapp-cycle/src/main/webapp/components/artifact/artifact.js
浏览文件 @
5cb599ae
...
...
@@ -98,13 +98,6 @@
// Update the heading that displays the name of the selected node
headerEl
.
id
=
"
header-
"
+
eventValue
.
repositoryNodeId
;
headerEl
.
innerHTML
=
eventValue
.
name
;
var
myTooltip
=
new
YAHOO
.
widget
.
Tooltip
(
"
myTooltip
"
,
{
context
:
headerEl
.
id
,
text
:
"
You have hovered over myContextEl.
"
,
showDelay
:
500
});
}
},
...
...
@@ -161,66 +154,36 @@
// Select the active tab without firing an event (last parameter is 'silent=true')
this
.
_tabView
.
set
(
"
activeTab
"
,
this
.
_tabView
.
getTab
(
this
.
_activeTabIndex
),
true
);
//
Create
the options panel
var
optionsDiv
=
document
.
getElementById
(
"
options-div
"
);
//YAHOO.util.Selector.query('div', 'artifact-div', true);
//
Get
the options panel
var
optionsDiv
=
document
.
getElementById
(
"
options-div
"
);
// Add a dropdown for the actions
if
(
artifactJson
.
actions
.
length
>
0
)
{
var
actionsDiv
=
document
.
createElement
(
"
div
"
);
actionsDiv
.
setAttribute
(
'
id
'
,
"
artifact-actions
"
);
actionsDiv
.
appendChild
(
document
.
createTextNode
(
"
Actions:
"
));
var
actionsDropdown
=
document
.
createElement
(
"
select
"
);
actionsDropdown
.
setAttribute
(
'
name
'
,
"
Actions
"
);
var
option
=
document
.
createElement
(
"
option
"
);
option
.
appendChild
(
document
.
createTextNode
(
"
choose an action...
"
));
actionsDropdown
.
appendChild
(
option
);
// Add a dropdowns for actions, links and downloads
if
(
artifactJson
.
actions
.
length
>
0
||
artifactJson
.
links
.
length
>
0
||
artifactJson
.
downloads
.
length
>
0
)
{
var
optionsMenuItems
=
[];
var
actions
=
[];
for
(
i
=
0
;
i
<
artifactJson
.
actions
.
length
;
i
++
)
{
option
=
document
.
createElement
(
"
option
"
);
option
.
setAttribute
(
'
value
'
,
artifactJson
.
connectorId
+
"
#TOKEN#
"
+
artifactJson
.
artifactId
+
"
#TOKEN#
"
+
artifactJson
.
actions
[
i
].
name
);
option
.
appendChild
(
document
.
createTextNode
(
artifactJson
.
actions
[
i
].
label
));
actionsDropdown
.
appendChild
(
option
);
YAHOO
.
util
.
Event
.
addListener
(
option
,
"
click
"
,
this
.
onExecuteActionClick
);
actions
.
push
({
text
:
artifactJson
.
actions
[
i
].
label
,
value
:
{
connectorId
:
artifactJson
.
connectorId
,
artifactId
:
artifactJson
.
artifactId
,
actionName
:
artifactJson
.
actions
[
i
].
name
},
onclick
:
{
fn
:
this
.
onExecuteActionClick
}
});
}
actionsDiv
.
appendChild
(
actionsDropdown
);
optionsDiv
.
appendChild
(
actionsDiv
);
}
if
(
artifactJson
.
links
.
length
>
0
)
{
var
linksDiv
=
document
.
createElement
(
"
div
"
);
linksDiv
.
setAttribute
(
'
id
'
,
"
artifact-links
"
);
linksDiv
.
appendChild
(
document
.
createTextNode
(
"
Links:
"
));
if
(
actions
.
length
>
0
)
{
optionsMenuItems
.
push
(
actions
);
}
var
links
=
[];
for
(
i
=
0
;
i
<
artifactJson
.
links
.
length
;
i
++
)
{
var
link
=
document
.
createElement
(
"
a
"
);
link
.
setAttribute
(
'
href
'
,
artifactJson
.
links
[
i
].
url
);
link
.
setAttribute
(
'
title
'
,
artifactJson
.
links
[
i
].
label
);
link
.
setAttribute
(
'
target
'
,
"
blank
"
);
link
.
appendChild
(
document
.
createTextNode
(
artifactJson
.
links
[
i
].
label
));
linksDiv
.
appendChild
(
link
);
if
(
i
<
(
artifactJson
.
links
.
length
-
1
))
{
linksDiv
.
appendChild
(
document
.
createTextNode
(
"
|
"
));
}
links
.
push
({
text
:
artifactJson
.
links
[
i
].
label
,
url
:
artifactJson
.
links
[
i
].
url
,
target
:
"
_blank
"
});
}
optionsDiv
.
appendChild
(
linksDiv
);
}
// Add download links if available
if
(
artifactJson
.
downloads
.
length
>
0
)
{
var
downloadsDiv
=
document
.
createElement
(
"
div
"
);
downloadsDiv
.
setAttribute
(
'
id
'
,
"
artifact-downloads
"
);
downloadsDiv
.
appendChild
(
document
.
createTextNode
(
"
Downloads:
"
));
if
(
links
.
length
>
0
)
{
optionsMenuItems
.
push
(
links
);
}
var
downloads
=
[];
for
(
i
=
0
;
i
<
artifactJson
.
downloads
.
length
;
i
++
)
{
var
link1
=
document
.
createElement
(
"
a
"
);
link1
.
setAttribute
(
'
href
'
,
artifactJson
.
downloads
[
i
].
url
);
link1
.
setAttribute
(
'
title
'
,
artifactJson
.
downloads
[
i
].
name
+
"
(
"
+
artifactJson
.
downloads
[
i
].
type
+
"
)
"
);
link1
.
setAttribute
(
'
target
'
,
"
blank
"
);
link1
.
appendChild
(
document
.
createTextNode
(
artifactJson
.
downloads
[
i
].
name
));
downloadsDiv
.
appendChild
(
link1
);
if
(
i
<
(
artifactJson
.
downloads
.
length
-
1
))
{
downloadsDiv
.
appendChild
(
document
.
createTextNode
(
"
|
"
));
}
downloads
.
push
({
text
:
artifactJson
.
downloads
[
i
].
label
,
url
:
artifactJson
.
downloads
[
i
].
url
,
target
:
"
_blank
"
});
}
optionsDiv
.
appendChild
(
downloadsDiv
);
}
if
(
downloads
.
length
>
0
)
{
optionsMenuItems
.
push
(
downloads
);
}
var
optionsMenu
=
new
YAHOO
.
widget
.
Button
({
type
:
"
menu
"
,
label
:
"
Options
"
,
name
:
"
options
"
,
menu
:
optionsMenuItems
,
container
:
optionsDiv
});
}
var
clearDiv
=
document
.
createElement
(
'
div
'
);
clearDiv
.
setAttribute
(
'
style
'
,
'
clear: both
'
);
optionsDiv
.
appendChild
(
clearDiv
);
...
...
@@ -321,11 +284,7 @@
onExecuteActionClick
:
function
Artifact_onExecuteActionClick
(
e
)
{
var
connectorId
=
this
.
value
.
split
(
"
#TOKEN#
"
)[
0
];
var
artifactId
=
this
.
value
.
split
(
"
#TOKEN#
"
)[
1
];
var
actionName
=
this
.
value
.
split
(
"
#TOKEN#
"
)[
2
];
return
new
Activiti
.
widget
.
ExecuteArtifactActionForm
(
this
.
id
+
"
-executeArtifactActionForm
"
,
connectorId
,
artifactId
,
actionName
);
return
new
Activiti
.
widget
.
ExecuteArtifactActionForm
(
this
.
id
+
"
-executeArtifactActionForm
"
,
this
.
value
.
connectorId
,
this
.
value
.
artifactId
,
this
.
value
.
actionName
);
},
onTabDataLoaded
:
function
Artifact_onTabDataLoaded
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录