Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions views/includes/scripts/commentReplyScript.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<script type="text/javascript">
// Show spacer div
$('#reply-control').on('shown.bs.collapse', function () {
$('#show-reply-form-when-visible').css({
height: '200px'
});
});

// Hide spacer div
$('#reply-control').on('hidden.bs.collapse', function () {
$('#show-reply-form-when-visible').css({
height: '0'
});
});

$('.btn-comment-reply').click(function (aE) {
$('#reply-control').collapse('show');
Expand All @@ -20,7 +33,7 @@
});

function isElementInViewport(aEl) {
//special bonus for those using jQuery
// special bonus for those using jQuery
if (aEl instanceof jQuery) {
aEl = aEl[0];
}
Expand Down Expand Up @@ -53,7 +66,7 @@

var handler = fireIfElementVisible ($('#show-reply-form-when-visible'), callback);

//jQuery
// jQuery
$(window).on('DOMContentLoaded load resize scroll', handler);

</script>
8 changes: 7 additions & 1 deletion views/pages/discussionPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
{{> includes/head.html }}
<link rel="stylesheet" type="text/css" media="all" href="/redist/npm/bootstrap-markdown/css/bootstrap-markdown.min.css">
<style>
#show-reply-form-when-visible { height: 200px; }
#show-reply-form-when-visible {
-moz-transition: height 1s ease;
-ms-transition: height 1s ease;
-o-transition: height 1s ease;
-webkit-transition: height 1s ease;
transition: height 1s ease;
}
</style>
</head>
<body>
Expand Down
8 changes: 7 additions & 1 deletion views/pages/scriptIssuePage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<link rel="stylesheet" type="text/css" media="all" href="/redist/npm/bootstrap-markdown/css/bootstrap-markdown.min.css">
<link rel="stylesheet" type="text/css" media="all" href="/css/scriptPage.css">
<style>
#show-reply-form-when-visible { height: 200px; }
#show-reply-form-when-visible {
-moz-transition: height 1s ease;
-ms-transition: height 1s ease;
-o-transition: height 1s ease;
-webkit-transition: height 1s ease;
transition: height 1s ease;
}
</style>
</head>
<body>
Expand Down