-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render review file in server side to show/hide documentation (#1033)
* Render review file in server side to show/hide documentation
- Loading branch information
1 parent
7c3c848
commit d8ed8b9
Showing
8 changed files
with
58 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -532,9 +532,6 @@ code-inner { | |
text-decoration: line-through; | ||
} | ||
|
||
.documentation { | ||
display: none; | ||
} | ||
mark { | ||
padding: 0; | ||
} |
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
$(() => { | ||
const SEL_DOC_CLASS = ".documentation"; | ||
const SHOW_DOC_CHECKBOX = "#show-documentation-checkbox"; | ||
const SHOW_DOC_CHECK_COMPONENT = "#show-documentation-component"; | ||
const SHOW_DOC_CHECKBOX = ".show-doc-checkbox"; | ||
const SHOW_DOC_HREF = ".show-document"; | ||
|
||
hideCheckboxIfNoDocs(); | ||
|
||
$(document).on("click", SHOW_DOC_CHECKBOX, e => { | ||
$(SEL_DOC_CLASS).toggle(e.target.checked); | ||
}); | ||
|
||
function hideCheckboxIfNoDocs() { | ||
if ($(SEL_DOC_CLASS).length == 0) { | ||
$(SHOW_DOC_CHECK_COMPONENT).hide(); | ||
} | ||
} | ||
|
||
$(SHOW_DOC_CHECKBOX).on("click", e => { | ||
$(SHOW_DOC_HREF)[0].click(); | ||
}); | ||
}); |
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