1
0
forked from GitHub/gf-core

gfse & cloud improvements

+ Added "Symbolic" to the list of resource modules that can be opened.
+ Clicking on the name of an opened resource module now displays the list
  operations it provides. (Implemented using show_operations in the GF shell.)
+ Added a GF version info link to the cloud service start page.
This commit is contained in:
hallgren
2012-09-28 14:27:18 +00:00
parent 86d17827ee
commit 999d02eb30
3 changed files with 37 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ table.grammar_list td { padding: 0.4ex 0.25em; }
div.namebar { background: #9df; }
div.namebar table { width: 100%; }
.namebar h3, .home h3 { margin: 0; color: #009; }
.namebar h3, .home h3, .sheet h3 { margin: 0; color: #009; }
td.right { text-align: right; }
@@ -56,7 +56,8 @@ div.template:hover
.exb_output { background: #dfd; float: right; margin: 0 10px; }
.more, .delete { font-weight: bold; font-family: sans-serif; }
.more, .delete, .edit { cursor: pointer; }
.more, .delete, .edit, *[onclick], .onclick { cursor: pointer; }
.onclick:hover, .ident[onclick]:hover { text-decoration: underline; }
.hover .more, .hover .delete, .hover .edit { visibility: hidden }
@@ -138,3 +139,15 @@ div.grammar_extension {
margin: 2ex;
box-shadow: 10px 10px 10px rgba(0,0,0,0.3);
}
div.sheet {
position: relative;
background: white;
padding: 1ex;
margin: 2ex;
box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-webkit-transition: all 0.5s ease-in-out;
}

View File

@@ -945,12 +945,13 @@ function draw_concrete(g,i) {
return file;
}
var rgl_modules=["Syntax","Lexicon","Paradigms","Extra"];
var rgl_modules=["Syntax","Lexicon","Paradigms","Extra","Symbolic"];
var rgl_info = {
Paradigms: "Lexical categories (A, N, V, ...) and smart paradigms (mkA, mkN, mkV, ...) for turning raw strings into new dictionary entries.",
Syntax: "Syntactic categories (Utt, Cl, V, NP, CN, AP, ...), structural words (this_Det, few_Det, ...) and functions for building phrases (mkUtt, mkCl, mkCN, mkVP, mkAP, ...)",
Lexicon: "A multilingual lexicon with ~350 common words.",
Extra: "Language-specific extra constructions not available via the common API."
Extra: "Language-specific extra constructions not available via the common API.",
Symbolic: "Functions for symbolic expressions (numbers and variables in mathematics)"
}
function add_open(ci) {
@@ -999,6 +1000,22 @@ function draw_opens(g,ci) {
var os=conc.opens || [] ;
var es=[];
function del(i) { return function() { delete_open(g,ci,i); }}
function show_opers(m) {
return function(event) {
var link=event.target,dst=compiler_output
function cont2(opers) {
clear(dst);
var sheet=div_class("sheet",[wrap("h3",text(m)),
wrap("pre",text(opers))])
var dy=dst.offsetTop-link.offsetTop-link.offsetHeight
sheet.style.top="-"+dy+"px";
insertFirst(dst,sheet)
setTimeout(function(){sheet.style.top="0px";},1000)
}
function cont1() { gfshell("so",cont2) }
gfshell("i -retain present/"+m+".gfo",cont1)
}
}
var first=true;
for(var i in os) {
if(!first) es.push(sep(", "))
@@ -1007,6 +1024,8 @@ function draw_opens(g,ci) {
var info=rgl_info[b];
var id=ident(m);
if(info) id.title=info;
id.onclick=show_opers(m)
id.className="ident onclick"
es.push(deletable(del(i),id,"Don't open this module"));
first=false;
}

View File

@@ -33,3 +33,4 @@
<hr>
<a href="http://www.grammaticalframework.org/">www.grammaticalframework.org</a>
<div class=modtime><small><a href="/version">GF version</a></small></div>