Skip to content

Commit

Permalink
Merge pull request #749 from basil/remove-prototype2
Browse files Browse the repository at this point in the history
Remove usages of Prototype from Steps Reference
  • Loading branch information
jglick authored Jul 18, 2023
2 parents a6ac277 + 0735356 commit cd2641b
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
var refDslHlp = {
parseDom:function(){
$$('dl.root > dt').each(function(elem){
elem.observe('click',refDslHlp.minimizeClick);
document.querySelectorAll('dl.root > dt').forEach(function(elem){
elem.addEventListener('click',refDslHlp.minimizeClick);
});
},

minimizeClick:function(){
var elem = this;
var nextElem = elem.next();
var height = nextElem.getHeight();
if(elem.hasClassName('show-minimize')){
elem.removeClassName('show-minimize');
nextElem.removeClassName('minimize');
var nextElem = elem.nextElementSibling;
var height = nextElem.offsetHeight;
if(elem.classList.contains('show-minimize')){
elem.classList.remove('show-minimize');
nextElem.classList.remove('minimize');
}
else{
nextElem.setStyle({height:height+'px'});
nextElem.style.height = height+'px';
setTimeout(function(){
elem.addClassName('show-minimize');
nextElem.addClassName('minimize');
elem.classList.add('show-minimize');
nextElem.classList.add('minimize');
},10);
}
}
Expand Down

0 comments on commit cd2641b

Please sign in to comment.