Skip to content

Commit

Permalink
Merge pull request sakaiproject#1232 from plukasew/SAK-30026
Browse files Browse the repository at this point in the history
SAK-30026: removing a tool with the red X leaves the text bold
  • Loading branch information
bjones86 committed Oct 30, 2015
2 parents 9fb1cdc + cd0676c commit d36cf0a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions site-manage/site-manage-tool/tool/src/webapp/js/site-manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,20 @@ utils.clearSelections = function()
utils.checkEnableUnjoin();
};

utils.labelFor = function(elementId)
{
var labels = document.getElementsByTagName("label");
for (var i = 0; i < labels.length; i++)
{
if (labels[i].htmlFor === elementId)
{
return labels[i];
}
}

return null;
}

// toggle a fade
jQuery.fn.fadeToggle = function(speed, easing, callback){
return this.animate({
Expand Down Expand Up @@ -934,6 +948,12 @@ var setupCategTools = function(){
} else {
// for each tool with this id, set check to false and fade in/out selectedTool display
setChecked(selectedId,false);
var originalInputId = selectedId.replace(/_/g, ".");
var label = utils.labelFor(originalInputId);
if (label !== null)
{
label.style.fontWeight = "normal";
}
}

// SAK-22384
Expand All @@ -947,6 +967,8 @@ var setupCategTools = function(){

noTools();
});



$('.moreInfoTool').click(function(e){
e.preventDefault();
Expand Down

0 comments on commit d36cf0a

Please sign in to comment.