diff --git a/ReplyTo/class.replyto.plugin.php b/ReplyTo/class.replyto.plugin.php index 2113438..d4d605d 100644 --- a/ReplyTo/class.replyto.plugin.php +++ b/ReplyTo/class.replyto.plugin.php @@ -144,9 +144,6 @@ public function commentModel_deleteComment_handler(&$Sender) { } public function discussionController_BeforeCalculatingOffsetLimit_handler($sender, $args) { - if (!Gdn::session()->isValid()) { - return; - } $viewMode = self::getViewMode(); // $offsetProvided = $args['OffsetProvided']; $discussion = $args['Discussion']; diff --git a/ReplyTo/design/replyto.css b/ReplyTo/design/replyto.css index dea2380..bda51b1 100644 --- a/ReplyTo/design/replyto.css +++ b/ReplyTo/design/replyto.css @@ -56,8 +56,103 @@ li.Item.ReplyToDepth-9 { margin-left: 14em; } -/* Stop indenting any further after 10 levels */ -li.Item.ReplyToDepth-10plus { +li.Item.ReplyToDepth-10 { margin-left: 15em; } +li.Item.ReplyToDepth-11 { + margin-left: 16em; +} + +li.Item.ReplyToDepth-12 { + margin-left: 17em; +} + +li.Item.ReplyToDepth-13 { + margin-left: 18em; +} + +li.Item.ReplyToDepth-14 { + margin-left: 19em; +} + +li.Item.ReplyToDepth-15 { + margin-left: 20em; +} + + +/* Stop indenting any further after 15 levels */ +li.Item.ReplyToDepth-16plus { + margin-left: 20em; +} + +@media screen and (max-width: 960px) { + li.Item.ReplyToDepth-1 { + margin-left: 1em; + } + + li.Item.ReplyToDepth-2 { + margin-left: 1.25em; + } + + li.Item.ReplyToDepth-3 { + margin-left: 1.5em; + } + + li.Item.ReplyToDepth-4 { + margin-left: 1.75em; + } + + li.Item.ReplyToDepth-5 { + margin-left: 2em; + } + + /* Reduce the indenting to single ems after 5 levels */ + + li.Item.ReplyToDepth-6 { + margin-left: 2.25em; + } + + li.Item.ReplyToDepth-7 { + margin-left: 2.5em; + } + + li.Item.ReplyToDepth-8 { + margin-left: 2.75em; + } + + li.Item.ReplyToDepth-9 { + margin-left: 3em; + } + + li.Item.ReplyToDepth-10 { + margin-left: 3.25em; + } + + li.Item.ReplyToDepth-11 { + margin-left: 3.5em; + } + + li.Item.ReplyToDepth-12 { + margin-left: 3.75em; + } + + li.Item.ReplyToDepth-13 { + margin-left: 4em; + } + + li.Item.ReplyToDepth-14 { + margin-left: 4.25em; + } + + li.Item.ReplyToDepth-15 { + margin-left: 4.5em; + } + + + /* Stop indenting any further after 15 levels */ + li.Item.ReplyToDepth-16plus { + margin-left: 5em; + } + +} \ No newline at end of file diff --git a/ReplyTo/js/replyto.js b/ReplyTo/js/replyto.js index f3eb389..5ed35b1 100644 --- a/ReplyTo/js/replyto.js +++ b/ReplyTo/js/replyto.js @@ -7,7 +7,7 @@ jQuery(document).ready(function($) { //If view is not flat, reload a page to rebuild a tree function reloadPage() { var currentView = param(window.location.href, 'view'); - return (currentView == 'tree' || currentView == 'threaded'); + return currentView == 'threaded'; } $(document).on('click','a.ReplyComment', function(ev) { @@ -48,7 +48,9 @@ jQuery(document).ready(function($) { } else { $(cancelReplyButton).show(); } - $(form)[0].scrollIntoView(); + + var ScrollY = $(form).offset().top - 100; + $('html,body').animate({scrollTop: ScrollY}, 800); return false; }); diff --git a/ReplyTo/models/class.replytomodel.php b/ReplyTo/models/class.replytomodel.php index d1712ec..2196267 100644 --- a/ReplyTo/models/class.replytomodel.php +++ b/ReplyTo/models/class.replytomodel.php @@ -293,7 +293,7 @@ public function depthClasses($depth) { // Add some further classes for blocks of each 5 depth levels, so limits can // be set on the way depth is formatted. - for ($i = 1; $i <= 100; $i += 5) { + for ($i = 1; $i <= 20; $i += 5) { if ($depth >= $i) { $Class .= ' ' . $Prefix . '-' . $i . 'plus'; } else {