From 5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 8 Mar 2016 17:02:34 +0100 Subject: manage assets through npm first draft remote assetic totally work nearly there use at least nodejs > 0.12 use proper version of grunt bump nodejs version for travis update npm workaround for materialize install node 5.0 add grunt-cli baggy theme & cache node modules cache bower & npm make travis build assets on php7 only exclude installing node & npm if not needed & use bash clean & try to make icomoon work on baggy ready config for travis rebase make travis work more travis work impove travis & update deps add missing pixrem deps add module through oddly lost ui updates install latest nodejs add install_dev.sh, link local binaries for npm/bower/grunt ui improvements (mostly baggy) fix travis build no need to install on travis Add unread filter to entries pages Add the ability to filter for unread pages in the filters menu. Add unread filter test to EntryControllerTest Add a new test to the EntryControllerTest collection which checks that only entries which have not been archived (and are treated as "unread") are retrieved. Improve English translation Update FAQ -Fix grammar -Add notes about MTA, firewall, and SELinux Update installation instructions -Fix grammar -Add SELinux section add screenshots of android docu in English Fix the deletion of Tags/Entries relation when delete an entry Fix #2121 Move fixtures to the right place Display a message when saving an entry failed When saving an entry fail because of database error we previously just returned `false`. Now we got an error in the log and the displayed notice to the user is updated too. Change ManyToMany between entry & tag Following https://gist.github.com/Ocramius/3121916 Be sure to remove the related entity when removing an entity. Let say you have Entry -> EntryTag -> Tag. If you remove the entry: - before that commit, the EntryTag will stay (at least using SQLite). - with that commit, the related entity is removed Prepare wallabag 2.0.5 enforce older materialize version --- .bowerrc | 4 + .gitignore | 8 + .travis.yml | 22 +- CHANGELOG.md | 20 + Gruntfile.js | 219 + README.md | 2 +- app/AppKernel.php | 1 - .../_global/img/appicon/apple-touch-icon-114.png | Bin 0 -> 2281 bytes .../_global/img/appicon/apple-touch-icon-120.png | Bin 0 -> 2318 bytes .../_global/img/appicon/apple-touch-icon-144.png | Bin 0 -> 2718 bytes .../_global/img/appicon/apple-touch-icon-152.png | Bin 0 -> 2835 bytes .../_global/img/appicon/apple-touch-icon-57.png | Bin 0 -> 1582 bytes .../_global/img/appicon/apple-touch-icon-72.png | Bin 0 -> 1709 bytes .../_global/img/appicon/apple-touch-icon-76.png | Bin 0 -> 1838 bytes .../_global/img/appicon/apple-touch-icon.png | Bin 0 -> 1579 bytes .../static/themes/_global/img/appicon/favicon.ico | Bin 0 -> 34494 bytes .../static/themes/_global/img/bg-select.png | Bin 0 -> 1095 bytes .../_global/img/icons/carrot-icon--black.png | Bin 0 -> 1538 bytes .../_global/img/icons/carrot-icon--white.png | Bin 0 -> 1605 bytes .../_global/img/icons/diaspora-icon--black.png | Bin 0 -> 1555 bytes .../_global/img/icons/diaspora-icon--white.png | Bin 0 -> 612 bytes .../themes/_global/img/logo-other_themes.png | Bin 0 -> 3058 bytes .../static/themes/_global/img/logo-square.png | Bin 0 -> 3314 bytes app/Resources/static/themes/_global/img/logo-w.png | Bin 0 -> 4916 bytes .../static/themes/_global/img/logo-wallabag.svg | 300 + .../static/themes/_global/js/bookmarklet.js | 2 + .../static/themes/_global/js/restoreScroll.js | 25 + app/Resources/static/themes/baggy/css/font.css | 6 + app/Resources/static/themes/baggy/css/main.css | 1233 +++ app/Resources/static/themes/baggy/css/messages.css | 19 + app/Resources/static/themes/baggy/css/print.css | 64 + .../static/themes/baggy/css/ratatouille.css | 225 + app/Resources/static/themes/baggy/font/icomoon.eot | Bin 0 -> 97236 bytes app/Resources/static/themes/baggy/font/icomoon.svg | 501 ++ app/Resources/static/themes/baggy/font/icomoon.ttf | Bin 0 -> 97072 bytes .../static/themes/baggy/font/icomoon.woff | Bin 0 -> 97148 bytes app/Resources/static/themes/baggy/img/blank.png | Bin 0 -> 141 bytes app/Resources/static/themes/baggy/img/down.png | Bin 0 -> 216 bytes app/Resources/static/themes/baggy/img/list.png | Bin 0 -> 201 bytes app/Resources/static/themes/baggy/img/table.png | Bin 0 -> 229 bytes app/Resources/static/themes/baggy/img/top.png | Bin 0 -> 212 bytes app/Resources/static/themes/baggy/js/autoClose.js | 6 + .../static/themes/baggy/js/autoCompleteTags.js | 47 + .../static/themes/baggy/js/closeMessage.js | 17 + app/Resources/static/themes/baggy/js/init.js | 101 + app/Resources/static/themes/baggy/js/popupForm.js | 100 + app/Resources/static/themes/baggy/js/saveLink.js | 78 + app/Resources/static/themes/material/css/main.css | 611 ++ app/Resources/static/themes/material/css/print.css | 64 + app/Resources/static/themes/material/js/init.js | 116 + app/config/config.yml | 15 +- app/config/config_dev.yml | 3 - bower.json | 38 + composer.json | 6 +- docs/en/user/android.rst | 20 +- docs/en/user/faq.rst | 29 +- docs/en/user/installation.rst | 70 +- docs/fr/user/installation.rst | 2 +- .../android_configuration_connection_test.en.png | Bin 0 -> 80965 bytes ...id_configuration_connection_test_success.en.png | Bin 0 -> 82290 bytes ...feed_credentials_automatically_filled_in.en.png | Bin 0 -> 106816 bytes .../user/android_configuration_filled_in.en.png | Bin 0 -> 98558 bytes ...droid_configuration_get_feed_credentials.en.png | Bin 0 -> 81325 bytes .../android_configuration_saved_feed_update.en.png | Bin 0 -> 53196 bytes docs/img/user/android_configuration_screen.en.png | Bin 0 -> 93709 bytes .../android_configuration_scroll_bottom.en.png | Bin 0 -> 98160 bytes docs/img/user/android_unread_feed_synced.en.png | Bin 0 -> 89415 bytes docs/img/user/android_welcome_screen.en.png | Bin 0 -> 51580 bytes install.sh | 29 + install_dev.sh | 16 + package.json | 84 + src/Wallabag/CoreBundle/Command/InstallCommand.php | 23 +- .../CoreBundle/Controller/EntryController.php | 17 +- .../CoreBundle/DataFixtures/ORM/LoadConfigData.php | 7 - .../DataFixtures/ORM/LoadTaggingRuleData.php | 8 + src/Wallabag/CoreBundle/Entity/Entry.php | 19 +- src/Wallabag/CoreBundle/Entity/Tag.php | 23 +- .../CoreBundle/Form/Type/EntryFilterType.php | 12 + .../_global/img/appicon/apple-touch-icon-114.png | Bin 2281 -> 0 bytes .../_global/img/appicon/apple-touch-icon-120.png | Bin 2318 -> 0 bytes .../_global/img/appicon/apple-touch-icon-144.png | Bin 2718 -> 0 bytes .../_global/img/appicon/apple-touch-icon-152.png | Bin 2835 -> 0 bytes .../_global/img/appicon/apple-touch-icon-57.png | Bin 1582 -> 0 bytes .../_global/img/appicon/apple-touch-icon-72.png | Bin 1709 -> 0 bytes .../_global/img/appicon/apple-touch-icon-76.png | Bin 1838 -> 0 bytes .../_global/img/appicon/apple-touch-icon.png | Bin 1579 -> 0 bytes .../public/themes/_global/img/appicon/favicon.ico | Bin 34494 -> 0 bytes .../_global/img/icons/carrot-icon--black.png | Bin 1538 -> 0 bytes .../_global/img/icons/carrot-icon--white.png | Bin 1605 -> 0 bytes .../_global/img/icons/diaspora-icon--black.png | Bin 1555 -> 0 bytes .../_global/img/icons/diaspora-icon--white.png | Bin 612 -> 0 bytes .../public/themes/_global/js/annotator.min.js | 23 - .../public/themes/_global/js/bookmarklet.js | 2 - .../public/themes/_global/js/jquery-2.0.3.min.js | 1 - .../public/themes/_global/js/jquery.cookie.js | 117 - .../public/themes/_global/js/restoreScroll.js | 25 - .../Resources/public/themes/baggy/css/font.css | 6 - .../Resources/public/themes/baggy/css/main.css | 1120 --- .../Resources/public/themes/baggy/css/messages.css | 19 - .../Resources/public/themes/baggy/css/print.css | 62 - .../public/themes/baggy/css/ratatouille.css | 211 - .../public/themes/baggy/fonts/icomoon.eot | Bin 6672 -> 0 bytes .../public/themes/baggy/fonts/icomoon.svg | 43 - .../public/themes/baggy/fonts/icomoon.ttf | Bin 6508 -> 0 bytes .../public/themes/baggy/fonts/icomoon.woff | Bin 6584 -> 0 bytes .../public/themes/baggy/fonts/ptsans.woff | Bin 24816 -> 0 bytes .../public/themes/baggy/img/baggy/blank.png | Bin 141 -> 0 bytes .../public/themes/baggy/img/baggy/down.png | Bin 216 -> 0 bytes .../public/themes/baggy/img/baggy/list.png | Bin 201 -> 0 bytes .../public/themes/baggy/img/baggy/table.png | Bin 229 -> 0 bytes .../public/themes/baggy/img/baggy/top.png | Bin 212 -> 0 bytes .../public/themes/baggy/img/bg-select.png | Bin 1095 -> 0 bytes .../public/themes/baggy/img/logo-other_themes.png | Bin 3922 -> 0 bytes .../Resources/public/themes/baggy/img/logo-w.png | Bin 4916 -> 0 bytes .../public/themes/baggy/img/logo-wallabag.svg | 300 - .../Resources/public/themes/baggy/img/logo.png | Bin 1350 -> 0 bytes .../Resources/public/themes/baggy/img/logo.svg | 8 - .../Resources/public/themes/baggy/js/autoClose.js | 6 - .../public/themes/baggy/js/autoCompleteTags.js | 47 - .../public/themes/baggy/js/closeMessage.js | 17 - .../Resources/public/themes/baggy/js/init.js | 63 - .../Resources/public/themes/baggy/js/popupForm.js | 83 - .../public/themes/baggy/js/restoreScroll.js | 25 - .../Resources/public/themes/baggy/js/saveLink.js | 96 - .../Resources/public/themes/material/css/main.css | 538 -- .../public/themes/material/css/materialize.css | 8198 -------------------- .../public/themes/material/css/materialize.min.css | 16 - .../Resources/public/themes/material/css/print.css | 62 - .../themes/material/font/icomoon/icomoon.eot | Bin 3188 -> 0 bytes .../themes/material/font/icomoon/icomoon.svg | 17 - .../themes/material/font/icomoon/icomoon.ttf | Bin 3024 -> 0 bytes .../themes/material/font/icomoon/icomoon.woff | Bin 3100 -> 0 bytes .../font/material-design-icons/LICENSE.txt | 428 - .../Material-Design-Icons.eot | Bin 102112 -> 0 bytes .../Material-Design-Icons.svg | 769 -- .../Material-Design-Icons.ttf | Bin 101892 -> 0 bytes .../Material-Design-Icons.woff | Bin 101968 -> 0 bytes .../Material-Design-Icons.woff2 | Bin 33220 -> 0 bytes .../themes/material/font/roboto/Roboto-Bold.ttf | Bin 127744 -> 0 bytes .../themes/material/font/roboto/Roboto-Bold.woff | Bin 62876 -> 0 bytes .../themes/material/font/roboto/Roboto-Bold.woff2 | Bin 49976 -> 0 bytes .../themes/material/font/roboto/Roboto-Light.ttf | Bin 126792 -> 0 bytes .../themes/material/font/roboto/Roboto-Light.woff | Bin 62316 -> 0 bytes .../themes/material/font/roboto/Roboto-Light.woff2 | Bin 49380 -> 0 bytes .../themes/material/font/roboto/Roboto-Medium.ttf | Bin 127488 -> 0 bytes .../themes/material/font/roboto/Roboto-Medium.woff | Bin 62980 -> 0 bytes .../material/font/roboto/Roboto-Medium.woff2 | Bin 50224 -> 0 bytes .../themes/material/font/roboto/Roboto-Regular.ttf | Bin 126072 -> 0 bytes .../material/font/roboto/Roboto-Regular.woff | Bin 61736 -> 0 bytes .../material/font/roboto/Roboto-Regular.woff2 | Bin 49236 -> 0 bytes .../themes/material/font/roboto/Roboto-Thin.ttf | Bin 127584 -> 0 bytes .../themes/material/font/roboto/Roboto-Thin.woff | Bin 61628 -> 0 bytes .../themes/material/font/roboto/Roboto-Thin.woff2 | Bin 48524 -> 0 bytes .../public/themes/material/img/bg-select.png | Bin 1095 -> 0 bytes .../themes/material/img/logo-other_themes.png | Bin 3058 -> 0 bytes .../public/themes/material/img/logo-square.png | Bin 3314 -> 0 bytes .../public/themes/material/img/logo-w.png | Bin 4916 -> 0 bytes .../public/themes/material/img/logo-wallabag.svg | 300 - .../Resources/public/themes/material/js/init.js | 79 - .../public/themes/material/js/jquery-2.1.4.min.js | 4 - .../public/themes/material/js/materialize.js | 6219 --------------- .../public/themes/material/js/materialize.min.js | 9 - .../public/themes/material/js/restoreScroll.js | 25 - .../Resources/translations/messages.da.yml | 2 + .../Resources/translations/messages.de.yml | 2 + .../Resources/translations/messages.en.yml | 24 +- .../Resources/translations/messages.es.yml | 2 + .../Resources/translations/messages.fa.yml | 46 +- .../Resources/translations/messages.fr.yml | 2 + .../Resources/translations/messages.it.yml | 1 + .../Resources/translations/messages.oc.yml | 2 + .../Resources/translations/messages.pl.yml | 2 + .../Resources/translations/messages.ro.yml | 2 + .../Resources/translations/messages.tr.yml | 2 + .../CoreBundle/Resources/views/base.html.twig | 4 - .../views/themes/baggy/Config/index.html.twig | 84 + .../views/themes/baggy/Entry/entries.html.twig | 27 +- .../views/themes/baggy/Entry/entry.html.twig | 99 +- .../views/themes/baggy/Entry/pager.html.twig | 3 +- .../views/themes/baggy/Static/about.html.twig | 1 - .../Resources/views/themes/baggy/layout.html.twig | 16 +- .../views/themes/material/Config/index.html.twig | 2 +- .../views/themes/material/Entry/entries.html.twig | 17 +- .../views/themes/material/Entry/entry.html.twig | 74 +- .../views/themes/material/layout.html.twig | 33 +- .../Tests/Command/InstallCommandTest.php | 6 - .../Tests/Controller/EntryControllerTest.php | 52 +- .../Resources/views/Authentication/form.html.twig | 4 +- .../views/Registration/confirmed.html.twig | 2 +- .../views/Registration/register_content.html.twig | 4 +- .../views/Resetting/request_content.html.twig | 2 +- .../views/Resetting/reset_content.html.twig | 2 +- .../Resources/views/Security/login.html.twig | 4 +- .../UserBundle/Resources/views/layout.html.twig | 2 +- 194 files changed, 4419 insertions(+), 19256 deletions(-) create mode 100644 .bowerrc create mode 100644 Gruntfile.js create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png create mode 100755 app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png create mode 100755 app/Resources/static/themes/_global/img/appicon/favicon.ico create mode 100644 app/Resources/static/themes/_global/img/bg-select.png create mode 100644 app/Resources/static/themes/_global/img/icons/carrot-icon--black.png create mode 100644 app/Resources/static/themes/_global/img/icons/carrot-icon--white.png create mode 100644 app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png create mode 100644 app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png create mode 100755 app/Resources/static/themes/_global/img/logo-other_themes.png create mode 100644 app/Resources/static/themes/_global/img/logo-square.png create mode 100755 app/Resources/static/themes/_global/img/logo-w.png create mode 100644 app/Resources/static/themes/_global/img/logo-wallabag.svg create mode 100644 app/Resources/static/themes/_global/js/bookmarklet.js create mode 100644 app/Resources/static/themes/_global/js/restoreScroll.js create mode 100755 app/Resources/static/themes/baggy/css/font.css create mode 100755 app/Resources/static/themes/baggy/css/main.css create mode 100755 app/Resources/static/themes/baggy/css/messages.css create mode 100755 app/Resources/static/themes/baggy/css/print.css create mode 100644 app/Resources/static/themes/baggy/css/ratatouille.css create mode 100644 app/Resources/static/themes/baggy/font/icomoon.eot create mode 100644 app/Resources/static/themes/baggy/font/icomoon.svg create mode 100644 app/Resources/static/themes/baggy/font/icomoon.ttf create mode 100644 app/Resources/static/themes/baggy/font/icomoon.woff create mode 100755 app/Resources/static/themes/baggy/img/blank.png create mode 100644 app/Resources/static/themes/baggy/img/down.png create mode 100755 app/Resources/static/themes/baggy/img/list.png create mode 100755 app/Resources/static/themes/baggy/img/table.png create mode 100644 app/Resources/static/themes/baggy/img/top.png create mode 100644 app/Resources/static/themes/baggy/js/autoClose.js create mode 100755 app/Resources/static/themes/baggy/js/autoCompleteTags.js create mode 100644 app/Resources/static/themes/baggy/js/closeMessage.js create mode 100755 app/Resources/static/themes/baggy/js/init.js create mode 100644 app/Resources/static/themes/baggy/js/popupForm.js create mode 100755 app/Resources/static/themes/baggy/js/saveLink.js create mode 100755 app/Resources/static/themes/material/css/main.css create mode 100755 app/Resources/static/themes/material/css/print.css create mode 100755 app/Resources/static/themes/material/js/init.js create mode 100644 bower.json create mode 100644 docs/img/user/android_configuration_connection_test.en.png create mode 100644 docs/img/user/android_configuration_connection_test_success.en.png create mode 100644 docs/img/user/android_configuration_feed_credentials_automatically_filled_in.en.png create mode 100644 docs/img/user/android_configuration_filled_in.en.png create mode 100644 docs/img/user/android_configuration_get_feed_credentials.en.png create mode 100644 docs/img/user/android_configuration_saved_feed_update.en.png create mode 100644 docs/img/user/android_configuration_screen.en.png create mode 100644 docs/img/user/android_configuration_scroll_bottom.en.png create mode 100644 docs/img/user/android_unread_feed_synced.en.png create mode 100644 docs/img/user/android_welcome_screen.en.png create mode 100755 install.sh create mode 100755 install_dev.sh create mode 100644 package.json delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-114.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-120.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-144.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-57.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-72.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-76.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/favicon.ico delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--black.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--white.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--black.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--white.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/js/annotator.min.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/js/bookmarklet.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/js/jquery-2.0.3.min.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/_global/js/jquery.cookie.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/_global/js/restoreScroll.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/font.css delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/main.css delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/messages.css delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/print.css delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/fonts/icomoon.eot delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/fonts/icomoon.svg delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/fonts/icomoon.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/fonts/icomoon.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/fonts/ptsans.woff delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/blank.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/down.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/list.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/table.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/top.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/bg-select.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-other_themes.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-w.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-wallabag.svg delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo.svg delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/autoClose.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/autoCompleteTags.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/closeMessage.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/init.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/popupForm.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/restoreScroll.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/saveLink.js delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/css/materialize.css delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/css/materialize.min.css delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/material/css/print.css delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/icomoon/icomoon.eot delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/icomoon/icomoon.svg delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/icomoon/icomoon.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/icomoon/icomoon.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/LICENSE.txt delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/Material-Design-Icons.eot delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/Material-Design-Icons.svg delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/Material-Design-Icons.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/Material-Design-Icons.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/material-design-icons/Material-Design-Icons.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Bold.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Bold.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Bold.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Light.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Light.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Light.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Medium.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Medium.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Medium.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Regular.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Regular.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Regular.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Thin.ttf delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Thin.woff delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/font/roboto/Roboto-Thin.woff2 delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/img/bg-select.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-other_themes.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-square.png delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-w.png delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-wallabag.svg delete mode 100755 src/Wallabag/CoreBundle/Resources/public/themes/material/js/init.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery-2.1.4.min.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/js/materialize.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/js/materialize.min.js delete mode 100644 src/Wallabag/CoreBundle/Resources/public/themes/material/js/restoreScroll.js diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 00000000..e0163687 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory" : "app/Resources/static/lib", + "json" : "bower.json" +} diff --git a/.gitignore b/.gitignore index 02e921f8..5eca0e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,11 @@ docker/data/ # To avoid crazy stuff on some PR, we must manually FORCE ADD IT on each new release composer.lock + +# assets stuff +/node_modules/ +!app/Resources/static/lib +app/Resources/static/lib/* +/bin +!/src/Wallabag/CoreBundle/Resources/public +/src/Wallabag/CoreBundle/Resources/public/* diff --git a/.travis.yml b/.travis.yml index d397c872..0e72d207 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,9 @@ cache: directories: - vendor - $HOME/.composer/cache + - node_modules + - $HOME/.cache/bower + - $HOME/.npm php: - 5.5 @@ -22,16 +25,21 @@ php: - 7.0 - hhvm +node_js: + - "5" + env: - - DB=mysql - - DB=pgsql - - DB=sqlite + - DB=mysql ASSETS=nobuild + - DB=pgsql ASSETS=nobuild + - DB=sqlite ASSETS=nobuild matrix: fast_finish: true include: - php: 7.0 - env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite + env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild + - php: 7.0 + env: DB=sqlite ASSETS=build exclude: - php: hhvm env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency @@ -49,11 +57,15 @@ before_script: - composer self-update --no-progress - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; +install: + - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi; + - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi; + before_install: - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; script: - - travis_wait composer install --no-interaction --no-progress --prefer-dist -o + - travis_wait bash install.sh - ant prepare-$DB - bin/phpunit -v - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc9dfbb..97245c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.5] - 2016-05-31 + +### Added + +- [#2052](https://github.com/wallabag/wallabag/pull/2052) Add unread filter to entries pages (Dan Bartram) + +### Changed + +- [#2093](https://github.com/wallabag/wallabag/pull/2093) Replace vertical dots in material theme with horizontal dots (Nicolas Lœuillet) +- [#2054](https://github.com/wallabag/wallabag/pull/2054) Update italian translation (Daniele Conca) +- [#2068](https://github.com/wallabag/wallabag/pull/2068), [#2049](https://github.com/wallabag/wallabag/pull/2049) Update documentation (Josh Panter, Mario Vormstein) + +### Fixed + +- [#2122](https://github.com/wallabag/wallabag/pull/2122) Fix the deletion of Tags/Entries relation when delete an entry (Jeremy Benoist, Nicolas Lœuillet) +- [#2095](https://github.com/wallabag/wallabag/pull/2095) Fix form user display when 2FA is disabled (Nicolas Lœuillet) +- [#2092](https://github.com/wallabag/wallabag/pull/2092) API: Starred and archived clears if article is already exists (Rurik19) +- [#2097](https://github.com/wallabag/wallabag/issues/2097) Fix image path in 2-factor authentification email (Baptiste Mille-Mathias) +- [#2069](https://github.com/wallabag/wallabag/pull/2069) Do not specify language in Firefox addon link (Merouane Atig) + ## [2.0.4] - 2016-05-07 ### Added diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..c63c392b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,219 @@ +module.exports = function (grunt) { + require('load-grunt-tasks')(grunt); + + grunt.initConfig({ + appDir: 'app/Resources/static', + buildDir: 'web/bundles/wallabagcore', + + postcss: { + material: { + options: { + map: { + inline: false + }, + + processors: [ + require('pixrem')(), + require('autoprefixer')({browsers: 'last 2 versions'}), + require('cssnano')() + ] + }, + src: '<%= buildDir %>/material.css', + dest: '<%= buildDir %>/themes/material/css/style.min.css' + }, + baggy: { + options: { + map: { + inline: false + }, + + processors: [ + require('pixrem')(), + require('autoprefixer')({browsers: 'last 2 versions'}), + require('cssnano')() + ] + }, + src: '<%= buildDir %>/baggy.css', + dest: '<%= buildDir %>/themes/baggy/css/style.min.css' + } + }, + concat: { + options: { + separator: ';' + }, + jsMaterial: { + src: [ + 'node_modules/jquery/dist/jquery.js', + 'node_modules/jquery-ui/jquery-ui.js', + 'node_modules/materialize-css/bin/materialize.js', + '<%= appDir %>/themes/_global/js/restoreScroll.js', + '<%= appDir %>/themes/material/js/init.js' + ], + dest: '<%= buildDir %>/material.js' + }, + jsBaggy: { + src: [ + 'node_modules/jquery/dist/jquery.js', + 'node_modules/jquery-ui/jquery-ui.js', + '<%= appDir %>/themes/baggy/js/init.js', + '<%= appDir %>/themes/_global/js/restoreScroll.js', + '<%= appDir %>/themes/baggy/js/autoClose.js', + '<%= appDir %>/themes/baggy/js/autoCompleteTags.js', + '<%= appDir %>/themes/baggy/js/closeMessage.js', + '<%= appDir %>/themes/baggy/js/popupForm.js', + '<%= appDir %>/themes/baggy/js/saveLink.js' + ], + dest: '<%= buildDir %>/baggy.js' + }, + cssMaterial: { + src: [ + 'node_modules/materialize-css/bin/materialize.css', + '<%= appDir %>/themes/material/css/*.css' + ], + dest: '<%= buildDir %>/material.css' + }, + cssBaggy: { + src: [ + '<%= appDir %>/themes/baggy/css/*.css' + ], + dest: '<%= buildDir %>/baggy.css' + } + }, + browserify: { + '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'], + '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'] + }, + uglify: { + material: { + files: { + '<%= buildDir %>/themes/material/js/material.min.js': + ['<%= buildDir %>/material.browser.js'] + }, + options: { + sourceMap: true, + }, + }, + baggy: { + files: { + '<%= buildDir %>/themes/baggy/js/baggy.min.js': + ['<%= buildDir %>/baggy.browser.js'] + }, + options: { + sourceMap: true, + }, + }, + }, + copy: { + pickerjs: { + expand: true, + cwd: 'node_modules/pickadate/lib', + src: 'picker.js', + dest: '<%= buildDir %>' + }, + annotator: { + expand: true, + cwd: 'node_modules/annotator/pkg', + src: 'annotator.min.js', + dest: '<%= buildDir %>/themes/_global/js/' + } + }, + symlink: { + baggyfonts: { + files: [ + { + expand: true, + overwrite: true, + cwd: "<%= appDir %>/lib/icomoon-bower/", + src: "fonts", + dest: "<%= buildDir %>/themes/baggy/" + }, + { + expand: true, + overwrite: true, + cwd: "<%= appDir %>/lib/bower-pt-sans/fonts", + src: "*", + dest: "<%= buildDir %>/themes/baggy/fonts/" + } + ] + }, + materialfonts: { + files: [ + { + expand: true, + overwrite: true, + cwd: "<%= appDir %>/lib/icomoon-bower/", + src: "fonts", + dest: "<%= buildDir %>/themes/material/" + }, + { + expand: true, + overwrite: true, + cwd: "node_modules/materialize-css/", + src: "font", + dest: "<%= buildDir %>/themes/material" + }, + { + expand: true, + overwrite: true, + cwd: "<%= appDir %>/lib/roboto-fontface/fonts/", + src: "*", + dest: "<%= buildDir %>/themes/material/fonts/roboto/" + }, + { + expand: true, + overwrite: true, + cwd: "<%= appDir %>/lib/material-design-icons/iconfont/", + src: "*", + dest: "<%= buildDir %>/themes/material/fonts/" + } + ] + }, + pics: { + files: [ + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/themes/_global/', + src: 'img', + dest: '<%= buildDir %>/themes/_global/' + } + ] + } + }, + clean: { + css: { + src: [ '<%= buildDir %>/**/*.css' ] + }, + js: { + src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'] + }, + all: { + src: ['./<%= buildDir %>'] + } + } + }); + + grunt.registerTask( + 'fonts', + 'Install fonts', + ['symlink:baggyfonts', 'symlink:materialfonts'] + ); + + grunt.registerTask( + 'js', + 'Build and install js files', + ['clean:js', 'copy:pickerjs', 'concat:jsMaterial', 'concat:jsBaggy', 'browserify', 'uglify'] + ); + + grunt.registerTask( + 'default', + 'Build and install everything', + ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'symlink'] + ); + + grunt.registerTask( + 'css', + 'Compiles the stylesheets.', + ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss'] + ); +} diff --git a/README.md b/README.md index cbe4c831..2a7b54bf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Then you can install wallabag by executing the following commands: ``` git clone https://github.com/wallabag/wallabag.git cd wallabag - git checkout 2.0.4 + git checkout 2.0.5 SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist php bin/console wallabag:install --env=prod php bin/console server:run --env=prod diff --git a/app/AppKernel.php b/app/AppKernel.php index 04f86eb7..96e45da8 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -13,7 +13,6 @@ class AppKernel extends Kernel new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), - new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new FOS\RestBundle\FOSRestBundle(), diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png new file mode 100755 index 00000000..0e96edd5 Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png new file mode 100755 index 00000000..dc5aab1c Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png new file mode 100755 index 00000000..1d005db6 Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png new file mode 100755 index 00000000..f915231f Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png new file mode 100755 index 00000000..5aa19ed9 Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png new file mode 100755 index 00000000..b8b48e1b Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png new file mode 100755 index 00000000..9f9dba27 Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png new file mode 100755 index 00000000..9cf29e2b Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png differ diff --git a/app/Resources/static/themes/_global/img/appicon/favicon.ico b/app/Resources/static/themes/_global/img/appicon/favicon.ico new file mode 100755 index 00000000..0346558b Binary files /dev/null and b/app/Resources/static/themes/_global/img/appicon/favicon.ico differ diff --git a/app/Resources/static/themes/_global/img/bg-select.png b/app/Resources/static/themes/_global/img/bg-select.png new file mode 100644 index 00000000..95120441 Binary files /dev/null and b/app/Resources/static/themes/_global/img/bg-select.png differ diff --git a/app/Resources/static/themes/_global/img/icons/carrot-icon--black.png b/app/Resources/static/themes/_global/img/icons/carrot-icon--black.png new file mode 100644 index 00000000..6da7925b Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/carrot-icon--black.png differ diff --git a/app/Resources/static/themes/_global/img/icons/carrot-icon--white.png b/app/Resources/static/themes/_global/img/icons/carrot-icon--white.png new file mode 100644 index 00000000..a70044b6 Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/carrot-icon--white.png differ diff --git a/app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png b/app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png new file mode 100644 index 00000000..32bca194 Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png differ diff --git a/app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png b/app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png new file mode 100644 index 00000000..fc48d47c Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png differ diff --git a/app/Resources/static/themes/_global/img/logo-other_themes.png b/app/Resources/static/themes/_global/img/logo-other_themes.png new file mode 100755 index 00000000..c90aa46f Binary files /dev/null and b/app/Resources/static/themes/_global/img/logo-other_themes.png differ diff --git a/app/Resources/static/themes/_global/img/logo-square.png b/app/Resources/static/themes/_global/img/logo-square.png new file mode 100644 index 00000000..d5e05977 Binary files /dev/null and b/app/Resources/static/themes/_global/img/logo-square.png differ diff --git a/app/Resources/static/themes/_global/img/logo-w.png b/app/Resources/static/themes/_global/img/logo-w.png new file mode 100755 index 00000000..65dc607b Binary files /dev/null and b/app/Resources/static/themes/_global/img/logo-w.png differ diff --git a/app/Resources/static/themes/_global/img/logo-wallabag.svg b/app/Resources/static/themes/_global/img/logo-wallabag.svg new file mode 100644 index 00000000..40193e1c --- /dev/null +++ b/app/Resources/static/themes/_global/img/logo-wallabag.svg @@ -0,0 +1,300 @@ + + + +]> + + + + + + diff --git a/app/Resources/static/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js new file mode 100644 index 00000000..2afdfc3c --- /dev/null +++ b/app/Resources/static/themes/_global/js/bookmarklet.js @@ -0,0 +1,2 @@ + +top["bookmarklet-url@wallabag.org"]=""+""+""+""+"bag it!"+''+""+""+" - - - {% endblock %} wallabag - {% block title %}{% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index c51f90d2..f1ed63c0 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -204,6 +204,90 @@ {{ form_rest(form.new_tagging_rule) }} +
+
+

