From f85232947e74ee7ef8c7b0ad2338212e7e68f1be Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 13 Dec 2009 18:50:29 +0000 Subject: reorganize the directories under src, and rescue the JavaScript interpreter from deprecated --- deprecated/old-lib/javascript/translator.js | 51 ----------------------------- 1 file changed, 51 deletions(-) delete mode 100644 deprecated/old-lib/javascript/translator.js (limited to 'deprecated/old-lib/javascript/translator.js') diff --git a/deprecated/old-lib/javascript/translator.js b/deprecated/old-lib/javascript/translator.js deleted file mode 100644 index 31da04290..000000000 --- a/deprecated/old-lib/javascript/translator.js +++ /dev/null @@ -1,51 +0,0 @@ -function formatTranslation (outputs) { - var dl1 = document.createElement("dl"); - dl1.className = "fromLang"; - for (var fromLang in outputs) { - var ul = document.createElement("ul"); - addDefinition(dl1, document.createTextNode(fromLang), ul); - for (var i in outputs[fromLang]) { - var dl2 = document.createElement("dl"); - dl2.className = "toLang"; - for (var toLang in outputs[fromLang][i]) { - addDefinition(dl2, document.createTextNode(toLang), document.createTextNode(outputs[fromLang][i][toLang])); - } - addItem(ul, dl2); - } - } - - return dl1; -} - -/* DOM utilities for specific tags */ - -function addDefinition (dl, t, d) { - var dt = document.createElement("dt"); - dt.appendChild(t); - dl.appendChild(dt); - var dd = document.createElement("dd"); - dd.appendChild(d); - dl.appendChild(dd); -} - -function addItem (ul, i) { - var li = document.createElement("li"); - li.appendChild(i); - ul.appendChild(li); -} - -function addOption (select, value, content) { - var option = document.createElement("option"); - option.value = value; - option.appendChild(document.createTextNode(content)); - select.appendChild(option); -} - -/* General DOM utilities */ - -/* Removes all the children of a node */ -function removeChildren(node) { - while (node.hasChildNodes()) { - node.removeChild(node.firstChild); - } -} -- cgit v1.2.3