Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72550258
behavior-locate-file.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jul 15, 17:35
Size
767 B
Mime Type
text/x-Algol68
Expires
Wed, Jul 17, 17:35 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
19069287
Attached To
rPH Phabricator
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
)
{
JX
.
$U
(
config
.
browseBaseURI
+
r
.
ref
).
go
();
});
var
started
=
false
;
JX
.
DOM
.
listen
(
input
,
'click'
,
null
,
function
()
{
if
(
!
started
)
{
started
=
true
;
typeahead
.
start
();
}
});
});
Event Timeline
Log In to Comment