Skip to content
Snippets Groups Projects
Commit e50c7c3a authored by Mark Jarrell's avatar Mark Jarrell
Browse files

Fixing typos from last two commits.

parent 6bab7759
Branches
Tags 6.x-1.3
No related merge requests found
......@@ -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);
}
}
});
......
......
......@@ -154,10 +154,10 @@ function multiselect_select_process($element, $edit, $form_state, $form) {
$unselected_options = array();
$selected_options = array();
if ($field['type'] == 'userreference') {
//drupal_set_message('element = '.print_r($element));
//drupal_set_message('options = '.print_r($options));
}
//if ($field['type'] == 'userreference') {
//dsm($element);
//dsm($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;
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment