Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35337138
behavior-workflow.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
994 B
Subscribers
None
behavior-workflow.js
View Options
/**
* @provides javelin-behavior-workflow
* @requires javelin-behavior
* javelin-stratcom
* javelin-workflow
* javelin-dom
*/
JX
.
behavior
(
'workflow'
,
function
()
{
// Listen for both real
JX
.
Stratcom
.
listen
(
[
'submit'
,
'didSyntheticSubmit'
],
[
'workflow'
,
'tag:form'
],
function
(
e
)
{
if
(
JX
.
Stratcom
.
pass
())
{
return
;
}
var
target
=
e
.
getNode
(
'workflow'
);
e
.
prevent
();
JX
.
Workflow
.
newFromForm
(
target
).
start
();
});
JX
.
Stratcom
.
listen
(
'click'
,
[
'workflow'
,
'tag:a'
],
function
(
e
)
{
if
(
!
e
.
isNormalClick
())
{
return
;
}
var
target
=
e
.
getNode
(
'workflow'
);
if
(
!
JX
.
DOM
.
isType
(
target
,
'a'
))
{
// This covers the case of an <a /> without workflow inside a <form />
// with workflow.
return
;
}
if
(
JX
.
Stratcom
.
pass
())
{
return
;
}
e
.
prevent
();
JX
.
Workflow
.
newFromLink
(
target
).
start
();
});
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 6, 8:14 AM (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8a/dd/05b49cf5d3ca9fbc3faf6a410a30
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment