Skip to Content
0

Design studio- issue with set title in openPromptDialog

Oct 20, 2016 at 02:35 AM

91

avatar image

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?

53qxe.png (6.8 kB)
10 |10000 characters needed characters left characters exceeded

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

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Martin Pankraz Oct 20, 2016 at 08:10 AM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Thank you for your reply.

but the pity is that it cannot come true.

as the method you said,Did you achieve?

0

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

scn-cust-css.png (119.4 kB)
1

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!

0

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.

0