Commit Graph

133 Commits

Author SHA1 Message Date
Mathias Kresin ee98a62519 mark items on page 2+ read as well, update tests
Update integration tests, to ensure that all articles are marked read,
instead of only visible.
2015-04-07 22:46:50 +02:00
Frederic Guillot c81b728d69 Merge Arabic translation #348 and improve user interface for RTL languages 2015-03-20 18:53:15 -04:00
Mathias Kresin 3a65e5ee64 do mark-feed-as-read in javascript without reload
follow-up to 4809f736dc. Update
integration tests, to ensure that all articles are marked read, instead
of only visible.
2015-03-08 13:19:29 +01:00
Mathias Kresin 0c3d8c787f use keyboardevent.key if implemented
Beside other stuff the main reason for this change is the circumstance
that Firefox triggers the "Toggle RTL mode" shortcut if the user press
F11 to switch Firefox into the fullscreen mode.

Each browser sends keycodes that are used by different other keys on
the keyboard for the function keys. Firefox is the only browser which
sends the onkeypress event for the function keys.

The used keyboard event properties event.keyCode and event.which are
already marked as deprecated and has been removed from the Web standards.

The "DOM Level 3 Events" standard specifies event.key as their successor.

Right now event.key is only available for Firefox 29+ and Internet
Explorer 9+. Webkit based browser have support for the former specified
event.keyIdentifier.

The implementation of event.keyIdentifier isn't the same across
different webkit based browsers and buggy:

- the value for the z key is F11 (Chrome - Windows, Linux)
- the value for the F11 key is F11 as well on (Chrome - Windows, Linux)
- the value for latin keys is always the value of the capital letter (Chrome)
- the value for cyrillic keys depends on the shift modifier (Chrome)
- the value for the keypress event is always an empty string (Safari - Mac OS)
- the value for the keydown event matches the keyboard layout dependent character (Safari - Mac OS)
- the value for the keydown event does NOT matches the keyboard layout dependent character (Chrome - Windows, Linux)

Instead of workaround the problems, the event.which is used for every
browser that doesn't support event.key.
2015-03-07 18:23:36 +01:00
Mathias Kresin 4809f736dc implement mark-feed-as-read in javascript 2015-03-01 19:56:28 +01:00
Mathias Kresin a2686ae21d add option to disable mark as read for original link
fixes #196
2015-01-30 00:14:01 +01:00
Frederic Guillot 33a6e50c96 Add debug_mode config option and update vendor 2015-01-28 21:57:34 -05:00
Frederic Guillot fa9dc3ab8f Change label for frontend update check and minor changes 2015-01-28 20:17:02 -05:00
Mathias Kresin 59500bfeb7 update counter/rework redirect to unread on feeds page
The redirect to the unread page after a manual refresh only, if new
items could be fetched and we where redirected to the subscriptions
page because of a former nothing_to_read.

Update the unread counter after refreshing either one feed or all feeds.

Redirect to unread if nothing_to_read is set, but unread items exists.
This could be the situation with the remember me function, when new items
are fetched while the browser was closed.
2015-01-28 05:26:55 +01:00
Mathias Kresin cd13efeabf implement frontend autoupdate
Only the unread counter is updated right know.

The AutoUpdate Feature is designed on the premise of don't wasting resources. A
distinction is made between updates when Miniflux is visible or hidden.

To determine the visibility status, the Page Visibility API is used. The API is
available starting with Chrome 33, Firefox 18 and IE10. [https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API]
As IE9 returns an undefined, it doesn't break the compatibility at least.

If Miniflux is visible, the unread counter on the web page is updated as soon as
a mismatch between the counter and the number of unread articles in the database
is found.

If Miniflux is hidden, the timestamp of the most recent article from each feed
is compared with the value from the last run. We have an update If the timestamp
of the latest article is greater than the stored one and the latest article is
unread. The web page title is updated with a ? symbol to notify the user and the
update check pauses till Miniflux gets visible again. If Miniflux gets visible
again, the number of unread articles is queried from the database, the unread
counter on the web page is updated and finally the ? symbol is removed from the
web page title.

This way I can use my fever API client to read new articles (or at least the
latest article) while Miniflux is hidden and as I've seen the new articles
already a new articles notification is prevented.

It's intentionally that the page does not reload automatically as long as
articles are visible. If I'm in hurry, I only scroll through the articles to
spot something interesting. Most of the time I don't reach the last article.
If the page is reloaded while I'm away, I would have to scan from the top again.

If we're on a nothing_to_read page and have unread articles in the database, a
redirect to the unread page will be done.

The default update check interval is 10 minutes and can be changed on the
settings page. A zero value disables the update check entirely.

