Adjust notification timeout and closeButton settings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kurt
    Member
    • Jan 2018
    • 37

    Adjust notification timeout and closeButton settings

    I'm trying to get the error notifications to appear for longer, or use the closeButton feature of Espo.Ui.notify. Unfortunately it seems like I can't edit ui.js without rebuilding espo.min.js.

    Am I missing some way to adjust the error notification defaults?

    If not and I have to rebuild espo.min.js, is there some way to do that from my installed espo files or do I have to clone the Espo github repo just to build espo.min.js? The issue with that is the files in git are no longer in sync with my specific version of Espo and likely won't be in the future if I have to do this again. So it would be unsafe to build espo.min.js from the most recent files in git.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    You can write own function and use it. Could you describe better what you need?

    Comment

    • Kurt
      Member
      • Jan 2018
      • 37

      #3
      I ended up modifying ui.js and rebuilding espo.min.js from my local files. As described in my original post, I'm trying to adjust the duration of the error messages in Espo as it's currently set to 2 seconds for all message types that use Espu.UI.notify and that is often too short. I'm not trying to implement new, custom messages, just modify the behavior of the existing ones. I was hoping this might be controlled by configuration that I could override without modifying core Espo code.

      Also the closeButton feature did not work for me when I enabled it -- the button takes no action and the message stays up until you reload the page.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        Close Button in popup or where? For me it works. What browser do you use? Any errors in browser console?

        Comment

        • Kurt
          Member
          • Jan 2018
          • 37

          #5
          The closeButton flag adds the little "X" to the error messages (the messaging that pops up at the top of the window if you get a 400/500 error).

          I'm using Firefox 59.0. I don't have that code enabled/built anymore but can retry and check the console again. Certainly could have been user error but I'm pretty sure I only added passing true as the flag to the notify function for the closeButton arg, and the X started to show up when I did it but did not function.

          Comment

          • huscmk
            Junior Member
            • Feb 2017
            • 17

            #6
            Hi all,

            Just for information, I also tried the closeButton flag to true. As for Kurt it adds the little "X" to the message but nothing happens if we click on it. There is also nothing in the browser console. I tried on latest Chrome browser.

            Cheers,
            H

            Comment

            Working...