Commits

Maciej Fijalkowski committed bc0e217

slightly different approach to displaying where we are

  • Participants
  • Parent commits 0d2e083

Comments (0)

Files changed (3)

File _jitviewer/static/script.js

 
 function show_loop(no, path)
 {
-    $("#loop-" + glob_bridge_state.no).removeClass("selected");
+    $("#title-text").html($("#loop-" + no).attr('name'));
+    $("#title").show();
     glob_bridge_state.no = no;
     if (path) {
         glob_bridge_state.path = path;
     } else {
         delete glob_bridge_state.path;
     }
-    $("#loop-" + no).addClass("selected");
     $.getJSON('/loop', glob_bridge_state, function(arg) {
         $('#main').html(arg.html).ready(function() {
-            $.scrollTo($('#line-' + arg.scrollto), 200, {axis:'y'});
+            var scrollto;
+            if (arg.scrollto == 0) {
+                scrollto = 0;
+            } else {
+                scrollto = arg.scrollto - 1;
+            }
+            $.scrollTo($('#line-' + scrollto), 200, {axis:'y'});
         });
         $('#callstack').html('')
         for (var index in arg.callstack) {

File _jitviewer/static/style.css

 	font-size: 13px;
 	line-height: 22px;
 	
-	margin-left: 30px;
+	margin-left: 0px;
 	margin-top: 60px;
 }
 #single_loop {
 /* End of General Layout & Typography 
 -----------------------------------------*/
 
+#filter {
+    margin-left: 15px;
+}
 
 
 /* Floating Side-Menu 
 #loops  ul li span {
 	display: block;
 	width: 100%;
-	padding-left: 5px;
+	margin-left: 30px;
+  padding-left: 5px;
 	
 	-moz-box-sizing: border-box;
 	-webkit-box-sizing: border-box;
 
 	border-bottom: solid 1px rgba(121, 139, 162, 0.3);
 }
-#loops  ul li:first-child a:hover {border-top: solid 1px rgba(121, 139, 162, 0.3); margin-top: -1px;}
-#loops  ul li a:hover {
+a:hover {border-top: solid 1px rgba(121, 139, 162, 0.3); margin-top: -1px;}
+a:hover {
 	background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.10));
 	background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, rgba(0, 0, 0, 0.07)),color-stop(1, rgba(0, 0, 0, 0.10)));
 	color: rgba(0, 0, 0, 1);
 	display: block;
     float: left;
     width: 800px;
+    margin-left: 30px;
 }
 header {
 	display: block;
 	width: 360px;
 	
 	position: fixed;
-	top: 20px;
+	top: 30px;
 	left: 920px;
 	
 	padding: 5px;
 		box-shadow: 0px 0px 7px #cacaca;
 }
 
+#title {
+    position: fixed;
+    text-align: center;
+    top: 0;
+    width: 100%;
+    z-index: 100;
+    background-color: #164464;
+    color: #FFF;
+    display: none;
+}
+
 /* End of Formatting 
 -----------------------------------------*/
 
 
 
 
-
-
-

File _jitviewer/templates/index.html

     <div id="callstack">
     </div>
   </header>
-  <div>
+  <div id="title">
+    <span id="title-text">Main title</span>
+  </div>
+  <div id="filter">
     Filter: <input id="inp-bar" type="text" size="80"></input>
   <div>
   <div id="loops">