Permalink
Browse files

fixing bug where schema helper didnt show for new queries or new play…

…ground session
  • Loading branch information...
1 parent 15fa168 commit 3af6aff49d773db6bb0b31b9ee7b286834fd3362 @chrisclark chrisclark committed Jan 29, 2014
Showing with 25 additions and 20 deletions.
  1. +25 −20 explorer/templates/explorer/preview_pane_scripts.html
@@ -69,25 +69,30 @@
$rows.keyup(function(event){
if(event.keyCode == 13){ showRows(); }
});
- $("#show_schema_button").click(function() {
- $("#schema_frame").attr('src', '../schema/');
- $("#query_area").addClass("col-md-9");
- var schema$ = $("#schema");
- schema$.addClass("col-md-3");
- schema$.show();
- $(this).hide()
- $("#hide_schema_button").show()
- return false;
- });
- $("#hide_schema_button").click(function() {
- $("#query_area").removeClass("col-md-9");
- var schema$ = $("#schema");
- schema$.removeClass("col-md-3");
- schema$.hide();
- $(this).hide()
- $("#show_schema_button").show()
- return false;
- });
} );
</script>
-{% endif %}
+{% endif %}
+
+<script>
+ $(document).ready( function () {
+ $("#show_schema_button").click(function() {
+ $("#schema_frame").attr('src', '../schema/');
+ $("#query_area").addClass("col-md-9");
+ var schema$ = $("#schema");
+ schema$.addClass("col-md-3");
+ schema$.show();
+ $(this).hide()
+ $("#hide_schema_button").show()
+ return false;
+ });
+ $("#hide_schema_button").click(function() {
+ $("#query_area").removeClass("col-md-9");
+ var schema$ = $("#schema");
+ schema$.removeClass("col-md-3");
+ schema$.hide();
+ $(this).hide()
+ $("#show_schema_button").show()
+ return false;
+ });
+ } );
+</script>

0 comments on commit 3af6aff

Please sign in to comment.