Update of /var/cvs/html/mmbase/edit/my_editors/scripts
In directory james.mmbase.org:/tmp/cvs-serv17139/scripts

Modified Files:
        showdiv.js 
Log Message:
Added some (jquery) javascript to susbstring gui presentations in related nodes 
column.



See also: http://cvs.mmbase.org/viewcvs/html/mmbase/edit/my_editors/scripts


Index: showdiv.js
===================================================================
RCS file: /var/cvs/html/mmbase/edit/my_editors/scripts/showdiv.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- showdiv.js  1 Mar 2007 20:24:50 -0000       1.1
+++ showdiv.js  25 Jun 2008 13:00:35 -0000      1.2
@@ -1,3 +1,29 @@
+/* 
+ * Substrings all gui representations that are to long for the related nodes 
column.
+ * Uses jquery.
+ */
+function substrGui() {
+    $('.relgui').each(function(i) {
+        var txt = $(this).text();
+        if (txt.length > 36) {
+            txt = txt.substr(0,36) + "..";
+            $(this).text(txt);
+        }
+    });
+    $(".relgui a").each(function(i) {
+        var txt = $(this).text();
+        if (txt.length > 36) { 
+            txt = txt.substr(0,36) + "..";
+            $(this).text(txt);
+        };
+    });
+}
+
+// (jquery) onload functions
+$(document).ready(function() {
+    substrGui();
+});
+
 /* Shows a div (more or less) at the current cursor position like a tooltip 
  * and gives it the classname 'shown' to be used in css
  * @param id    The id of an html element
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to