Просмотр исходного кода

Fix print for unfolded articles (#2148)

Fix https://github.com/FreshRSS/FreshRSS/issues/2130
`.current` might not exist in views for which all articles are already
expanded
Alexandre Alapetite 7 лет назад
Родитель
Сommit
5c8eb1e864
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      p/scripts/main.js

+ 2 - 2
p/scripts/main.js

@@ -1301,13 +1301,13 @@ function init_confirm_action() {
 }
 
 function init_print_action() {
-	$('.item.share > a[href="#"]').click(function () {
+	$('.item.share > a[href="#"]').click(function (e) {
 		var content = "<html><head><style>" +
 			"body { font-family: Serif; text-align: justify; }" +
 			"a { color: #000; text-decoration: none; }" +
 			"a:after { content: ' [' attr(href) ']'}" +
 			"</style></head><body>" +
-			$(".flux.current .content").html() +
+			$(e.target).closest('.flux_content').find('.content').html() +
 			"</body></html>";
 
 		var tmp_window = window.open();