Commits

nbastin committed 555ce37

Allow user to fold opcodes for a given source line, added a row hover highlight

  • Participants
  • Parent commits b29daf4

Comments (0)

Files changed (2)

 	def write_html_framing (self):
 		l = ['<HTML>\n',
 				'<HEAD>\n',
-    		'<link rel="stylesheet" href="source.css" type="text/css" />'
-				'<script type="text/javascript" src="jquery-1.4.2.min.js"></script>'
+    		'<link rel="stylesheet" href="source.css" type="text/css" />\n',
+				'<script type="text/javascript" src="jquery-1.4.2.min.js"></script>\n',
+				'<script type="text/javascript">\n',
+				'$(document).ready(function(){\n',
+				'	$(".source-row").click(function(){\n',
+				'		var myid = $(this).attr("id");\n',
+				'		$("TR.src-" + myid).toggle();\n',
+				'		})});\n',
+				'</script>\n',
 				'<TITLE>%s</TITLE>\n' % self.__name,
 				'</HEAD>\n']
 		self.__file.writelines(l)
 	font-family: monospace;
 }
 
+tr:hover { background-color: yellow; }
+
 td.oc-lno {
 	background-color: #DEDEDE;
 }
 table.source-view {
 	border: 1
 }
+