From c6f4edaea5f1074ba682fac5d711016f0136998f Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 4 Jul 2018 10:09:58 +0200 Subject: Remove examples directory; these now live in gf-contrib All changes have been reflected in the gf-contrib repository: https://github.com/GrammaticalFramework/gf-contrib Now, for WebSetup to build the example grammars, one must have gf-contrib cloned in the same top-level directory as GF. When this isn't the case, WebSetup displays a notice without failing. --- examples/phrasebook/www/phrasebook.js | 213 ---------------------------------- 1 file changed, 213 deletions(-) delete mode 100644 examples/phrasebook/www/phrasebook.js (limited to 'examples/phrasebook/www/phrasebook.js') diff --git a/examples/phrasebook/www/phrasebook.js b/examples/phrasebook/www/phrasebook.js deleted file mode 100644 index c39dca7c0..000000000 --- a/examples/phrasebook/www/phrasebook.js +++ /dev/null @@ -1,213 +0,0 @@ - -//var server="http://www.grammaticalframework.org:41296" -//var server="http://tournesol.cs.chalmers.se:41296"; -var server="http://localhost:41296"; -var grammars_url=server+"/grammars/"; -var current_grammar_url=grammars_url+"Foods.pgf"; - -var tree_icon=server+"/translate/se.chalmers.cs.gf.gwt.TranslateApp/tree-btn.png"; - -function start_minibar() { - var minibar=element("minibar"); - minibar.appendChild(div_id("menubar")); - minibar.appendChild(div_id("surface")); - minibar.appendChild(div_id("words")); - minibar.appendChild(div_id("translations")); - /// jsonp(grammars_url+"grammars.cgi",""); // calls show_grammarlist - show_grammarlist(["Phrasebook.pgf","Foods.pgf", "ResourceDemo.pgf"]) ; -} - -function show_grammarlist(grammars) { - var menu=empty("select"); - for(var i=0;i0) box.appendChild(word(s)); - else emptycnt++; - } - if(emptycnt>0) - //setTimeout(function(){get_translations(menu);},200); - get_translations(menu); -} - -function get_translations(menu) { - jsonp(current_grammar_url - +"?command=translategroup" - // +"?command=translate" - +"&from="+encodeURIComponent(menu.current.from) - +"&input="+encodeURIComponent(menu.current.input), - "show_translations") -} - -function show_translations(translations) { - var trans=element("translations"); - var cnt=translations.length; - trans.innerHTML=""; - for(p=0;p 1) tbody.appendChild(tr([(text(lin[i].tree))])); - } - trans.appendChild(wrap("table",tbody)); - } -} - - -function toggle_img(i) { - var tmp=i.src; - i.src=i.other; - i.other=tmp; -} - - -/* -se.chalmers.cs.gf.gwt.TranslateApp/align-btn.png - -GET /grammars/Foods.pgf?&command=abstrtree&tree=Pred+(This+Fish)+(Very+Fresh) -GET /grammars/Foods.pgf?&command=parsetree&tree=Pred+(This+Fish)+Expensive&from=FoodsAfr -GET /grammars/Foods.pgf?&command=alignment&tree=Pred+(This+Fish)+Expensive -*/ -- cgit v1.2.3