Visualize: render input controls

All types

by NesterOne

HTML

<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<div id="containerInput" style="width:300px"></div>

CSS

/* Boolean */
#containerInput .jr-mInputControlBoolean .jr-mInput-boolean-label{
   color: green;
}

/* Text */
#containerInput .jr-mInputControlSingleValueText .jr-mInput-label{
   color: red;
}

/* Date */
#containerInput .jr-mInputControlSingleValueDate .jr-mInput-label{
   color: blue;
}

/* Time */
#containerInput .jr-mInputControlSingleValueTime .jr-mInput-label{
   color: white;
}

/* Datetime */
#containerInput .jr-mInputControlSingleValueDatetime .jr-mInput-label{
   color: pink;
}

/* Number */
#containerInput .jr-mInputControlSingleValueNumber .jr-mInput-label{
   color: orange;
}

JavaScript

visualize({
    auth: {
        name: "superuser",
        password: "superuser"
    }
}, function (v) {
    var inputControls = v.inputControls({
        resource: "/public/Visualize/Adhoc/Ad_Hoc_View_All_filters_Report",
        container: "#containerInput",
        error: function (err) {
            console.error(err);
        }
    });


});