Author: andre
Date: 2010-06-29 14:48:48 +0200 (Tue, 29 Jun 2010)
New Revision: 42735

Modified:
   openimages/trunk/src/main/webapp/editors/inc/head.jspx
Log:
added a js function to show only the first 10 rows of a table


Modified: openimages/trunk/src/main/webapp/editors/inc/head.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/inc/head.jspx      2010-06-29 
12:45:00 UTC (rev 42734)
+++ openimages/trunk/src/main/webapp/editors/inc/head.jspx      2010-06-29 
12:48:48 UTC (rev 42735)
@@ -54,13 +54,13 @@
               $(relater.div).find('div.mm_relate_repository').prepend('<div 
class="message">' + msg + '</div>');
               $(relater.div).find('div.message').fadeOut(2400);
           }
-        
-        
       });
+      
+      /* rest */
+      hideLastRows();
   
   });
   
-  
   function bind(relater) {
       if (relater.canEditrelations) {
           $(relater.div).find('tr.relation').hide();
@@ -85,6 +85,18 @@
           });
       }
   }
+    
+  /* show only the first 10 rows of table with class 'shorten' */
+  function hideLastRows() {
+      if ($('table.shorten').length &lt; 0) return;
+      
+      $('table.shorten tr:gt(10)').hide();
+      
+      $('a.showrest').click(function(ev) {
+          $('table.shorten tr:gt(10)').toggle();
+      });
+  }
+
   </script>
   <mm:include page="htmleditor.jspx" />
 </head>

_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to