Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r159:bc0e2179c8c4
Date: 2011-07-23 17:22 +0200
http://bitbucket.org/pypy/jitviewer/changeset/bc0e2179c8c4/
Log: slightly different approach to displaying where we are
diff --git a/_jitviewer/static/script.js b/_jitviewer/static/script.js
--- a/_jitviewer/static/script.js
+++ b/_jitviewer/static/script.js
@@ -3,17 +3,23 @@
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) {
diff --git a/_jitviewer/static/style.css b/_jitviewer/static/style.css
--- a/_jitviewer/static/style.css
+++ b/_jitviewer/static/style.css
@@ -17,7 +17,7 @@
font-size: 13px;
line-height: 22px;
- margin-left: 30px;
+ margin-left: 0px;
margin-top: 60px;
}
#single_loop {
@@ -30,6 +30,9 @@
/* End of General Layout & Typography
-----------------------------------------*/
+#filter {
+ margin-left: 15px;
+}
/* Floating Side-Menu
@@ -37,6 +40,7 @@
#loops ul li span {
display: block;
width: 100%;
+ margin-left: 30px;
padding-left: 5px;
-moz-box-sizing: border-box;
@@ -45,8 +49,8 @@
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);
@@ -65,13 +69,14 @@
display: block;
float: left;
width: 800px;
+ margin-left: 30px;
}
header {
display: block;
width: 360px;
position: fixed;
- top: 20px;
+ top: 30px;
left: 920px;
padding: 5px;
@@ -208,6 +213,17 @@
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
-----------------------------------------*/
@@ -222,6 +238,3 @@
-
-
-
diff --git a/_jitviewer/templates/index.html b/_jitviewer/templates/index.html
--- a/_jitviewer/templates/index.html
+++ b/_jitviewer/templates/index.html
@@ -22,7 +22,10 @@
<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">
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit