diff --git a/views/includes/commentEditor.html b/views/includes/commentEditor.html index 32be28cd5..11f4f1e65 100644 --- a/views/includes/commentEditor.html +++ b/views/includes/commentEditor.html @@ -21,14 +21,16 @@
- +
- +
diff --git a/views/includes/commentForm.html b/views/includes/commentForm.html index 1756a92c6..111d949fc 100644 --- a/views/includes/commentForm.html +++ b/views/includes/commentForm.html @@ -1,11 +1,37 @@ -
-
-
-
- - +
+
diff --git a/views/includes/scripts/commentReplyScript.html b/views/includes/scripts/commentReplyScript.html index f9d440545..e2f8ca594 100644 --- a/views/includes/scripts/commentReplyScript.html +++ b/views/includes/scripts/commentReplyScript.html @@ -1,80 +1,47 @@ diff --git a/views/includes/scripts/polyfillElementClosest.js b/views/includes/scripts/polyfillElementClosest.js new file mode 100644 index 000000000..a7a8544b1 --- /dev/null +++ b/views/includes/scripts/polyfillElementClosest.js @@ -0,0 +1,18 @@ +// IE8+, Opera Presto, and older browser Element.Polyfill + +if (window.Element && !Element.prototype.closest) { + Element.prototype.closest = + function(aSelector) { + var matches = (this.document || this.ownerDocument).querySelectorAll(aSelector); + var i; + var el = this; + + do { + i = matches.length; + while (--i >= 0 && matches.item(i) !== el) { + }; + } while ((i < 0) && (el = el.parentElement)); + + return el; + }; +} diff --git a/views/pages/discussionPage.html b/views/pages/discussionPage.html index 996293aa2..47837a268 100644 --- a/views/pages/discussionPage.html +++ b/views/pages/discussionPage.html @@ -4,15 +4,6 @@ {{title}} {{> includes/head.html }} - {{> includes/header.html }} @@ -45,6 +36,11 @@
{{/paginationRendered}} + {{#authedUser}} +
+ {{> includes/commentForm.html }} +
+ {{/authedUser}}
@@ -54,8 +50,7 @@ -
- {{> includes/commentForm.html }} + {{> includes/footer.html }} {{#paginationRendered}} {{> includes/scripts/showTopPagination.html }} diff --git a/views/pages/newDiscussionPage.html b/views/pages/newDiscussionPage.html index 9692c43c0..8601ef6d3 100644 --- a/views/pages/newDiscussionPage.html +++ b/views/pages/newDiscussionPage.html @@ -17,7 +17,7 @@
diff --git a/views/pages/scriptIssuePage.html b/views/pages/scriptIssuePage.html index 144c00441..3019f4bc5 100644 --- a/views/pages/scriptIssuePage.html +++ b/views/pages/scriptIssuePage.html @@ -5,15 +5,6 @@ {{> includes/head.html }} - {{> includes/header.html }} @@ -53,6 +44,11 @@
{{/paginationRendered}} + {{#authedUser}} +
+ {{> includes/commentForm.html }} +
+ {{/authedUser}} @@ -63,16 +59,14 @@ -
- {{> includes/commentForm.html }} {{> includes/footer.html }} {{#paginationRendered}} {{> includes/scripts/showTopPagination.html }} {{/paginationRendered}} {{> includes/scripts/lazyIconScript.html }} {{#authedUser}} - {{> includes/scripts/markdownEditor.html }} - {{> includes/scripts/commentReplyScript.html }} + {{> includes/scripts/markdownEditor.html }} + {{> includes/scripts/commentReplyScript.html }} {{/authedUser}} {{^authedUser}} {{> includes/scripts/commentReplyTooltip.html }} diff --git a/views/pages/scriptNewIssuePage.html b/views/pages/scriptNewIssuePage.html index 19a66821d..69a37e896 100644 --- a/views/pages/scriptNewIssuePage.html +++ b/views/pages/scriptNewIssuePage.html @@ -18,7 +18,7 @@
  • {{script.name}}
  • {{category.name}}
  • - +
  • diff --git a/views/pages/scriptViewSourcePage.html b/views/pages/scriptViewSourcePage.html index f1d416af2..79134568f 100644 --- a/views/pages/scriptViewSourcePage.html +++ b/views/pages/scriptViewSourcePage.html @@ -34,7 +34,7 @@
    {{#isLib}} {{#newScript}} - Library Name: + Library Name: {{/newScript}} {{^newScript}}