-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changes to show documentation and deprecated methods
- Loading branch information
1 parent
b7ced0a
commit 6a313e2
Showing
9 changed files
with
101 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,4 @@ | |
<ProjectReference Include="..\APIView\APIView.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
$(() => { | ||
const SEL_DOC_CLASS = ".documentation"; | ||
const SHOW_DOC_CHECKBOX = "#show-documentation-checkbox"; | ||
const SHOW_DOC_CHECK_COMPONENT = "#show-documentation-component"; | ||
const SEL_CODE_INNER_CLASS = ".code-inner"; | ||
const SEL_CODE_LINE = ".code-line"; | ||
|
||
hideCheckboxIfNoDocs(); | ||
toggleEmptyLineVisibility(false); | ||
|
||
$(document).on("click", SHOW_DOC_CHECKBOX, e => { | ||
toggleAllDocumentationVisibility(e.target.checked); | ||
}); | ||
|
||
function hideCheckboxIfNoDocs() { | ||
if ($(SEL_DOC_CLASS).length == 0) { | ||
$(SHOW_DOC_CHECK_COMPONENT).hide(); | ||
} | ||
} | ||
|
||
function toggleEmptyLineVisibility(showDocuments: boolean) { | ||
//If code line only has documentation then toggle that line | ||
$(SEL_CODE_LINE).each(function () { | ||
var tokenElements = $(this).find(SEL_CODE_INNER_CLASS).children(); | ||
//Checking atleast one doc node is present to avoid hiding explicit empty lines | ||
if (tokenElements.filter(SEL_DOC_CLASS).length > 0 && tokenElements.not(SEL_DOC_CLASS).length == 0) { | ||
$(this).toggle(showDocuments); | ||
} | ||
}); | ||
} | ||
|
||
function toggleAllDocumentationVisibility(showDocuments: boolean) { | ||
$(SEL_DOC_CLASS).toggle(showDocuments); | ||
toggleEmptyLineVisibility(showDocuments); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters