Yuki Takei 6 лет назад
Родитель
Сommit
9047c66f2f
1 измененных файлов с 21 добавлено и 22 удалено
  1. 21 22
      src/client/js/legacy/crowi.js

+ 21 - 22
src/client/js/legacy/crowi.js

@@ -116,27 +116,27 @@ Crowi.handleKeyCtrlSlashHandler = (event) => {
   event.preventDefault();
 };
 
-Crowi.initAffix = () => {
-  const $affixContent = $('#page-header');
-  if ($affixContent.length > 0) {
-    const $affixContentContainer = $('.row.grw-subnav');
-    const containerHeight = $affixContentContainer.outerHeight(true);
-    $affixContent.affix({
-      offset: {
-        top() {
-          return $('.navbar').outerHeight(true) + containerHeight;
-        },
-      },
-    });
-    $('[data-affix-disable]').on('click', function(e) {
-      const $elm = $($(this).data('affix-disable'));
-      $(window).off('.affix');
-      $elm.removeData('affix').removeClass('affix affix-top affix-bottom');
-      return false;
-    });
-    $affixContentContainer.css({ 'min-height': containerHeight });
-  }
-};
+// Crowi.initAffix = () => {
+//   const $affixContent = $('#page-header');
+//   if ($affixContent.length > 0) {
+//     const $affixContentContainer = $('.row.grw-subnav');
+//     const containerHeight = $affixContentContainer.outerHeight(true);
+//     $affixContent.affix({
+//       offset: {
+//         top() {
+//           return $('.navbar').outerHeight(true) + containerHeight;
+//         },
+//       },
+//     });
+//     $('[data-affix-disable]').on('click', function(e) {
+//       const $elm = $($(this).data('affix-disable'));
+//       $(window).off('.affix');
+//       $elm.removeData('affix').removeClass('affix affix-top affix-bottom');
+//       return false;
+//     });
+//     $affixContentContainer.css({ 'min-height': containerHeight });
+//   }
+// };
 
 Crowi.initClassesByOS = function() {
   // add classes to cmd-key by OS
@@ -665,7 +665,6 @@ window.addEventListener('load', (e) => {
 
   Crowi.highlightSelectedSection(window.location.hash);
   Crowi.modifyScrollTop();
-  Crowi.initAffix();
   Crowi.initClassesByOS();
 });