globaladmin home page responsive buttons idea
Posted: Mon May 23, 2022 10:42 pm
the admin buttons will be responsive in their own tabs with this following code.
below css goes un forms custom CSS.
This can of course be modified to suit NB as this is just an idea of responsive possibilities.
the below code goes in the forms custom JS.
Code: Select all
$('.input_text,.nuNone,iframe,select,.nuLookupCode,.nuLookupButton, .nuLookupDescription, .input_checkbox,.input_button,.input_nuDate,.input_number,.input_nuNumber, .input_nuAutoNumber,.input_nuScroll,.nuButton').css({'top':'','left':'','width':'','position':'','height':''});
$(".nuSection").contents().not("#nuDelete").wrapAll("<div class='form-element-wrapper' />");
$(".form-element-wrapper").wrapAll('<form class="container"></form>');
Code: Select all
.container {
display: -ms-grid;
display: grid;
-ms-grid-columns: 1fr ;
grid-template-columns: 1fr ;
grid-template-rows: 3;
-ms-grid-template-rows: 3;
width:97vw;
border-radius: 5px;
background-color: #f2f2f9;
padding:10px;
height:100%;
}
.form-element-wrapper{
display: flex;
flex-direction: row;
justify-content:space-between !important;
align-content:space-between;
padding: 10px;
row-gap: 10px;
column-gap: 20px;
flex-wrap: wrap;
/*flex-grow: 4;*/
/*flex-basis:25%;*/
}
.form-element-wrapper .nuButton {
/*flex: 1;*/
/*width: 100%;*/
width: 100%;
flex: 1 1 20% ;
/*margin: 5px;*/
}
@media (max-width: 700px) {
.container {
-ms-grid-columns: 1fr ;
grid-template-columns: 1fr ;
width:97vw;
padding:10px;
}
.form-element-wrapper{
flex-basis:auto;
flex-direction: column;
}
.form-element-wrapper .nuButton {
flex: 1;
width: 100%;
}
}
This can of course be modified to suit NB as this is just an idea of responsive possibilities.