Left-facing closing arrow at the end of relatively long blocks of 
expanded cuts (at least 100px high).

        Patch by fu. 

diffs (33 lines):

diff -r 311ee07e1b7e -r 33bdd00ad982 htdocs/img/collapse-end.gif
Binary file htdocs/img/collapse-end.gif has changed
diff -r 311ee07e1b7e -r 33bdd00ad982 htdocs/js/cuttag-ajax.js
--- a/htdocs/js/cuttag-ajax.js  Thu Sep 09 13:48:33 2010 +0800
+++ b/htdocs/js/cuttag-ajax.js  Thu Sep 09 19:00:54 2010 +0800
@@ -6,6 +6,12 @@ CutTagHandler = new Class(Object, {
     init: function(journal, ditemid, cutid) {
       this.identifier = 'cuttag_' + journal + '_' + ditemid + '_' + cutid;
       this.ajaxUrl = "/__rpc_cuttag?journal=" + journal + "&ditemid=" + 
ditemid + "&cutid=" + cutid;
+
+      this.data = {
+        journal: journal,
+        ditemid: ditemid,
+        cutid: cutid
+      };
     },
 
     // returns if the div controlled by this handler is open
@@ -61,6 +67,14 @@ CutTagHandler = new Class(Object, {
         var replaceDiv = $('div-' + this.identifier);
         replaceDiv.innerHTML=resObj.text;
         replaceDiv.style.display="block";
+
+        if ( replaceDiv.offsetHeight > 100 ) {
+            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);
+        }
+
         DOM.addClassName(replaceDiv, "cuttag-open");
         $('img-' + this.identifier).alt=expanded;
         $('img-' + this.identifier).title=expanded;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to