cancel
Showing results for 
Search instead for 
Did you mean: 

Design studio- issue with set title in openPromptDialog

former_member241445
Participant
0 Kudos

Dear community.

I have use "DS_1.openPromptDialog(300, 200);" open a new dialog,but now I want to change the title.how can I change the title as I wanted?

former_member241445
Participant
0 Kudos

Once I have displayed the prompt calling openPromptDialog, I can see the following in developper mode:

Accepted Solutions (1)

Accepted Solutions (1)

Martin-Pankraz
Active Contributor
0 Kudos

Hi Zhang,

This is a standard field which is translated according to your language setting. If you are not happy with the standard text you can indeed try to override it using CSS. A selector could look like this:

span[id="__row33_zenDlgTitleCellTextView"]{

visibility:hidden;

}

span[id="__row33_zenDlgTitleCellTextView"]:before{

visibility: visible;

content: "There you go";

}

Make sure the span's id is correct when you test. I am not sure if it is recalculated.

You can find some more styling directions here: https://blogs.sap.com/2015/04/22/list-of-css-for-sap-design-studio/

CSS is a very wide topic.

Kind regards

Martin

former_member241445
Participant
0 Kudos

Thank you for your reply.

but the pity is that it cannot come true.

as the method you said,Did you achieve?

Martin-Pankraz
Active Contributor

You need to add a custom CSS file to your dashboard:

Once you added a new file insert the script from my first answer. Make sure the id "__row33_zenDlgTitleCellTextView" is correct. You can do that on the browser's developer tools like you already did when you opened this question.

Kind regards

Martin

former_member241445
Participant
0 Kudos

Thank you every much !

I have find the reason why I couldn't realize it.Due to I have changed the position of component,so the id of span have changed.

this style of CSS was first time to use.I'm very lucky to receive your reply,and I have a new understanding of CSS.Thanks!

former_member241445
Participant
0 Kudos

I tried once again,when we use openPromptDialog to open a dialog,the id of span was rand,so We'd better use class to set css.That's my suggestion.

Answers (0)