Thursday, May 3, 2018

Fluid Branding - File Attachments Icon

Here is a question from PeopleSoft General Discussion community.

How can we customize the icons in the Fluid file attachment dialog box?

Further, how do we use different icons for different form factors?


We can do this by using CSS to override the icon on different form factors. I added the following styles at the end of my Fluid - Global Override Style Sheet used in my Branding Theme.

Fluid - Global Override Style Sheet


CSS referenced in Theme Definiton


CSS for Reference

As we can see in the CSS, we can use a different image as the content for the File Upload icon based on the form factor.

Demo on Desktop (Extra Large Form Factor)


Demo on Mobile Device (Small Form Factor)


6 comments:

  1. Thanks a lot Sasank....its working now

    ReplyDelete
  2. Hi Sasank,

    this branding is not working in IE and Safari too...can you help me on this.

    ReplyDelete
    Replies
    1. Yeah. My bad. Appears that content does not work in IE.

      You may have to use javascript to replace the image. Something similar to the following:
      https://pe0ples0ft.blogspot.com/2016/05/peopletools-855-using-oracle-jet-jquery_29.html

      I will update this post if I figure out a way to achieve this in CSS but it may not be possible because the image is within the HTML.

      Delete
  3. Hi Sasank,

    As you have suggested, i have created javascript to replace the logo for the file attachment

    document.write(unescape("%3Cscript src='/psp/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=0026_computer&img=DC_0026_COMPUTER' type='text/javascript'%3E%3C/script%3E"));var $jq = jQuery.noConflict();$jq(document).ready(function(){

    $jq('#PT_ATTACH_MYDEVICE_IMG_DEF img').attr('src', 0026_computer);});

    But i am getting the below error in console section of Chrome

    Uncaught SyntaxError: Invalid or unexpected token
    /cs/crmprdcp/cache/DC_FL_IR_JS_GER_MIN_2300.js:4 Uncaught SyntaxError: Invalid or unexpected token
    >.

    Please help.

    ReplyDelete
  4. Hi Sasank,

    This is not with respect to the above topic but it is related to attachments. I apologize for posting my question in this one.

    We recently upgraded to 8.55. what we noticed that in chrome we are not able to open up files (not having an extension like .pdf). It gets printed as plain text. However the document opens up in IE and Firefox as expected.

    The files are pdf files and their ATTACHUSERFILE filename does not have extension like '.pdf'.

    Prior to 8.55, we were on 8.52 and we didn't have any problem with it. The files used to open up without any issue.

    Any clue as to what could be the problem.

    Regards,
    Allen

    ReplyDelete
    Replies
    1. @Allen - Not sure off the top off my head.

      I would think it is browser related but you say that it worked prior to 8.55.

      Have you tried asking Oracle Support? I am interesting in finding out the cause.

      Delete