projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '4.4' into master
[civicrm-core.git]
/
js
/
jquery
/
jquery.crmasmselect.js
diff --git
a/js/jquery/jquery.crmasmselect.js
b/js/jquery/jquery.crmasmselect.js
index 902e09907f14a71d3dd41996a962356f74545e84..49b93e123987cf9c3c313c73c3958113d23429ec 100644
(file)
--- a/
js/jquery/jquery.crmasmselect.js
+++ b/
js/jquery/jquery.crmasmselect.js
@@
-57,18
+57,18
@@
// initialize the alternate select multiple
// this loop ensures uniqueness, in case of existing crmasmSelects placed by ajax (1.0.3)
// initialize the alternate select multiple
// this loop ensures uniqueness, in case of existing crmasmSelects placed by ajax (1.0.3)
- while($("#" + options.containerClass + index).size() > 0) index++;
+ while($("#" + options.containerClass + index).size() > 0) index++;
$select = $("<select></select>")
.addClass(options.selectClass)
.attr('name', options.selectClass + index)
$select = $("<select></select>")
.addClass(options.selectClass)
.attr('name', options.selectClass + index)
- .attr('id', options.selectClass + index);
+ .attr('id', options.selectClass + index);
- $selectRemoved = $("<select></select>");
+ $selectRemoved = $("<select></select>");
$ol = $("<" + options.listType + "></" + options.listType + ">")
.addClass(options.listClass)
$ol = $("<" + options.listType + "></" + options.listType + ">")
.addClass(options.listClass)
- .attr('id', options.listClass + index);
+ .attr('id', options.listClass + index);
$container = $("<div></div>")
.addClass(options.containerClass)
$container = $("<div></div>")
.addClass(options.containerClass)
@@
-212,7
+212,7
@@
// select the firm item from the regular select that we created
// select the firm item from the regular select that we created
- $select.children(":eq(0)").
attr("selected", true);
+ $select.children(":eq(0)").
prop("selected", true);
}
function disableSelectOption($option) {
}
function disableSelectOption($option) {
@@
-222,8
+222,8
@@
// we apply a class that reproduces the disabled look in other browsers
$option.addClass(options.optionDisabledClass)
// we apply a class that reproduces the disabled look in other browsers
$option.addClass(options.optionDisabledClass)
- .
attr
("selected", false)
- .
attr
("disabled", true);
+ .
prop
("selected", false)
+ .
prop
("disabled", true);
if(options.hideWhenAdded) $option.hide();
if($.browser.msie) $select.hide().show(); // this forces IE to update display
if(options.hideWhenAdded) $option.hide();
if($.browser.msie) $select.hide().show(); // this forces IE to update display
@@
-234,7
+234,7
@@
// given an already disabled select option, enable it
$option.removeClass(options.optionDisabledClass)
// given an already disabled select option, enable it
$option.removeClass(options.optionDisabledClass)
- .
attr
("disabled", false);
+ .
prop
("disabled", false);
if(options.hideWhenAdded) $option.show();
if($.browser.msie) $select.hide().show(); // this forces IE to update display
if(options.hideWhenAdded) $option.show();
if($.browser.msie) $select.hide().show(); // this forces IE to update display
@@
-271,7
+271,7
@@
if(!buildingSelect) {
if($O.is(":selected")) return; // already have it
if(!buildingSelect) {
if($O.is(":selected")) return; // already have it
- $O.
attr('selected', true);
+ $O.
prop('selected', true);
}
if(options.addItemTarget == 'top' && !buildingSelect) {
}
if(options.addItemTarget == 'top' && !buildingSelect) {
@@
-333,7
+333,7
@@
if(highlightItem == undefined) var highlightItem = true;
var $O = $('#' + optionId);
if(highlightItem == undefined) var highlightItem = true;
var $O = $('#' + optionId);
- $O.
attr('selected', false);
+ $O.
prop('selected', false);
$item = $ol.children("li[rel=" + optionId + "]");
dropListItemHide($item);
$item = $ol.children("li[rel=" + optionId + "]");
dropListItemHide($item);
@@
-410,11
+410,12
@@
'id': optionId,
'item': $ol.children("[rel=" + optionId + "]"),
'type': type
'id': optionId,
'item': $ol.children("[rel=" + optionId + "]"),
'type': type
- }]);
+ }]);
}
init();
});
};
}
init();
});
};
-})(jQuery);
+})(jQuery);
+