mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/12769] Fix subscription toggling fn
This commit is contained in:
parent
fd72a36a0c
commit
ea591562ae
1 changed files with 8 additions and 8 deletions
|
@ -957,12 +957,6 @@ phpbb.addAjaxCallback('toggle_link', function() {
|
||||||
$anchor.each(function() {
|
$anchor.each(function() {
|
||||||
var $this = $(this);
|
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
|
// Toggle link url
|
||||||
toggleUrl = $this.attr('data-toggle-url');
|
toggleUrl = $this.attr('data-toggle-url');
|
||||||
$this.attr('data-toggle-url', $this.attr('href'));
|
$this.attr('data-toggle-url', $this.attr('href'));
|
||||||
|
@ -970,8 +964,14 @@ phpbb.addAjaxCallback('toggle_link', function() {
|
||||||
|
|
||||||
// Toggle class of link parent
|
// Toggle class of link parent
|
||||||
toggleClass = $this.attr('data-toggle-class');
|
toggleClass = $this.attr('data-toggle-class');
|
||||||
$this.attr('data-toggle-class', $this.parent().attr('class'));
|
$this.attr('data-toggle-class', $this.children().attr('class'));
|
||||||
$this.parent().attr('class', toggleClass);
|
$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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue