From 3606e130de7a017dd386ab81faa4945f930270a8 Mon Sep 17 00:00:00 2001 From: Michael Miday Date: Mon, 14 Sep 2015 16:26:27 +0200 Subject: [ticket/14139] Fix loading indicator --- phpBB/assets/javascript/core.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/assets/javascript/core.js') diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 36e881f5fd..6285a16734 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -27,7 +27,10 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined'); */ phpbb.loadingIndicator = function() { if (!$loadingIndicator) { - $loadingIndicator = $('
', { id: 'loading_indicator' }); + $loadingIndicator = $('
', { + id: 'loading_indicator', + class: 'loading_indicator', + }); $loadingIndicator.appendTo('#page-footer'); } -- cgit v1.2.1 From ea591562ae4234633a99865b9539fc5b902dbe69 Mon Sep 17 00:00:00 2001 From: Michael Miday Date: Tue, 15 Sep 2015 23:31:14 +0200 Subject: [ticket/12769] Fix subscription toggling fn --- phpBB/assets/javascript/core.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'phpBB/assets/javascript/core.js') diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 6285a16734..6a008ba1ec 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -957,12 +957,6 @@ phpbb.addAjaxCallback('toggle_link', function() { $anchor.each(function() { var $this = $(this); - // Toggle link text - toggleText = $this.attr('data-toggle-text'); - $this.attr('data-toggle-text', $this.text()); - $this.attr('title', $.trim(toggleText)); - $this.text(toggleText); - // Toggle link url toggleUrl = $this.attr('data-toggle-url'); $this.attr('data-toggle-url', $this.attr('href')); @@ -970,8 +964,14 @@ phpbb.addAjaxCallback('toggle_link', function() { // Toggle class of link parent toggleClass = $this.attr('data-toggle-class'); - $this.attr('data-toggle-class', $this.parent().attr('class')); - $this.parent().attr('class', toggleClass); + $this.attr('data-toggle-class', $this.children().attr('class')); + $this.children('.icon').attr('class', toggleClass); + + // Toggle link text + toggleText = $this.attr('data-toggle-text'); + $this.attr('data-toggle-text', $this.children('span').text()); + $this.attr('title', $.trim(toggleText)); + $this.children('span').text(toggleText); }); }); -- cgit v1.2.1