From 6ecf6d61ccffec5b703b13a89186a734a68c8ff6 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 12 Dec 2018 14:38:30 +1300 Subject: [PATCH] Bug 1765276: Fixed nav tabs in file browser and artefact chooser behatnotneeded Change-Id: Ie13f3c3a5503db4bb4ae6b9e4131c8bbf06c4e03 --- htdocs/lib/form/elements/artefactchooser.php | 8 ++++---- .../plugintype/artefact/file/templates/form/ownertabs.tpl | 4 ++-- htdocs/theme/raw/templates/form/artefactchooser.tpl | 4 ++-- htdocs/theme/raw/templates/styleguide.tpl | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/lib/form/elements/artefactchooser.php b/htdocs/lib/form/elements/artefactchooser.php index 6fcb9d69d8..f21f87874a 100644 --- a/htdocs/lib/form/elements/artefactchooser.php +++ b/htdocs/lib/form/elements/artefactchooser.php @@ -159,10 +159,10 @@ jQuery(function($) { // Hide the search form $(a).on('click', function(e) { $('#artefactchooser-searchform').addClass('d-none'); - $(searchA.parentNode).removeClass('active'); + $(searchA).removeClass('active'); $(browseA).find('.sr-only').html('(' + get_string_ajax('tab', 'mahara') + ' ' + get_string_ajax('selected', 'mahara') + ')'); $(searchA).find('.sr-only').html('(' + get_string_ajax('tab', 'mahara') + ')'); - $(browseA.parentNode).addClass('active'); + $(browseA).addClass('active'); $(browseA).trigger("blur"); $('#artefactchooser-searchfield').val(''); // forget the search for now, easier than making the tabs remember it if (!browseTabCurrent) { @@ -179,10 +179,10 @@ jQuery(function($) { $(a).on('click', function(e) { $('#artefactchooser-searchform').show(); $('#artefactchooser-searchform').removeClass('d-none'); - $(browseA.parentNode).removeClass('active'); + $(browseA).removeClass('active'); $(searchA).find('.sr-only').html('(' + get_string_ajax('tab', 'mahara') + ' ' + get_string_ajax('selected', 'mahara') + ')'); $(browseA).find('.sr-only').html('(' + get_string_ajax('tab', 'mahara') + ')'); - $(searchA.parentNode).addClass('active'); + $(searchA.).addClass('active'); $('#artefactchooser-searchfield').on('keypress', function(e) { if (e.keycode == 13) { // enter pressed - submitting form diff --git a/htdocs/theme/raw/plugintype/artefact/file/templates/form/ownertabs.tpl b/htdocs/theme/raw/plugintype/artefact/file/templates/form/ownertabs.tpl index e4b3ce8c89..6dc6b9f31f 100644 --- a/htdocs/theme/raw/plugintype/artefact/file/templates/form/ownertabs.tpl +++ b/htdocs/theme/raw/plugintype/artefact/file/templates/form/ownertabs.tpl @@ -1,7 +1,7 @@