mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-26 13:02:50 -06:00
RGL browser: bug in "show local". better screen-space usage.
This commit is contained in:
@@ -34,8 +34,21 @@ $(document).ready(function() {
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
var clearCode = function(code) {
|
||||
var clearScope = function(msg) {
|
||||
$('#scope_list').empty();
|
||||
updateScopeCount();
|
||||
if (msg) {
|
||||
$('#scope_list').html("<em>"+msg+"</em>");
|
||||
}
|
||||
}
|
||||
var setScope = function(code) {
|
||||
$('#scope_list').html(code);
|
||||
}
|
||||
var clearCode = function(msg) {
|
||||
$('#code pre').empty();
|
||||
if (msg) {
|
||||
$('#codes pre').html("<em>"+msg+"</em>");
|
||||
}
|
||||
}
|
||||
var setCode = function(code) {
|
||||
$('#code pre').html(code);
|
||||
@@ -118,7 +131,7 @@ $(document).ready(function() {
|
||||
showPanel(b);
|
||||
return false;
|
||||
})
|
||||
.insertBefore("#loading");
|
||||
.appendTo("#tabbar");
|
||||
});
|
||||
showPanel(".panel:first");
|
||||
|
||||
@@ -139,9 +152,7 @@ $(document).ready(function() {
|
||||
|
||||
// Load a tags file
|
||||
var loadTagsFile = function(module) {
|
||||
$('#search').val("");
|
||||
$('#scope dl').empty();
|
||||
updateScopeCount();
|
||||
clearScope();
|
||||
loading(true);
|
||||
$.ajax({
|
||||
url: "tags/"+module+".gf-tags",
|
||||
@@ -159,7 +170,7 @@ $(document).ready(function() {
|
||||
return '<tr class="local" name="'+b+'"><th>'+b+'</th><td>'+c+'</td><td></td><td></td><td>'+anchor+'</td><td>'+s[1]+'</td></tr>'
|
||||
}
|
||||
});
|
||||
$('#scope_list').html(data);
|
||||
setScope(data);
|
||||
$('#scope_list a').click(function(){
|
||||
var href = $(this).attr('href');
|
||||
var m = href.match(/([^\/]+)\/([^\/]+)\.(gf(-tags)?)(:\d+)?/);
|
||||
@@ -188,10 +199,11 @@ $(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
updateScopeCount();
|
||||
runFilter();
|
||||
loading(false);
|
||||
},
|
||||
error: function(data){
|
||||
$('#scope_list').html("<em>No scope available</em>");
|
||||
clearScope("No scope available");
|
||||
loading(false);
|
||||
},
|
||||
});
|
||||
@@ -223,7 +235,7 @@ $(document).ready(function() {
|
||||
}
|
||||
},
|
||||
error: function(data){
|
||||
setCode("<em>No code available</em>");
|
||||
clearCode("No code available");
|
||||
loading(false);
|
||||
}
|
||||
});
|
||||
@@ -241,7 +253,7 @@ $(document).ready(function() {
|
||||
else
|
||||
return haystack.toLowerCase().indexOf(needle.toLowerCase())>=0;
|
||||
};
|
||||
var runfilter = function() {
|
||||
var runFilter = function() {
|
||||
// Hide anything which doesn't match
|
||||
var s = $("#search").val();
|
||||
loading(true);
|
||||
@@ -263,23 +275,23 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
// Instant results
|
||||
$("#search").keyup(runfilter);
|
||||
$("#search").keyup(runFilter);
|
||||
$("#submit").hide();
|
||||
|
||||
// Filter & clear buttons
|
||||
// $("#submit").click(runfilter);
|
||||
// $("#submit").click(runFilter);
|
||||
|
||||
$("#search").keypress(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) { // Enter
|
||||
runfilter();
|
||||
runFilter();
|
||||
}
|
||||
});
|
||||
$("#clear").click(function(){
|
||||
$("#search").val('');
|
||||
runfilter();
|
||||
runFilter();
|
||||
});
|
||||
$("#case_sensitive").change(runfilter);
|
||||
$("#show_all").change(runfilter);
|
||||
$("#show_local").change(runfilter);
|
||||
$("#case_sensitive").change(runFilter);
|
||||
$("#show_all").change(runFilter);
|
||||
$("#show_local").change(runFilter);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user