Commit Graph

293 Commits

Author SHA1 Message Date
Alexis Degrugillier
d5ea3e96ef Add theme to print page
Before, the printed page didn't have any usable CSS.
Now, it uses the css files available in the application. It means that
custom CSS can be add to target printed page.

See #2149
2019-04-16 18:50:32 +02:00
Alexandre Alapetite
aef3f8d71b Alow mix of auto read options (#2354)
Fix
https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126
2019-04-07 00:29:37 +02:00
Alexandre Alapetite
1b7cf6b035 Fix menu warning (#2353)
confirm is only for labels, not for feeds
2019-04-06 17:05:53 +02:00
Alexandre Alapetite
43e3a2d69d Fix autoremove again (#2352)
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
2019-04-06 16:45:21 +02:00
Alexandre Alapetite
0a067dbcd4 Fix hide articles + batch option (#2349)
https://github.com/FreshRSS/FreshRSS/issues/2332
https://github.com/FreshRSS/FreshRSS/issues/2345
Re-introduces the instant-remove article.
Batch mark-as-read only used for fast actions like scroll and keyboard
shortcut for next/previous articles.
2019-04-06 15:51:39 +02:00
Alexandre Alapetite
09a5b4493d Better handling of bad request and fast unload (#2346)
* Better handling of bad request and fast unload

Warnings for bad requests, confirmation before leaving a page with
pending mark-as-read requests (not the others for now)

* Fix callbacks
2019-04-06 09:24:22 +02:00
Alexandre Alapetite
e1bb23ee44 Fix scroll functions in Edge (#2337)
Use more standard / robust document.scrollingElement
2019-04-04 00:02:23 +02:00
Alexandre Alapetite
2efab9893c Fix shortcut problem when showing articles unfolded (#2336)
Fix https://github.com/FreshRSS/FreshRSS/issues/2328
2019-04-03 23:10:33 +02:00
Alexandre Alapetite
452419bf83 Fix auto_remove_article (#2334)
* Fix auto_remove_article

https://github.com/FreshRSS/FreshRSS/issues/2323

* Second attempt

* Third attempt
2019-04-03 23:08:46 +02:00
Alexandre Alapetite
8599dc29a1 Fix control click (#2330)
https://github.com/FreshRSS/FreshRSS/issues/2310
2019-04-02 22:46:56 +02:00
Frans de Jonge
c2a339f2f8 [CI] Lint JS scripts with jshint (#2315) 2019-04-01 23:47:36 +02:00
Alexandre Alapetite
e5c8d52aa1 Fix ASC load more (#2318)
https://github.com/FreshRSS/FreshRSS/issues/2314
2019-04-01 23:43:20 +02:00
Alexandre Alapetite
09362f15ee Minor code simplification
https://github.com/FreshRSS/FreshRSS/pull/2300
2019-03-27 00:08:59 +01:00
Alexandre Alapetite
580123fdb0 Wait for mark-as-read queue before click (#2300) 2019-03-25 08:46:31 +01:00
Alexandre Alapetite
ebd8c31c02 Rework CSRF interaction with sessions (#2290)
* Rework CSRF interaction with sessions

Fix https://github.com/FreshRSS/FreshRSS/issues/2288
Improve security in some edge cases
Maybe relevant for
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671

* Forgotten mime type
2019-03-22 19:05:38 +01:00
Alexandre Alapetite
54a86990e6 Improved auto load more articles
Fixed bug + ealier trigger of load more (half of the window height
instead of 0)
2019-03-09 19:15:46 +01:00
Alexandre Alapetite
b869c2944a JavaScript fixes + new navigation loop behaviour (#2255)
* Fixed user configuration 404
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466561555
* Fixed "SPACE" shortcut bug
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466626412
* Use next feed / previous feed when reaching last / first article
instead of looping
* Jump to next / previous category when reaching last / first feed
instead of looping
2019-02-23 14:39:20 +01:00
Alexandre Alapetite
2374374ba9 Less jQuery (#2234)
* Less jQuery

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix https://github.com/FreshRSS/FreshRSS/issues/2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
2019-02-13 15:06:28 +01:00
Alexandre Alapetite
ef6df8aeca Merge branch 'dev' into dev-1.14.0 2019-01-26 21:08:27 +01:00
Alexandre Alapetite
da4a80b88a Add a JavaScript event when opening an article (#2222)
* Add a JavaScript event when opening an article
https://framagit.org/nicofrand/xextension-threepanesview/issues/4

```javascript
document.body.addEventListener('freshrss:openArticle', function (e) {
		console.log('freshrss:openArticle');
		console.log(e.target);
	});
```
2019-01-24 19:43:28 +01:00
Alexandre Alapetite
6bc49e137e Manual merge /dev 2019-01-15 20:58:53 +01:00
Alexandre Alapetite
9214eeecff Comment about Gecko scrollbar bug in Firefox 64
https://bugzilla.mozilla.org/show_bug.cgi?id=1514498
2019-01-15 18:51:13 +01:00
Alexandre Alapetite
a26eff8a20 Merge branch 'FreshRSS/dev' into FreshRSS/dev-1.14.0 2019-01-06 12:19:26 +01:00
Alexandre Alapetite
20223b8b01 Automatic API test (#2207)
* Automatic API test

Easier for end-user, smarter, and the guess testing of greader
authorization token was not reliable.

* Travis + minor
2019-01-05 12:33:18 +01:00
Alexandre Alapetite
f9555db678 IE11 fixes 2018-12-27 03:49:20 +01:00
Alexandre Alapetite
caa893e14b Optimise onscroll routines
Much lighter rework: auto-mark-as-read, auto-remove-articles,
auto-load-more.
In particular, use a single onscroll event handler with a throtte.
Continue removing jQuery when possible.
2018-12-27 03:34:56 +01:00
Alexandre Alapetite
8f03b370cc Send item queue as POST
Which also simplifies the request
2018-12-25 16:10:20 +01:00
Alexandre Alapetite
6fa09318ce Semove superfluous window. object 2018-12-25 16:09:48 +01:00
Alexandre Alapetite
cd9a9a9309 First version of batch scroll as read
Mark-as-read requests are queued and sent max once per second
2018-12-25 15:34:25 +01:00
Alexandre Alapetite
eefeb23419 jQuery ES6 partial refactoring
Prefix jQuery variables with $
Start avoiding jQuery in easy cases
Use let/const
2018-12-25 05:11:38 +01:00
Alexandre Alapetite
4888f919f1 Prepare for batch mark as read 2018-12-25 01:30:28 +01:00
Alexandre Alapetite
e0e96d6a13 Remove simple-scrollbar fallback (#2182)
https://github.com/FreshRSS/FreshRSS/pull/2181#issuecomment-447636787
2018-12-16 15:04:46 +01:00
Alexandre Alapetite
483c698f9a JavaScript-free scrollbar (#2181)
* JavaScript-free scrollbar

Make scrollbar work without JavaScript
https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240804225
Also implies a better support of resize scenarios.
Seems to fix at the same time the occasional glitches
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-447556038

* Firefox 64-66 workaround

Workaround for Gecko bug in Firefox 64-66. Avoid showing the scrollbar
all the time, at the cost of a slight reflow (therefore targetting only
Gecko).

* Improvement of Firefox workaround

* Minor comment

* Unneeded check

* Even better

* Partial Edge fix

* More margin for tree bottom
2018-12-16 12:49:23 +01:00
Patrick Crandol
983aa587ee Add aside_feed to reader view (#2180)
* Add Nav menu to reader mode

At this point, it appears to be non-functional in reader mode.

* Add aside_feed toggle to reader view

* make init_column_categories work in reader view

* Make sidebar links redirect to proper view

* CSS to support toggleable sidebar in reader view

* remove unneeded !important
2018-12-15 10:56:38 +01:00
Patrick Crandol
478d3e6611 Decouple scrolling of feeds and articles (#2117)
* Remove Sticky Kit

Remove sticky-kit, as functionality is unsuitable for separate scrolling.

* Remove sticky-kit load in main.js

Further removing the sticky-kit kruft

* Finish removal of references to Sticky-kit

* CSS Changes to template for Independent Scrolling

* Addition of JS and supporting CSS and html

* More CSS fixes to establish expected behavior

Should be able to scroll navbar without it being in sticky mode now.

* Fix typo in main.js

sortcut.js -> shortcut.js

* Fix unexpected tree scrolling behavior

* Change name of generic JS function

* Improve sticky-aside

* CSS changes in themes to accommodate  independent Scroll

In themes where .aside's width is not the standard 300px, .tree's width must be specified to be equal to .aside

* Remove Sticky-Kit from README files

* Updates to Sticky-Aside

* Update Template to fix screwup

* Make Recalculating height actually work

* Let sidebar fill height if nav buttons aren't visible

* Make accommodating for nav buttons actually work

* update Swage theme for Independent Scroll feature

* Integrate sticky_aside into main.js

* Add Simple Scrollbar

* Patch scrollbar color for themes with dark colored asides

* Increase Visibility of scrollbar on Dark Themes

* Improve async loading, events, and performance

* CSS typo

* Fix double scrollbar on mobile

* Fix regression causing sticky to not be removed

* No $ for non-jQuery variables

* Fix strange condition + option for nice scrollbar

* Initial attempt to use css sticky

* Add stickyfill

* make the correct element sticky

* re-add incorrectly removed sidebar code

* Continue fixing mistaken deletions

* decrease frequency of recalc

* use minified version of simple-scrollbar.

* Load stickyfill instead of injecting

* put recalc back where it belongs

* re-remove script injector

* remove padding

bottom padding was causing the last item in the feed to be hidden under the nav buttons

* Manual merge of css_scrollbar

Add auto-detection of -webkit-scrollbar-thumb, otherwise fall back to
simple-scrollbar.js

* Fix Regression

Sticky recalc is still needed when using css scrollbars

* Replace method of closing dropdowns

Changed from an overlay href to a javascript solution, for better compatibility

* Remove Treepadding

Treepadding was causing dropdown menus at the bottom of the tree to be obscured.

* Undo unnecessary move of dropdown-target

* Move Dropdown Handler to a sensibleish place

* Fix light Scrollbar color not picking up on Firefox

* Minor syntax

* Minor Clarification of CSS/ patch BlueLagoon

* Change logic for native WebKit scrollbar detection

Fix
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444251419
Tested with Firefox 63, Firefox 65, Chrome 71, IE11, Edge 42

* Fixes for other views

E.g. reader view

* Cleaner way of generating hash for dropdowns

* Make dropdown-toggle an actual toggle

* Prepare for CSS Scrollbars Module Level 1

* Fix regression causing my labels dropdown not to appear

* remove unneeded dropdown-close css rule

* Re-apply some lost changes

3c509989e8

* Add standard scrollbar compatibility

E.g. Firefox 64+

* Make All dropdowns click-to-close

* Remove BlueLagoon template

* Try to fix Firefox

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r239539984

* Add CSS rules necessary for consistent function of scrollbar in Firefox

* Use inheritance to determine width

* Use overlay scrollbar where possible

* Test Reduced Listener

* Fix Firefox 62

And show subtle scrollbar even when not hovering

* Add margin at bottom

To allow opening the menus
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444571218

* Minor - tab correction

* Spaces -> tabs

* Remove unneeded inheritance

* Fix indenting

* Revert bad merge

* Messy WIP to make dropdowns work

* Style Cleanup

* Break it down

* Lets try a move-it move-it

* Update p/scripts/main.js

Co-Authored-By: pattems <patrick@crandol.com>

* Update p/themes/BlueLagoon/BlueLagoon.css

Co-Authored-By: pattems <patrick@crandol.com>

*  separate ALL THE THINGS

* erroneous commas

* and to or

* removing double condition that doesn't do what I want

* More breaking down

* fix var

* Fix variable name again

* Remove magic number

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240052598

* Suuuuper inelegant solution for dropdowns

* lets try that again

* Inelegant Fix For Dropdowns

Now with 100% more working dropdowns

* Make sidebar dropdowns work correctly?

* Fix reversion

* Make JS scrollbar always visible

* Remove unneeded CSS

Added early in this pull request, didn't get pulled out when it was obsolete

* Fix CSS removal I missed

* CSS comment update/consistency for dark themes

* Clean Up Duplicate code

* Make dropdowns properly hide

Downside: Can no longer click on header/nav buttons to close

* Strip unneeded if statement

* jshint -W018

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240392851

* Half-reversion to old dropdown

* make overlay href scale to sidebar width

* remove init of nonexistent method

* remove trailing tabs

* move #close href where it belongs in index.phtml

* Revert all changes to index.phtml

* remove whitespace

accidentally added in last commit

* Move var's in init_column categories

* Finish putting old style dropdowns back

* Make CSS changes to use support statements

* Cleanup Whitespace

* re-add missing class

* spaces -> tabs in main.js

* tabs -> spaces css

* Minor whitespace

* Cleanup per @Alkarex

* Second attempt to add bottom margin

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240820901

* Fix error in IE11

* Simple-scrollbar color match for dark themes
2018-12-12 12:04:31 +01:00
Alexandre Alapetite
5c8eb1e864 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
2018-11-26 08:32:04 +01:00
Frans de Jonge
e20c7ef1b0 [fix] Finishing touches for next/previous without focus (#2140)
* [fix] Finishing touches for next/previous without focus

Cf. #1767.

* Avoid single quote

Alternative: use `’`

* Minor whitespace

* Minor whitespace

* be explicit about skipping

* add todos

* overshot by one
2018-11-18 19:31:36 +01:00
Matt DeMoss
f3a88614ef Add shortcuts for focusing next and previous without opening articles. (#1767)
* add skipping option to toggleContent to use later for 'i' and 'o' hotkeys

* in English config j,k are now 'open' and not 'skip', i,o are called 'focus .. without opening'
2018-11-18 14:08:27 +01:00
Patrick Crandol
38e3f792a4 reallow items kept unread to be interactive (#2085)
Remove .keep_unread from classes that do nothing.
2018-10-30 14:15:50 -04:00
Alexandre Alapetite
cae30f010a Fix manual refresh commit (#2081)
Commit was performed too early, potentially before the last feeds were
done refreshing
2018-10-26 22:18:11 +02:00
Alexandre Alapetite
fe1f6223f9 init confirm also for configuration pages (#2048)
There are some actions that require confirmation also in the
configuration pages, such as delete user.
2018-10-14 13:59:26 +02:00
Alexandre Alapetite
1cc891be35 Remove some preload / prefetch (#2040)
* Remove next prefetch

This approach was only efficient in the specific case when no change was
made (no mark-as-read, favourites, tags), and useless in the other
situations.
Removed to reduce server load.

* Remove next prefetch from JavaScript too

* Remove some preload / prefetch

While useful for the first request, those preload / prefetch hints are
slightly negative for the following requets, especially server-side,
e.g. generating one log entry in Apache, and a bit more network traffic.

* Revert mistake

* Remove comment

https://github.com/FreshRSS/FreshRSS/pull/2040#discussion_r223214915
2018-10-14 00:35:43 +02:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Alexandre Alapetite
b323ed0846 Improve authors (#2025)
* Links for authors and multiple authors

Favour ';' as a separator instead of ',' to better cope with
multi-author scientific articles.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 ,
https://github.com/FreshRSS/FreshRSS/issues/1968,
https://github.com/FreshRSS/FreshRSS/pull/2023

* Change i18n authors

* Update layout

* Unicode-compatible search

Example for `author:Loïc`

* author <em> styling

* Final details

* Minor spacing
2018-09-16 10:46:27 +02:00
Alexandre Alapetite
60cc39db25 Merge pull request #2021 from Alkarex/jQuery3.3.1
jQuery 3.1.1 -> 3.3.1
2018-09-14 07:35:35 +02:00
Alexandre Alapetite
a6cbac9b91 bcrypt.js 2.4.4
https://github.com/dcodeIO/bcrypt.js
2018-09-12 21:51:36 +02:00
Alexandre Alapetite
d8c88b28c9 jQuery 3.1.1 -> 3.3.1
https://github.com/jquery/jquery/compare/3.1.1...3.3.1
2018-09-12 21:24:16 +02:00
Alexis Degrugillier
951eb708e6 Fix shortcuts for view switching
I've introduced shortcuts to switch between view in #1755. They have been broken by #1714.
Then I've made an ugly fix in #1758.

This change revert all changes to have something better.

See #1757
2018-01-26 08:17:32 +01:00
Alexis Degrugillier
db959a1a44 Fix shortcuts triggering view switching 2018-01-02 19:49:38 +01:00
Alexis Degrugillier
e73fae1591 Add shortcuts to switch views (#1755) 2018-01-01 18:53:53 +01:00