Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F15612867
MultiComboBox.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MultiComboBox.js
View Options
/*
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if
(
!
dojo
.
_hasResource
[
"dojox.form.MultiComboBox"
]){
dojo
.
_hasResource
[
"dojox.form.MultiComboBox"
]
=
true
;
dojo
.
provide
(
"dojox.form.MultiComboBox"
);
dojo
.
experimental
(
"dojox.form.MultiComboBox"
);
dojo
.
require
(
"dijit.form.ComboBox"
);
dojo
.
require
(
"dijit.form.ValidationTextBox"
);
dojo
.
declare
(
"dojox.form.MultiComboBox"
,[
dijit
.
form
.
ValidationTextBox
,
dijit
.
form
.
ComboBoxMixin
],{
delimiter
:
","
,
_previousMatches
:
false
,
_setValueAttr
:
function
(
_1
){
if
(
this
.
delimiter
&&
_1
.
length
!=
0
){
_1
=
_1
+
this
.
delimiter
+
" "
;
arguments
[
0
]
=
this
.
_addPreviousMatches
(
_1
);
}
this
.
inherited
(
arguments
);
},
_addPreviousMatches
:
function
(
_2
){
if
(
this
.
_previousMatches
){
if
(
!
_2
.
match
(
new
RegExp
(
"^"
+
this
.
_previousMatches
))){
_2
=
this
.
_previousMatches
+
_2
;
}
_2
=
this
.
_cleanupDelimiters
(
_2
);
}
return
_2
;
},
_cleanupDelimiters
:
function
(
_3
){
if
(
this
.
delimiter
){
_3
=
_3
.
replace
(
new
RegExp
(
" +"
),
" "
);
_3
=
_3
.
replace
(
new
RegExp
(
"^ *"
+
this
.
delimiter
+
"* *"
),
""
);
_3
=
_3
.
replace
(
new
RegExp
(
this
.
delimiter
+
" *"
+
this
.
delimiter
),
this
.
delimiter
);
}
return
_3
;
},
_autoCompleteText
:
function
(
_4
){
arguments
[
0
]
=
this
.
_addPreviousMatches
(
_4
);
this
.
inherited
(
arguments
);
},
_startSearch
:
function
(
_5
){
_5
=
this
.
_cleanupDelimiters
(
_5
);
var
re
=
new
RegExp
(
"^.*"
+
this
.
delimiter
+
" *"
);
if
((
this
.
_previousMatches
=
_5
.
match
(
re
))){
arguments
[
0
]
=
_5
.
replace
(
re
,
""
);
}
this
.
inherited
(
arguments
);
}});
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 25, 20:41 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26289
Default Alt Text
MultiComboBox.js (1 KB)
Attached To
Mode
rZED Zed
Attached
Detach File
Event Timeline
Log In to Comment