Răsfoiți Sursa

HUE-2319 [fb] Do not offer file scrolling when offsets are not supported

Added check to fileArea scroll event that tests if compression type is 'gzip', disables navigation and displays warning message.
Paul McCaughtry 11 ani în urmă
părinte
comite
6c2fcc13da
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      apps/filebrowser/src/filebrowser/templates/display.mako

+ 6 - 0
apps/filebrowser/src/filebrowser/templates/display.mako

@@ -436,6 +436,12 @@ ${ fb_components.menubar() }
     if (viewModel.totalPages() < viewModel.MAX_PAGES_TO_ENABLE_SCROLLING && viewModel.mode() == "text") { // enable scrolling
       _fileAreaScrollTimeout = -1;
       $("#fileArea").on("scroll", function () {
+        if (viewModel.compression() === 'gzip') {
+          $("#fileArea").off("scroll");
+          $(document).trigger('warn', "${_('Offsets are not supported with Gzip compression.')}");
+          return false;
+        }
+
         if ($("#fileArea").scrollTop() < 30) {
           viewModel.page(1);
           viewModel.upperPage(viewModel.page());