mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Updated JS editor to the latest version from Moises.
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<script type="text/javascript" src="gflib.js"></script>
|
<script type="text/javascript" src="gflib.js"></script>
|
||||||
<script type="text/javascript" src="editorGrammar.js"></script>
|
<script type="text/javascript" src="editorGrammar.js"></script>
|
||||||
<script type="text/javascript" src="grammar.js"></script>
|
<script type="text/javascript" src="grammar.js"></script>
|
||||||
<script type="text/javascript" src="gfjseditor.js"></script>
|
<script type="text/javascript" src="gfjseditor.js"></script>
|
||||||
<title>Web-based Syntax Editor</title>
|
<title>Web-based Syntax Editor</title>
|
||||||
</head>
|
</head>
|
||||||
<body onload="mkEditor('editor', Food)" onkeydown="hotKeys(event)">
|
<body onload="mkEditor('editor', Restaurant)" onkeydown="hotKeys(event)">
|
||||||
<div id="editor">
|
<div id="editor">
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -6,9 +6,11 @@ expColImg[0] = new Image(12,12);
|
|||||||
expColImg[0].src = "minus.png";
|
expColImg[0].src = "minus.png";
|
||||||
expColImg[1] = new Image(12,12);
|
expColImg[1] = new Image(12,12);
|
||||||
expColImg[1].src = "plus.png";
|
expColImg[1].src = "plus.png";
|
||||||
|
expColImg[2] = new Image(12,12);
|
||||||
// Grammars
|
expColImg[2].src = "empty.png";
|
||||||
var grammar = undefined;
|
|
||||||
|
// Grammars
|
||||||
|
var grammar = undefined;
|
||||||
var editorGrammar = Editor;
|
var editorGrammar = Editor;
|
||||||
|
|
||||||
var selectedLanguage = "EditorEng";
|
var selectedLanguage = "EditorEng";
|
||||||
@@ -47,7 +49,6 @@ keys ["27"] = function() { clickEsc(); };
|
|||||||
|
|
||||||
function state(selectedNode, tree, collapseBuffer) {
|
function state(selectedNode, tree, collapseBuffer) {
|
||||||
this.selectedNode = selectedNode;
|
this.selectedNode = selectedNode;
|
||||||
// this.tree = myAbstract.copyTree(tree);
|
|
||||||
this.tree = grammar.abstract.copyTree(tree);
|
this.tree = grammar.abstract.copyTree(tree);
|
||||||
this.collapseBuffer = collapseBuffer;
|
this.collapseBuffer = collapseBuffer;
|
||||||
return this;
|
return this;
|
||||||
@@ -70,10 +71,15 @@ treeNode.prototype.hasChildren = function() {
|
|||||||
return this.children.length;
|
return this.children.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* ----------------------------- GUI functions ----------------------------- */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
// Creates an instance of the editor and stores it in the given HTML container.
|
// Creates an instance of the editor and stores it in the given HTML container.
|
||||||
// Previous content is destroyed.
|
// Previous content is destroyed.
|
||||||
function mkEditor(container, myGrammar) {
|
function mkEditor(container, myGrammar) {
|
||||||
grammar = myGrammar;
|
grammar = myGrammar;
|
||||||
myTree = treeFromAbstract(grammar.abstract.annotate(abstractTree, grammar.abstract.startcat), "0");
|
myTree = treeFromAbstract(grammar.abstract.annotate(abstractTree, grammar.abstract.startcat), "0");
|
||||||
var holder = document.getElementById(container);
|
var holder = document.getElementById(container);
|
||||||
holder.innerHTML = "<div id='wrapper'><div id='absFrame'></div><div id='conFrame'></div><div id='actFrame'></div><div id='refFrame'></div><div id='messageFrame'></div><div id='clipboardFrame'></div></div>";
|
holder.innerHTML = "<div id='wrapper'><div id='absFrame'></div><div id='conFrame'></div><div id='actFrame'></div><div id='refFrame'></div><div id='messageFrame'></div><div id='clipboardFrame'></div></div>";
|
||||||
@@ -370,18 +376,17 @@ function nodeClick(name) {
|
|||||||
function showLanguages() {
|
function showLanguages() {
|
||||||
var languages = new Array();
|
var languages = new Array();
|
||||||
languages.push("<table class='language' id='languagesTable'>",
|
languages.push("<table class='language' id='languagesTable'>",
|
||||||
"<tr id='langs' class='language'>",
|
"<tr id='langs' class='language'>",
|
||||||
"<td class='language' id='EditorDan' title='Label Bulgarian' onclick='clickLanguage(\"\")'>Bulgarian</td>",
|
"<td class='language' id='EditorDan' title='Label Bulgarian' onclick='clickLanguage(\"\")'>Bulgarian</td>",
|
||||||
"<td class='language' id='EditorDan' title='Label Danish' onclick='clickLanguage(\"\")'>Danish</td>",
|
"<td class='language' id='EditorDan' title='Label Danish' onclick='clickLanguage(\"\")'>Danish</td>",
|
||||||
"<td class='language' id='EditorEng' title='Label English' onclick='clickLanguage(\"EditorEng\")'>English</td>",
|
"<td class='language' id='EditorEng' title='Label English' onclick='clickLanguage(\"EditorEng\")'>English</td>",
|
||||||
"<td class='language' id='EditorFin' title='Label Finnish' onclick='clickLanguage(\"\")'>Finnish</td>",
|
"<td class='language' id='EditorFin' title='Label Finnish' onclick='clickLanguage(\"\")'>Finnish</td>",
|
||||||
"<td class='language' id='EditorFre' title='Label French' onclick='clickLanguage(\"\")'>French</td>",
|
"<td class='language' id='EditorFre' title='Label French' onclick='clickLanguage(\"EditorFre\")'>French</td>",
|
||||||
"<td class='language' id='EditorGer' title='Label German' onclick='clickLanguage(\"\")'>German</td>",
|
"<td class='language' id='EditorGer' title='Label German' onclick='clickLanguage(\"\")'>German</td>",
|
||||||
"<td class='language' id='EditorIta' title='Label Italian' onclick='clickLanguage(\"\")'>Italian</td>",
|
"<td class='language' id='EditorIta' title='Label Italian' onclick='clickLanguage(\"\")'>Italian</td>",
|
||||||
"<td class='language' id='EditorNor' title='Label Norwegian' onclick='clickLanguage(\"\")'>Norwegian</td>",
|
"<td class='language' id='EditorNor' title='Label Norwegian' onclick='clickLanguage(\"\")'>Norwegian</td>",
|
||||||
"<td class='language' id='EditorRus' title='Label Russian' onclick='clickLanguage(\"\")'>Russian</td>",
|
"<td class='language' id='EditorRus' title='Label Russian' onclick='clickLanguage(\"\")'>Russian</td>",
|
||||||
// "<td class='language' id='EditorSpa' title='Label Spanish' onclick='clickLanguage(\"EditorSpa\")'>Spanish</td>",
|
"<td class='language' id='EditorSpa' title='Label Spanish' onclick='clickLanguage(\"EditorSpa\")'>Spanish</td>",
|
||||||
"<td class='language' id='EditorSpa' title='Label Spanish' onclick='clickLanguage(\"\")'>Spanish</td>",
|
|
||||||
"<td class='language' id='EditorSwe' title='Label Swedish' onclick='clickLanguage(\"EditorSwe\")'>Swedish</td></tr>",
|
"<td class='language' id='EditorSwe' title='Label Swedish' onclick='clickLanguage(\"EditorSwe\")'>Swedish</td></tr>",
|
||||||
"</table>");
|
"</table>");
|
||||||
return languages.join("");
|
return languages.join("");
|
||||||
@@ -406,6 +411,7 @@ function applyLanguage() {
|
|||||||
for (var i = 0, j = langsToLinearize.length; i < j; i++) {
|
for (var i = 0, j = langsToLinearize.length; i < j; i++) {
|
||||||
var absStr = langsToLinearize[i].getAttribute("title");
|
var absStr = langsToLinearize[i].getAttribute("title");
|
||||||
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree(absStr, editorGrammar.abstract.startcat));
|
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree(absStr, editorGrammar.abstract.startcat));
|
||||||
|
lin = lin.substring(0,1).toUpperCase().concat(lin.substring(1))
|
||||||
if (!langsToLinearize[i].firstChild) {
|
if (!langsToLinearize[i].firstChild) {
|
||||||
var txt = document.createTextNode(lin);
|
var txt = document.createTextNode(lin);
|
||||||
langsToLinearize[i].appendChild(txt);
|
langsToLinearize[i].appendChild(txt);
|
||||||
@@ -416,9 +422,10 @@ function applyLanguage() {
|
|||||||
}
|
}
|
||||||
var actionsToLinearize = document.getElementById("actionsTable").getElementsByTagName("td");
|
var actionsToLinearize = document.getElementById("actionsTable").getElementsByTagName("td");
|
||||||
for (var i = 0, j = actionsToLinearize.length; i < j; i++) {
|
for (var i = 0, j = actionsToLinearize.length; i < j; i++) {
|
||||||
if (actionsToLinearize[i].getAttribute("class") == "action") {
|
if (actionsToLinearize[i].className == "action") {
|
||||||
var absStr = actionsToLinearize[i].getAttribute("title");
|
var absStr = actionsToLinearize[i].getAttribute("title");
|
||||||
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree(absStr, editorGrammar.abstract.startcat));
|
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree(absStr, editorGrammar.abstract.startcat));
|
||||||
|
lin = lin.substring(0,1).toUpperCase().concat(lin.substring(1))
|
||||||
if (!actionsToLinearize[i].firstChild) {
|
if (!actionsToLinearize[i].firstChild) {
|
||||||
var txt = document.createTextNode(lin);
|
var txt = document.createTextNode(lin);
|
||||||
actionsToLinearize[i].appendChild(txt);
|
actionsToLinearize[i].appendChild(txt);
|
||||||
@@ -430,23 +437,28 @@ function applyLanguage() {
|
|||||||
}
|
}
|
||||||
var messageToLinearize = document.getElementById("refgenRefRandom");
|
var messageToLinearize = document.getElementById("refgenRefRandom");
|
||||||
if (messageToLinearize) {
|
if (messageToLinearize) {
|
||||||
messageToLinearize.firstChild.firstChild.nodeValue = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("RandomlyCommand Select IndefSgDet Refinement", editorGrammar.abstract.startcat));
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("RandomlyCommand Select IndefSgDet Refinement", editorGrammar.abstract.startcat));
|
||||||
|
messageToLinearize.firstChild.firstChild.nodeValue = msg.substring(0,1).toUpperCase().concat(msg.substring(1));
|
||||||
}
|
}
|
||||||
var messageToLinearize = document.getElementById("nextRefsNext");
|
var messageToLinearize = document.getElementById("nextRefsNext");
|
||||||
if (messageToLinearize) {
|
if (messageToLinearize) {
|
||||||
messageToLinearize.firstChild.firstChild.nodeValue = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Next Page", editorGrammar.abstract.startcat));
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Next Page", editorGrammar.abstract.startcat));
|
||||||
|
messageToLinearize.firstChild.firstChild.nodeValue = msg.substring(0,1).toUpperCase().concat(msg.substring(1));
|
||||||
}
|
}
|
||||||
messageToLinearize = document.getElementById("nextRefsPrevious");
|
messageToLinearize = document.getElementById("nextRefsPrevious");
|
||||||
if (messageToLinearize) {
|
if (messageToLinearize) {
|
||||||
messageToLinearize.firstChild.firstChild.nodeValue = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Previous Page", editorGrammar.abstract.startcat));
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Previous Page", editorGrammar.abstract.startcat));
|
||||||
|
messageToLinearize.firstChild.firstChild.nodeValue = msg.substring(0,1).toUpperCase().concat(msg.substring(1));
|
||||||
}
|
}
|
||||||
var messageToLinearize = document.getElementById("nextWrapsNext");
|
var messageToLinearize = document.getElementById("nextWrapsNext");
|
||||||
if (messageToLinearize) {
|
if (messageToLinearize) {
|
||||||
messageToLinearize.firstChild.firstChild.nodeValue = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Next Page", editorGrammar.abstract.startcat));
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Next Page", editorGrammar.abstract.startcat));
|
||||||
|
messageToLinearize.firstChild.firstChild.nodeValue = msg.substring(0,1).toUpperCase().concat(msg.substring(1));
|
||||||
}
|
}
|
||||||
messageToLinearize = document.getElementById("nextWrapsPrevious");
|
messageToLinearize = document.getElementById("nextWrapsPrevious");
|
||||||
if (messageToLinearize) {
|
if (messageToLinearize) {
|
||||||
messageToLinearize.firstChild.firstChild.nodeValue = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Previous Page", editorGrammar.abstract.startcat));
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("CommandAdj Show DefSgDet Previous Page", editorGrammar.abstract.startcat));
|
||||||
|
messageToLinearize.firstChild.firstChild.nodeValue = msg.substring(0,1).toUpperCase().concat(msg.substring(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,12 +485,12 @@ function showActions(caption) {
|
|||||||
actions.push(createAction("Delete", "unavailable", "SingleWordCommand Delete", "D"));
|
actions.push(createAction("Delete", "unavailable", "SingleWordCommand Delete", "D"));
|
||||||
actions.push(createAction("Refine", "action", "SingleWordCommand Refine", "R"));
|
actions.push(createAction("Refine", "action", "SingleWordCommand Refine", "R"));
|
||||||
actions.push(createAction("Replace", "unavailable", "SingleWordCommand Replace", "E"));
|
actions.push(createAction("Replace", "unavailable", "SingleWordCommand Replace", "E"));
|
||||||
actions.push(createAction("Wrap", "unavailable", "SingleWordCommand Wrap", "W"));
|
actions.push(createAction("Wrap", "unavailable", "SingleWordCommand Wrap", "W"));
|
||||||
for (var i in grammar.concretes) {
|
for (var i in grammar.concretes) {
|
||||||
if (grammar.concretes[i].parser) {
|
if (grammar.concretes[i].parser) {
|
||||||
actions.push(createAction("Parse", "action", "Command Parse IndefSgDet String_N", "P"));
|
actions.push(createAction("Parse", "action", "Command Parse IndefSgDet String_N", "P"));
|
||||||
} else { actions.push(createAction("Parse", "unavailable", "Command Parse IndefSgDet String_N", "P")); }
|
} else { actions.push(createAction("Parse", "unavailable", "Command Parse IndefSgDet String_N", "P")); }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node.caption) {
|
else if (node.caption) {
|
||||||
@@ -529,18 +541,21 @@ function clickRefine(actName) {
|
|||||||
switch(node.type)
|
switch(node.type)
|
||||||
{
|
{
|
||||||
case "String":
|
case "String":
|
||||||
newType = prompt(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet String_N", editorGrammar.abstract.startcat)),'String');
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet String_N", editorGrammar.abstract.startcat));
|
||||||
|
newType = prompt(msg.substring(0,1).toUpperCase().concat(msg.substring(1)),'String');
|
||||||
if (!newType) { newType = "AutoString"; }
|
if (!newType) { newType = "AutoString"; }
|
||||||
break;
|
break;
|
||||||
case "Int":
|
case "Int":
|
||||||
while (isNaN(newType) || (newType && newType.indexOf(".") != -1)) {
|
while (isNaN(newType) || (newType && newType.indexOf(".") != -1)) {
|
||||||
newType = prompt(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet Integer_N", editorGrammar.abstract.startcat)),'Int');
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet Integer_N", editorGrammar.abstract.startcat));
|
||||||
|
newType = prompt(msg.substring(0,1).toUpperCase().concat(msg.substring(1)),'Int');
|
||||||
}
|
}
|
||||||
if (!newType) { newType = "8"; }
|
if (!newType) { newType = "8"; }
|
||||||
break;
|
break;
|
||||||
case "Float":
|
case "Float":
|
||||||
while (isNaN(newType)) {
|
while (isNaN(newType)) {
|
||||||
newType = prompt(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet Float_N", editorGrammar.abstract.startcat)),'Float');
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet Float_N", editorGrammar.abstract.startcat));
|
||||||
|
newType = prompt(msg.substring(0,1).toUpperCase().concat(msg.substring(1)),'Float');
|
||||||
}
|
}
|
||||||
if (!newType) { newType = "8.0"; }
|
if (!newType) { newType = "8.0"; }
|
||||||
if (newType.indexOf(".") == -1) { newType += ".0"; }
|
if (newType.indexOf(".") == -1) { newType += ".0"; }
|
||||||
@@ -553,7 +568,7 @@ function clickRefine(actName) {
|
|||||||
}
|
}
|
||||||
if (!grammar.abstract.types[newTypeCat]) {
|
if (!grammar.abstract.types[newTypeCat]) {
|
||||||
grammar.abstract.addType(newTypeCat, [], node.type);
|
grammar.abstract.addType(newTypeCat, [], node.type);
|
||||||
for (var i in grammar.concretes) {
|
for (var i in grammar.concretes) {
|
||||||
grammar.concretes[i].addRule(newTypeCat, function(cs){ return new Arr(new Str(newType));});
|
grammar.concretes[i].addRule(newTypeCat, function(cs){ return new Arr(new Str(newType));});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -593,7 +608,6 @@ function pushUndoClearRedo() {
|
|||||||
|
|
||||||
// Gets the refinements to display
|
// Gets the refinements to display
|
||||||
function showRefinements(nodeName) {
|
function showRefinements(nodeName) {
|
||||||
// var refs = getAvailableRefinements(nodeName);
|
|
||||||
var refs = getAvailableRefinements(nodeName, abstractTree, grammar);
|
var refs = getAvailableRefinements(nodeName, abstractTree, grammar);
|
||||||
var rowsPerPage = 9;
|
var rowsPerPage = 9;
|
||||||
var pages = Math.floor(refs.length / rowsPerPage);
|
var pages = Math.floor(refs.length / rowsPerPage);
|
||||||
@@ -623,7 +637,7 @@ function showRefinements(nodeName) {
|
|||||||
refinements.push("</table>");
|
refinements.push("</table>");
|
||||||
return refinements.join("");
|
return refinements.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates an HTML representation of a Refinement/Wrap
|
// Creates an HTML representation of a Refinement/Wrap
|
||||||
function ref_wrapToHtml(funct, name, className, arg, hotKeyPos, caption) {
|
function ref_wrapToHtml(funct, name, className, arg, hotKeyPos, caption) {
|
||||||
var ref_wrapHtml = new Array();
|
var ref_wrapHtml = new Array();
|
||||||
@@ -755,7 +769,7 @@ function selectNextMeta() {
|
|||||||
nodeClick(pathToNextMeta);
|
nodeClick(pathToNextMeta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expands the ascendants of a given node
|
// Expands the ascendants of a given node
|
||||||
function expandAscendants(nodeName) {
|
function expandAscendants(nodeName) {
|
||||||
var nodePath = nodeName.split("-");
|
var nodePath = nodeName.split("-");
|
||||||
@@ -780,7 +794,7 @@ function clickPaste(actName) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the "Delete" action is selected, deletes the selected node
|
// When the "Delete" action is selected, deletes the selected node
|
||||||
function clickDelete(actName) {
|
function clickDelete(actName) {
|
||||||
if (document.getElementById(actName).className == "action") {
|
if (document.getElementById(actName).className == "action") {
|
||||||
@@ -794,7 +808,7 @@ function clickDelete(actName) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the "Replace" action is selected, replaces the selected node with another refinement
|
// When the "Replace" action is selected, replaces the selected node with another refinement
|
||||||
function clickReplace(actName) {
|
function clickReplace(actName) {
|
||||||
if (document.getElementById(actName).className == "action") {
|
if (document.getElementById(actName).className == "action") {
|
||||||
@@ -822,7 +836,8 @@ function clickWrap(actName) {
|
|||||||
var wrappers = showWrappers(node.caption);
|
var wrappers = showWrappers(node.caption);
|
||||||
document.getElementById("refFrame").innerHTML = wrappers;
|
document.getElementById("refFrame").innerHTML = wrappers;
|
||||||
if (wrappers.length <= 31) {
|
if (wrappers.length <= 31) {
|
||||||
alert(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("ErrorMessage Available Wrapper", editorGrammar.abstract.startcat)));
|
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("ErrorMessage Available Wrapper", editorGrammar.abstract.startcat));
|
||||||
|
alert(lin.substring(0,1).toUpperCase().concat(lin.substring(1)));
|
||||||
document.getElementById("actFrame").innerHTML = showActions();
|
document.getElementById("actFrame").innerHTML = showActions();
|
||||||
nodeClick(selectedNode);
|
nodeClick(selectedNode);
|
||||||
}
|
}
|
||||||
@@ -834,7 +849,6 @@ function clickWrap(actName) {
|
|||||||
function showWrappers(nodeCaption) {
|
function showWrappers(nodeCaption) {
|
||||||
var nodeType = grammar.abstract.types[nodeCaption].cat;
|
var nodeType = grammar.abstract.types[nodeCaption].cat;
|
||||||
var rowsPerPage = 10;
|
var rowsPerPage = 10;
|
||||||
// var availWrappers = getAvailableWrappers(nodeType);
|
|
||||||
var availWrappers = getAvailableWrappers(nodeType, grammar, selectedNode);
|
var availWrappers = getAvailableWrappers(nodeType, grammar, selectedNode);
|
||||||
var pages = Math.floor(availWrappers.length / rowsPerPage);
|
var pages = Math.floor(availWrappers.length / rowsPerPage);
|
||||||
var upperLimit;
|
var upperLimit;
|
||||||
@@ -860,7 +874,7 @@ function showWrappers(nodeCaption) {
|
|||||||
wrappers.push("</table>");
|
wrappers.push("</table>");
|
||||||
return wrappers.join("");
|
return wrappers.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates the function to be used by a "numeric" hot key
|
// Creates the function to be used by a "numeric" hot key
|
||||||
function mkWrapHotKey(wrapName, argPos) {
|
function mkWrapHotKey(wrapName, argPos) {
|
||||||
return function() { if (document.getElementById("wrap" + wrapName)) { wrapClick(wrapName, argPos); } }
|
return function() { if (document.getElementById("wrap" + wrapName)) { wrapClick(wrapName, argPos); } }
|
||||||
@@ -876,15 +890,16 @@ function mkWrapNextRefsHotKey(wrapName) {
|
|||||||
function clickParse(actName) {
|
function clickParse(actName) {
|
||||||
if (document.getElementById(actName).className == "action") {
|
if (document.getElementById(actName).className == "action") {
|
||||||
highlightSelectedAction(actName);
|
highlightSelectedAction(actName);
|
||||||
var node = getNode(selectedNode, myTree);
|
var node = getNode(selectedNode, myTree);
|
||||||
if (selectedNode) {
|
if (selectedNode) {
|
||||||
refPageCounter = 0;
|
refPageCounter = 0;
|
||||||
parseTrees = undefined;
|
parseTrees = undefined;
|
||||||
var string = prompt(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet String_N", editorGrammar.abstract.startcat)),'String');
|
var msg = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("Command Enter IndefSgDet String_N", editorGrammar.abstract.startcat));
|
||||||
if (string || string == "") {
|
var string = prompt(msg.substring(0,1).toUpperCase().concat(msg.substring(1)),'String');
|
||||||
for (var i in grammar.concretes) {
|
if (string || string == "") {
|
||||||
|
for (var i in grammar.concretes) {
|
||||||
parseTrees = grammar.concretes[i].parser.parseString(string, node.cat);
|
parseTrees = grammar.concretes[i].parser.parseString(string, node.cat);
|
||||||
if (parseTrees.length == 1) {
|
if (parseTrees.length == 1) {
|
||||||
pushUndoClearRedo();
|
pushUndoClearRedo();
|
||||||
abstractTree = insertNode(abstractTree, selectedNode, "0", grammar.abstract.copyTree(grammar.abstract.handleLiterals(parseTrees[0], node.cat)));
|
abstractTree = insertNode(abstractTree, selectedNode, "0", grammar.abstract.copyTree(grammar.abstract.handleLiterals(parseTrees[0], node.cat)));
|
||||||
document.getElementById("actFrame").innerHTML = showActions();
|
document.getElementById("actFrame").innerHTML = showActions();
|
||||||
@@ -895,10 +910,11 @@ function clickParse(actName) {
|
|||||||
} else if (parseTrees.length > 1) {
|
} else if (parseTrees.length > 1) {
|
||||||
document.getElementById("refFrame").innerHTML = showTrees();
|
document.getElementById("refFrame").innerHTML = showTrees();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { nodeClick(selectedNode); return false; }
|
} else { nodeClick(selectedNode); return false; }
|
||||||
alert(editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("ErrorMessage Available Tree", editorGrammar.abstract.startcat)));
|
var lin = editorGrammar.concretes[selectedLanguage].linearize(editorGrammar.abstract.parseTree("ErrorMessage Available Tree", editorGrammar.abstract.startcat));
|
||||||
|
alert(lin.substring(0,1).toUpperCase().concat(lin.substring(1)));
|
||||||
}
|
}
|
||||||
nodeClick(selectedNode);
|
nodeClick(selectedNode);
|
||||||
}
|
}
|
||||||
@@ -965,7 +981,7 @@ function clickRandomNode(actName) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the "RandomTree" action is selected, refines the tree at random
|
// When the "RandomTree" action is selected, refines the tree at random
|
||||||
function clickRandomTree(actName) {
|
function clickRandomTree(actName) {
|
||||||
if (document.getElementById(actName).className == "action") {
|
if (document.getElementById(actName).className == "action") {
|
||||||
@@ -980,7 +996,6 @@ function clickRandomTree(actName) {
|
|||||||
function refClick(refName) {
|
function refClick(refName) {
|
||||||
if (selectedNode) {
|
if (selectedNode) {
|
||||||
if (refName == "genRefRandom") {
|
if (refName == "genRefRandom") {
|
||||||
// var refs = getAvailableRefinements(selectedNode);
|
|
||||||
var refs = getAvailableRefinements(selectedNode, abstractTree, grammar);
|
var refs = getAvailableRefinements(selectedNode, abstractTree, grammar);
|
||||||
refName = refs[Math.floor(refs.length * Math.random())];
|
refName = refs[Math.floor(refs.length * Math.random())];
|
||||||
}
|
}
|
||||||
@@ -991,7 +1006,7 @@ function refClick(refName) {
|
|||||||
concludeAction();
|
concludeAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a tree from an abstract tree
|
// Creates a tree from an abstract tree
|
||||||
function treeFromAbstract(abstractNode, name) {
|
function treeFromAbstract(abstractNode, name) {
|
||||||
var node = new treeNode(name, abstractNode.name);
|
var node = new treeNode(name, abstractNode.name);
|
||||||
@@ -1040,7 +1055,7 @@ function wrapClick(wrapName, argPos) {
|
|||||||
|
|
||||||
// Wraps a refinement around a node
|
// Wraps a refinement around a node
|
||||||
function treeClick(i) {
|
function treeClick(i) {
|
||||||
if (selectedNode) {
|
if (selectedNode) {
|
||||||
pushUndoClearRedo();
|
pushUndoClearRedo();
|
||||||
var node = getNode(selectedNode, myTree);
|
var node = getNode(selectedNode, myTree);
|
||||||
var tempNode = grammar.abstract.copyTree(grammar.abstract.handleLiterals(parseTrees[i], node.cat));
|
var tempNode = grammar.abstract.copyTree(grammar.abstract.handleLiterals(parseTrees[i], node.cat));
|
||||||
@@ -1090,11 +1105,11 @@ function nextTreesClick(treeName) {
|
|||||||
clearHotKeys();
|
clearHotKeys();
|
||||||
document.getElementById("refFrame").innerHTML = showTrees();
|
document.getElementById("refFrame").innerHTML = showTrees();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* ---------- GUI independent functions to handle syntax editing ---------- */
|
/* ---------- GUI independent functions to handle syntax editing ---------- */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
// Gets the node rooted at the indicated path (route) in the tree absNode
|
// Gets the node rooted at the indicated path (route) in the tree absNode
|
||||||
function getNodeFromAbstract(absNode, route, currRoute) {
|
function getNodeFromAbstract(absNode, route, currRoute) {
|
||||||
if (route == currRoute) {
|
if (route == currRoute) {
|
||||||
@@ -1107,7 +1122,7 @@ function getNodeFromAbstract(absNode, route, currRoute) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the first metavariable from the abstract tree rooted at the path route
|
// Gets the first metavariable from the abstract tree rooted at the path route
|
||||||
function getNextMetaFromAbstract(node, route) {
|
function getNextMetaFromAbstract(node, route) {
|
||||||
if (node.isMeta()) { return route; }
|
if (node.isMeta()) { return route; }
|
||||||
@@ -1116,7 +1131,7 @@ function getNextMetaFromAbstract(node, route) {
|
|||||||
if (found) { return found; }
|
if (found) { return found; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inserts the node into the abstract tree absNode at the path route
|
// Inserts the node into the abstract tree absNode at the path route
|
||||||
function insertNode(absNode, route, currRoute, node) {
|
function insertNode(absNode, route, currRoute, node) {
|
||||||
if (route == currRoute) {
|
if (route == currRoute) {
|
||||||
@@ -1129,7 +1144,7 @@ function insertNode(absNode, route, currRoute, node) {
|
|||||||
return absNode;
|
return absNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes the node rooted at the path route from the abstract tree absNode
|
// Deletes the node rooted at the path route from the abstract tree absNode
|
||||||
function deleteNode(absNode, route, currRoute) {
|
function deleteNode(absNode, route, currRoute) {
|
||||||
if (route == currRoute) {
|
if (route == currRoute) {
|
||||||
@@ -1142,8 +1157,8 @@ function deleteNode(absNode, route, currRoute) {
|
|||||||
return absNode;
|
return absNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the available refinements for the node nodeName, which is in the tree
|
// Gets the available refinements for the node nodeName, which is in the tree
|
||||||
// abstractTree, from those found in the grammar.
|
// abstractTree, from those found in the grammar.
|
||||||
function getAvailableRefinements(nodeName, abstractTree, grammar) {
|
function getAvailableRefinements(nodeName, abstractTree, grammar) {
|
||||||
var node = getNodeFromAbstract(abstractTree, nodeName, "0");
|
var node = getNodeFromAbstract(abstractTree, nodeName, "0");
|
||||||
@@ -1156,8 +1171,8 @@ function getAvailableRefinements(nodeName, abstractTree, grammar) {
|
|||||||
}
|
}
|
||||||
return refinements;
|
return refinements;
|
||||||
}
|
}
|
||||||
|
|
||||||
// It refines the node rooted at the path route in the abstract tree absNode
|
// It refines the node rooted at the path route in the abstract tree absNode
|
||||||
// with the refinement refName. Returns the refined abstract tree.
|
// with the refinement refName. Returns the refined abstract tree.
|
||||||
function refineAbstractTree(absNode, route, currRoute, refName) {
|
function refineAbstractTree(absNode, route, currRoute, refName) {
|
||||||
if (route == currRoute && absNode.isMeta()) {
|
if (route == currRoute && absNode.isMeta()) {
|
||||||
@@ -1170,17 +1185,17 @@ function refineAbstractTree(absNode, route, currRoute, refName) {
|
|||||||
return absNode;
|
return absNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a node of type refName object with the appropriate number of arguments
|
// Creates a node of type refName object with the appropriate number of arguments
|
||||||
function createRefinement(refName) {
|
function createRefinement(refName) {
|
||||||
var newRef = new Fun(refName);
|
var newRef = new Fun(refName);
|
||||||
for (var i = 0, j = grammar.abstract.types[refName].args.length; i < j; i++) {
|
for (var i = 0, j = grammar.abstract.types[refName].args.length; i < j; i++) {
|
||||||
newRef.setArg(i, new Fun("?"));
|
newRef.setArg(i, new Fun("?"));
|
||||||
}
|
}
|
||||||
return newRef;
|
return newRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the available wrappers for a node of type nodeType found in the grammar
|
// Gets the available wrappers for a node of type nodeType found in the grammar
|
||||||
function getAvailableWrappers(nodeType, grammar, top) {
|
function getAvailableWrappers(nodeType, grammar, top) {
|
||||||
var wrappers = new Array();
|
var wrappers = new Array();
|
||||||
for (var fun in grammar.abstract.types) {
|
for (var fun in grammar.abstract.types) {
|
||||||
@@ -1200,11 +1215,11 @@ function getAvailableWrappers(nodeType, grammar, top) {
|
|||||||
}
|
}
|
||||||
return wrappers;
|
return wrappers;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instantiates metavariables found in the tree abstractTree with refinements
|
// Instantiates metavariables found in the tree abstractTree with refinements
|
||||||
// selected at random from those found in the grammar
|
// selected at random from those found in the grammar
|
||||||
function fillSubTree(abstractTree, grammar) {
|
function fillSubTree(abstractTree, grammar) {
|
||||||
while (!abstractTree.isComplete()) {
|
while (!abstractTree.isComplete()) {
|
||||||
var nodeToRefine = getNextMetaFromAbstract(abstractTree, "0");
|
var nodeToRefine = getNextMetaFromAbstract(abstractTree, "0");
|
||||||
if (nodeToRefine) {
|
if (nodeToRefine) {
|
||||||
var refs = getAvailableRefinements(nodeToRefine, abstractTree, grammar);
|
var refs = getAvailableRefinements(nodeToRefine, abstractTree, grammar);
|
||||||
@@ -1247,6 +1262,6 @@ function fillSubTree(abstractTree, grammar) {
|
|||||||
abstractTree = grammar.abstract.annotate(abstractTree, grammar.abstract.startcat);
|
abstractTree = grammar.abstract.annotate(abstractTree, grammar.abstract.startcat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return abstractTree;
|
return abstractTree;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,12 +187,6 @@ Int.prototype.setTag = function(tag) { if (!this.tag) { this.tag = tag; } };
|
|||||||
|
|
||||||
/* Type annotation */
|
/* Type annotation */
|
||||||
|
|
||||||
/*
|
|
||||||
function Abstract(startcat) {
|
|
||||||
this.types = new Array();
|
|
||||||
this.startcat = startcat;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
function GFAbstract(startcat, types) {
|
function GFAbstract(startcat, types) {
|
||||||
this.startcat = startcat;
|
this.startcat = startcat;
|
||||||
this.types = types;
|
this.types = types;
|
||||||
@@ -275,15 +269,9 @@ function Type(args, cat) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Linearization */
|
/* Linearization */
|
||||||
/*
|
|
||||||
function Concrete(abstr) {
|
|
||||||
this.abstr = abstr;
|
|
||||||
this.rules = new Array();
|
|
||||||
this.parser = undefined;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
function GFConcrete(flags, rules, parser) {
|
function GFConcrete(flags, rules, parser) {
|
||||||
this.flags = flags;
|
this.flags = flags;
|
||||||
this.rules = rules;
|
this.rules = rules;
|
||||||
if (parser) {
|
if (parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
@@ -761,7 +749,7 @@ function rangeConcatLin (lin1, lin2) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Performs range concatenation on a linarization row
|
// Performs range concatenation on a linearization row
|
||||||
function rangeConcatLins (lins) {
|
function rangeConcatLins (lins) {
|
||||||
var newLins = new Array();
|
var newLins = new Array();
|
||||||
newLins.push(lins.shift());
|
newLins.push(lins.shift());
|
||||||
@@ -779,7 +767,7 @@ function rangeConcatLins (lins) {
|
|||||||
return newLins;
|
return newLins;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Performs range restriction on an element of a linarization row
|
// Performs range restriction on an element of a linearization row
|
||||||
// while keeping track of the tokens that have been used
|
// while keeping track of the tokens that have been used
|
||||||
function rangeRestLinTerm(tokens, lin, rangesNotConsumed) {
|
function rangeRestLinTerm(tokens, lin, rangesNotConsumed) {
|
||||||
if (lin.id == "argProj") { return new Array(lin); }
|
if (lin.id == "argProj") { return new Array(lin); }
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,234 +1,241 @@
|
|||||||
body {
|
body {
|
||||||
font-family:arial,helvetica,sans-serif;
|
font-family:arial,helvetica,sans-serif;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wrapper {
|
#wrapper {
|
||||||
width:740px;
|
width:740px;
|
||||||
height:520px;
|
height:520px;
|
||||||
margin:auto 50px;
|
margin:auto 50px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#absFrame {
|
#absFrame {
|
||||||
width:250px;
|
width:250px;
|
||||||
height:250px;
|
height:250px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#conFrame {
|
#conFrame {
|
||||||
width:436px;
|
width:436px;
|
||||||
height:250px;
|
height:250px;
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#actFrame {
|
#actFrame {
|
||||||
width:250px;
|
width:250px;
|
||||||
height:170px;
|
height:170px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#refFrame {
|
#refFrame {
|
||||||
width:436px;
|
width:436px;
|
||||||
height:170px;
|
height:170px;
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#messageFrame {
|
#messageFrame {
|
||||||
width:506px;
|
width:506px;
|
||||||
height:15px;
|
height:15px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clipboardFrame {
|
#clipboardFrame {
|
||||||
width:180px;
|
width:180px;
|
||||||
height:15px;
|
height:15px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
border:1px solid gray;
|
border:1px solid gray;
|
||||||
float:left;
|
float:left;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tree {
|
#tree {
|
||||||
left: -10px;
|
left: -10px;
|
||||||
top: -10px;
|
top: -10px;
|
||||||
width: 230px;
|
width: 250px;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
position: relative;
|
position: relative;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.tree-menu {
|
img.tree-menu {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.tree:link, a.tree:visited, a.tree:active {
|
a.tree:link, a.tree:visited, a.tree:active {
|
||||||
color: black;
|
color: black;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.tree:hover {
|
a.tree:hover {
|
||||||
color: blue;
|
color: blue;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.treeSelected:link, a.treeSelected:visited, a.treeSelected:active {
|
a.treeSelected:link, a.treeSelected:visited, a.treeSelected:active {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #3366CC;
|
background-color: #3366CC;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.treeSelected:hover {
|
a.treeSelected:hover {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #3366CC;
|
background-color: #3366CC;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.treeGray:link, a.treeGray:visited, a.treeGray:active {
|
a.treeGray:link, a.treeGray:visited, a.treeGray:active {
|
||||||
color: silver;
|
color: silver;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.treeGray:hover {
|
a.treeGray:hover {
|
||||||
color: silver;
|
color: silver;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.action, table.refinement, table.wrapper, table.tree, table.language {
|
table.action, table.refinement, table.wrapper, table.tree, table.language {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.selected {
|
tr.selected {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #3366CC;
|
background-color: #3366CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.unavailable, tr.closed {
|
tr.unavailable, tr.closed {
|
||||||
color: silver;
|
color: silver;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.unavailable:hover {
|
tr.unavailable:hover {
|
||||||
color: silver;
|
color: silver;
|
||||||
background-color: #3366CC;
|
background-color: #3366CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.action, tr.refinement, tr.wrapper, tr.tree {
|
tr.action, tr.refinement, tr.wrapper, tr.tree {
|
||||||
color: black;
|
color: black;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.action:hover, tr.refinement:hover, tr.wrapper:hover, tr.tree:hover {
|
tr.action:hover, tr.refinement:hover, tr.wrapper:hover, tr.tree:hover {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #3366CC;
|
background-color: #3366CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.action {
|
td.action {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.refinement, td.wrapper, td.tree {
|
td.refinement, td.wrapper, td.tree {
|
||||||
width: 515px;
|
width: 515px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.hotKey {
|
td.hotKey {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.language {
|
td.language {
|
||||||
color: black;
|
color: black;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
margin: 1px;
|
||||||
|
padding: 1px;
|
||||||
td.language:hover {
|
}
|
||||||
color: blue;
|
|
||||||
background-color: white;
|
td.language:hover {
|
||||||
text-decoration: underline;
|
color: blue;
|
||||||
}
|
background-color: white;
|
||||||
|
text-decoration: underline;
|
||||||
td.selected {
|
margin: 1px;
|
||||||
color: white;
|
padding: 1px;
|
||||||
background-color: #3366CC;
|
}
|
||||||
}
|
|
||||||
|
td.selected {
|
||||||
td.selected:hover {
|
color: white;
|
||||||
color: white;
|
background-color: #3366CC;
|
||||||
background-color: #3366CC;
|
margin: 1px;
|
||||||
text-decoration: underline;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
td.selected:hover {
|
||||||
margin-bottom: 40px;
|
color: white;
|
||||||
text-align: justify;
|
background-color: #3366CC;
|
||||||
}
|
text-decoration: underline;
|
||||||
|
margin: 1px;
|
||||||
span.normal {
|
padding: 1px;
|
||||||
color: black;
|
}
|
||||||
background-color: white;
|
|
||||||
text-decoration: none;
|
p {
|
||||||
}
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
span.selected {
|
|
||||||
color: white;
|
span.normal {
|
||||||
background-color: #3366CC;
|
color: black;
|
||||||
text-decoration: none;
|
background-color: white;
|
||||||
}
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.selected {
|
||||||
|
color: white;
|
||||||
|
background-color: #3366CC;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user