MicroStrategy ONE
Adding Icons to Buttons on the Prompt Page
All Prompts display buttons Run Report and Cancel to take further action on the report. In this scenario, these buttons are customized to display an icon next to the text.
Before customization:
After customization:
This customization can be accomplished using either of the following methods:
Deploying the plug-in provided with MicroStrategy SDK
MicroStrategy SDK provides a plug-in (ZIP file) that can simply be extracted to thepluginsfolder to view the customization in MicroStrategy Web. The following steps guide you in locating the plug-in and deploying it.
-
Access the plug-in: JSP version or ASP .NET version.
-
Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.
-
Launch MicroStrategy Web to view the customization.
Using the Web Customization Editor to create a plug-in
MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide you in creating the plug-in and deploying it.
-
Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.
-
Navigate to Global CSS->Customizations.
-
Right-click global.css and select New Selector.
-
Enter .mstrTextButtonExecute in the Selector text field, and click OK.
-
Double-click .mstrTextButtonExecute to launch the Update CSS Property dialog.
-
Click Add to launch the New Property dialog.
-
Enter background in the Property text field and click OK.
-
Click the Value cell for the background property.
-
Click the Image button on the Utilities panel to navigate to the image.
-
Select the image and click OK. The location of the image gets updated in the Value cell. For example: url(images/execute.gif) if the image is called execute.gif.
-
Click the Value cell for the background property and update the value to transparent url(images/execute.gif) no-repeat center left.
-
Click Add to launch the New Property dialog.
-
Enter padding-left in the Property text field and click OK.
-
Click the Value cell for the padding-left property and enter 15px.
-
Click OK to exit the Update CSS Property dialog.
-
Right-click global.css and select New Selector.
-
Enter .mstrTextButtonCancel in the Selector text field, and click OK.
-
Double-click .mstrTextButtonCancel to launch the Update CSS Property dialog.
-
Click Add to launch the New Property dialog.
-
Enter background in the Property text field and click OK.
-
Click the Value cell for the background property.
-
Click the Image button on the Utilities panel to navigate to the image.
-
Select the image and click OK. The location of the image gets updated in the Value cell. For example: url(images/cancel.gif) if the image is called cancel.gif.
-
Click the Value cell for the background property and update the value to transparent url(images/cancel.gif) no-repeat center left.
-
Click Add to launch the New Property dialog.
-
Enter padding-left in the Property text field and click OK.
-
Click the Value cell for the padding-left property and enter 15px.
-
Click OK to exit the Update CSS Property dialog.
-
Navigate back to MicroStrategy Web Configuration and click on Styles to expand the list of styles used in MicroStrategy Web.
-
Double-click PromptsContainerStyle_Widget to launch the Style Properties editor in the right frame.
-
Click the Style Layouts tab.
-
Click the Edit Layout button.
-
Click the Yes button in the prompt to edit PromptsContainerLayout_widget.xml.
-
Add the following lines of code (shown in bold below) to thePromptEditorblock.:
...
...
<mstrlayout:block name="PromptEditor">
...
<mstrlayout:bSetProperty path="cancelButton/visible" method="canCancelPrompt"/>
<mstrlayout:bSetProperty path="messageNameView/visible" method="shouldDisplayRenameMessage"/>
<!-- _CUSTOM_ Give the Execute Button a new css class -->
<mstrlayout:bSetProperty path="finishButton/cssClass" value="TextButtonExecute"/>
<!-- _CUSTOM_ Give the Cancel Button a new css class -->
<mstrlayout:bSetProperty path="cancelButton/cssClass" value="TextButtonCancel" />
<mstrlayout:slot name="PromptEditor"/>
</mstrlayout:block>
...
...
-
Save your changes.
-
Launch MicroStrategy Web to view the customization.
See Also