User:Documentalist/common.js

importArticle({type: "script", article:"User:Documentalist/Objects.js"});

var ObjectBrowser = document.getElementById("ObjectBrowser"); var Objects = new Array; Objects[0] = {ID: "12", name: "Peter", value: "788", weight: "82"}; Objects[1] = {ID: "23", name: "Iron Dagger", value: "10", weight: "12"}; var ShowValue = true; var ShowWeight = true; /** function SetShowValue(v) { ShowValue = v; ShowObjects; } /**/ function SetShowWeight(Value) { console.log("Begin of SetShowWeight."); ShowWeight = Value; ShowObjects; console.log("End of SetShowWeight."); } /*-- 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 --*/ function ShowObjects{ console.log("Begin of ShowObjects."); ObjectBrowser.style.backgroundColor = "#101010"; var HTML = "";

/*Column control.*/ HTML += '\n'; { var State = ""; if (ShowWeight) State = 'disabled'; HTML += 'Show Value\n'; } { var State = ""; if (!ShowWeight) State = 'disabled'; HTML += 'Hide Value\n'; } HTML += '\n'; /* HTML += '\n'; if (ShowWeight) { HTML += 'Hide Weight\n'; } else { HTML += 'Show Weight\n'; } HTML += '\n';

/*Table*/ HTML += ' "; ObjectBrowser.innerHTML = HTML;  console.log("End of ShowObjects."); }

/*---*/ if (typeof ObjectBrowser != "undefined") { ShowObjects; }