Skip to content

Commit

Permalink
newui add table and ro (WIP
Browse files Browse the repository at this point in the history
newui/index.js
- Add header StarLight

newui/mainnav.js
- remove some alert text

newui/modules.css
- add table layout
- add input background (WIP)

newui/modules.js
- walkThroughModel: add parent
- add findParentVar
- Variable::createHTML: use ro, call receiveData for value
- Variable::receiveData: deal with table type
- Variable::generateData: deal with table type
- TextVariable::generateData: deal with table type
- SelectVariable::receiveData: deal with ro
- SelectVariable::generateData: send options always
- TextVariable::createHTML: create table html
- TextVariable::generateHTML: no data generated

UsertModE131: rename watches to patches
  • Loading branch information
ewowi committed Nov 13, 2024
1 parent 0b96d0e commit 3386ab0
Show file tree
Hide file tree
Showing 10 changed files with 6,128 additions and 594 deletions.
3 changes: 2 additions & 1 deletion data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,13 @@ function varRemoveValuesForRow(variable, rowNr) {

//process json from server, json is assumed to be an object
function receiveData(json) {
// console.log("receiveData", json);

if (isObject(json)) {
for (let key of Object.keys(json)) {
let value = json[key];

// console.log("receiveData", key + ": " + JSON.stringify(json[key]));

//tbd: for each node of a variable (rowNr)

//special commands
Expand Down
7 changes: 7 additions & 0 deletions data/newui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ class Controller {

this.modules = new Modules();

let body = gId("body");

body.innerHTML += `<h1>StarLight 💫</h1>`
// body.innerHTML += "<p>"

this.theme = new Theme();
this.theme.createHTML();
this.theme.getTheme();

// body.innerHTML += "</p>"

this.mainNav = new MainNav(this.modules.model);
this.mainNav.createHTML();
Expand Down
2 changes: 1 addition & 1 deletion data/newui/mainnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MainNav {
or shrink if there is nothing to show in the alerts area -->
<div id="alerts" class="text-center bg-error">
<!-- Place the alert text in a padded div so that when it's not present the alert area will be hidden-->
<div class="pa-3 text-center">some alert text</div>
<!-- <div class="pa-3 text-center">some alert text</div>-->
</div>
<!-- Main navigation bar has a fixed height and so it is always visible -->
Expand Down
27 changes: 25 additions & 2 deletions data/newui/modules.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ label {
}

input {
background: transparent;
background: #b81d1d;
color: var(--text-color);
font-size: 8px; /*var(--font-size-s) not working for some reason */
}
Expand All @@ -33,4 +33,27 @@ label {
margin-left: 20px;
/* border-radius: 12px; */
}


/*table layout */
.table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
border-radius: 10px; /*does not seem to work */
border-style: hidden; /* hide standard table (collapsed) border */
box-shadow: 0 0 0 1px #666; /* this draws the table border */
}

.table td, .table th {
border: 1px solid #000000;
padding: 6px;
vertical-align: top;
}

.table th {
/* padding-top: 12px;
padding-bottom: 12px; */
text-align: left;
background-color: var(--th-color);
color: var(--label-color);
}
Loading

0 comments on commit 3386ab0

Please sign in to comment.