fixes #213
2015-01-28 05:26:55 +01:00
Mathias Kresin e0fd734c64 use javascript advanced optimizations, improve make-js script
Major benefit, beside a smaller file size, is the possibility to remove debug informations from the minified javascript.

make-js script:
- take care of any warnings and errors
- raise warning level to verbose

js/*
- switch to Array-Access Property Notation for external data (prevents renaming by the closure compiler)
2015-01-28 05:26:55 +01:00
Mathias Kresin 816b793e4c re-enable help shortcut for Firefox, fix javascript errors 2015-01-18 01:26:28 +01:00
Mathias Kresin f602ff50e2 adjust alert css classes to the message severity
Use panel classes for styling and leave error class for errors.
2015-01-18 01:26:28 +01:00
Frederic Guillot cd1a0115c2 Minor cleanups 2015-01-17 18:53:40 -05:00
Mathias Kresin db94d94de3 Improve user notice about failed feeds
Show feeds with errors always at the top and highlight them

Changes the feed order to:

1. failed
2. enabled
3. disabled

Order alphabetical within each group.

Show a warning message with a hin to the console if feeds have issues

Fixes #300, #303
2015-01-15 02:04:35 +01:00
Mathias Kresin 360fc9076e improve sub navigation on config page
Don't hide the active element, it annoying to use the navigation if the
menu items changing there position with every click. Indicate the active
menu item instead, similar to the header navigation.

May I've worked to long with windows systems, but help and about have to
be the last menu items :-). I've reorderd the menu items to what I think
user need more often.

A sub-navigation should not change its parent heading. Changed that as
well.
2015-01-13 22:50:59 +01:00
Frederic Guillot bea3c7a29a Minor css improvements 2015-01-12 19:59:17 -05:00
Frederic Guillot 84078bb2a5 Add left/right arrow as keyboard shortcuts 2015-01-12 19:46:21 -05:00
Mathias Kresin 71275eac2c display & update the number of unread items on every page with an "unread items" menu 2015-01-04 18:48:01 +01:00
Mathias Kresin 80952f29b0 middle mouse button triggers event for all browser
This is a follow up to #1. The onclick event is triggered by different
mouse buttons across browsers:

Firefox
- all mouse buttons trigger document.onclick (https://bugzilla.mozilla.org/show_bug.cgi?id=430310)
- only left mouse button triggers document.body.onclick

Internet Explorer
- only left mouse button and without any modifier key triggers
  document.onclick

Chrome
- left & middle mouse button trigger document.onclick

Safari
- left mouse button triggers document.onclick
- middle click via mac os?

By switching to the onmouseup event this can be unified for all
mentioned browsers to:

- (CTRL+) left click triggers event
- middle click triggers event
- right click does nothing
2015-01-03 23:17:10 +01:00
Mathias Kresin 1e1e35e38c IE: 'open original' doesn't open article
The 'open original' link marks the item as read but doesn't open the
article.

After double clicking one 'open original' link, all other
'open original' links open the article as expected. Sounds like the IE
blocks the 'popup' silenty here.

The following in #196 reported issues are fixed by the change as well:
- a middle click on an 'open original' link triggers the popup blocker
- original link opened via middle click is always a foreground tab
2015-01-03 23:02:59 +01:00
Frédéric Guillot da174a10cc Display the bookmarklet in a text box to be easy to copy and paste 2015-01-02 12:43:17 -05:00
Mathias Kresin 9d31eb1a01 Fix feed-last-checked update after refresh-all
I've dropped it accidentally with my last commit. Furthermore I moved
the data-feed-id definition to the article element and dropped multiple
references of the feed id. That's similar to what I've done before with
the data-item-id in 3dae99ac.

The article element holds the information whether a feed is disabled now.

Now it is shown if a feed had errors while updating.
2014-12-31 17:14:19 +01:00
Mathias Kresin 3fe424999f fix RTL toggling
H2 within an item preview was toggled to rtl and back to ltr
immediately.
2014-12-27 10:21:22 +01:00
Mathias Kresin 0aa5252c85 remove multiple definition of data-item-page 2014-12-26 23:01:05 +01:00
Mathias Kresin a4d8abb631 Move update icon and update icon blinking to css
Use CSS3 Animation for the "loading icon" blinking and move the definition of
the loading icon to CSS as well.

CSS3 Animations are supported by IE10, Firefox and using the -webkit prefix by
Chrome and Safari.

I've dropped the usage of element.classList in favour of supporting refreshing/
article downloading in IE9 (again). The classList stuff isn't necessarily
needed, as the elements in question only get one or no class assigned.

I've dropped no longer supported css options like:

the appearance option isn't supported by any browser, the -webkit-appearance
doesn't change anything visible.

-webkit-font-smoothing support was dropped in chrome 22 and font-smoothing
isn't specified anywhere.
2014-12-26 23:01:05 +01:00
Frédéric Guillot bb21b9aa02 Change css for the bookmarklet link 2014-12-26 10:43:27 -05:00
Frédéric Guillot c1d74b8332 Add favicon support 2014-12-24 17:54:27 -05:00
Frédéric Guillot b2e3116350 Add Instapaper support 2014-12-24 13:50:20 -05:00
Frédéric Guillot 5690f91fb7 Add keyboard shortcut to toggle RTL mode 2014-12-23 22:13:23 -05:00
Frédéric Guillot 04749a4aba Replace mark as read link by an icon 2014-12-10 21:12:42 -05:00
Mathias Kresin 0455d14d73 Update Bookmark Icon title within the article view when toggling bookmark status 2014-12-10 17:08:07 +01:00
Mathias Kresin 8194a18ae9 remove hardcoded bracket 2014-12-10 16:50:35 +01:00
Frédéric Guillot f398694a45 Fix broken keyboard shortcut to display the help 2014-11-23 10:23:28 -05:00
Mathias Kresin c3b3d51365 Bookmark page: hide article if bookmark is removed
As i can't imagine any other site than the bookmarks page where an article needs
to be hidden based on the bookmark status, I've hardwired it into the javascript
function.
2014-11-20 18:49:16 +01:00
Mathias Kresin a1b8c5b160 do not deselect the current item if no successor/predecessors exists
When using the previous shortcut with the first article selected, the selection
is removed and no article is the current-item. Using the shortcut again, the
last article is the current-item (as expected on a new loaded page).

The same applies to the combination of last article and next shortcut.
2014-11-20 10:46:34 +01:00
Mathias Kresin 3dae99ac27 remove multiple definition of item id
The item id exists as data attribute or as element.id postfix on multiple
elements in an article.

The basic idea is to traverse the DOM tree - starting from the event firing
element - in reverse order till an article element is found.

This article element is passed to the JavaScript functions. These JavaScript
functions are getting the elements which they want to manipulate starting from
the article utilizing the JavaScript querySelector function.

The bootstrap themes had a conflicting and unused class style definied, which is
removed by now.
2014-11-20 10:43:29 +01:00
Mathias Kresin e9762e7ea0 Move bookmark/read/unread display style completely to CSS 2014-11-19 20:19:45 +01:00
Mathias Kresin 8424b9bfb1 add brackets to unread, page and feed items counter via CSS
Unified the page-counters before.

This makes processing of counters in javascript way more easier. The minimum
required browser versions for the needed CSS3 selectors are IE9, Firefox 3.5
and Chrome 5. Confirmed working with IE9, Firefox 24.6, Chrome 36, Mobile Safari
on iOS6.

An unintended side effect of CSS brackets is that theme designers are able to
implement there idea of brackets.
2014-11-19 20:19:45 +01:00
Frédéric Guillot fa5bda49db Add a database page 2014-11-18 19:16:14 -05:00
Frédéric Guillot 3b2db03597 Minor css fix 2014-11-08 16:59:52 -05:00
Frédéric Guillot 7ae86d2d41 Remove duplicate body padding for mobile 2014-11-08 13:10:24 -05:00
Frédéric Guillot ca72433299 Improve layout (always show prev/next) 2014-11-08 12:55:30 -05:00
Frédéric Guillot e5947db7f1 Add CSRF protections 2014-11-07 21:44:20 -05:00
Frédéric Guillot f4efaadad1 Remove Google auth (openid is deprecated) and Persona auth (useless) 2014-11-07 20:53:50 -05:00
Mathias Kresin c18ddc3ddc HTML Cleanup
Remove line breaks and indentation around links text: At least Chrome/Firefox on
Windows add the white space(s) from the HTML Code to the link text, which
results in "jumping" labels. The behaviour can be observed with the Hello Theme
while toggling the bookmark status.
2014-11-05 14:45:10 +01:00
Frédéric Guillot c0ce32094e Do not handle keyboard events for form fields 2014-10-26 10:27:27 -04:00
Frédéric Guillot 53b94d8f7b Add option to force RTL mode per feed and improve feed modification 2014-10-19 19:14:33 -04:00
Jarek Piórkowski 7bf2bab92c keyboard shortcuts won't fire with modifier keys
I had particular problems with Ctrl-N (open new window/tab)
interfering with N (go to next unread item). This change
disregards keyboard shortcuts if Alt, Shift, or Ctrl are used.
It also tries to disregard Win/Super/Meta, though this didn't
work for me in Firefox. Still, just the Ctrl is an improvement
for me.
2014-09-05 02:30:40 -07:00
Frédéric Guillot 9b2eaa2602 Various bugfixes (merge pull-request #235) 2014-08-10 15:03:48 -07:00