In many of my webpages that I've created using the Capabilities API, I had to create a custom menu and I always used Bootstrap's Dropdown component. In this tutorial I will show how to do the same.
From the Mashup Editor, create a new project and give it a name, using "Grid Mashup Template". this will include bootstrap for you.
.
Select the app "Helpdesk Management.qvf".
From the right hand side, create a list and select "Department" from the Dimensions. Make sure you add a callback function, since that is where we will put our code. Here, I named it showData.
Now, lets go to the html template and add the dropdown code.
In the div that has the id="QV01", add the following:
The selection drop down is ready. now lets add some more graphs to make it more interesting when we select a department. I added 'Open & resolved cases over time', the KPI 'High priority Cases' and 'Case Details'. So the final page should look like this:
Last, we must set the button to the original state after the user clicks on the "Clear All". We just add the following line in the code.
case 'clearAll':
app.clearAll();
$('#QV01 .dropdown button').html('Select Department <span class="caret"></span>');
In your browser, got to your mashup editor at http://localhost:4848/dev-hub/mashup-editor, create a new project as the screenshots above. This will create several pages for you. One of these, is a javascript .js file. You will add all of the code there.
I followed another tutorial and was able to build the custom filter. Just want to know if I am using different colors to show selection made then how to show the possible selection (white and grey color of filter) for another filter.