Skip to content

Commit

Permalink
SAK-50805 SiteManage sub page navigation option (#13209)
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored Jan 21, 2025
1 parent 8eec7d1 commit 2251b74
Showing 1 changed file with 1 addition and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,47 +191,14 @@
<input type="checkbox" name="isMathJaxEnabledForSite" class="onoffswitch-checkbox" id="isMathJaxEnabledForSite" #if($isMathJaxEnabledForSite)checked="checked"#end>
</div>
</div>
<div class="subPageNavToggleArea" style='display: none'>
<div class="subPageNavToggleArea">
<label class="onoffswitch-label" for="isSubPageNavEnabled">
$tlang.getString("sinfo.subnav.allowForSite")
</label>
<div class="onoffswitch">
<input type="checkbox" name="isSubPageNavEnabled" class="onoffswitch-checkbox" id="isSubPageNavEnabled" #if($isSubPageNavEnabled)checked="checked"#end>
</div>
</div>
<script>
$(function() {
var subPageNavToggleArea = $('.subPageNavToggleArea');
var toolSelectionList = $('#toolSelectionList');
var toolList = $('#toolHolderW');
var isSubPageNavEnabledCheckbox = $('#isSubPageNavEnabled');

function checkForSelectedLessonsTools() {
if (toolSelectionList.find('li[id*=sakai_lessonbuildertool]:visible').length > 0) {
subPageNavToggleArea.show();
} else {
subPageNavToggleArea.hide();
}
};

toolList.find('input[type=checkbox]').on('click', function() {
setTimeout(checkForSelectedLessonsTools, 200); // fade out on selected item takes ~100ms
return true;
});

toolSelectionList.on('click', '.removeTool', function() {
setTimeout(checkForSelectedLessonsTools, 200); // fade out on selected item takes ~100ms
return true;
});

toolSelectionList.on('click mouseup keyup', '#alertBoxYes', function() {
setTimeout(checkForSelectedLessonsTools, 0);
return true;
});

checkForSelectedLessonsTools();
});
</script>
</div>
</div> <!-- row -->
</div> <!-- toolHolderWW -->
Expand Down

0 comments on commit 2251b74

Please sign in to comment.