Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891089
behavior-locate-file.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
885 B
Referenced Files
None
Subscribers
None
behavior-locate-file.js
View Options
/**
* @provides javelin-behavior-diffusion-locate-file
* @requires javelin-behavior
* javelin-diffusion-locate-file-source
* javelin-dom
* javelin-typeahead
* javelin-uri
*/
JX
.
behavior
(
'diffusion-locate-file'
,
function
(
config
)
{
var
control
=
JX
.
$
(
config
.
controlID
);
var
input
=
JX
.
$
(
config
.
inputID
);
var
datasource
=
new
JX
.
DiffusionLocateFileSource
(
config
.
uri
);
var
typeahead
=
new
JX
.
Typeahead
(
control
,
input
);
typeahead
.
setDatasource
(
datasource
);
typeahead
.
listen
(
'choose'
,
function
(
r
)
{
var
browseURI
=
config
.
browseBaseURI
+
r
.
ref
;
if
(
config
.
symbolicCommit
)
{
browseURI
+=
';'
+
config
.
symbolicCommit
;
}
JX
.
$U
(
browseURI
).
go
();
});
var
started
=
false
;
JX
.
DOM
.
listen
(
input
,
'click'
,
null
,
function
()
{
if
(
!
started
)
{
started
=
true
;
typeahead
.
start
();
}
});
});
File Metadata
Details
Attached
Mime Type
text/x-Algol68
Expires
Sun, Jan 19, 14:35 (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125567
Default Alt Text
behavior-locate-file.js (885 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment