Page 1 of 1
Adding an icon/button to all DDS converted screens
Posted: Fri Mar 18, 2016 1:06 pm
by rasaro
Hello, I would like to automatically add an icon/button to all of my DDS converted screens using JavaScript in my custom theme.js.
Any idea's or help would be greatly appreciated.
Re: Adding an icon/button to all DDS converted screens
Posted: Mon Mar 21, 2016 1:29 pm
by Colin McNeill
Rick,
The easiest way in my opinion is to utilize the 'custom' directory located in the following path:
/www/<instance name>/htdocs/profoundui/userdata/custom/
All CSS and JS filse put in this directory will be loaded automatically.
Alternatively you could place your CSS files in different location and use the screen level property named 'external css'. In this property place the path where the CSS file is located.
Another method is to use our JS API's to dynamically load custom CSS or CSS files. Links to the documentation are below:
http://www.profoundlogic.com/docs/pages ... d=11206690
http://www.profoundlogic.com/docs/pages ... d=11206693
Let us know if this answers your question, or if you have more.
Thanks,
Colin
Re: Adding an icon/button to all DDS converted screens
Posted: Mon Mar 21, 2016 2:53 pm
by rasaro
Yes, I already have a custom js file with some other settings.
I was looking for some sample code to produce the button/icon.
Thanks.
Re: Adding an icon/button to all DDS converted screens
Posted: Wed Mar 23, 2016 1:10 pm
by matt.denninghoff
Hi Rick,
The field named "add enhancements" in your conversion theme JS file is what you want to edit. I've tested this, and it works for me on a converted screen:
Code: Select all
"add enhancements": function(format, isSubfile, isWindow) {
format.items.push({
"field type":"image",
"id":"Image99",
"left":"685px",
"top":"5px",
"image source":"/profoundui/proddata/images/image.png"});
},
Re: Adding an icon/button to all DDS converted screens
Posted: Tue Mar 29, 2016 10:34 am
by rasaro
Thanks Matt, this code worked and got me going. I appreciate your help!