nitdoc: Correcting cursor style hover a comment
authorStefan Lage <lagestfan@gmail.com>
Thu, 23 May 2013 20:26:19 +0000 (16:26 -0400)
committerStefan Lage <lagestfan@gmail.com>
Fri, 24 May 2013 02:26:51 +0000 (22:26 -0400)
When the cursor is hover a comment, it is update to a hand only on edit mode

Signed-off-by: Stefan Lage <lagestfan@gmail.com>

share/nitdoc/scripts/js-facilities.js

index 180aab2..0c7b402 100644 (file)
@@ -639,10 +639,20 @@ $(document).ready(function() {
 \r
        $("pre").hover(\r
                function () {\r
-                       $(this).css({'cursor' : 'hand'});       \r
+                       if(sessionStarted == true){\r
+                               $(this).css({'cursor' : 'hand'});\r
+                       }\r
+                       else{\r
+                               $(this).css({'cursor' : ''});\r
+                       }\r
                },\r
                function () {\r
-                       $(this).css({'cursor' : 'pointer'});    \r
+                       if(sessionStarted == true){\r
+                               $(this).css({'cursor' : 'pointer'});\r
+                       }\r
+                       else{\r
+                               $(this).css({'cursor' : ''});   \r
+                       }\r
                }\r
        );\r
 });\r