X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fjquery%2Fjquery.crmasmselect.js;h=9b1dc314ff78b08639cb314f2c3d673c6a0b4796;hb=e52e75227248e4251661d10f9600bd26be49494c;hp=49b93e123987cf9c3c313c73c3958113d23429ec;hpb=58a50b22e20f112fdbfc7e50f18353c311ceb1ae;p=civicrm-core.git
diff --git a/js/jquery/jquery.crmasmselect.js b/js/jquery/jquery.crmasmselect.js
index 49b93e1239..9b1dc314ff 100644
--- a/js/jquery/jquery.crmasmselect.js
+++ b/js/jquery/jquery.crmasmselect.js
@@ -71,13 +71,13 @@
.attr('id', options.listClass + index);
$container = $("
")
- .addClass(options.containerClass)
- .attr('id', options.containerClass + index);
+ .addClass(options.containerClass)
+ .attr('id', options.containerClass + index);
buildSelect();
$select.change(selectChangeEvent)
- .click(selectClickEvent);
+ .click(selectClickEvent);
$original.change(originalChangeEvent)
.wrap($container).before($select).before($ol);
@@ -102,31 +102,31 @@
$(this).children("li").each(function(n) {
- $option = $('#' + $(this).attr('rel'));
+ $option = $('#' + $(this).attr('rel'));
if($(this).is(".ui-sortable-helper")) {
- updatedOptionId = $option.attr('id');
+ updatedOptionId = $option.attr('id');
return;
}
- $original.append($option);
- });
+ $original.append($option);
+ });
- if(updatedOptionId) triggerOriginalChange(updatedOptionId, 'sort');
+ if(updatedOptionId) triggerOriginalChange(updatedOptionId, 'sort');
}
- }).addClass(options.listSortableClass);
+ }).addClass(options.listSortableClass);
}
function selectChangeEvent(e) {
-
+
// an item has been selected on the regular select we created
// check to make sure it's not an IE screwup, and add it to the list
if($.browser.msie && $.browser.version < 7 && !ieClick) return;
- var id = $(this).children("option:selected").slice(0,1).attr('rel');
- addListItem(id);
- ieClick = false;
+ var id = $(this).children("option:selected").slice(0,1).attr('rel');
+ addListItem(id);
+ ieClick = false;
triggerOriginalChange(id, 'add'); // for use by user-defined callbacks
}
@@ -136,7 +136,7 @@
// making sure a click preceded the change() event reduces the chance
// if unintended items being added. there may be a better solution?
- ieClick = true;
+ ieClick = true;
}
function originalChangeEvent(e) {
@@ -145,8 +145,8 @@
// on the original