Explorar o código

Fix bug mark as read a complete feed

Related to https://github.com/marienfressinaud/FreshRSS/issues/599
Fix https://github.com/marienfressinaud/FreshRSS/issues/633
Marien Fressinaud %!s(int64=11) %!d(string=hai) anos
pai
achega
e6a25f78f5

+ 9 - 1
app/layout/aside_flux.phtml

@@ -3,6 +3,8 @@
 
 	<ul class="categories">
 		<?php if ($this->loginOk) { ?>
+		<form id="mark-read-aside" method="post" style="display: none"></form>
+
 		<li>
 			<div class="stick configure-feeds">
 				<a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>"><?php echo Minz_Translate::t ('subscription_management'); ?></a>
@@ -87,7 +89,13 @@
 		<li class="separator"></li>
 		<li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('administration'); ?></a></li>
 		<li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('actualize'); ?></a></li>
-		<li class="item"><a href="<?php echo _url ('entry', 'read', 'get', 'f_!!!!!!'); ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a></li>
+		<li class="item">
+			<?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?>
+			<button class="read_all as-link <?php echo $confirm; ?>"
+			        form="mark-read-aside"
+			        formaction="<?php echo _url('entry', 'read', 'get', 'f_!!!!!!'); ?>"
+			        type="submit"><?php echo _t('mark_read'); ?></button>
+		</li>
 		<?php } ?>
 	</ul>
 </script>

+ 5 - 5
app/layout/nav_menu.phtml

@@ -187,12 +187,12 @@
 		Minz_Session::_param('markReadUrl', $markReadUrl);
 	?>
 
-	<form id="mark-read" method="post" style="display: none"></form>
+	<form id="mark-read-menu" method="post" style="display: none"></form>
 
 	<div class="stick" id="nav_menu_read_all">
 		<?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?>
 		<button class="read_all btn <?php echo $confirm; ?>"
-		        form="mark-read"
+		        form="mark-read-menu"
 		        formaction="<?php echo $markReadUrl; ?>"
 		        type="submit"><?php echo _t('mark_read'); ?></button>
 
@@ -205,7 +205,7 @@
 
 				<li class="item">
 					<button class="as-link <?php echo $confirm; ?>"
-					        form="mark-read"
+					        form="mark-read-menu"
 					        formaction="<?php echo $markReadUrl; ?>"
 					        type="submit"><?php echo $string_mark; ?></button>
 				</li>
@@ -218,13 +218,13 @@
 ?>
 				<li class="item">
 					<button class="as-link <?php echo $confirm; ?>"
-					        form="mark-read"
+					        form="mark-read-menu"
 					        formaction="<?php echo Minz_Url::display($mark_before_today); ?>"
 					        type="submit"><?php echo _t('before_one_day'); ?></button>
 				</li>
 				<li class="item">
 					<button class="as-link <?php echo $confirm; ?>"
-					        form="mark-read"
+					        form="mark-read-menu"
 					        formaction="<?php echo Minz_Url::display($mark_before_one_week); ?>"
 					        type="submit"><?php echo _t('before_one_week'); ?></button>
 				</li>

+ 3 - 1
app/views/helpers/pagination.phtml

@@ -6,6 +6,8 @@
 	Minz_Session::_param('markReadUrl', false);
 ?>
 
+<form id="mark-read-pagination" method="post" style="display: none"></form>
+
 <ul class="pagination">
 	<li class="item pager-next">
 	<?php if (!empty($this->nextId)) { ?>
@@ -19,7 +21,7 @@
 	<?php } elseif ($markReadUrl) { ?>
 		<button id="bigMarkAsRead"
 		        class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>"
-		        form="mark-read"
+		        form="mark-read-pagination"
 		        formaction="<?php echo $markReadUrl; ?>"
 		        type="submit">
 			<?php echo _t('nothing_to_load'); ?><br />