[dw-free] Lack of collapse cut tag on short cuts is inconsistent
[commit: http://hg.dwscoalition.org/dw-free/rev/4713fd9d4898]
http://bugs.dwscoalition.org/show_bug.cgi?id=3106
Always show the closing collapse arrow.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3106
Always show the closing collapse arrow.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/js/cuttag-ajax.js
-------------------------------------------------------------------------------- diff -r 4625af29e22c -r 4713fd9d4898 htdocs/js/cuttag-ajax.js --- a/htdocs/js/cuttag-ajax.js Tue Oct 05 11:56:27 2010 +0800 +++ b/htdocs/js/cuttag-ajax.js Tue Oct 05 12:12:19 2010 +0800 @@ -68,12 +68,10 @@ CutTagHandler = new Class(Object, { replaceDiv.innerHTML=resObj.text; replaceDiv.style.display="block"; - if ( replaceDiv.offsetHeight > 100 ) { - var closeEnd = document.createElement("span"); + var closeEnd = document.createElement("span"); - closeEnd.innerHTML = ' <a href="#span-'+this.identifier+'" onclick=" CutTagHandler.toggleCutTag(\''+this.data.journal+'\', \''+this.data.ditemid+'\', \''+this.data.cutid+'\');"><img style="border: 0;" src="' + Site.imgprefix + '/collapse-end.gif" aria-controls="div-cuttag_' + this.identifier + '" alt="' + expanded + '" title="' + expanded + '"/></a>'; - replaceDiv.appendChild(closeEnd); - } + closeEnd.innerHTML = ' <a href="#span-'+this.identifier+'" onclick=" CutTagHandler.toggleCutTag(\''+this.data.journal+'\', \''+this.data.ditemid+'\', \''+this.data.cutid+'\');"><img style="border: 0;" src="' + Site.imgprefix + '/collapse-end.gif" aria-controls="div-cuttag_' + this.identifier + '" alt="' + expanded + '" title="' + expanded + '"/></a>'; + replaceDiv.appendChild(closeEnd); DOM.addClassName(replaceDiv, "cuttag-open"); $('img-' + this.identifier).alt=expanded; --------------------------------------------------------------------------------