Theme Done
This commit is contained in:
parent
0cfadbef68
commit
2e43ccb973
|
|
@ -41,7 +41,7 @@ export class OrganizationListComponent implements OnInit {
|
|||
/* this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));*/
|
||||
|
||||
this.msv.entryFrom.formHeight = 500;
|
||||
this.msv.entryFrom.formWidth = 550;
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
|
||||
this.msv.entryFrom.caption = 'Organization';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export class DisciplineComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Description', 'Description', EnumColumnDataTypes.String));
|
||||
// this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));
|
||||
this.msv.entryFrom.formHeight = 320;
|
||||
this.msv.entryFrom.formWidth = 500;
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
|
||||
this.msv.entryFrom.caption = 'Discipline';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export class EducationLevelComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Code', 'Code', EnumColumnDataTypes.String));
|
||||
this.msv.listViewColumn.push(new BasicMasterListColumn('Description', 'Description', EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Education Level';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'EducationLevel';
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export class EducationTypeComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Description', 'Description', EnumColumnDataTypes.String));
|
||||
// this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Education Platform';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'EducationType';
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export class ExtracurricularActivityComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn("Description", "Description", EnumColumnDataTypes.String));
|
||||
//this.msv.listViewColumn.push(new BasicMasterListColumn("Status", "Status", EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = "Extra-Curricular Activity";
|
||||
this.msv.entryFrom.iDColumnName = "id";
|
||||
this.msv.entryFrom.sourceObject = "ExtraCurricularActivity";
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export class HobbyComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Description', 'Description', EnumColumnDataTypes.String));
|
||||
//this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Hobby';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'Hobby';
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export class InstitutionComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Code', 'Code', EnumColumnDataTypes.String));
|
||||
this.msv.listViewColumn.push(new BasicMasterListColumn('Name', 'Name', EnumColumnDataTypes.String));
|
||||
// this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Institution';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'Institution';
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export class OccupationComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn('Description', 'Description', EnumColumnDataTypes.String));
|
||||
// this.msv.listViewColumn.push(new BasicMasterListColumn('Status', 'Status', EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Occupation';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'Occupation';
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export class OtherTalentComponent {
|
|||
this.msv.listViewColumn.push(new BasicMasterListColumn("Description", "Description", EnumColumnDataTypes.String));
|
||||
//this.msv.listViewColumn.push(new BasicMasterListColumn("Status", "Status", EnumColumnDataTypes.String));
|
||||
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = "Other Talent";
|
||||
this.msv.entryFrom.iDColumnName = "id";
|
||||
this.msv.entryFrom.sourceObject = "OtherTalent";
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export class ResultTypeComponent {
|
|||
|
||||
//this.msv.entryFrom.formHeight = 300;
|
||||
// this.msv.entryFrom.formWidth = 550;
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
this.msv.entryFrom.caption = 'Result Standard';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
this.msv.entryFrom.sourceObject = 'ResultType';
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export class GradeListComponent implements OnInit {
|
|||
|
||||
this.msv.entryFrom.formHeight = 510;
|
||||
// this.msv.entryFrom.formWidth = 550;
|
||||
this.msv.entryFrom.formWidth = 500;
|
||||
this.msv.entryFrom.formWidth = 750;
|
||||
|
||||
this.msv.entryFrom.caption = 'Grade';
|
||||
this.msv.entryFrom.iDColumnName = 'id';
|
||||
|
|
|
|||
|
|
@ -984,24 +984,24 @@ $tree: '.k-treeview:not(.k-column-menu *, .k-pivotgrid-configurator-content *, .
|
|||
// =====================================================================================
|
||||
// Master data entry form (form-builder <app-basic-entry-form> / <app-basic-from-control>):
|
||||
// the Add/Edit dialog of every master-data screen (Employee Type, Category, Cost Center, ...).
|
||||
// Appearance only. Every control, binding, validator, the "... is required" message, the Save
|
||||
// button's [disabled] state, form width/height from the screen config and all @switch cases
|
||||
// stay exactly as they are. Everything is scoped to app-basic-entry-form.
|
||||
// - one look for every control type (textbox, number, date, dropdown, checkbox)
|
||||
// - no left-edge marker: forms.css paints .ng-invalid/.ng-valid[required] with a 5px left
|
||||
// border (it also hit the [formGroup] wrapper), and each wrapper had an inline border-left
|
||||
// - two-column grid that falls back to one column in narrow dialogs, even spacing
|
||||
// - an invalid field shows a red border only once the user has touched it
|
||||
// Fields inside a card, two per line filling the full width, label above its control, red
|
||||
// marker on the left of a required field that is still empty. Appearance only — every control, binding, validator, the "... is required"
|
||||
// message, the Save button's [disabled] state, the form width/height from the screen config and
|
||||
// all @switch cases stay exactly as they are. Scoped to app-basic-entry-form.
|
||||
// =====================================================================================
|
||||
$mf: '#{$std} app-basic-entry-form';
|
||||
|
||||
// Dialog height follows its content (no empty band under Close / Save); the screen config's
|
||||
// fixed height used to leave one. A long form still scrolls inside, capped at 90% of the screen.
|
||||
#{$mf} .k-dialog {
|
||||
height: auto !important;
|
||||
max-height: 90vh;
|
||||
}
|
||||
|
||||
// Dialog body
|
||||
#{$mf} .k-dialog-content {
|
||||
padding: 20px 24px 16px;
|
||||
background-color: var(--gh-tb);
|
||||
}
|
||||
#{$mf} form {
|
||||
container-type: inline-size;
|
||||
padding: 12px 12px 10px;
|
||||
background-color: var(--gh-pb);
|
||||
}
|
||||
#{$mf} fieldset {
|
||||
border: 0 !important;
|
||||
|
|
@ -1010,16 +1010,16 @@ $mf: '#{$std} app-basic-entry-form';
|
|||
min-width: 0;
|
||||
}
|
||||
|
||||
// Grid of fields
|
||||
// Card holding the fields: always two per line, together filling the full width
|
||||
#{$mf} .form-row-wrapper {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 18px 20px;
|
||||
}
|
||||
@container (max-width: 520px) {
|
||||
#{$mf} .form-row-wrapper {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
gap: 14px 16px;
|
||||
padding: 14px;
|
||||
background: var(--gh-tb);
|
||||
border: 1px solid var(--gh-bo);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 2px color-mix(in srgb, var(--gh-ht) 6%, transparent);
|
||||
}
|
||||
#{$mf} .form-row-wrapper > .form-row {
|
||||
width: auto !important;
|
||||
|
|
@ -1027,8 +1027,12 @@ $mf: '#{$std} app-basic-entry-form';
|
|||
padding: 0 !important;
|
||||
min-width: 0;
|
||||
}
|
||||
// An odd number of fields: the last one has no partner on its right, so it takes the full width
|
||||
#{$mf} .form-row-wrapper > .form-row:last-child:nth-child(odd) {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
// One field: label, control, message
|
||||
// One field: label with the "... is required" message beside it, the control under both
|
||||
#{$mf} app-basic-from-control > .row {
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
|
|
@ -1038,60 +1042,69 @@ $mf: '#{$std} app-basic-entry-form';
|
|||
flex: none !important;
|
||||
}
|
||||
#{$mf} app-basic-from-control > .row > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
border-left: 0 none !important; // inline border-left on every wrapper
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
align-items: baseline;
|
||||
column-gap: 8px;
|
||||
row-gap: 6px;
|
||||
border-left: 0 none !important; // inline border-left + forms.css marker on the [formGroup] wrapper
|
||||
}
|
||||
#{$mf} app-basic-from-control br {
|
||||
display: none;
|
||||
}
|
||||
#{$mf} app-basic-from-control label {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
margin: 0;
|
||||
font-size: calc(var(--gh-fz) * 13 / 14);
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
color: var(--gh-ht);
|
||||
letter-spacing: .01em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
#{$mf} app-basic-from-control > .row > div > div:not(.errorMessage) {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
#{$mf} app-basic-from-control .errorMessage {
|
||||
margin-top: -1px;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
font-weight: 500;
|
||||
font-size: calc(var(--gh-fz) * 12 / 14);
|
||||
line-height: 1.3;
|
||||
color: var(--gh-dn) !important;
|
||||
}
|
||||
|
||||
// No left-edge validity marker anywhere in this form (forms.css)
|
||||
#{$mf} :is(.ng-invalid, .ng-valid):not(form) {
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
// Every control type gets the same box
|
||||
// Every control type gets the same box (the app's text-box look)
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker):not(.k-input .k-input, .k-picker .k-input) {
|
||||
width: 100% !important;
|
||||
border: 1px solid var(--gh-bo2) !important;
|
||||
border: 1px solid color-mix(in srgb, var(--gh-btn) 25%, var(--gh-tb)) !important;
|
||||
border-radius: var(--gh-field-r) !important;
|
||||
background: var(--gh-tb) !important;
|
||||
background: var(--gh-pb) !important;
|
||||
color: var(--gh-ht) !important;
|
||||
font-family: var(--gh-font) !important;
|
||||
font-size: var(--gh-fz) !important;
|
||||
box-shadow: none !important;
|
||||
transition: border-color .15s, box-shadow .15s;
|
||||
transition: border-color .15s, box-shadow .15s, background-color .15s;
|
||||
}
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker):not(.k-input .k-input, .k-picker .k-input):hover {
|
||||
border-color: color-mix(in srgb, var(--gh-btn) 55%, var(--gh-bo2)) !important;
|
||||
border-color: var(--gh-btn) !important;
|
||||
}
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox:focus, .k-input:focus-within, .k-picker:focus-within, .k-focus):not(.k-input .k-input, .k-picker .k-input) {
|
||||
background: var(--gh-tb) !important;
|
||||
border-color: var(--gh-focus) !important;
|
||||
box-shadow: 0 0 0 3px var(--gh-ring) !important;
|
||||
outline: none;
|
||||
}
|
||||
// Touched and still invalid: red border (untouched empty fields stay neutral)
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker).ng-invalid.ng-touched {
|
||||
border-color: var(--gh-dn) !important;
|
||||
// Required marker on the left, as everywhere else in the app (forms.css): red while invalid,
|
||||
// green once a field marked required is filled
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker).ng-invalid:not(.k-input .k-input, .k-picker .k-input) {
|
||||
border-left: 4px solid var(--gh-dn) !important;
|
||||
}
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker).ng-invalid.ng-touched:is(:focus, :focus-within, .k-focus) {
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--gh-dn) 20%, var(--gh-tb)) !important;
|
||||
#{$mf} app-basic-from-control :is(input.k-textbox, .k-input, .k-picker).ng-valid:is([required], .required):not(.k-input .k-input, .k-picker .k-input) {
|
||||
border-left: 4px solid var(--gh-ok) !important;
|
||||
}
|
||||
// Inner parts of date picker / dropdown: no own border or background
|
||||
#{$mf} app-basic-from-control :is(.k-input, .k-picker) :is(.k-input-inner, .k-input-value-text, .k-dateinput) {
|
||||
|
|
@ -1104,9 +1117,8 @@ $mf: '#{$std} app-basic-entry-form';
|
|||
}
|
||||
#{$mf} app-basic-from-control :is(.k-input, .k-picker) > .k-input-button {
|
||||
border: 0 !important;
|
||||
border-left: 1px solid var(--gh-bo) !important;
|
||||
border-radius: 0 !important;
|
||||
background: var(--gh-pb) !important;
|
||||
background: transparent !important;
|
||||
color: var(--gh-muted) !important;
|
||||
}
|
||||
#{$mf} app-basic-from-control :is(.k-input, .k-picker) > .k-input-button:hover {
|
||||
|
|
@ -1116,24 +1128,48 @@ $mf: '#{$std} app-basic-entry-form';
|
|||
// Read-only and disabled
|
||||
#{$mf} app-basic-from-control input.k-textbox[readonly],
|
||||
#{$mf} app-basic-from-control :is(.k-input, .k-picker).k-disabled {
|
||||
background: var(--gh-pb) !important;
|
||||
color: var(--gh-muted) !important;
|
||||
opacity: .85;
|
||||
}
|
||||
// Checkbox field: checkbox and its label side by side on one line (clicking the label still
|
||||
// toggles it — the label's for= points at the checkbox id)
|
||||
#{$mf} app-basic-from-control > .row > div:has(input[type=checkbox]) {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
min-height: var(--gh-h);
|
||||
}
|
||||
#{$mf} app-basic-from-control > .row > div:has(input[type=checkbox]) > div:not(.errorMessage) {
|
||||
order: -1;
|
||||
width: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
#{$mf} app-basic-from-control > .row > div:has(input[type=checkbox]) > label {
|
||||
cursor: pointer;
|
||||
}
|
||||
// Checkbox: its own size, not stretched to the field width
|
||||
#{$mf} app-basic-from-control input[type=checkbox] {
|
||||
width: 18px !important;
|
||||
height: 18px;
|
||||
margin: 4px 0 0;
|
||||
border-left-width: revert;
|
||||
margin: 0;
|
||||
accent-color: var(--gh-btn);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// Footer: divider, buttons on the right (Close, then Save)
|
||||
// Footer: buttons on the right (Close, then Save)
|
||||
// "Name is required" is shown in brackets beside the label: (Name is required)
|
||||
#{$mf} app-basic-from-control .errorMessage::before {
|
||||
content: "(";
|
||||
}
|
||||
#{$mf} app-basic-from-control .errorMessage::after {
|
||||
content: ")";
|
||||
}
|
||||
|
||||
#{$mf} form > fieldset:last-of-type {
|
||||
margin-top: 20px !important;
|
||||
padding-top: 14px !important;
|
||||
border-top: 1px solid var(--gh-bo) !important;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
#{$mf} form > fieldset:last-of-type > .text-right {
|
||||
float: none !important;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user