fix active with anchor and settings dropdowns on non-settings pages

This commit is contained in:
Stephen Birarda 2018-02-14 13:50:46 -08:00
parent dd5a705836
commit 2d9f2ebf81
5 changed files with 4 additions and 6 deletions

View file

@ -3,5 +3,4 @@
<script src='/js/bootbox.min.js'></script>
<script src='/js/form2js.min.js'></script>
<script src='/js/bootstrap-switch.min.js'></script>
<script src='/js/shared.js'></script>
<script src='/js/base-settings.js'></script>

View file

@ -1,4 +1,5 @@
</div>
<script src='/js/jquery-2.1.4.min.js'></script>
<script src='/js/bootstrap.min.js'></script>
<script src='/js/shared.js'></script>
<script src='/js/domain-server.js'></script>

View file

@ -28,7 +28,7 @@ function settingsGroupAnchor(base, html_id) {
}
$(document).ready(function(){
var url = window.location;
var url = location.protocol + '//' + location.host+location.pathname;
// Will only work if string in href matches with location
$('ul.nav a[href="'+ url +'"]').parent().addClass('active');
@ -55,7 +55,7 @@ $(document).ready(function(){
var $contentDropdown = $('#content-settings-nav-dropdown');
var $settingsDropdown = $('#domain-settings-nav-dropdown');
// define extra groups to add to setting panels, with their splice index
// define extra groups to add to setting panels, with their splice index
Settings.extraContentGroupsAtIndex = {
0: {
html_id: Settings.CONTENT_ARCHIVES_PANEL_ID,
@ -99,7 +99,7 @@ $(document).ready(function(){
}
for (var endIndex in Settings.extraContentGroupsAtEnd) {
data.content_settings.push(Settings.extraContentGroupsAtIndex[spliceIndex]);
data.content_settings.push(Settings.extraContentGroupsAtEnd[endIndex]);
}
$.each(data.content_settings, function(index, group){

View file

@ -17,7 +17,6 @@ $(document).ready(function(){
Settings.extraGroupsAtEnd = Settings.extraDomainGroupsAtEnd;
Settings.extraGroupsAtIndex = Settings.extraDomainGroupsAtIndex;
Settings.afterReloadActions = function() {
// append the domain selection modal
appendDomainIDButtons();

View file

@ -261,6 +261,5 @@
<script src='/js/underscore-min.js'></script>
<script src='/js/bootbox.min.js'></script>
<script src='/js/sha256.js'></script>
<script src='/js/shared.js'></script>
<script src='js/wizard.js'></script>
<!--#include virtual="page-end.html"-->