CSBL - widgetImpulseButton (OUT)

 

 

First of all, an existing widget must be identified in the dashboard to be the target of the triggered action, of which the id <TARGET_WIDGET_NAME> must be noted. In this example the target is a WidgetSingleContent.

The JavaScript function to be inserted in the appropriate CK Editor box (in more options) of the current widgetImpulseButton widget is of the following type:

function execute() {
    $('body').trigger({
        type: "showLastDataFromExternalContentGis_<TARGET_WIDGET_NAME>"
        eventGenerator: $(this),
        targetWidget: <TARGET_WIDGET_NAME>,
        color1: "#acb2fa",
        color2: "#231d5c",
        widgetTitle: "Occupied Parking Lots (Alberti Car Park)",
        field: "occupiedParkingLots",
        serviceUri: "http://www.disit.org/km4city/resource/iot/orionUNIFI/DISIT/CarParkPal.Giustizia"
    });
}