From fb9f100e8f4f3288b87536faff4b59cacc7b1efb Mon Sep 17 00:00:00 2001 From: FrenchHope Date: Sun, 19 Mar 2017 09:40:31 +0100 Subject: Scuttle sharing --- .../translations/CraueConfigBundle.da.yml | 1 + .../translations/CraueConfigBundle.de.yml | 1 + .../translations/CraueConfigBundle.en.yml | 1 + .../translations/CraueConfigBundle.es.yml | 1 + .../translations/CraueConfigBundle.fa.yml | 1 + .../translations/CraueConfigBundle.fr.yml | 1 + .../translations/CraueConfigBundle.it.yml | 1 + .../translations/CraueConfigBundle.oc.yml | 1 + .../translations/CraueConfigBundle.pl.yml | 1 + .../translations/CraueConfigBundle.pt.yml | 1 + .../translations/CraueConfigBundle.ro.yml | 1 + .../translations/CraueConfigBundle.tr.yml | 1 + .../static/themes/_global/img/icons/scuttle.png | Bin 0 -> 1845 bytes app/Resources/static/themes/baggy/css/main.css | 9 +++++++++ app/Resources/static/themes/material/css/main.css | 5 +++++ 15 files changed, 26 insertions(+) create mode 100644 app/Resources/static/themes/_global/img/icons/scuttle.png (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index c65463db..d1f7e3b5 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -15,6 +15,7 @@ shaarli_url: Shaarli-URL, hvis tjenesten er aktiv share_diaspora: Aktiver deling til Diaspora share_mail: Aktiver deling med email share_shaarli: Aktiver deling gennem Shaarli +share_scuttle: Aktiver deling gennem Scuttle share_twitter: Aktiver deling gennem Twitter share_unmark: Aktiver deling gennem Unmark.it show_printlink: Vis et link til print-indhold diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index bc378147..1105675b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -15,6 +15,7 @@ shaarli_url: Shaarli-URL, sofern der Service aktiviert ist share_diaspora: Teilen zu Diaspora aktiveren share_mail: Teilen via E-Mail aktiveren share_shaarli: Teilen zu Shaarli aktiveren +share_scuttle: Teilen zu Scuttle aktiveren share_twitter: Teilen zu Twitter aktiveren share_unmark: Teilen zu Unmark.it aktiveren show_printlink: Link anzeigen, um den Inhalt auszudrucken diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 52cb8e20..802599b3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -15,6 +15,7 @@ shaarli_url: Shaarli URL, if the service is enabled share_diaspora: Enable share to Diaspora share_mail: Enable share by email share_shaarli: Enable share to Shaarli +share_scuttle: Enable share to Scuttle share_twitter: Enable share to Twitter share_unmark: Enable share to Unmark.it show_printlink: Display a link to print content diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index c338836d..b3ac18ed 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -15,6 +15,7 @@ shaarli_url: URL de Shaarli, si el servicio está activado share_diaspora: Activar compartir con Diaspora share_mail: Activar compartir con Email share_shaarli: Activar compartir con Shaarli +share_scuttle: Activar compartir con Scuttle share_twitter: Activar compartir con Twitter share_unmark: Activar compartir con Unmark.it show_printlink: Mostrar un enlace para imprimir contenido diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index 7a341e0b..c73d63e2 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -15,6 +15,7 @@ shaarli_url: نشانی Shaarli، اگر فعال بود share_diaspora: فعال‌سازی هم‌رسانی به Diaspora share_mail: فعال‌سازی هم‌رسانی با ایمیل share_shaarli: فعال‌سازی هم‌رسانی به Shaarli +share_scuttle: فعال‌سازی هم‌رسانی به Scuttle share_twitter: فعال‌سازی هم‌رسانی به Twitter share_unmark: فعال‌سازی هم‌رسانی به Unmark.it show_printlink: نمایش پیوندی برای چاپ مطلب diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index f5c886d6..a53174ae 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -15,6 +15,7 @@ shaarli_url: URL de Shaarli, si le service Shaarli est activé share_diaspora: Activer le partage vers Diaspora share_mail: Activer le partage par email share_shaarli: Activer le partage vers Shaarli +share_scuttle: Activer le partage vers Scuttle share_twitter: Activer le partage vers Twitter share_unmark: Activer le partage vers Unmark.it show_printlink: Afficher un lien pour imprimer diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 88a1b4f6..3d53fc8d 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -15,6 +15,7 @@ shaarli_url: Shaarli URL, se il servizio è abilitato share_diaspora: Abilita la condivisione con Diaspora share_mail: Abilita la condivisione per email share_shaarli: Abilita la condivisione con Shaarli +share_scuttle: Abilita la condivisione con Scuttle share_twitter: Abilita la condivisione con Twitter share_unmark: Abilita la condivisione con Unmark.it show_printlink: Mostra un collegamento per stampare il contenuto diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 04aaf0e8..79f75245 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -15,6 +15,7 @@ shaarli_url: URL de Shaarli, se lo servici Shaarli es activat share_diaspora: Activar lo partatge cap a Diaspora share_mail: Activar lo partatge per corrièl share_shaarli: Activar lo partatge cap a Shaarli +share_scuttle: Activar lo partatge cap a Scuttle share_twitter: Activar lo partatge cap a Twitter share_unmark: Activar lo partatge cap a Unmark.it show_printlink: Afichar un ligam per imprimir diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 1203e159..02fe98e3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -15,6 +15,7 @@ shaarli_url: Adress URL Shaarli, jeżeli usługa jest włączona share_diaspora: Włącz udostępnianie dla Diaspora share_mail: Włącz udostępnianie przez email share_shaarli: Włącz udostępnianie dla Shaarli +share_scuttle: Włącz udostępnianie dla Scuttle share_twitter: Włącz udostępnianie dla Twitter share_unmark: Włącz udostępnianie dla Unmark.it show_printlink: Pokaż link do wydrukowania zawartości diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 1edde87a..4a061bce 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -15,6 +15,7 @@ shaarli_url: URL Shaarli, se o serviço está habilitado share_diaspora: Habilitar compartilhamento para o Diaspora share_mail: Habilitar compartilhamento por e-mail share_shaarli: Habilitar compartilhamento para o Shaarli +share_scuttle: Habilitar compartilhamento para o Scuttle share_twitter: Habilitar compartilhamento para o Twitter share_unmark: Habilitar compartilhamento para o Unmark.it show_printlink: Mostrar um link para imprimir o conteúdo diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index f0c935d3..5ee48074 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -15,6 +15,7 @@ shaarli_url: Shaarli URL, dacă serviciul este permis share_diaspora: Permite share către Diaspora share_mail: Permite share prin email share_shaarli: Permite share către Shaarli +share_scuttle: Permite share către Scuttle share_twitter: Permite share către Twitter share_unmark: Permite share către Unmark.it show_printlink: Afișează un link pentru a printa content-ul diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index eb40fc5e..d83a4b7b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml @@ -15,6 +15,7 @@ # share_diaspora: Enable share to Diaspora # share_mail: Enable share by email # share_shaarli: Enable share to Shaarli +# share_scuttle: Enable share to Scuttle # share_twitter: Enable share to Twitter # share_unmark: Enable share to Unmark.it # show_printlink: Display a link to print content diff --git a/app/Resources/static/themes/_global/img/icons/scuttle.png b/app/Resources/static/themes/_global/img/icons/scuttle.png new file mode 100644 index 00000000..413357bd Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/scuttle.png differ diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index e16846ea..480ebc48 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -947,6 +947,11 @@ a.add-to-wallabag-link-after::after { background-image: url("../../_global/img/icons/shaarli.png"); } +/* scuttle */ +.icon-image--scuttle { + background-image: url("../../_global/img/icons/scuttle.png"); +} + /* ========================================================================== Icon selected ========================================================================== */ @@ -1063,6 +1068,10 @@ blockquote { content: "*"; } +.scuttle::before { + content: "*"; +} + .return { text-decoration: none; margin-top: 1em; diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index ee4ad4e0..45428e23 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css @@ -160,6 +160,11 @@ background-image: url("../../_global/img/icons/shaarli.png"); } +/* Scuttle */ +.icon-image--scuttle { + background-image: url("../../_global/img/icons/scuttle.png"); +} + body { display: flex; min-height: 100vh; -- cgit v1.2.3 From b5a5377af12048e05269fc490e588c1b777cde13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 27 Mar 2017 22:13:13 +0200 Subject: Added migration for Scuttle sharing --- app/DoctrineMigrations/Version20170327194233.php | 54 +++++++++++++++++++++ .../static/themes/_global/img/icons/scuttle.png | Bin 1845 -> 1071 bytes 2 files changed, 54 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170327194233.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170327194233.php b/app/DoctrineMigrations/Version20170327194233.php new file mode 100644 index 00000000..e1466b2f --- /dev/null +++ b/app/DoctrineMigrations/Version20170327194233.php @@ -0,0 +1,54 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $scuttle = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle'"); + + $this->skipIf(false !== $scuttle, 'It seems that you already played this migration.'); + + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_scuttle', '1', 'entry')"); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle';"); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'scuttle_url';"); + } +} diff --git a/app/Resources/static/themes/_global/img/icons/scuttle.png b/app/Resources/static/themes/_global/img/icons/scuttle.png index 413357bd..3b8eb264 100644 Binary files a/app/Resources/static/themes/_global/img/icons/scuttle.png and b/app/Resources/static/themes/_global/img/icons/scuttle.png differ -- cgit v1.2.3 From 1680c95c2761e9b387e2bdc4074748e3c495ef43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 29 Mar 2017 14:43:47 +0200 Subject: Changed default value for list mode (grid instead of list) --- app/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index d7231112..4f4fb900 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -52,7 +52,7 @@ wallabag_core: reading_speed: 1 cache_lifetime: 10 action_mark_as_read: 1 - list_mode: 1 + list_mode: 0 fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. -- cgit v1.2.3 From 5e9009ce86a366001616fad5b28cb59dc20ee4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 5 Apr 2017 22:22:16 +0200 Subject: Added publication date --- app/DoctrineMigrations/Version20160410190541.php | 2 +- app/DoctrineMigrations/Version20160812120952.php | 2 +- app/DoctrineMigrations/Version20160911214952.php | 2 +- app/DoctrineMigrations/Version20160916201049.php | 2 +- app/DoctrineMigrations/Version20161001072726.php | 2 +- app/DoctrineMigrations/Version20161022134138.php | 2 +- app/DoctrineMigrations/Version20161024212538.php | 2 +- app/DoctrineMigrations/Version20161031132655.php | 2 +- app/DoctrineMigrations/Version20161104073720.php | 2 +- app/DoctrineMigrations/Version20161106113822.php | 2 +- app/DoctrineMigrations/Version20161117071626.php | 2 +- app/DoctrineMigrations/Version20161214094402.php | 2 +- app/DoctrineMigrations/Version20161214094403.php | 2 +- app/DoctrineMigrations/Version20170127093841.php | 2 +- app/DoctrineMigrations/Version20170405182620.php | 55 ++++++++++++++++++++++++ app/Resources/static/themes/baggy/css/main.css | 4 ++ 16 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 app/DoctrineMigrations/Version20170405182620.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 6294d842..5e5cae35 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added foreign keys for account resetting + * Added foreign keys for account resetting. */ class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index bd6e8d63..13272267 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added name field on wallabag_oauth2_clients + * Added name field on wallabag_oauth2_clients. */ class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index edef81ed..4eae46e7 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added settings for RabbitMQ and Redis imports + * Added settings for RabbitMQ and Redis imports. */ class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 9f8e77e7..ff34c894 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index f247c236..ad761541 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Doctrine\DBAL\Migrations\SkipMigrationException; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index c71166a0..39949e7d 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Converted database to utf8mb4 encoding (for MySQL only) + * Converted database to utf8mb4 encoding (for MySQL only). */ class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index ecb872d1..b2f6aaf8 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added user_id column on oauth2_clients to prevent users to delete API clients from other users + * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. */ class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index 83b97ca9..ef846412 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to enable/disable downloading pictures + * Added the internal setting to enable/disable downloading pictures. */ class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index fb8f5fa1..0e05f02e 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added created_at index on entry table + * Added created_at index on entry table. */ class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index de3702a4..facc14f4 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added action_mark_as_read field on config table + * Added action_mark_as_read field on config table. */ class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index 8daa2142..e779eacf 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to share articles to unmark.it + * Added the internal setting to share articles to unmark.it. */ class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index db125f76..8ca32b09 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Renamed uuid to uid in entry table + * Renamed uuid to uid in entry table. */ class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index 5948b5fa..c7326f95 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added index on wallabag_entry.uid + * Added index on wallabag_entry.uid. */ class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index 20c79479..5bfd9670 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived + * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. */ class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php new file mode 100644 index 00000000..1e020c17 --- /dev/null +++ b/app/DoctrineMigrations/Version20170405182620.php @@ -0,0 +1,55 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf($entryTable->hasColumn('published_at'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('published_at', 'datetime', [ + 'notnull' => false, + ]); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf(!$entryTable->hasColumn('published_at'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('published_at'); + } +} diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 480ebc48..246ec2c1 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -912,6 +912,10 @@ a.add-to-wallabag-link-after::after { content: "\e953"; } +.icon-pencil2::before { + content: "\e906"; +} + .icon-time::before { content: "\e952"; } -- cgit v1.2.3 From 7b0b3622ab2dd909028481b294c91f88a5682671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 6 Apr 2017 09:36:20 +0200 Subject: Added author of article --- app/DoctrineMigrations/Version20170405182620.php | 7 ++++++- app/Resources/static/themes/baggy/css/main.css | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php index 1e020c17..c1ae7df9 100644 --- a/app/DoctrineMigrations/Version20170405182620.php +++ b/app/DoctrineMigrations/Version20170405182620.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Add published_at in `entry` table. + * Add published_at and published_by in `entry` table. */ class Version20170405182620 extends AbstractMigration implements ContainerAwareInterface { @@ -39,6 +39,10 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI $entryTable->addColumn('published_at', 'datetime', [ 'notnull' => false, ]); + + $entryTable->addColumn('published_by', 'text', [ + 'notnull' => false, + ]); } /** @@ -51,5 +55,6 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI $this->skipIf(!$entryTable->hasColumn('published_at'), 'It seems that you already played this migration.'); $entryTable->dropColumn('published_at'); + $entryTable->dropColumn('published_by'); } } diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 246ec2c1..f82c6bee 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -916,6 +916,10 @@ a.add-to-wallabag-link-after::after { content: "\e906"; } +.icon-users::before { + content: "\e972"; +} + .icon-time::before { content: "\e952"; } -- cgit v1.2.3 From 3aa655e44a1a41296454d146aa948f2889904f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 10 Apr 2017 09:26:08 +0200 Subject: Fixed migrations --- app/DoctrineMigrations/Version20170405182620.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php index c1ae7df9..3ef9633f 100644 --- a/app/DoctrineMigrations/Version20170405182620.php +++ b/app/DoctrineMigrations/Version20170405182620.php @@ -40,6 +40,8 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI 'notnull' => false, ]); + $this->skipIf($entryTable->hasColumn('published_by'), 'It seems that you already played this migration.'); + $entryTable->addColumn('published_by', 'text', [ 'notnull' => false, ]); @@ -55,6 +57,9 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI $this->skipIf(!$entryTable->hasColumn('published_at'), 'It seems that you already played this migration.'); $entryTable->dropColumn('published_at'); + + $this->skipIf(!$entryTable->hasColumn('published_by'), 'It seems that you already played this migration.'); + $entryTable->dropColumn('published_by'); } } -- cgit v1.2.3 From 15e4aea67842ae83f98d9864c5bdafa056381248 Mon Sep 17 00:00:00 2001 From: Maxime Date: Fri, 7 Apr 2017 22:23:20 +0200 Subject: Remove isPublic from Entry entity fix #2598 --- app/DoctrineMigrations/Version20170407200919.php | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170407200919.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php new file mode 100644 index 00000000..71f53b85 --- /dev/null +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -0,0 +1,51 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('is_public'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); + } +} -- cgit v1.2.3 From 01736b5a2ee2a48403a2462014886bf009f18786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 13 Apr 2017 12:57:31 +0200 Subject: Removed is_public in Entry edit form --- app/DoctrineMigrations/Version20160410190541.php | 2 +- app/DoctrineMigrations/Version20160812120952.php | 2 +- app/DoctrineMigrations/Version20160911214952.php | 2 +- app/DoctrineMigrations/Version20160916201049.php | 2 +- app/DoctrineMigrations/Version20161001072726.php | 2 +- app/DoctrineMigrations/Version20161022134138.php | 2 +- app/DoctrineMigrations/Version20161024212538.php | 2 +- app/DoctrineMigrations/Version20161031132655.php | 2 +- app/DoctrineMigrations/Version20161104073720.php | 2 +- app/DoctrineMigrations/Version20161106113822.php | 2 +- app/DoctrineMigrations/Version20161117071626.php | 2 +- app/DoctrineMigrations/Version20161214094402.php | 2 +- app/DoctrineMigrations/Version20161214094403.php | 2 +- app/DoctrineMigrations/Version20170127093841.php | 2 +- app/DoctrineMigrations/Version20170407200919.php | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 6294d842..5e5cae35 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added foreign keys for account resetting + * Added foreign keys for account resetting. */ class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index bd6e8d63..13272267 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added name field on wallabag_oauth2_clients + * Added name field on wallabag_oauth2_clients. */ class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index edef81ed..4eae46e7 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added settings for RabbitMQ and Redis imports + * Added settings for RabbitMQ and Redis imports. */ class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 9f8e77e7..ff34c894 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index f247c236..ad761541 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Doctrine\DBAL\Migrations\SkipMigrationException; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index c71166a0..39949e7d 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Converted database to utf8mb4 encoding (for MySQL only) + * Converted database to utf8mb4 encoding (for MySQL only). */ class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index ecb872d1..b2f6aaf8 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added user_id column on oauth2_clients to prevent users to delete API clients from other users + * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. */ class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index 83b97ca9..ef846412 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to enable/disable downloading pictures + * Added the internal setting to enable/disable downloading pictures. */ class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index fb8f5fa1..0e05f02e 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added created_at index on entry table + * Added created_at index on entry table. */ class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index de3702a4..facc14f4 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added action_mark_as_read field on config table + * Added action_mark_as_read field on config table. */ class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index 8daa2142..e779eacf 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to share articles to unmark.it + * Added the internal setting to share articles to unmark.it. */ class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index db125f76..8ca32b09 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Renamed uuid to uid in entry table + * Renamed uuid to uid in entry table. */ class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index 5948b5fa..c7326f95 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added index on wallabag_entry.uid + * Added index on wallabag_entry.uid. */ class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index 20c79479..5bfd9670 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived + * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. */ class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index 71f53b85..4b9d475a 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Remove isPublic in Entry Table + * Remove isPublic in Entry Table. */ class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface { -- cgit v1.2.3 From 21d955f7037930bef43d58398395a69b68e3b878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 20 Apr 2017 15:45:43 +0200 Subject: Cleaned craue_config_setting by removing useless download_pictures setting --- app/DoctrineMigrations/Version20170420134133.php | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170420134133.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170420134133.php b/app/DoctrineMigrations/Version20170420134133.php new file mode 100644 index 00000000..b1ab7bcb --- /dev/null +++ b/app/DoctrineMigrations/Version20170420134133.php @@ -0,0 +1,52 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_pictures';"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $downloadPictures = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_pictures'"); + + $this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.'); + + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_pictures', '1', 'entry')"); + } +} -- cgit v1.2.3 From efd351c98fa0caa4c8df9c7ff6965c537524f12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 1 May 2017 09:21:59 +0200 Subject: Added limit --- app/config/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index 4f4fb900..451809d6 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -55,6 +55,7 @@ wallabag_core: list_mode: 0 fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. + api_limit_mass_actions: 10 wallabag_user: registration_enabled: "%fosuser_registration%" -- cgit v1.2.3 From a40029f9d6cf8405b6f3e30c8762a4f50da88db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 2 May 2017 16:21:06 +0200 Subject: Disabled shortcuts on login/register page --- app/Resources/static/themes/material/js/shortcuts/main.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js index 0a2d2a69..41499478 100644 --- a/app/Resources/static/themes/material/js/shortcuts/main.js +++ b/app/Resources/static/themes/material/js/shortcuts/main.js @@ -23,6 +23,11 @@ $(document).ready(() => { return; } + /* Show nothing on login/register page */ + if ($('#username').length > 0 || $('#fos_user_registration_form_username').length > 0) { + return; + } + /* Focus current card */ toggleFocus(card); -- cgit v1.2.3 From 64f81bc31699ed239e4becec1cfa7ebc0bef2b5a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 31 Mar 2017 20:21:41 +0200 Subject: Adds Webpack support and removes the use for Grunt Signed-off-by: Thomas Citharel use scss Signed-off-by: Thomas Citharel fix build, add babel, fix annotations fixes (and improvements !) for baggy add live reload & environments & eslint & theme fixes --- app/AppKernel.php | 9 + app/Resources/static/themes/_global/global.scss | 13 + .../themes/_global/img/icons/Diaspora-asterisk.svg | 334 ++++++++++++++ app/Resources/static/themes/_global/index.js | 52 +++ app/Resources/static/themes/_global/js/tools.js | 23 +- app/Resources/static/themes/baggy/css/article.scss | 165 +++++++ app/Resources/static/themes/baggy/css/font.css | 6 - app/Resources/static/themes/baggy/css/guide.scss | 263 +++++++++++ app/Resources/static/themes/baggy/css/index.scss | 13 + app/Resources/static/themes/baggy/css/layout.scss | 300 ++++++++++++ app/Resources/static/themes/baggy/css/login.scss | 26 ++ .../static/themes/baggy/css/media_queries.scss | 172 +++++++ app/Resources/static/themes/baggy/css/messages.css | 19 - .../static/themes/baggy/css/messages.scss | 50 ++ app/Resources/static/themes/baggy/css/pictos.scss | 210 +++++++++ app/Resources/static/themes/baggy/css/print.css | 66 --- app/Resources/static/themes/baggy/css/print.scss | 63 +++ .../static/themes/baggy/css/ratatouille.css | 226 ---------- .../static/themes/baggy/css/ratatouille.scss | 226 ++++++++++ app/Resources/static/themes/baggy/css/save.scss | 115 +++++ app/Resources/static/themes/baggy/font/icomoon.eot | Bin 97236 -> 0 bytes app/Resources/static/themes/baggy/font/icomoon.svg | 501 --------------------- app/Resources/static/themes/baggy/font/icomoon.ttf | Bin 97072 -> 0 bytes .../static/themes/baggy/font/icomoon.woff | Bin 97148 -> 0 bytes app/Resources/static/themes/baggy/index.js | 267 +++++++++++ app/Resources/static/themes/baggy/js/init.js | 329 -------------- .../static/themes/baggy/js/shortcuts/main.js | 3 + .../static/themes/material/css/article.scss | 174 +++++++ .../static/themes/material/css/cards.scss | 186 ++++++++ .../static/themes/material/css/entries.scss | 87 ++++ .../static/themes/material/css/filters.scss | 15 + .../static/themes/material/css/fonts.scss | 13 + .../static/themes/material/css/icons.scss | 185 ++++++++ .../static/themes/material/css/index.scss | 17 + .../static/themes/material/css/layout.scss | 50 ++ .../static/themes/material/css/media_queries.scss | 149 ++++++ app/Resources/static/themes/material/css/nav.scss | 106 +++++ app/Resources/static/themes/material/css/print.css | 77 ---- .../static/themes/material/css/print.scss | 74 +++ .../static/themes/material/css/sidenav.scss | 41 ++ .../static/themes/material/css/variables.scss | 5 + .../static/themes/material/css/various.scss | 24 + app/Resources/static/themes/material/index.js | 78 ++++ app/Resources/static/themes/material/js/init.js | 110 ----- app/Resources/static/themes/material/js/tools.js | 24 + app/config/config.yml | 3 + app/config/config_prod.yml | 6 +- app/config/webpack/common.js | 40 ++ app/config/webpack/dev.js | 62 +++ app/config/webpack/prod.js | 99 ++++ 50 files changed, 3717 insertions(+), 1359 deletions(-) create mode 100644 app/Resources/static/themes/_global/global.scss create mode 100644 app/Resources/static/themes/_global/img/icons/Diaspora-asterisk.svg create mode 100644 app/Resources/static/themes/_global/index.js create mode 100644 app/Resources/static/themes/baggy/css/article.scss delete mode 100755 app/Resources/static/themes/baggy/css/font.css create mode 100644 app/Resources/static/themes/baggy/css/guide.scss create mode 100644 app/Resources/static/themes/baggy/css/index.scss create mode 100644 app/Resources/static/themes/baggy/css/layout.scss create mode 100644 app/Resources/static/themes/baggy/css/login.scss create mode 100755 app/Resources/static/themes/baggy/css/media_queries.scss delete mode 100755 app/Resources/static/themes/baggy/css/messages.css create mode 100755 app/Resources/static/themes/baggy/css/messages.scss create mode 100644 app/Resources/static/themes/baggy/css/pictos.scss delete mode 100755 app/Resources/static/themes/baggy/css/print.css create mode 100755 app/Resources/static/themes/baggy/css/print.scss delete mode 100644 app/Resources/static/themes/baggy/css/ratatouille.css create mode 100644 app/Resources/static/themes/baggy/css/ratatouille.scss create mode 100644 app/Resources/static/themes/baggy/css/save.scss delete mode 100644 app/Resources/static/themes/baggy/font/icomoon.eot delete mode 100644 app/Resources/static/themes/baggy/font/icomoon.svg delete mode 100644 app/Resources/static/themes/baggy/font/icomoon.ttf delete mode 100644 app/Resources/static/themes/baggy/font/icomoon.woff create mode 100755 app/Resources/static/themes/baggy/index.js delete mode 100755 app/Resources/static/themes/baggy/js/init.js create mode 100644 app/Resources/static/themes/material/css/article.scss create mode 100644 app/Resources/static/themes/material/css/cards.scss create mode 100644 app/Resources/static/themes/material/css/entries.scss create mode 100644 app/Resources/static/themes/material/css/filters.scss create mode 100644 app/Resources/static/themes/material/css/fonts.scss create mode 100644 app/Resources/static/themes/material/css/icons.scss create mode 100644 app/Resources/static/themes/material/css/index.scss create mode 100755 app/Resources/static/themes/material/css/layout.scss create mode 100644 app/Resources/static/themes/material/css/media_queries.scss create mode 100644 app/Resources/static/themes/material/css/nav.scss delete mode 100755 app/Resources/static/themes/material/css/print.css create mode 100755 app/Resources/static/themes/material/css/print.scss create mode 100644 app/Resources/static/themes/material/css/sidenav.scss create mode 100644 app/Resources/static/themes/material/css/variables.scss create mode 100644 app/Resources/static/themes/material/css/various.scss create mode 100755 app/Resources/static/themes/material/index.js delete mode 100755 app/Resources/static/themes/material/js/init.js create mode 100644 app/Resources/static/themes/material/js/tools.js create mode 100644 app/config/webpack/common.js create mode 100644 app/config/webpack/dev.js create mode 100644 app/config/webpack/prod.js (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index c8382d5f..b9293498 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -71,5 +71,14 @@ class AppKernel extends Kernel public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load(function ($container) { + if ($container->getParameter('use_webpack_dev_server')) { + $container->loadFromExtension('framework', [ + 'assets' => [ + 'base_url' => 'http://localhost:8080/', + ], + ]); + } + }); } } diff --git a/app/Resources/static/themes/_global/global.scss b/app/Resources/static/themes/_global/global.scss new file mode 100644 index 00000000..0e877efb --- /dev/null +++ b/app/Resources/static/themes/_global/global.scss @@ -0,0 +1,13 @@ +/* Rules for sizing the icon. */ +.material-icons.md-18 { font-size: 18px; } +.material-icons.md-24 { font-size: 24px; } +.material-icons.md-36 { font-size: 36px; } +.material-icons.md-48 { font-size: 48px; } + +/* Rules for using icons as black on a light background. */ +.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); } +.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } + +/* Rules for using icons as white on a dark background. */ +.material-icons.md-light { color: rgba(255, 255, 255, 1); } +.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); } diff --git a/app/Resources/static/themes/_global/img/icons/Diaspora-asterisk.svg b/app/Resources/static/themes/_global/img/icons/Diaspora-asterisk.svg new file mode 100644 index 00000000..91764b60 --- /dev/null +++ b/app/Resources/static/themes/_global/img/icons/Diaspora-asterisk.svg @@ -0,0 +1,334 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js new file mode 100644 index 00000000..00410754 --- /dev/null +++ b/app/Resources/static/themes/_global/index.js @@ -0,0 +1,52 @@ +/* jQuery */ +import $ from 'jquery'; + +/* Annotations */ +import annotator from 'annotator'; + +/* Fonts */ +import 'material-design-icons-iconfont/dist/material-design-icons.css'; +import 'lato-font/css/lato-font.css'; +import './global.scss'; + +/* Shortcuts*/ +import './js/shortcuts/entry'; +import './js/shortcuts/main'; + +import { savePercent, retrievePercent } from './js/tools'; + + +/* ========================================================================== + Annotations & Remember position + ========================================================================== */ + +$(document).ready(() => { + if ($('article').length) { + const app = new annotator.App(); + + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); + + const x = JSON.parse($('#annotationroutes').html()); + app.include(annotator.storage.http, x); + + app.start().then(() => { + app.annotations.load({ entry: x.entryId }); + }); + + $(window).scroll(() => { + const scrollTop = $(window).scrollTop(); + const docHeight = $(document).height(); + const scrollPercent = (scrollTop) / (docHeight); + const scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); + + retrievePercent(x.entryId); + + $(window).resize(() => { + retrievePercent(x.entryId); + }); + } +}); diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index cee84fa8..774f4539 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js @@ -31,25 +31,4 @@ function retrievePercent(id) { return true; } -function initFilters() { - // no display if filters not available - if ($('div').is('#filters')) { - $('#button_filters').show(); - $('.js-filters-action').sideNav({ edge: 'right' }); - $('#clear_form_filters').on('click', () => { - $('#filters input').val(''); - $('#filters :checked').removeAttr('checked'); - return false; - }); - } -} - -function initExport() { - // no display if export not available - if ($('div').is('#export')) { - $('#button_export').show(); - $('.js-export-action').sideNav({ edge: 'right' }); - } -} - -export { savePercent, retrievePercent, initFilters, initExport }; +export { savePercent, retrievePercent }; diff --git a/app/Resources/static/themes/baggy/css/article.scss b/app/Resources/static/themes/baggy/css/article.scss new file mode 100644 index 00000000..9094ad55 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/article.scss @@ -0,0 +1,165 @@ + +#article { + width: 70%; + margin-bottom: 3em; + text-align: justify; + + .tags { + margin-bottom: 1em; + } + + i { + font-style: normal; + } + + h1 { + text-align: left; + } + + h2::after { + content: none; + } + + h2, + h3, + h4 { + text-transform: none; + } +} + +blockquote { + border: 1px solid #999; + background-color: #fff; + padding: 1em; + margin: 0; +} + +.topPosF { + position: fixed; + right: 20%; + bottom: 2em; + font-size: 1.5em; +} + +#article_toolbar { + margin-bottom: 1em; + + li { + display: inline-block; + margin: 3px auto; + } + + a { + background-color: #000; + padding: 0.3em 0.5em 0.2em; + color: #fff; + text-decoration: none; + + &:hover, + &:focus { + background-color: #999; + } + } +} + +#nav-btn-add-tag { + cursor: pointer; +} + +.shaarli::before { + content: "*"; +} + +.return { + text-decoration: none; + margin-top: 1em; + display: block; +} + +.return::before { + margin-right: 0.5em; +} + +.notags { + font-style: italic; + color: #999; +} + +.icon-rss { + background-color: #000; + color: #fff; + padding: 0.2em 0.5em; + + &::before { + position: relative; + top: 2px; + } +} + +.list-tags { + li { + margin-bottom: 0.5em; + } + + .icon-rss:hover, + .icon-rss:focus { + background-color: #fff; + color: #000; + text-decoration: none; + } + + a { + text-decoration: none; + + &:hover, + &:focus { + text-decoration: underline; + } + } +} + +pre code { + font-family: "Courier New", Courier, monospace; +} + +#filters { + position: fixed; + width: 20%; + height: 100%; + top: 0; + right: 0; + background-color: #fff; + padding: 30px 30px 15px 15px; + border-left: 1px #333 solid; + z-index: 12; + min-width: 300px; + + form .filter-group { + margin: 5px; + } +} + +#download-form { + position: fixed; + width: 10%; + height: 100%; + top: 0; + right: 0; + background-color: #fff; + padding: 30px 30px 15px 15px; + border-left: 1px #333 solid; + z-index: 12; + min-width: 200px; + + li { + display: block; + padding: 0.5em 2em 0.5em 1em; + color: #fff; + position: relative; + text-transform: uppercase; + text-decoration: none; + font-weight: 400; + font-family: PT Sans, sans-serif; + transition: all 0.5s ease; + } +} diff --git a/app/Resources/static/themes/baggy/css/font.css b/app/Resources/static/themes/baggy/css/font.css deleted file mode 100755 index 47edcb83..00000000 --- a/app/Resources/static/themes/baggy/css/font.css +++ /dev/null @@ -1,6 +0,0 @@ -@font-face { - font-family: "PT Sans"; - font-style: normal; - font-weight: 700; - src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/ptsansbold.woff") format("woff"); -} diff --git a/app/Resources/static/themes/baggy/css/guide.scss b/app/Resources/static/themes/baggy/css/guide.scss new file mode 100644 index 00000000..afb47c4a --- /dev/null +++ b/app/Resources/static/themes/baggy/css/guide.scss @@ -0,0 +1,263 @@ + +::selection { + color: #fff; + background-color: #000; +} + +.desktopHide { + display: none; +} + +.logo { + position: fixed; + z-index: 20; + top: 0.4em; + left: 0.6em; +} + +h2, +h3, +h4 { + font-family: "PT Sans", sans-serif; + text-transform: uppercase; +} + +p, +li, +label { + color: #666; +} + +a { + color: #000; + font-weight: bold; + + &.nostyle { + text-decoration: none; + } + + &:hover, + &:focus { + text-decoration: none; + } +} + +form fieldset { + border: 0; + padding: 0; + margin: 0; +} + +form input[type="text"], +form input[type="number"], +select, +form input[type="password"], +form input[type="url"], +form input[type="email"] { + border: 1px solid #999; + padding: 0.5em 1em; + min-width: 12em; + color: #666; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { + -webkit-appearance: none; + border-radius: 0; + background: #fff url("../../_global/img/bg-select.png") no-repeat right center; + } +} + +.inline { + .row { + display: inline-block; + margin-right: 0.5em; + } + + label { + min-width: 6em; + } +} + +fieldset label { + display: inline-block; + min-width: 12.5em; + color: #666; +} + +label { + margin-right: 0.5em; +} + +form .row { + margin-bottom: 0.5em; +} + +form button, +input[type="submit"] { + cursor: pointer; + background-color: #000; + color: #fff; + padding: 0.5em 1em; + display: inline-block; + border: 1px solid #000; +} + +form button:hover, +form button:focus, +input[type="submit"]:hover, +input[type="submit"]:focus { + background-color: #fff; + color: #000; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} + +#bookmarklet { + cursor: move; +} + +h2::after { + content: ""; + height: 4px; + width: 20%; + background-color: #000; + display: block; +} + +.links { + padding: 0; + margin: 0; + + li { + list-style: none; + margin: 0; + padding: 0; + } +} + +#links { + position: fixed; + top: 0; + width: 10em; + left: 0; + text-align: right; + background-color: #333; + padding-top: 9.5em; + height: 100%; + box-shadow: inset -4px 0 20px rgba(0, 0, 0, 0.6); + z-index: 15; + + > li > a { + display: block; + padding: 0.5em 2em 0.5em 1em; + color: #fff; + position: relative; + text-transform: uppercase; + text-decoration: none; + font-weight: normal; + font-family: "PT Sans", sans-serif; + transition: all 0.5s ease; + + &:hover, + &:focus { + background-color: #999; + color: #000; + } + } + + .current::after { + content: ""; + width: 0; + height: 0; + position: absolute; + border: 10px solid transparent; + border-right-color: #eee; + right: 0; + top: 50%; + margin-top: -10px; + } + + li:last-child { + position: fixed; + bottom: 1em; + width: 10em; + + a::before { + font-size: 1.2em; + position: relative; + top: 2px; + } + } +} + +#main { + margin-left: 12em; + position: relative; + z-index: 10; + padding-right: 5%; + padding-bottom: 1em; +} + +#sort { + padding: 0; + list-style-type: none; + opacity: 0.5; + display: inline-block; + + li { + display: inline; + font-size: 0.9em; + + & + li { + margin-left: 10px; + } + } + + a { + padding: 2px 2px 0; + vertical-align: middle; + } + + img { + vertical-align: baseline; + + :hover { + cursor: pointer; + } + } +} + +#display-mode { + float: right; + margin-top: 10px; + margin-bottom: 10px; + opacity: 0.5; +} + +#listmode { + width: 16px; + display: inline-block; + text-decoration: none; + + &.tablemode { + background: url("../../_global/img/table.png") no-repeat bottom; + } + + .listmode { + background: url("../../_global/img/list.png") no-repeat bottom; + } +} + +#warning_message { + position: fixed; + background-color: #ff6347; + z-index: 1000; + bottom: 0; + left: 0; + width: 100%; + color: #000; +} diff --git a/app/Resources/static/themes/baggy/css/index.scss b/app/Resources/static/themes/baggy/css/index.scss new file mode 100644 index 00000000..e7a11963 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/index.scss @@ -0,0 +1,13 @@ +/* Style */ +@import 'guide'; +@import 'layout'; +@import 'article'; +@import 'pictos'; +@import 'login'; +@import 'save'; +@import 'messages'; + +/* Tools */ +@import 'media_queries'; +@import 'print'; +@import 'ratatouille'; diff --git a/app/Resources/static/themes/baggy/css/layout.scss b/app/Resources/static/themes/baggy/css/layout.scss new file mode 100644 index 00000000..cb14e62d --- /dev/null +++ b/app/Resources/static/themes/baggy/css/layout.scss @@ -0,0 +1,300 @@ +#content { + margin-top: 2em; + min-height: 30em; +} + +footer { + text-align: right; + position: relative; + bottom: 0; + right: 5em; + color: #999; + font-size: 0.8em; + font-style: italic; + z-index: 20; + + a { + color: #999; + font-weight: normal; + } +} + +.list-entries { + letter-spacing: -5px; +} + +.listmode.entry { + width: 100%; + height: inherit; +} + +.card-entry-tags { + max-height: 2em; + overflow-y: hidden; + padding: 0; + margin: 0; +} + +.card-entry-tags li, +.card-entry-tags span { + display: inline-block; + margin: 0 5px; + padding: 5px 12px; + background-color: rgba(0, 0, 0, 0.6); + border-radius: 3px; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; +} + +.card-entry-tags a, +.card-entry-labels a { + text-decoration: none; + font-weight: normal; + color: #fff; +} + +.nav-panel-add-tag { + margin-top: 10px; +} + +.list-entries + .results { + margin-bottom: 2em; +} + +.reading-time, +.created-at { + color: #999; + font-style: italic; + font-weight: normal; + font-size: 0.9em; +} + +.estimatedTime small { + position: relative; + top: -1px; +} + +.entry { + background-color: #fff; + letter-spacing: normal; + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + display: inline-block; + width: 32%; + margin-bottom: 1.5em; + vertical-align: top; + margin-right: 1%; + position: relative; + overflow: hidden; + padding: 1.5em 0 3em; + height: 440px; + + img.preview { + width: 100%; + object-fit: cover; + height: 100%; + } + + &::before { + content: ""; + width: 0; + height: 0; + border: 10px solid transparent; + border-bottom-color: #000; + position: absolute; + bottom: 0.7em; + z-index: 10; + right: 1.5em; + transition: all 0.5s ease; + } + + &::after { + content: ""; + position: absolute; + height: 7px; + width: 100%; + bottom: 0; + left: 0; + background-color: #000; + transition: all 0.5s ease; + } + + &:hover { + box-shadow: 0 3px 10px rgba(0, 0, 0, 1); + + &::after { + height: 40px; + } + + &::before { + bottom: 2.3em; + } + + h2 a { + color: #666; + } + + .tools { + bottom: 0; + } + } + + h2 { + text-transform: none; + margin-bottom: 0; + line-height: 1.2; + margin-left: 5px; + } + + &::after { + content: none; + } + + a { + display: block; + text-decoration: none; + color: #000; + word-wrap: break-word; + transition: all 0.5s ease; + } + + p { + color: #666; + font-size: 0.9em; + line-height: 1.7; + margin: 5px 5px auto; + } + + h2 a::first-letter { + text-transform: uppercase; + } + + .tools { + position: absolute; + bottom: -40px; + left: 0; + background: #000; + width: 100%; + z-index: 10; + padding-right: 0.5em; + text-align: right; + transition: all 0.5s ease; + + a { + color: #666; + text-decoration: none; + display: block; + padding: 0.4em; + + &:hover { + color: #fff; + } + } + + li { + display: inline-block; + margin-top: 10px; + } + + li:first-child { + float: left; + font-size: 0.9em; + max-width: calc(100% - 40px * 4); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + max-height: 2em; + margin-left: 10px; + } + } + + .card-entry-labels { + position: absolute; + top: 100px; + left: -1em; + z-index: 90; + max-width: 50%; + padding-left: 0; + + li { + margin: 10px 10px 10px auto; + padding: 5px 12px 5px 25px; + background-color: rgba(0, 0, 0, 0.6); + border-radius: 0 3px 3px 0; + color: #fff; + cursor: default; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + a { + color: #fff; + } + } + } +} + +.entry:nth-child(3n+1) { + margin-left: 0; +} + +.results { + letter-spacing: -5px; + padding: 0 0 0.5em; + + > * { + display: inline-block; + vertical-align: top; + letter-spacing: normal; + width: 50%; + text-align: right; + } +} + +div.pagination ul { + text-align: right; +} + +.nb-results { + text-align: left; + font-style: italic; + color: #999; + display: inline-flex; +} + +div.pagination ul { + a { + color: #999; + text-decoration: none; + + &:hover, + &:focus { + text-decoration: underline; + } + } + + > * { + display: inline-block; + margin-left: 0.5em; + } + + .prev.disabled, + .next.disabled { + display: none; + } + + .current { + height: 25px; + padding: 4px 8px; + border: 1px solid #d5d5d5; + text-decoration: none; + font-weight: bold; + color: #000; + background-color: #ccc; + } +} + +.hide { + display: none; +} diff --git a/app/Resources/static/themes/baggy/css/login.scss b/app/Resources/static/themes/baggy/css/login.scss new file mode 100644 index 00000000..312df670 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/login.scss @@ -0,0 +1,26 @@ +.login { + background-color: #333; + + #main { + padding: 0; + margin: 0; + } + + form { + background-color: #fff; + padding: 1.5em; + box-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); + width: 20em; + position: absolute; + top: 8em; + left: 50%; + margin-left: -10em; + } + + .logo { + position: absolute; + top: 2em; + left: 50%; + margin-left: -55px; + } +} diff --git a/app/Resources/static/themes/baggy/css/media_queries.scss b/app/Resources/static/themes/baggy/css/media_queries.scss new file mode 100755 index 00000000..c33db0b3 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/media_queries.scss @@ -0,0 +1,172 @@ + +@media screen and (max-width: 1050px) { + .entry { + width: 49%; + } + + .entry:nth-child(3n+1) { + margin-left: 1.5%; + } + + .entry:nth-child(2n+1) { + margin-left: 0; + } +} + +@media screen and (max-width: 900px) { + #article { + width: 80%; + } + + .topPosF { + right: 2.5em; + } +} + +@media screen and (max-width: 700px) { + .entry { + width: 100%; + margin-left: 0; + } + + #display-mode { + display: none; + } +} + +@media screen and (max-height: 770px) { + .menu.users, + .menu.internal, + .menu.developer { + display: none; + } +} + +@media screen and (max-width: 500px) { + .entry { + width: 100%; + margin-left: 0; + } + + body > header { + background-color: #333; + position: fixed; + top: 0; + width: 100%; + height: 3em; + z-index: 11; + } + + #links li:last-child { + position: static; + width: auto; + } + + #links li:last-child a::before { + content: none; + } + + .logo { + width: 1.25em; + height: 1.25em; + left: 0; + top: 0; + } + + .login > header { + position: static; + } + + .login form { + width: 100%; + position: static; + margin-left: 0; + } + + .login .logo { + height: auto; + top: 0.5em; + width: 75px; + margin-left: -37.5px; + } + + .desktopHide { + display: block; + position: fixed; + z-index: 20; + top: 0; + right: 0; + border: 0; + width: 2.5em; + height: 2.5em; + cursor: pointer; + background-color: #999; + font-size: 1.2em; + } + + .desktopHide:hover, + .desktopHide:focus { + background-color: #fff; + } + + #links { + display: none; + width: 100%; + height: auto; + padding-top: 3em; + } + + #links.menu--open { + display: block; + } + + footer { + position: static; + margin-right: 3em; + } + + #main { + margin-left: 1.5em; + padding-right: 1.5em; + position: static; + margin-top: 3em; + } + + .card-entry-labels { + display: none; + } + + #article_toolbar .topPosF { + display: none; + } + + #article { + width: 100%; + } + + #article h1 { + font-size: 1.5em; + } + + #article_toolbar a { + padding: 0.3em 0.4em 0.2em; + } + + #display-mode { + display: none; + } + + .popup-form, + #bagit-form, + #search-form { + left: 0; + width: 100%; + border-left: none; + } + + .popup-form form, + #bagit-form form, + #search-form form { + width: 100%; + } +} diff --git a/app/Resources/static/themes/baggy/css/messages.css b/app/Resources/static/themes/baggy/css/messages.css deleted file mode 100755 index bfaf1448..00000000 --- a/app/Resources/static/themes/baggy/css/messages.css +++ /dev/null @@ -1,19 +0,0 @@ -.messages.error.install { - border: 1px solid #c42608; - color: #c00 !important; - background: #fff0ef; - text-align: left; -} - -.messages.notice.install { - border: 1px solid #ebcd41; - color: #000; - background: #fffcd3; - text-align: left; -} - -.messages.success.install { - border: 1px solid #6dc70c; - background: #e0fbcc !important; - text-align: left; -} diff --git a/app/Resources/static/themes/baggy/css/messages.scss b/app/Resources/static/themes/baggy/css/messages.scss new file mode 100755 index 00000000..a388419e --- /dev/null +++ b/app/Resources/static/themes/baggy/css/messages.scss @@ -0,0 +1,50 @@ +/* ========================================================================== + Messages + ========================================================================== */ + +.messages { + text-align: left; + width: 60%; + margin: auto 17%; + + > * { + display: inline-block; + } + + .install { + text-align: left; + + &.error { + border: 1px solid #c42608; + color: #c00 !important; + background: #fff0ef; + } + + &.notice { + border: 1px solid #ebcd41; + color: #000; + background: #fffcd3; + } + + &.success { + border: 1px solid #6dc70c; + background: #e0fbcc !important; + } + } +} + +.warning { + font-weight: bold; + display: block; + width: 100%; +} + +.more-info { + font-size: 0.85em; + line-height: 1.5; + color: #aaa; + + a { + color: #aaa; + } +} diff --git a/app/Resources/static/themes/baggy/css/pictos.scss b/app/Resources/static/themes/baggy/css/pictos.scss new file mode 100644 index 00000000..2ff01937 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/pictos.scss @@ -0,0 +1,210 @@ +/* ========================================================================== + Pictos + ========================================================================== */ + +@font-face { + font-family: icomoon; + src: url('~icomoon-free-npm/Font/IcoMoon-Free.ttf'); + font-weight: normal; + font-style: normal; +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 1em; /* Preferred icon size */ + width: 1em; + height: 1em; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; + + .md-18 { font-size: 18px; } + .md-24 { font-size: 24px; } + .md-36 { font-size: 36px; } + .md-48 { font-size: 48px; } + + .vertical-align-middle { + vertical-align: middle !important; + } +} + +.icon span, +.icon-image span { + position: absolute; + top: -9999px; +} + +[class^="icon-"]::before, +[class*=" icon-"]::before { + font-family: icomoon; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Enable Ligatures ================ */ + letter-spacing: 0; + -webkit-font-feature-settings: "liga"; + -moz-font-feature-settings: "liga=1"; + -moz-font-feature-settings: "liga"; + -ms-font-feature-settings: "liga" 1; + -o-font-feature-settings: "liga"; + font-feature-settings: "liga"; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-flattr::before { + content: "\ead4"; +} + +.icon-mail::before { + content: "\ea86"; +} + +.icon-up-open::before { + content: "\e80b"; +} + +.icon-star::before { + content: "\e9d9"; +} + +.icon-check::before { + content: "\ea10"; +} + +.icon-link::before { + content: "\e9cb"; +} + +.icon-reply::before { + content: "\e806"; +} + +.icon-menu::before { + content: "\e9bd"; +} + +.icon-clock::before { + content: "\e803"; +} + +.icon-twitter::before { + content: "\ea96"; +} + +.icon-down-open::before { + content: "\e809"; +} + +.icon-trash::before { + content: "\e9ac"; +} + +.icon-delete::before { + content: "\ea0d"; +} + +.icon-power::before { + content: "\ea14"; +} + +.icon-arrow-up-thick::before { + content: "\ea3a"; +} + +.icon-rss::before { + content: "\e808"; +} + +.icon-print::before { + content: "\e954"; +} + +.icon-reload::before { + content: "\ea2e"; +} + +.icon-price-tags::before { + content: "\e936"; +} + +.icon-eye::before { + content: "\e9ce"; +} + +.icon-no-eye::before { + content: "\e9d1"; +} + +.icon-calendar::before { + content: "\e953"; +} + +.icon-time::before { + content: "\e952"; +} + +/* .icon-image class, for image-based icons + ========================================================================== */ + +.icon-image { + background: no-repeat center/80%; + padding-right: 1em !important; + padding-left: 1em !important; +} + +/* Carrot (http://carrot.org) */ +.icon-image--carrot { + background-image: url("../../_global/img/icons/carrot-icon--white.png"); +} + +/* Diaspora */ +.icon-image--diaspora { + background-image: url("../../_global/img/icons/Diaspora-asterisk.svg"); +} + +/* Unmark.it */ +.icon-image--unmark { + background-image: url("../../_global/img/icons/unmark-icon--black.png"); +} + +/* shaarli */ +.icon-image--shaarli { + background-image: url("../../_global/img/icons/shaarli.png"); +} + +/* ========================================================================== + Icon selected + ========================================================================== */ + +.icon-star.fav::before { + color: #fff; +} + +.icon-check.archive::before { + color: #fff; +} diff --git a/app/Resources/static/themes/baggy/css/print.css b/app/Resources/static/themes/baggy/css/print.css deleted file mode 100755 index f7f6a8ad..00000000 --- a/app/Resources/static/themes/baggy/css/print.css +++ /dev/null @@ -1,66 +0,0 @@ -@media print { - /* ### Layout ### */ - - body { - font-family: Serif; - background-color: #fff; - } - - @page { - margin: 1cm; - } - - img { - max-width: 100% !important; - } - - /* ### Content ### */ - - /* Hide useless blocks */ - body > header, - #article_toolbar, - #links, - #sort, - body > footer, - .top_link, - div.tools, - header div, - .messages, - .entrie + .results, - #article .mbm a, - #article-informations { - display: none !important; - } - - article { - border: none !important; - } - - /* Add URL after links */ - .vieworiginal a::after { - content: " (" attr(href) ")"; - } - - /* Add explanation after abbr */ - abbr[title]::after { - content: " (" attr(title) ")"; - } - - /* Change border on current pager item */ - .pagination span.current { - border-style: dashed; - } - - #main { - width: 100%; - padding: 0; - margin: 0; - margin-left: 0; - padding-right: 0; - padding-bottom: 0; - } - - #article { - width: 100%; - } -} diff --git a/app/Resources/static/themes/baggy/css/print.scss b/app/Resources/static/themes/baggy/css/print.scss new file mode 100755 index 00000000..a63f62e9 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/print.scss @@ -0,0 +1,63 @@ +@media print { + /* ### Layout ### */ + + body { + font-family: Serif; + background-color: #fff; + } + + @page { + margin: 1cm; + } + + img { + max-width: 100% !important; + } + + /* ### Content ### */ + + /* Hide useless blocks */ + body > .logo, + #article_toolbar, + #links, + #sort, + body > footer, + .top_link, + div.tools, + header div, + .messages, + .entrie + .results, + #article .mbm a, + #article-informations { + display: none !important; + } + + article { + border: none !important; + } + + /* Add URL after links */ + .vieworiginal a::after { + content: " (" attr(href) ")"; + } + + /* Add explanation after abbr */ + abbr[title]::after { + content: " (" attr(title) ")"; + } + + /* Change border on current pager item */ + .pagination span.current { + border-style: dashed; + } + + #main { + width: 100%; + margin: 0; + padding: 0; + } + + #article { + width: 100%; + } +} diff --git a/app/Resources/static/themes/baggy/css/ratatouille.css b/app/Resources/static/themes/baggy/css/ratatouille.css deleted file mode 100644 index a6167f34..00000000 --- a/app/Resources/static/themes/baggy/css/ratatouille.css +++ /dev/null @@ -1,226 +0,0 @@ -/* - Ratatouille mini Framework css by Thomas LEBEAU - Base on KNACSS => www.KNACSS.com (2013-10) @author: Raphael Goetter, Alsacreations - and normalize.css -*/ - -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -body { - font-size: 1em; - line-height: 1.5; - margin: 0; -} - -/* ========================================================================== - Mise en forme - ========================================================================== */ - -h1:first-child, -h2:first-child, -h3:first-child, -h4:first-child, -h5:first-child, -h6:first-child, -p:first-child, -ul:first-child, -ol:first-child, -dl:first-child { - margin-top: 0; -} - -code, -kbd, -pre, -samp { - font-family: monospace, serif; -} - -pre { - white-space: pre-wrap; -} - -.upper { - text-transform: uppercase; -} - -.bold { - font-weight: bold; -} - -.inner { - margin: 0 auto; - max-width: 61.25em; /* 980px */ -} - -table, -img, -figure { - max-width: 100%; - height: auto; -} - -iframe { - max-width: 100%; -} - -.fl { - float: left; -} - -.fr { - float: right; -} - -table { - border-collapse: collapse; -} - -figure { - margin: 0; -} - -button, -input, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0; -} - -input[type="search"] { - -webkit-appearance: textfield; -} - -/* ========================================================================== - Mise en page - ========================================================================== */ - -.dib { - display: inline-block; - vertical-align: middle; -} - -.dnone { - display: none; -} - -.dtable { - display: table; -} - -.dtable > * { - display: table-row; -} - -.dtable > * > * { - display: table-cell; -} - -.element-invisible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -.small { - font-size: 0.8em; -} - -.big { - font-size: 1.2em; -} - -/* Width */ - -.w100 { - width: 100%; -} - -.w90 { - width: 90%; -} - -.w80 { - width: 80%; -} - -.w70 { - width: 70%; -} - -.w60 { - width: 60%; -} - -.w50 { - width: 50%; -} - -.w40 { - width: 40%; -} - -.w30 { - width: 30%; -} - -.w20 { - width: 20%; -} - -.w10 { - width: 10%; -} - -/* ========================================================================== - Internet Explorer - ========================================================================== */ - -/* IE8 and IE9 */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -/* IE8 and IE9 */ - -audio, -canvas, -video { - display: inline-block; -} - -@media screen and (-webkit-min-device-pixel-ratio: 0) { - select { - -webkit-appearance: none; - border-radius: 0; - } -} diff --git a/app/Resources/static/themes/baggy/css/ratatouille.scss b/app/Resources/static/themes/baggy/css/ratatouille.scss new file mode 100644 index 00000000..a6167f34 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/ratatouille.scss @@ -0,0 +1,226 @@ +/* + Ratatouille mini Framework css by Thomas LEBEAU + Base on KNACSS => www.KNACSS.com (2013-10) @author: Raphael Goetter, Alsacreations + and normalize.css +*/ + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +body { + font-size: 1em; + line-height: 1.5; + margin: 0; +} + +/* ========================================================================== + Mise en forme + ========================================================================== */ + +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child, +p:first-child, +ul:first-child, +ol:first-child, +dl:first-child { + margin-top: 0; +} + +code, +kbd, +pre, +samp { + font-family: monospace, serif; +} + +pre { + white-space: pre-wrap; +} + +.upper { + text-transform: uppercase; +} + +.bold { + font-weight: bold; +} + +.inner { + margin: 0 auto; + max-width: 61.25em; /* 980px */ +} + +table, +img, +figure { + max-width: 100%; + height: auto; +} + +iframe { + max-width: 100%; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +table { + border-collapse: collapse; +} + +figure { + margin: 0; +} + +button, +input, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0; +} + +input[type="search"] { + -webkit-appearance: textfield; +} + +/* ========================================================================== + Mise en page + ========================================================================== */ + +.dib { + display: inline-block; + vertical-align: middle; +} + +.dnone { + display: none; +} + +.dtable { + display: table; +} + +.dtable > * { + display: table-row; +} + +.dtable > * > * { + display: table-cell; +} + +.element-invisible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.small { + font-size: 0.8em; +} + +.big { + font-size: 1.2em; +} + +/* Width */ + +.w100 { + width: 100%; +} + +.w90 { + width: 90%; +} + +.w80 { + width: 80%; +} + +.w70 { + width: 70%; +} + +.w60 { + width: 60%; +} + +.w50 { + width: 50%; +} + +.w40 { + width: 40%; +} + +.w30 { + width: 30%; +} + +.w20 { + width: 20%; +} + +.w10 { + width: 10%; +} + +/* ========================================================================== + Internet Explorer + ========================================================================== */ + +/* IE8 and IE9 */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/* IE8 and IE9 */ + +audio, +canvas, +video { + display: inline-block; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { + -webkit-appearance: none; + border-radius: 0; + } +} diff --git a/app/Resources/static/themes/baggy/css/save.scss b/app/Resources/static/themes/baggy/css/save.scss new file mode 100644 index 00000000..ade77b40 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/save.scss @@ -0,0 +1,115 @@ +/* ========================================================================== + "save a link" related styles + ========================================================================== */ + +.popup-form { + background: rgba(0, 0, 0, 0.5); + position: absolute; + top: 0; + left: 10em; + z-index: 20; + height: 100%; + width: 100%; + margin: 0; + margin-top: -30% !important; + padding: 2em; + display: none; + border-left: 1px #eee solid; + + form { + background-color: #fff; + position: absolute; + top: 0; + left: 0; + z-index: 20; + border: 10px solid #000; + width: 400px; + height: 200px; + padding: 2em; + } +} + +#bagit-form-form .addurl { + margin-left: 0; +} + +.closeMessage, +.close-button { + background-color: #000; + color: #fff; + font-size: 1.2em; + line-height: 1.6; + width: 1.6em; + height: 1.6em; + text-align: center; + text-decoration: none; + + &:hover, + &:focus { + background-color: #999; + color: #000; + } +} + +.close-button--popup { + display: inline-block; + position: absolute; + top: 0; + right: 0; + font-size: 1.4em; +} + +.active-current { + background-color: #999; + + &::after { + content: ""; + width: 0; + height: 0; + position: absolute; + border: 10px solid transparent; + border-right-color: #eee; + right: 0; + top: 50%; + margin-top: -10px; + } +} + +.opacity03 { + opacity: 0.3; +} + +.add-to-wallabag-link-after { + background-color: #000; + color: #fff; + padding: 0 3px 2px; +} + +a.add-to-wallabag-link-after { + visibility: hidden; + position: absolute; + opacity: 0; + transition-duration: 2s; + transition-timing-function: ease-out; +} + +#article article a:hover + a.add-to-wallabag-link-after, +a.add-to-wallabag-link-after:hover { + opacity: 1; + visibility: visible; + transition-duration: 0.3s; + transition-timing-function: ease-in; +} + +a.add-to-wallabag-link-after::after { + content: "w"; +} + +#add-link-result { + font-weight: bold; + font-size: 0.9em; +} + +.btn-clickable { + cursor: pointer; +} diff --git a/app/Resources/static/themes/baggy/font/icomoon.eot b/app/Resources/static/themes/baggy/font/icomoon.eot deleted file mode 100644 index 248758fb..00000000 Binary files a/app/Resources/static/themes/baggy/font/icomoon.eot and /dev/null differ diff --git a/app/Resources/static/themes/baggy/font/icomoon.svg b/app/Resources/static/themes/baggy/font/icomoon.svg deleted file mode 100644 index b1b9c92a..00000000 --- a/app/Resources/static/themes/baggy/font/icomoon.svg +++ /dev/null @@ -1,501 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/Resources/static/themes/baggy/font/icomoon.ttf b/app/Resources/static/themes/baggy/font/icomoon.ttf deleted file mode 100644 index c03770c6..00000000 Binary files a/app/Resources/static/themes/baggy/font/icomoon.ttf and /dev/null differ diff --git a/app/Resources/static/themes/baggy/font/icomoon.woff b/app/Resources/static/themes/baggy/font/icomoon.woff deleted file mode 100644 index 121e0bdd..00000000 Binary files a/app/Resources/static/themes/baggy/font/icomoon.woff and /dev/null differ diff --git a/app/Resources/static/themes/baggy/index.js b/app/Resources/static/themes/baggy/index.js new file mode 100755 index 00000000..5d448018 --- /dev/null +++ b/app/Resources/static/themes/baggy/index.js @@ -0,0 +1,267 @@ +import $ from 'jquery'; + +/* Global imports */ +import '../_global/index'; + +/* Shortcuts */ +import './js/shortcuts/main'; +import './js/shortcuts/entry'; + +/* Tools */ +import toggleSaveLinkForm from './js/uiTools'; + +/* Theme style */ +import './css/index.scss'; + +$(document).ready(() => { + /* ========================================================================== + Menu + ========================================================================== */ + + $('#menu').click(() => { + $('#links').toggleClass('menu--open'); + const content = $('#content'); + if (content.hasClass('opacity03')) { + content.removeClass('opacity03'); + } + }); + + /* ========================================================================== + Add tag panel + ========================================================================== */ + + $('#nav-btn-add-tag').on('click', () => { + $('.baggy-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); + + /** + * Filters & Export + */ + // no display if filters not available + if ($('div').is('#filters')) { + $('#button_filters').show(); + $('#clear_form_filters').on('click', () => { + $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); + return false; + }); + } + + /** + * Close window after adding entry if popup + */ + const currentUrl = window.location.href; + if (currentUrl.match('&closewin=true')) { + window.close(); + } + + /** + if ($('article').size() > 0) { + const waypoint = new Waypoint({ + element: $('.wallabag-title').get(0), + handler: (direction) => { + console.log(direction); + if (direction === 'down') { + $('aside.tags').fadeIn('slow'); + } else { + $('aside.tags').fadeOut('slow'); + } + }, + offset: 250, + }); + } + */ + + /** + * Tags autocomplete + */ + /** + * Not working on v2 + * + + $('#value').bind('keydown', (event) => { + if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { + event.preventDefault(); + } + }).autocomplete({ + source: function source(request, response) { + $.getJSON('./?view=tags', { + term: extractLast(request.term), + //id: $(':hidden#entry_id').val() + }, response); + }, + search: function search() { + // custom minLength + const term = extractLast(this.value); + return term.length >= 1; + }, + focus: function focus() { + // prevent value inserted on focus + return false; + }, + select: function select(event, ui) { + const 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(', '); + return false; + }, + }); + */ + + //--------------------------------------------------------------------------- + // Close the message box when the user clicks the close icon + //--------------------------------------------------------------------------- + $('a.closeMessage').on('click', () => { + $(this).parents('div.messages').slideUp(300, () => { $(this).remove(); }); + return false; + }); + + $('#search-form').hide(); + $('#bagit-form').hide(); + $('#filters').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 'Filter' popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $('#filters').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'); + } + } + + //--------------------------------------------------------------------------- + // 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(() => { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); + + $('.filter-btn').click(() => { + closePopups(); + toggleFilter(); + }); + + $('.download-btn').click(() => { + closePopups(); + toggleDownload(); + }); + + $('#bagit').click(() => { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); + + $('#search-form-close').click(() => { + toggleSearch(); + }); + + $('#filter-form-close').click(() => { + toggleFilter(); + }); + + $('#download-form-close').click(() => { + toggleDownload(); + }); + + $('#bagit-form-close').click(() => { + toggleBagit(); + }); + + const bagitFormForm = $('#bagit-form-form'); + + /* ========================================================================== + bag it link and close button + ========================================================================== */ + + // send 'bag it link' form request via ajax + bagitFormForm.submit((event) => { + $('body').css('cursor', 'wait'); + $('#add-link-result').empty(); + + $.ajax({ + type: bagitFormForm.attr('method'), + url: bagitFormForm.attr('action'), + data: bagitFormForm.serialize(), + success: function success() { + $('#add-link-result').html('Done!'); + $('#plainurl').val('').blur(''); + $('body').css('cursor', 'auto'); + }, + error: function error() { + $('#add-link-result').html('Failed!'); + $('body').css('cursor', 'auto'); + }, + }); + + event.preventDefault(); + }); + + /* ========================================================================== + Process all links inside an article + ========================================================================== */ + + $('article a[href^="http"]').after( + () => `', + ); + + $('.add-to-wallabag-link-after').click((event) => { + toggleSaveLinkForm($(this).attr('href'), event); + event.preventDefault(); + }); +}); diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js deleted file mode 100755 index 05360a28..00000000 --- a/app/Resources/static/themes/baggy/js/init.js +++ /dev/null @@ -1,329 +0,0 @@ -/* jQuery */ -import $ from 'jquery'; - -/* eslint-disable no-unused-vars */ -/* jquery has default scope */ -import cookie from 'jquery.cookie'; -import ui from 'jquery-ui-browserify'; -/* eslint-enable no-unused-vars */ - -/* Annotations */ -import annotator from 'annotator'; - -/* Shortcuts */ -import './shortcuts/main'; -import './shortcuts/entry'; -import '../../_global/js/shortcuts/main'; -import '../../_global/js/shortcuts/entry'; - -/* Tools */ -import { savePercent, retrievePercent } from '../../_global/js/tools'; -import toggleSaveLinkForm from './uiTools'; - -global.jquery = $; - -$.fn.ready(() => { - const $listmode = $('#listmode'); - const $listentries = $('#list-entries'); - - /* ========================================================================== - Menu - ========================================================================== */ - - $('#menu').click(() => { - $('#links').toggleClass('menu--open'); - const content = $('#content'); - if (content.hasClass('opacity03')) { - content.removeClass('opacity03'); - } - }); - - /* ========================================================================== - List mode or Table Mode - ========================================================================== */ - - $listmode.click(() => { - if ($.cookie('listmode') === 1) { - // Cookie - $.removeCookie('listmode'); - - $listentries.removeClass('listmode'); - $listmode.removeClass('tablemode'); - $listmode.addClass('listmode'); - } else { - // Cookie - $.cookie('listmode', 1, { expires: 365 }); - - $listentries.addClass('listmode'); - $listmode.removeClass('listmode'); - $listmode.addClass('tablemode'); - } - }); - - /* ========================================================================== - Cookie listmode - ========================================================================== */ - - if ($.cookie('listmode') === 1) { - $listentries.addClass('listmode'); - $listmode.removeClass('listmode'); - $listmode.addClass('tablemode'); - } - - /* ========================================================================== - Add tag panel - ========================================================================== */ - - - $('#nav-btn-add-tag').on('click', () => { - $('.nav-panel-add-tag').toggle(100); - $('.nav-panel-menu').addClass('hidden'); - $('#tag_label').focus(); - return false; - }); - - /** - * Filters & Export - */ - // no display if filters not available - if ($('div').is('#filters')) { - $('#button_filters').show(); - $('#clear_form_filters').on('click', () => { - $('#filters input').val(''); - $('#filters :checked').removeAttr('checked'); - return false; - }); - } - - /* ========================================================================== - Annotations & Remember position - ========================================================================== */ - - if ($('article').length) { - const app = new annotator.App(); - - app.include(annotator.ui.main, { - element: document.querySelector('article'), - }); - - const x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); - - app.start().then(() => { - app.annotations.load({ entry: x.entryId }); - }); - - $(window).scroll(() => { - const scrollTop = $(window).scrollTop(); - const docHeight = $(document).height(); - const scrollPercent = (scrollTop) / (docHeight); - const scrollPercentRounded = Math.round(scrollPercent * 100) / 100; - savePercent(x.entryId, scrollPercentRounded); - }); - - retrievePercent(x.entryId); - - $(window).resize(() => { - retrievePercent(x.entryId); - }); - } - - /** - * Close window after adding entry if popup - */ - const currentUrl = window.location.href; - if (currentUrl.match('&closewin=true')) { - window.close(); - } - - /** - * Tags autocomplete - */ - /** - * Not working on v2 - * - - $('#value').bind('keydown', (event) => { - if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { - event.preventDefault(); - } - }).autocomplete({ - source: function source(request, response) { - $.getJSON('./?view=tags', { - term: extractLast(request.term), - //id: $(':hidden#entry_id').val() - }, response); - }, - search: function search() { - // custom minLength - const term = extractLast(this.value); - return term.length >= 1; - }, - focus: function focus() { - // prevent value inserted on focus - return false; - }, - select: function select(event, ui) { - const 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(', '); - return false; - }, - }); - */ - - //--------------------------------------------------------------------------- - // Close the message box when the user clicks the close icon - //--------------------------------------------------------------------------- - $('a.closeMessage').on('click', () => { - $(this).parents('div.messages').slideUp(300, () => { $(this).remove(); }); - return false; - }); - - $('#search-form').hide(); - $('#bagit-form').hide(); - $('#filters').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 'Filter' popup on entries list - //--------------------------------------------------------------------------- - function toggleFilter() { - $('#filters').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'); - } - } - - //--------------------------------------------------------------------------- - // 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(() => { - closePopups(); - toggleSearch(); - $('#searchfield').focus(); - }); - - $('.filter-btn').click(() => { - closePopups(); - toggleFilter(); - }); - - $('.download-btn').click(() => { - closePopups(); - toggleDownload(); - }); - - $('#bagit').click(() => { - closePopups(); - toggleBagit(); - $('#plainurl').focus(); - }); - - $('#search-form-close').click(() => { - toggleSearch(); - }); - - $('#filter-form-close').click(() => { - toggleFilter(); - }); - - $('#download-form-close').click(() => { - toggleDownload(); - }); - - $('#bagit-form-close').click(() => { - toggleBagit(); - }); - - const $bagitFormForm = $('#bagit-form-form'); - - /* ========================================================================== - bag it link and close button - ========================================================================== */ - - // send 'bag it link' form request via ajax - $bagitFormForm.submit((event) => { - $('body').css('cursor', 'wait'); - $('#add-link-result').empty(); - - $.ajax({ - type: $bagitFormForm.attr('method'), - url: $bagitFormForm.attr('action'), - data: $bagitFormForm.serialize(), - success: function success() { - $('#add-link-result').html('Done!'); - $('#plainurl').val(''); - $('#plainurl').blur(''); - $('body').css('cursor', 'auto'); - }, - error: function error() { - $('#add-link-result').html('Failed!'); - $('body').css('cursor', 'auto'); - }, - }); - - event.preventDefault(); - }); - - /* ========================================================================== - Process all links inside an article - ========================================================================== */ - - $('article a[href^="http"]').after( - () => `' - ); - - $('.add-to-wallabag-link-after').click((event) => { - toggleSaveLinkForm($(this).attr('href'), event); - event.preventDefault(); - }); -}); diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js index aed09aee..43ebf3be 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/main.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js @@ -1,3 +1,6 @@ +import $ from 'jquery'; +import Mousetrap from 'mousetrap'; + $(document).ready(() => { Mousetrap.bind('s', () => { $('#search').trigger('click'); diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss new file mode 100644 index 00000000..7d0bdac7 --- /dev/null +++ b/app/Resources/static/themes/material/css/article.scss @@ -0,0 +1,174 @@ +/* ========================================================================== + Article + ========================================================================== */ + +#article { + font-size: 20px; + margin: 0 auto; + max-width: 45em; + + article { + color: #424242; + font-size: 18px; + line-height: 1.7em; + + h1, + h2, + h3, + h4, + h5, + h6 { + color: #212121; + + strong { + font-weight: 500; + } + } + + h6 { + font-size: 1.2rem; + } + + h5 { + font-size: 1.6rem; + } + + h4 { + font-size: 1.9rem; + } + + h3 { + font-size: 2.2rem; + } + + h2 { + font-size: 2.5rem; + } + + h1 { + font-size: 2.7rem; + } + + a { + border-bottom: 1px dotted #03a9f4; + text-decoration: none; + } + + a:hover { + border-bottom-style: solid; + } + + ul { + padding-left: 30px; + } + + ul, + ul li { + list-style-type: disc; + } + + blockquote { + font-style: italic; + } + + strong { + font-weight: bold; + } + } + + img, + figure { + max-width: 100%; + height: auto; + } + + pre { + box-sizing: border-box; + margin: 0 0 1.75em; + border: #e3f2fd 1px solid; + width: 100%; + padding: 10px; + font-family: monospace; + font-size: 0.8em; + white-space: pre; + overflow: auto; + background: #f5f5f5; + border-radius: 3px; + } + + > header > h1 { + font-size: 2em; + margin: 2.1rem 0 0.68rem; + } + + aside { + .tools { + font-size: 0.8em; + display: flex; + flex-flow: row wrap; + margin: 0 auto; + + li { + display: inline-flex; + vertical-align: middle; + } + + a { + color: #000; + text-decoration: none; + } + } + + #list { + float: right; + margin: 0 15px 10px; + } + + .chip { + background-color: $blueAccentColor; + padding: 0 15px 0 10px; + margin: auto 2px; + + a, + i { + color: #fff; + } + } + } +} + +.reader-mode { + width: 95px !important; + transition: width 0.2s ease; + + .collapsible-body { + height: 0; + overflow: hidden; + } + + span { + opacity: 0; + transition: opacity 0.2s ease; + } +} + +.reader-mode:hover { + width: 240px !important; + + .collapsible-body { + height: auto; + } + + span { + opacity: 1; + } +} + +.progress { + position: fixed; + top: 0; + width: 100%; + height: 3px; + margin: 0; + z-index: 9999; +} diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss new file mode 100644 index 00000000..18ef6e60 --- /dev/null +++ b/app/Resources/static/themes/material/css/cards.scss @@ -0,0 +1,186 @@ +/* ========================================================================== + Cards + ========================================================================== */ + +main { + #content { + padding: 0 0.5rem; + } + + ul.row { + padding: 0 0.75rem; + } +} + +.data .card .card-body { + height: 19em; + overflow: hidden; +} + +.card { + .card-content .card-title, + .card-reveal .card-title { + line-height: 22.8px; + max-height: 80px; + font-size: 19px; + font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #313131; + } + + .card-content .activator, + .card-reveal .activator { + cursor: pointer; + font-family: "Material Icons"; + } + + .card-content i.right, + .card-reveal i.right { + margin-left: 0; + } + + .card-content .original { + line-height: 24px; + font-size: 15px; + } + + .card-entry-labels { + position: absolute; + top: 10px; + z-index: 90; + max-width: 50%; + } + + .card-entry-labels-hidden { + margin: 2.5px auto; + } + + .card-entry-labels-hidden li { + display: inline-block; + background-color: $blueAccentColor; + margin: 0 5px; + padding: 5px 12px; + border-radius: 3px; + color: #fff; + max-height: 2em; + max-width: calc(100% - 15px); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .card-entry-labels-hidden li { + display: inline-block; + background-color: $blueAccentColor; + margin: 0 5px; + padding: 5px 12px; + border-radius: 3px; + color: #fff; + max-height: 2em; + max-width: calc(100% - 15px); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .card-content .estimatedTime { + margin-bottom: 10px; + } + + .card-action { + padding: 10px 5px 10px 15px; + + ul.links { + margin: 0; + font-size: 24px; + line-height: 24px; + } + + a { + color: #fff; + margin: 0; + } + + a:hover { + color: #fff; + } + + ul.tools li a.tool { + margin-right: 5px !important; + } + + .reading-time { + display: inline-flex; + vertical-align: middle; + } + } + + .card-entry-labels li, + .card-tag-labels li { + margin: 10px 10px 10px auto; + padding: 5px 12px 5px 16px !important; + background-color: $blueAccentColor; + border-radius: 0 3px 3px 0; + color: #fff; + cursor: default; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .card-image { + height: 10em; + } + + .card-fullimage { + height: 13.5em; + } + + .card-image .preview, + .card-fullimage .preview { + height: 14em; + background: no-repeat 50%/cover; + } + + &.sw { + max-width: 370px; + margin-left: auto; + margin-right: auto; + } +} + +a.original { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; +} + +.card-entry-tags a, +.card-entry-labels a, +.card-tag-labels a, +.card-entry-labels-hidden a, +#list .chip a { + text-decoration: none; + font-weight: normal; + color: #fff; +} + +.card-stacked { + &:hover ul.tools-list { + display: block; + } + + ul.tools-list { + display: none; + } +} + +.quickstart .card .card-action a, +.quickstart .card .card-action a:hover { + color: #fff !important; +} + +.settings .div_tabs { + padding-bottom: 15px; +} diff --git a/app/Resources/static/themes/material/css/entries.scss b/app/Resources/static/themes/material/css/entries.scss new file mode 100644 index 00000000..b6a46a9e --- /dev/null +++ b/app/Resources/static/themes/material/css/entries.scss @@ -0,0 +1,87 @@ +/* ========================================================================== + * Entries + * ========================================================================== */ + +.results { + height: 1em; + + .nb-results, + .pagination { + margin: 15px 15px 0; + } + + .nb-results { + display: inline-flex; + } + + a { + color: #444; + } +} + +.pagination { + float: right; + + ul { + margin: 0 !important; + + .prev.disabled, + .next.disabled { + display: none; + } + } + + li { + padding: 0; + } + + a { + padding: 0 10px; + height: 30px; + display: block; + } + + .disabled { + margin-right: 10px; + margin-left: 10px; + } + + li.active span { + padding: 0 10px; + height: 30px; + display: block; + color: #fff; + } +} + +.page-footer .footer-copyright { + min-width: 50px; + height: auto !important; + line-height: 1em !important; + + p { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + } +} + +.hidden { + display: none; +} + +.picker__date-display { + display: none; +} + +footer { + &.page-footer { + margin-top: 10px; + padding-top: 0; + } + + .row { + margin-bottom: 10px; + } +} diff --git a/app/Resources/static/themes/material/css/filters.scss b/app/Resources/static/themes/material/css/filters.scss new file mode 100644 index 00000000..299dad3d --- /dev/null +++ b/app/Resources/static/themes/material/css/filters.scss @@ -0,0 +1,15 @@ +/* ========================================================================== + * Filters slider + * ========================================================================== */ + +#filters { + button { + padding: 0; + width: 100%; + } + + div.with-checkbox { + height: 3rem; + margin-top: 0; + } +} diff --git a/app/Resources/static/themes/material/css/fonts.scss b/app/Resources/static/themes/material/css/fonts.scss new file mode 100644 index 00000000..743f1a84 --- /dev/null +++ b/app/Resources/static/themes/material/css/fonts.scss @@ -0,0 +1,13 @@ +/* ========================================================================== + * Fonts + * ========================================================================== */ + +/** + * Icomoon + */ +@font-face { + font-family: icomoon; + src: url("~icomoon-free-npm/Font/IcoMoon-Free.ttf"); + font-weight: normal; + font-style: normal; +} diff --git a/app/Resources/static/themes/material/css/icons.scss b/app/Resources/static/themes/material/css/icons.scss new file mode 100644 index 00000000..268e6dca --- /dev/null +++ b/app/Resources/static/themes/material/css/icons.scss @@ -0,0 +1,185 @@ +/* ========================================================================== + * Icons + * ========================================================================== */ + +/** + * + * Material icons + * + */ +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + width: 1em; + height: 1em; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; + + .md-18 { + font-size: 18px; + } + + .md-24 { + font-size: 24px; + } + + .md-36 { + font-size: 36px; + } + + .md-48 { + font-size: 48px; + } + + .md-dark { + color: rgba(0, 0, 0, 0.54); + + .md-inactive { + color: rgba(0, 0, 0, 0.26); + } + } + + .md-light { + color: rgba(255, 255, 255, 1); + + .md-inactive { + color: rgba(255, 255, 255, 0.3); + } + } +} + +/** + * + * Icomoon icons + * + */ +[class^="icon-"]::before, +[class*=" icon-"]::before { + font-family: icomoon; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + background-size: 24px; + + /* Enable Ligatures ================ */ + letter-spacing: 0; + font-feature-settings: "liga"; +} + +.icon-eye::before { + content: "\e9ce"; +} + +.icon-no-eye::before { + content: "\e9d1"; +} + +.icon-calendar::before { + content: "\e953"; +} + +.icon-mail::before { + content: "\ea86"; +} + +.icon-time::before { + content: "\e952"; +} + +a.icon-image { + background-repeat: no-repeat; + padding-right: 0.4em !important; + padding-left: 1em !important; + margin-left: 25px; + + &::before { + content: ""; + display: block; + width: 24px; + height: 24px; + float: left; + margin: 0 6px 0 0; + } + + &.carrot::before { + background: url("../../_global/img/icons/carrot-icon--black.png") no-repeat center/90%; + } + + &.diaspora::before { + background: url("../../_global/img/icons/diaspora-icon--black.png") no-repeat center/80%; + } + + &.unmark::before { + background: url("../../_global/img/icons/unmark-icon--black.png") no-repeat center/80%; + } + + &.shaarli::before { + background: url("../../_global/img/icons/shaarli.png") no-repeat center/80%; + } +} + +.icon-google-plus2::before { + content: "\ea89"; +} + +.icon-facebook2::before { + content: "\ea8d"; +} + +.icon-twitter::before { + content: "\ea96"; +} + +.icon-apple::before { + content: "\eabf"; +} + +.icon-android::before { + content: "\eac1"; +} + +.icon-chrome::before { + content: "\eae5"; +} + +.icon-firefox::before { + content: "\eae6"; +} + +.icon-link::before { + content: "\e9cb"; +} + +footer [class^="icon-"], +footer [class*=" icon-"] { + font-size: 2em; + transition: text-shadow 0.2s ease; + padding-right: 10px; +} + +footer [class^="icon-"]:hover, +footer [class*=" icon-"]:hover { + text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); +} diff --git a/app/Resources/static/themes/material/css/index.scss b/app/Resources/static/themes/material/css/index.scss new file mode 100644 index 00000000..285a6504 --- /dev/null +++ b/app/Resources/static/themes/material/css/index.scss @@ -0,0 +1,17 @@ +@import 'variables'; + +/* Style */ +@import 'article'; +@import 'cards'; +@import 'entries'; +@import 'filters'; +@import 'layout'; +@import 'nav'; +@import 'sidenav'; +@import 'various'; + +/* Tools */ +@import 'fonts'; +@import 'icons'; +@import 'print'; +@import 'media_queries'; diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss new file mode 100755 index 00000000..8b8b06e6 --- /dev/null +++ b/app/Resources/static/themes/material/css/layout.scss @@ -0,0 +1,50 @@ +/* ========================================================================== + Layout + ========================================================================== */ + +body { + display: flex; + min-height: 100vh; + flex-direction: column; + background: #fafafa; + + &.login main { + padding: 0; + min-height: 100vh; + } +} + +.border-bottom { + border-bottom: 1px solid #ddd; +} + +nav, +main, +footer { + padding-left: 240px; +} + +main, +#content, +.valign-wrapper { + height: 100%; +} + +#main { + flex: 1 0 auto; + + .logo { + a { + height: 100pt; + } + + img { + height: 100pt; + width: 100pt; + } + + &:hover { + background: transparent; + } + } +} diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss new file mode 100644 index 00000000..96f34494 --- /dev/null +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -0,0 +1,149 @@ +/* ========================================================================== + Media queries + ========================================================================== */ + +@media only screen and (max-width: 992px) { + header, + main, + footer { + padding-left: 0; + } + + nav, + main, + footer { + padding-left: 0; + } + + .pagination { + width: auto; + } + + .nav-panels .action { + padding-right: 0.75rem; + } + + .nav-panel-buttom { + justify-content: space-around; + } + + #article { + max-width: 35em; + margin-left: auto; + margin-right: auto; + font-size: 18px; + + > header > h1 { + font-size: 1.33em; + } + } + + .reader-mode { + width: 240px !important; + + span { + opacity: 1; + } + } + + .tabs { + display: inline-block; + height: auto; + } + + .tab { + min-width: 100%; + } + + .indicator { + display: none; + } + + .pagination li.prev, + .pagination li.next { + width: auto; + } + + .drag-target + .drag-target { + height: 50%; + } + + .drag-target + .drag-target + .drag-target { + top: 50%; + } +} + +@media only screen and (min-width: 1200px) and (max-width: 1650px) { + .row .col.l3 { + width: 33.33333%; + margin-left: 0; + } +} + +@media only screen and (min-width: 993px) and (max-width: 1200px) { + .row { + .col.l1 { + width: 25%; + margin-left: 0; + } + + .col.l2 { + width: 33.33333%; + margin-left: 0; + } + + .col.l3 { + width: 41.66667%; + margin-left: 0; + } + + .col.l4 { + width: 50%; + margin-left: 0; + } + + .col.l5 { + width: 58.33333%; + margin-left: 0; + } + + .col.l6 { + width: 66.66667%; + margin-left: 0; + } + + .col.l7 { + width: 75%; + margin-left: 0; + } + + .col.l8 { + width: 83.33333%; + margin-left: 0; + } + + .col.l9 { + width: 91.66667%; + margin-left: 0; + } + + .col.l10 { + width: 100%; + margin-left: 0; + } + } +} + +@media only screen and (max-width: 350px) { + .nb-results { + display: none; + } + + main ul.row { + padding: 0; + } + + .row .col { + padding: 0; + } +} diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss new file mode 100644 index 00000000..1a25a5be --- /dev/null +++ b/app/Resources/static/themes/material/css/nav.scss @@ -0,0 +1,106 @@ + +/* ========================================================================== + Nav + ========================================================================== */ + +nav { + height: auto; + + input { + color: #aaa; + } + + ul a:hover { + background-color: initial; + } +} + +.nav-wrapper { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + min-height: 64px; + + .button-collapse { + padding: 0 15px; + } +} + +.nav-input { + display: none; +} + +.nav-panel-buttom { + display: flex; + flex-grow: 1; + justify-content: flex-end; + + li { + max-height: 64px; + } +} + +.nav-panel-add .add, +.nav-panel-search .search, +.nav-panels .close { + color: #444 !important; +} + +.nav-panels { + transition: background 0.2s ease; + + .action { + padding-left: 0.75rem; + font-size: 2.1rem; + white-space: nowrap; + } + + .input-field input { + display: block; + line-height: inherit; + padding-left: 4rem !important; + width: calc(100% - 8rem); + height: 4.1rem; + } + + .input-field input:focus { + background-color: #fff; + border: 0; + box-shadow: none; + color: #444; + } +} + +.input-field { + &.nav-panel-add label, + &.nav-panel-search label { + left: 1rem; + } + + &.nav-panel-add .close, + &.nav-panel-search .close { + position: absolute; + top: 0; + right: 1rem; + color: transparent; + cursor: pointer; + font-size: 2rem; + transition: 0.3s color; + } + + &.nav-panel-add, + &.nav-panel-add form, + &.nav-panel-search, + &.nav-panel-search form { + display: flex; + flex: 1; + } +} + +#button_filters { + display: none; +} + +#button_export { + display: none; +} diff --git a/app/Resources/static/themes/material/css/print.css b/app/Resources/static/themes/material/css/print.css deleted file mode 100755 index 98505aae..00000000 --- a/app/Resources/static/themes/material/css/print.css +++ /dev/null @@ -1,77 +0,0 @@ -@media print { - /* ### Layout ### */ - - body { - font-family: Serif; - background-color: #fff; - } - - @page { - margin: 1cm; - } - - img { - max-width: 100% !important; - } - - /* ### Content ### */ - - /* Hide useless blocks */ - body > header, - #article_toolbar, - #links, - #sort, - body > footer, - .top_link, - div.tools, - header div, - .messages, - .entry + .results, - #slide-out, - .progress, - .hide-on-large-only, - #article > aside, - #article .mbm a { - display: none !important; - } - - main { - padding-left: 0 !important; - } - - #article { - margin: inherit !important; - } - - article { - border: none !important; - } - - /* Add URL after links */ - .vieworiginal a::after { - content: " (" attr(href) ")"; - } - - /* Add explanation after abbr */ - abbr[title]::after { - content: " (" attr(title) ")"; - } - - /* Change border on current pager item */ - .pagination span.current { - border-style: dashed; - } - - #main { - width: 100%; - padding: 0; - margin: 0; - margin-left: 0; - padding-right: 0; - padding-bottom: 0; - } - - #article { - width: 100%; - } -} diff --git a/app/Resources/static/themes/material/css/print.scss b/app/Resources/static/themes/material/css/print.scss new file mode 100755 index 00000000..967a8c2b --- /dev/null +++ b/app/Resources/static/themes/material/css/print.scss @@ -0,0 +1,74 @@ +@media print { + /* ### Layout ### */ + + body { + font-family: Serif; + background-color: #fff; + } + + @page { + margin: 1cm; + } + + img { + max-width: 100% !important; + } + + /* ### Content ### */ + + /* Hide useless blocks */ + body > header, + #article_toolbar, + #links, + #sort, + body > footer, + .top_link, + div.tools, + header div, + .messages, + .entry + .results, + #slide-out, + .progress, + .hide-on-large-only, + #article > aside, + #article .mbm a { + display: none !important; + } + + main { + padding-left: 0 !important; + } + + #article { + margin: inherit !important; + } + + article { + border: none !important; + } + + /* Add URL after links */ + .vieworiginal a::after { + content: " (" attr(href) ")"; + } + + /* Add explanation after abbr */ + abbr[title]::after { + content: " (" attr(title) ")"; + } + + /* Change border on current pager item */ + .pagination span.current { + border-style: dashed; + } + + #main { + width: 100%; + margin: 0; + padding: 0; + } + + #article { + width: 100%; + } +} diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss new file mode 100644 index 00000000..b430077e --- /dev/null +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -0,0 +1,41 @@ +/* ========================================================================== + Side-nav + ========================================================================== */ + +.side-nav { + width: 240px; + + li { + padding: 0; + } + + a { + margin: 0 1rem; + } + + &.fixed a { + font-size: 13px; + line-height: 44px; + height: 44px; + } + + .collapsible-header, + &.fixed .collapsible-header { + height: 45px; + line-height: 44px; + padding: 0 20px; + } + + > li.logo { + line-height: 0; + text-align: center; + } +} + +.bold > a { + font-weight: bold; +} + +span.numberItems { + float: right; +} diff --git a/app/Resources/static/themes/material/css/variables.scss b/app/Resources/static/themes/material/css/variables.scss new file mode 100644 index 00000000..25e22aca --- /dev/null +++ b/app/Resources/static/themes/material/css/variables.scss @@ -0,0 +1,5 @@ +/* ========================================================================== + Variables + ========================================================================== */ + +$blueAccentColor: rgba(0, 151, 167, 0.85); diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss new file mode 100644 index 00000000..6a6f52f9 --- /dev/null +++ b/app/Resources/static/themes/material/css/various.scss @@ -0,0 +1,24 @@ +/* ========================================================================== + * Various + * ========================================================================== */ + +div.settings div.file-field { + /* force height on non-input field in the settings page */ + div, + ul { + margin-top: 40px; + } + + /* but avoid to kill all file input */ + div { + margin-top: inherit; + } +} + +.input-field label.active { + font-size: 1rem; +} + +nav .input-field input { + margin: 0; +} diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js new file mode 100755 index 00000000..d6afbb8a --- /dev/null +++ b/app/Resources/static/themes/material/index.js @@ -0,0 +1,78 @@ +import $ from 'jquery'; + +/* Materialize imports */ +import 'materialize-css/dist/css/materialize.css'; +import 'materialize-css/dist/js/materialize'; + +/* Global imports */ +import '../_global/index'; + +/* Tools */ +import { initExport, initFilters } from './js/tools'; + +/* Import shortcuts */ +import './js/shortcuts/main'; +import './js/shortcuts/entry'; + +/* Theme style */ +import './css/index.scss'; + +$(document).ready(() => { + // 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', + container: 'body', + }); + initFilters(); + initExport(); + + $('#nav-btn-add-tag').on('click', () => { + $('.nav-panel-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); + $('#nav-btn-add').on('click', () => { + $('.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', () => { + $('.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'); + $('#search_entry_term').focus(); + return false; + }); + $('.close').on('click', () => { + $('.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(() => { + const s = $(window).scrollTop(); + const d = $(document).height(); + const c = $(window).height(); + const scrollPercent = (s / (d - c)) * 100; + $('.progress .determinate').css('width', `${scrollPercent}%`); + }); +}); diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js deleted file mode 100755 index 0b2832c0..00000000 --- a/app/Resources/static/themes/material/js/init.js +++ /dev/null @@ -1,110 +0,0 @@ -/* jQuery */ -import $ from 'jquery'; - -/* Annotations */ -import annotator from 'annotator'; - -/* Tools */ -import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; - -/* Import shortcuts */ -import './shortcuts/main'; -import './shortcuts/entry'; -import '../../_global/js/shortcuts/main'; -import '../../_global/js/shortcuts/entry'; - -require('materialize'); // eslint-disable-line - -global.jQuery = $; - -$(document).ready(() => { - // 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', () => { - $('.nav-panel-add-tag').toggle(100); - $('.nav-panel-menu').addClass('hidden'); - $('#tag_label').focus(); - return false; - }); - $('#nav-btn-add').on('click', () => { - $('.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', () => { - $('.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'); - $('#search_entry_term').focus(); - return false; - }); - $('.close').on('click', () => { - $('.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(() => { - const s = $(window).scrollTop(); - const d = $(document).height(); - const c = $(window).height(); - const scrollPercent = (s / (d - c)) * 100; - $('.progress .determinate').css('width', `${scrollPercent}%`); - }); - -/* ========================================================================== - Annotations & Remember position - ========================================================================== */ - - if ($('article').length) { - const app = new annotator.App(); - const x = JSON.parse($('#annotationroutes').html()); - - app.include(annotator.ui.main, { - element: document.querySelector('article'), - }); - - app.include(annotator.storage.http, x); - - app.start().then(() => { - app.annotations.load({ entry: x.entryId }); - }); - - $(window).scroll(() => { - const scrollTop = $(window).scrollTop(); - const docHeight = $(document).height(); - const scrollPercent = (scrollTop) / (docHeight); - const scrollPercentRounded = Math.round(scrollPercent * 100) / 100; - savePercent(x.entryId, scrollPercentRounded); - }); - - retrievePercent(x.entryId); - - $(window).resize(() => { - retrievePercent(x.entryId); - }); - } -}); diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js new file mode 100644 index 00000000..39398fd8 --- /dev/null +++ b/app/Resources/static/themes/material/js/tools.js @@ -0,0 +1,24 @@ +import $ from 'jquery'; + +function initFilters() { + // no display if filters not available + if ($('div').is('#filters')) { + $('#button_filters').show(); + $('.js-filters-action').sideNav({ edge: 'right' }); + $('#clear_form_filters').on('click', () => { + $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); + return false; + }); + } +} + +function initExport() { + // no display if export not available + if ($('div').is('#export')) { + $('#button_export').show(); + $('.js-export-action').sideNav({ edge: 'right' }); + } +} + +export { initExport, initFilters }; diff --git a/app/config/config.yml b/app/config/config.yml index 4f4fb900..e0d6b860 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -3,6 +3,9 @@ imports: - { resource: security.yml } - { resource: services.yml } +parameters: + use_webpack_dev_server: true + framework: #esi: ~ translator: diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 5a4dd69e..65b02d66 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -1,9 +1,9 @@ imports: - { resource: config.yml } -#framework: -# cache: -# system: cache.adapter.apcu +framework: + assets: + # json_manifest_path: '%kernel.root_dir%/../web/bundles/wallabagcore/manifest.json' #doctrine: # orm: diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js new file mode 100644 index 00000000..4f5739f0 --- /dev/null +++ b/app/config/webpack/common.js @@ -0,0 +1,40 @@ +const path = require('path'); +const webpack = require('webpack'); +const StyleLintPlugin = require('stylelint-webpack-plugin'); + +const rootDir = path.resolve(__dirname, '../../../'); + +module.exports = function() { + return { + entry: { + material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), + baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), + }, + + output: { + filename: '[name].js', + path: path.resolve(rootDir, 'web/bundles/wallabagcore'), + publicPath: '/bundles/wallabagcore/', + }, + plugins: [ + new webpack.ProvidePlugin({ + $: 'jquery', + jQuery: 'jquery', + 'window.$': 'jquery', + 'window.jQuery': 'jquery' + }), + new StyleLintPlugin({ + configFile: '.stylelintrc', + failOnError: false, + quiet: false, + context: 'app/Resources/static/themes', + files: '**/*.scss', + }), + ], + resolve: { + alias: { + jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js') + } + }, + }; +}; diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js new file mode 100644 index 00000000..771df65b --- /dev/null +++ b/app/config/webpack/dev.js @@ -0,0 +1,62 @@ +const webpackMerge = require('webpack-merge'); +const webpack = require('webpack'); +const path = require('path'); +const commonConfig = require('./common.js'); + +module.exports = function () { + return webpackMerge(commonConfig(), { + devtool: 'eval-source-map', + output: { + filename: '[name].dev.js' + }, + + devServer: { + hot: true, + // enable HMR on the server + + contentBase: './web', + // match the output path + }, + plugins: [ + new webpack.HotModuleReplacementPlugin(), + ], + module: { + rules: [ + { + enforce: 'pre', + test: /\.js$/, + loader: 'eslint-loader', + exclude: /node_modules/, + }, + { + test: /\.js$/, + exclude: /(node_modules)/, + use: { + loader: 'babel-loader', + options: { + presets: ['env'] + } + } + }, + { + test: /\.(s)?css$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + } + }, + 'postcss-loader', + 'sass-loader' + ] + }, + { + test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/, + use: 'url-loader' + }, + ] + }, + }) +}; diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js new file mode 100644 index 00000000..ef41ab99 --- /dev/null +++ b/app/config/webpack/prod.js @@ -0,0 +1,99 @@ +const webpack = require('webpack'); +const webpackMerge = require('webpack-merge'); +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const ManifestPlugin = require('webpack-manifest-plugin'); + +const commonConfig = require('./common.js'); + +module.exports = function() { + return webpackMerge(commonConfig(), { + output: { + filename: '[name].js' + }, + devtool: 'source-map', + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + 'NODE_ENV': JSON.stringify('production') + } + }), + new webpack.optimize.UglifyJsPlugin({ + beautify: false, + mangle: { + screw_ie8: true, + keep_fnames: true + }, + compress: { + screw_ie8: true, + warnings: false + }, + comments: false + }), + new ExtractTextPlugin('[name].css'), + new ManifestPlugin({ + fileName: 'manifest.json', + }) + ], + module: { + rules: [ + { + enforce: 'pre', + test: /\.js$/, + loader: 'eslint-loader', + exclude: /node_modules/, + }, + { + test: /\.js$/, + exclude: /(node_modules)/, + use: { + loader: 'babel-loader', + options: { + presets: ['env'] + } + } + }, + { + test: /\.(s)?css$/, + use: ExtractTextPlugin.extract({ + fallback: 'style-loader', + use: [ + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: { + discardComments: { + removeAll: true + }, + core: true, + minifyFontValues: true + } + } + }, + 'postcss-loader', + 'sass-loader' + ] + }) + }, + { + test: /\.(jpg|png|gif|svg)$/, + use: { + loader: 'file-loader', + options: { + name: 'img/[name].[ext]', + } + } + }, + { + test: /\.(eot|ttf|woff|woff2)$/, + use: { + loader: 'file-loader', + options: { + name: 'fonts/[name].[ext]', + } + } + } + ] + }, + }) +}; -- cgit v1.2.3 From 8655913ebf99a9d65be16ede71b52ee3d3474c5e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 27 Apr 2017 13:28:57 +0200 Subject: disable default dev server --- app/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index e0d6b860..ee8186a6 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -4,7 +4,7 @@ imports: - { resource: services.yml } parameters: - use_webpack_dev_server: true + use_webpack_dev_server: false framework: #esi: ~ -- cgit v1.2.3 From e35f8439a7e26d6e3e66f18ba6635968831c0ac7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 29 Apr 2017 19:44:27 +0200 Subject: add comment to config.yml to explain live reload feature --- app/config/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index ee8186a6..c076aea9 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -4,6 +4,7 @@ imports: - { resource: services.yml } parameters: + # Allows to use the live reload feature for changes in assets use_webpack_dev_server: false framework: -- cgit v1.2.3 From 18e1da6277c4a5759384cfa66e0cd00afd7ce763 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 4 May 2017 14:56:52 +0200 Subject: rebase Signed-off-by: Thomas Citharel --- app/Resources/static/themes/material/js/shortcuts/main.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js index 41499478..042b423c 100644 --- a/app/Resources/static/themes/material/js/shortcuts/main.js +++ b/app/Resources/static/themes/material/js/shortcuts/main.js @@ -28,6 +28,11 @@ $(document).ready(() => { return; } + /* Show nothing on login/register page */ + if ($('#username').length > 0 || $('#fos_user_registration_form_username').length > 0) { + return; + } + /* Focus current card */ toggleFocus(card); -- cgit v1.2.3 From 2003ffa97e98d35130c93d158c453ce9b926b838 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 4 May 2017 17:44:42 +0200 Subject: Fix according to review --- .../static/themes/material/css/article.scss | 33 +- .../static/themes/material/css/cards.scss | 28 +- .../static/themes/material/css/icons.scss | 4 +- app/Resources/static/themes/material/css/main.css | 1024 -------------------- .../static/themes/material/css/sidenav.scss | 2 +- 5 files changed, 39 insertions(+), 1052 deletions(-) delete mode 100755 app/Resources/static/themes/material/css/main.css (limited to 'app') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index 7d0bdac7..dc12f857 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -106,11 +106,11 @@ font-size: 0.8em; display: flex; flex-flow: row wrap; - margin: 0 auto; li { display: inline-flex; vertical-align: middle; + margin: 0 5px; } a { @@ -121,7 +121,7 @@ #list { float: right; - margin: 0 15px 10px; + margin: -5px 15px auto; } .chip { @@ -133,12 +133,19 @@ i { color: #fff; } + + i.material-icons { + float: right; + font-size: 20px; + line-height: 32px; + padding-left: 8px; + } } } } .reader-mode { - width: 95px !important; + width: 70px !important; transition: width 0.2s ease; .collapsible-body { @@ -150,17 +157,21 @@ opacity: 0; transition: opacity 0.2s ease; } -} -.reader-mode:hover { - width: 240px !important; + &:hover { + width: 260px !important; - .collapsible-body { - height: auto; - } + .collapsible-body { + height: auto; - span { - opacity: 1; + li a i.material-icons { + margin: auto 5px auto 0; + } + } + + span { + opacity: 1; + } } } diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 18ef6e60..2fa6535a 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -114,20 +114,6 @@ main { } } - .card-entry-labels li, - .card-tag-labels li { - margin: 10px 10px 10px auto; - padding: 5px 12px 5px 16px !important; - background-color: $blueAccentColor; - border-radius: 0 3px 3px 0; - color: #fff; - cursor: default; - max-height: 2em; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .card-image { height: 10em; } @@ -156,6 +142,20 @@ a.original { display: block; } +.card-entry-labels li, +.card-tag-labels li { + margin: 10px 10px 10px auto; + padding: 5px 12px 5px 16px !important; + background-color: $blueAccentColor; + border-radius: 0 3px 3px 0; + color: #fff; + cursor: default; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + .card-entry-tags a, .card-entry-labels a, .card-tag-labels a, diff --git a/app/Resources/static/themes/material/css/icons.scss b/app/Resources/static/themes/material/css/icons.scss index 268e6dca..1eeab902 100644 --- a/app/Resources/static/themes/material/css/icons.scss +++ b/app/Resources/static/themes/material/css/icons.scss @@ -111,7 +111,7 @@ a.icon-image { background-repeat: no-repeat; padding-right: 0.4em !important; - padding-left: 1em !important; + padding-left: 0 !important; margin-left: 25px; &::before { @@ -120,7 +120,7 @@ a.icon-image { width: 24px; height: 24px; float: left; - margin: 0 6px 0 0; + margin: 7px 1.5px 0 0; } &.carrot::before { diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css deleted file mode 100755 index 45428e23..00000000 --- a/app/Resources/static/themes/material/css/main.css +++ /dev/null @@ -1,1024 +0,0 @@ -/* ========================================================================== - Sommaire - - 0 = Common - 1 = Nav - 2 = Side-nav - 3 = Filters slider - 4 = Cards - 5 = Article - 6 = Media queries - 7 = Font - 8 = Others - - ========================================================================== */ - -/* ========================================================================== - 0 = Common - ========================================================================== */ - -/** - * - * Material icons - * - */ - -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url(../fonts/MaterialIcons-Regular.eot); - - /* For IE6-8 */ - src: local("Material Icons"), local("MaterialIcons-Regular"), url(../fonts/MaterialIcons-Regular.woff2) format("woff2"), url(../fonts/MaterialIcons-Regular.woff) format("woff"), url(../fonts/MaterialIcons-Regular.ttf) format("truetype"); -} - -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; /* Preferred icon size */ - width: 1em; - height: 1em; - display: inline-block; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - direction: ltr; - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} - -/* Rules for sizing the icon. */ -.material-icons.md-18 { font-size: 18px; } -.material-icons.md-24 { font-size: 24px; } -.material-icons.md-36 { font-size: 36px; } -.material-icons.md-48 { font-size: 48px; } - -/* Rules for using icons as black on a light background. */ -.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); } -.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } - -/* Rules for using icons as white on a dark background. */ -.material-icons.md-light { color: rgba(255, 255, 255, 1); } -.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); } - -/** - * - * Icomoon icons - * - */ - -@font-face { - font-family: icomoon; - src: url("../fonts/IcoMoon-Free.ttf"); - font-weight: normal; - font-style: normal; -} - -[class^="icon-"]::before, -[class*=" icon-"]::before { - font-family: icomoon; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - background-size: 24px; - - /* Enable Ligatures ================ */ - letter-spacing: 0; - -webkit-font-feature-settings: "liga"; - -moz-font-feature-settings: "liga=1"; - -moz-font-feature-settings: "liga"; - -ms-font-feature-settings: "liga" 1; - -o-font-feature-settings: "liga"; - font-feature-settings: "liga"; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-image { - background-size: 16px; - background-repeat: no-repeat; - padding-right: 1em !important; - padding-left: 1em !important; -} - -.icon-eye::before { - content: "\e9ce"; -} - -.icon-no-eye::before { - content: "\e9d1"; -} - -.icon-calendar::before { - content: "\e953"; -} - -.icon-mail::before { - content: "\ea86"; -} - -.icon-time::before { - content: "\e952"; -} - -/* Carrot (http://carrot.org) */ -.icon-image--carrot { - background-image: url("../../_global/img/icons/carrot-icon--black.png"); -} - -/* Diaspora */ -.icon-image--diaspora { - background-image: url("../../_global/img/icons/diaspora-icon--black.png"); -} - -/* Unmark.it */ -.icon-image--unmark { - background-image: url("../../_global/img/icons/unmark-icon--black.png"); -} - -/* Shaarli */ -.icon-image--shaarli { - background-image: url("../../_global/img/icons/shaarli.png"); -} - -/* Scuttle */ -.icon-image--scuttle { - background-image: url("../../_global/img/icons/scuttle.png"); -} - -body { - display: flex; - min-height: 100vh; - flex-direction: column; - background: #fafafa; -} - -body.login main { - padding: 0; - min-height: 100vh; -} - -.border-bottom { - border-bottom: 1px solid #ddd; -} - -nav, -main, -footer { - padding-left: 240px; -} - -main, -#content, -.valign-wrapper { - height: 100%; -} - -#main { - flex: 1 0 auto; -} - -.results { - height: 1em; -} - -.results .nb-results, -.results .pagination { - margin: 15px; - margin-bottom: 0; -} - -.results .nb-results { - display: inline-flex; -} - -.results a { - color: #444; -} - -.pagination { - float: right; -} - -.pagination ul { - margin: 0 !important; -} - -.pagination li { - padding: 0; -} - -.pagination a { - padding: 0 10px; - height: 30px; - display: block; -} - -.pagination .disabled { - margin-right: 10px; - margin-left: 10px; -} - -div.pagination ul .prev.disabled, -div.pagination ul .next.disabled { - display: none; -} - -.pagination li.active span { - padding: 0 10px; - height: 30px; - display: block; - color: #fff; -} - -.page-footer .footer-copyright { - min-width: 50px; - height: auto !important; - line-height: 1em !important; -} - -.page-footer .footer-copyright p { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; -} - -.hidden { - display: none; -} - -.picker__date-display { - display: none; -} - -footer.page-footer { - margin-top: 10px; - padding-top: 0; -} - -footer .row { - margin-bottom: 10px; -} - -/* ========================================================================== - 1 = Nav - ========================================================================== */ - -nav input { - color: #aaa; -} - -nav { - height: auto; -} - -.nav-wrapper { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - min-height: 64px; -} - -.nav-wrapper .button-collapse { - padding: 0 15px; -} - -.nav-input { - display: none; -} - -.nav-panel-buttom { - display: flex; - flex-grow: 1; - justify-content: flex-end; -} - -.nav-panel-buttom li { - max-height: 64px; -} - -.nav-panels { - transition: background 0.2s ease; -} - -.nav-panel-add .add, -.nav-panel-search .search, -.nav-panels .close { - color: #444 !important; -} - -.nav-panels .action { - padding-left: 0.75rem; - font-size: 2.1rem; - white-space: nowrap; -} - -.nav-panels .input-field input { - display: block; - line-height: inherit; - padding-left: 4rem !important; - width: calc(100% - 8rem); -} - -.nav-panels .input-field input:focus { - background-color: #fff; - border: 0; - box-shadow: none; - color: #444; -} - -.input-field.nav-panel-add label, -.input-field.nav-panel-search label { - left: 1rem; -} - -.input-field.nav-panel-add .close, -.input-field.nav-panel-search .close { - position: absolute; - top: 0; - right: 1rem; - color: transparent; - cursor: pointer; - font-size: 2rem; - transition: 0.3s color; -} - -#button_filters { - display: none; -} - -#button_export { - display: none; -} - -.input-field.nav-panel-add, -.input-field.nav-panel-add form, -.input-field.nav-panel-search, -.input-field.nav-panel-search form { - display: flex; - flex: 1; -} - -/* ========================================================================== - 2 = Side-nav - ========================================================================== */ - -.side-nav.fixed a { - font-size: 13px; - line-height: 44px; - height: 44px; -} - -.side-nav .collapsible-header, -.side-nav.fixed .collapsible-header { - height: 45px; - line-height: 44px; - padding: 0 20px; -} - -.bold > a { - font-weight: bold; -} - -.side-nav > li.logo { - line-height: 0; - text-align: center; -} - -#main .logo a { - height: 100pt; -} - -#main .logo img { - height: 100pt; - width: 100pt; -} - -#main .logo:hover { - background: transparent; -} - -.side-nav li { - padding: 0; -} - -.side-nav a { - margin: 0 1rem; -} - -span.numberItems { - float: right; -} - -nav ul a:hover { - background-color: initial; -} - -/* ========================================================================== - * 3 = Filters slider - * ========================================================================== */ - -#filters button { - padding: 0; - width: 100%; -} - -.side-nav.fixed.right-aligned { - right: -250px; - left: auto !important; -} - -#filters div.with-checkbox { - height: 3rem; - margin-top: 0; -} - -/* ========================================================================== - 4 = Cards - ========================================================================== */ - -main #content { - padding: 0 0.5rem; -} - -main ul.row { - padding: 0 0.75rem; -} - -.data .card .card-body { - height: 19em; - overflow: hidden; -} - -.card .card-content .card-title, -.card .card-reveal .card-title { - line-height: 22.8px; - max-height: 80px; - font-size: 19px; - font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #313131; -} - -.card .card-content .activator, -.card .card-reveal .activator { - cursor: pointer; - font-family: "Material Icons"; -} - -.card .card-content i.right, -.card .card-reveal i.right { - margin-left: 0; -} - -.card .card-content .original { - line-height: 24px; - font-size: 15px; -} - -a.original { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; -} - -.card .card-entry-labels { - position: absolute; - top: 10px; - z-index: 90; - max-width: 50%; -} - -.card .card-entry-labels li, -.card-tag-labels li { - margin: 10px 10px 10px auto; - padding: 5px 12px 5px 16px !important; - background-color: rgba(0, 151, 167, 0.85); - border-radius: 0 3px 3px 0; - color: #fff; - cursor: default; - max-height: 2em; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.card .card-entry-labels-hidden { - margin: 2.5px auto; -} - -.card .card-entry-labels-hidden li { - display: inline-block; - background-color: rgba(0, 151, 167, 0.85); - margin: 0 5px; - padding: 5px 12px; - border-radius: 3px; - color: #fff; - max-height: 2em; - max-width: calc(100% - 15px); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.card .card-entry-labels-hidden li:first-child { - margin-left: 0; -} - -.card-entry-tags a, -.card-entry-labels a, -.card-tag-labels a, -.card-entry-labels-hidden a, -#list .chip a { - text-decoration: none; - font-weight: normal; - color: #fff; -} - -.card .card-content .estimatedTime { - margin-bottom: 10px; -} - -.card .card-action { - padding: 10px 5px 10px 15px; -} - -.card .card-action ul.links { - margin: 0; - font-size: 24px; - line-height: 24px; -} - -.card .card-action ul.tools li a.tool { - margin-right: 5px !important; -} - -.card-stacked:hover ul.tools-list { - display: block; -} - -.card-stacked ul.tools-list { - display: none; -} - -.card .card-action a { - color: #fff; - margin: 0; -} - -.card .card-action a:hover { - color: #fff; -} - -.card .card-action .reading-time { - display: inline-flex; - vertical-align: middle; -} - -.quickstart .card .card-action a, -.quickstart .card .card-action a:hover { - color: #fff !important; -} - -.settings .div_tabs { - padding-bottom: 15px; -} - -.card.sw { - max-width: 370px; - margin-left: auto; - margin-right: auto; -} - -.card .card-image { - height: 10em; -} - -.card .card-fullimage { - height: 13.5em; -} - -.card .card-image .preview, -.card .card-fullimage .preview { - height: 14em; - background-size: cover; - background-repeat: no-repeat; - background-position: 50%; -} - -/* ========================================================================== - 5 = Article - ========================================================================== */ - -#article { - font-size: 20px; - margin: 0 auto; - max-width: 45em; -} - -#article article { - color: #424242; - font-size: 18px; - line-height: 1.7em; -} - -#article article h1, -#article article h2, -#article article h3, -#article article h4, -#article article h5, -#article article h6 { - color: #212121; -} - -#article article h1 strong, -#article article h2 strong, -#article article h3 strong, -#article article h4 strong, -#article article h5 strong, -#article article h6 strong { - font-weight: 500; -} - -#article article h6 { - font-size: 1.2rem; -} - -#article article h5 { - font-size: 1.6rem; -} - -#article article h4 { - font-size: 1.9rem; -} - -#article article h3 { - font-size: 2.2rem; -} - -#article article h2 { - font-size: 2.5rem; -} - -#article article h1 { - font-size: 2.7rem; -} - -#article img, -#article figure { - max-width: 100%; - height: auto; -} - -#article article a { - border-bottom: 1px dotted #03a9f4; - text-decoration: none; -} - -#article article a:hover { - border-bottom-style: solid; -} - -#article article ul { - padding-left: 30px; -} - -#article article ul, -#article article ul li { - list-style-type: disc; -} - -#article article blockquote { - font-style: italic; -} - -#article article strong { - font-weight: bold; -} - -#article article pre { - box-sizing: border-box; - margin: 0 0 1.75em; - border: #e3f2fd 1px solid; - width: 100%; - padding: 10px; - font-family: monospace; - font-size: 0.8em; - white-space: pre; - overflow: auto; - background: #f5f5f5; - border-radius: 3px; -} - -#article > header > h1 { - font-size: 2em; - margin: 2.1rem 0 0.68rem; -} - -.reader-mode { - width: 95px !important; - transition: width 0.2s ease; -} - -.reader-mode:hover { - width: 240px !important; -} - -.reader-mode .collapsible-body { - height: 0; - overflow: hidden; -} - -.reader-mode:hover .collapsible-body { - height: auto; -} - -.reader-mode span { - opacity: 0; - transition: opacity 0.2s ease; -} - -.reader-mode:hover span { - opacity: 1; -} - -.progress { - position: fixed; - top: 0; - width: 100%; - height: 3px; - margin: 0; - z-index: 9999; -} - -#article aside .tools { - font-size: 0.8em; - display: flex; - flex-flow: row wrap; - margin: 0 auto; -} - -article aside .tools li { - display: inline-flex; - vertical-align: middle; -} - -#article aside .tools a { - color: #000; - text-decoration: none; -} - -#article aside #list { - float: right; - margin: 0 15px 10px; -} - -#article aside .chip { - background-color: rgba(0, 151, 167, 0.85); - padding: 0 15px 0 10px; - margin: auto 2px; -} - -#article aside .chip a, -#article aside .chip i { - color: #fff; -} - -/* ========================================================================== - 6 = Media queries - ========================================================================== */ - -@media only screen and (max-width: 992px) { - header, - main, - footer { - padding-left: 0; - } - - nav, - main, - footer { - padding-left: 0; - } - - .pagination { - width: auto; - } - - .nav-panels .action { - padding-right: 0.75rem; - } - - .nav-panel-buttom { - justify-content: space-around; - } - - #article { - max-width: 35em; - margin-left: auto; - margin-right: auto; - font-size: 18px; - } - - #article > header > h1 { - font-size: 1.33em; - } - - .reader-mode { - width: 240px !important; - } - - .reader-mode span { - opacity: 1; - } - - .tabs { - display: inline-block; - height: auto; - } - - .tab { - min-width: 100%; - } - - .indicator { - display: none; - } - - .pagination li.prev, - .pagination li.next { - width: auto; - } - - .drag-target + .drag-target { - height: 50%; - } - - .drag-target + .drag-target + .drag-target { - top: 50%; - } -} - -@media only screen and (min-width: 1200px) and (max-width: 1650px) { - .row .col.l3 { - width: 33.33333%; - margin-left: 0; - } -} - -@media only screen and (min-width: 993px) and (max-width: 1200px) { - .row .col.l1 { - width: 25%; - margin-left: 0; - } - - .row .col.l2 { - width: 33.33333%; - margin-left: 0; - } - - .row .col.l3 { - width: 41.66667%; - margin-left: 0; - } - - .row .col.l4 { - width: 50%; - margin-left: 0; - } - - .row .col.l5 { - width: 58.33333%; - margin-left: 0; - } - - .row .col.l6 { - width: 66.66667%; - margin-left: 0; - } - - .row .col.l7 { - width: 75%; - margin-left: 0; - } - - .row .col.l8 { - width: 83.33333%; - margin-left: 0; - } - - .row .col.l9 { - width: 91.66667%; - margin-left: 0; - } - - .row .col.l10 { - width: 100%; - margin-left: 0; - } -} - -@media only screen and (max-width: 350px) { - .nb-results { - display: none; - } - - main ul.row { - padding: 0; - } - - .row .col { - padding: 0; - } -} - -/* ========================================================================== - 7 = Font - ========================================================================== */ - -.icon-google-plus2::before { - content: "\ea89"; -} - -.icon-facebook2::before { - content: "\ea8d"; -} - -.icon-twitter::before { - content: "\ea96"; -} - -.icon-apple::before { - content: "\eabf"; -} - -.icon-android::before { - content: "\eac1"; -} - -.icon-chrome::before { - content: "\eae5"; -} - -.icon-firefox::before { - content: "\eae6"; -} - -.icon-link::before { - content: "\e9cb"; -} - -footer [class^="icon-"], -footer [class*=" icon-"] { - font-size: 2em; - transition: text-shadow 0.2s ease; - padding-right: 10px; -} - -footer [class^="icon-"]:hover, -footer [class*=" icon-"]:hover { - text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); -} - -/* ========================================================================== - 8 = Others - ========================================================================== */ - -/* force height on non-input field in the settings page */ -div.settings div.input-field div, -div.settings div.input-field ul { - margin-top: 40px; -} - -/* but avoid to kill all file input */ -div.settings div.file-field div { - margin-top: inherit; -} - -.input-field label.active { - font-size: 1rem; -} - -nav .input-field input { - margin: 0; -} diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index b430077e..86e4a095 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -10,7 +10,7 @@ } a { - margin: 0 1rem; + margin: 0 auto; } &.fixed a { -- cgit v1.2.3 From 14f58edd803d0656f3471c1bf1a75ec5cc483da8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 5 May 2017 09:19:56 +0200 Subject: fixed margin on sidebar menu --- app/Resources/static/themes/material/css/sidenav.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index 86e4a095..2d49a935 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -10,7 +10,7 @@ } a { - margin: 0 auto; + margin: 0; } &.fixed a { -- cgit v1.2.3 From 34806fab1b26eb626862d45402cb4e265cc0af5b Mon Sep 17 00:00:00 2001 From: Aline Date: Sun, 7 May 2017 15:07:50 +0200 Subject: Fix reviews Signed-off-by: Aline --- app/Resources/static/themes/material/css/cards.scss | 8 ++++++++ app/Resources/static/themes/material/css/icons.scss | 4 ++++ app/Resources/static/themes/material/css/sidenav.scss | 4 ++++ app/Resources/static/themes/material/css/various.scss | 8 ++++++++ 4 files changed, 24 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 2fa6535a..d0f4c828 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -27,6 +27,10 @@ main { color: #313131; } + .card-content .card-title { + display: inline-block; + } + .card-content .activator, .card-reveal .activator { cursor: pointer; @@ -111,6 +115,10 @@ main { .reading-time { display: inline-flex; vertical-align: middle; + + span { + margin-right: 5px; + } } } diff --git a/app/Resources/static/themes/material/css/icons.scss b/app/Resources/static/themes/material/css/icons.scss index 1eeab902..e7f215c0 100644 --- a/app/Resources/static/themes/material/css/icons.scss +++ b/app/Resources/static/themes/material/css/icons.scss @@ -138,6 +138,10 @@ a.icon-image { &.shaarli::before { background: url("../../_global/img/icons/shaarli.png") no-repeat center/80%; } + + &.scuttle::before { + background: url("../../_global/img/icons/scuttle.png") no-repeat center/80%; + } } .icon-google-plus2::before { diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index 2d49a935..416dc1c7 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -7,6 +7,10 @@ li { padding: 0; + + &.logo > a:hover { + background: initial; + } } a { diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 6a6f52f9..7daf40ec 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss @@ -22,3 +22,11 @@ div.settings div.file-field { nav .input-field input { margin: 0; } + +.tabs { + display: flex; +} + +.tab { + flex: 1; +} -- cgit v1.2.3 From 4c6ee89c9c70f24209f2bb86de2b3137ab2d801c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 7 May 2017 17:13:08 +0200 Subject: Fix review again Signed-off-by: Thomas Citharel --- .../static/themes/material/css/article.scss | 30 ++++++++++++---------- .../static/themes/material/css/cards.scss | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index dc12f857..0c7735c3 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -103,25 +103,29 @@ aside { .tools { - font-size: 0.8em; display: flex; flex-flow: row wrap; - li { - display: inline-flex; - vertical-align: middle; - margin: 0 5px; - } + .stats { + font-size: 0.8em; + margin: 8px 15px 5px; + + li { + display: inline-flex; + vertical-align: middle; + margin: 0 5px; + } - a { - color: #000; - text-decoration: none; + a { + color: #000; + text-decoration: none; + } } - } - #list { - float: right; - margin: -5px 15px auto; + .tags { + float: right; + margin: 5px 15px 10px; + } } .chip { diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index d0f4c828..40351475 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -143,7 +143,7 @@ main { } } -a.original { +a.original:not(.waves-effect) { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; -- cgit v1.2.3 From ff5cdbdc95f3cc2bf28cde27e5e544a3efca3d38 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 8 May 2017 12:32:20 +0200 Subject: fix 3-dots menu position Signed-off-by: Thomas Citharel --- app/Resources/static/themes/material/css/cards.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 40351475..f5b79193 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -27,7 +27,7 @@ main { color: #313131; } - .card-content .card-title { + .card-stacked .card-content .card-title { display: inline-block; } -- cgit v1.2.3 From efac66cb56d650b863b64c9c4582589da6a2442a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 9 May 2017 11:04:02 +0200 Subject: icon mail a bit better Signed-off-by: Thomas Citharel --- app/Resources/static/themes/material/css/article.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index 0c7735c3..8b67f6bd 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -169,7 +169,7 @@ height: auto; li a i.material-icons { - margin: auto 5px auto 0; + margin: auto 5px auto -8px; } } -- cgit v1.2.3 From 8c3158eba8654509a8c5e0323d4f37b01488b011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 10 May 2017 10:46:32 +0200 Subject: Added migration to change length for user fields --- app/DoctrineMigrations/Version20170510082609.php | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170510082609.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php new file mode 100644 index 00000000..a99af2d2 --- /dev/null +++ b/app/DoctrineMigrations/Version20170510082609.php @@ -0,0 +1,60 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + + foreach ($this->fields as $field) { + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(180) NOT NULL;'); + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + + foreach ($this->fields as $field) { + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(255) NOT NULL;'); + } + } +} -- cgit v1.2.3 From dda6a6addc0fd54031514e81d2b55d5066b7157c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 11 May 2017 14:18:21 +0200 Subject: Added headers field in Entry --- app/DoctrineMigrations/Version20170511115400.php | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170511115400.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170511115400.php b/app/DoctrineMigrations/Version20170511115400.php new file mode 100644 index 00000000..64ee9e0a --- /dev/null +++ b/app/DoctrineMigrations/Version20170511115400.php @@ -0,0 +1,55 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf($entryTable->hasColumn('headers'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('headers', 'text', [ + 'notnull' => false, + ]); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf(!$entryTable->hasColumn('headers'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('headers'); + } +} -- cgit v1.2.3 From 3b792787d741932acc4d1e35124d38886bad11d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 12 May 2017 16:33:12 +0200 Subject: Upgraded CraueConfigBundle to 2.0 --- .../CraueConfigBundle/views/Settings/modify.html.twig | 10 ++++------ app/config/config.yml | 1 + app/config/services.yml | 8 ++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig index c4e735ee..b81b8651 100644 --- a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig +++ b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig @@ -20,12 +20,10 @@ {% for section in sections | craue_sortSections %}
- {% for setting in form.settings if setting.section.vars.value == section %} - {{ form_row(setting.name) }} - {{ form_row(setting.section) }} - {{ form_row(setting.value, { - 'label': setting.name.vars.value | trans({}, 'CraueConfigBundle'), - }) }} + {% for setting in form.settings if setting.vars.value.section == section %} + {{ form_row(setting.value, { + 'label': setting.vars.value.name | trans({}, 'CraueConfigBundle'), + }) }} {% endfor %}
{% endfor %} diff --git a/app/config/config.yml b/app/config/config.yml index 116bb04c..28abe734 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -6,6 +6,7 @@ imports: parameters: # Allows to use the live reload feature for changes in assets use_webpack_dev_server: false + craue_config.cache_adapter.class: Craue\ConfigBundle\CacheAdapter\SymfonyCacheComponentAdapter framework: #esi: ~ diff --git a/app/config/services.yml b/app/config/services.yml index 9a1ce80b..7b85d846 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -42,3 +42,11 @@ services: arguments: ["@session"] tags: - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } + + craue_config_cache_provider: + class: Symfony\Component\Cache\Adapter\FilesystemAdapter + public: false + arguments: + - 'craue_config' + - 0 + - '%kernel.cache_dir%' -- cgit v1.2.3 From 60c522899bcfd3aef1a486922e0a9aeb549c0fc8 Mon Sep 17 00:00:00 2001 From: adev Date: Sun, 14 May 2017 11:38:02 +0200 Subject: Fix delete annotation when username is defined When an user set his name in "Config" > "User Information", he can't delete or update an annotation Fix #2382 --- app/Resources/static/themes/_global/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 00410754..3fdcaa3d 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -28,6 +28,11 @@ $(document).ready(() => { element: document.querySelector('article'), }); + const authorization = { + permits() { return true; }, + }; + app.registry.registerUtility(authorization, 'authorizationPolicy'); + const x = JSON.parse($('#annotationroutes').html()); app.include(annotator.storage.http, x); -- cgit v1.2.3 From 812c980fa5ea03b9282e32a93723e459eee763a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 29 May 2017 10:59:30 +0200 Subject: Fixed tags display on grid view --- app/Resources/static/themes/material/css/cards.scss | 17 +++++++++++++++++ .../static/themes/material/css/entries.scss | 9 +++++++++ .../static/themes/material/css/various.scss | 20 ++++++++++++++++++++ 3 files changed, 46 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index f5b79193..1e0155c3 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -182,6 +182,23 @@ a.original:not(.waves-effect) { ul.tools-list { display: none; } + + .preview { + float: left; + width: 90px; + height: 50px; + + img { + max-height: 50px; + padding-right: 10px; + width: 80px; + } + } + + .domain, + .footer { + font-size: 12px; + } } .quickstart .card .card-action a, diff --git a/app/Resources/static/themes/material/css/entries.scss b/app/Resources/static/themes/material/css/entries.scss index b6a46a9e..c667be27 100644 --- a/app/Resources/static/themes/material/css/entries.scss +++ b/app/Resources/static/themes/material/css/entries.scss @@ -2,6 +2,15 @@ * Entries * ========================================================================== */ +.collection { + margin: 15px 15px 0; + + .collection-item { + padding: 7px; + height: 65px; + } +} + .results { height: 1em; diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 7daf40ec..512ed8cd 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss @@ -30,3 +30,23 @@ nav .input-field input { .tab { flex: 1; } + +.chip { + margin: auto 0; + border-radius: 4px; + background-color: #eee; + font-weight: normal; + height: 20px; + line-height: normal; + + a { + color: #9e9e9e; + } + + i.material-icons { + float: right; + font-size: 16px; + line-height: 32px; + padding-left: 8px; + } +} -- cgit v1.2.3 From 91775f36fee13c5e1fd77abf27555e6c77fa93da Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 31 May 2017 14:34:46 +0200 Subject: Add some flex magic Signed-off-by: Thomas Citharel --- .../static/themes/material/css/cards.scss | 61 +++++++++++++++++----- .../static/themes/material/css/various.scss | 20 ------- 2 files changed, 47 insertions(+), 34 deletions(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 1e0155c3..596d0a59 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -175,30 +175,63 @@ a.original:not(.waves-effect) { } .card-stacked { - &:hover ul.tools-list { - display: block; - } + display: flex; + flex-flow: row wrap; - ul.tools-list { - display: none; + &:hover ul.tools-list { + display: inline; + text-align: right; } .preview { - float: left; - width: 90px; - height: 50px; + max-width: 100px; + height: auto; + margin-right: 10px; + flex: 1; img { - max-height: 50px; - padding-right: 10px; - width: 80px; + max-width: 100%; + max-height: 100%; + } + } + + div.metadata { + .chip { + background-color: $blueAccentColor; + padding: 0 15px 0 10px; + margin: auto 2px; + + a, + i { + color: #fff; + } + + i.material-icons { + float: right; + font-size: 20px; + line-height: 32px; + padding-left: 8px; + } } } - .domain, - .footer { - font-size: 12px; + div.card-content { + flex: 4; } + + ul.tools-list { + flex: 1; + display: none; + flex-basis: 5em; + align-self: flex-end; + float: right; + max-width: 6em; + } +} + +#content .collection .collection-item { + min-height: 65px; + height: auto; } .quickstart .card .card-action a, diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 512ed8cd..7daf40ec 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss @@ -30,23 +30,3 @@ nav .input-field input { .tab { flex: 1; } - -.chip { - margin: auto 0; - border-radius: 4px; - background-color: #eee; - font-weight: normal; - height: 20px; - line-height: normal; - - a { - color: #9e9e9e; - } - - i.material-icons { - float: right; - font-size: 16px; - line-height: 32px; - padding-left: 8px; - } -} -- cgit v1.2.3 From 7ab5eb9508921d84b4b4ec84a59135d536da748e Mon Sep 17 00:00:00 2001 From: adev Date: Mon, 15 May 2017 20:47:59 +0200 Subject: Isolated tests Use https://github.com/dmaicher/doctrine-test-bundle to have test isolation. --- app/AppKernel.php | 4 ++++ app/config/config_test.yml | 3 ++- app/config/parameters_test.yml | 3 ++- app/config/tests/parameters_test.mysql.yml | 1 + app/config/tests/parameters_test.pgsql.yml | 1 + app/config/tests/parameters_test.sqlite.yml | 5 ++++- 6 files changed, 14 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index b9293498..c50783a6 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -48,6 +48,10 @@ class AppKernel extends Kernel $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); + + if ('test' === $this->getEnvironment()) { + $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); + } } return $bundles; diff --git a/app/config/config_test.yml b/app/config/config_test.yml index f5e2c25e..c620c359 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -29,7 +29,8 @@ doctrine: user: "%test_database_user%" password: "%test_database_password%" charset: "%test_database_charset%" - path: "%test_database_path%" + path: "%env(TEST_DATABASE_PATH)%" + orm: metadata_cache_driver: type: service diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 5f2e25bb..010785e6 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -5,5 +5,6 @@ parameters: test_database_name: null test_database_user: null test_database_password: null - test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' + test_database_path: "%env(TEST_DATABASE_PATH)%" + env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml index bca2d466..36b227fb 100644 --- a/app/config/tests/parameters_test.mysql.yml +++ b/app/config/tests/parameters_test.mysql.yml @@ -6,4 +6,5 @@ parameters: test_database_user: root test_database_password: ~ test_database_path: ~ + env(TEST_DATABASE_PATH): ~ test_database_charset: utf8mb4 diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml index 3e18d4a0..60f51df6 100644 --- a/app/config/tests/parameters_test.pgsql.yml +++ b/app/config/tests/parameters_test.pgsql.yml @@ -6,4 +6,5 @@ parameters: test_database_user: travis test_database_password: ~ test_database_path: ~ + env(TEST_DATABASE_PATH): ~ test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index b8a5f41a..5c731bf5 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -5,5 +5,8 @@ parameters: test_database_name: ~ test_database_user: ~ test_database_password: ~ - test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" + # Using an environnement variable in order to avoid the error "attempt to write a readonly database" + # when the schema is dropped then recreate + test_database_path: "%env(TEST_DATABASE_PATH)%" + env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 -- cgit v1.2.3 From 84b041e87f1e2642627bb4f86284ed538333eb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 31 May 2017 20:31:35 +0200 Subject: Reduced border-radius for tags --- app/Resources/static/themes/material/css/article.scss | 1 + app/Resources/static/themes/material/css/cards.scss | 1 + 2 files changed, 2 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index 8b67f6bd..27ff5221 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -132,6 +132,7 @@ background-color: $blueAccentColor; padding: 0 15px 0 10px; margin: auto 2px; + border-radius: 6px; a, i { diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 596d0a59..3edbe673 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -200,6 +200,7 @@ a.original:not(.waves-effect) { background-color: $blueAccentColor; padding: 0 15px 0 10px; margin: auto 2px; + border-radius: 6px; a, i { -- cgit v1.2.3 From 7d5e84fec18b4edb2d8ce293c2b7c9e1e28afb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 31 May 2017 22:36:21 +0200 Subject: Defined MySQL as the default rdbms for wallabag --- app/config/parameters.yml.dist | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 97f51ed1..c867aa6d 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -10,17 +10,18 @@ parameters: # database_user: %env.database_user% # database_password: %env.database_password% - database_driver: pdo_sqlite + database_driver: pdo_mysql database_host: 127.0.0.1 database_port: ~ database_name: symfony database_user: root database_password: ~ - database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" + # For SQLite, database_path should be "%kernel.root_dir%/../data/db/wallabag.sqlite" + database_path: null database_table_prefix: wallabag_ database_socket: null - # with MySQL, use "utf8mb4" if you got problem with content with emojis - database_charset: utf8 + # with PostgreSQL and SQLite, you can set "utf8" + database_charset: utf8mb4 mailer_transport: smtp mailer_host: 127.0.0.1 -- cgit v1.2.3 From 46825cfffbe8cd2e1713fce7f1c655c483c31fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 31 May 2017 22:50:18 +0200 Subject: Fixed @tcitworld 's review --- app/config/parameters.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index c867aa6d..dfb33489 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -20,7 +20,7 @@ parameters: database_path: null database_table_prefix: wallabag_ database_socket: null - # with PostgreSQL and SQLite, you can set "utf8" + # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 mailer_transport: smtp -- cgit v1.2.3 From ec42e697ea40e2fa9dbefba8b74ff820199c1118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 1 Jun 2017 09:17:05 +0200 Subject: Changed default database name --- app/config/parameters.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index dfb33489..afcee039 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -13,7 +13,7 @@ parameters: database_driver: pdo_mysql database_host: 127.0.0.1 database_port: ~ - database_name: symfony + database_name: wallabag database_user: root database_password: ~ # For SQLite, database_path should be "%kernel.root_dir%/../data/db/wallabag.sqlite" -- cgit v1.2.3 From 1c5da417e4ddb14223f9af6e5cea6778e5c0fd08 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Tue, 6 Dec 2016 22:27:08 -0500 Subject: Put default fetching error title in global config --- app/config/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index 9792616e..04f8547d 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -58,6 +58,7 @@ wallabag_core: cache_lifetime: 10 action_mark_as_read: 1 list_mode: 0 + fetching_error_message_title: 'No title found' fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 -- cgit v1.2.3 From 426bb453d295900fb3e35dce2f9081a42639cf27 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 2 Jun 2017 10:19:33 +0200 Subject: API user creation behing a toggle I've added a toggle feature (in internal settings) so that user api creation can be disabled while form registration still can be enabled. Also, the /api/user endpoint shouldn't require authentication. Even if we check the authentication when sending a GET request, to retrieve current user information. I've moved all the internal settings definition to config to avoid duplicated place to define them. I don't know why we didn't did that earlier. --- app/DoctrineMigrations/Version20170602075214.php | 52 +++++++++ app/config/config.yml | 129 +++++++++++++++++++++++ app/config/security.yml | 1 + 3 files changed, 182 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170602075214.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170602075214.php b/app/DoctrineMigrations/Version20170602075214.php new file mode 100644 index 00000000..451d16ba --- /dev/null +++ b/app/DoctrineMigrations/Version20170602075214.php @@ -0,0 +1,52 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $apiUserRegistration = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration'"); + + $this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.'); + + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('api_user_registration', '0', 'api')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration';"); + } +} diff --git a/app/config/config.yml b/app/config/config.yml index 04f8547d..b0d330ab 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -62,6 +62,135 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 + default_internal_settings: + - + name: share_public + value: 1 + section: entry + - + name: carrot + value: 1 + section: entry + - + name: share_diaspora + value: 1 + section: entry + - + name: diaspora_url + value: http://diasporapod.com + section: entry + - + name: share_unmark + value: 1 + section: entry + - + name: unmark_url + value: https://unmark.it + section: entry + - + name: share_shaarli + value: 1 + section: entry + - + name: share_scuttle + value: 1 + section: entry + - + name: shaarli_url + value: http://myshaarli.com + section: entry + - + name: scuttle_url + value: http://scuttle.org + section: entry + - + name: share_mail + value: 1 + section: entry + - + name: share_twitter + value: 1 + section: entry + - + name: show_printlink + value: 1 + section: entry + - + name: restricted_access + value: 0 + section: entry + - + name: export_epub + value: 1 + section: export + - + name: export_mobi + value: 1 + section: export + - + name: export_pdf + value: 1 + section: export + - + name: export_csv + value: 1 + section: export + - + name: export_json + value: 1 + section: export + - + name: export_txt + value: 1 + section: export + - + name: export_xml + value: 1 + section: export + - + name: import_with_redis + value: 0 + section: import + - + name: import_with_rabbitmq + value: 0 + section: import + - + name: piwik_enabled + value: 0 + section: analytics + - + name: piwik_host + value: v2.wallabag.org + section: analytics + - + name: piwik_site_id + value: 1 + section: analytics + - + name: demo_mode_enabled + value: 0 + section: misc + - + name: demo_mode_username + value: wallabag + section: misc + - + name: download_images_enabled + value: 0 + section: misc + - + name: wallabag_support_url + value: https://www.wallabag.org/pages/support.html + section: misc + - + name: wallabag_url + value: http://v2.wallabag.org + section: misc + - + name: api_user_registration + value: 0 + section: api wallabag_user: registration_enabled: "%fosuser_registration%" diff --git a/app/config/security.yml b/app/config/security.yml index efb00a53..ffb1d356 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -56,6 +56,7 @@ security: access_control: - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } -- cgit v1.2.3 From 1b9cd91782ed8341d2e608371201348c59986f23 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 2 Jun 2017 10:27:15 +0200 Subject: Add translation --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml | 1 + app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml | 1 + 12 files changed, 12 insertions(+) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index d1f7e3b5..20e938f5 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -34,3 +34,4 @@ demo_mode_username: "Demobruger" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 1105675b..526d41bc 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -34,3 +34,4 @@ demo_mode_username: "Test-Benutzer" share_public: Erlaube eine öffentliche URL für Einträge # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 802599b3..3c0037f3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -34,3 +34,4 @@ demo_mode_username: "Demo user" share_public: Allow public url for entries download_images_enabled: Download images locally restricted_access: Enable authentication for websites with paywall +api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index b3ac18ed..99869669 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -34,3 +34,4 @@ demo_mode_username: "Nombre de usuario demo" share_public: Permitir URL pública para los artículos download_images_enabled: Descargar imágenes localmente restricted_access: Activar autenticación para websites con paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index c73d63e2..2e1307e5 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -34,3 +34,4 @@ modify_settings: "اعمال" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index a53174ae..454053ad 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -34,3 +34,4 @@ demo_mode_username: "Utilisateur de la démo" share_public: Autoriser une URL publique pour les articles download_images_enabled: Télécharger les images en local restricted_access: Activer l'authentification pour les articles derrière un paywall +api_user_registration: Activer la création de compte depuis l'API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 3d53fc8d..7d5ac3d2 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -34,3 +34,4 @@ demo_mode_username: "Utente Demo" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 79f75245..00c06638 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -34,3 +34,4 @@ demo_mode_username: "Utilizaire de la demostracion" share_public: Autorizar una URL publica pels articles download_images_enabled: Telecargar los imatges en local restricted_access: Activar l'autenticacion pels sites amb peatge +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 02fe98e3..81ddefd1 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -34,3 +34,4 @@ demo_mode_username: "Użytkownik Demonstracyjny" share_public: Zezwalaj na publiczny adres url dla wpisow download_images_enabled: Pobierz obrazy lokalnie restricted_access: Włącz autoryzację dla stron z paywallem +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 4a061bce..59af9610 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -34,3 +34,4 @@ demo_mode_username: "Usuário demo" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 5ee48074..104e37c6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -34,3 +34,4 @@ modify_settings: "aplică" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index d83a4b7b..1579366d 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml @@ -34,3 +34,4 @@ # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall +# api_user_registration: Enable user to be registered using the API -- cgit v1.2.3 From bf7f0cb5a310f661d969199d7f01b738f5804f3b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 2 Jun 2017 10:46:04 +0200 Subject: Use a dedicated file for wallabag config --- app/config/config.yml | 166 +----------------------------------------------- app/config/wallabag.yml | 164 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 165 deletions(-) create mode 100644 app/config/wallabag.yml (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index b0d330ab..2bc5e3b3 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -2,6 +2,7 @@ imports: - { resource: parameters.yml } - { resource: security.yml } - { resource: services.yml } + - { resource: wallabag.yml } parameters: # Allows to use the live reload feature for changes in assets @@ -34,171 +35,6 @@ framework: http_method_override: true assets: ~ -wallabag_core: - version: 2.2.3 - paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" - languages: - en: 'English' - fr: 'Français' - de: 'Deutsch' - tr: 'Türkçe' - fa: 'فارسی' - ro: 'Română' - pl: 'Polish' - da: 'Dansk' - es: 'Español' - oc: 'Occitan' - it: 'Italiano' - pt: 'Português' - items_on_page: 12 - theme: material - language: '%locale%' - rss_limit: 50 - reading_speed: 1 - cache_lifetime: 10 - action_mark_as_read: 1 - list_mode: 0 - fetching_error_message_title: 'No title found' - fetching_error_message: | - wallabag can't retrieve contents for this article. Please troubleshoot this issue. - api_limit_mass_actions: 10 - default_internal_settings: - - - name: share_public - value: 1 - section: entry - - - name: carrot - value: 1 - section: entry - - - name: share_diaspora - value: 1 - section: entry - - - name: diaspora_url - value: http://diasporapod.com - section: entry - - - name: share_unmark - value: 1 - section: entry - - - name: unmark_url - value: https://unmark.it - section: entry - - - name: share_shaarli - value: 1 - section: entry - - - name: share_scuttle - value: 1 - section: entry - - - name: shaarli_url - value: http://myshaarli.com - section: entry - - - name: scuttle_url - value: http://scuttle.org - section: entry - - - name: share_mail - value: 1 - section: entry - - - name: share_twitter - value: 1 - section: entry - - - name: show_printlink - value: 1 - section: entry - - - name: restricted_access - value: 0 - section: entry - - - name: export_epub - value: 1 - section: export - - - name: export_mobi - value: 1 - section: export - - - name: export_pdf - value: 1 - section: export - - - name: export_csv - value: 1 - section: export - - - name: export_json - value: 1 - section: export - - - name: export_txt - value: 1 - section: export - - - name: export_xml - value: 1 - section: export - - - name: import_with_redis - value: 0 - section: import - - - name: import_with_rabbitmq - value: 0 - section: import - - - name: piwik_enabled - value: 0 - section: analytics - - - name: piwik_host - value: v2.wallabag.org - section: analytics - - - name: piwik_site_id - value: 1 - section: analytics - - - name: demo_mode_enabled - value: 0 - section: misc - - - name: demo_mode_username - value: wallabag - section: misc - - - name: download_images_enabled - value: 0 - section: misc - - - name: wallabag_support_url - value: https://www.wallabag.org/pages/support.html - section: misc - - - name: wallabag_url - value: http://v2.wallabag.org - section: misc - - - name: api_user_registration - value: 0 - section: api - -wallabag_user: - registration_enabled: "%fosuser_registration%" - -wallabag_import: - allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] - resource_dir: "%kernel.root_dir%/../web/uploads/import" - # Twig Configuration twig: debug: "%kernel.debug%" diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml new file mode 100644 index 00000000..d8c593c6 --- /dev/null +++ b/app/config/wallabag.yml @@ -0,0 +1,164 @@ +wallabag_core: + version: 2.2.3 + paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" + languages: + en: 'English' + fr: 'Français' + de: 'Deutsch' + tr: 'Türkçe' + fa: 'فارسی' + ro: 'Română' + pl: 'Polish' + da: 'Dansk' + es: 'Español' + oc: 'Occitan' + it: 'Italiano' + pt: 'Português' + items_on_page: 12 + theme: material + language: '%locale%' + rss_limit: 50 + reading_speed: 1 + cache_lifetime: 10 + action_mark_as_read: 1 + list_mode: 0 + fetching_error_message_title: 'No title found' + fetching_error_message: | + wallabag can't retrieve contents for this article. Please troubleshoot this issue. + api_limit_mass_actions: 10 + default_internal_settings: + - + name: share_public + value: 1 + section: entry + - + name: carrot + value: 1 + section: entry + - + name: share_diaspora + value: 1 + section: entry + - + name: diaspora_url + value: http://diasporapod.com + section: entry + - + name: share_unmark + value: 1 + section: entry + - + name: unmark_url + value: https://unmark.it + section: entry + - + name: share_shaarli + value: 1 + section: entry + - + name: share_scuttle + value: 1 + section: entry + - + name: shaarli_url + value: http://myshaarli.com + section: entry + - + name: scuttle_url + value: http://scuttle.org + section: entry + - + name: share_mail + value: 1 + section: entry + - + name: share_twitter + value: 1 + section: entry + - + name: show_printlink + value: 1 + section: entry + - + name: restricted_access + value: 0 + section: entry + - + name: export_epub + value: 1 + section: export + - + name: export_mobi + value: 1 + section: export + - + name: export_pdf + value: 1 + section: export + - + name: export_csv + value: 1 + section: export + - + name: export_json + value: 1 + section: export + - + name: export_txt + value: 1 + section: export + - + name: export_xml + value: 1 + section: export + - + name: import_with_redis + value: 0 + section: import + - + name: import_with_rabbitmq + value: 0 + section: import + - + name: piwik_enabled + value: 0 + section: analytics + - + name: piwik_host + value: v2.wallabag.org + section: analytics + - + name: piwik_site_id + value: 1 + section: analytics + - + name: demo_mode_enabled + value: 0 + section: misc + - + name: demo_mode_username + value: wallabag + section: misc + - + name: download_images_enabled + value: 0 + section: misc + - + name: wallabag_support_url + value: https://www.wallabag.org/pages/support.html + section: misc + - + name: wallabag_url + value: http://v2.wallabag.org + section: misc + - + name: api_user_registration + value: 0 + section: api + +wallabag_user: + registration_enabled: "%fosuser_registration%" + +wallabag_import: + allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] + resource_dir: "%kernel.root_dir%/../web/uploads/import" -- cgit v1.2.3 From 044079967b18f9e02b1d2bd838b1b79a5b047548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Benoist?= Date: Fri, 2 Jun 2017 11:45:45 +0200 Subject: Add :it: translation --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 7d5ac3d2..4dbd2ff8 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -34,4 +34,4 @@ demo_mode_username: "Utente Demo" # share_public: Allow public url for entries # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall -# api_user_registration: Enable user to be registered using the API +api_user_registration: Abilita la registrazione dell'utente attraverso l'API -- cgit v1.2.3 From d0f7b0cc60899ec821aaa1bb48c057a704c3004c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Rumi=C5=84ski?= Date: Fri, 2 Jun 2017 19:35:25 +0200 Subject: Update PL transation add missing translation --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 81ddefd1..ada11b3a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -34,4 +34,4 @@ demo_mode_username: "Użytkownik Demonstracyjny" share_public: Zezwalaj na publiczny adres url dla wpisow download_images_enabled: Pobierz obrazy lokalnie restricted_access: Włącz autoryzację dla stron z paywallem -# api_user_registration: Enable user to be registered using the API +api_user_registration: Włącz rejestrację użytkownika przy użyciu API -- cgit v1.2.3 From 2c3e148b0029a094431622feac79fafcd0d43fc8 Mon Sep 17 00:00:00 2001 From: adev Date: Sun, 7 May 2017 17:21:30 +0200 Subject: Displays an error with an annotation with a too long quote Fix #2762 --- app/DoctrineMigrations/Version20170511211659.php | 100 +++++++++++++++++++++++ app/Resources/static/themes/_global/index.js | 16 +++- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 app/DoctrineMigrations/Version20170511211659.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php new file mode 100644 index 00000000..d19b5ac5 --- /dev/null +++ b/app/DoctrineMigrations/Version20170511211659.php @@ -0,0 +1,100 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } + + public function up(Schema $schema) + { + $tableName = $this->getTable('annotation'); + + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'sqlite': + $this->addSql(<<addSql('DROP TABLE ' . $tableName); + $this->addSql(<<addSql(<<addSql('DROP TABLE __temp__wallabag_annotation'); + break; + + case 'mysql': + $this->addSql('ALTER TABLE '.$tableName.' MODIFY quote TEXT NOT NULL'); + break; + + case 'postgresql': + $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE TEXT NOT NULL '); + break; + } + } + + public function down(Schema $schema) + { + $tableName = $this->getTable('annotation'); + + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'sqlite': + throw new SkipMigrationException('Too complex ...'); + break; + + case 'mysql': + $this->addSql('ALTER TABLE '.$tableName.' MODIFY quote VARCHAR(255) NOT NULL'); + break; + + case 'postgresql': + $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE VARCHAR(255) NOT NULL '); + break; + } + } +} diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 3fdcaa3d..3ec26488 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -34,7 +34,21 @@ $(document).ready(() => { app.registry.registerUtility(authorization, 'authorizationPolicy'); const x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); + app.include(annotator.storage.http, $.extend({}, x, { + onError(msg, xhr) { + if (!Object.prototype.hasOwnProperty.call(xhr, 'responseJSON')) { + annotator.notification.banner('An error occurred', 'error'); + return; + } + $.each(xhr.responseJSON.children, (k, v) => { + if (v.errors) { + $.each(v.errors, (n, errorText) => { + annotator.notification.banner(errorText, 'error'); + }); + } + }); + }, + })); app.start().then(() => { app.annotations.load({ entry: x.entryId }); -- cgit v1.2.3 From be9d693e74e41fdcdb18bf80aa1aff614154bcce Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Jun 2017 10:42:19 +0200 Subject: remove craueconfig domain name setting and add a proper one in parameters --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml | 1 - app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml | 1 - app/config/parameters.yml.dist | 2 ++ app/config/wallabag.yml | 1 + 13 files changed, 3 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index 20e938f5..5475e571 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -20,7 +20,6 @@ share_twitter: Aktiver deling gennem Twitter share_unmark: Aktiver deling gennem Unmark.it show_printlink: Vis et link til print-indhold wallabag_support_url: Support-URL for wallabag -wallabag_url: URL for *sin* wallabag-installation entry: "artikel" export: "eksport" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 526d41bc..f57db303 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -20,7 +20,6 @@ share_twitter: Teilen zu Twitter aktiveren share_unmark: Teilen zu Unmark.it aktiveren show_printlink: Link anzeigen, um den Inhalt auszudrucken wallabag_support_url: Support-URL für wallabag -wallabag_url: URL von *deiner* wallabag-Instanz entry: "Artikel" export: "Export" import: "Import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 3c0037f3..1e4f4668 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -20,7 +20,6 @@ share_twitter: Enable share to Twitter share_unmark: Enable share to Unmark.it show_printlink: Display a link to print content wallabag_support_url: Support URL for wallabag -wallabag_url: URL of *your* wallabag instance entry: "article" export: "export" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index 99869669..46ed4040 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -20,7 +20,6 @@ share_twitter: Activar compartir con Twitter share_unmark: Activar compartir con Unmark.it show_printlink: Mostrar un enlace para imprimir contenido wallabag_support_url: URL de soporte de wallabag -wallabag_url: URL de *tu* instancia de wallabag entry: "artículo" export: "exportar" import: "importar" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index 2e1307e5..f8da4acf 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -20,7 +20,6 @@ share_twitter: فعال‌سازی هم‌رسانی به Twitter share_unmark: فعال‌سازی هم‌رسانی به Unmark.it show_printlink: نمایش پیوندی برای چاپ مطلب wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag -wallabag_url: نشانی صفحهٔ wallabag *شما* entry: "مقاله" export: "برون‌سپاری" import: "درون‌ریزی" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index 454053ad..a79409b4 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -20,7 +20,6 @@ share_twitter: Activer le partage vers Twitter share_unmark: Activer le partage vers Unmark.it show_printlink: Afficher un lien pour imprimer wallabag_support_url: URL de support de wallabag -wallabag_url: URL de *votre* instance de wallabag entry: "article" export: "export" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 4dbd2ff8..dd4def4b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -20,7 +20,6 @@ share_twitter: Abilita la condivisione con Twitter share_unmark: Abilita la condivisione con Unmark.it show_printlink: Mostra un collegamento per stampare il contenuto wallabag_support_url: URL di supporto per wallabag -wallabag_url: URL della *tua* installazione di wallabag entry: "contenuto" export: "esporta" import: "importa" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 00c06638..66d9ae26 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -20,7 +20,6 @@ share_twitter: Activar lo partatge cap a Twitter share_unmark: Activar lo partatge cap a Unmark.it show_printlink: Afichar un ligam per imprimir wallabag_support_url: URL d'assisténcia de wallabag -wallabag_url: URL de *vòstra* instància de wallabag entry: "article" export: "expòrt" import: "impòrt" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index ada11b3a..04ad4fd3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -20,7 +20,6 @@ share_twitter: Włącz udostępnianie dla Twitter share_unmark: Włącz udostępnianie dla Unmark.it show_printlink: Pokaż link do wydrukowania zawartości wallabag_support_url: Adres URL wsparcia dla wallabag -wallabag_url: Adres *twojej* instacji wallabag entry: "artykuł" export: "eksport" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 59af9610..77e22b37 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -20,7 +20,6 @@ share_twitter: Habilitar compartilhamento para o Twitter share_unmark: Habilitar compartilhamento para o Unmark.it show_printlink: Mostrar um link para imprimir o conteúdo wallabag_support_url: URL de Suporte do wallabag -wallabag_url: URL de *sua* instância do wallabag entry: "artigo" export: "exportar" import: "importar" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 104e37c6..1b4bfb5b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -20,7 +20,6 @@ share_twitter: Permite share către Twitter share_unmark: Permite share către Unmark.it show_printlink: Afișează un link pentru a printa content-ul wallabag_support_url: URL-ul de suport pentru wallabag -wallabag_url: URL-ul instanței tale wallabag entry: "alticol" export: "exportă" import: "importă" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index afcee039..c00ffb0e 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,6 +23,8 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 + domain_name: wallabag.me + mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: ~ diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d8c593c6..65bac1b4 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,6 +26,7 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 + domain_name: '%domain_name%' default_internal_settings: - name: share_public -- cgit v1.2.3 From d6c4c484c46706f9eecf81af3f64649f014418e1 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 6 Jun 2017 16:04:51 +0200 Subject: add migration --- app/DoctrineMigrations/Version20170606155640.php | 52 ++++++++++++++++++++++++ app/config/wallabag.yml | 4 -- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 app/DoctrineMigrations/Version20170606155640.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php new file mode 100644 index 00000000..1b234044 --- /dev/null +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -0,0 +1,52 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $apiUserRegistration = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + + $this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.'); + + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); + } +} diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 65bac1b4..d03450a0 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -148,10 +148,6 @@ wallabag_core: name: wallabag_support_url value: https://www.wallabag.org/pages/support.html section: misc - - - name: wallabag_url - value: http://v2.wallabag.org - section: misc - name: api_user_registration value: 0 -- cgit v1.2.3 From e48b238a3e2c387be1f897e6f2c3c481d25f5203 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 6 Jun 2017 16:18:25 +0200 Subject: fix tests --- app/config/parameters_test.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 010785e6..92f0364f 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,3 +8,4 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 + domain_name: 'http://v2.wallabag.org' -- cgit v1.2.3 From c406cef5b69b0d6c43adef33b5374b209347b637 Mon Sep 17 00:00:00 2001 From: adev Date: Wed, 7 Jun 2017 00:12:20 +0200 Subject: Fix postgresql migration --- app/DoctrineMigrations/Version20170511211659.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php index d19b5ac5..f2d5cf5e 100644 --- a/app/DoctrineMigrations/Version20170511211659.php +++ b/app/DoctrineMigrations/Version20170511211659.php @@ -74,7 +74,7 @@ EOD break; case 'postgresql': - $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE TEXT NOT NULL '); + $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE TEXT'); break; } } @@ -93,7 +93,7 @@ EOD break; case 'postgresql': - $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE VARCHAR(255) NOT NULL '); + $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE VARCHAR(255)'); break; } } -- cgit v1.2.3 From 80f4d85ac92ab4dc490c51f2d831ac7fa3853826 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 8 Jun 2017 19:15:33 +0200 Subject: Review --- app/DoctrineMigrations/Version20170606155640.php | 3 ++- app/config/parameters.yml.dist | 2 +- app/config/parameters_test.yml | 1 - app/config/wallabag.yml | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php index 1b234044..e9b50428 100644 --- a/app/DoctrineMigrations/Version20170606155640.php +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -8,7 +8,8 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Add api_user_registration in craue_config_setting. + * Remove wallabag_url from craue_config_setting. + * It has been moved into the parameters.yml */ class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index c00ffb0e..d827219a 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,7 +23,7 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: wallabag.me + domain_name: http://your-wallabag-url-instance.com mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 92f0364f..010785e6 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,4 +8,3 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 - domain_name: 'http://v2.wallabag.org' diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d03450a0..51b7e4e3 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,7 +26,6 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 - domain_name: '%domain_name%' default_internal_settings: - name: share_public -- cgit v1.2.3 From 1a94252831638cf41f0fe489939dee9dae1c1251 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 9 Jun 2017 10:07:27 +0200 Subject: Promote https --- app/config/parameters.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index d827219a..914fb1ef 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,7 +23,7 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: http://your-wallabag-url-instance.com + domain_name: https://your-wallabag-url-instance.com mailer_transport: smtp mailer_host: 127.0.0.1 -- cgit v1.2.3 From b662c65e573b49d0d463ddfe6ee65839037a4b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 12 Jun 2017 10:44:08 +0200 Subject: Fixed internal settings form --- app/Resources/CraueConfigBundle/views/Settings/modify.html.twig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig index b81b8651..db153270 100644 --- a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig +++ b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig @@ -33,8 +33,7 @@ {{ 'modify_settings' | trans({}, 'CraueConfigBundle') }} - {{ form_rest(form) }} - {{ form_end(form) }} + {{ form_widget(form._token) }} -- cgit v1.2.3 From dfd821dcfb2ad0eb59dcddbd5130e09fd26bc781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 13 Jun 2017 16:52:14 +0200 Subject: Removed padding on entry view --- app/Resources/static/themes/material/css/layout.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss index 8b8b06e6..ed32f125 100755 --- a/app/Resources/static/themes/material/css/layout.scss +++ b/app/Resources/static/themes/material/css/layout.scss @@ -19,7 +19,7 @@ body { } nav, -main, +body:not(.entry) main, footer { padding-left: 240px; } -- cgit v1.2.3 From f99ebec0f2f39105147e3bdae790311db38c5ef9 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 15 Jun 2017 07:58:12 +0200 Subject: Fix mobile view and update asset deps Signed-off-by: Thomas Citharel --- app/Resources/static/themes/baggy/index.js | 3 +-- app/Resources/static/themes/material/css/layout.scss | 6 ------ .../static/themes/material/css/media_queries.scss | 15 +++++++++------ 3 files changed, 10 insertions(+), 14 deletions(-) (limited to 'app') diff --git a/app/Resources/static/themes/baggy/index.js b/app/Resources/static/themes/baggy/index.js index 5d448018..39ad49aa 100755 --- a/app/Resources/static/themes/baggy/index.js +++ b/app/Resources/static/themes/baggy/index.js @@ -256,8 +256,7 @@ $(document).ready(() => { ========================================================================== */ $('article a[href^="http"]').after( - () => `', + () => ``, ); $('.add-to-wallabag-link-after').click((event) => { diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss index ed32f125..cfdbf2b3 100755 --- a/app/Resources/static/themes/material/css/layout.scss +++ b/app/Resources/static/themes/material/css/layout.scss @@ -18,12 +18,6 @@ body { border-bottom: 1px solid #ddd; } -nav, -body:not(.entry) main, -footer { - padding-left: 240px; -} - main, #content, .valign-wrapper { diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 96f34494..08c2d8ab 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -2,16 +2,19 @@ Media queries ========================================================================== */ -@media only screen and (max-width: 992px) { - header, - main, +@media only screen and (min-width: 992px) { + nav, + body:not(.entry) main, footer { - padding-left: 0; + padding-left: 240px; } +} - nav, +@media only screen and (max-width: 992px) { + header, main, - footer { + footer, + nav { padding-left: 0; } -- cgit v1.2.3 From f92fcb53ca78cc8822962e676b0db117e1a08aa5 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 4 Dec 2016 13:51:58 +0100 Subject: Add CRUD for site credentials --- app/DoctrineMigrations/Version20161204115751.php | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 app/DoctrineMigrations/Version20161204115751.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161204115751.php b/app/DoctrineMigrations/Version20161204115751.php new file mode 100644 index 00000000..97635fa7 --- /dev/null +++ b/app/DoctrineMigrations/Version20161204115751.php @@ -0,0 +1,56 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.'); + + $table = $schema->createTable($this->getTable('site_credential')); + $table->addColumn('id', 'integer', ['autoincrement' => true]); + $table->addColumn('user_id', 'integer'); + $table->addColumn('host', 'string', ['length' => 255]); + $table->addColumn('username', 'string', ['length' => 255]); + $table->addColumn('password', 'string', ['length' => 255]); + $table->addColumn('createdAt', 'datetime'); + $table->addIndex(['user_id'], 'idx_user'); + $table->setPrimaryKey(['id']); + $table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $schema->dropTable($this->getTable('site_credential')); + } +} -- cgit v1.2.3 From 5a9bc00726ddaf7c8798d4932d0a8b7a38422670 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 1 May 2017 22:13:17 +0200 Subject: Retrieve username/password from database Inject the current user & the repo to retrieve username/password from the database --- app/config/parameters.yml.dist | 3 --- 1 file changed, 3 deletions(-) (limited to 'app') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 914fb1ef..b3fe11c8 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -60,6 +60,3 @@ parameters: redis_port: 6379 redis_path: null redis_password: null - - # sites credentials - sites_credentials: {} -- cgit v1.2.3 From fd7fde95159828960784a438c4b4da147e20ab18 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 2 May 2017 08:38:22 +0200 Subject: Force sequence creation for postgresql --- app/DoctrineMigrations/Version20161204115751.php | 56 ---------------------- app/DoctrineMigrations/Version20170501115751.php | 61 ++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 56 deletions(-) delete mode 100644 app/DoctrineMigrations/Version20161204115751.php create mode 100644 app/DoctrineMigrations/Version20170501115751.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161204115751.php b/app/DoctrineMigrations/Version20161204115751.php deleted file mode 100644 index 97635fa7..00000000 --- a/app/DoctrineMigrations/Version20161204115751.php +++ /dev/null @@ -1,56 +0,0 @@ -container = $container; - } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - - /** - * @param Schema $schema - */ - public function up(Schema $schema) - { - $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.'); - - $table = $schema->createTable($this->getTable('site_credential')); - $table->addColumn('id', 'integer', ['autoincrement' => true]); - $table->addColumn('user_id', 'integer'); - $table->addColumn('host', 'string', ['length' => 255]); - $table->addColumn('username', 'string', ['length' => 255]); - $table->addColumn('password', 'string', ['length' => 255]); - $table->addColumn('createdAt', 'datetime'); - $table->addIndex(['user_id'], 'idx_user'); - $table->setPrimaryKey(['id']); - $table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user'); - } - - /** - * @param Schema $schema - */ - public function down(Schema $schema) - { - $schema->dropTable($this->getTable('site_credential')); - } -} diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php new file mode 100644 index 00000000..846a87b5 --- /dev/null +++ b/app/DoctrineMigrations/Version20170501115751.php @@ -0,0 +1,61 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.'); + + $table = $schema->createTable($this->getTable('site_credential')); + $table->addColumn('id', 'integer', ['autoincrement' => true]); + $table->addColumn('user_id', 'integer'); + $table->addColumn('host', 'string', ['length' => 255]); + $table->addColumn('username', 'string', ['length' => 255]); + $table->addColumn('password', 'string', ['length' => 255]); + $table->addColumn('createdAt', 'datetime'); + $table->addIndex(['user_id'], 'idx_user'); + $table->setPrimaryKey(['id']); + $table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user'); + + if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { + $schema->dropSequence('site_credential_id_seq'); + $schema->createSequence('site_credential_id_seq'); + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $schema->dropTable($this->getTable('site_credential')); + } +} -- cgit v1.2.3 From 906424c1b6fd884bf2081bfe6dd0b1f9651c2801 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 11 Jun 2017 23:05:19 +0200 Subject: Crypt site credential password --- app/DoctrineMigrations/Version20170501115751.php | 2 +- app/config/wallabag.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php index 846a87b5..2597f1ff 100644 --- a/app/DoctrineMigrations/Version20170501115751.php +++ b/app/DoctrineMigrations/Version20170501115751.php @@ -39,7 +39,7 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI $table->addColumn('user_id', 'integer'); $table->addColumn('host', 'string', ['length' => 255]); $table->addColumn('username', 'string', ['length' => 255]); - $table->addColumn('password', 'string', ['length' => 255]); + $table->addColumn('password', 'text'); $table->addColumn('createdAt', 'datetime'); $table->addIndex(['user_id'], 'idx_user'); $table->setPrimaryKey(['id']); diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 51b7e4e3..b45934e4 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,6 +26,7 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 + encryption_key_path: "%kernel.root_dir%/../data/site-credentials-secret-key.txt" default_internal_settings: - name: share_public -- cgit v1.2.3 From bead8b42da4f17238dc0d5e0f90184b224ec5df7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 14 Jun 2017 15:02:34 +0200 Subject: Fix reviews Encrypt username too Redirect to list after saving credentials Fix typos Signed-off-by: Thomas Citharel --- app/DoctrineMigrations/Version20170501115751.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php index 2597f1ff..7f068eb8 100644 --- a/app/DoctrineMigrations/Version20170501115751.php +++ b/app/DoctrineMigrations/Version20170501115751.php @@ -38,7 +38,7 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI $table->addColumn('id', 'integer', ['autoincrement' => true]); $table->addColumn('user_id', 'integer'); $table->addColumn('host', 'string', ['length' => 255]); - $table->addColumn('username', 'string', ['length' => 255]); + $table->addColumn('username', 'text'); $table->addColumn('password', 'text'); $table->addColumn('createdAt', 'datetime'); $table->addIndex(['user_id'], 'idx_user'); -- cgit v1.2.3 From 18c38dffc67d04e59a9cc26b6910d9b9a4a49cd6 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 10 Jun 2017 13:11:08 +0200 Subject: Add RSS tags feeds --- app/config/security.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/security.yml b/app/config/security.yml index ffb1d356..e14a0bd1 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -61,6 +61,7 @@ security: - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/settings, roles: ROLE_SUPER_ADMIN } - { path: ^/annotations, roles: ROLE_USER } -- cgit v1.2.3 From 789c46821db9fbab5bbea99846fa0021d779a592 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 20 Jun 2017 07:14:04 +0200 Subject: Fix linter issue on webpack config files --- app/config/webpack/common.js | 9 ++++---- app/config/webpack/dev.js | 23 ++++++++++---------- app/config/webpack/prod.js | 50 ++++++++++++++++++++++---------------------- 3 files changed, 40 insertions(+), 42 deletions(-) (limited to 'app') diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js index 4f5739f0..1ef193c7 100644 --- a/app/config/webpack/common.js +++ b/app/config/webpack/common.js @@ -4,13 +4,12 @@ const StyleLintPlugin = require('stylelint-webpack-plugin'); const rootDir = path.resolve(__dirname, '../../../'); -module.exports = function() { +module.exports = function () { return { entry: { material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), }, - output: { filename: '[name].js', path: path.resolve(rootDir, 'web/bundles/wallabagcore'), @@ -21,7 +20,7 @@ module.exports = function() { $: 'jquery', jQuery: 'jquery', 'window.$': 'jquery', - 'window.jQuery': 'jquery' + 'window.jQuery': 'jquery', }), new StyleLintPlugin({ configFile: '.stylelintrc', @@ -33,8 +32,8 @@ module.exports = function() { ], resolve: { alias: { - jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js') - } + jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'), + }, }, }; }; diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js index 771df65b..b6551152 100644 --- a/app/config/webpack/dev.js +++ b/app/config/webpack/dev.js @@ -1,13 +1,12 @@ const webpackMerge = require('webpack-merge'); const webpack = require('webpack'); -const path = require('path'); const commonConfig = require('./common.js'); module.exports = function () { return webpackMerge(commonConfig(), { devtool: 'eval-source-map', output: { - filename: '[name].dev.js' + filename: '[name].dev.js', }, devServer: { @@ -34,9 +33,9 @@ module.exports = function () { use: { loader: 'babel-loader', options: { - presets: ['env'] - } - } + presets: ['env'], + }, + }, }, { test: /\.(s)?css$/, @@ -46,17 +45,17 @@ module.exports = function () { loader: 'css-loader', options: { importLoaders: 1, - } + }, }, - 'postcss-loader', - 'sass-loader' - ] + 'postcss-loader', + 'sass-loader', + ], }, { test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/, - use: 'url-loader' + use: 'url-loader', }, - ] + ], }, - }) + }); }; diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js index ef41ab99..44961cc5 100644 --- a/app/config/webpack/prod.js +++ b/app/config/webpack/prod.js @@ -5,34 +5,34 @@ const ManifestPlugin = require('webpack-manifest-plugin'); const commonConfig = require('./common.js'); -module.exports = function() { +module.exports = function () { return webpackMerge(commonConfig(), { output: { - filename: '[name].js' + filename: '[name].js', }, devtool: 'source-map', plugins: [ new webpack.DefinePlugin({ 'process.env': { - 'NODE_ENV': JSON.stringify('production') - } + 'NODE_ENV': JSON.stringify('production'), + }, }), new webpack.optimize.UglifyJsPlugin({ beautify: false, mangle: { screw_ie8: true, - keep_fnames: true + keep_fnames: true, }, compress: { screw_ie8: true, - warnings: false + warnings: false, }, - comments: false + comments: false, }), new ExtractTextPlugin('[name].css'), new ManifestPlugin({ fileName: 'manifest.json', - }) + }), ], module: { rules: [ @@ -48,9 +48,9 @@ module.exports = function() { use: { loader: 'babel-loader', options: { - presets: ['env'] - } - } + presets: ['env'], + }, + }, }, { test: /\.(s)?css$/, @@ -63,17 +63,17 @@ module.exports = function() { importLoaders: 1, minimize: { discardComments: { - removeAll: true + removeAll: true, }, core: true, - minifyFontValues: true - } - } + minifyFontValues: true, + }, + }, }, 'postcss-loader', - 'sass-loader' - ] - }) + 'sass-loader', + ], + }), }, { test: /\.(jpg|png|gif|svg)$/, @@ -81,8 +81,8 @@ module.exports = function() { loader: 'file-loader', options: { name: 'img/[name].[ext]', - } - } + }, + }, }, { test: /\.(eot|ttf|woff|woff2)$/, @@ -90,10 +90,10 @@ module.exports = function() { loader: 'file-loader', options: { name: 'fonts/[name].[ext]', - } - } - } - ] + }, + }, + }, + ], }, - }) + }); }; -- cgit v1.2.3 From 6b1b148d655eec4411e13a90a0bd050b923e3ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 20 Jun 2017 07:14:37 +0200 Subject: Add share.scss file Still needs to include it in the twig template --- app/Resources/static/themes/_global/share.scss | 407 +++++++++++++++++++++++++ 1 file changed, 407 insertions(+) create mode 100644 app/Resources/static/themes/_global/share.scss (limited to 'app') diff --git a/app/Resources/static/themes/_global/share.scss b/app/Resources/static/themes/_global/share.scss new file mode 100644 index 00000000..5a853324 --- /dev/null +++ b/app/Resources/static/themes/_global/share.scss @@ -0,0 +1,407 @@ +/* -------------------------- Reset ------------------- */ + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +b, +u, +i, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + vertical-align: baseline; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} + +body { + line-height: 1; +} + +blockquote, +q { + quotes: none; +} + +blockquote::before, +blockquote::after, +q::before, +q::after { + content: ''; + content: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +/* -------------------------- General properties ------------------- */ + +body { + background-color: white; + color: #444; + font-family: Georgia; + line-height: 1.7; + -ms-content-zooming: none; + margin-bottom: 64px; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 600; + margin: 0.2em 0; +} + +article h1, +article h2, +article h3, +article h4, +article h5, +article h6 { + text-align: left !important; + line-height: 1.3; +} + +h1 { + font-size: 1.4em; +} + +h2 { + font-size: 1.3em; +} + +h3, +h4 { + font-size: 1.2em; +} + +h5, +h6 { + font-size: 1.1em; +} + +p { + margin-bottom: 0.75em; +} + +b, +strong { + font-weight: bold; +} + +i, +em { + font-style: italic; +} + +a { + color: #444; + text-decoration: underline; +} + +a:active, +a:hover { + outline: 0; +} + +p, +ul, +ol, +dl { + margin: 0 0 1.75em; +} + +ul, +ol { + padding-left: 1.25em; +} + +li { + padding-bottom: 0.2em; + line-height: 1.6; +} + +li p:last-child, +li li:last-child { + margin-bottom: -0.2em; +} + +ul li:last-child, +ol li:last-child { + padding-bottom: 0; +} + +mark { + padding: 0 0.2em; +} + +mark a { + text-decoration: none; +} + +blockquote { + font-style: italic; + border-left: 0.25em solid black; + margin-left: -20px; + padding-left: 17px; + margin-bottom: 0.5em; + margin-top: 0.5em; +} + +blockquote cite { + text-transform: uppercase; + font-size: 0.8em; + font-style: normal; +} + +blockquote cite::before { + content: "—"; + margin-right: 0.5em; +} + +img { + display: block; + height: auto; + margin-bottom: 0.5em; + max-width: 100%; +} + +figure { + margin: 0; +} + +figure figcaption { + display: block; + margin-top: 0.3em; + font-style: italic; + font-size: 0.8em; +} + +button { + display: none !important; +} + +hr { + display: block; + height: 1px; + border: solid #666; + border-width: 1px 0 0; + margin: 1.6em 0; + padding: 0; +} + +small { + font-size: 0.7em; +} + +dl { + margin: 1.6em 0; +} + +dl dt { + float: left; + width: 11.25em; + overflow: hidden; + clear: left; + text-align: right; + -ms-text-overflow: ellipsis; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + font-weight: bold; + margin-bottom: 1em; +} + +dl dd { + margin-left: 12.5em; + margin-bottom: 1em; +} + +pre { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 4em 0; + border: 0.0625em solid #efefef; + width: 100%; + padding: 1em; + font-family: Consolas, monospace; + white-space: pre; + overflow: auto; +} + +pre code { + font-size: 0.8em; + line-height: 1.6em; + white-space: pre-wrap; + background: transparent; + border: none; + padding: 0; + vertical-align: inherit; +} + +code { + padding: 0.125em 0.375em; + margin: 0 0.2em; + font-family: Consolas, monospace; + font-size: 0.8em; + white-space: pre; + border: 1px solid lightgray; + overflow: auto; +} + +audio, +video { + max-width: 43.75em; +} + +::selection, +mark { + background: #666; + color: white; +} + +table { + border-collapse: collapse; + margin-bottom: 2em; + width: 100%; +} + +th, +td { + padding: 0.25em; + text-align: left; +} + +thead tr { + text-transform: uppercase; + font-size: 0.85em; + letter-spacing: 1px; + font-family: "Segoe UI", sans-serif; + font-weight: 600; +} + +tbody tr:nth-child(2n+1) { + background: rgba(0, 0, 0, 0.1); +} + +tbody { + border: solid #999; + border-width: 1px 0; +} + +article { + padding: 0 1em; +} + +/* --------------------- Responsive design ------------------------- */ + +@media (min-width: 720px) { + blockquote { + margin-left: -1.4375em; + padding-left: 1.25em; + } + + article { + margin: 0 auto; + max-width: 43.75em; + padding: 0 1.25em; + } + + header { + max-width: 43.75em; + margin: 0 auto; + margin-top: 32px; + text-align: center; + } +} -- cgit v1.2.3 From 77255d668828d7ae4cceb186b5215a0d4ddd69f6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 22 Jun 2017 12:15:24 +0200 Subject: Add css on share public page --- app/Resources/static/themes/_global/share.js | 1 + app/config/webpack/common.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 app/Resources/static/themes/_global/share.js (limited to 'app') diff --git a/app/Resources/static/themes/_global/share.js b/app/Resources/static/themes/_global/share.js new file mode 100644 index 00000000..d7078616 --- /dev/null +++ b/app/Resources/static/themes/_global/share.js @@ -0,0 +1 @@ +import './share.scss'; diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js index 1ef193c7..c497689a 100644 --- a/app/config/webpack/common.js +++ b/app/config/webpack/common.js @@ -9,6 +9,7 @@ module.exports = function () { entry: { material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), + public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'), }, output: { filename: '[name].js', -- cgit v1.2.3 From f808b01692a835673f328d7221ba8c212caa9b61 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Jul 2017 09:52:38 +0200 Subject: Add a real configuration for CS-Fixer --- app/AppKernel.php | 14 +++--- app/DoctrineMigrations/Version20160410190541.php | 16 +++---- app/DoctrineMigrations/Version20160812120952.php | 10 ++-- app/DoctrineMigrations/Version20160911214952.php | 22 ++++----- app/DoctrineMigrations/Version20160916201049.php | 14 +++--- app/DoctrineMigrations/Version20161001072726.php | 42 ++++++++--------- app/DoctrineMigrations/Version20161022134138.php | 60 ++++++++++++------------ app/DoctrineMigrations/Version20161024212538.php | 12 ++--- app/DoctrineMigrations/Version20161031132655.php | 16 +++---- app/DoctrineMigrations/Version20161104073720.php | 10 ++-- app/DoctrineMigrations/Version20161106113822.php | 10 ++-- app/DoctrineMigrations/Version20161117071626.php | 22 ++++----- app/DoctrineMigrations/Version20161118134328.php | 10 ++-- app/DoctrineMigrations/Version20161122144743.php | 16 +++---- app/DoctrineMigrations/Version20161122203647.php | 10 ++-- app/DoctrineMigrations/Version20161128084725.php | 10 ++-- app/DoctrineMigrations/Version20161128131503.php | 10 ++-- app/DoctrineMigrations/Version20161214094402.php | 26 +++++----- app/DoctrineMigrations/Version20161214094403.php | 10 ++-- app/DoctrineMigrations/Version20170127093841.php | 10 ++-- app/DoctrineMigrations/Version20170327194233.php | 20 ++++---- app/DoctrineMigrations/Version20170405182620.php | 10 ++-- app/DoctrineMigrations/Version20170407200919.php | 10 ++-- app/DoctrineMigrations/Version20170420134133.php | 16 +++---- app/DoctrineMigrations/Version20170501115751.php | 12 ++--- app/DoctrineMigrations/Version20170510082609.php | 14 +++--- app/DoctrineMigrations/Version20170511115400.php | 10 ++-- app/DoctrineMigrations/Version20170511211659.php | 24 ++++------ app/DoctrineMigrations/Version20170602075214.php | 16 +++---- app/DoctrineMigrations/Version20170606155640.php | 18 +++---- app/autoload.php | 6 +-- 31 files changed, 250 insertions(+), 256 deletions(-) (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index c50783a6..f1140943 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -1,7 +1,7 @@ getEnvironment(); + return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); } public function getLogDir() { - return dirname(__DIR__).'/var/logs'; + return dirname(__DIR__) . '/var/logs'; } public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); $loader->load(function ($container) { - if ($container->getParameter('use_webpack_dev_server')) { - $container->loadFromExtension('framework', [ + if ($container->getParameter('use_webpack_dev_server')) { + $container->loadFromExtension('framework', [ 'assets' => [ 'base_url' => 'http://localhost:8080/', ], ]); - } + } }); } } diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 5e5cae35..55c12ce1 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -22,11 +22,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -44,10 +39,10 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI $sharePublic = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); if (false === $sharePublic) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')"); } } @@ -59,6 +54,11 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI $entryTable = $schema->getTable($this->getTable('entry')); $entryTable->dropColumn('uid'); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index 13272267..677f30c3 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -22,11 +22,6 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -46,4 +41,9 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); $clientsTable->dropColumn('name'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index 4eae46e7..08cc8a03 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -22,11 +22,6 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,19 +30,19 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI $redis = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_redis'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'"); if (false === $redis) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_redis', 0, 'import')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')"); } $rabbitmq = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_rabbitmq'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'"); if (false === $rabbitmq) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')"); } $this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.'); @@ -58,7 +53,12 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_redis';"); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_rabbitmq';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index ff34c894..83503bc4 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -22,11 +22,6 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -37,7 +32,7 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI $this->skipIf($configTable->hasColumn('pocket_consumer_key'), 'It seems that you already played this migration.'); $configTable->addColumn('pocket_consumer_key', 'string', ['notnull' => false]); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'pocket_consumer_key';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';"); } /** @@ -47,6 +42,11 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI { $configTable = $schema->getTable($this->getTable('config')); $configTable->dropColumn('pocket_consumer_key'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index ad761541..4babe172 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -3,10 +3,10 @@ namespace Application\Migrations; use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Schema\Schema; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -use Doctrine\DBAL\Migrations\SkipMigrationException; /** * Added pocket_consumer_key field on wallabag_config. @@ -23,17 +23,12 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); // remove all FK from entry_tag switch ($this->connection->getDatabasePlatform()->getName()) { @@ -41,16 +36,15 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI $query = $this->connection->query(" SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage - WHERE TABLE_NAME = '".$this->getTable('entry_tag')."' AND CONSTRAINT_NAME LIKE 'FK_%' - AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'" + WHERE TABLE_NAME = '" . $this->getTable('entry_tag') . "' AND CONSTRAINT_NAME LIKE 'FK_%' + AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'" ); $query->execute(); foreach ($query->fetchAll() as $fk) { - $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']); + $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); } break; - case 'postgresql': // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk $query = $this->connection->query(" @@ -60,19 +54,19 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI FROM pg_constraint c JOIN pg_namespace n ON n.oid = c.connamespace WHERE contype = 'f' - AND conrelid::regclass::text = '".$this->getTable('entry_tag')."' + AND conrelid::regclass::text = '" . $this->getTable('entry_tag') . "' AND n.nspname = 'public';" ); $query->execute(); foreach ($query->fetchAll() as $fk) { - $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' DROP CONSTRAINT '.$fk['conname']); + $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP CONSTRAINT ' . $fk['conname']); } break; } - $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES '.$this->getTable('tag').' (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES ' . $this->getTable('tag') . ' (id) ON DELETE CASCADE'); // remove entry FK from annotation @@ -81,18 +75,17 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI $query = $this->connection->query(" SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage - WHERE TABLE_NAME = '".$this->getTable('annotation')."' + WHERE TABLE_NAME = '" . $this->getTable('annotation') . "' AND CONSTRAINT_NAME LIKE 'FK_%' AND COLUMN_NAME = 'entry_id' - AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'" + AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'" ); $query->execute(); foreach ($query->fetchAll() as $fk) { - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); } break; - case 'postgresql': // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk $query = $this->connection->query(" @@ -102,19 +95,19 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI FROM pg_constraint c JOIN pg_namespace n ON n.oid = c.connamespace WHERE contype = 'f' - AND conrelid::regclass::text = '".$this->getTable('annotation')."' + AND conrelid::regclass::text = '" . $this->getTable('annotation') . "' AND n.nspname = 'public' AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';" ); $query->execute(); foreach ($query->fetchAll() as $fk) { - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' DROP CONSTRAINT '.$fk['conname']); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP CONSTRAINT ' . $fk['conname']); } break; } - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE'); } /** @@ -124,4 +117,9 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI { throw new SkipMigrationException('Too complex ...'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index 39949e7d..89ba9973 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -22,11 +22,6 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -34,28 +29,28 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI { $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); - $this->addSql('ALTER DATABASE '.$this->connection->getParams()['dbname'].' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); + $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); // convert field length for utf8mb4 // http://stackoverflow.com/a/31474509/569101 - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE salt salt VARCHAR(180) NOT NULL;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE password password VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE salt salt VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE password password VARCHAR(180) NOT NULL;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); } /** @@ -65,21 +60,26 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI { $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); - $this->addSql('ALTER DATABASE '.$this->connection->getParams()['dbname'].' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); + $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index b2f6aaf8..35853d03 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -24,11 +24,6 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -60,8 +55,13 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI $clientsTable->dropColumn('user_id', 'integer'); - if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') { + if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') { $clientsTable->removeForeignKey($this->constraintName); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index ef846412..0deebdf9 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -22,11 +22,6 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,11 +30,11 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI $images = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'"); $this->skipIf(false !== $images, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); } /** @@ -47,6 +42,11 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index 0e05f02e..f59ad7ba 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -24,11 +24,6 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -50,4 +45,9 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI $entryTable->dropIndex($this->indexName); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index facc14f4..1d5a865b 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -22,11 +22,6 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -53,4 +48,9 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI $configTable->dropColumn('action_mark_as_read'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index e779eacf..0b34caab 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -22,11 +22,6 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,19 +30,19 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI $share = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'"); if (false === $share) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')"); } $unmark = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'"); if (false === $unmark) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')"); } $this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.'); @@ -58,7 +53,12 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';"); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php index 7b2eeb7b..dab0ff5b 100644 --- a/app/DoctrineMigrations/Version20161118134328.php +++ b/app/DoctrineMigrations/Version20161118134328.php @@ -22,11 +22,6 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -53,4 +48,9 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('http_status'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php index 388a0e4b..15052ad7 100644 --- a/app/DoctrineMigrations/Version20161122144743.php +++ b/app/DoctrineMigrations/Version20161122144743.php @@ -22,11 +22,6 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,11 +30,11 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI $access = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'"); $this->skipIf(false !== $access, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')"); } /** @@ -47,6 +42,11 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php index 9b17d6ef..ef08bd59 100644 --- a/app/DoctrineMigrations/Version20161122203647.php +++ b/app/DoctrineMigrations/Version20161122203647.php @@ -30,11 +30,6 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -60,4 +55,9 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI $userTable->addColumn('expired', 'smallint', ['notnull' => false]); $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php index ea370076..497a9f21 100644 --- a/app/DoctrineMigrations/Version20161128084725.php +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -22,11 +22,6 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -46,4 +41,9 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI $configTable = $schema->getTable($this->getTable('config')); $configTable->dropColumn('list_mode'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php index b71aa38b..9d92983a 100644 --- a/app/DoctrineMigrations/Version20161128131503.php +++ b/app/DoctrineMigrations/Version20161128131503.php @@ -28,11 +28,6 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -58,4 +53,9 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI $userTable->addColumn($field, $type, ['notnull' => false]); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index 8ca32b09..07090b2f 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -22,11 +22,6 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -38,17 +33,17 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI switch ($this->connection->getDatabasePlatform()->getName()) { case 'sqlite': - $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM '.$this->getTable('entry')); - $this->addSql('DROP TABLE '.$this->getTable('entry')); - $this->addSql('CREATE TABLE '.$this->getTable('entry').' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));'); - $this->addSql('INSERT INTO '.$this->getTable('entry').' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;'); + $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM ' . $this->getTable('entry')); + $this->addSql('DROP TABLE ' . $this->getTable('entry')); + $this->addSql('CREATE TABLE ' . $this->getTable('entry') . ' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));'); + $this->addSql('INSERT INTO ' . $this->getTable('entry') . ' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;'); $this->addSql('DROP TABLE __temp__wallabag_entry'); break; case 'mysql': - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE uuid uid VARCHAR(23)'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uuid uid VARCHAR(23)'); break; case 'postgresql': - $this->addSql('ALTER TABLE '.$this->getTable('entry').' RENAME uuid TO uid'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uuid TO uid'); } } @@ -66,10 +61,15 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI throw new SkipMigrationException('Too complex ...'); break; case 'mysql': - $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE uid uuid VARCHAR(23)'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uid uuid VARCHAR(23)'); break; case 'postgresql': - $this->addSql('ALTER TABLE '.$this->getTable('entry').' RENAME uid TO uuid'); + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid'); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index c7326f95..6b5640e5 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php @@ -24,11 +24,6 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -50,4 +45,9 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI $entryTable->dropIndex($this->indexName); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index 5bfd9670..fc78a246 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php @@ -25,11 +25,6 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -53,4 +48,9 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI $entryTable->dropIndex($this->indexStarredName); $entryTable->dropIndex($this->indexArchivedName); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170327194233.php b/app/DoctrineMigrations/Version20170327194233.php index e1466b2f..3e7e722d 100644 --- a/app/DoctrineMigrations/Version20170327194233.php +++ b/app/DoctrineMigrations/Version20170327194233.php @@ -22,11 +22,6 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,12 +30,12 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI $scuttle = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'"); $this->skipIf(false !== $scuttle, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_scuttle', '1', 'entry')"); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_scuttle', '1', 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')"); } /** @@ -48,7 +43,12 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle';"); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'scuttle_url';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php index 3ef9633f..75793fcb 100644 --- a/app/DoctrineMigrations/Version20170405182620.php +++ b/app/DoctrineMigrations/Version20170405182620.php @@ -22,11 +22,6 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -62,4 +57,9 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('published_by'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index 4b9d475a..8a11ffe3 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -22,11 +22,6 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -48,4 +43,9 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170420134133.php b/app/DoctrineMigrations/Version20170420134133.php index b1ab7bcb..e1947a49 100644 --- a/app/DoctrineMigrations/Version20170420134133.php +++ b/app/DoctrineMigrations/Version20170420134133.php @@ -22,17 +22,12 @@ class Version20170420134133 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ public function up(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_pictures';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';"); } /** @@ -43,10 +38,15 @@ class Version20170420134133 extends AbstractMigration implements ContainerAwareI $downloadPictures = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_pictures'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'"); $this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_pictures', '1', 'entry')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_pictures', '1', 'entry')"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php index 7f068eb8..adf2f841 100644 --- a/app/DoctrineMigrations/Version20170501115751.php +++ b/app/DoctrineMigrations/Version20170501115751.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Add site credential table to store username & password for some website (behind authentication or paywall) + * Add site credential table to store username & password for some website (behind authentication or paywall). */ class Version20170501115751 extends AbstractMigration implements ContainerAwareInterface { @@ -22,11 +22,6 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -58,4 +53,9 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI { $schema->dropTable($this->getTable('site_credential')); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index a99af2d2..329613b1 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php @@ -29,11 +29,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -42,7 +37,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); foreach ($this->fields as $field) { - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); } } @@ -54,7 +49,12 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); foreach ($this->fields as $field) { - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(255) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170511115400.php b/app/DoctrineMigrations/Version20170511115400.php index 64ee9e0a..cad2b637 100644 --- a/app/DoctrineMigrations/Version20170511115400.php +++ b/app/DoctrineMigrations/Version20170511115400.php @@ -22,11 +22,6 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -52,4 +47,9 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('headers'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php index f2d5cf5e..f004d1b3 100644 --- a/app/DoctrineMigrations/Version20170511211659.php +++ b/app/DoctrineMigrations/Version20170511211659.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Increase the length of the "quote" column of "annotation" table + * Increase the length of the "quote" column of "annotation" table. */ class Version20170511211659 extends AbstractMigration implements ContainerAwareInterface { @@ -23,11 +23,6 @@ class Version20170511211659 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } - public function up(Schema $schema) { $tableName = $this->getTable('annotation'); @@ -68,13 +63,11 @@ EOD ); $this->addSql('DROP TABLE __temp__wallabag_annotation'); break; - case 'mysql': - $this->addSql('ALTER TABLE '.$tableName.' MODIFY quote TEXT NOT NULL'); + $this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote TEXT NOT NULL'); break; - case 'postgresql': - $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE TEXT'); + $this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE TEXT'); break; } } @@ -87,14 +80,17 @@ EOD case 'sqlite': throw new SkipMigrationException('Too complex ...'); break; - case 'mysql': - $this->addSql('ALTER TABLE '.$tableName.' MODIFY quote VARCHAR(255) NOT NULL'); + $this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote VARCHAR(255) NOT NULL'); break; - case 'postgresql': - $this->addSql('ALTER TABLE '.$tableName.' ALTER COLUMN quote TYPE VARCHAR(255)'); + $this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE VARCHAR(255)'); break; } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/app/DoctrineMigrations/Version20170602075214.php b/app/DoctrineMigrations/Version20170602075214.php index 451d16ba..6b6f0035 100644 --- a/app/DoctrineMigrations/Version20170602075214.php +++ b/app/DoctrineMigrations/Version20170602075214.php @@ -22,11 +22,6 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -35,11 +30,11 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI $apiUserRegistration = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'"); $this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('api_user_registration', '0', 'api')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')"); } /** @@ -47,6 +42,11 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration';"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php index e9b50428..5f58fc29 100644 --- a/app/DoctrineMigrations/Version20170606155640.php +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Remove wallabag_url from craue_config_setting. - * It has been moved into the parameters.yml + * It has been moved into the parameters.yml. */ class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface { @@ -23,11 +23,6 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -36,11 +31,11 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI $apiUserRegistration = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); $this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.'); - $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); } /** @@ -48,6 +43,11 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; } } diff --git a/app/autoload.php b/app/autoload.php index fa582ecd..c5f664dc 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -1,12 +1,12 @@ Date: Sun, 9 Jul 2017 10:07:14 +0200 Subject: Disallow html for templating formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using html template format will then put the html format in the allowed list for the api doc which we don’t want since the api doesn’t response for html format. --- app/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index 2bc5e3b3..d37ed227 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -110,7 +110,7 @@ fos_rest: epub: true mobi: true templating_formats: - html: true + html: false force_redirects: html: true failed_validation: HTTP_BAD_REQUEST -- cgit v1.2.3 From a4fcb2e5c68be26e1a0e3d9bb9ede9896f146f65 Mon Sep 17 00:00:00 2001 From: Quent-in Date: Sat, 5 Aug 2017 14:46:33 +0200 Subject: Update registration using API --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 66d9ae26..0861d59c 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -9,7 +9,7 @@ export_csv: Activar l'expòrt CSV export_json: Activar l'expòrt JSON export_txt: Activar l'expòrt TXT export_xml: Activar l'expòrt XML -import_with_rabbitmq: Activar Enable RabbitMQ per importar de donadas de manièra asincròna +import_with_rabbitmq: Activar RabbitMQ per importar de donadas de manièra asincròna import_with_redis: Activar Redis per importar de donadas de manièra asincròna shaarli_url: URL de Shaarli, se lo servici Shaarli es activat share_diaspora: Activar lo partatge cap a Diaspora @@ -33,4 +33,4 @@ demo_mode_username: "Utilizaire de la demostracion" share_public: Autorizar una URL publica pels articles download_images_enabled: Telecargar los imatges en local restricted_access: Activar l'autenticacion pels sites amb peatge -# api_user_registration: Enable user to be registered using the API +api_user_registration: Autorizar los utilizaires a se marcar amb l'API -- cgit v1.2.3 From a991c46eedec0efb24d0a9974b1c7fcabf8cfa66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20D?= Date: Wed, 23 Aug 2017 23:06:40 +0200 Subject: Set a starred_at field when an entry is starred. This date is used to sort starred entries. Can not use Entry::timestamps method otherwise starred_at will be updated each time entry is updated. Add an updateStar method into Entry class A migration script has been added in order to set starred_at field. --- app/DoctrineMigrations/Version20170824113337.php | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170824113337.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170824113337.php b/app/DoctrineMigrations/Version20170824113337.php new file mode 100644 index 00000000..7393d683 --- /dev/null +++ b/app/DoctrineMigrations/Version20170824113337.php @@ -0,0 +1,63 @@ +container = $container; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf($entryTable->hasColumn('starred_at'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('starred_at', 'datetime', [ + 'notnull' => false, + ]); + } + + public function postUp(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf(!$entryTable->hasColumn('starred_at'), 'Unable to add starred_at colum'); + + $this->connection->executeQuery('UPDATE ' . $this->getTable('entry') . ' SET starred_at = updated_at WHERE is_starred = true'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf(!$entryTable->hasColumn('starred_at'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('starred_at'); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } +} -- cgit v1.2.3 From bd164a75c42accdc1601a69d101e759d4326e018 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Thu, 20 Jul 2017 22:05:44 +0200 Subject: Add migration to change case of tags This migration does not support SQLite as long as this engine does not support Unicode in LOWER(). This migration starts by retrieving the list of lowercase tags which need to be migrated. Then it retrieves the list of tags for each tags from the previous step in order to migrate entries. It handles deletion of empty tags. At the end the migration makes a full scan to update the label of all remaining tags. WARNING: THIS MIGRATION IS IRREVERSIBLE. Signed-off-by: Kevin Decherf --- app/DoctrineMigrations/Version20170719231144.php | 103 +++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170719231144.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php new file mode 100644 index 00000000..691eae51 --- /dev/null +++ b/app/DoctrineMigrations/Version20170719231144.php @@ -0,0 +1,103 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + + // Find tags which need to be merged + $dupTags = $this->connection->query(" + SELECT LOWER(label) + FROM ".$this->getTable('tag')." + GROUP BY LOWER(label) + HAVING COUNT(*) > 1" + ); + $dupTags->execute(); + + foreach ($dupTags->fetchAll() as $duplicates) { + $label = $duplicates['LOWER(label)']; + + // Retrieve all duplicate tags for a given tag + $tags = $this->connection->query(" + SELECT id + FROM ".$this->getTable('tag')." + WHERE LOWER(label) = '".$label."' + ORDER BY id ASC" + ); + $tags->execute(); + + $first = true; + $newId = null; + $ids = []; + + foreach ($tags->fetchAll() as $tag) { + // Ignore the first tag as we use it as the new reference tag + if ($first) { + $first = false; + $newId = $tag['id']; + } else { + $ids[] = $tag['id']; + } + } + + // Just in case... + if (count($ids) > 0) { + // Merge tags + $this->addSql(" + UPDATE ".$this->getTable('entry_tag')." + SET tag_id = ".$newId." + WHERE tag_id IN (".implode(',', $ids).")" + ); + + // Delete unused tags + $this->addSql(" + DELETE FROM ".$this->getTable('tag')." + WHERE id IN (".implode(',', $ids).")" + ); + } + } + + // Iterate over all tags to lowercase them + $this->addSql(" + UPDATE ".$this->getTable('tag')." + SET label = LOWER(label)" + ); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + throw new SkipMigrationException('Too complex ...'); + } +} -- cgit v1.2.3 From 7b4f66881d694c948aca9372da6362b8873de6bb Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 27 Aug 2017 16:59:02 +0200 Subject: php-cs-fixer on DoctrineMigrations/Version20170719231144 Signed-off-by: Kevin Decherf --- app/DoctrineMigrations/Version20170719231144.php | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php index 691eae51..0f5fa75a 100644 --- a/app/DoctrineMigrations/Version20170719231144.php +++ b/app/DoctrineMigrations/Version20170719231144.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Changed tags to lowercase + * Changed tags to lowercase. */ class Version20170719231144 extends AbstractMigration implements ContainerAwareInterface { @@ -22,24 +22,19 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); - + $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + // Find tags which need to be merged - $dupTags = $this->connection->query(" + $dupTags = $this->connection->query(' SELECT LOWER(label) - FROM ".$this->getTable('tag')." + FROM ' . $this->getTable('tag') . ' GROUP BY LOWER(label) - HAVING COUNT(*) > 1" + HAVING COUNT(*) > 1' ); $dupTags->execute(); @@ -47,10 +42,10 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI $label = $duplicates['LOWER(label)']; // Retrieve all duplicate tags for a given tag - $tags = $this->connection->query(" + $tags = $this->connection->query(' SELECT id - FROM ".$this->getTable('tag')." - WHERE LOWER(label) = '".$label."' + FROM ' . $this->getTable('tag') . " + WHERE LOWER(label) = '" . $label . "' ORDER BY id ASC" ); $tags->execute(); @@ -72,24 +67,24 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI // Just in case... if (count($ids) > 0) { // Merge tags - $this->addSql(" - UPDATE ".$this->getTable('entry_tag')." - SET tag_id = ".$newId." - WHERE tag_id IN (".implode(',', $ids).")" + $this->addSql(' + UPDATE ' . $this->getTable('entry_tag') . ' + SET tag_id = ' . $newId . ' + WHERE tag_id IN (' . implode(',', $ids) . ')' ); // Delete unused tags - $this->addSql(" - DELETE FROM ".$this->getTable('tag')." - WHERE id IN (".implode(',', $ids).")" + $this->addSql(' + DELETE FROM ' . $this->getTable('tag') . ' + WHERE id IN (' . implode(',', $ids) . ')' ); } } // Iterate over all tags to lowercase them - $this->addSql(" - UPDATE ".$this->getTable('tag')." - SET label = LOWER(label)" + $this->addSql(' + UPDATE ' . $this->getTable('tag') . ' + SET label = LOWER(label)' ); } @@ -100,4 +95,9 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI { throw new SkipMigrationException('Too complex ...'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } -- cgit v1.2.3 From a09136d2d20574e3166da2bc4955946fb804133e Mon Sep 17 00:00:00 2001 From: Quent-in Date: Wed, 30 Aug 2017 20:09:16 +0200 Subject: Update CraueConfigBundle.oc.yml --- app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 0861d59c..fb163ce7 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -12,7 +12,7 @@ export_xml: Activar l'expòrt XML import_with_rabbitmq: Activar RabbitMQ per importar de donadas de manièra asincròna import_with_redis: Activar Redis per importar de donadas de manièra asincròna shaarli_url: URL de Shaarli, se lo servici Shaarli es activat -share_diaspora: Activar lo partatge cap a Diaspora +share_diaspora: Activar lo partatge cap a Diaspora* share_mail: Activar lo partatge per corrièl share_shaarli: Activar lo partatge cap a Shaarli share_scuttle: Activar lo partatge cap a Scuttle -- cgit v1.2.3 From 973392cc482671f3cc8d4d35c6ab6c016255cea6 Mon Sep 17 00:00:00 2001 From: Tobias Strobel Date: Fri, 1 Sep 2017 23:15:18 +0200 Subject: Translate missing strings, add quotation marks --- .../translations/CraueConfigBundle.de.yml | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index f57db303..a066c8e3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -1,36 +1,36 @@ -# settings_changed: Configuration updated -download_pictures: Bilder auf den Server herunterladen -carrot: Teilen zu Carrot aktivieren -diaspora_url: Diaspora-URL, sofern der Service aktiviert ist -export_epub: ePUB-Export aktivieren -export_mobi: mobi-Export aktivieren -export_pdf: PDF-Export aktivieren -export_csv: CSV-Export aktivieren -export_json: JSON-Export aktivieren -export_txt: TXT-Export aktivieren -export_xml: XML-Export aktivieren -import_with_rabbitmq: Aktiviere RabbitMQ, um Artikel asynchron zu importieren -import_with_redis: Aktiviere Redis, um Artikel asynchron zu importieren -shaarli_url: Shaarli-URL, sofern der Service aktiviert ist -share_diaspora: Teilen zu Diaspora aktiveren -share_mail: Teilen via E-Mail aktiveren -share_shaarli: Teilen zu Shaarli aktiveren -share_scuttle: Teilen zu Scuttle aktiveren -share_twitter: Teilen zu Twitter aktiveren -share_unmark: Teilen zu Unmark.it aktiveren -show_printlink: Link anzeigen, um den Inhalt auszudrucken -wallabag_support_url: Support-URL für wallabag -entry: "Artikel" -export: "Export" -import: "Import" -misc: "Verschiedenes" -modify_settings: "Übernehmen" -piwik_host: Host deiner Webseite in Piwik (ohne http:// oder https://) -piwik_site_id: ID deiner Webseite in Piwik -piwik_enabled: Piwik aktivieren -demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)" -demo_mode_username: "Test-Benutzer" -share_public: Erlaube eine öffentliche URL für Einträge -# download_images_enabled: Download images locally -# restricted_access: Enable authentication for websites with paywall -# api_user_registration: Enable user to be registered using the API +settings_changed: 'Konfiguration aktualisiert' +download_pictures: 'Bilder auf den Server herunterladen' +carrot: 'Teilen zu Carrot aktivieren' +diaspora_url: 'Diaspora-URL, sofern der Service aktiviert ist' +export_epub: 'ePUB-Export aktivieren' +export_mobi: 'mobi-Export aktivieren' +export_pdf: 'PDF-Export aktivieren' +export_csv: 'CSV-Export aktivieren' +export_json: 'JSON-Export aktivieren' +export_txt: 'TXT-Export aktivieren' +export_xml: 'XML-Export aktivieren' +import_with_rabbitmq: 'Aktiviere RabbitMQ, um Artikel asynchron zu importieren' +import_with_redis: 'Aktiviere Redis, um Artikel asynchron zu importieren' +shaarli_url: 'Shaarli-URL, sofern der Service aktiviert ist' +share_diaspora: 'Teilen zu Diaspora aktiveren' +share_mail: 'Teilen via E-Mail aktiveren' +share_shaarli: 'Teilen zu Shaarli aktiveren' +share_twitter: 'Teilen zu Twitter aktiveren' +share_unmark: 'Teilen zu Unmark.it aktiveren' +show_printlink: 'Link anzeigen, um den Inhalt auszudrucken' +wallabag_support_url: 'Support-URL für wallabag' +wallabag_url: 'URL von *deiner* wallabag-Instanz' +entry: 'Artikel' +export: 'Export' +import: 'Import' +misc: 'Verschiedenes' +modify_settings: 'Übernehmen' +piwik_host: 'Host deiner Webseite in Piwik (ohne http:// oder https://)' +piwik_site_id: 'ID deiner Webseite in Piwik' +piwik_enabled: 'Piwik aktivieren' +demo_mode_enabled: 'Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)' +demo_mode_username: 'Test-Benutzer' +share_public: 'Erlaube eine öffentliche URL für Einträge' +download_images_enabled: 'Bilder lokal herunterladen' +restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' +api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' -- cgit v1.2.3 From e317a5ab607d902194a494c92743e8a8d27625f2 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Wed, 6 Sep 2017 22:42:23 +0200 Subject: Fix webpack error on comments Signed-off-by: Kevin Decherf --- app/Resources/static/themes/_global/index.js | 2 +- app/Resources/static/themes/_global/js/shortcuts/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 3ec26488..fddb476d 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -9,7 +9,7 @@ import 'material-design-icons-iconfont/dist/material-design-icons.css'; import 'lato-font/css/lato-font.css'; import './global.scss'; -/* Shortcuts*/ +/* Shortcuts */ import './js/shortcuts/entry'; import './js/shortcuts/main'; diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js index c81bf869..b99fa802 100644 --- a/app/Resources/static/themes/_global/js/shortcuts/main.js +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -1,6 +1,6 @@ import Mousetrap from 'mousetrap'; -/** Shortcuts **/ +/* Shortcuts */ /* Go to */ Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); -- cgit v1.2.3 From 79ea33c9d3139961ff292651f7c3d2ef57b4ea50 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 9 Sep 2017 21:35:19 +0200 Subject: Entry view: update .stats margins and color Decreasing margin of .stats, increasing vertical margin of .stats li, increasing right margin of material icons and reducing contrast of material icons. Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/article.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index 27ff5221..2d4ef4b4 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -108,12 +108,17 @@ .stats { font-size: 0.8em; - margin: 8px 15px 5px; + margin: 8px 5px 5px; li { display: inline-flex; vertical-align: middle; - margin: 0 5px; + margin: 3px 5px; + + i.material-icons { + color: #3e3e3e; + margin-right: 3px; + } } a { -- cgit v1.2.3 From f40c88eb1fa349aab600f9c1c94364f317fe62dd Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 9 Oct 2017 16:45:09 +0200 Subject: Jump to Symfony 3.3 & update others deps Also update tests urls --- app/config/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app') diff --git a/app/config/config.yml b/app/config/config.yml index d37ed227..b76fb696 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -350,3 +350,10 @@ fos_js_routing: - howto - fos_user_security_logout - new + +jms_serializer: + handlers: + # to be removed if we switch to (default) ISO8601 datetime instead of ATOM + # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 + datetime: + default_format: "Y-m-d\\TH:i:sO" # ATOM -- cgit v1.2.3 From 3ef055ced3d6ea0d2f15ba660602545f477e9c3c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 9 Oct 2017 16:47:15 +0200 Subject: CS --- app/DoctrineMigrations/Version20161001072726.php | 2 +- app/DoctrineMigrations/Version20161022134138.php | 4 ++-- app/DoctrineMigrations/Version20161024212538.php | 2 +- app/DoctrineMigrations/Version20170510082609.php | 4 ++-- app/DoctrineMigrations/Version20170719231144.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index 4babe172..f9d088a3 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -28,7 +28,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); // remove all FK from entry_tag switch ($this->connection->getDatabasePlatform()->getName()) { diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index 89ba9973..c84f8fbb 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -27,7 +27,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); @@ -58,7 +58,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index 35853d03..698819be 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -55,7 +55,7 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI $clientsTable->dropColumn('user_id', 'integer'); - if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') { + if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) { $clientsTable->removeForeignKey($this->constraintName); } } diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index 329613b1..52c70168 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php @@ -34,7 +34,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); foreach ($this->fields as $field) { $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); @@ -46,7 +46,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); foreach ($this->fields as $field) { $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php index 0f5fa75a..0c749150 100644 --- a/app/DoctrineMigrations/Version20170719231144.php +++ b/app/DoctrineMigrations/Version20170719231144.php @@ -27,7 +27,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); // Find tags which need to be merged $dupTags = $this->connection->query(' -- cgit v1.2.3 From 28af2989ec0f736c2455d62a543dd9060a7f376b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3?= Date: Fri, 6 Oct 2017 13:14:58 +0300 Subject: Add Russian language in CoreBundle Resources and CraueConfigBundle --- .../translations/CraueConfigBundle.ru.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml new file mode 100644 index 00000000..becf3d64 --- /dev/null +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml @@ -0,0 +1,35 @@ +settings_changed: Настройки обновлены +download_pictures: Скачивать картинки на Ваш сервер +carrot: Включить возможность отслеживания событий через Carrot +diaspora_url: Diaspora URL, если сервис включен +export_epub: Включить ePub экспорт +export_mobi: Включить .mobi экспорт +export_pdf: Включить PDF экспорт +export_csv: Включить CSV экспорт +export_json: Включить JSON экспорт +export_txt: Включить TXT экспорт +export_xml: Включить XML экспорт +import_with_rabbitmq: Включить RabbitMQ для импорта данных(асинхронно) +import_with_redis: Включить Redis для импорта данных(асинхронно) +shaarli_url: Shaarli URL, если сервис включен +share_diaspora: Включить возможность поделиться в соц.сети Diaspora +share_mail: Включить возможность поделиться по email +share_shaarli: Включить возможность поделиться в Shaarli +share_twitter: Включить возможность поделиться в Twitter +share_unmark: Включить возможность поделиться в Unmark.it +show_printlink: Отображать ссылки в версии для печати +wallabag_support_url: Поддержка URL для wallabag +wallabag_url: URL *вашего* wallabag сервиса +entry: "запись" +export: "экспорт" +import: "импорт" +misc: "разное" +modify_settings: "применить" +piwik_host: Ссылка на Ваш сайт на Piwik (с http:// или https://) +piwik_site_id: ID Вашего сайта на Piwik +piwik_enabled: Включить Piwik +demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)" +demo_mode_username: "Демо пользователь" +share_public: Разрешить публичные ссылки на записи +download_images_enabled: Скачивать изображения локально +restricted_access: Включить авторизацию на сайте с помощью paywall -- cgit v1.2.3 From ef5fcdee20bc2c9915f59065fc738bc10f95f003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3?= Date: Fri, 6 Oct 2017 15:39:34 +0300 Subject: add Russian language --- app/config/wallabag.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index b45934e4..d70653ce 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -14,6 +14,7 @@ wallabag_core: oc: 'Occitan' it: 'Italiano' pt: 'Português' + ru: 'Русский' items_on_page: 12 theme: material language: '%locale%' -- cgit v1.2.3 From 4bea44da92f561d0d1ef194af350c25b9a7151cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3?= Date: Fri, 6 Oct 2017 16:26:50 +0300 Subject: update Russian language --- .../translations/CraueConfigBundle.ru.yml | 56 +++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'app') diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml index becf3d64..37b4bbfd 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml @@ -1,35 +1,35 @@ -settings_changed: Настройки обновлены -download_pictures: Скачивать картинки на Ваш сервер -carrot: Включить возможность отслеживания событий через Carrot -diaspora_url: Diaspora URL, если сервис включен -export_epub: Включить ePub экспорт -export_mobi: Включить .mobi экспорт -export_pdf: Включить PDF экспорт -export_csv: Включить CSV экспорт -export_json: Включить JSON экспорт -export_txt: Включить TXT экспорт -export_xml: Включить XML экспорт -import_with_rabbitmq: Включить RabbitMQ для импорта данных(асинхронно) -import_with_redis: Включить Redis для импорта данных(асинхронно) -shaarli_url: Shaarli URL, если сервис включен -share_diaspora: Включить возможность поделиться в соц.сети Diaspora -share_mail: Включить возможность поделиться по email -share_shaarli: Включить возможность поделиться в Shaarli -share_twitter: Включить возможность поделиться в Twitter -share_unmark: Включить возможность поделиться в Unmark.it -show_printlink: Отображать ссылки в версии для печати -wallabag_support_url: Поддержка URL для wallabag -wallabag_url: URL *вашего* wallabag сервиса +settings_changed: "Настройки обновлены" +download_pictures: "Скачивать картинки на Ваш сервер" +carrot: "Включить возможность отслеживания событий через Carrot" +diaspora_url: "Diaspora URL, если сервис включен" +export_epub: "Включить ePub экспорт" +export_mobi: "Включить .mobi экспорт" +export_pdf: "Включить PDF экспорт" +export_csv: "Включить CSV экспорт" +export_json: "Включить JSON экспорт" +export_txt: "Включить TXT экспорт" +export_xml: "Включить XML экспорт" +import_with_rabbitmq: "Включить RabbitMQ для импорта данных(асинхронно)" +import_with_redis: "Включить Redis для импорта данных(асинхронно)" +shaarli_url: "Shaarli URL, если сервис включен" +share_diaspora: "Включить возможность поделиться в соц.сети Diaspora" +share_mail: "Включить возможность поделиться по email" +share_shaarli: "Включить возможность поделиться в Shaarli" +share_twitter: "Включить возможность поделиться в Twitter" +share_unmark: "Включить возможность поделиться в Unmark.it" +show_printlink: "Отображать ссылки в версии для печати" +wallabag_support_url: "Поддержка URL для wallabag" +wallabag_url: "URL *вашего* wallabag сервиса" entry: "запись" export: "экспорт" import: "импорт" misc: "разное" modify_settings: "применить" -piwik_host: Ссылка на Ваш сайт на Piwik (с http:// или https://) -piwik_site_id: ID Вашего сайта на Piwik -piwik_enabled: Включить Piwik +piwik_host: "Ссылка на Ваш сайт на Piwik (с http:// или https://)" +piwik_site_id: "ID Вашего сайта на Piwik" +piwik_enabled: "Включить Piwik" demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)" demo_mode_username: "Демо пользователь" -share_public: Разрешить публичные ссылки на записи -download_images_enabled: Скачивать изображения локально -restricted_access: Включить авторизацию на сайте с помощью paywall +share_public: "Разрешить публичные ссылки на записи" +download_images_enabled: "Скачивать изображения локально" +restricted_access: "Включить авторизацию на сайте с помощью paywall" -- cgit v1.2.3 From 88bac4a33ef4270049b009b215504bf9bcb0030a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 8 Oct 2017 22:08:18 +0200 Subject: Changed reading_time field to prevent null values --- app/DoctrineMigrations/Version20171008195606.php | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 app/DoctrineMigrations/Version20171008195606.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php new file mode 100644 index 00000000..7c202151 --- /dev/null +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -0,0 +1,63 @@ +container = $container; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'mysql': + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;'); + break; + case 'postgresql': + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time SET NOT NULL;'); + break; + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'mysql': + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11);'); + break; + case 'postgresql': + $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time DROP NOT NULL;'); + break; + } + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } +} -- cgit v1.2.3 From 705d3c38dc6eb823b8a6371ea8a85027b2467299 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 11 Oct 2017 10:42:24 +0200 Subject: CS --- app/DoctrineMigrations/Version20171008195606.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php index 7c202151..87828afd 100644 --- a/app/DoctrineMigrations/Version20171008195606.php +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Changed reading_time field to prevent null value + * Changed reading_time field to prevent null value. */ class Version20171008195606 extends AbstractMigration implements ContainerAwareInterface { @@ -27,7 +27,7 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); switch ($this->connection->getDatabasePlatform()->getName()) { case 'mysql': @@ -44,7 +44,7 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); switch ($this->connection->getDatabasePlatform()->getName()) { case 'mysql': -- cgit v1.2.3 From abce2f05dd41bd88d923745a7c8fe56d1f3fd944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 13 Oct 2017 09:37:03 +0200 Subject: Fixed @Kdecherf's review --- app/DoctrineMigrations/Version20171008195606.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php index 87828afd..c190f4ed 100644 --- a/app/DoctrineMigrations/Version20171008195606.php +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -34,6 +34,7 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;'); break; case 'postgresql': + $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time SET NOT NULL;'); break; } -- cgit v1.2.3 From 3c9fbb4e3294d4a8b6c1a98fd081e25e8fd6cf7f Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Fri, 13 Oct 2017 23:04:16 +0200 Subject: Enable WebServerBundle in dev environment Since #3376, the web server console commands were not available. --- app/AppKernel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index f1140943..45f6b795 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -48,6 +48,7 @@ class AppKernel extends Kernel $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); + $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle(); if ('test' === $this->getEnvironment()) { $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); -- cgit v1.2.3 From 9ca069a6fea67ddf2ef44601901ea3c02e3cffbe Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Fri, 13 Oct 2017 23:52:15 +0200 Subject: Replace kernel.root_dir by kernel.project_dir kernel.root_dir and Kernel::getRootDir() are deprecated since Symfony 3.3. See https://symfony.com/blog/new-in-symfony-3-3-a-simpler-way-to-get-the-project-root-directory and https://github.com/symfony/symfony/blob/3.3/UPGRADE-3.3.md#httpkernel for more information. --- app/AppKernel.php | 7 +------ app/config/config.yml | 6 +++--- app/config/config_dev.yml | 2 +- app/config/config_prod.yml | 2 +- app/config/parameters.yml.dist | 2 +- app/config/parameters_test.yml | 2 +- app/config/tests/parameters_test.sqlite.yml | 2 +- app/config/wallabag.yml | 4 ++-- 8 files changed, 11 insertions(+), 16 deletions(-) (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index f1140943..d582c93e 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -57,11 +57,6 @@ class AppKernel extends Kernel return $bundles; } - public function getRootDir() - { - return __DIR__; - } - public function getCacheDir() { return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); @@ -74,7 +69,7 @@ class AppKernel extends Kernel public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); + $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); $loader->load(function ($container) { if ($container->getParameter('use_webpack_dev_server')) { $container->loadFromExtension('framework', [ diff --git a/app/config/config.yml b/app/config/config.yml index b76fb696..08da4f8f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -16,7 +16,7 @@ framework: fallback: "%locale%" secret: "%secret%" router: - resource: "%kernel.root_dir%/config/routing.yml" + resource: "%kernel.project_dir%/app/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ @@ -30,7 +30,7 @@ framework: session: # handler_id set to null will use default session handler from php.ini handler_id: session.handler.native_file - save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" + save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%" fragments: ~ http_method_override: true assets: ~ @@ -72,7 +72,7 @@ stof_doctrine_extensions: sluggable: true doctrine_migrations: - dir_name: "%kernel.root_dir%/DoctrineMigrations" + dir_name: "%kernel.project_dir%/app/DoctrineMigrations" namespace: Application\Migrations table_name: migration_versions name: Application Migrations diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 3b67d8f6..0c490575 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -3,7 +3,7 @@ imports: framework: router: - resource: "%kernel.root_dir%/config/routing_dev.yml" + resource: "%kernel.project_dir%/app/config/routing_dev.yml" strict_requirements: true profiler: only_exceptions: false diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 65b02d66..44e29aac 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -3,7 +3,7 @@ imports: framework: assets: - # json_manifest_path: '%kernel.root_dir%/../web/bundles/wallabagcore/manifest.json' + # json_manifest_path: '%kernel.project_dir%/web/bundles/wallabagcore/manifest.json' #doctrine: # orm: diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index b3fe11c8..b5b97950 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -16,7 +16,7 @@ parameters: database_name: wallabag database_user: root database_password: ~ - # For SQLite, database_path should be "%kernel.root_dir%/../data/db/wallabag.sqlite" + # For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite" database_path: null database_table_prefix: wallabag_ database_socket: null diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 010785e6..257d2ace 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -6,5 +6,5 @@ parameters: test_database_user: null test_database_password: null test_database_path: "%env(TEST_DATABASE_PATH)%" - env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" + env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 5c731bf5..2b92d579 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -8,5 +8,5 @@ parameters: # Using an environnement variable in order to avoid the error "attempt to write a readonly database" # when the schema is dropped then recreate test_database_path: "%env(TEST_DATABASE_PATH)%" - env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" + env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" test_database_charset: utf8 diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d70653ce..6b4722fc 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -27,7 +27,7 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 - encryption_key_path: "%kernel.root_dir%/../data/site-credentials-secret-key.txt" + encryption_key_path: "%kernel.project_dir%/data/site-credentials-secret-key.txt" default_internal_settings: - name: share_public @@ -159,4 +159,4 @@ wallabag_user: wallabag_import: allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] - resource_dir: "%kernel.root_dir%/../web/uploads/import" + resource_dir: "%kernel.project_dir%/web/uploads/import" -- cgit v1.2.3 From ef7f187fa8aa18acf68750e5539ccceb524ab598 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 15 Oct 2017 23:56:34 +0200 Subject: Fix non-centered login form Fixes #3343 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/media_queries.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 08c2d8ab..36d79a45 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -4,7 +4,7 @@ @media only screen and (min-width: 992px) { nav, - body:not(.entry) main, + body:not(.entry):not(.login) main, footer { padding-left: 240px; } -- cgit v1.2.3 From 7a1e1247cbc3b7a68c82c45733713c4630e9dcb7 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 15 Oct 2017 23:57:35 +0200 Subject: webpack: handle _global img folder Fixes missing image files after composer cleaning assets Source of requireAll(): https://stackoverflow.com/a/30652110 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/_global/share.js | 3 +++ app/config/webpack/prod.js | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Resources/static/themes/_global/share.js b/app/Resources/static/themes/_global/share.js index d7078616..15206b37 100644 --- a/app/Resources/static/themes/_global/share.js +++ b/app/Resources/static/themes/_global/share.js @@ -1 +1,4 @@ import './share.scss'; + +function requireAll(r) { r.keys().forEach(r); } +requireAll(require.context('./img/', true, /\.(jpg|png|gif|svg|ico)$/)); diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js index 44961cc5..17b8c384 100644 --- a/app/config/webpack/prod.js +++ b/app/config/webpack/prod.js @@ -76,7 +76,8 @@ module.exports = function () { }), }, { - test: /\.(jpg|png|gif|svg)$/, + test: /\.(jpg|png|gif|svg|ico)$/, + include: /node_modules/, use: { loader: 'file-loader', options: { @@ -84,6 +85,17 @@ module.exports = function () { }, }, }, + { + test: /\.(jpg|png|gif|svg|ico)$/, + exclude: /node_modules/, + use: { + loader: 'file-loader', + options: { + context: 'app/Resources/static', + name: '[path][name].[ext]', + }, + }, + }, { test: /\.(eot|ttf|woff|woff2)$/, use: { -- cgit v1.2.3 From 3f29386cb797a8cc9b4eff8dc9b0a75f201366a5 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Mon, 16 Oct 2017 00:07:12 +0200 Subject: Update prod assets Signed-off-by: Kevin Decherf --- app/config/webpack/dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js index b6551152..97abc5eb 100644 --- a/app/config/webpack/dev.js +++ b/app/config/webpack/dev.js @@ -52,7 +52,7 @@ module.exports = function () { ], }, { - test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/, + test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/, use: 'url-loader', }, ], -- cgit v1.2.3 From b4da3ee8e565070802db28bda4b8cd46134a3d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 20 Oct 2017 14:17:37 +0200 Subject: Prepare wallabag 2.3.0 --- app/config/wallabag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 6b4722fc..bbc587b0 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -1,5 +1,5 @@ wallabag_core: - version: 2.2.3 + version: 2.3.0 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" languages: en: 'English' -- cgit v1.2.3