|
|
@@ -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();
|
|
|
});
|
|
|
|