diff pylons_app/lib/helpers.py @ 292:c4caeca9dd66

fixed paragraphs wrapping for ultralong commit messages. Disabled tooltips for new repos without a last commit message. ie. when tooltip_title is empty (there is a strange bug on empty tooltip_title)
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 14 Jun 2010 00:17:08 +0200
parents 237470e64bb8
children 6603c9891b91
line wrap: on
line diff
--- a/pylons_app/lib/helpers.py	Sun Jun 13 23:56:33 2010 +0200
+++ b/pylons_app/lib/helpers.py	Mon Jun 14 00:17:08 2010 +0200
@@ -112,11 +112,18 @@
                 showdelay:20,
             });
             
-            //Mouse subscribe optional arguments
+            //Mouse Over event disabled for new repositories since they dont
+            //have last commit message
             myToolTips.contextMouseOverEvent.subscribe(
                 function(type, args) {
                     var context = args[0];
-                    return true;
+                    var txt = context.getAttribute('tooltip_title');
+                    if(txt){
+                        return true;
+                    }
+                    else{
+                        return false;
+                    }
                 });
             
             // Set the text for the tooltip just before we display it. Lazy method