Users are also able to attach events to the icons using the Event Controller popup. This is done by setting the event to lefticonclick or righticonclick and setting the controller to the desired controller.
Note: If your application was created before the above revisions were applied, then the style.css file and the basic template need to be updated.
Users can do this in either of the following ways:
For applications with the Basic Template/style.css unchanged:
1. Download the LeftRightIcons.zip file below and unzip 2. Checkout the Basic template into a project using the "Add Existing" action button 3. Click the "Import From XML" action button in the project.
4. Upload the basic file from the zip file.
5. Double check that the "Import To" dropdown has VIEW-10000100 - Basic selected and hit import. 6. Checkout the Style.css folder by selecting a type of File. 7. Select the css folder and upload the style.css file and hit checkout. 8. Test and promote to PD.
For applications with a modified Basic Template or style.css:
1. Checkout the Basic template into a project.
2. Open the Basic template and in the html add the line
Code: Select all
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp" rel="stylesheet">
Code: Select all
<link rel="stylesheet" href="System_Data(ApplicationFileUrl)css/amaran.css"></link>
Code: Select all
/* Rules for sizing the icon. */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
/* Rules for using icons as black on a light background. */
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
/* Rules for using icons as white on a dark background. */
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }
.text-field-wrap .material-icons {
position: absolute;
top: 8px;
left: 18px;
font-size: calc(1em + 6px);
}
.text-field-wrap.right-icon input,
.text-field-wrap.right-icon textarea,
.text-field-wrap.right-icon select {
padding-right: 53px;
}
.text-field-wrap.right-icon input:focus,
.text-field-wrap.right-icon textarea:focus,
.text-field-wrap.right-icon select:focus {
padding-right: 52px;
}
.text-field-wrap .material-icons.left-icon{
position: absolute;
top: 8px;
right: initial;
left: 18px;
font-size: calc(1em + 6px);
}
.text-field-wrap .material-icons.right-icon{
position: absolute;
top: 8px;
right: 18px;
left: initial;
font-size: calc(1em + 6px);
}
.text-field-wrap.field-success .material-icons.val-Icon {
position: absolute;
top: 8px;
right: 18px;
left: initial;
font-size: calc(1em + 6px);
}
.text-field-wrap.field-error .material-icons.unval-Icon {
position: absolute;
top: 8px;
right: 18px;
left: initial;
font-size: calc(1em + 6px);
}
.text-field-wrap.field-success .material-icons.unval-Icon {
display: none;
}
.text-field-wrap.field-error .material-icons.val-Icon {
display: none;
}
/* Field Success */
.text-field-wrap.field-success input,
.text-field-wrap.field-success textarea {
border-color: #85A73C;
padding-right: 50px;
}
.text-field-wrap.field-success .label-text,
.text-field-wrap.field-success.field-active input + .label-text,
.text-field-wrap.field-success input:focus + .label-text,
.text-field-wrap.field-success.field-active textarea + .label-text,
.text-field-wrap.field-success textarea:focus + .label-text {
color: #85A73C;
}
.text-field-wrap.field-success .material-icons {
color: #85A73C;
}
/* Field Error */
.text-field-wrap.field-error input,
.text-field-wrap.field-error textarea {
border-color: #B83C26;
padding-right: 50px;
}
.text-field-wrap.field-error .label-text,
.text-field-wrap.field-error.field-active input + .label-text,
.text-field-wrap.field-error input:focus + .label-text,
.text-field-wrap.field-error.field-active textarea + .label-text,
.text-field-wrap.field-error textarea:focus + .label-text {
color: #B83C26;
}
.text-field-wrap.field-error .helper-text {
color: #B83C26;
}
.text-field-wrap.field-error .material-icons {
color: #B83C26;
}
.text-field-wrap.hidden-icons:not(.left-icon) .material-icons {
display: none;
}
.text-field-wrap.hidden-icons.left-icon.right-icon .material-icons:first-of-type {
display: none;
}
.text-field-wrap.field-error .material-icons.unval-Icon {
display: block;
}
.text-field-wrap.field-success .material-icons.val-Icon {
display: block;
}
.text-field-wrap:not(.field-success):not(.field-error) .material-icons:nth-last-child(3) {
display: block;
}
5. Checkout the Style.css folder by selecting a type of File.
6. Select the css folder and upload the style.css file and hit checkout.
7. Test and promote to PD.