diff options
| author | 2014-09-16 14:12:44 +0200 | |
|---|---|---|
| committer | 2014-09-16 14:12:44 +0200 | |
| commit | c6dbe9def83153c7c274ef0fa47fe27ef592d3ab (patch) | |
| tree | 791b0623d319a056ff6022ea26b7e939081603d8 /app/layout | |
| parent | 5d9479a4ac3260c799655423e4d63f721c81e6ed (diff) | |
Use buttons instead of links for "mark as read"
See https://github.com/marienfressinaud/FreshRSS/issues/599
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/nav_menu.phtml | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 76ead5762..a997a7d54 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -184,9 +184,15 @@ Minz_Session::_param('markReadUrl', $markReadUrl); ?> + <form id="mark-read" method="post" style="display: none"></form> + <div class="stick" id="nav_menu_read_all"> - <?php $confirm = $this->conf->reading_confirm ? ' confirm' : ''; ?> - <a class="read_all btn<?php echo $confirm; ?>" href="<?php echo $markReadUrl; ?>"><?php echo _t('mark_read'); ?></a> + <?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?> + <button class="read_all btn <?php echo $confirm; ?>" + form="mark-read" + formaction="<?php echo $markReadUrl; ?>" + type="submit"><?php echo _t('mark_read'); ?></button> + <div class="dropdown"> <div id="dropdown-read" class="dropdown-target"></div> @@ -194,14 +200,29 @@ <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="item"><a class="<?php echo $confirm; ?>" href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read" + formaction="<?php echo $markReadUrl; ?>" + type="submit"><?php echo $string_mark; ?></button> + </li> <li class="separator"></li> <?php $today = $this->today; $one_week = $today - 604800; ?> - <li class="item"><a class="<?php echo $confirm; ?>" href="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $today . '000000'); ?>"><?php echo _t('before_one_day'); ?></a></li> - <li class="item"><a class="<?php echo $confirm; ?>" href="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $one_week . '000000'); ?>"><?php echo _t('before_one_week'); ?></a></li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read" + formaction="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $today . '000000'); ?>" + type="submit"><?php echo _t('before_one_day'); ?></button> + </li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read" + formaction="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $one_week . '000000'); ?>" + type="submit"><?php echo _t('before_one_week'); ?></button> + </li> </ul> </div> </div> |
