diff --git a/src/www/gfse/editor.css b/src/www/gfse/editor.css index 9ef8259a3..876e56759 100644 --- a/src/www/gfse/editor.css +++ b/src/www/gfse/editor.css @@ -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; +} \ No newline at end of file diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index b724f420e..f146dbae3 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -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; } diff --git a/src/www/index.html b/src/www/index.html index d5a18b51c..df50c4dbe 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -33,3 +33,4 @@
www.grammaticalframework.org +
GF version
\ No newline at end of file