diff options
| author | 2014-09-16 14:58:25 +0200 | |
|---|---|---|
| committer | 2014-09-16 14:58:25 +0200 | |
| commit | 6f8413403b53db7e17a36900bba2b470635b7943 (patch) | |
| tree | a59243d3062e74f9a7433ae75772cd8e57ac0a58 | |
| parent | def0b6e71aa29b33e1f412b7431d3818966d155e (diff) | |
Change #bigMarkAsRead link in button
See https://github.com/marienfressinaud/FreshRSS/issues/599#issuecomment-55735615
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 8 | ||||
| -rw-r--r-- | p/scripts/main.js | 8 | ||||
| -rw-r--r-- | p/themes/base-theme/template.css | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index db5cf25b5..f6fcbc701 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -14,11 +14,15 @@ <?php echo _t('load_more'); ?> </a> <?php } elseif ($markReadUrl) { ?> - <a id="bigMarkAsRead" href="<?php echo $markReadUrl; ?>"<?php if ($this->conf->reading_confirm) { echo ' class="confirm"';} ?>> + <button id="bigMarkAsRead" + class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>" + form="mark-read" + formaction="<?php echo $markReadUrl; ?>" + type="submit"> <?php echo _t('nothing_to_load'); ?><br /> <span class="bigTick">✓</span><br /> <?php echo _t('mark_all_read'); ?> - </a> + </button> <?php } else { ?> <a id="bigMarkAsRead" href="."> <?php echo _t('nothing_to_load'); ?><br /> diff --git a/p/scripts/main.js b/p/scripts/main.js index 07af35a5b..69ac01816 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -894,9 +894,13 @@ function load_more_posts() { box_load_more.children('.flux:last').after($('#stream', data).children('.flux, .day')); $('.pagination').replaceWith($('.pagination', data)); if (display_order === 'ASC') { - $('#nav_menu_read_all>a').attr('href', $('#bigMarkAsRead').attr('href')); + $('#nav_menu_read_all > .read_all').attr( + 'formaction', $('#bigMarkAsRead').attr('formaction') + ); } else { - $('#bigMarkAsRead').attr('href', $('#nav_menu_read_all>a').attr('href')); + $('#bigMarkAsRead').attr( + 'formaction', $('#nav_menu_read_all > .read_all').attr('formaction') + ); } $('[id^=day_]').each(function (i) { diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 9d81b6180..4186000a3 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -516,6 +516,7 @@ a.btn { } #bigMarkAsRead { display: block; + width: 100%; padding: 3em 0; text-align: center; } |
