Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multiselect
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
multiselect
Commits
e50c7c3a
Commit
e50c7c3a
authored
Apr 15, 2009
by
Mark Jarrell
Browse files
Options
Downloads
Patches
Plain Diff
Fixing typos from last two commits.
parent
6bab7759
Branches
Branches containing commit
Tags
6.x-1.3
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
multiselect.js
+5
-5
5 additions, 5 deletions
multiselect.js
multiselect.module
+5
-5
5 additions, 5 deletions
multiselect.module
with
10 additions
and
10 deletions
multiselect.js
+
5
−
5
View file @
e50c7c3a
...
...
@@ -46,7 +46,7 @@ $(document).ready(function() {
// usage $('nameofselectbox').selectAll();
jQuery
.
fn
.
selectAll
=
function
()
{
this
.
each
(
function
()
{
for
(
var
x
=
0
;
i
<
this
.
options
.
length
;
x
++
)
{
for
(
var
x
=
0
;
x
<
this
.
options
.
length
;
x
++
)
{
option
=
this
.
options
[
x
];
option
.
selected
=
true
;
}
...
...
@@ -58,8 +58,8 @@ jQuery.fn.selectAll = function() {
jQuery
.
fn
.
removeContentsFrom
=
function
()
{
dest
=
arguments
[
0
];
this
.
each
(
function
()
{
for
(
var
i
=
this
.
options
.
length
-
1
;
i
>=
0
;
i
--
)
{
dest
.
removeOption
(
this
.
options
[
i
].
value
);
for
(
var
x
=
this
.
options
.
length
-
1
;
x
>=
0
;
x
--
)
{
dest
.
removeOption
(
this
.
options
[
x
].
value
);
}
});
}
...
...
@@ -99,10 +99,10 @@ jQuery.fn.addOption = function() {
jQuery
.
fn
.
removeOption
=
function
()
{
targOption
=
arguments
[
0
];
this
.
each
(
function
()
{
for
(
var
i
=
this
.
options
.
length
-
1
;
i
>=
0
;
i
--
)
{
for
(
var
x
=
this
.
options
.
length
-
1
;
x
>=
0
;
x
--
)
{
option
=
this
.
options
[
i
];
if
(
option
.
value
==
targOption
)
{
this
.
remove
(
i
);
this
.
remove
(
x
);
}
}
});
...
...
...
...
This diff is collapsed.
Click to expand it.
multiselect.module
+
5
−
5
View file @
e50c7c3a
...
...
@@ -154,10 +154,10 @@ function multiselect_select_process($element, $edit, $form_state, $form) {
$unselected_options
=
array
();
$selected_options
=
array
();
if
(
$field
[
'type'
]
==
'userreference'
)
{
//d
rupal_set_message('element = '.print_r
($element)
)
;
//d
rupal_set_message('options = '.print_r
($options)
)
;
}
//
if ($field['type'] == 'userreference') {
//d
sm
($element);
//d
sm
($options);
//
}
// Add selected items to the array first
foreach
(
$element
[
'#value'
][
$field_key
]
as
$key
)
{
...
...
@@ -169,7 +169,7 @@ function multiselect_select_process($element, $edit, $form_state, $form) {
foreach
(
$options
as
$key
=>
$value
)
{
if
(
!
isset
(
$selected_options
[
$key
]))
{
$unselected_options
[
$key
]
=
$value
;
$selected_options
[
$key
]
=
$value
;
//
$selected_options[$key] = $value;
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment