Skip to content

Commit 36112fc

Browse files
committed
Only show "Or, continue" if there's another primary option
Also, remove border on Back links w/ text on splash pages
1 parent 32019a6 commit 36112fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

system/application/views/melons/cantaloupe/js/scalarpage.jquery.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,18 +527,25 @@
527527
// This option is on the current path or we don't know what path we're on
528528
if (( foundQueryPath && ( page.containingPath.slug == queryVars.path )) || !foundQueryPath ) {
529529

530+
var continueVerbage;
531+
if (pathOptionCount == 0) {
532+
continueVerbage = "Continue to ";
533+
} else {
534+
continueVerbage = "Or, continue to "
535+
}
536+
530537
// continue button
531538
links = $( '<p></p>' );
532539
var continue_button = $( '<a class="continue_btn nav_btn" href="' + page.containingPathNodes[page.containingPathIndex+1].url +
533-
'?path=' + page.containingPath.slug + '">Or, continue to &ldquo;' + page.containingPathNodes[page.containingPathIndex+1].getDisplayTitle() +
540+
'?path=' + page.containingPath.slug + '">' + continueVerbage + '&ldquo;' + page.containingPathNodes[page.containingPathIndex+1].getDisplayTitle() +
534541
'&rdquo;</a>' ).appendTo(links);
535542
if ( pathOptionCount == 0 ) {
536543
continue_button.addClass( 'primary' );
537544
}
538545

539546
// back button
540547
if ( page.containingPathIndex > 0 ) {
541-
var back_button = $( '<a id="back-btn" class="nav_btn" href="' + page.containingPathNodes[ page.containingPathIndex - 1 ].url + '?path=' + page.containingPath.slug + '">&laquo;</a> ' ).prependTo(links);
548+
var back_button = $( '<a id="back-btn" class="nav_btn bordered" href="' + page.containingPathNodes[ page.containingPathIndex - 1 ].url + '?path=' + page.containingPath.slug + '">&laquo;</a> ' ).prependTo(links);
542549
}
543550

544551
section.append( links );

0 commit comments

Comments
 (0)