{{ 'config.form_rules.faq.title'|trans }}

+ +
{{ 'config.form_rules.faq.tagging_rules_definition_title'|trans }}
+

{{ 'config.form_rules.faq.tagging_rules_definition_description'|trans|raw }}

+ +
{{ 'config.form_rules.faq.how_to_use_them_title'|trans }}
+

{{ 'config.form_rules.faq.how_to_use_them_description'|trans|raw }}

+ +
{{ 'config.form_rules.faq.variables_available_title'|trans }}
+

+ {{ 'config.form_rules.faq.variables_available_description'|trans }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'config.form_rules.faq.variable_description.label'|trans }}{{ 'config.form_rules.faq.meaning'|trans }}{{ 'config.form_rules.faq.operator_description.label'|trans }}{{ 'config.form_rules.faq.meaning'|trans }}
title{{ 'config.form_rules.faq.variable_description.title'|trans }}<={{ 'config.form_rules.faq.operator_description.less_than'|trans }}
url{{ 'config.form_rules.faq.variable_description.url'|trans }}<{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}
isArchived{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}=>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}
isStarred{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}
content{{ 'config.form_rules.faq.variable_description.content'|trans }}={{ 'config.form_rules.faq.operator_description.equal_to'|trans }}
language{{ 'config.form_rules.faq.variable_description.language'|trans }}!={{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}
mimetype{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}OR{{ 'config.form_rules.faq.operator_description.or'|trans }}
readingTime{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}AND{{ 'config.form_rules.faq.operator_description.and'|trans }}
domainName{{ 'config.form_rules.faq.variable_description.domainName'|trans }}matches{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}
+

+
+
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index a2caaebf..8636e3be 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -34,7 +34,27 @@
{% endfor %} -
+
+ {{ form_widget(form.isUnread) }} + {{ form_label(form.isUnread) }} +
+
{{ form_widget(form.previewPicture) }} {{ form_label(form.previewPicture) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 5a800332..8c06cf11 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -5,7 +5,7 @@ {% block content %}
-

{{ entry.title|raw }}

+

{{ entry.title|raw }}

@@ -30,10 +30,10 @@
{% set nbAnnotations = entry.annotations | length %} - {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} + comment {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
{% endblock fos_user_content %} diff --git a/src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig b/src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig index 7d2b45d4..d0a85fc7 100644 --- a/src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig @@ -36,10 +36,10 @@
- {{ 'security.login.submit'|trans }} + {{ 'security.login.submit'|trans }}
diff --git a/src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig b/src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig index 7a5ac838..010ee0d0 100644 --- a/src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig @@ -21,7 +21,7 @@
- {{ 'security.login.submit'|trans({}, "messages") }} + {{ 'security.login.submit'|trans({}, "messages") }}
diff --git a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig index 982a33b2..8474b497 100644 --- a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig @@ -33,10 +33,10 @@
- {{ 'security.login.register'|trans }} + {{ 'security.login.register'|trans }}
diff --git a/src/Wallabag/UserBundle/Resources/views/layout.html.twig b/src/Wallabag/UserBundle/Resources/views/layout.html.twig index 1d0189ca..1f6ea255 100644 --- a/src/Wallabag/UserBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/layout.html.twig @@ -11,7 +11,7 @@
-
wallabag logo
+
wallabag logo
{% block fos_user_content %} {% endblock fos_user_content %}
-- cgit v1.2.3 From 0743287f955fd19fd1a04c91f3b40a4ac2236423 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Jun 2016 19:02:38 +0200 Subject: clean & lint stuff --- .eslintrc.json | 4 + Gruntfile.js | 124 ++++++------- .../static/themes/_global/js/restoreScroll.js | 28 +-- app/Resources/static/themes/baggy/js/autoClose.js | 12 +- .../static/themes/baggy/js/autoCompleteTags.js | 35 ++-- .../static/themes/baggy/js/closeMessage.js | 36 ++-- app/Resources/static/themes/baggy/js/init.js | 99 +++++----- app/Resources/static/themes/baggy/js/popupForm.js | 167 ++++++++--------- app/Resources/static/themes/baggy/js/saveLink.js | 67 ++++--- app/Resources/static/themes/material/js/init.js | 201 +++++++++++---------- package.json | 8 +- 11 files changed, 391 insertions(+), 390 deletions(-) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..976a9eb5 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "airbnb", + "installedESLint": true, +} diff --git a/Gruntfile.js b/Gruntfile.js index c63c392b..04fd1fe8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,85 +9,81 @@ module.exports = function (grunt) { material: { options: { map: { - inline: false + inline: false, }, processors: [ require('pixrem')(), - require('autoprefixer')({browsers: 'last 2 versions'}), - require('cssnano')() - ] + require('autoprefixer')({ browsers: 'last 2 versions' }), + require('cssnano')(), + ], }, src: '<%= buildDir %>/material.css', - dest: '<%= buildDir %>/themes/material/css/style.min.css' + dest: '<%= buildDir %>/themes/material/css/style.min.css', }, baggy: { options: { map: { - inline: false + inline: false, }, processors: [ require('pixrem')(), - require('autoprefixer')({browsers: 'last 2 versions'}), - require('cssnano')() - ] + require('autoprefixer')({ browsers: 'last 2 versions' }), + require('cssnano')(), + ], }, src: '<%= buildDir %>/baggy.css', - dest: '<%= buildDir %>/themes/baggy/css/style.min.css' - } + dest: '<%= buildDir %>/themes/baggy/css/style.min.css', + }, }, concat: { options: { - separator: ';' + separator: ';', }, jsMaterial: { src: [ - 'node_modules/jquery/dist/jquery.js', - 'node_modules/jquery-ui/jquery-ui.js', - 'node_modules/materialize-css/bin/materialize.js', + '<%= appDir %>/themes/material/js/init.js', '<%= appDir %>/themes/_global/js/restoreScroll.js', - '<%= appDir %>/themes/material/js/init.js' ], - dest: '<%= buildDir %>/material.js' + dest: '<%= buildDir %>/material.js', }, jsBaggy: { src: [ - 'node_modules/jquery/dist/jquery.js', - 'node_modules/jquery-ui/jquery-ui.js', '<%= appDir %>/themes/baggy/js/init.js', '<%= appDir %>/themes/_global/js/restoreScroll.js', '<%= appDir %>/themes/baggy/js/autoClose.js', '<%= appDir %>/themes/baggy/js/autoCompleteTags.js', '<%= appDir %>/themes/baggy/js/closeMessage.js', '<%= appDir %>/themes/baggy/js/popupForm.js', - '<%= appDir %>/themes/baggy/js/saveLink.js' + // Save link is no more used for now + // '<%= appDir %>/themes/baggy/js/saveLink.js', ], - dest: '<%= buildDir %>/baggy.js' + dest: '<%= buildDir %>/baggy.js', }, cssMaterial: { src: [ 'node_modules/materialize-css/bin/materialize.css', - '<%= appDir %>/themes/material/css/*.css' + '<%= appDir %>/themes/material/css/*.css', ], - dest: '<%= buildDir %>/material.css' + dest: '<%= buildDir %>/material.css', }, cssBaggy: { src: [ - '<%= appDir %>/themes/baggy/css/*.css' + '<%= appDir %>/themes/baggy/css/*.css', ], - dest: '<%= buildDir %>/baggy.css' - } + dest: '<%= buildDir %>/baggy.css', + }, }, browserify: { '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'], - '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'] + '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'], }, uglify: { material: { files: { '<%= buildDir %>/themes/material/js/material.min.js': - ['<%= buildDir %>/material.browser.js'] + ['<%= buildDir %>/material.browser.js'], }, options: { sourceMap: true, @@ -96,7 +92,7 @@ module.exports = function (grunt) { baggy: { files: { '<%= buildDir %>/themes/baggy/js/baggy.min.js': - ['<%= buildDir %>/baggy.browser.js'] + ['<%= buildDir %>/baggy.browser.js'], }, options: { sourceMap: true, @@ -108,14 +104,14 @@ module.exports = function (grunt) { expand: true, cwd: 'node_modules/pickadate/lib', src: 'picker.js', - dest: '<%= buildDir %>' + dest: '<%= buildDir %>', }, annotator: { expand: true, cwd: 'node_modules/annotator/pkg', src: 'annotator.min.js', - dest: '<%= buildDir %>/themes/_global/js/' - } + dest: '<%= buildDir %>/themes/_global/js/', + }, }, symlink: { baggyfonts: { @@ -123,50 +119,50 @@ module.exports = function (grunt) { { expand: true, overwrite: true, - cwd: "<%= appDir %>/lib/icomoon-bower/", - src: "fonts", - dest: "<%= buildDir %>/themes/baggy/" + cwd: '<%= appDir %>/lib/icomoon-bower/', + src: 'fonts', + dest: '<%= buildDir %>/themes/baggy/', }, { expand: true, overwrite: true, - cwd: "<%= appDir %>/lib/bower-pt-sans/fonts", - src: "*", - dest: "<%= buildDir %>/themes/baggy/fonts/" - } - ] + cwd: '<%= appDir %>/lib/bower-pt-sans/fonts', + src: '*', + dest: '<%= buildDir %>/themes/baggy/fonts/', + }, + ], }, materialfonts: { files: [ { expand: true, overwrite: true, - cwd: "<%= appDir %>/lib/icomoon-bower/", - src: "fonts", - dest: "<%= buildDir %>/themes/material/" + cwd: '<%= appDir %>/lib/icomoon-bower/', + src: 'fonts', + dest: '<%= buildDir %>/themes/material/', }, { expand: true, overwrite: true, - cwd: "node_modules/materialize-css/", - src: "font", - dest: "<%= buildDir %>/themes/material" + cwd: 'node_modules/materialize-css/', + src: 'font', + dest: '<%= buildDir %>/themes/material', }, { expand: true, overwrite: true, - cwd: "<%= appDir %>/lib/roboto-fontface/fonts/", - src: "*", - dest: "<%= buildDir %>/themes/material/fonts/roboto/" + cwd: '<%= appDir %>/lib/roboto-fontface/fonts/', + src: '*', + dest: '<%= buildDir %>/themes/material/fonts/roboto/', }, { expand: true, overwrite: true, - cwd: "<%= appDir %>/lib/material-design-icons/iconfont/", - src: "*", - dest: "<%= buildDir %>/themes/material/fonts/" - } - ] + cwd: '<%= appDir %>/lib/material-design-icons/iconfont/', + src: '*', + dest: '<%= buildDir %>/themes/material/fonts/', + }, + ], }, pics: { files: [ @@ -175,22 +171,22 @@ module.exports = function (grunt) { overwrite: true, cwd: '<%= appDir %>/themes/_global/', src: 'img', - dest: '<%= buildDir %>/themes/_global/' - } - ] - } + dest: '<%= buildDir %>/themes/_global/', + }, + ], + }, }, clean: { css: { - src: [ '<%= buildDir %>/**/*.css' ] + src: ['<%= buildDir %>/**/*.css'], }, js: { - src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'] + src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'], }, all: { - src: ['./<%= buildDir %>'] - } - } + src: ['./<%= buildDir %>'], + }, + }, }); grunt.registerTask( @@ -216,4 +212,4 @@ module.exports = function (grunt) { 'Compiles the stylesheets.', ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss'] ); -} +}; diff --git a/app/Resources/static/themes/_global/js/restoreScroll.js b/app/Resources/static/themes/_global/js/restoreScroll.js index e63d06c6..9c4d7e20 100644 --- a/app/Resources/static/themes/_global/js/restoreScroll.js +++ b/app/Resources/static/themes/_global/js/restoreScroll.js @@ -1,25 +1,25 @@ function supportsLocalStorage() { - try { - return 'localStorage' in window && window['localStorage'] !== null; - } catch (e) { - return false; - } + try { + return 'localStorage' in window && window.localStorage !== null; + } catch (e) { + return false; + } } function savePercent(id, percent) { - if (!supportsLocalStorage()) { return false; } - localStorage["wallabag.article." + id + ".percent"] = percent; - return true; + if (!supportsLocalStorage()) { return false; } + localStorage['wallabag.article.' + id + '.percent'] = percent; + return true; } function retrievePercent(id) { - if (!supportsLocalStorage()) { return false; } + if (!supportsLocalStorage()) { return false; } - var bheight = $(document).height(); - var percent = localStorage["wallabag.article." + id + ".percent"]; - var scroll = bheight * percent; + var bheight = $(document).height(); + var percent = localStorage['wallabag.article.' + id + '.percent']; + var scroll = bheight * percent; - $('html,body').animate({scrollTop: scroll}, 'fast'); + $('html,body').animate({ scrollTop: scroll }, 'fast'); - return true; + return true; } diff --git a/app/Resources/static/themes/baggy/js/autoClose.js b/app/Resources/static/themes/baggy/js/autoClose.js index e9145b7e..b0dafab2 100644 --- a/app/Resources/static/themes/baggy/js/autoClose.js +++ b/app/Resources/static/themes/baggy/js/autoClose.js @@ -1,6 +1,8 @@ -$(document).ready(function() { - current_url = window.location.href - if (current_url.match("&closewin=true")) { - window.close(); - } +var $ = global.jquery = require('jquery'); + +$(document).ready(function () { + var currentUrl = window.location.href; + if (currentUrl.match('&closewin=true')) { + window.close(); + } }); diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js index 90bc982c..edd0a421 100755 --- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -1,47 +1,46 @@ -jQuery(function($) { +var $ = global.jquery = require('jquery'); - function split( val ) { - return val.split( /,\s*/ ); +jQuery(function ($) { + function split(val) { + return val.split(/,\s*/); } - function extractLast( term ) { - return split( term ).pop(); + function extractLast(term) { + return split(term).pop(); } - $("#value").bind("keydown", function(event) { - if (event.keyCode === $.ui.keyCode.TAB && $(this).data("ui-autocomplete").menu.active) { + $('#value').bind('keydown', function (event) { + if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { event.preventDefault(); } }).autocomplete({ - source : function(request, response) { - $.getJSON("./?view=tags", { - term : extractLast(request.term), + source: function (request, response) { + $.getJSON('./?view=tags', { + term: extractLast(request.term), //id: $(':hidden#entry_id').val() }, response); }, - search : function() { + search: function () { // custom minLength var term = extractLast(this.value); if (term.length < 1) { return false; } }, - focus : function() { + focus: function () { // prevent value inserted on focus return false; }, - select : function(event, ui) { + select: function (event, ui) { var terms = split(this.value); // remove the current input terms.pop(); // add the selected item terms.push(ui.item.value); // add placeholder to get the comma-and-space at the end - terms.push(""); - this.value = terms.join(", "); + terms.push(''); + this.value = terms.join(', '); return false; - } + }, }); - - }); diff --git a/app/Resources/static/themes/baggy/js/closeMessage.js b/app/Resources/static/themes/baggy/js/closeMessage.js index 527719d5..ae4b1791 100644 --- a/app/Resources/static/themes/baggy/js/closeMessage.js +++ b/app/Resources/static/themes/baggy/js/closeMessage.js @@ -1,17 +1,19 @@ -$(function(){ - //--------------------------------------------------------------------------- - // Show the close icon when the user hover over a message - //--------------------------------------------------------------------------- - // $('.messages').on('mouseenter', function(){ - // $(this).find('a.closeMessage').stop(true, true).show(); - // }).on('mouseleave', function(){ - // $(this).find('a.closeMessage').stop(true, true).hide(); - // }); - //--------------------------------------------------------------------------- - // Close the message box when the user clicks the close icon - //--------------------------------------------------------------------------- - $('a.closeMessage').on('click', function(){ - $(this).parents('div.messages').slideUp(300, function(){ $(this).remove(); }); - return false; - }); -}); \ No newline at end of file +var $ = global.jquery = require('jquery'); + +$(function () { + //--------------------------------------------------------------------------- + // Show the close icon when the user hover over a message + //--------------------------------------------------------------------------- + // $('.messages').on('mouseenter', function(){ + // $(this).find('a.closeMessage').stop(true, true).show(); + // }).on('mouseleave', function(){ + // $(this).find('a.closeMessage').stop(true, true).hide(); + // }); + //--------------------------------------------------------------------------- + // Close the message box when the user clicks the close icon + //--------------------------------------------------------------------------- + $('a.closeMessage').on('click', function () { + $(this).parents('div.messages').slideUp(300, function () { $(this).remove(); }); + return false; + }); +}); diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index 1721ae41..d7d4b166 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -4,19 +4,18 @@ require('jquery-ui'); var annotator = require('annotator'); -$.fn.ready(function() { - - var $listmode = $('#listmode'), - $listentries = $("#list-entries"); +$.fn.ready(function () { + var $listmode = $('#listmode'); + var $listentries = $('#list-entries'); /* ========================================================================== Menu ========================================================================== */ - $("#menu").click(function(){ - $("#links").toggleClass('menu--open'); + $('#menu').click(function () { + $('#links').toggleClass('menu--open'); if ($('#content').hasClass('opacity03')) { - $('#content').removeClass('opacity03'); + $('#content').removeClass('opacity03'); } }); @@ -24,34 +23,32 @@ $.fn.ready(function() { List mode or Table Mode ========================================================================== */ - $listmode.click(function(){ - if ( jquery.cookie("listmode") == 1 ) { + $listmode.click(function () { + if (jquery.cookie('listmode') === 1) { // Cookie - $.removeCookie("listmode"); + $.removeCookie('listmode'); - $listentries.removeClass("listmode"); - $listmode.removeClass("tablemode"); - $listmode.addClass("listmode"); - } - else { + $listentries.removeClass('listmode'); + $listmode.removeClass('tablemode'); + $listmode.addClass('listmode'); + } else { // Cookie - jquery.cookie("listmode", 1, {expires: 365}); + jquery.cookie('listmode', 1, { expires: 365 }); - $listentries.addClass("listmode"); - $listmode.removeClass("listmode"); - $listmode.addClass("tablemode"); + $listentries.addClass('listmode'); + $listmode.removeClass('listmode'); + $listmode.addClass('tablemode'); } - }); /* ========================================================================== Cookie listmode ========================================================================== */ - if ( jquery.cookie("listmode") == 1 ) { - $listentries.addClass("listmode"); - $listmode.removeClass("listmode"); - $listmode.addClass("tablemode"); + if (jquery.cookie('listmode') === 1) { + $listentries.addClass('listmode'); + $listmode.removeClass('listmode'); + $listmode.addClass('tablemode'); } /* ========================================================================== @@ -59,43 +56,43 @@ $.fn.ready(function() { ========================================================================== */ - $('#nav-btn-add-tag').on('click', function(){ - $(".nav-panel-add-tag").toggle(100); - $(".nav-panel-menu").addClass('hidden'); - $("#tag_label").focus(); - return false; - }); + $('#nav-btn-add-tag').on('click', function () { + $('.nav-panel-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); /* ========================================================================== Annotations & Remember position ========================================================================== */ - if ($("article").length) { - var app = new annotator.App(); + if ($('article').length) { + var app = new annotator.App(); - app.include(annotator.ui.main, { - element: document.querySelector('article') - }); + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); - var x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); + var x = JSON.parse($('#annotationroutes').html()); + app.include(annotator.storage.http, x); - app.start().then(function () { - app.annotations.load({entry: x.entryId}); - }); + app.start().then(function () { + app.annotations.load({ entry: x.entryId }); + }); - $(window).scroll(function(e){ - var scrollTop = $(window).scrollTop(); - var docHeight = $(document).height(); - var scrollPercent = (scrollTop) / (docHeight); - var scrollPercentRounded = Math.round(scrollPercent*100)/100; - savePercent(x.entryId, scrollPercentRounded); - }); + $(window).scroll(function (e) { + var scrollTop = $(window).scrollTop(); + var docHeight = $(document).height(); + var scrollPercent = (scrollTop) / (docHeight); + var scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); - retrievePercent(x.entryId); + retrievePercent(x.entryId); - $(window).resize(function(){ - retrievePercent(x.entryId); - }); + $(window).resize(function () { + retrievePercent(x.entryId); + }); } }); diff --git a/app/Resources/static/themes/baggy/js/popupForm.js b/app/Resources/static/themes/baggy/js/popupForm.js index 0b478fad..95ba60ee 100644 --- a/app/Resources/static/themes/baggy/js/popupForm.js +++ b/app/Resources/static/themes/baggy/js/popupForm.js @@ -1,100 +1,101 @@ -$(document).ready(function() { +var $ = global.jquery = require('jquery'); - $("#search-form").hide(); - $("#bagit-form").hide(); - $("#filter-form").hide(); - $("#download-form").hide(); +$(document).ready(function () { + $('#search-form').hide(); + $('#bagit-form').hide(); + $('#filter-form').hide(); + $('#download-form').hide(); - //--------------------------------------------------------------------------- - // Toggle the "Search" popup in the sidebar - //--------------------------------------------------------------------------- - function toggleSearch() { - $("#search-form").toggle(); - $("#search").toggleClass("current"); - $("#search").toggleClass("active-current"); - $("#search-arrow").toggleClass("arrow-down"); - if ($("#search").hasClass("current")) { - $("#content").addClass("opacity03"); - } else { - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Toggle the 'Search' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleSearch() { + $('#search-form').toggle(); + $('#search').toggleClass('current'); + $('#search').toggleClass('active-current'); + $('#search-arrow').toggleClass('arrow-down'); + if ($('#search').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); } + } - //--------------------------------------------------------------------------- - // Toggle the "Filter" popup on entries list - //--------------------------------------------------------------------------- - function toggleFilter() { - $("#filter-form").toggle(); - } + //--------------------------------------------------------------------------- + // Toggle the 'Filter' popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $('#filter-form').toggle(); + } - //--------------------------------------------------------------------------- - // Toggle the "Download" popup on entries list - //--------------------------------------------------------------------------- - function toggleDownload() { - $("#download-form").toggle(); - } + //--------------------------------------------------------------------------- + // Toggle the 'Download' popup on entries list + //--------------------------------------------------------------------------- + function toggleDownload() { + $('#download-form').toggle(); + } - //--------------------------------------------------------------------------- - // Toggle the "Save a Link" popup in the sidebar - //--------------------------------------------------------------------------- - function toggleBagit() { - $("#bagit-form").toggle(); - $("#bagit").toggleClass("current"); - $("#bagit").toggleClass("active-current"); - $("#bagit-arrow").toggleClass("arrow-down"); - if ($("#bagit").hasClass("current")) { - $("#content").addClass("opacity03"); - } else { - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Toggle the 'Save a Link' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleBagit() { + $('#bagit-form').toggle(); + $('#bagit').toggleClass('current'); + $('#bagit').toggleClass('active-current'); + $('#bagit-arrow').toggleClass('arrow-down'); + if ($('#bagit').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); } + } - //--------------------------------------------------------------------------- - // Close all #links popups in the sidebar - //--------------------------------------------------------------------------- - function closePopups() { - $("#links .messages").hide(); - $("#links > li > a").removeClass("active-current"); - $("#links > li > a").removeClass("current"); - $("[id$=-arrow]").removeClass("arrow-down"); - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Close all #links popups in the sidebar + //--------------------------------------------------------------------------- + function closePopups() { + $('#links .messages').hide(); + $('#links > li > a').removeClass('active-current'); + $('#links > li > a').removeClass('current'); + $('[id$=-arrow]').removeClass('arrow-down'); + $('#content').removeClass('opacity03'); + } - $("#search").click(function(){ - closePopups(); - toggleSearch(); - $("#searchfield").focus(); - }); + $('#search').click(function () { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); - $(".filter-btn").click(function(){ - closePopups(); - toggleFilter(); - }); + $('.filter-btn').click(function () { + closePopups(); + toggleFilter(); + }); - $(".download-btn").click(function(){ - closePopups(); - toggleDownload(); - }); + $('.download-btn').click(function () { + closePopups(); + toggleDownload(); + }); - $("#bagit").click(function(){ - closePopups(); - toggleBagit(); - $("#plainurl").focus(); - }); + $('#bagit').click(function () { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); - $("#search-form-close").click(function(){ - toggleSearch(); - }); + $('#search-form-close').click(function () { + toggleSearch(); + }); - $("#filter-form-close").click(function(){ - toggleFilter(); - }); + $('#filter-form-close').click(function () { + toggleFilter(); + }); - $("#download-form-close").click(function(){ - toggleDownload(); - }); + $('#download-form-close').click(function () { + toggleDownload(); + }); - $("#bagit-form-close").click(function(){ - toggleBagit(); - }); + $('#bagit-form-close').click(function () { + toggleBagit(); + }); }); diff --git a/app/Resources/static/themes/baggy/js/saveLink.js b/app/Resources/static/themes/baggy/js/saveLink.js index 91cc2c3f..5c720886 100755 --- a/app/Resources/static/themes/baggy/js/saveLink.js +++ b/app/Resources/static/themes/baggy/js/saveLink.js @@ -1,60 +1,60 @@ -$.fn.ready(function() { +var $ = global.jquery = require('jquery'); - var $bagit = $('#bagit'), - $bagitForm = $('#bagit-form'), - $bagitFormForm = $('#bagit-form-form'); +$.fn.ready(function () { + var $bagit = $('#bagit'); + var $bagitForm = $('#bagit-form'); + var $bagitFormForm = $('#bagit-form-form'); /* ========================================================================== bag it link and close button ========================================================================== */ function toggleSaveLinkForm(url, event) { - $("#add-link-result").empty(); + $('#add-link-result').empty(); - $bagit.toggleClass("active-current"); + $bagit.toggleClass('active-current'); - //only if bag-it link is not presented on page - if ( $bagit.length === 0 ) { - if ( event !== 'undefined' && event ) { - $bagitForm.css( {position:"absolute", top:event.pageY, left:event.pageX-200}); - } - else { - $bagitForm.css( {position:"relative", top:"auto", left:"auto"}); + // only if bag-it link is not presented on page + if ($bagit.length === 0) { + if (event !== 'undefined' && event) { + $bagitForm.css({ position: 'absolute', top: event.pageY, left: event.pageX - 200 }); + } else { + $bagitForm.css({ position: 'relative', top: 'auto', left: 'auto' }); } } - if ($("#search-form").length != 0) { - $("#search").removeClass("current"); - $("#search-arrow").removeClass("arrow-down"); - $("#search-form").hide(); + if ($('#search-form').length !== 0) { + $('#search').removeClass('current'); + $('#search-arrow').removeClass('arrow-down'); + $('#search-form').hide(); } $bagitForm.toggle(); - $('#content').toggleClass("opacity03"); + $('#content').toggleClass('opacity03'); if (url !== 'undefined' && url) { $('#plainurl').val(url); } $('#plainurl').focus(); } - //send "bag it link" form request via ajax - $bagitFormForm.submit( function(event) { - $("body").css("cursor", "wait"); - $("#add-link-result").empty(); + // send 'bag it link' form request via ajax + $bagitFormForm.submit(function (event) { + $('body').css('cursor', 'wait'); + $('#add-link-result').empty(); $.ajax({ type: $bagitFormForm.attr('method'), url: $bagitFormForm.attr('action'), data: $bagitFormForm.serialize(), - success: function(data) { - $('#add-link-result').html("Done!"); + success: function (data) { + $('#add-link-result').html('Done!'); $('#plainurl').val(''); $('#plainurl').blur(''); - $("body").css("cursor", "auto"); + $('body').css('cursor', 'auto'); + }, + error: function (data) { + $('#add-link-result').html('Failed!'); + $('body').css('cursor', 'auto'); }, - error: function(data) { - $('#add-link-result').html("Failed!"); - $("body").css("cursor", "auto"); - } }); event.preventDefault(); @@ -64,15 +64,12 @@ $.fn.ready(function() { Process all links inside an article ========================================================================== */ - $("article a[href^='http']").after(function() { - return " "; + $('article a[href^="http"]').after(function () { + return ' '; }); - $(".add-to-wallabag-link-after").click(function(event){ + $('.add-to-wallabag-link-after').click(function (event) { toggleSaveLinkForm($(this).attr('href'), event); event.preventDefault(); }); - }); - - diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js index 33019d3d..d6a87941 100755 --- a/app/Resources/static/themes/material/js/init.js +++ b/app/Resources/static/themes/material/js/init.js @@ -1,116 +1,117 @@ -var $ = require("jquery"), -materialize = require("materialize"); +var $ = require('jquery'); +require('materialize'); var annotator = require('annotator'); -function init_filters() { - // no display if filters not aviable - if ($("div").is("#filters")) { - $('#button_filters').show(); - $('.button-collapse-right').sideNav({ edge: 'right' }); - $('#clear_form_filters').on('click', function(){ - $('#filters input').val(''); - $('#filters :checked').removeAttr('checked'); - return false; - }); - } +function initFilters() { + // no display if filters not aviable + if ($('div').is('#filters')) { + $('#button_filters').show(); + $('.button-collapse-right').sideNav({ edge: 'right' }); + $('#clear_form_filters').on('click', function () { + $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); + return false; + }); + } } -function init_export() { - // no display if export not aviable - if ($("div").is("#export")) { - $('#button_export').show(); - $('.button-collapse-right').sideNav({ edge: 'right' }); - } +function initExport() { + // no display if export not aviable + if ($('div').is('#export')) { + $('#button_export').show(); + $('.button-collapse-right').sideNav({ edge: 'right' }); + } } -$(document).ready(function(){ - // sideNav - $('.button-collapse').sideNav(); - $('select').material_select(); - $('.collapsible').collapsible({ - accordion : false - }); - $('.datepicker').pickadate({ - selectMonths: true, - selectYears: 15, - formatSubmit: 'dd/mm/yyyy', - hiddenName: true, - format: 'dd/mm/yyyy', - }); - init_filters(); - init_export(); +$(document).ready(function () { + // sideNav + $('.button-collapse').sideNav(); + $('select').material_select(); + $('.collapsible').collapsible({ + accordion: false, + }); + $('.datepicker').pickadate({ + selectMonths: true, + selectYears: 15, + formatSubmit: 'dd/mm/yyyy', + hiddenName: true, + format: 'dd/mm/yyyy', + }); + initFilters(); + initExport(); - $('#nav-btn-add-tag').on('click', function(){ - $(".nav-panel-add-tag").toggle(100); - $(".nav-panel-menu").addClass('hidden'); - $("#tag_label").focus(); - return false; - }); - $('#nav-btn-add').on('click', function(){ - $(".nav-panel-buttom").hide(100); - $(".nav-panel-add").show(100); - $(".nav-panels .action").hide(100); - $(".nav-panel-menu").addClass('hidden'); - $(".nav-panels").css('background', 'white'); - $("#entry_url").focus(); - return false; - }); - $('#nav-btn-search').on('click', function(){ - $(".nav-panel-buttom").hide(100); - $(".nav-panel-search").show(100); - $(".nav-panels .action").hide(100); - $(".nav-panel-menu").addClass('hidden'); - $(".nav-panels").css('background', 'white'); - $("#searchfield").focus(); - return false; - }); - $('.close').on('click', function(){ - $(".nav-panel-add").hide(100); - $(".nav-panel-search").hide(100); - $(".nav-panel-buttom").show(100); - $(".nav-panels .action").show(100); - $(".nav-panel-menu").removeClass('hidden'); - $(".nav-panels").css('background', 'transparent'); - return false; - }); - $(window).scroll(function () { - var s = $(window).scrollTop(), - d = $(document).height(), - c = $(window).height(); - var scrollPercent = (s / (d-c)) * 100; - $(".progress .determinate").css('width', scrollPercent+'%'); - }); + $('#nav-btn-add-tag').on('click', function () { + $('.nav-panel-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); + $('#nav-btn-add').on('click', function () { + $('.nav-panel-buttom').hide(100); + $('.nav-panel-add').show(100); + $('.nav-panels .action').hide(100); + $('.nav-panel-menu').addClass('hidden'); + $('.nav-panels').css('background', 'white'); + $('#entry_url').focus(); + return false; + }); + $('#nav-btn-search').on('click', function () { + $('.nav-panel-buttom').hide(100); + $('.nav-panel-search').show(100); + $('.nav-panels .action').hide(100); + $('.nav-panel-menu').addClass('hidden'); + $('.nav-panels').css('background', 'white'); + $('#searchfield').focus(); + return false; + }); + $('.close').on('click', function () { + $('.nav-panel-add').hide(100); + $('.nav-panel-search').hide(100); + $('.nav-panel-buttom').show(100); + $('.nav-panels .action').show(100); + $('.nav-panel-menu').removeClass('hidden'); + $('.nav-panels').css('background', 'transparent'); + return false; + }); + $(window).scroll(function () { + var s = $(window).scrollTop(); + var d = $(document).height(); + var c = $(window).height(); + var scrollPercent = (s / (d - c)) * 100; + $('.progress .determinate').css('width', scrollPercent + '%'); + }); + +/* ========================================================================== + Annotations & Remember position + ========================================================================== */ - /* ========================================================================== - Annotations & Remember position - ========================================================================== */ + if ($('article').length) { + var app = new annotator.App(); + var x = JSON.parse($('#annotationroutes').html()); - if ($("article").length) { - var app = new annotator.App(); - app.include(annotator.ui.main, { - element: document.querySelector('article') - }); + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); - var x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); + app.include(annotator.storage.http, x); - app.start().then(function () { - app.annotations.load({entry: x.entryId}); - }); + app.start().then(function () { + app.annotations.load({ entry: x.entryId }); + }); - $(window).scroll(function(e){ - var scrollTop = $(window).scrollTop(); - var docHeight = $(document).height(); - var scrollPercent = (scrollTop) / (docHeight); - var scrollPercentRounded = Math.round(scrollPercent*100)/100; - savePercent(x.entryId, scrollPercentRounded); - }); + $(window).scroll(function (e) { + var scrollTop = $(window).scrollTop(); + var docHeight = $(document).height(); + var scrollPercent = (scrollTop) / (docHeight); + var scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); - retrievePercent(x.entryId); + retrievePercent(x.entryId); - $(window).resize(function(){ - retrievePercent(x.entryId); - }); - } + $(window).resize(function () { + retrievePercent(x.entryId); + }); + } }); diff --git a/package.json b/package.json index 603596ae..5d6306f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wallabag", - "version": "2.0.0", + "version": "2.1.0", "description": "wallabag is a self hostable application for saving web pages", "main": "index.js", "private": true, @@ -20,11 +20,9 @@ "grunt-contrib-clean": "^1.0.0", "grunt-contrib-concat": "^1.0.0", "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-cssmin": "^1.0.0", "grunt-contrib-symlink": "^1.0.0", "grunt-contrib-uglify": "^1.0.0", "grunt-postcss": "^0.8.0", - "grunt-shell": "^1.2.1", "hammerjs": "^2.0.6", "jquery": "^2.2.1", "jquery-ui": "^1.10.5", @@ -80,5 +78,9 @@ "license": "MIT", "bugs": { "url": "https://github.com/wallabag/wallabag/issues" + }, + "devDependencies": { + "eslint": "^2.11.1", + "eslint-config-airbnb": "^9.0.1", } } -- cgit v1.2.3 From 2e24d1202727483dc93b3e6a76de4f7c0be5e3d7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Jun 2016 19:07:41 +0200 Subject: remove block added twice --- .../views/themes/baggy/Config/index.html.twig | 85 ---------------------- 1 file changed, 85 deletions(-) diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index f1ed63c0..40f0ae16 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -204,91 +204,6 @@ {{ form_rest(form.new_tagging_rule) }} -
-
-

{{ 'config.form_rules.faq.title'|trans }}

- -
{{ 'config.form_rules.faq.tagging_rules_definition_title'|trans }}
-

{{ 'config.form_rules.faq.tagging_rules_definition_description'|trans|raw }}

- -
{{ 'config.form_rules.faq.how_to_use_them_title'|trans }}
-

{{ 'config.form_rules.faq.how_to_use_them_description'|trans|raw }}

- -
{{ 'config.form_rules.faq.variables_available_title'|trans }}
-

- {{ 'config.form_rules.faq.variables_available_description'|trans }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'config.form_rules.faq.variable_description.label'|trans }}{{ 'config.form_rules.faq.meaning'|trans }}{{ 'config.form_rules.faq.operator_description.label'|trans }}{{ 'config.form_rules.faq.meaning'|trans }}
title{{ 'config.form_rules.faq.variable_description.title'|trans }}<={{ 'config.form_rules.faq.operator_description.less_than'|trans }}
url{{ 'config.form_rules.faq.variable_description.url'|trans }}<{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}
isArchived{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}=>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}
isStarred{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}
content{{ 'config.form_rules.faq.variable_description.content'|trans }}={{ 'config.form_rules.faq.operator_description.equal_to'|trans }}
language{{ 'config.form_rules.faq.variable_description.language'|trans }}!={{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}
mimetype{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}OR{{ 'config.form_rules.faq.operator_description.or'|trans }}
readingTime{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}AND{{ 'config.form_rules.faq.operator_description.and'|trans }}
domainName{{ 'config.form_rules.faq.variable_description.domainName'|trans }}matches{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}
-

-
-
-

{{ 'config.form_rules.faq.title'|trans }}

-- cgit v1.2.3 From 496cfdc0172fd55cb555f74b64704c8f50c71b77 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Jun 2016 20:08:57 +0200 Subject: trailing comma --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d6306f0..52c8d909 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,6 @@ }, "devDependencies": { "eslint": "^2.11.1", - "eslint-config-airbnb": "^9.0.1", + "eslint-config-airbnb": "^9.0.1" } } -- cgit v1.2.3