mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12769] Fix subscription toggling fn
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user