소스 검색

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 년 전
부모
커밋
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();