diff options
author | javiexin <javiexin@gmail.com> | 2017-03-09 16:12:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 16:12:25 +0100 |
commit | bd12504f6cf03b36821a5cea2bf77a419496dcdb (patch) | |
tree | d30cc3506e1bbdc284dc7cca910c5dac6b927ae0 /phpBB/assets/javascript/core.js | |
parent | 96a90d3f81c1fcce3834ee72b7d1b9f76aa9354c (diff) | |
parent | 3e9f12d12d7dbdd2cee39425e81b5fdf66fcfbc8 (diff) | |
download | forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.gz forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.bz2 forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.xz forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.zip |
Merge branch '3.2.x' into ticket/15068
Diffstat (limited to 'phpBB/assets/javascript/core.js')
-rw-r--r-- | phpBB/assets/javascript/core.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index f7ace80705..b00da3caff 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 = $('<div />', { id: 'loading_indicator' }); + $loadingIndicator = $('<div />', { + id: 'loading_indicator', + class: 'loading_indicator', + }); $loadingIndicator.appendTo('#page-footer'); } @@ -958,12 +961,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')); @@ -971,8 +968,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); }); }); |