spacer
cornerspacercorner
Reply
Occasional Contributor
RichG
Posts: 4
Registered: 11-23-2011
0 Kudos

Adding custom buttons to the main toolbar

The Web Client Configuration Guide document tells you how to customise almost any part of the web interface.

Section 1.29 explains how to add custom buttons to the toolbar.  I can't work out from the instructions where you tell the system what to do when the button is pressed.  I want to launch an admin form.

Can anyone help please?

Occasional Contributor
RichG
Posts: 4
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

Has anybody needed to do this?

 

 

Occasional Contributor
RichG
Posts: 4
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

Any assistance with this would be much appreciated.

Employee
twheeler
Posts: 35
Registered: 05-02-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Hi Rich,

 

For your scenario, it sounds like all you are trying to do is launch a URL. I would refer to the Web Client configuration guide Section 4 (BPM URLs) to get the syntax of the Admin form URL you are trying to open.

 

Then in the Default.aspx page add the following under the definition of the telerick:RadToolBar around line 60:

 

<telerik:RadToolBarButton href="http://www.google.com" SkinID="MyPage" CheckOnClick="true" Group="NavItems" Text="My Page" ToolTip="My Page" />
             

(replace google's URL with the URL of your Admin form)

 

You're creating a new RadToolBarButton but there is no definition for the SkinID yet so you'll get an error if you just run it.

 

Now go to the Web\app_themes\Default\Default.skin file and find the corresponding skin definition for all those buttons around line 14 and add the following:

 

<telerik:RadToolBarButton skinid="MyPage" imageurl="Images/ListButtons/reports_off.png" HoveredImageUrl="Images/ListButtons/reports_on.png" CheckedImageUrl="Images/ListButtons/reports_on.png" ImagePosition="AboveText" runat="server" />

 

After saving both files (Default.aspx and Default.skin) your button should now be clickable with 2 states. When you click it, google should open in a new window. You can change the images for the button states or add javascript to your liking.

 

*Edit * I just looked and it is not opening in a new window but you can play around with the link to get it to open in a different window.. ie target="_blank".

 

Capture.JPG

Capture1.JPG

Capture2.JPG

Occasional Contributor
RichG
Posts: 4
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Thanks for the reply, I tried to launch a new window using your suggested solution but couldn't get it to open in a new window.

 

Instead I've used this which seems to work:-

 

<telerik:RadToolBarButton NavigateUrl="http://<Server Name>/Metastorm/eForm.aspx?Map=eService_Desk&Client=External&Action=MDDC_Log_Call" target="_new" SkinID="MyPage" CheckOnClick="true" Group="NavItems" CommandName="MyPage"
          Text="Log New Call" ToolTip="Log New Call" />

 

But when the new window opens I get a message in the background :- "Nullable object must have a value."

 

Do you have any idea how I can avoid this?

Screen shot.jpg

 

Kind Regards


Rich

 

 

 

 

Employee
twheeler
Posts: 35
Registered: 05-02-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Can you try it while leaving <CommandName="MyPage"> off?

 

Edited * Okay I just tested this and what you want to do is set  CheckOnClick="false"  and leave off the CommandName="MyPage" entirely... ie:

 

<telerik:RadToolBarButton NavigateUrl="http://<Server Name>/Metastorm/eForm.aspx?Map=eService_Desk&Client=External&Action=MDDC_Log_Call" target="_new" SkinID="MyPage" CheckOnClick="false" Group="NavItems" Text="Log New Call" ToolTip="Log New Call" />

line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line