Permalink
Browse files

Show errors in the output panel, prevent them from auto-jumping to th…

…e point in the code at which they broke. Add a link to replicate that behavior.
  • Loading branch information...
1 parent 0629504 commit 71922d848dc997519119b5cc16e14ba39b7f139c @jeresig jeresig committed Mar 22, 2012
Showing with 21 additions and 9 deletions.
  1. +7 −7 css/style.css
  2. +4 −2 js/output.js
  3. +10 −0 js/utils.js
View
@@ -189,12 +189,6 @@ a.ui-button:visited:hover {
#tests {
font-size: 12px;
- /*
- position: absolute;
- width: 300px;
- top: 0px;
- right: -308px;
- */
}
#tests textarea {
@@ -207,14 +201,15 @@ a.ui-button:visited:hover {
background: rgba(0, 0, 0, 0.6);
color: white;
position: absolute;
- width: 640px;
+ width: 100%;
min-height: 40px;
bottom: 5px;
left: 0px;
z-index: 2;
display: none;
border: none;
font-weight: normal;
+ margin: 0px;
}
#play-page .tipbar.error {
@@ -223,6 +218,7 @@ a.ui-button:visited:hover {
#play-page .tipbar .text-wrap {
margin: 8px 20px 24px 8px;
+ font-family: Helvetica, Arial, sans-serif;
}
#play-page .tipbar .tipnav {
@@ -251,6 +247,10 @@ a.ui-button:visited:hover {
margin-top: -4px;
}
+#play-page .tipbar .text a {
+ text-decoration: underline;
+}
+
#play-page .tipbar .close {
position: absolute;
top: 4px;
View
@@ -185,10 +185,12 @@ var Output = {
session.setAnnotations( Output.errors );
- $("#editor-box").showTip( "Error", Output.errors, setCursor );
+ $("#output").showTip( "Error", Output.errors, function() {
+ $( ".tipbar .text" ).append( " (<a href=''>View Error</a>)" );
+ });
} else {
- $("#editor-box").hideTip( "Error" );
+ $("#output").hideTip( "Error" );
}
},
View
@@ -68,6 +68,16 @@ $(document).delegate( ".tipbar .tipnav a", "click", function() {
return false;
});
+$(document).delegate( ".tipbar.error .text-wrap a", "click", function() {
+ var box = $(this).parents(".editor-box"),
+ tipData = box.data( "tipData" ),
+ error = tipData.Error[ tipData.pos ];
+
+ setCursor( error );
+
+ return false;
+});
+
$(document).delegate( ".tipbar form", "submit", function() {
var box = $(this).parents(".editor-box"),
tipData = box.data( "tipData" ),

0 comments on commit 71922d8

Please sign in to comment.