
com.xresch.cfw.features.dashboard.resources.cfw_widget_parameter.js Maven / Gradle / Ivy
(function (){
CFW.dashboard.registerWidget("cfw_parameter",
{
category: "Advanced",
menuicon: "fas fa-sliders-h",
menulabel: CFWL('cfw_widget_parameter', 'Parameter'),
description: CFWL('cfw_widget_parameter_desc', 'Displays a widget with parameters that the viewer of the dashboard can adjust to customize the dashboard. User choices will be saved in the browser.'),
defaultsettings: {
TITLE: ""
},
createWidgetInstance: function (widgetObject, params, callback) {
CFW.dashboard.fetchWidgetData(widgetObject, params, function(data){
if(data.payload == null){
callback(widgetObject, '');
return;
}
var settings = widgetObject.JSON_SETTINGS;
var formHTML = data.payload.html;
var parentDiv = $('