Prevent Close Overlay

Home Forums General discussion Prevent Close Overlay

Viewing 4 reply threads
  • Author
    Posts
    • #27326
      Taylor Scott
      Participant

        Hi Alex, every so often for whatever reason someone will have an issue that prompts the “wow this took forever – close this overlay” message. My problem is that if someone wants to, they could potentially trigger this, and/or if they do receive this message they have the ability to click a box to remove all controls my form has put in place.

        I would rather have someone who recieves an error or loading issue be unable to act in any way. Preventing the overlay closure would be my preference. Is there a way to stop the user / turn off this function?

      • #27335
        Alexander Bautz
        Keymaster

          Hi,
          Edit the file /SPJS/DFFS/loader/DFFS_loader_overlay.html and change this:

          dffs_overlay_timeout = setTimeout(function(){
              var oDiv = document.getElementById("dffs_loadingOverlay"), iDiv = document.getElementById("dffs_loadingOverlayInner");
              if(oDiv !== null){
                  iDiv.innerHTML = "<div style='font-size:20px;width:"+w+"px;text-align:center;padding-top:100px;'>This took forever!<span style='font-size:12px'><br>Click to close this overlay.</span></div>";
                  oDiv.onclick = function(){
                      this.parentNode.removeChild(this);
                      setTimeout(function(){
                          document.querySelectorAll("table.ms-formtable")[0].style.position = "static";
                      },500);
                  };
              }
          },dffs_overlay_timeout_value);

          to this:

          dffs_overlay_timeout = setTimeout(function(){
              var oDiv = document.getElementById("dffs_loadingOverlay"), iDiv = document.getElementById("dffs_loadingOverlayInner");
              if(oDiv !== null){
                  iDiv.innerHTML = "<div style='font-size:20px;width:"+w+"px;text-align:center;padding-top:100px;'>This took forever!</div>";
              }
          },dffs_overlay_timeout_value);

          Alexander

        • #27509
          AdamP
          Participant

            I think this is really useful, so might be worth including as an option in the core DFFS package. The last thing you want after setting up logic on a form is to have someone bypass it, especially if you don’t realise that they have.

          • #27517
            Alexander Bautz
            Keymaster

              I have already removed the possibility to click to remove the overlay in the latest version of DFFS.

              Alexander

            • #27550
              AdamP
              Participant

                Excellent as always Alexander. I think I need to update to the latest version.

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.