Merge pull request #7884 from MrPetovan/bug/7834-ignore-reload
Restore post reload after (un)ignore
This commit is contained in:
commit
6531819971
3 changed files with 9 additions and 7 deletions
|
@ -149,7 +149,7 @@ class System extends BaseObject
|
||||||
* and adds an application/json HTTP header to the output.
|
* and adds an application/json HTTP header to the output.
|
||||||
* After finishing the process is getting killed.
|
* After finishing the process is getting killed.
|
||||||
*
|
*
|
||||||
* @param array $x The input content.
|
* @param mixed $x The input content.
|
||||||
* @param string $content_type Type of the input (Default: 'application/json').
|
* @param string $content_type Type of the input (Default: 'application/json').
|
||||||
*/
|
*/
|
||||||
public static function jsonExit($x, $content_type = 'application/json') {
|
public static function jsonExit($x, $content_type = 'application/json') {
|
||||||
|
|
|
@ -73,6 +73,6 @@ class Ignore extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
// the json doesn't really matter, it will either be 0 or 1
|
// the json doesn't really matter, it will either be 0 or 1
|
||||||
System::jsonExit([$ignored]);
|
System::jsonExit($ignored);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -649,14 +649,16 @@ function doignore(ident) {
|
||||||
ident = ident.toString();
|
ident = ident.toString();
|
||||||
$('#like-rotator-' + ident).show();
|
$('#like-rotator-' + ident).show();
|
||||||
$.get('item/ignore/' + ident, function(data) {
|
$.get('item/ignore/' + ident, function(data) {
|
||||||
if (data.match(/1/)) {
|
if (data === 1) {
|
||||||
$('#ignored-' + ident).addClass('ignored');
|
$('#ignored-' + ident)
|
||||||
$('#ignored-' + ident).removeClass('unignored');
|
.addClass('ignored')
|
||||||
|
.removeClass('unignored');
|
||||||
$('#ignore-' + ident).addClass('hidden');
|
$('#ignore-' + ident).addClass('hidden');
|
||||||
$('#unignore-' + ident).removeClass('hidden');
|
$('#unignore-' + ident).removeClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
$('#ignored-' + ident).addClass('unignored');
|
$('#ignored-' + ident)
|
||||||
$('#ignored-' + ident).removeClass('ignored');
|
.addClass('unignored')
|
||||||
|
.removeClass('ignored');
|
||||||
$('#ignore-' + ident).removeClass('hidden');
|
$('#ignore-' + ident).removeClass('hidden');
|
||||||
$('#unignore-' + ident).addClass('hidden');
|
$('#unignore-' + ident).addClass('hidden');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue