aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-06-13 18:51:52 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-06-13 18:51:52 +0200
commitf58fdfe93dbf969338fe9cecbd728e0f7add4617 (patch)
treee1629da3361235d1c4ef28944624326491628045
parentc053825ff8f9792e692c101585481129b006937b (diff)
parent61f4d5457818204eb28ed394d4f1b97160542baa (diff)
Merge branch 'dev' into beta
-rw-r--r--CHANGELOG49
-rw-r--r--README.md19
-rwxr-xr-xapp/Controllers/configureController.php132
-rwxr-xr-xapp/Controllers/entryController.php7
-rwxr-xr-xapp/Controllers/feedController.php229
-rw-r--r--app/Controllers/importExportController.php390
-rwxr-xr-xapp/Controllers/indexController.php72
-rwxr-xr-xapp/Controllers/javascriptController.php2
-rw-r--r--app/Controllers/usersController.php25
-rw-r--r--app/Exceptions/OpmlException.php6
-rw-r--r--app/FreshRSS.php4
-rw-r--r--app/Models/Category.php14
-rw-r--r--app/Models/CategoryDAO.php32
-rw-r--r--app/Models/Configuration.php89
-rw-r--r--app/Models/Entry.php5
-rw-r--r--app/Models/EntryDAO.php358
-rw-r--r--app/Models/Feed.php57
-rw-r--r--app/Models/FeedDAO.php87
-rw-r--r--app/Models/Share.php44
-rw-r--r--app/Models/Themes.php5
-rwxr-xr-xapp/actualize_script.php35
-rw-r--r--app/i18n/en.php55
-rw-r--r--app/i18n/fr.php53
-rw-r--r--app/layout/aside_configure.phtml5
-rw-r--r--app/layout/aside_feed.phtml17
-rw-r--r--app/layout/aside_flux.phtml4
-rw-r--r--app/layout/header.phtml5
-rw-r--r--app/layout/layout.phtml41
-rw-r--r--app/layout/nav_menu.phtml238
-rw-r--r--app/sql.php1
-rw-r--r--app/views/configure/categorize.phtml12
-rw-r--r--app/views/configure/display.phtml127
-rw-r--r--app/views/configure/feed.phtml21
-rw-r--r--app/views/configure/importExport.phtml40
-rw-r--r--app/views/configure/reading.phtml125
-rw-r--r--app/views/configure/sharing.phtml81
-rw-r--r--app/views/configure/shortcut.phtml56
-rw-r--r--app/views/configure/users.phtml63
-rw-r--r--app/views/error/index.phtml10
-rw-r--r--app/views/feed/add.phtml91
-rw-r--r--app/views/helpers/export/articles.phtml47
-rw-r--r--app/views/helpers/export/opml.phtml28
-rw-r--r--app/views/helpers/javascript_vars.phtml17
-rw-r--r--app/views/helpers/view/normal_view.phtml81
-rw-r--r--app/views/helpers/view/reader_view.phtml3
-rwxr-xr-xapp/views/helpers/view/rss_view.phtml2
-rw-r--r--app/views/importExport/index.phtml52
-rw-r--r--app/views/index/formLogin.phtml56
-rw-r--r--app/views/index/index.phtml17
-rw-r--r--app/views/javascript/actualize.phtml55
-rw-r--r--constants.php7
-rw-r--r--data/shares.php75
-rw-r--r--lib/Minz/ActionController.php6
-rw-r--r--lib/Minz/Cache.php116
-rw-r--r--lib/Minz/Configuration.php79
-rw-r--r--lib/Minz/Dispatcher.php108
-rw-r--r--lib/Minz/Error.php32
-rw-r--r--lib/Minz/FrontController.php59
-rw-r--r--lib/Minz/Log.php17
-rw-r--r--lib/Minz/Request.php7
-rw-r--r--lib/Minz/Response.php60
-rw-r--r--lib/Minz/RouteNotFoundException.php16
-rw-r--r--lib/Minz/Router.php209
-rw-r--r--lib/Minz/Url.php15
-rw-r--r--lib/Minz/View.php10
-rw-r--r--lib/SimplePie/SimplePie.php69
-rw-r--r--lib/SimplePie/SimplePie/Author.php2
-rw-r--r--lib/SimplePie/SimplePie/Cache.php2
-rw-r--r--lib/SimplePie/SimplePie/Cache/Base.php2
-rw-r--r--lib/SimplePie/SimplePie/Cache/DB.php2
-rw-r--r--lib/SimplePie/SimplePie/Cache/File.php2
-rw-r--r--lib/SimplePie/SimplePie/Cache/Memcache.php12
-rw-r--r--lib/SimplePie/SimplePie/Cache/MySQL.php7
-rw-r--r--lib/SimplePie/SimplePie/Caption.php2
-rw-r--r--lib/SimplePie/SimplePie/Category.php2
-rw-r--r--lib/SimplePie/SimplePie/Content/Type/Sniffer.php2
-rw-r--r--lib/SimplePie/SimplePie/Copyright.php2
-rw-r--r--lib/SimplePie/SimplePie/Core.php2
-rw-r--r--lib/SimplePie/SimplePie/Credit.php2
-rw-r--r--lib/SimplePie/SimplePie/Decode/HTML/Entities.php2
-rw-r--r--lib/SimplePie/SimplePie/Enclosure.php4
-rw-r--r--lib/SimplePie/SimplePie/File.php6
-rw-r--r--lib/SimplePie/SimplePie/HTTP/Parser.php2
-rw-r--r--lib/SimplePie/SimplePie/IRI.php2
-rw-r--r--lib/SimplePie/SimplePie/Item.php6
-rw-r--r--lib/SimplePie/SimplePie/Locator.php4
-rw-r--r--lib/SimplePie/SimplePie/Misc.php53
-rw-r--r--lib/SimplePie/SimplePie/Net/IPv6.php2
-rw-r--r--lib/SimplePie/SimplePie/Parse/Date.php2
-rw-r--r--lib/SimplePie/SimplePie/Parser.php7
-rw-r--r--lib/SimplePie/SimplePie/Rating.php2
-rwxr-xr-xlib/SimplePie/SimplePie/Registry.php2
-rw-r--r--lib/SimplePie/SimplePie/Restriction.php2
-rw-r--r--lib/SimplePie/SimplePie/Sanitize.php8
-rw-r--r--lib/SimplePie/SimplePie/Source.php2
-rw-r--r--lib/SimplePie/SimplePie/XML/Declaration/Parser.php2
-rw-r--r--lib/SimplePie/SimplePie/gzdecode.php2
-rw-r--r--lib/lib_date.php131
-rw-r--r--lib/lib_opml.php278
-rw-r--r--lib/lib_rss.php21
-rw-r--r--p/api/.htaccess4
-rw-r--r--p/api/greader.php646
-rw-r--r--p/api/index.html20
-rwxr-xr-xp/i/index.php2
-rw-r--r--p/i/install.php25
-rw-r--r--p/scripts/jquery.min.js8
-rw-r--r--p/scripts/main.js372
-rw-r--r--p/themes/Dark/freshrss.css85
-rw-r--r--p/themes/Dark/global.css41
-rw-r--r--p/themes/Flat/freshrss.css75
-rw-r--r--p/themes/Flat/global.css41
-rw-r--r--p/themes/Flat/icons/rss.svg6
-rw-r--r--p/themes/Flat/icons/view-global.svg1
-rw-r--r--p/themes/Flat/icons/view-normal.svg1
-rw-r--r--p/themes/Flat/icons/view-reader.svg1
-rw-r--r--p/themes/Origine/freshrss.css941
-rw-r--r--p/themes/Origine/global.css540
-rw-r--r--p/themes/Origine/metadata.json4
-rw-r--r--p/themes/Origine/origine.css1020
-rw-r--r--p/themes/Origine/template.css686
-rw-r--r--p/themes/icons/add.svg35
-rw-r--r--p/themes/icons/all.svg39
-rw-r--r--p/themes/icons/apple-touch-icon.pngbin0 -> 5648 bytes
-rw-r--r--p/themes/icons/bookmark.svg37
-rw-r--r--p/themes/icons/category-white.svg38
-rw-r--r--p/themes/icons/category.svg38
-rw-r--r--p/themes/icons/close.svg35
-rw-r--r--p/themes/icons/configure.svg36
-rw-r--r--p/themes/icons/down.svg36
-rw-r--r--p/themes/icons/favicon.svg4
-rw-r--r--p/themes/icons/help.svg39
-rw-r--r--p/themes/icons/icon.svg3
-rw-r--r--p/themes/icons/key.svg7
-rw-r--r--p/themes/icons/link.svg40
-rw-r--r--p/themes/icons/login.svg39
-rw-r--r--p/themes/icons/logout.svg39
-rw-r--r--p/themes/icons/next.svg36
-rw-r--r--p/themes/icons/non-starred.svg37
-rw-r--r--p/themes/icons/prev.svg36
-rw-r--r--p/themes/icons/read.svg36
-rw-r--r--p/themes/icons/refresh.svg36
-rw-r--r--p/themes/icons/rss.svg38
-rw-r--r--p/themes/icons/search.svg38
-rw-r--r--p/themes/icons/share.svg42
-rw-r--r--p/themes/icons/starred.svg37
-rw-r--r--p/themes/icons/tag.svg139
-rw-r--r--p/themes/icons/unread.svg36
-rw-r--r--p/themes/icons/up.svg36
-rw-r--r--p/themes/icons/view-global.svg1
-rw-r--r--p/themes/icons/view-normal.svg1
-rw-r--r--p/themes/icons/view-reader.svg1
151 files changed, 5845 insertions, 4219 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4db9381d5..d167dd917 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,54 @@
# Journal des modifications
+## 2014-06-13 FreshRSS 0.7.2
+
+* API compatible with Google Reader API level 2
+ * FreshRSS can now be used from e.g.:
+ * (Android) News+ https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.extension.google_reader
+ * (Android) EasyRSS https://github.com/Alkarex/EasyRSS
+* Basic support for audio and video podcasts
+* Searching
+ * New search filters date: and pubdate: accepting ISO 8601 date intervals such as `date:2013-2014` or `pubdate:P1W`
+ * Possibility to combine search filters, e.g. `date:2014-05 intitle:FreshRSS intitle:Open great reader #Internet`
+* Change nav menu with more buttons instead of dropdown menus and add some filters
+* New system of import / export
+ * Support OPML, Json (like Google Reader) and Zip archives
+ * Can export and import articles (specific option for favorites)
+* Refactor "Origine" theme
+ * Some improvements
+ * Based on a template file (other themes will use it too)
+
+
+## 2014-02-19 FreshRSS 0.7.1
+
+* Mise à jour des flux plus rapide grâce à une meilleure utilisation du cache
+ * Utilisation d’une signature MD5 du contenu intéressant pour les flux n’implémentant pas les requêtes conditionnelles
+* Modification des raccourcis
+ * "s" partage directement si un seul moyen de partage
+ * Moyens de partage accessibles par "1", "2", "3", etc.
+ * Premier article : Home ; Dernier article : End
+ * Ajout du déplacement au sein des catégories / flux (via modificateurs shift et alt)
+* UI
+ * Séparation des descriptions des raccourcis par groupes
+ * Revue rapide de la page de connexion
+ * Amélioration de l'affichage des notifications sur mobile
+* Revue du système de rafraîchissement des flux
+ * Meilleure gestion de la file de flux à rafraîchir en JSON
+ * Rafraîchissement uniquement pour les flux non rafraîchis récemment
+ * Possibilité donnée aux anonymes de rafraîchir les flux
+* SimplePie
+ * Mise à jour de la lib
+ * Corrige fuite de mémoire
+ * Meilleure tolérance aux flux invalides
+* Corrections divers
+ * Ne déplie plus l'article lors du clic sur l'icône lien externe
+ * Ne boucle plus à la fin de la navigation dans les articles
+ * Suppression du champ category.color inutile
+ * Corrige bug redirection infinie (Persona)
+ * Amélioration vérification de la requête POST
+ * Ajout d'un verrou lorsqu'une action mark_read ou mark_favorite est en cours
+
+
## 2014-01-29 FreshRSS 0.7
* Nouveau mode multi-utilisateur
diff --git a/README.md b/README.md
index 75346f98e..ce3c8ef32 100644
--- a/README.md
+++ b/README.md
@@ -8,12 +8,19 @@ Il permet de gérer plusieurs utilisateurs, et dispose d’un mode de lecture an
* Site officiel : http://freshrss.org
* Démo : http://demo.freshrss.org/
* Développeur : Marien Fressinaud <dev@marienfressinaud.fr>
-* Version actuelle : 0.7
-* Date de publication 2014-01-29
+* Version actuelle : 0.8-dev
+* Date de publication 2014-0x-xx
* License [GNU AGPL 3](http://www.gnu.org/licenses/agpl-3.0.html)
![Logo de FreshRSS](http://marienfressinaud.fr/data/images/freshrss/freshrss_title.png)
+# Note sur les branches
+**Ce logiciel est encore en développement !** Veuillez vous assurer d'utiliser la branche qui vous correspond :
+
+* Utilisez [la branche master](https://github.com/marienfressinaud/FreshRSS/tree/master/) si vous visez la stabilité.
+* [La branche beta](https://github.com/marienfressinaud/FreshRSS/tree/beta) est celle par défaut : les nouveautés y sont ajoutées environ tous les mois.
+* Pour les développeurs et ceux qui savent ce qu'ils font, [la branche dev](https://github.com/marienfressinaud/FreshRSS/tree/dev) vous ouvre les bras !
+
# Disclaimer
Cette application a été développée pour s’adapter à des besoins personnels et non professionnels.
Je ne garantis en aucun cas la sécurité de celle-ci, ni son bon fonctionnement.
@@ -25,9 +32,9 @@ Privilégiez pour cela des demandes sur GitHub
* Serveur modeste, par exemple sous Linux ou Windows
* Fonctionne même sur un Raspberry Pi avec des temps de réponse < 1s (testé sur 150 flux, 22k articles, soit 32Mo de données partiellement compressées)
* Serveur Web Apache2 ou Nginx (non testé sur les autres)
-* PHP 5.2+ (PHP 5.3.7+ recommandé)
+* PHP 5.2.1+ (PHP 5.3.7+ recommandé)
* Requis : [PDO_MySQL](http://php.net/pdo-mysql), [cURL](http://php.net/curl), [LibXML](http://php.net/xml), [PCRE](http://php.net/pcre), [ctype](http://php.net/ctype)
- * Recommandés : [JSON](http://php.net/json), [zlib](http://php.net/zlib), [mbstring](http://php.net/mbstring), [iconv](http://php.net/iconv)
+ * Recommandés : [JSON](http://php.net/json), [zlib](http://php.net/zlib), [mbstring](http://php.net/mbstring), [iconv](http://php.net/iconv), [Zip](http://php.net/zip)
* MySQL 5.0.3+ (ou SQLite 3.7.4+ à venir)
* Un navigateur Web récent tel Firefox 4+, Chrome, Opera, Safari, Internet Explorer 9+
* Fonctionne aussi sur mobile
@@ -42,7 +49,8 @@ Privilégiez pour cela des demandes sur GitHub
5. Tout devrait fonctionner :) En cas de problème, n’hésitez pas à me contacter.
# Contrôle d’accès
-Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter l’accès à votre FreshRSS :
+Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter l’accès à votre FreshRSS. Au choix :
+* En utilisant l’identification par formulaire (requiert JavaScript, et PHP 5.3.7+ recommandé – fonctionne avec certaines versions de PHP 5.3.3+)
* En utilisant l’identification par [Mozilla Persona](https://login.persona.org/about) incluse dans FreshRSS
* En utilisant un contrôle d’accès HTTP défini par votre serveur Web
* Voir par exemple la [documentation d’Apache sur l’authentification](http://httpd.apache.org/docs/trunk/howto/auth.html)
@@ -80,6 +88,7 @@ mysqldump -u utilisateur -p --databases freshrss > freshrss.sql
* [php-http-304](http://alexandre.alapetite.fr/doc-alex/php-http-304/)
* [jQuery](http://jquery.com/)
* [keyboard_shortcuts](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
+* [flotr2](http://www.humblesoftware.com/flotr2)
## Uniquement pour certaines options
* [bcrypt.js](https://github.com/dcodeIO/bcrypt.js)
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 645f9eabf..a117e0f9c 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -29,7 +29,6 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
$cat = new FreshRSS_Category ($name);
$values = array (
'name' => $cat->name (),
- 'color' => $cat->color ()
);
$catDAO->updateCategory ($ids[$key], $values);
} elseif ($ids[$key] != $defaultId) {
@@ -43,10 +42,9 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
$values = array (
'id' => $cat->id (),
'name' => $cat->name (),
- 'color' => $cat->color ()
);
- if ($catDAO->searchByName ($newCat) == false) {
+ if ($catDAO->searchByName ($newCat) == null) {
$catDAO->addCategory ($values);
}
}
@@ -64,7 +62,6 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
$this->view->categories = $catDAO->listCategories (false);
$this->view->defaultCategory = $catDAO->getDefault ();
$this->view->feeds = $feedDAO->listFeeds ();
- $this->view->flux = false;
Minz_View::prependTitle (Minz_Translate::t ('categories_management') . ' · ');
}
@@ -116,7 +113,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
if ($feedDAO->updateFeed ($id, $values)) {
$this->view->flux->_category ($cat);
-
+ $this->view->flux->faviconPrepare();
$notif = array (
'type' => 'good',
'content' => Minz_Translate::t ('feed_updated')
@@ -143,25 +140,12 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
public function displayAction () {
if (Minz_Request::isPost()) {
$this->view->conf->_language(Minz_Request::param('language', 'en'));
- $this->view->conf->_posts_per_page(Minz_Request::param('posts_per_page', 10));
- $this->view->conf->_view_mode(Minz_Request::param('view_mode', 'normal'));
- $this->view->conf->_default_view (Minz_Request::param('default_view', 'a'));
- $this->view->conf->_auto_load_more(Minz_Request::param('auto_load_more', false));
- $this->view->conf->_display_posts(Minz_Request::param('display_posts', false));
- $this->view->conf->_onread_jump_next(Minz_Request::param('onread_jump_next', false));
- $this->view->conf->_lazyload (Minz_Request::param('lazyload', false));
- $this->view->conf->_sort_order(Minz_Request::param('sort_order', 'DESC'));
- $this->view->conf->_mark_when (array(
- 'article' => Minz_Request::param('mark_open_article', false),
- 'site' => Minz_Request::param('mark_open_site', false),
- 'scroll' => Minz_Request::param('mark_scroll', false),
- 'reception' => Minz_Request::param('mark_upon_reception', false),
- ));
$themeId = Minz_Request::param('theme', '');
if ($themeId == '') {
$themeId = FreshRSS_Themes::defaultTheme;
}
$this->view->conf->_theme($themeId);
+ $this->view->conf->_content_width(Minz_Request::param('content_width', 'thin'));
$this->view->conf->_topline_read(Minz_Request::param('topline_read', false));
$this->view->conf->_topline_favorite(Minz_Request::param('topline_favorite', false));
$this->view->conf->_topline_date(Minz_Request::param('topline_date', false));
@@ -189,22 +173,30 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
$this->view->themes = FreshRSS_Themes::get();
- Minz_View::prependTitle (Minz_Translate::t ('reading_configuration') . ' · ');
+ Minz_View::prependTitle (Minz_Translate::t ('display_configuration') . ' · ');
}
- public function sharingAction () {
- if (Minz_Request::isPost ()) {
- $this->view->conf->_sharing (array(
- 'shaarli' => Minz_Request::param ('shaarli', false),
- 'wallabag' => Minz_Request::param ('wallabag', false),
- 'diaspora' => Minz_Request::param ('diaspora', false),
- 'twitter' => Minz_Request::param ('twitter', false),
- 'g+' => Minz_Request::param ('g+', false),
- 'facebook' => Minz_Request::param ('facebook', false),
- 'email' => Minz_Request::param ('email', false),
- 'print' => Minz_Request::param ('print', false),
+ public function readingAction () {
+ if (Minz_Request::isPost()) {
+ $this->view->conf->_posts_per_page(Minz_Request::param('posts_per_page', 10));
+ $this->view->conf->_view_mode(Minz_Request::param('view_mode', 'normal'));
+ $this->view->conf->_default_view (Minz_Request::param('default_view', 'a'));
+ $this->view->conf->_auto_load_more(Minz_Request::param('auto_load_more', false));
+ $this->view->conf->_display_posts(Minz_Request::param('display_posts', false));
+ $this->view->conf->_onread_jump_next(Minz_Request::param('onread_jump_next', false));
+ $this->view->conf->_lazyload (Minz_Request::param('lazyload', false));
+ $this->view->conf->_sticky_post (Minz_Request::param('sticky_post', false));
+ $this->view->conf->_sort_order(Minz_Request::param('sort_order', 'DESC'));
+ $this->view->conf->_mark_when (array(
+ 'article' => Minz_Request::param('mark_open_article', false),
+ 'site' => Minz_Request::param('mark_open_site', false),
+ 'scroll' => Minz_Request::param('mark_scroll', false),
+ 'reception' => Minz_Request::param('mark_upon_reception', false),
));
$this->view->conf->save();
+
+ Minz_Session::_param ('language', $this->view->conf->language);
+ Minz_Translate::reset ();
invalidateHttpCache();
$notif = array (
@@ -213,80 +205,34 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
);
Minz_Session::_param ('notification', $notif);
- Minz_Request::forward (array ('c' => 'configure', 'a' => 'sharing'), true);
+ Minz_Request::forward (array ('c' => 'configure', 'a' => 'reading'), true);
}
- Minz_View::prependTitle (Minz_Translate::t ('sharing') . ' · ');
+ Minz_View::prependTitle (Minz_Translate::t ('reading_configuration') . ' · ');
}
- public function importExportAction () {
- require_once(LIB_PATH . '/lib_opml.php');
- $catDAO = new FreshRSS_CategoryDAO ();
- $this->view->categories = $catDAO->listCategories ();
-
- $this->view->req = Minz_Request::param ('q');
-
- if ($this->view->req == 'export') {
- Minz_View::_title ('freshrss_feeds.opml');
-
- $this->view->_useLayout (false);
- header('Content-Type: application/xml; charset=utf-8');
- header('Content-disposition: attachment; filename=freshrss_feeds.opml');
-
- $feedDAO = new FreshRSS_FeedDAO ();
- $catDAO = new FreshRSS_CategoryDAO ();
-
- $list = array ();
- foreach ($catDAO->listCategories () as $key => $cat) {
- $list[$key]['name'] = $cat->name ();
- $list[$key]['feeds'] = $feedDAO->listByCategory ($cat->id ());
- }
-
- $this->view->categories = $list;
- } elseif ($this->view->req == 'import' && Minz_Request::isPost ()) {
- if ($_FILES['file']['error'] == 0) {
- invalidateHttpCache();
- // on parse le fichier OPML pour récupérer les catégories et les flux associés
- try {
- list ($categories, $feeds) = opml_import (
- file_get_contents ($_FILES['file']['tmp_name'])
- );
+ public function sharingAction () {
+ if (Minz_Request::isPost ()) {
+ $params = Minz_Request::params();
+ $this->view->conf->_sharing ($params['share']);
+ $this->view->conf->save();
+ invalidateHttpCache();
- // On redirige vers le controller feed qui va se charger d'insérer les flux en BDD
- // les flux sont mis au préalable dans des variables de Request
- Minz_Request::_param ('q', 'null');
- Minz_Request::_param ('categories', $categories);
- Minz_Request::_param ('feeds', $feeds);
- Minz_Request::forward (array ('c' => 'feed', 'a' => 'massiveImport'));
- } catch (FreshRSS_Opml_Exception $e) {
- Minz_Log::record ($e->getMessage (), Minz_Log::WARNING);
-
- $notif = array (
- 'type' => 'bad',
- 'content' => Minz_Translate::t ('bad_opml_file')
- );
- Minz_Session::_param ('notification', $notif);
+ $notif = array (
+ 'type' => 'good',
+ 'content' => Minz_Translate::t ('configuration_updated')
+ );
+ Minz_Session::_param ('notification', $notif);
- Minz_Request::forward (array (
- 'c' => 'configure',
- 'a' => 'importExport'
- ), true);
- }
- }
+ Minz_Request::forward (array ('c' => 'configure', 'a' => 'sharing'), true);
}
- $feedDAO = new FreshRSS_FeedDAO ();
- $this->view->feeds = $feedDAO->listFeeds ();
-
- // au niveau de la vue, permet de ne pas voir un flux sélectionné dans la liste
- $this->view->flux = false;
-
- Minz_View::prependTitle (Minz_Translate::t ('import_export_opml') . ' · ');
+ Minz_View::prependTitle (Minz_Translate::t ('sharing') . ' · ');
}
public function shortcutAction () {
$list_keys = array ('a', 'b', 'backspace', 'c', 'd', 'delete', 'down', 'e', 'end', 'enter',
- 'escape', 'f', 'g', 'h', 'i', 'insert', 'j', 'k', 'l', 'left',
+ 'escape', 'f', 'g', 'h', 'home', 'i', 'insert', 'j', 'k', 'l', 'left',
'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right',
's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y',
'z', '0', '1', '2', '3', '4', '5', '6', '7', '8',
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php
index 1756c91e5..bbcb990f5 100755
--- a/app/Controllers/entryController.php
+++ b/app/Controllers/entryController.php
@@ -100,6 +100,9 @@ class FreshRSS_entry_Controller extends Minz_ActionController {
$entryDAO = new FreshRSS_EntryDAO();
$entryDAO->optimizeTable();
+ $feedDAO = new FreshRSS_FeedDAO();
+ $feedDAO->updateCachedValues();
+
invalidateHttpCache();
$notif = array (
@@ -137,11 +140,13 @@ class FreshRSS_entry_Controller extends Minz_ActionController {
if ($nb > 0) {
$nbTotal += $nb;
Minz_Log::record($nb . ' old entries cleaned in feed [' . $feed->url() . ']', Minz_Log::DEBUG);
- $feedDAO->updateLastUpdate($feed->id());
+ //$feedDAO->updateLastUpdate($feed->id());
}
}
}
+ $feedDAO->updateCachedValues();
+
invalidateHttpCache();
$notif = array(
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index c40b3c400..fce008399 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -3,28 +3,51 @@
class FreshRSS_feed_Controller extends Minz_ActionController {
public function firstAction () {
if (!$this->view->loginOk) {
- $token = $this->view->conf->token; //TODO: check the token logic again, and if it is still needed
+ // Token is useful in the case that anonymous refresh is forbidden
+ // and CRON task cannot be used with php command so the user can
+ // set a CRON task to refresh his feeds by using token inside url
+ $token = $this->view->conf->token;
$token_param = Minz_Request::param ('token', '');
$token_is_ok = ($token != '' && $token == $token_param);
$action = Minz_Request::actionName ();
- if (!($token_is_ok && $action === 'actualize')) {
+ if (!(($token_is_ok || Minz_Configuration::allowAnonymousRefresh()) &&
+ $action === 'actualize')
+ ) {
Minz_Error::error (
403,
array ('error' => array (Minz_Translate::t ('access_denied')))
);
}
}
+ }
+
+ public function addAction () {
+ $url = Minz_Request::param('url_rss', false);
+ if ($url === false) {
+ Minz_Request::forward(array(
+ 'c' => 'configure',
+ 'a' => 'feed'
+ ), true);
+ }
+
+ $feedDAO = new FreshRSS_FeedDAO ();
$this->catDAO = new FreshRSS_CategoryDAO ();
$this->catDAO->checkDefault ();
- }
- public function addAction () {
- @set_time_limit(300);
+ if (Minz_Request::isPost()) {
+ @set_time_limit(300);
+
- if (Minz_Request::isPost ()) {
- $url = Minz_Request::param ('url_rss');
$cat = Minz_Request::param ('category', false);
+ if ($cat === 'nc') {
+ $new_cat = Minz_Request::param ('new_category');
+ if (empty($new_cat['name'])) {
+ $cat = false;
+ } else {
+ $cat = $this->catDAO->addCategory($new_cat);
+ }
+ }
if ($cat === false) {
$def_cat = $this->catDAO->getDefault ();
$cat = $def_cat->id ();
@@ -47,7 +70,6 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$feed->load(true);
- $feedDAO = new FreshRSS_FeedDAO ();
$values = array (
'url' => $feed->url (),
'category' => $feed->category (),
@@ -123,7 +145,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
Minz_Log::record ($e->getMessage (), Minz_Log::WARNING);
$notif = array (
'type' => 'bad',
- 'content' => Minz_Translate::t ('internal_problem_feed')
+ 'content' => Minz_Translate::t ('internal_problem_feed', Minz_Url::display(array('a' => 'logs')))
);
Minz_Session::_param ('notification', $notif);
} catch (Minz_FileNotExistException $e) {
@@ -131,7 +153,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
Minz_Log::record ($e->getMessage (), Minz_Log::ERROR);
$notif = array (
'type' => 'bad',
- 'content' => Minz_Translate::t ('internal_problem_feed')
+ 'content' => Minz_Translate::t ('internal_problem_feed', Minz_Url::display(array('a' => 'logs')))
);
Minz_Session::_param ('notification', $notif);
}
@@ -141,6 +163,38 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
Minz_Request::forward (array ('c' => 'configure', 'a' => 'feed', 'params' => $params), true);
}
+
+ // GET request so we must ask confirmation to user
+ Minz_View::prependTitle(Minz_Translate::t('add_rss_feed') . ' · ');
+ $this->view->categories = $this->catDAO->listCategories();
+ $this->view->feed = new FreshRSS_Feed($url);
+ try {
+ // We try to get some more information about the feed
+ $this->view->feed->load(true);
+ $this->view->load_ok = true;
+ } catch (Exception $e) {
+ $this->view->load_ok = false;
+ }
+
+ $feed = $feedDAO->searchByUrl($this->view->feed->url());
+ if ($feed) {
+ // Already subscribe so we redirect to the feed configuration page
+ $notif = array(
+ 'type' => 'bad',
+ 'content' => Minz_Translate::t(
+ 'already_subscribed', $feed->name()
+ )
+ );
+ Minz_Session::_param('notification', $notif);
+
+ Minz_Request::forward(array(
+ 'c' => 'configure',
+ 'a' => 'feed',
+ 'params' => array(
+ 'id' => $feed->id()
+ )
+ ), true);
+ }
}
public function truncateAction () {
@@ -189,38 +243,51 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$flux_update = 0;
$is_read = $this->view->conf->mark_when['reception'] ? 1 : 0;
foreach ($feeds as $feed) {
+ if (!$feed->lock()) {
+ Minz_Log::record('Feed already being actualized: ' . $feed->url(), Minz_Log::NOTICE);
+ continue;
+ }
try {
$url = $feed->url();
+ $feedHistory = $feed->keepHistory();
+
$feed->load(false);
$entries = array_reverse($feed->entries()); //We want chronological order and SimplePie uses reverse order
+ $hasTransaction = false;
- //For this feed, check last n entry GUIDs already in database
- $existingGuids = array_fill_keys ($entryDAO->listLastGuidsByFeed ($feed->id (), count($entries) + 10), 1);
- $useDeclaredDate = empty($existingGuids);
+ if (count($entries) > 0) {
+ //For this feed, check last n entry GUIDs already in database
+ $existingGuids = array_fill_keys ($entryDAO->listLastGuidsByFeed ($feed->id (), count($entries) + 10), 1);
+ $useDeclaredDate = empty($existingGuids);
- $feedHistory = $feed->keepHistory();
- if ($feedHistory == -2) { //default
- $feedHistory = $this->view->conf->keep_history_default;
- }
+ if ($feedHistory == -2) { //default
+ $feedHistory = $this->view->conf->keep_history_default;
+ }
+
+ $hasTransaction = true;
+ $feedDAO->beginTransaction();
- // On ne vérifie pas strictement que l'article n'est pas déjà en BDD
- // La BDD refusera l'ajout car (id_feed, guid) doit être unique
- $feedDAO->beginTransaction ();
- foreach ($entries as $entry) {
- $eDate = $entry->date (true);
- if ((!isset ($existingGuids[$entry->guid ()])) &&
- (($feedHistory != 0) || ($eDate >= $date_min))) {
- $values = $entry->toArray ();
- //Use declared date at first import, otherwise use discovery date
- $values['id'] = ($useDeclaredDate || $eDate < $date_min) ?
- min(time(), $eDate) . uSecString() :
- uTimeString();
- $values['is_read'] = $is_read;
- $entryDAO->addEntry ($values);
+ // On ne vérifie pas strictement que l'article n'est pas déjà en BDD
+ // La BDD refusera l'ajout car (id_feed, guid) doit être unique
+ foreach ($entries as $entry) {
+ $eDate = $entry->date (true);
+ if ((!isset ($existingGuids[$entry->guid ()])) &&
+ (($feedHistory != 0) || ($eDate >= $date_min))) {
+ $values = $entry->toArray ();
+ //Use declared date at first import, otherwise use discovery date
+ $values['id'] = ($useDeclaredDate || $eDate < $date_min) ?
+ min(time(), $eDate) . uSecString() :
+ uTimeString();
+ $values['is_read'] = $is_read;
+ $entryDAO->addEntry ($values);
+ }
}
}
if (($feedHistory >= 0) && (rand(0, 30) === 1)) {
+ if (!$hasTransaction) {
+ $feedDAO->beginTransaction();
+ }
$nb = $feedDAO->cleanOldEntries ($feed->id (), $date_min, max($feedHistory, count($entries) + 10));
if ($nb > 0) {
Minz_Log::record ($nb . ' old entries cleaned in feed [' . $feed->url() . ']', Minz_Log::DEBUG);
@@ -228,18 +295,23 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
// on indique que le flux vient d'être mis à jour en BDD
- $feedDAO->updateLastUpdate ($feed->id ());
- $feedDAO->commit ();
+ $feedDAO->updateLastUpdate ($feed->id (), 0, $hasTransaction);
+ if ($hasTransaction) {
+ $feedDAO->commit();
+ }
$flux_update++;
if ($feed->url() !== $url) { //URL has changed (auto-discovery)
$feedDAO->updateFeed($feed->id(), array('url' => $feed->url()));
}
- $feed->faviconPrepare();
} catch (FreshRSS_Feed_Exception $e) {
Minz_Log::record ($e->getMessage (), Minz_Log::NOTICE);
$feedDAO->updateLastUpdate ($feed->id (), 1);
}
+ $feed->faviconPrepare();
+ $feed->unlock();
+ unset($feed);
+
// On arrête à 10 flux pour ne pas surcharger le serveur
// sauf si le paramètre $force est à vrai
$i++;
@@ -251,6 +323,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$url = array ();
if ($flux_update === 1) {
// on a mis un seul flux à jour
+ $feed = reset ($feeds);
$notif = array (
'type' => 'good',
'content' => Minz_Translate::t ('feed_actualized', $feed->name ())
@@ -264,8 +337,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
} else {
// aucun flux n'a été mis à jour, oups
$notif = array (
- 'type' => 'bad',
- 'content' => Minz_Translate::t ('no_feed_actualized')
+ 'type' => 'good',
+ 'content' => Minz_Translate::t ('no_feed_to_refresh')
);
}
@@ -295,77 +368,6 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
}
- public function massiveImportAction () {
- @set_time_limit(300);
-
- $entryDAO = new FreshRSS_EntryDAO ();
- $feedDAO = new FreshRSS_FeedDAO ();
-
- $categories = Minz_Request::param ('categories', array (), true);
- $feeds = Minz_Request::param ('feeds', array (), true);
-
- // on ajoute les catégories en masse dans une fonction à part
- $this->addCategories ($categories);
-
- // on calcule la date des articles les plus anciens qu'on accepte
- $nb_month_old = $this->view->conf->old_entries;
- $date_min = time () - (3600 * 24 * 30 * $nb_month_old);
-
- // la variable $error permet de savoir si une erreur est survenue
- // Le but est de ne pas arrêter l'import même en cas d'erreur
- // L'utilisateur sera mis au courant s'il y a eu des erreurs, mais
- // ne connaîtra pas les détails. Ceux-ci seront toutefois logguées
- $error = false;
- $i = 0;
- foreach ($feeds as $feed) {
- try {
- $values = array (
- 'id' => $feed->id (),
- 'url' => $feed->url (),
- 'category' => $feed->category (),
- 'name' => $feed->name (),
- 'website' => $feed->website (),
- 'description' => $feed->description (),
- 'lastUpdate' => 0,
- 'httpAuth' => $feed->httpAuth ()
- );
-
- // ajout du flux que s'il n'est pas déjà en BDD
- if (!$feedDAO->searchByUrl ($values['url'])) {
- $id = $feedDAO->addFeed ($values);
- if ($id) {
- $feed->_id ($id);
- $feed->faviconPrepare();
- } else {
- $error = true;
- }
- }
- } catch (FreshRSS_Feed_Exception $e) {
- $error = true;
- Minz_Log::record ($e->getMessage (), Minz_Log::WARNING);
- }
- }
-
- if ($error) {
- $res = Minz_Translate::t ('feeds_imported_with_errors');
- } else {
- $res = Minz_Translate::t ('feeds_imported');
- }
-
- $notif = array (
- 'type' => 'good',
- 'content' => $res
- );
- Minz_Session::_param ('notification', $notif);
- Minz_Session::_param ('actualize_feeds', true);
-
- // et on redirige vers la page d'accueil
- Minz_Request::forward (array (
- 'c' => 'index',
- 'a' => 'index'
- ), true);
- }
-
public function deleteAction () {
if (Minz_Request::isPost ()) {
$type = Minz_Request::param ('type', 'feed');
@@ -409,17 +411,4 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
}
}
-
- private function addCategories ($categories) {
- foreach ($categories as $cat) {
- if (!$this->catDAO->searchByName ($cat->name ())) {
- $values = array (
- 'id' => $cat->id (),
- 'name' => $cat->name (),
- 'color' => $cat->color ()
- );
- $catDAO->addCategory ($values);
- }
- }
- }
}
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
new file mode 100644
index 000000000..3cd791781
--- /dev/null
+++ b/app/Controllers/importExportController.php
@@ -0,0 +1,390 @@
+<?php
+
+class FreshRSS_importExport_Controller extends Minz_ActionController {
+ public function firstAction() {
+ if (!$this->view->loginOk) {
+ Minz_Error::error(
+ 403,
+ array('error' => array(Minz_Translate::t('access_denied')))
+ );
+ }
+
+ require_once(LIB_PATH . '/lib_opml.php');
+
+ $this->catDAO = new FreshRSS_CategoryDAO();
+ $this->entryDAO = new FreshRSS_EntryDAO();
+ $this->feedDAO = new FreshRSS_FeedDAO();
+ }
+
+ public function indexAction() {
+ $this->view->categories = $this->catDAO->listCategories();
+ $this->view->feeds = $this->feedDAO->listFeeds();
+
+ Minz_View::prependTitle(Minz_Translate::t('import_export') . ' · ');
+ }
+
+ public function importAction() {
+ if (Minz_Request::isPost() && $_FILES['file']['error'] == 0) {
+ @set_time_limit(300);
+
+ $file = $_FILES['file'];
+ $type_file = $this->guessFileType($file['name']);
+
+ $list_files = array(
+ 'opml' => array(),
+ 'json_starred' => array(),
+ 'json_feed' => array()
+ );
+
+ // We try to list all files according to their type
+ // A zip file is first opened and then its files are listed
+ $list = array();
+ if ($type_file === 'zip') {
+ $zip = zip_open($file['tmp_name']);
+
+ while (($zipfile = zip_read($zip)) !== false) {
+ $type_zipfile = $this->guessFileType(
+ zip_entry_name($zipfile)
+ );
+
+ if ($type_file !== 'unknown') {
+ $list_files[$type_zipfile][] = zip_entry_read(
+ $zipfile,
+ zip_entry_filesize($zipfile)
+ );
+ }
+ }
+
+ zip_close($zip);
+ } elseif ($type_file !== 'unknown') {
+ $list_files[$type_file][] = file_get_contents(
+ $file['tmp_name']
+ );
+ }
+
+ // Import different files.
+ // OPML first(so categories and feeds are imported)
+ // Starred articles then so the "favourite" status is already set
+ // And finally all other files.
+ $error = false;
+ foreach ($list_files['opml'] as $opml_file) {
+ $error = $this->importOpml($opml_file);
+ }
+ foreach ($list_files['json_starred'] as $article_file) {
+ $error = $this->importArticles($article_file, true);
+ }
+ foreach ($list_files['json_feed'] as $article_file) {
+ $error = $this->importArticles($article_file);
+ }
+
+ // And finally, we get import status and redirect to the home page
+ $notif = null;
+ if ($error === true) {
+ $content_notif = Minz_Translate::t(
+ 'feeds_imported_with_errors'
+ );
+ } else {
+ $content_notif = Minz_Translate::t(
+ 'feeds_imported'
+ );
+ }
+
+ Minz_Session::_param('notification', array(
+ 'type' => 'good',
+ 'content' => $content_notif
+ ));
+ Minz_Session::_param('actualize_feeds', true);
+
+ Minz_Request::forward(array(
+ 'c' => 'index',
+ 'a' => 'index'
+ ), true);
+ }
+
+ // What are you doing? you have to call this controller
+ // with a POST request!
+ Minz_Request::forward(array(
+ 'c' => 'importExport',
+ 'a' => 'index'
+ ));
+ }
+
+ private function guessFileType($filename) {
+ // A *very* basic guess file type function. Only based on filename
+ // That's could be improved but should be enough, at least for a first
+ // implementation.
+ // TODO: improve this function?
+
+ if (substr_compare($filename, '.zip', -4) === 0) {
+ return 'zip';
+ } elseif (substr_compare($filename, '.opml', -5) === 0 ||
+ substr_compare($filename, '.xml', -4) === 0) {
+ return 'opml';
+ } elseif (strcmp($filename, 'starred.json') === 0) {
+ return 'json_starred';
+ } elseif (substr_compare($filename, '.json', -5) === 0 &&
+ strpos($filename, 'feed_') === 0) {
+ return 'json_feed';
+ } else {
+ return 'unknown';
+ }
+ }
+
+ private function importOpml($opml_file) {
+ $opml_array = array();
+ try {
+ $opml_array = libopml_parse_string($opml_file);
+ } catch (LibOPML_Exception $e) {
+ Minz_Log::warning($e->getMessage());
+ return true;
+ }
+
+ $this->catDAO->checkDefault();
+
+ return $this->addOpmlElements($opml_array['body']);
+ }
+
+ private function addOpmlElements($opml_elements, $parent_cat = null) {
+ $error = false;
+ foreach ($opml_elements as $elt) {
+ $res = false;
+ if (isset($elt['xmlUrl'])) {
+ $res = $this->addFeedOpml($elt, $parent_cat);
+ } else {
+ $res = $this->addCategoryOpml($elt, $parent_cat);
+ }
+
+ if (!$error && $res) {
+ // oops: there is at least one error!
+ $error = $res;
+ }
+ }
+
+ return $error;
+ }
+
+ private function addFeedOpml($feed_elt, $parent_cat) {
+ if (is_null($parent_cat)) {
+ // This feed has no parent category so we get the default one
+ $parent_cat = $this->catDAO->getDefault()->name();
+ }
+
+ $cat = $this->catDAO->searchByName($parent_cat);
+
+ if (!$cat) {
+ return true;
+ }
+
+ // We get different useful information
+ $url = html_chars_utf8($feed_elt['xmlUrl']);
+ $name = html_chars_utf8($feed_elt['text']);
+ $website = '';
+ if (isset($feed_elt['htmlUrl'])) {
+ $website = html_chars_utf8($feed_elt['htmlUrl']);
+ }
+ $description = '';
+ if (isset($feed_elt['description'])) {
+ $description = html_chars_utf8($feed_elt['description']);
+ }
+
+ $error = false;
+ try {
+ // Create a Feed object and add it in DB
+ $feed = new FreshRSS_Feed($url);
+ $feed->_category($cat->id());
+ $feed->_name($name);
+ $feed->_website($website);
+ $feed->_description($description);
+
+ // addFeedObject checks if feed is already in DB so nothing else to
+ // check here
+ $id = $this->feedDAO->addFeedObject($feed);
+ $error = ($id === false);
+ } catch (FreshRSS_Feed_Exception $e) {
+ Minz_Log::warning($e->getMessage());
+ $error = true;
+ }
+
+ return $error;
+ }
+
+ private function addCategoryOpml($cat_elt, $parent_cat) {
+ // Create a new Category object
+ $cat = new FreshRSS_Category(html_chars_utf8($cat_elt['text']));
+
+ $id = $this->catDAO->addCategoryObject($cat);
+ $error = ($id === false);
+
+ if (isset($cat_elt['@outlines'])) {
+ // Our cat_elt contains more categories or more feeds, so we
+ // add them recursively.
+ // Note: FreshRSS does not support yet category arborescence
+ $res = $this->addOpmlElements($cat_elt['@outlines'], $cat->name());
+ if (!$error && $res) {
+ $error = true;
+ }
+ }
+
+ return $error;
+ }
+
+ private function importArticles($article_file, $starred = false) {
+ $article_object = json_decode($article_file, true);
+ if (is_null($article_object)) {
+ Minz_Log::warning('Try to import a non-JSON file');
+ return true;
+ }
+
+ $is_read = $this->view->conf->mark_when['reception'] ? 1 : 0;
+
+ $google_compliant = (
+ strpos($article_object['id'], 'com.google') !== false
+ );
+
+ $error = false;
+ foreach ($article_object['items'] as $item) {
+ $feed = $this->addFeedArticles($item['origin'], $google_compliant);
+ if (is_null($feed)) {
+ $error = true;
+ continue;
+ }
+
+ $author = isset($item['author']) ? $item['author'] : '';
+ $key_content = ($google_compliant && !isset($item['content'])) ?
+ 'summary' : 'content';
+ $tags = $item['categories'];
+ if ($google_compliant) {
+ $tags = array_filter($tags, function($var) {
+ return strpos($var, '/state/com.google') === false;
+ });
+ }
+
+ $entry = new FreshRSS_Entry(
+ $feed->id(), $item['id'], $item['title'], $author,
+ $item[$key_content]['content'], $item['alternate'][0]['href'],
+ $item['published'], $is_read, $starred
+ );
+ $entry->_tags($tags);
+
+ $id = $this->entryDAO->addEntryObject(
+ $entry, $this->view->conf, $feed->keepHistory()
+ );
+
+ if (!$error && ($id === false)) {
+ $error = true;
+ }
+ }
+
+ return $error;
+ }
+
+ private function addFeedArticles($origin, $google_compliant) {
+ $default_cat = $this->catDAO->getDefault();
+
+ $return = null;
+ $key = $google_compliant ? 'htmlUrl' : 'feedUrl';
+ $url = $origin[$key];
+ $name = $origin['title'];
+ $website = $origin['htmlUrl'];
+ $error = false;
+ try {
+ // Create a Feed object and add it in DB
+ $feed = new FreshRSS_Feed($url);
+ $feed->_category($default_cat->id());
+ $feed->_name($name);
+ $feed->_website($website);
+
+ // addFeedObject checks if feed is already in DB so nothing else to
+ // check here
+ $id = $this->feedDAO->addFeedObject($feed);
+
+ if ($id !== false) {
+ $feed->_id($id);
+ $return = $feed;
+ }
+ } catch (FreshRSS_Feed_Exception $e) {
+ Minz_Log::warning($e->getMessage());
+ }
+
+ return $return;
+ }
+
+ public function exportAction() {
+ if (Minz_Request::isPost()) {
+ $this->view->_useLayout(false);
+
+ $export_opml = Minz_Request::param('export_opml', false);
+ $export_starred = Minz_Request::param('export_starred', false);
+ $export_feeds = Minz_Request::param('export_feeds', false);
+
+ // From https://stackoverflow.com/questions/1061710/php-zip-files-on-the-fly
+ $file = tempnam('tmp', 'zip');
+ $zip = new ZipArchive();
+ $zip->open($file, ZipArchive::OVERWRITE);
+
+ // Stuff with content
+ if ($export_opml) {
+ $zip->addFromString(
+ 'feeds.opml', $this->generateOpml()
+ );
+ }
+ if ($export_starred) {
+ $zip->addFromString(
+ 'starred.json', $this->generateArticles('starred')
+ );
+ }
+ foreach ($export_feeds as $feed_id) {
+ $feed = $this->feedDAO->searchById($feed_id);
+ $zip->addFromString(
+ 'feed_' . $feed->category() . '_' . $feed->id() . '.json',
+ $this->generateArticles('feed', $feed)
+ );
+ }
+
+ // Close and send to user
+ $zip->close();
+ header('Content-Type: application/zip');
+ header('Content-Length: ' . filesize($file));
+ header('Content-Disposition: attachment; filename="freshrss_export.zip"');
+ readfile($file);
+ unlink($file);
+ }
+ }
+
+ private function generateOpml() {
+ $list = array();
+ foreach ($this->catDAO->listCategories() as $key => $cat) {
+ $list[$key]['name'] = $cat->name();
+ $list[$key]['feeds'] = $this->feedDAO->listByCategory($cat->id());
+ }
+
+ $this->view->categories = $list;
+ return $this->view->helperToString('export/opml');
+ }
+
+ private function generateArticles($type, $feed = NULL) {
+ $this->view->categories = $this->catDAO->listCategories();
+
+ if ($type == 'starred') {
+ $this->view->list_title = Minz_Translate::t('starred_list');
+ $this->view->type = 'starred';
+ $unread_fav = $this->entryDAO->countUnreadReadFavorites();
+ $this->view->entries = $this->entryDAO->listWhere(
+ 's', '', FreshRSS_Entry::STATE_ALL, 'ASC',
+ $unread_fav['all']
+ );
+ } elseif ($type == 'feed' && !is_null($feed)) {
+ $this->view->list_title = Minz_Translate::t(
+ 'feed_list', $feed->name()
+ );
+ $this->view->type = 'feed/' . $feed->id();
+ $this->view->entries = $this->entryDAO->listWhere(
+ 'f', $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC',
+ $this->view->conf->posts_per_page
+ );
+ $this->view->feed = $feed;
+ }
+
+ return $this->view->helperToString('export/articles');
+ }
+}
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index 986a322a1..c843748c3 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -5,27 +5,32 @@ class FreshRSS_index_Controller extends Minz_ActionController {
public function indexAction () {
$output = Minz_Request::param ('output');
- $token = '';
+ $token = $this->view->conf->token;
// check if user is logged in
- if (!$this->view->loginOk && !Minz_Configuration::allowAnonymous())
- {
- $token = $this->view->conf->token;
+ if (!$this->view->loginOk && !Minz_Configuration::allowAnonymous()) {
$token_param = Minz_Request::param ('token', '');
$token_is_ok = ($token != '' && $token === $token_param);
- if (!($output === 'rss' && $token_is_ok)) {
+ if ($output === 'rss' && !$token_is_ok) {
+ Minz_Error::error (
+ 403,
+ array ('error' => array (Minz_Translate::t ('access_denied')))
+ );
+ return;
+ } elseif ($output !== 'rss') {
+ // "hard" redirection is not required, just ask dispatcher to
+ // forward to the login form without 302 redirection
+ Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'));
return;
}
- $params['token'] = $token;
}
- // construction of RSS url of this feed
$params = Minz_Request::params ();
- $params['output'] = 'rss';
if (isset ($params['search'])) {
$params['search'] = urlencode ($params['search']);
}
- $this->view->rss_url = array (
+
+ $this->view->url = array (
'c' => 'index',
'a' => 'index',
'params' => $params
@@ -75,20 +80,22 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// On récupère les différents éléments de filtrage
$this->view->state = $state = Minz_Request::param ('state', $this->view->conf->default_view);
+ $state_param = Minz_Request::param ('state', null);
$filter = Minz_Request::param ('search', '');
if (!empty($filter)) {
- $state = 'all'; //Search always in read and unread articles
+ $state = FreshRSS_Entry::STATE_ALL; //Search always in read and unread articles
}
$this->view->order = $order = Minz_Request::param ('order', $this->view->conf->sort_order);
$nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page);
$first = Minz_Request::param ('next', '');
- if ($state === 'not_read') { //Any unread article in this category at all?
+ if ($state === FreshRSS_Entry::STATE_NOT_READ) { //Any unread article in this category at all?
switch ($getType) {
case 'a':
$hasUnread = $this->view->nb_not_read > 0;
break;
case 's':
+ // This is deprecated. The favorite button does not exist anymore
$hasUnread = $this->view->nb_favorites['unread'] > 0;
break;
case 'c':
@@ -102,8 +109,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$hasUnread = true;
break;
}
- if (!$hasUnread) {
- $this->view->state = $state = 'all';
+ if (!$hasUnread && ($state_param === null)) {
+ $this->view->state = $state = FreshRSS_Entry::STATE_ALL;
}
}
@@ -116,14 +123,14 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$keepHistoryDefault = $this->view->conf->keep_history_default;
try {
- $entries = $entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, $keepHistoryDefault);
+ $entries = $entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, true, $keepHistoryDefault);
// Si on a récupéré aucun article "non lus"
// on essaye de récupérer tous les articles
- if ($state === 'not_read' && empty($entries)) {
+ if ($state === FreshRSS_Entry::STATE_NOT_READ && empty($entries) && ($state_param === null)) {
Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
- $this->view->state = 'all';
- $entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);
+ $this->view->state = FreshRSS_Entry::STATE_ALL;
+ $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault);
}
if (count($entries) <= $nb) {
@@ -342,6 +349,37 @@ class FreshRSS_index_Controller extends Minz_ActionController {
}
$this->view->_useLayout(false);
Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
+ } elseif (Minz_Configuration::unsafeAutologinEnabled() && isset($_GET['u']) && isset($_GET['p'])) {
+ Minz_Session::_param('currentUser');
+ Minz_Session::_param('mail');
+ Minz_Session::_param('passwordHash');
+ $username = ctype_alnum($_GET['u']) ? $_GET['u'] : '';
+ $passwordPlain = $_GET['p'];
+ Minz_Request::_param('p'); //Discard plain-text password ASAP
+ $_GET['p'] = '';
+ if (!function_exists('password_verify')) {
+ include_once(LIB_PATH . '/password_compat.php');
+ }
+ try {
+ $conf = new FreshRSS_Configuration($username);
+ $s = $conf->passwordHash;
+ $ok = password_verify($passwordPlain, $s);
+ unset($passwordPlain);
+ if ($ok) {
+ Minz_Session::_param('currentUser', $username);
+ Minz_Session::_param('passwordHash', $s);
+ } else {
+ Minz_Log::record('Unsafe password mismatch for user ' . $username, Minz_Log::WARNING);
+ }
+ } catch (Minz_Exception $me) {
+ Minz_Log::record('Unsafe login failure: ' . $me->getMessage(), Minz_Log::WARNING);
+ }
+ Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
+ } elseif (!Minz_Configuration::canLogIn()) {
+ Minz_Error::error (
+ 403,
+ array ('error' => array (Minz_Translate::t ('access_denied')))
+ );
}
invalidateHttpCache();
}
diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php
index b879dcd6d..3d741e298 100755
--- a/app/Controllers/javascriptController.php
+++ b/app/Controllers/javascriptController.php
@@ -8,7 +8,7 @@ class FreshRSS_javascript_Controller extends Minz_ActionController {
public function actualizeAction () {
header('Content-Type: text/javascript; charset=UTF-8');
$feedDAO = new FreshRSS_FeedDAO ();
- $this->view->feeds = $feedDAO->listFeeds ();
+ $this->view->feeds = $feedDAO->listFeedsOrderUpdate();
}
public function nbUnreadsPerFeedAction() {
diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php
index 8314b75fc..fa967cedc 100644
--- a/app/Controllers/usersController.php
+++ b/app/Controllers/usersController.php
@@ -32,6 +32,18 @@ class FreshRSS_users_Controller extends Minz_ActionController {
}
Minz_Session::_param('passwordHash', $this->view->conf->passwordHash);
+ $passwordPlain = Minz_Request::param('apiPasswordPlain', false);
+ if ($passwordPlain != '') {
+ if (!function_exists('password_hash')) {
+ include_once(LIB_PATH . '/password_compat.php');
+ }
+ $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST));
+ $passwordPlain = '';
+ $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js
+ $ok &= ($passwordHash != '');
+ $this->view->conf->_apiPasswordHash($passwordHash);
+ }
+
if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) {
$this->view->conf->_mail_login(Minz_Request::param('mail_login', false));
}
@@ -54,11 +66,22 @@ class FreshRSS_users_Controller extends Minz_ActionController {
$anon = Minz_Request::param('anon_access', false);
$anon = ((bool)$anon) && ($anon !== 'no');
+ $anon_refresh = Minz_Request::param('anon_refresh', false);
+ $anon_refresh = ((bool)$anon_refresh) && ($anon_refresh !== 'no');
$auth_type = Minz_Request::param('auth_type', 'none');
+ $unsafe_autologin = Minz_Request::param('unsafe_autologin', false);
+ $api_enabled = Minz_Request::param('api_enabled', false);
if ($anon != Minz_Configuration::allowAnonymous() ||
- $auth_type != Minz_Configuration::authType()) {
+ $auth_type != Minz_Configuration::authType() ||
+ $anon_refresh != Minz_Configuration::allowAnonymousRefresh() ||
+ $unsafe_autologin != Minz_Configuration::unsafeAutologinEnabled() ||
+ $api_enabled != Minz_Configuration::apiEnabled()) {
+
Minz_Configuration::_authType($auth_type);
Minz_Configuration::_allowAnonymous($anon);
+ Minz_Configuration::_allowAnonymousRefresh($anon_refresh);
+ Minz_Configuration::_enableAutologin($unsafe_autologin);
+ Minz_Configuration::_enableApi($api_enabled);
$ok &= Minz_Configuration::writeFile();
}
}
diff --git a/app/Exceptions/OpmlException.php b/app/Exceptions/OpmlException.php
deleted file mode 100644
index e0ea3e493..000000000
--- a/app/Exceptions/OpmlException.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-class FreshRSS_Opml_Exception extends FreshRSS_Feed_Exception {
- public function __construct ($name_file) {
- parent::__construct ('OPML file is invalid');
- }
-}
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index c51f91dec..84cf3429b 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -94,10 +94,6 @@ class FreshRSS extends Minz_FrontController {
$loginOk = false;
break;
}
- if ((!$loginOk) && (PHP_SAPI === 'cli') && (Minz_Request::actionName() === 'actualize')) { //Command line
- Minz_Configuration::_authType('none');
- $loginOk = true;
- }
}
Minz_View::_param ('loginOk', $loginOk);
return $loginOk;
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 8e1e44ef8..328bae799 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -3,14 +3,12 @@
class FreshRSS_Category extends Minz_Model {
private $id = 0;
private $name;
- private $color;
private $nbFeed = -1;
private $nbNotRead = -1;
private $feeds = null;
- public function __construct ($name = '', $color = '#0062BE', $feeds = null) {
+ public function __construct ($name = '', $feeds = null) {
$this->_name ($name);
- $this->_color ($color);
if (isset ($feeds)) {
$this->_feeds ($feeds);
$this->nbFeed = 0;
@@ -28,9 +26,6 @@ class FreshRSS_Category extends Minz_Model {
public function name () {
return $this->name;
}
- public function color () {
- return $this->color;
- }
public function nbFeed () {
if ($this->nbFeed < 0) {
$catDAO = new FreshRSS_CategoryDAO ();
@@ -68,13 +63,6 @@ class FreshRSS_Category extends Minz_Model {
public function _name ($value) {
$this->name = $value;
}
- public function _color ($value) {
- if (preg_match ('/^#([0-9a-f]{3}|[0-9a-f]{6})$/i', $value)) {
- $this->color = $value;
- } else {
- $this->color = '#0062BE';
- }
- }
public function _feeds ($values) {
if (!is_array ($values)) {
$values = array ($values);
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php
index 1cc616ac0..6a9b839b9 100644
--- a/app/Models/CategoryDAO.php
+++ b/app/Models/CategoryDAO.php
@@ -2,12 +2,11 @@
class FreshRSS_CategoryDAO extends Minz_ModelPdo {
public function addCategory ($valuesTmp) {
- $sql = 'INSERT INTO `' . $this->prefix . 'category` (name, color) VALUES(?, ?)';
+ $sql = 'INSERT INTO `' . $this->prefix . 'category` (name) VALUES(?)';
$stm = $this->bd->prepare ($sql);
$values = array (
substr($valuesTmp['name'], 0, 255),
- substr($valuesTmp['color'], 0, 7),
);
if ($stm && $stm->execute ($values)) {
@@ -19,13 +18,25 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
}
}
+ public function addCategoryObject($category) {
+ $cat = $this->searchByName($category->name());
+ if (!$cat) {
+ // Category does not exist yet in DB so we add it before continue
+ $values = array(
+ 'name' => $category->name(),
+ );
+ return $this->addCategory($values);
+ }
+
+ return $cat->id();
+ }
+
public function updateCategory ($id, $valuesTmp) {
- $sql = 'UPDATE `' . $this->prefix . 'category` SET name=?, color=? WHERE id=?';
+ $sql = 'UPDATE `' . $this->prefix . 'category` SET name=? WHERE id=?';
$stm = $this->bd->prepare ($sql);
$values = array (
$valuesTmp['name'],
- $valuesTmp['color'],
$id
);
@@ -66,7 +77,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
if (isset ($cat[0])) {
return $cat[0];
} else {
- return false;
+ return null;
}
}
public function searchByName ($name) {
@@ -82,14 +93,13 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
if (isset ($cat[0])) {
return $cat[0];
} else {
- return false;
+ return null;
}
}
public function listCategories ($prePopulateFeeds = true, $details = false) {
if ($prePopulateFeeds) {
$sql = 'SELECT c.id AS c_id, c.name AS c_name, '
- . ($details ? 'c.color AS c_color, ' : '')
. ($details ? 'f.* ' : 'f.id, f.name, f.url, f.website, f.priority, f.error, f.cache_nbEntries, f.cache_nbUnreads ')
. 'FROM `' . $this->prefix . 'category` c '
. 'LEFT OUTER JOIN `' . $this->prefix . 'feed` f ON f.category = c.id '
@@ -123,14 +133,13 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
public function checkDefault () {
$def_cat = $this->searchById (1);
- if ($def_cat === false) {
+ if ($def_cat == null) {
$cat = new FreshRSS_Category (Minz_Translate::t ('default_category'));
$cat->_id (1);
$values = array (
'id' => $cat->id (),
'name' => $cat->name (),
- 'color' => $cat->color ()
);
$this->addCategory ($values);
@@ -203,7 +212,6 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
// End of the current category, we add it to the $list
$cat = new FreshRSS_Category (
$previousLine['c_name'],
- isset($previousLine['c_color']) ? $previousLine['c_color'] : '',
FreshRSS_FeedDAO::daoToFeed ($feedsDao, $previousLine['c_id'])
);
$cat->_id ($previousLine['c_id']);
@@ -220,7 +228,6 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
if ($previousLine != null) {
$cat = new FreshRSS_Category (
$previousLine['c_name'],
- isset($previousLine['c_color']) ? $previousLine['c_color'] : '',
FreshRSS_FeedDAO::daoToFeed ($feedsDao, $previousLine['c_id'])
);
$cat->_id ($previousLine['c_id']);
@@ -239,8 +246,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo {
foreach ($listDAO as $key => $dao) {
$cat = new FreshRSS_Category (
- $dao['name'],
- $dao['color']
+ $dao['name']
);
$cat->_id ($dao['id']);
$list[$key] = $cat;
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 2a7fe95aa..0d6666297 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -10,13 +10,15 @@ class FreshRSS_Configuration {
'mail_login' => '',
'token' => '',
'passwordHash' => '', //CRYPT_BLOWFISH
+ 'apiPasswordHash' => '', //CRYPT_BLOWFISH
'posts_per_page' => 20,
'view_mode' => 'normal',
- 'default_view' => 'not_read',
+ 'default_view' => FreshRSS_Entry::STATE_NOT_READ,
'auto_load_more' => true,
'display_posts' => false,
'onread_jump_next' => true,
'lazyload' => true,
+ 'sticky_post' => true,
'sort_order' => 'DESC',
'anon_access' => false,
'mark_when' => array(
@@ -26,15 +28,19 @@ class FreshRSS_Configuration {
'reception' => false,
),
'theme' => 'Origine',
+ 'content_width' => 'thin',
'shortcuts' => array(
'mark_read' => 'r',
'mark_favorite' => 'f',
'go_website' => 'space',
'next_entry' => 'j',
'prev_entry' => 'k',
+ 'first_entry' => 'home',
+ 'last_entry' => 'end',
'collapse_entry' => 'c',
'load_more' => 'm',
'auto_share' => 's',
+ 'focus_search' => 'a',
),
'topline_read' => true,
'topline_favorite' => true,
@@ -46,16 +52,7 @@ class FreshRSS_Configuration {
'bottomline_tags' => true,
'bottomline_date' => true,
'bottomline_link' => true,
- 'sharing' => array(
- 'shaarli' => '',
- 'wallabag' => '',
- 'diaspora' => '',
- 'twitter' => true,
- 'g+' => true,
- 'facebook' => true,
- 'email' => true,
- 'print' => true,
- ),
+ 'sharing' => array(),
);
private $available_languages = array(
@@ -63,8 +60,10 @@ class FreshRSS_Configuration {
'fr' => 'Français',
);
- public function __construct ($user) {
- $this->filename = DATA_PATH . '/' . $user . '_user.php';
+ private $shares;
+
+ public function __construct($user) {
+ $this->filename = DATA_PATH . DIRECTORY_SEPARATOR . $user . '_user.php';
$data = @include($this->filename);
if (!is_array($data)) {
@@ -78,10 +77,20 @@ class FreshRSS_Configuration {
}
}
$this->data['user'] = $user;
+
+ $this->shares = DATA_PATH . DIRECTORY_SEPARATOR . 'shares.php';
+
+ $shares = @include($this->shares);
+ if (!is_array($shares)) {
+ throw new Minz_PermissionDeniedException($this->shares);
+ }
+
+ $this->data['shares'] = $shares;
}
public function save() {
@rename($this->filename, $this->filename . '.bak.php');
+ unset($this->data['shares']); // Remove shares because it is not intended to be stored in user configuration
if (file_put_contents($this->filename, "<?php\n return " . var_export($this->data, true) . ';', LOCK_EX) === false) {
throw new Minz_PermissionDeniedException($this->filename);
}
@@ -102,16 +111,6 @@ class FreshRSS_Configuration {
}
}
- public function sharing($key = false) {
- if ($key === false) {
- return $this->data['sharing'];
- }
- if (isset($this->data['sharing'][$key])) {
- return $this->data['sharing'][$key];
- }
- return false;
- }
-
public function availableLanguages() {
return $this->available_languages;
}
@@ -134,7 +133,7 @@ class FreshRSS_Configuration {
}
}
public function _default_view ($value) {
- $this->data['default_view'] = $value === 'all' ? 'all' : 'not_read';
+ $this->data['default_view'] = $value === FreshRSS_Entry::STATE_ALL ? FreshRSS_Entry::STATE_ALL : FreshRSS_Entry::STATE_NOT_READ;
}
public function _display_posts ($value) {
$this->data['display_posts'] = ((bool)$value) && $value !== 'no';
@@ -145,6 +144,9 @@ class FreshRSS_Configuration {
public function _lazyload ($value) {
$this->data['lazyload'] = ((bool)$value) && $value !== 'no';
}
+ public function _sticky_post($value) {
+ $this->data['sticky_post'] = ((bool)$value) && $value !== 'no';
+ }
public function _sort_order ($value) {
$this->data['sort_order'] = $value === 'ASC' ? 'ASC' : 'DESC';
}
@@ -166,6 +168,9 @@ class FreshRSS_Configuration {
public function _passwordHash ($value) {
$this->data['passwordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : '';
}
+ public function _apiPasswordHash ($value) {
+ $this->data['apiPasswordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : '';
+ }
public function _mail_login ($value) {
$value = filter_var($value, FILTER_VALIDATE_EMAIL);
if ($value) {
@@ -185,29 +190,47 @@ class FreshRSS_Configuration {
}
}
public function _sharing ($values) {
- $are_url = array ('shaarli', 'wallabag', 'diaspora');
- foreach ($values as $key => $value) {
- if (in_array($key, $are_url)) {
+ $this->data['sharing'] = array();
+ foreach ($values as $value) {
+ if (!is_array($value)) {
+ continue;
+ }
+
+ // Verify URL and add default value when needed
+ if (isset($value['url'])) {
$is_url = (
- filter_var ($value, FILTER_VALIDATE_URL) ||
+ filter_var ($value['url'], FILTER_VALIDATE_URL) ||
(version_compare(PHP_VERSION, '5.3.3', '<') &&
(strpos($value, '-') > 0) &&
($value === filter_var($value, FILTER_SANITIZE_URL)))
); //PHP bug #51192
-
if (!$is_url) {
- $value = '';
+ continue;
}
- } elseif (!is_bool($value)) {
- $value = true;
+ } else {
+ $value['url'] = null;
}
- $this->data['sharing'][$key] = $value;
+ // Add a default name
+ if (empty($value['name'])) {
+ $value['name'] = $value['type'];
+ }
+
+ $this->data['sharing'][] = $value;
}
}
public function _theme($value) {
$this->data['theme'] = $value;
}
+ public function _content_width($value) {
+ if ($value === 'medium' ||
+ $value === 'large' ||
+ $value === 'no_limit') {
+ $this->data['content_width'] = $value;
+ } else {
+ $this->data['content_width'] = 'thin';
+ }
+ }
public function _token($value) {
$this->data['token'] = $value;
}
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index a6c67221b..fa9066d5b 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -1,6 +1,11 @@
<?php
class FreshRSS_Entry extends Minz_Model {
+ const STATE_ALL = 0;
+ const STATE_READ = 1;
+ const STATE_NOT_READ = 2;
+ const STATE_FAVORITE = 4;
+ const STATE_NOT_FAVORITE = 8;
private $id = 0;
private $guid;
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index aaf4dcf6a..4e24541dc 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -35,11 +35,45 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
}
}
- public function markFavorite ($id, $is_favorite = true) {
+ public function addEntryObject($entry, $conf, $feedHistory) {
+ $existingGuids = array_fill_keys(
+ $this->listLastGuidsByFeed($entry->feed(), 20), 1
+ );
+
+ $nb_month_old = max($conf->old_entries, 1);
+ $date_min = time() - (3600 * 24 * 30 * $nb_month_old);
+
+ $eDate = $entry->date(true);
+
+ if ($feedHistory == -2) {
+ $feedHistory = $conf->keep_history_default;
+ }
+
+ if (!isset($existingGuids[$entry->guid()]) &&
+ ($feedHistory != 0 || $eDate >= $date_min)) {
+ $values = $entry->toArray();
+
+ $useDeclaredDate = empty($existingGuids);
+ $values['id'] = ($useDeclaredDate || $eDate < $date_min) ?
+ min(time(), $eDate) . uSecString() :
+ uTimeString();
+
+ return $this->addEntry($values);
+ }
+
+ // We don't return Entry object to avoid a research in DB
+ return -1;
+ }
+
+ public function markFavorite($ids, $is_favorite = true) {
+ if (!is_array($ids)) {
+ $ids = array($ids);
+ }
$sql = 'UPDATE `' . $this->prefix . 'entry` e '
. 'SET e.is_favorite = ? '
- . 'WHERE e.id=?';
- $values = array ($is_favorite ? 1 : 0, $id);
+ . 'WHERE e.id IN (' . str_repeat('?,', count($ids) - 1). '?)';
+ $values = array ($is_favorite ? 1 : 0);
+ $values = array_merge($values, $ids);
$stm = $this->bd->prepare ($sql);
if ($stm && $stm->execute ($values)) {
return $stm->rowCount();
@@ -49,30 +83,79 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
return false;
}
}
- public function markRead ($id, $is_read = true) {
- $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
- . 'SET e.is_read = ?,'
- . 'f.cache_nbUnreads=f.cache_nbUnreads' . ($is_read ? '-' : '+') . '1 '
- . 'WHERE e.id=?';
- $values = array ($is_read ? 1 : 0, $id);
- $stm = $this->bd->prepare ($sql);
- if ($stm && $stm->execute ($values)) {
- return $stm->rowCount();
+
+ public function markRead($ids, $is_read = true) {
+ if (is_array($ids)) {
+ if (count($ids) < 6) { //Speed heuristics
+ $affected = 0;
+ foreach ($ids as $id) {
+ $affected += $this->markRead($id, $is_read);
+ }
+ return $affected;
+ }
+
+ $this->bd->beginTransaction();
+ $sql = 'UPDATE `' . $this->prefix . 'entry` e '
+ . 'SET e.is_read = ? '
+ . 'WHERE e.id IN (' . str_repeat('?,', count($ids) - 1). '?)';
+ $values = array($is_read ? 1 : 0);
+ $values = array_merge($values, $ids);
+ $stm = $this->bd->prepare($sql);
+ if (!($stm && $stm->execute($values))) {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ $this->bd->rollBack();
+ return false;
+ }
+ $affected = $stm->rowCount();
+
+ if ($affected > 0) {
+ $sql = 'UPDATE `' . $this->prefix . 'feed` f '
+ . 'INNER JOIN ('
+ . 'SELECT e.id_feed, '
+ . 'COUNT(CASE WHEN e.is_read = 0 THEN 1 END) AS nbUnreads, '
+ . 'COUNT(e.id) AS nbEntries '
+ . 'FROM `' . $this->prefix . 'entry` e '
+ . 'GROUP BY e.id_feed'
+ . ') x ON x.id_feed=f.id '
+ . 'SET f.cache_nbEntries=x.nbEntries, f.cache_nbUnreads=x.nbUnreads';
+ $stm = $this->bd->prepare($sql);
+ if (!($stm && $stm->execute())) {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ $this->bd->rollBack();
+ return false;
+ }
+ }
+
+ $this->bd->commit();
+ return $affected;
} else {
- $info = $stm->errorInfo();
- Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR);
- return false;
+ $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
+ . 'SET e.is_read = ?,'
+ . 'f.cache_nbUnreads=f.cache_nbUnreads' . ($is_read ? '-' : '+') . '1 '
+ . 'WHERE e.id=?';
+ $values = array($is_read ? 1 : 0, $ids);
+ $stm = $this->bd->prepare($sql);
+ if ($stm && $stm->execute($values)) {
+ return $stm->rowCount();
+ } else {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ return false;
+ }
}
}
- public function markReadEntries ($idMax = 0, $favorites = false) {
- if ($idMax === 0) {
+
+ public function markReadEntries ($idMax = 0, $onlyFavorites = false, $priorityMin = 0) {
+ if ($idMax == 0) {
$sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
. 'SET e.is_read = 1, f.cache_nbUnreads=0 '
- . 'WHERE e.is_read = 0 AND ';
- if ($favorites) {
- $sql .= 'e.is_favorite = 1';
- } else {
- $sql .= 'f.priority > 0';
+ . 'WHERE e.is_read = 0';
+ if ($onlyFavorites) {
+ $sql .= ' AND e.is_favorite = 1';
+ } elseif ($priorityMin >= 0) {
+ $sql .= ' AND f.priority > ' . intval($priorityMin);
}
$stm = $this->bd->prepare ($sql);
if ($stm && $stm->execute ()) {
@@ -87,11 +170,11 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
. 'SET e.is_read = 1 '
- . 'WHERE e.is_read = 0 AND e.id <= ? AND ';
- if ($favorites) {
- $sql .= 'e.is_favorite = 1';
- } else {
- $sql .= 'f.priority > 0';
+ . 'WHERE e.is_read = 0 AND e.id <= ?';
+ if ($onlyFavorites) {
+ $sql .= ' AND e.is_favorite = 1';
+ } elseif ($priorityMin >= 0) {
+ $sql .= ' AND f.priority > ' . intval($priorityMin);
}
$values = array ($idMax);
$stm = $this->bd->prepare ($sql);
@@ -126,8 +209,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
return $affected;
}
}
+
public function markReadCat ($id, $idMax = 0) {
- if ($idMax === 0) {
+ if ($idMax == 0) {
$sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
. 'SET e.is_read = 1, f.cache_nbUnreads=0 '
. 'WHERE f.category = ? AND e.is_read = 0';
@@ -181,8 +265,70 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
return $affected;
}
}
+
+ public function markReadCatName($name, $idMax = 0) {
+ if ($idMax == 0) {
+ $sql = 'UPDATE `' . $this->prefix . 'entry` e '
+ . 'INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
+ . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category '
+ . 'SET e.is_read = 1, f.cache_nbUnreads=0 '
+ . 'WHERE c.name = ?';
+ $values = array($name);
+ $stm = $this->bd->prepare($sql);
+ if ($stm && $stm->execute($values)) {
+ return $stm->rowCount();
+ } else {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ return false;
+ }
+ } else {
+ $this->bd->beginTransaction();
+
+ $sql = 'UPDATE `' . $this->prefix . 'entry` e '
+ . 'INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
+ . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category '
+ . 'SET e.is_read = 1 '
+ . 'WHERE c.name = ? AND e.id <= ?';
+ $values = array($name, $idMax);
+ $stm = $this->bd->prepare($sql);
+ if (!($stm && $stm->execute($values))) {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ $this->bd->rollBack();
+ return false;
+ }
+ $affected = $stm->rowCount();
+
+ if ($affected > 0) {
+ $sql = 'UPDATE `' . $this->prefix . 'feed` f '
+ . 'LEFT OUTER JOIN ('
+ . 'SELECT e.id_feed, '
+ . 'COUNT(*) AS nbUnreads '
+ . 'FROM `' . $this->prefix . 'entry` e '
+ . 'WHERE e.is_read = 0 '
+ . 'GROUP BY e.id_feed'
+ . ') x ON x.id_feed=f.id '
+ . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category '
+ . 'SET f.cache_nbUnreads=COALESCE(x.nbUnreads, 0) '
+ . 'WHERE c.name = ?';
+ $values = array($name);
+ $stm = $this->bd->prepare($sql);
+ if (!($stm && $stm->execute($values))) {
+ $info = $stm->errorInfo();
+ Minz_Log::record('SQL error : ' . $info[2], Minz_Log::ERROR);
+ $this->bd->rollBack();
+ return false;
+ }
+ }
+
+ $this->bd->commit();
+ return $affected;
+ }
+ }
+
public function markReadFeed ($id, $idMax = 0) {
- if ($idMax === 0) {
+ if ($idMax == 0) {
$sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id '
. 'SET e.is_read = 1, f.cache_nbUnreads=0 '
. 'WHERE f.id=? AND e.is_read = 0';
@@ -244,7 +390,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$stm->execute ($values);
$res = $stm->fetchAll (PDO::FETCH_ASSOC);
$entries = self::daoToEntry ($res);
- return isset ($entries[0]) ? $entries[0] : false;
+ return isset ($entries[0]) ? $entries[0] : null;
}
public function searchById ($id) {
@@ -257,10 +403,13 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$stm->execute ($values);
$res = $stm->fetchAll (PDO::FETCH_ASSOC);
$entries = self::daoToEntry ($res);
- return isset ($entries[0]) ? $entries[0] : false;
+ return isset ($entries[0]) ? $entries[0] : null;
}
- public function listWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $keepHistoryDefault = 0) {
+ private function sqlListWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) {
+ if (!$state) {
+ $state = FreshRSS_Entry::STATE_ALL;
+ }
$where = '';
$joinFeed = false;
$values = array();
@@ -269,7 +418,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$where .= 'f.priority > 0 ';
$joinFeed = true;
break;
- case 's':
+ case 's': //Deprecated: use $state instead
$where .= 'e1.is_favorite = 1 ';
break;
case 'c':
@@ -281,24 +430,30 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$where .= 'e1.id_feed = ? ';
$values[] = intval($id);
break;
+ case 'A':
+ $where .= '1 ';
+ break;
default:
throw new FreshRSS_EntriesGetter_Exception ('Bad type in Entry->listByType: [' . $type . ']!');
}
- switch ($state) {
- case 'all':
- break;
- case 'not_read':
+
+ if ($state & FreshRSS_Entry::STATE_NOT_READ) {
+ if (!($state & FreshRSS_Entry::STATE_READ)) {
$where .= 'AND e1.is_read = 0 ';
- break;
- case 'read':
- $where .= 'AND e1.is_read = 1 ';
- break;
- case 'favorite':
+ }
+ }
+ elseif ($state & FreshRSS_Entry::STATE_READ) {
+ $where .= 'AND e1.is_read = 1 ';
+ }
+ if ($state & FreshRSS_Entry::STATE_FAVORITE) {
+ if (!($state & FreshRSS_Entry::STATE_NOT_FAVORITE)) {
$where .= 'AND e1.is_favorite = 1 ';
- break;
- default:
- throw new FreshRSS_EntriesGetter_Exception ('Bad state in Entry->listByType: [' . $state . ']!');
+ }
+ }
+ elseif ($state & FreshRSS_Entry::STATE_NOT_FAVORITE) {
+ $where .= 'AND e1.is_favorite = 0 ';
}
+
switch ($order) {
case 'DESC':
case 'ASC':
@@ -310,70 +465,84 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
$where .= 'AND e1.id ' . ($order === 'DESC' ? '<=' : '>=') . $firstId . ' ';
}
if (($date_min > 0) && ($type !== 's')) {
- $where .= 'AND (e1.id >= ' . $date_min . '000000 OR e1.is_read = 0 OR e1.is_favorite = 1 OR (f.keep_history <> 0';
- if (intval($keepHistoryDefault) === 0) {
- $where .= ' AND f.keep_history <> -2'; //default
+ $where .= 'AND (e1.id >= ' . $date_min . '000000';
+ if ($showOlderUnreadsorFavorites) { //Lax date constraint
+ $where .= ' OR e1.is_read = 0 OR e1.is_favorite = 1 OR (f.keep_history <> 0';
+ if (intval($keepHistoryDefault) === 0) {
+ $where .= ' AND f.keep_history <> -2'; //default
+ }
+ $where .= ')';
}
- $where .= ')) ';
+ $where .= ') ';
$joinFeed = true;
}
$search = '';
if ($filter !== '') {
+ require_once(LIB_PATH . '/lib_date.php');
$filter = trim($filter);
$filter = addcslashes($filter, '\\%_');
- if (stripos($filter, 'intitle:') === 0) {
- $filter = substr($filter, strlen('intitle:'));
- $intitle = true;
- } else {
- $intitle = false;
- }
- if (stripos($filter, 'inurl:') === 0) {
- $filter = substr($filter, strlen('inurl:'));
- $inurl = true;
- } else {
- $inurl = false;
- }
- if (stripos($filter, 'author:') === 0) {
- $filter = substr($filter, strlen('author:'));
- $author = true;
- } else {
- $author = false;
- }
$terms = array_unique(explode(' ', $filter));
- sort($terms); //Put #tags first
+ //sort($terms); //Put #tags first //TODO: Put the cheapest filters first
foreach ($terms as $word) {
$word = trim($word);
- if (strlen($word) > 0) {
- if ($intitle) {
- $search .= 'AND e1.title LIKE ? ';
- $values[] = '%' . $word .'%';
- } elseif ($inurl) {
- $search .= 'AND CONCAT(e1.link, e1.guid) LIKE ? ';
- $values[] = '%' . $word .'%';
- } elseif ($author) {
- $search .= 'AND e1.author LIKE ? ';
+ if (stripos($word, 'intitle:') === 0) {
+ $word = substr($word, strlen('intitle:'));
+ $search .= 'AND e1.title LIKE ? ';
+ $values[] = '%' . $word .'%';
+ } elseif (stripos($word, 'inurl:') === 0) {
+ $word = substr($word, strlen('inurl:'));
+ $search .= 'AND CONCAT(e1.link, e1.guid) LIKE ? ';
+ $values[] = '%' . $word .'%';
+ } elseif (stripos($word, 'author:') === 0) {
+ $word = substr($word, strlen('author:'));
+ $search .= 'AND e1.author LIKE ? ';
+ $values[] = '%' . $word .'%';
+ } elseif (stripos($word, 'date:') === 0) {
+ $word = substr($word, strlen('date:'));
+ list($minDate, $maxDate) = parseDateInterval($word);
+ if ($minDate) {
+ $search .= 'AND e1.id >= ' . $minDate . '000000 ';
+ }
+ if ($maxDate) {
+ $search .= 'AND e1.id <= ' . $maxDate . '000000 ';
+ }
+ } elseif (stripos($word, 'pubdate:') === 0) {
+ $word = substr($word, strlen('pubdate:'));
+ list($minDate, $maxDate) = parseDateInterval($word);
+ if ($minDate) {
+ $search .= 'AND e1.date >= ' . $minDate . ' ';
+ }
+ if ($maxDate) {
+ $search .= 'AND e1.date <= ' . $maxDate . ' ';
+ }
+ } else {
+ if ($word[0] === '#' && isset($word[1])) {
+ $search .= 'AND e1.tags LIKE ? ';
$values[] = '%' . $word .'%';
} else {
- if ($word[0] === '#' && isset($word[1])) {
- $search .= 'AND e1.tags LIKE ? ';
- $values[] = '%' . $word .'%';
- } else {
- $search .= 'AND CONCAT(e1.title, UNCOMPRESS(e1.content_bin)) LIKE ? ';
- $values[] = '%' . $word .'%';
- }
+ $search .= 'AND CONCAT(e1.title, UNCOMPRESS(e1.content_bin)) LIKE ? ';
+ $values[] = '%' . $word .'%';
}
}
}
}
+ return array($values,
+ 'SELECT e1.id FROM `' . $this->prefix . 'entry` e1 '
+ . ($joinFeed ? 'INNER JOIN `' . $this->prefix . 'feed` f ON e1.id_feed = f.id ' : '')
+ . 'WHERE ' . $where
+ . $search
+ . 'ORDER BY e1.id ' . $order
+ . ($limit > 0 ? ' LIMIT ' . $limit : '')); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
+ }
+
+ public function listWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) {
+ list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filter, $date_min, $showOlderUnreadsorFavorites, $keepHistoryDefault);
+
$sql = 'SELECT e.id, e.guid, e.title, e.author, UNCOMPRESS(e.content_bin) AS content, e.link, e.date, e.is_read, e.is_favorite, e.id_feed, e.tags '
. 'FROM `' . $this->prefix . 'entry` e '
- . 'INNER JOIN (SELECT e1.id FROM `' . $this->prefix . 'entry` e1 '
- . ($joinFeed ? 'INNER JOIN `' . $this->prefix . 'feed` f ON e1.id_feed = f.id ' : '')
- . 'WHERE ' . $where
- . $search
- . 'ORDER BY e1.id ' . $order
- . ($limit > 0 ? ' LIMIT ' . $limit : '') //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
+ . 'INNER JOIN ('
+ . $sql
. ') e2 ON e2.id = e.id '
. 'ORDER BY e.id ' . $order;
@@ -383,6 +552,15 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
return self::daoToEntry ($stm->fetchAll (PDO::FETCH_ASSOC));
}
+ public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { //For API
+ list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filter, $date_min, $showOlderUnreadsorFavorites, $keepHistoryDefault);
+
+ $stm = $this->bd->prepare($sql);
+ $stm->execute($values);
+
+ return $stm->fetchAll(PDO::FETCH_COLUMN, 0);
+ }
+
public function listLastGuidsByFeed($id, $n) {
$sql = 'SELECT guid FROM `' . $this->prefix . 'entry` WHERE id_feed=? ORDER BY id DESC LIMIT ' . intval($n);
$stm = $this->bd->prepare ($sql);
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 22c019080..757eacd59 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -193,10 +193,10 @@ class FreshRSS_Feed extends Minz_Model {
}
$feed = customSimplePie();
$feed->set_feed_url ($url);
- $feed->init ();
+ $mtime = $feed->init();
- if ($feed->error ()) {
- throw new FreshRSS_Feed_Exception ($feed->error . ' [' . $url . ']');
+ if ((!$mtime) || $feed->error()) {
+ throw new FreshRSS_Feed_Exception ($feed->error() . ' [' . $url . ']');
}
// si on a utilisé l'auto-discover, notre url va avoir changé
@@ -210,18 +210,27 @@ class FreshRSS_Feed extends Minz_Model {
}
if ($loadDetails) {
- $title = htmlspecialchars(html_only_entity_decode($feed->get_title()), ENT_COMPAT, 'UTF-8');
- $this->_name ($title === null ? $this->url : $title);
+ $title = strtr(html_only_entity_decode($feed->get_title()), array('<' => '&lt;', '>' => '&gt;', '"' => '&quot;')); //HTML to HTML-PRE //ENT_COMPAT except &
+ $this->_name ($title == '' ? $this->url : $title);
$this->_website(html_only_entity_decode($feed->get_link()));
$this->_description(html_only_entity_decode($feed->get_description()));
}
- // et on charge les articles du flux
- $this->loadEntries ($feed);
+ if (($mtime === true) || ($mtime > $this->lastUpdate)) {
+ syslog(LOG_DEBUG, 'FreshRSS no cache ' . $mtime . ' > ' . $this->lastUpdate . ' for ' . $subscribe_url);
+ $this->loadEntries($feed); // et on charge les articles du flux
+ } else {
+ syslog(LOG_DEBUG, 'FreshRSS use cache for ' . $subscribe_url);
+ $this->entries = array();
+ }
+
+ $feed->__destruct(); //http://simplepie.org/wiki/faq/i_m_getting_memory_leaks
+ unset($feed);
}
}
}
+
private function loadEntries ($feed) {
$entries = array ();
@@ -245,11 +254,16 @@ class FreshRSS_Feed extends Minz_Model {
$elinks = array();
foreach ($item->get_enclosures() as $enclosure) {
$elink = $enclosure->get_link();
- if (array_key_exists($elink, $elinks)) continue;
- $elinks[$elink] = '1';
- $mime = strtolower($enclosure->get_type());
- if (strpos($mime, 'image/') === 0) {
- $content .= '<br /><img src="' . $elink . '" alt="" />';
+ if (empty($elinks[$elink])) {
+ $elinks[$elink] = '1';
+ $mime = strtolower($enclosure->get_type());
+ if (strpos($mime, 'image/') === 0) {
+ $content .= '<br /><img src="' . $elink . '" alt="" />';
+ } elseif (strpos($mime, 'audio/') === 0) {
+ $content .= '<br /><audio src="' . $elink . '" controls="controls" />';
+ } elseif (strpos($mime, 'video/') === 0) {
+ $content .= '<br /><video src="' . $elink . '" controls="controls" />';
+ }
}
}
@@ -267,8 +281,27 @@ class FreshRSS_Feed extends Minz_Model {
$entry->loadCompleteContent($this->pathEntries());
$entries[] = $entry;
+ unset($item);
}
$this->entries = $entries;
}
+
+ function lock() {
+ $lock = TMP_PATH . '/' . md5(Minz_Configuration::salt() . $this->url) . '.freshrss.lock';
+ if (file_exists($lock) && ((time() - @filemtime($lock)) > 3600)) {
+ @unlink($lock);
+ }
+ if (($handle = @fopen($lock, 'x')) === false) {
+ return false;
+ }
+ //register_shutdown_function('unlink', $lock);
+ @fclose($handle);
+ return true;
+ }
+
+ function unlock() {
+ $lock = TMP_PATH . '/' . md5(Minz_Configuration::salt() . $this->url) . '.freshrss.lock';
+ @unlink($lock);
+ }
}
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index e102da4ec..b65ff4af0 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -24,6 +24,36 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
}
}
+ public function addFeedObject($feed) {
+ // TODO: not sure if we should write this method in DAO since DAO
+ // should not be aware about feed class
+
+ // Add feed only if we don't find it in DB
+ $feed_search = $this->searchByUrl($feed->url());
+ if (!$feed_search) {
+ $values = array(
+ 'id' => $feed->id(),
+ 'url' => $feed->url(),
+ 'category' => $feed->category(),
+ 'name' => $feed->name(),
+ 'website' => $feed->website(),
+ 'description' => $feed->description(),
+ 'lastUpdate' => 0,
+ 'httpAuth' => $feed->httpAuth()
+ );
+
+ $id = $this->addFeed($values);
+ if ($id) {
+ $feed->_id($id);
+ $feed->faviconPrepare();
+ }
+
+ return $id;
+ }
+
+ return $feed_search->id();
+ }
+
public function updateFeed ($id, $valuesTmp) {
$set = '';
foreach ($valuesTmp as $key => $v) {
@@ -52,21 +82,27 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
}
}
- public function updateLastUpdate ($id, $inError = 0) {
- $sql = 'UPDATE `' . $this->prefix . 'feed` f ' //2 sub-requests with FOREIGN KEY(e.id_feed), INDEX(e.is_read) faster than 1 request with GROUP BY or CASE
- . 'SET f.cache_nbEntries=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=f.id),'
- . 'f.cache_nbUnreads=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=f.id AND e2.is_read=0),'
- . 'lastUpdate=?, error=? '
- . 'WHERE f.id=?';
-
- $stm = $this->bd->prepare ($sql);
+ public function updateLastUpdate ($id, $inError = 0, $updateCache = true) {
+ if ($updateCache) {
+ $sql = 'UPDATE `' . $this->prefix . 'feed` f ' //2 sub-requests with FOREIGN KEY(e.id_feed), INDEX(e.is_read) faster than 1 request with GROUP BY or CASE
+ . 'SET f.cache_nbEntries=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=f.id),'
+ . 'f.cache_nbUnreads=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=f.id AND e2.is_read=0),'
+ . 'lastUpdate=?, error=? '
+ . 'WHERE f.id=?';
+ } else {
+ $sql = 'UPDATE `' . $this->prefix . 'feed` f '
+ . 'SET lastUpdate=?, error=? '
+ . 'WHERE f.id=?';
+ }
$values = array (
- time (),
+ time(),
$inError,
$id,
);
+ $stm = $this->bd->prepare ($sql);
+
if ($stm && $stm->execute ($values)) {
return $stm->rowCount();
} else {
@@ -164,7 +200,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
if (isset ($feed[$id])) {
return $feed[$id];
} else {
- return false;
+ return null;
}
}
public function searchByUrl ($url) {
@@ -180,7 +216,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
if (isset ($feed)) {
return $feed;
} else {
- return false;
+ return null;
}
}
@@ -192,8 +228,27 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
return self::daoToFeed ($stm->fetchAll (PDO::FETCH_ASSOC));
}
- public function listFeedsOrderUpdate () {
- $sql = 'SELECT id, name, url, pathEntries, httpAuth, keep_history FROM `' . $this->prefix . 'feed` ORDER BY lastUpdate';
+ public function arrayFeedCategoryNames() { //For API
+ $sql = 'SELECT f.id, f.name, c.name as c_name FROM `' . $this->prefix . 'feed` f '
+ . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category';
+ $stm = $this->bd->prepare ($sql);
+ $stm->execute ();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+ $feedCategoryNames = array();
+ foreach ($res as $line) {
+ $feedCategoryNames[$line['id']] = array(
+ 'name' => $line['name'],
+ 'c_name' => $line['c_name'],
+ );
+ }
+ return $feedCategoryNames;
+ }
+
+ public function listFeedsOrderUpdate ($cacheDuration = 1500) {
+ $sql = 'SELECT id, name, url, lastUpdate, pathEntries, httpAuth, keep_history '
+ . 'FROM `' . $this->prefix . 'feed` '
+ . 'WHERE lastUpdate < ' . (time() - intval($cacheDuration))
+ . ' ORDER BY lastUpdate';
$stm = $this->bd->prepare ($sql);
$stm->execute ();
@@ -220,6 +275,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
return $res[0]['count'];
}
+
public function countNotRead ($id) {
$sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND is_read=0';
$stm = $this->bd->prepare ($sql);
@@ -229,6 +285,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
return $res[0]['count'];
}
+
public function updateCachedValues () { //For one single feed, call updateLastUpdate($id)
$sql = 'UPDATE `' . $this->prefix . 'feed` f '
. 'INNER JOIN ('
@@ -241,9 +298,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
. 'SET f.cache_nbEntries=x.nbEntries, f.cache_nbUnreads=x.nbUnreads';
$stm = $this->bd->prepare ($sql);
- $values = array ($feed_id);
-
- if ($stm && $stm->execute ($values)) {
+ if ($stm && $stm->execute()) {
return $stm->rowCount();
} else {
$info = $stm->errorInfo();
diff --git a/app/Models/Share.php b/app/Models/Share.php
new file mode 100644
index 000000000..b146db722
--- /dev/null
+++ b/app/Models/Share.php
@@ -0,0 +1,44 @@
+<?php
+
+class FreshRSS_Share {
+
+ static public function generateUrl($options, $selected, $link, $title) {
+ $share = $options[$selected['type']];
+ $matches = array(
+ '~URL~',
+ '~TITLE~',
+ '~LINK~',
+ );
+ $replaces = array(
+ $selected['url'],
+ self::transformData($title, self::getTransform($share, 'title')),
+ self::transformData($link, self::getTransform($share, 'link')),
+ );
+ $url = str_replace($matches, $replaces, $share['url']);
+ return $url;
+ }
+
+ static private function transformData($data, $transform) {
+ if (!is_array($transform)) {
+ return $data;
+ }
+ if (count($transform) === 0) {
+ return $data;
+ }
+ foreach ($transform as $action) {
+ $data = call_user_func($action, $data);
+ }
+ return $data;
+ }
+
+ static private function getTransform($options, $type) {
+ $transform = $options['transform'];
+
+ if (array_key_exists($type, $transform)) {
+ return $transform[$type];
+ }
+
+ return $transform;
+ }
+
+}
diff --git a/app/Models/Themes.php b/app/Models/Themes.php
index c7099a1df..620149934 100644
--- a/app/Models/Themes.php
+++ b/app/Models/Themes.php
@@ -77,6 +77,7 @@ class FreshRSS_Themes extends Minz_Model {
'down' => '▽',
'favorite' => '★',
'help' => 'ⓘ',
+ 'key' => '⚿',
'link' => '↗',
'login' => '🔒',
'logout' => '🔓',
@@ -84,6 +85,7 @@ class FreshRSS_Themes extends Minz_Model {
'non-starred' => '☆',
'prev' => '⏪',
'read' => '☑',
+ 'rss' => '☄',
'unread' => '☐',
'refresh' => '🔃', //↻
'search' => '🔍',
@@ -91,6 +93,9 @@ class FreshRSS_Themes extends Minz_Model {
'starred' => '★',
'tag' => '⚐',
'up' => '△',
+ 'view-normal' => '☰',
+ 'view-global' => '☷',
+ 'view-reader' => '☕',
);
if (!isset($alts[$name])) {
return '';
diff --git a/app/actualize_script.php b/app/actualize_script.php
index 9ac80a852..4c306b8da 100755
--- a/app/actualize_script.php
+++ b/app/actualize_script.php
@@ -1,21 +1,5 @@
<?php
require(dirname(__FILE__) . '/../constants.php');
-
-//<Mutex>
-$lock = DATA_PATH . '/actualize.lock.txt';
-if (file_exists($lock) && ((time() - @filemtime($lock)) > 3600)) {
- @unlink($lock);
-}
-if (($handle = @fopen($lock, 'x')) === false) {
- syslog(LOG_NOTICE, 'FreshRSS actualize already running?');
- fwrite(STDERR, 'FreshRSS actualize already running?' . "\n");
- return;
-}
-register_shutdown_function('unlink', $lock);
-//Could use http://php.net/function.pcntl-signal.php to catch interruptions
-@fclose($handle);
-//</Mutex>
-
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
session_cache_limiter('');
@@ -32,7 +16,9 @@ $users = array_unique($users);
foreach ($users as $myUser) {
syslog(LOG_INFO, 'FreshRSS actualize ' . $myUser);
- fwrite(STDOUT, 'Actualize ' . $myUser . "...\n"); //Unbuffered
+ if (defined('STDOUT')) {
+ fwrite(STDOUT, 'Actualize ' . $myUser . "...\n"); //Unbuffered
+ }
echo $myUser, ' '; //Buffered
$_GET['c'] = 'feed';
@@ -42,7 +28,8 @@ foreach ($users as $myUser) {
$_SERVER['HTTP_HOST'] = '';
$freshRSS = new FreshRSS();
- $freshRSS->_useOb(false);
+
+ Minz_Configuration::_authType('none');
Minz_Session::init('FreshRSS');
Minz_Session::_param('currentUser', $myUser);
@@ -50,10 +37,18 @@ foreach ($users as $myUser) {
$freshRSS->init();
$freshRSS->run();
- invalidateHttpCache();
+ if (!invalidateHttpCache()) {
+ syslog(LOG_NOTICE, 'FreshRSS write access problem in ' . LOG_PATH . '/*.log!');
+ if (defined('STDERR')) {
+ fwrite(STDERR, 'Write access problem in ' . LOG_PATH . '/*.log!' . "\n");
+ }
+ }
Minz_Session::unset_session(true);
Minz_ModelPdo::clean();
}
syslog(LOG_INFO, 'FreshRSS actualize done.');
+if (defined('STDOUT')) {
+ fwrite(STDOUT, 'Done.' . "\n");
+}
+echo 'End.', "\n";
ob_end_flush();
-fwrite(STDOUT, 'Done.' . "\n");
diff --git a/app/i18n/en.php b/app/i18n/en.php
index a2cc461c5..a3c1dfeb7 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -3,6 +3,7 @@
return array (
// LAYOUT
'login' => 'Login',
+ 'login_with_persona' => 'Login with Persona',
'logout' => 'Logout',
'search' => 'Search words or #tags',
'search_short' => 'Search',
@@ -20,12 +21,13 @@ return array (
'your_rss_feeds' => 'Your RSS feeds',
'add_rss_feed' => 'Add a RSS feed',
'no_rss_feed' => 'No RSS feed',
- 'import_export_opml' => 'Import / export (OPML)',
+ 'import_export' => 'Import / export',
+ 'bookmark' => 'Subscribe (FreshRSS bookmark)',
'subscription_management' => 'Subscriptions management',
'main_stream' => 'Main stream',
'all_feeds' => 'All feeds',
- 'favorite_feeds' => 'Favourites (%d)',
+ 'favorite_feeds' => 'Favourites (%s)',
'not_read' => '%d unread',
'not_reads' => '%d unread',
@@ -49,7 +51,8 @@ return array (
'show_all_articles' => 'Show all articles',
'show_not_reads' => 'Show only unread',
'show_read' => 'Show only read',
- 'show_favorite' => 'Show favorites',
+ 'show_favorite' => 'Show only favorites',
+ 'show_not_favorite' => 'Show all but favorites',
'older_first' => 'Oldest first',
'newer_first' => 'Newer first',
@@ -77,14 +80,17 @@ return array (
'sharing_management' => 'Sharing options management',
'bad_opml_file' => 'Your OPML file is invalid',
'shortcuts_updated' => 'Shortcuts have been updated',
- 'shortcuts_management' => 'Shortcuts management',
+ 'shortcuts_navigation' => 'Navigation',
+ 'shortcuts_navigation_help' => 'With the "Shift" modifier, navigation shortcuts apply on feeds.<br/>With the "Alt" modifier, navigation shortcuts apply on categories.',
+ 'shortcuts_article_action' => 'Article actions',
+ 'shortcuts_other_action' => 'Other actions',
'feeds_marked_read' => 'Feeds have been marked as read',
'updated' => 'Modifications have been updated',
'already_subscribed' => 'You have already subscribed to <em>%s</em>',
'feed_added' => 'RSS feed <em>%s</em> has been added',
'feed_not_added' => '<em>%s</em> could not be added',
- 'internal_problem_feed' => 'The RSS feed could not be added. Check FressRSS logs for details.',
+ 'internal_problem_feed' => 'The RSS feed could not be added. <a href="%s">Check FressRSS logs</a> for details.',
'invalid_url' => 'URL <em>%s</em> is invalid',
'feed_actualized' => '<em>%s</em> has been updated',
'n_feeds_actualized' => '%d feeds have been updated',
@@ -121,23 +127,31 @@ return array (
'javascript_for_shortcuts' => 'JavaScript must be enabled in order to use shortcuts',
'javascript_should_be_activated'=> 'JavaScript must be enabled',
'shift_for_all_read' => '+ <code>shift</code> to mark all articles as read',
- 'see_on_website' => 'See article on its original website',
+ 'see_on_website' => 'See on original website',
'next_article' => 'Skip to the next article',
- 'shift_for_last' => '+ <code>shift</code> to skip to the last article of page',
+ 'last_article' => 'Skip to the last article',
'previous_article' => 'Skip to the previous article',
- 'shift_for_first' => '+ <code>shift</code> to skip to the first article of page',
+ 'first_article' => 'Skip to the first article',
'next_page' => 'Skip to the next page',
'previous_page' => 'Skip to the previous page',
- 'collapse_article' => 'Collapse current article',
- 'auto_share' => 'Share current article',
+ 'collapse_article' => 'Collapse',
+ 'auto_share' => 'Share',
+ 'auto_share_help' => 'If there is only one sharing mode, it is used. Else modes are accessible by their number.',
+ 'focus_search' => 'Access search box',
- 'file_to_import' => 'File to import',
+ 'file_to_import' => 'File to import<br />(OPML, Json or Zip)',
'import' => 'Import',
'export' => 'Export',
+ 'export_opml' => 'Export list of feeds (OPML)',
+ 'export_starred' => 'Export your favourites',
+ 'starred_list' => 'List of favourite articles',
+ 'feed_list' => 'List of %s articles',
'or' => 'or',
'informations' => 'Information',
+ 'damn' => 'Damn!',
'feed_in_error' => 'This feed has encountered a problem. Please verify that it is always reachable then actualize it.',
+ 'feed_empty' => 'This feed is empty. Please verify that it is still maintained.',
'feed_description' => 'Description',
'website_url' => 'Website URL',
'feed_url' => 'Feed URL',
@@ -158,6 +172,8 @@ return array (
'http_username' => 'HTTP username',
'http_password' => 'HTTP password',
'blank_to_disable' => 'Leave blank to disable',
+ 'share_name' => 'Share name to display',
+ 'share_url' => 'Share URL to use',
'not_yet_implemented' => 'Not yet implemented',
'access_protected_feeds' => 'Connection allows to access HTTP protected RSS feeds',
'no_selected_feed' => 'No feed selected.',
@@ -166,8 +182,12 @@ return array (
'current_user' => 'Current user',
'default_user' => 'Username of the default user <small>(maximum 16 alphanumeric characters)</small>',
'password_form' => 'Password<br /><small>(for the Web-form login method)</small>',
+ 'password_api' => 'Password API<br /><small>(e.g., for mobile apps)</small>',
'persona_connection_email' => 'Login mail address<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'allow_anonymous' => 'Allow anonymous reading of the articles of the default user (%s)',
+ 'allow_anonymous_refresh' => 'Allow anonymous refresh of the articles',
+ 'unsafe_autologin' => 'Allow unsafe automatic login using the format: ',
+ 'api_enabled' => 'Allow <abbr>API</abbr> access <small>(required for mobile apps)</small>',
'auth_token' => 'Authentication token',
'explain_token' => 'Allows to access RSS output of the default user without authentication.<br /><kbd>%s?output=rss&token=%s</kbd>',
'login_configuration' => 'Login',
@@ -193,6 +213,7 @@ return array (
'purge_completed' => 'Purge completed (%d articles deleted)',
'archiving_configuration_help' => 'More options are available in the individual stream settings',
'reading_configuration' => 'Reading',
+ 'display_configuration' => 'Display',
'articles_per_page' => 'Number of articles per page',
'default_view' => 'Default view',
'sort_order' => 'Sort order',
@@ -200,10 +221,11 @@ return array (
'display_articles_unfolded' => 'Show articles unfolded by default',
'after_onread' => 'After “mark all as read”,',
'jump_next' => 'jump to next unread sibling (feed or category)',
- 'reading_icons' => 'Reading icons',
+ 'article_icons' => 'Article icons',
'top_line' => 'Top line',
'bottom_line' => 'Bottom line',
'img_with_lazyload' => 'Use "lazy load" mode to load pictures',
+ 'sticky_post' => 'Stick the article to the top when opened',
'auto_read_when' => 'Mark article as read…',
'article_selected' => 'when article is selected',
'article_open_on_website' => 'when article is opened on its original website',
@@ -218,9 +240,15 @@ return array (
'optimize_bdd' => 'Optimize database',
'optimize_todo_sometimes' => 'To do occasionally to reduce the size of the database',
'theme' => 'Theme',
+ 'content_width' => 'Content width',
+ 'width_thin' => 'Thin',
+ 'width_medium' => 'Medium',
+ 'width_large' => 'Large',
+ 'width_no_limit' => 'No limit',
'more_information' => 'More information',
'activate_sharing' => 'Activate sharing',
'shaarli' => 'Shaarli',
+ 'blogotext' => 'Blogotext',
'wallabag' => 'wallabag',
'diaspora' => 'Diaspora*',
'twitter' => 'Twitter',
@@ -241,6 +269,7 @@ return array (
'rss_feeds_of' => 'RSS feed of %s',
'refresh' => 'Refresh',
+ 'no_feed_to_refresh' => 'There is no feed to refresh…',
'today' => 'Today',
'yesterday' => 'Yesterday',
@@ -267,7 +296,7 @@ return array (
'logs_empty' => 'Log file is empty',
'clear_logs' => 'Clear the logs',
- 'forbidden_access' => 'Access forbidden! (%s)',
+ 'forbidden_access' => 'Access is forbidden!',
'login_required' => 'Login required:',
'confirm_action' => 'Are you sure you want to perform this action? It cannot be cancelled!',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 9ab06ba26..4acf5b397 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -3,6 +3,7 @@
return array (
// LAYOUT
'login' => 'Connexion',
+ 'login_with_persona' => 'Connexion avec Persona',
'logout' => 'Déconnexion',
'search' => 'Rechercher des mots ou des #tags',
'search_short' => 'Rechercher',
@@ -20,12 +21,13 @@ return array (
'your_rss_feeds' => 'Vos flux RSS',
'add_rss_feed' => 'Ajouter un flux RSS',
'no_rss_feed' => 'Aucun flux RSS',
- 'import_export_opml' => 'Importer / exporter (OPML)',
+ 'import_export' => 'Importer / exporter',
+ 'bookmark' => 'S’abonner (bookmark FreshRSS)',
'subscription_management' => 'Gestion des abonnements',
'main_stream' => 'Flux principal',
'all_feeds' => 'Tous les flux',
- 'favorite_feeds' => 'Favoris (%d)',
+ 'favorite_feeds' => 'Favoris (%s)',
'not_read' => '%d non lu',
'not_reads' => '%d non lus',
@@ -50,6 +52,7 @@ return array (
'show_not_reads' => 'Afficher les non lus',
'show_read' => 'Afficher les lus',
'show_favorite' => 'Afficher les favoris',
+ 'show_not_favorite' => 'Afficher tout sauf les favoris',
'older_first' => 'Plus anciens en premier',
'newer_first' => 'Plus récents en premier',
@@ -77,14 +80,17 @@ return array (
'sharing_management' => 'Gestion des options de partage',
'bad_opml_file' => 'Votre fichier OPML n’est pas valide',
'shortcuts_updated' => 'Les raccourcis ont été mis à jour',
- 'shortcuts_management' => 'Gestion des raccourcis',
+ 'shortcuts_navigation' => 'Navigation',
+ 'shortcuts_navigation_help' => 'Avec le modificateur "Shift", les raccourcis de navigation s’appliquent aux flux.<br/>Avec le modificateur "Alt", les raccourcis de navigation s’appliquent aux catégories.',
+ 'shortcuts_article_action' => 'Actions associées à l’article courant',
+ 'shortcuts_other_action' => 'Autres actions',
'feeds_marked_read' => 'Les flux ont été marqués comme lus',
'updated' => 'Modifications enregistrées',
'already_subscribed' => 'Vous êtes déjà abonné à <em>%s</em>',
'feed_added' => 'Le flux <em>%s</em> a bien été ajouté',
'feed_not_added' => '<em>%s</em> n’a pas pu être ajouté',
- 'internal_problem_feed' => 'Le flux n’a pas pu être ajouté. Consulter les logs de FreshRSS pour plus de détails.',
+ 'internal_problem_feed' => 'Le flux ne peut pas être ajouté. <a href="%s">Consulter les logs de FreshRSS</a> pour plus de détails.',
'invalid_url' => 'L’url <em>%s</em> est invalide',
'feed_actualized' => '<em>%s</em> a été mis à jour',
'n_feeds_actualized' => '%d flux ont été mis à jour',
@@ -121,23 +127,31 @@ return array (
'javascript_for_shortcuts' => 'Le JavaScript doit être activé pour pouvoir profiter des raccourcis',
'javascript_should_be_activated'=> 'Le JavaScript doit être activé',
'shift_for_all_read' => '+ <code>shift</code> pour marquer tous les articles comme lus',
- 'see_on_website' => 'Voir l’article sur le site d’origine',
+ 'see_on_website' => 'Voir sur le site d’origine',
'next_article' => 'Passer à l’article suivant',
- 'shift_for_last' => '+ <code>shift</code> pour passer au dernier article de la page',
+ 'last_article' => 'Passer au dernier article',
'previous_article' => 'Passer à l’article précédent',
- 'shift_for_first' => '+ <code>shift</code> pour passer au premier article de la page',
+ 'first_article' => 'Passer au premier article',
'next_page' => 'Passer à la page suivante',
'previous_page' => 'Passer à la page précédente',
- 'collapse_article' => 'Refermer l’article courant',
- 'auto_share' => 'Partager l’article courant',
+ 'collapse_article' => 'Refermer',
+ 'auto_share' => 'Partager',
+ 'auto_share_help' => 'Si il n’y a qu’un mode de partage, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.',
+ 'focus_search' => 'Accéder à la recherche',
- 'file_to_import' => 'Fichier à importer',
+ 'file_to_import' => 'Fichier à importer<br />(OPML, Json ou Zip)',
'import' => 'Importer',
'export' => 'Exporter',
+ 'export_opml' => 'Exporter la liste des flux (OPML)',
+ 'export_starred' => 'Exporter les favoris',
+ 'starred_list' => 'Liste des articles favoris',
+ 'feed_list' => 'Liste des articles de %s',
'or' => 'ou',
'informations' => 'Informations',
+ 'damn' => 'Arf !',
'feed_in_error' => 'Ce flux a rencontré un problème. Veuillez vérifier qu’il est toujours accessible puis actualisez-le.',
+ 'feed_empty' => 'Ce flux est vide. Veuillez vérifier qu’il est toujours maintenu.',
'feed_description' => 'Description',
'website_url' => 'URL du site',
'feed_url' => 'URL du flux',
@@ -158,6 +172,8 @@ return array (
'http_username' => 'Identifiant HTTP',
'http_password' => 'Mot de passe HTTP',
'blank_to_disable' => 'Laissez vide pour désactiver',
+ 'share_name' => 'Nom du partage à afficher',
+ 'share_url' => 'URL du partage à utiliser',
'not_yet_implemented' => 'Pas encore implémenté',
'access_protected_feeds' => 'La connexion permet d’accéder aux flux protégés par une authentification HTTP',
'no_selected_feed' => 'Aucun flux sélectionné.',
@@ -165,9 +181,13 @@ return array (
'current_user' => 'Utilisateur actuel',
'password_form' => 'Mot de passe<br /><small>(pour connexion par formulaire)</small>',
+ 'password_api' => 'Mot de passe API<br /><small>(ex. : pour applis mobiles)</small>',
'default_user' => 'Nom de l’utilisateur par défaut <small>(16 caractères alphanumériques maximum)</small>',
'persona_connection_email' => 'Adresse courriel de connexion<br /><small>(pour <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'allow_anonymous' => 'Autoriser la lecture anonyme des articles de l’utilisateur par défaut (%s)',
+ 'allow_anonymous_refresh' => 'Autoriser le rafraîchissement anonyme des flux',
+ 'unsafe_autologin' => 'Autoriser les connexion automatiques non-sûres au format : ',
+ 'api_enabled' => 'Autoriser l’accès par <abbr>API</abbr> <small>(nécessaire pour les applis mobiles)</small>',
'auth_token' => 'Jeton d’identification',
'explain_token' => 'Permet d’accéder à la sortie RSS de l’utilisateur par défaut sans besoin de s’authentifier.<br /><kbd>%s?output=rss&token=%s</kbd>',
'login_configuration' => 'Identification',
@@ -193,6 +213,7 @@ return array (
'purge_completed' => 'Purge effectuée (%d articles supprimés)',
'archiving_configuration_help' => 'D’autres options sont disponibles dans la configuration individuelle des flux',
'reading_configuration' => 'Lecture',
+ 'display_configuration' => 'Affichage',
'articles_per_page' => 'Nombre d’articles par page',
'default_view' => 'Vue par défaut',
'sort_order' => 'Ordre de tri',
@@ -200,10 +221,11 @@ return array (
'display_articles_unfolded' => 'Afficher les articles dépliés par défaut',
'after_onread' => 'Après “marquer tout comme lu”,',
'jump_next' => 'sauter au prochain voisin non lu (flux ou catégorie)',
- 'reading_icons' => 'Icônes de lecture',
+ 'article_icons' => 'Icônes d’article',
'top_line' => 'Ligne du haut',
'bottom_line' => 'Ligne du bas',
'img_with_lazyload' => 'Utiliser le mode “chargement différé” pour les images',
+ 'sticky_post' => 'Aligner l’article en haut quand il est ouvert',
'auto_read_when' => 'Marquer un article comme lu…',
'article_selected' => 'lorsque l’article est sélectionné',
'article_open_on_website' => 'lorsque l’article est ouvert sur le site d’origine',
@@ -218,9 +240,15 @@ return array (
'optimize_bdd' => 'Optimiser la base de données',
'optimize_todo_sometimes' => 'À faire de temps en temps pour réduire la taille de la BDD',
'theme' => 'Thème',
+ 'content_width' => 'Largeur du contenu',
+ 'width_thin' => 'Fine',
+ 'width_medium' => 'Moyenne',
+ 'width_large' => 'Large',
+ 'width_no_limit' => 'Pas de limite',
'more_information' => 'Plus d’informations',
'activate_sharing' => 'Activer le partage',
'shaarli' => 'Shaarli',
+ 'blogotext' => 'Blogotext',
'wallabag' => 'wallabag',
'diaspora' => 'Diaspora*',
'twitter' => 'Twitter',
@@ -241,6 +269,7 @@ return array (
'rss_feeds_of' => 'Flux RSS de %s',
'refresh' => 'Actualisation',
+ 'no_feed_to_refresh' => 'Il n’y a aucun flux à actualiser…',
'today' => 'Aujourd’hui',
'yesterday' => 'Hier',
@@ -267,7 +296,7 @@ return array (
'logs_empty' => 'Les logs sont vides',
'clear_logs' => 'Effacer les logs',
- 'forbidden_access' => 'Accès interdit ! (%s)',
+ 'forbidden_access' => 'L’accès vous est interdit !',
'login_required' => 'Accès protégé par mot de passe :',
'confirm_action' => 'Êtes-vous sûr(e) de vouloir continuer ? Cette action ne peut être annulée !',
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index 27f11ab6d..43adeb3c6 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -1,7 +1,10 @@
<ul class="nav nav-list aside">
<li class="nav-header"><?php echo Minz_Translate::t ('configuration'); ?></li>
<li class="item<?php echo Minz_Request::actionName () == 'display' ? ' active' : ''; ?>">
- <a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a>
+ <a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('display_configuration'); ?></a>
+ </li>
+ <li class="item<?php echo Minz_Request::actionName () == 'reading' ? ' active' : ''; ?>">
+ <a href="<?php echo _url ('configure', 'reading'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a>
</li>
<li class="item<?php echo Minz_Request::actionName () == 'archiving' ? ' active' : ''; ?>">
<a href="<?php echo _url ('configure', 'archiving'); ?>"><?php echo Minz_Translate::t ('archiving_configuration'); ?></a>
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index e324b15bd..5ffb1c791 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -20,9 +20,14 @@
<?php echo $cat->name (); ?>
</option>
<?php } ?>
+ <option value="nc"><?php echo Minz_Translate::t ('new_category'); ?></option>
</select>
</li>
+ <li class="input" style="display:none">
+ <input type="text" name="new_category[name]" id="new_category_name" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('new_category'); ?>" />
+ </li>
+
<li class="separator"></li>
<li class="dropdown-header"><?php echo Minz_Translate::t ('http_authentication'); ?></li>
@@ -38,8 +43,14 @@
</div>
</form></li>
- <li class="item<?php echo Minz_Request::actionName () == 'importExport' ? ' active' : ''; ?>">
- <a href="<?php echo _url ('configure', 'importExport'); ?>"><?php echo Minz_Translate::t ('import_export_opml'); ?></a>
+ <li class="item">
+ <a onclick="return false;" href="javascript:(function(){var%20url%20=%20location.href;window.open('<?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&amp;url_rss='+encodeURIComponent(url), '_blank');})();">
+ <?php echo Minz_Translate::t('bookmark'); ?>
+ </a>
+ </li>
+
+ <li class="item<?php echo Minz_Request::controllerName () == 'importExport' ? ' active' : ''; ?>">
+ <a href="<?php echo _url ('importExport', 'index'); ?>"><?php echo Minz_Translate::t ('import_export'); ?></a>
</li>
<li class="item<?php echo Minz_Request::actionName () == 'categorize' ? ' active' : ''; ?>">
@@ -51,7 +62,7 @@
<?php if (!empty ($this->feeds)) { ?>
<?php foreach ($this->feeds as $feed) { ?>
<?php $nbEntries = $feed->nbEntries (); ?>
- <li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
+ <li class="item<?php echo (isset($this->flux) && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
<a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>">
<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
<?php echo $feed->name (); ?>
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index 8454b4459..817dae676 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -20,7 +20,7 @@
}
?>
<li>
- <div class="category all">
+ <div class="category all<?php echo $this->get_c == 'a' ? ' active' : ''; ?>">
<a data-unread="<?php echo formatNumber($this->nb_not_read); ?>" class="btn<?php echo $this->get_c == 'a' ? ' active' : ''; ?>" href="<?php echo Minz_Url::display($arUrl); ?>">
<?php echo FreshRSS_Themes::icon('all'); ?>
<?php echo Minz_Translate::t ('main_stream'); ?>
@@ -29,7 +29,7 @@
</li>
<li>
- <div class="category favorites">
+ <div class="category favorites<?php echo $this->get_c == 's' ? ' active' : ''; ?>">
<a data-unread="<?php echo formatNumber($this->nb_favorites['unread']); ?>" class="btn<?php echo $this->get_c == 's' ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 's'; echo Minz_Url::display($arUrl); ?>">
<?php echo FreshRSS_Themes::icon('bookmark'); ?>
<?php echo Minz_Translate::t('favorite_feeds', formatNumber($this->nb_favorites['all'])); ?>
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index eef53a3fd..08aa7715d 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -67,7 +67,8 @@ if (Minz_Configuration::canLogIn()) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<li class="dropdown-header"><?php echo Minz_Translate::t ('configuration'); ?></li>
- <li class="item"><a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a></li>
+ <li class="item"><a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('display_configuration'); ?></a></li>
+ <li class="item"><a href="<?php echo _url ('configure', 'reading'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'archiving'); ?>"><?php echo Minz_Translate::t ('archiving_configuration'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'sharing'); ?>"><?php echo Minz_Translate::t ('sharing'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Minz_Translate::t ('shortcuts'); ?></a></li>
@@ -75,8 +76,8 @@ if (Minz_Configuration::canLogIn()) {
<li class="item"><a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a></li>
<li class="separator"></li>
<li class="item"><a href="<?php echo _url ('index', 'stats'); ?>"><?php echo Minz_Translate::t ('stats'); ?></a></li>
- <li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about'); ?></a></li>
<li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Minz_Translate::t ('logs'); ?></a></li>
+ <li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about'); ?></a></li>
<?php
if (Minz_Configuration::canLogIn()) {
?><li class="separator"></li><?php
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index d6a1737ee..d2e1e4b3b 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -3,46 +3,59 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0" />
- <?php echo self::headTitle (); ?>
- <?php echo self::headStyle (); ?>
- <?php echo self::headScript (); ?>
+ <?php echo self::headTitle(); ?>
+ <?php echo self::headStyle(); ?>
+ <?php echo self::headScript(); ?>
<script>//<![CDATA[
-<?php $this->renderHelper ('javascript_vars'); ?>
+<?php $this->renderHelper('javascript_vars'); ?>
//]]></script>
<?php
if (!empty($this->nextId)) {
- $params = Minz_Request::params ();
+ $params = Minz_Request::params();
$params['next'] = $this->nextId;
?>
- <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display (array ('c' => Minz_Request::controllerName (), 'a' => Minz_Request::actionName (), 'params' => $params)); ?>" />
+ <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display(array('c' => Minz_Request::controllerName(), 'a' => Minz_Request::actionName(), 'params' => $params)); ?>" />
<?php } ?>
<link rel="shortcut icon" type="image/x-icon" sizes="16x16 64x64" href="<?php echo Minz_Url::display('/favicon.ico'); ?>" />
<link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?php echo Minz_Url::display('/themes/icons/favicon-256.png'); ?>" />
-<?php if (isset ($this->rss_url)) { ?>
- <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display ($this->rss_url); ?>" />
+<?php
+ if (isset($this->url)) {
+ $rss_url = $this->url;
+ $rss_url['params']['output'] = 'rss';
+?>
+ <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display($rss_url); ?>" />
<?php } ?>
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('starred', true); ?>">
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('non-starred', true); ?>">
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('read', true); ?>">
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('unread', true); ?>">
+ <link rel="apple-touch-icon" href="<?php echo Minz_Url::display('/themes/icons/apple-touch-icon.png'); ?>">
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+ <meta name="apple-mobile-web-app-title" content="<?php echo Minz_Configuration::title(); ?>">
<meta name="msapplication-TileColor" content="#FFF" />
<meta name="robots" content="noindex,nofollow" />
</head>
<body class="<?php echo Minz_Request::param('output', 'normal'); ?>">
-<?php $this->partial ('header'); ?>
+<?php $this->partial('header'); ?>
<div id="global">
- <?php $this->render (); ?>
+ <?php $this->render(); ?>
</div>
<?php
- if (isset ($this->notification)) {
+ $msg = '';
+ $status = 'closed';
+ if (isset($this->notification)) {
+ $msg = $this->notification['content'];
+ $status = $this->notification['type'];
+
invalidateHttpCache();
+ }
?>
-<div class="notification <?php echo $this->notification['type']; ?>">
- <?php echo $this->notification['content']; ?>
+<div id="notification" class="notification <?php echo $status; ?>">
+ <span class="msg"><?php echo $msg; ?></span>
<a class="close" href=""><?php echo FreshRSS_Themes::icon('close'); ?></a>
</div>
-<?php } ?>
</body>
</html>
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index c807e6dd5..b42f816b4 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -7,8 +7,80 @@
<?php } ?>
<?php if ($this->loginOk) { ?>
- <a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a>
-
+ <?php $url_state = $this->url;
+ if ($this->state & FreshRSS_Entry::STATE_READ) {
+ $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_READ;
+ $checked = 'true';
+ $class = 'active';
+ } else {
+ $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_READ;
+ $checked = 'false';
+ $class = '';
+ }
+ ?>
+ <div class="stick">
+ <a id="toggle-read"
+ class="btn <?php echo $class; ?>"
+ aria-checked="<?php echo $checked; ?>"
+ href="<?php echo Minz_Url::display ($url_state); ?>"
+ title="<?php echo Minz_Translate::t ('show_read'); ?>">
+ <?php echo FreshRSS_Themes::icon('read'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Entry::STATE_NOT_READ) {
+ $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_READ;
+ $checked = 'true';
+ $class = 'active';
+ } else {
+ $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_READ;
+ $checked = 'false';
+ $class = '';
+ }
+ ?>
+ <a id="toggle-unread"
+ class="btn <?php echo $class; ?>"
+ aria-checked="<?php echo $checked; ?>"
+ href="<?php echo Minz_Url::display ($url_state); ?>"
+ title="<?php echo Minz_Translate::t ('show_not_reads'); ?>">
+ <?php echo FreshRSS_Themes::icon('unread'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Entry::STATE_FAVORITE) {
+ $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_FAVORITE;
+ $checked = 'true';
+ $class = 'active';
+ } else {
+ $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_FAVORITE;
+ $checked = 'false';
+ $class = '';
+ }
+ ?>
+ <a id="toggle-favorite"
+ class="btn <?php echo $class; ?>"
+ aria-checked="<?php echo $checked; ?>"
+ href="<?php echo Minz_Url::display ($url_state); ?>"
+ title="<?php echo Minz_Translate::t ('show_favorite'); ?>">
+ <?php echo FreshRSS_Themes::icon('starred'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Entry::STATE_NOT_FAVORITE) {
+ $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_FAVORITE;
+ $checked = 'true';
+ $class = 'active';
+ } else {
+ $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_FAVORITE;
+ $checked = 'false';
+ $class = '';
+ }
+ ?>
+ <a id="toggle-not-favorite"
+ class="btn <?php echo $class; ?>"
+ aria-checked="<?php echo $checked; ?>"
+ href="<?php echo Minz_Url::display ($url_state); ?>"
+ title="<?php echo Minz_Translate::t ('show_not_favorite'); ?>">
+ <?php echo FreshRSS_Themes::icon('non-starred'); ?>
+ </a>
+ </div>
<?php
$get = false;
$string_mark = Minz_Translate::t ('mark_all_read');
@@ -59,8 +131,12 @@
break;
}
}
- $p = isset($this->entries[0]) ? $this->entries[0] : null;
- $idMax = $p === null ? '0' : $p->id();
+ if ($this->order === 'ASC') {
+ $idMax = 0;
+ } else {
+ $p = isset($this->entries[0]) ? $this->entries[0] : null;
+ $idMax = $p === null ? '0' : $p->id();
+ }
$arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax));
$output = Minz_Request::param('output', '');
@@ -80,7 +156,7 @@
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
- <li class="item"><a href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li>
+ <li class="item"><a href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li>
<li class="separator"></li>
<?php
$today = $this->today;
@@ -93,113 +169,30 @@
</div>
<?php } ?>
- <?php
- $params = Minz_Request::params ();
- if (isset ($params['search'])) {
- $params['search'] = urlencode ($params['search']);
- }
- $url = array (
- 'c' => 'index',
- 'a' => 'index',
- 'params' => $params
- );
- ?>
- <div class="dropdown" id="nav_menu_views">
- <div id="dropdown-views" class="dropdown-target"></div>
- <a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Minz_Translate::t ('display'); ?> <?php echo FreshRSS_Themes::icon('down'); ?></a>
- <ul class="dropdown-menu">
- <li class="dropdown-close"><a href="#close">❌</a></li>
-
- <?php
- $url_output = $url;
- if ($actual_view !== 'normal') { ?>
- <li class="item">
- <?php $url_output['params']['output'] = 'normal'; ?>
- <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
- <?php echo Minz_Translate::t ('normal_view'); ?>
- </a>
- </li>
- <?php } if($actual_view !== 'reader') { ?>
- <li class="item">
- <?php $url_output['params']['output'] = 'reader'; ?>
- <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
- <?php echo Minz_Translate::t ('reader_view'); ?>
- </a>
- </li>
- <?php } if($actual_view !== 'global') { ?>
- <li class="item">
- <?php $url_output['params']['output'] = 'global'; ?>
- <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
- <?php echo Minz_Translate::t ('global_view'); ?>
- </a>
- </li>
- <?php } ?>
-
- <li class="separator"></li>
-
- <?php
- $url_state = $url;
- $url_state['params']['state'] = 'all';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'all') ? 'true' :'false'; ?>">
- <a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_all_articles'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'not_read';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'not_read') ? 'true' :'false'; ?>">
- <a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_not_reads'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'read';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'read') ? 'true' :'false'; ?>">
- <a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_read'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'favorite';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'favorite') ? 'true' :'false'; ?>">
- <a class="print_favorite" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_favorite'); ?>
- </a>
- </li>
-
- <li class="separator"></li>
-
- <li class="item">
- <?php
- $url_order = $url;
- if ($this->order === 'DESC') {
- $url_order['params']['order'] = 'ASC';
- ?>
- <a href="<?php echo Minz_Url::display ($url_order); ?>">
- <?php echo Minz_Translate::t ('older_first'); ?>
- </a>
- <?php
- } else {
- $url_order['params']['order'] = 'DESC';
- ?>
- <a href="<?php echo Minz_Url::display ($url_order); ?>">
- <?php echo Minz_Translate::t ('newer_first'); ?>
- </a>
- <?php } ?>
- </li>
-
- <li class="separator"></li>
-
- <li class="item">
- <a class="view_rss" target="_blank" href="<?php echo Minz_Url::display ($this->rss_url); ?>">
- <?php echo Minz_Translate::t ('rss_view'); ?>
- </a>
- </li>
- </ul>
+ <?php $url_output = $this->url; ?>
+ <div class="stick" id="nav_menu_views">
+ <?php $url_output['params']['output'] = 'normal'; ?>
+ <a class="view_normal btn <?php echo $actual_view == 'normal'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('normal_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+ <?php echo FreshRSS_Themes::icon("view-normal"); ?>
+ </a>
+
+ <?php $url_output['params']['output'] = 'global'; ?>
+ <a class="view_global btn <?php echo $actual_view == 'global'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+ <?php echo FreshRSS_Themes::icon("view-global"); ?>
+ </a>
+
+ <?php $url_output['params']['output'] = 'reader'; ?>
+ <a class="view_reader btn <?php echo $actual_view == 'reader'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('reader_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+ <?php echo FreshRSS_Themes::icon("view-reader"); ?>
+ </a>
+
+ <?php
+ $url_output['params']['output'] = 'rss';
+ $url_output['params']['token'] = $this->conf->token;
+ ?>
+ <a class="view_rss btn" target="_blank" title="<?php echo Minz_Translate::t ('rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+ <?php echo FreshRSS_Themes::icon('rss'); ?>
+ </a>
</div>
<div class="item search">
@@ -223,4 +216,25 @@
<?php } ?>
</form>
</div>
+
+ <?php
+ if ($this->order === 'DESC') {
+ $order = 'ASC';
+ $icon = 'up';
+ $title = 'older_first';
+ } else {
+ $order = 'DESC';
+ $icon = 'down';
+ $title = 'newer_first';
+ }
+ $url_order = $this->url;
+ $url_order['params']['order'] = $order;
+ ?>
+ <a class="btn" href="<?php echo Minz_Url::display ($url_order); ?>" title="<?php echo Minz_Translate::t ($title); ?>">
+ <?php echo FreshRSS_Themes::icon($icon); ?>
+ </a>
+
+ <?php if ($this->loginOk || Minz_Configuration::allowAnonymousRefresh()) { ?>
+ <a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a>
+ <?php } ?>
</div>
diff --git a/app/sql.php b/app/sql.php
index 1b43da30a..5cd7c52ed 100644
--- a/app/sql.php
+++ b/app/sql.php
@@ -3,7 +3,6 @@ define('SQL_CREATE_TABLES', '
CREATE TABLE IF NOT EXISTS `%1$scategory` (
`id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
`name` varchar(255) NOT NULL,
- `color` char(7),
PRIMARY KEY (`id`),
UNIQUE KEY (`name`) -- v0.7
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index a564e8cdd..9bae99b39 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -14,14 +14,16 @@
<?php echo Minz_Translate::t ('category_number', $i); ?>
</label>
<div class="group-controls">
- <input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
+ <div class="stick">
+ <input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
- <?php if ($cat->nbFeed () > 0) { ?>
- <a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></a>
- <?php } ?>
+ <?php if ($cat->nbFeed () > 0) { ?>
+ <button type="submit" class="btn btn-attention confirm" formaction="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></button>
+ <?php } ?>
+ </div>
(<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
- <?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
+ <?php if ($cat->id () === $this->defaultCategory->id ()) { ?>
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('can_not_be_deleted'); ?>
<?php } ?>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 9104e4ef1..955fc6747 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -4,7 +4,7 @@
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
<form method="post" action="<?php echo _url ('configure', 'display'); ?>">
- <legend><?php echo Minz_Translate::t ('theme'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('display_configuration'); ?></legend>
<div class="form-group">
<label class="group-name" for="language"><?php echo Minz_Translate::t ('language'); ?></label>
@@ -35,122 +35,29 @@
</div>
</div>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
- </div>
- </div>
-
- <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend>
-
- <div class="form-group">
- <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
- <div class="group-controls">
- <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" />
- </div>
- </div>
-
+ <?php $width = $this->conf->content_width; ?>
<div class="form-group">
- <label class="group-name" for="sort_order"><?php echo Minz_Translate::t ('sort_order'); ?></label>
+ <label class="group-name" for="content_width"><?php echo Minz_Translate::t('content_width'); ?></label>
<div class="group-controls">
- <select name="sort_order" id="sort_order">
- <option value="DESC"<?php echo $this->conf->sort_order === 'DESC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('newer_first'); ?></option>
- <option value="ASC"<?php echo $this->conf->sort_order === 'ASC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('older_first'); ?></option>
+ <select name="content_width" id="content_width" required="">
+ <option value="thin" <?php echo $width === 'thin'? 'selected="selected"' : ''; ?>>
+ <?php echo Minz_Translate::t('width_thin'); ?>
+ </option>
+ <option value="medium" <?php echo $width === 'medium'? 'selected="selected"' : ''; ?>>
+ <?php echo Minz_Translate::t('width_medium'); ?>
+ </option>
+ <option value="large" <?php echo $width === 'large'? 'selected="selected"' : ''; ?>>
+ <?php echo Minz_Translate::t('width_large'); ?>
+ </option>
+ <option value="no_limit" <?php echo $width === 'no_limit'? 'selected="selected"' : ''; ?>>
+ <?php echo Minz_Translate::t('width_no_limit'); ?>
+ </option>
</select>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="view_mode"><?php echo Minz_Translate::t ('default_view'); ?></label>
- <div class="group-controls">
- <select name="view_mode" id="view_mode">
- <option value="normal"<?php echo $this->conf->view_mode === 'normal' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('normal_view'); ?></option>
- <option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
- <option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
- </select>
- <label class="radio" for="radio_all">
- <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->default_view === 'all' ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_all_articles'); ?>
- </label>
- <label class="radio" for="radio_not_read">
- <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->default_view === 'not_read' ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_not_reads'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="auto_load_more">
- <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?php echo $this->conf->auto_load_more ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('auto_load_more'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="display_posts">
- <input type="checkbox" name="display_posts" id="display_posts" value="1"<?php echo $this->conf->display_posts ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('display_articles_unfolded'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="lazyload">
- <input type="checkbox" name="lazyload" id="lazyload" value="1"<?php echo $this->conf->lazyload ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('img_with_lazyload'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('auto_read_when'); ?></label>
- <div class="group-controls">
- <label class="checkbox" for="check_open_article">
- <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?php echo $this->conf->mark_when['article'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('article_selected'); ?>
- </label>
- <label class="checkbox" for="check_open_site">
- <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?php echo $this->conf->mark_when['site'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('article_open_on_website'); ?>
- </label>
- <label class="checkbox" for="check_scroll">
- <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?php echo $this->conf->mark_when['scroll'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('scroll'); ?>
- </label>
- <label class="checkbox" for="check_reception">
- <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?php echo $this->conf->mark_when['reception'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('upon_reception'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('after_onread'); ?></label>
- <div class="group-controls">
- <label class="checkbox" for="onread_jump_next">
- <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?php echo $this->conf->onread_jump_next ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('jump_next'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
- </div>
- </div>
-
- <legend><?php echo Minz_Translate::t ('reading_icons'); ?></legend>
- <div class="form-group">
+ <label class="group-name" for="theme"><?php echo Minz_Translate::t ('article_icons'); ?></label>
<table>
<thead>
<tr>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index 138808a9f..27b0990ff 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -7,8 +7,12 @@
<h1><?php echo $this->flux->name (); ?></h1>
<?php echo $this->flux->description (); ?>
+ <?php $nbEntries = $this->flux->nbEntries (); ?>
+
<?php if ($this->flux->inError ()) { ?>
<p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t ('damn'); ?></span> <?php echo Minz_Translate::t ('feed_in_error'); ?></p>
+ <?php } elseif ($nbEntries === 0) { ?>
+ <p class="alert alert-warn"><?php echo Minz_Translate::t ('feed_empty'); ?></p>
<?php } ?>
<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">
@@ -28,16 +32,21 @@
<div class="form-group">
<label class="group-name" for="website"><?php echo Minz_Translate::t ('website_url'); ?></label>
<div class="group-controls">
- <input type="text" name="website" id="website" class="extend" value="<?php echo $this->flux->website (); ?>" />
- <a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ <div class="stick">
+ <input type="text" name="website" id="website" class="extend" value="<?php echo $this->flux->website (); ?>" />
+ <a class="btn" target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ </div>
</div>
</div>
<div class="form-group">
<label class="group-name" for="url"><?php echo Minz_Translate::t ('feed_url'); ?></label>
<div class="group-controls">
- <input type="text" name="url" id="url" class="extend" value="<?php echo $this->flux->url (); ?>" />
- <a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
-   <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->flux->url (); ?>"><?php echo Minz_Translate::t ('feed_validator'); ?></a>
+ <div class="stick">
+ <input type="text" name="url" id="url" class="extend" value="<?php echo $this->flux->url (); ?>" />
+ <a class="btn" target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ </div>
+
+ <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->flux->url (); ?>"><?php echo Minz_Translate::t ('feed_validator'); ?></a>
</div>
</div>
<div class="form-group">
@@ -81,7 +90,7 @@
<div class="form-group">
<label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
<div class="group-controls">
- <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
+ <span class="control"><?php echo $nbEntries; ?></span>
</div>
</div>
<div class="form-group">
diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml
deleted file mode 100644
index e2217d9ed..000000000
--- a/app/views/configure/importExport.phtml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-require_once(LIB_PATH . '/lib_opml.php');
-if ($this->req == 'export') {
- echo '<?xml version="1.0" encoding="UTF-8" ?>';
-?>
-<!-- Generated by <?php echo Minz_Configuration::title (); ?> -->
-<opml version="2.0">
- <head>
- <title><?php echo Minz_Configuration::title (); ?> OPML Feed</title>
- <dateCreated><?php echo date('D, d M Y H:i:s'); ?></dateCreated>
- </head>
- <body>
-<?php echo opml_export ($this->categories); ?>
- </body>
-</opml>
-<?php } else { ?>
-<?php $this->partial ('aside_feed'); ?>
-
-<div class="post ">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
-
- <form method="post" action="<?php echo Minz_Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
- <legend><?php echo Minz_Translate::t ('import_export_opml'); ?></legend>
- <div class="form-group">
- <label class="group-name" for="file"><?php echo Minz_Translate::t ('file_to_import'); ?></label>
- <div class="group-controls">
- <input type="file" name="file" id="file" />
- </div>
- </div>
-
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('import'); ?></button>
- <?php echo Minz_Translate::t ('or'); ?>
- <a target="_blank" class="btn btn-important" href="<?php echo _url ('configure', 'importExport', 'q', 'export'); ?>"><?php echo Minz_Translate::t ('export'); ?></a>
- </div>
- </div>
- </form>
-</div>
-<?php } ?>
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
new file mode 100644
index 000000000..456ab9522
--- /dev/null
+++ b/app/views/configure/reading.phtml
@@ -0,0 +1,125 @@
+<?php $this->partial ('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url ('configure', 'reading'); ?>">
+ <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
+ <div class="group-controls">
+ <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="sort_order"><?php echo Minz_Translate::t ('sort_order'); ?></label>
+ <div class="group-controls">
+ <select name="sort_order" id="sort_order">
+ <option value="DESC"<?php echo $this->conf->sort_order === 'DESC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('newer_first'); ?></option>
+ <option value="ASC"<?php echo $this->conf->sort_order === 'ASC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('older_first'); ?></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="view_mode"><?php echo Minz_Translate::t ('default_view'); ?></label>
+ <div class="group-controls">
+ <select name="view_mode" id="view_mode">
+ <option value="normal"<?php echo $this->conf->view_mode === 'normal' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('normal_view'); ?></option>
+ <option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
+ <option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
+ </select>
+ <label class="radio" for="radio_all">
+ <input type="radio" name="default_view" id="radio_all" value="<?php echo FreshRSS_Entry::STATE_ALL; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_ALL ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_all_articles'); ?>
+ </label>
+ <label class="radio" for="radio_not_read">
+ <input type="radio" name="default_view" id="radio_not_read" value="<?php echo FreshRSS_Entry::STATE_NOT_READ; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_NOT_READ ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_not_reads'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="auto_load_more">
+ <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?php echo $this->conf->auto_load_more ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('auto_load_more'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="display_posts">
+ <input type="checkbox" name="display_posts" id="display_posts" value="1"<?php echo $this->conf->display_posts ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('display_articles_unfolded'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="lazyload">
+ <input type="checkbox" name="lazyload" id="lazyload" value="1"<?php echo $this->conf->lazyload ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('img_with_lazyload'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="sticky_post">
+ <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?php echo $this->conf->sticky_post ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('sticky_post'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t ('auto_read_when'); ?></label>
+ <div class="group-controls">
+ <label class="checkbox" for="check_open_article">
+ <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?php echo $this->conf->mark_when['article'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_selected'); ?>
+ </label>
+ <label class="checkbox" for="check_open_site">
+ <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?php echo $this->conf->mark_when['site'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_open_on_website'); ?>
+ </label>
+ <label class="checkbox" for="check_scroll">
+ <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?php echo $this->conf->mark_when['scroll'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('scroll'); ?>
+ </label>
+ <label class="checkbox" for="check_reception">
+ <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?php echo $this->conf->mark_when['reception'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('upon_reception'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t ('after_onread'); ?></label>
+ <div class="group-controls">
+ <label class="checkbox" for="onread_jump_next">
+ <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?php echo $this->conf->onread_jump_next ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('jump_next'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
+ </div>
+ </div>
+
+ </form>
+</div>
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml
index e3ea11665..a952bc3b4 100644
--- a/app/views/configure/sharing.phtml
+++ b/app/views/configure/sharing.phtml
@@ -3,54 +3,49 @@
<div class="post">
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
- <form method="post" action="<?php echo _url ('configure', 'sharing'); ?>">
+ <form method="post" action="<?php echo _url ('configure', 'sharing'); ?>"
+ data-simple='<div class="form-group"><label class="group-name">##label##</label><div class="group-controls"><a href="#" class="share remove btn btn-attention"><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>'
+ data-advanced='<div class="form-group"><label class="group-name">##label##</label><div class="group-controls">
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
+ <div class="stick">
+ <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo Minz_Translate::t ('share_name'); ?>" size="64" />
+ <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo Minz_Translate::t ('share_url'); ?>" size="64" />
+ <a href="#" class="share remove btn btn-attention"><?php echo FreshRSS_Themes::icon('close'); ?></a></div>
+ <a target="_blank" class="btn" title="<?php echo Minz_Translate::t('more_information'); ?>" href="##help##"><?php echo FreshRSS_Themes::icon('help'); ?></a>
+ </div></div>'>
<legend><?php echo Minz_Translate::t ('sharing'); ?></legend>
- <div class="form-group">
- <label class="group-name" for="shaarli">
- <?php echo Minz_Translate::t ('your_shaarli'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="shaarli" name="shaarli" class="extend" value="<?php echo $this->conf->sharing ('shaarli'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli"><?php echo Minz_Translate::t ('more_information'); ?></a>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="wallabag">
- <?php echo Minz_Translate::t ('your_wallabag'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="wallabag" name="wallabag" class="extend" value="<?php echo $this->conf->sharing ('wallabag'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://www.wallabag.org"><?php echo Minz_Translate::t ('more_information'); ?></a>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="diaspora">
- <?php echo Minz_Translate::t ('your_diaspora_pod'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="diaspora" name="diaspora" class="extend" value="<?php echo $this->conf->sharing ('diaspora'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="https://diasporafoundation.org/"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ <?php foreach ($this->conf->sharing as $key => $sharing): ?>
+ <?php $share = $this->conf->shares[$sharing['type']]; ?>
+ <div class="form-group">
+ <label class="group-name">
+ <?php echo Minz_Translate::t ($sharing['type']); ?>
+ </label>
+ <div class="group-controls">
+ <input type='hidden' id='share_<?php echo $key;?>_type' name="share[<?php echo $key;?>][type]" value='<?php echo $sharing['type']?>' />
+ <?php if ($share['form'] === 'advanced'){ ?>
+ <div class="stick">
+ <input type="text" id="share_<?php echo $key;?>_name" name="share[<?php echo $key;?>][name]" class="extend" value="<?php echo $sharing['name']?>" placeholder="<?php echo Minz_Translate::t ('share_name'); ?>" size="64" />
+ <input type="url" id="share_<?php echo $key;?>_url" name="share[<?php echo $key;?>][url]" class="extend" value="<?php echo $sharing['url']?>" placeholder="<?php echo Minz_Translate::t ('share_url'); ?>" size="64" />
+ <a href='#' class='share remove btn btn-attention'><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ </div>
+
+ <a target="_blank" class="btn" title="<?php echo Minz_Translate::t('more_information'); ?>" href="<?php echo $share['help']?>"><?php echo FreshRSS_Themes::icon('help'); ?></a>
+ <?php } else { ?>
+ <a href='#' class='share remove btn btn-attention'><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ <?php } ?>
+ </div>
</div>
- </div>
+ <?php endforeach;?>
<div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('activate_sharing'); ?></label>
<div class="group-controls">
- <?php
- $services = array ('twitter', 'g+', 'facebook', 'email', 'print');
-
- foreach ($services as $service) {
- ?>
- <label class="checkbox" for="<?php echo $service; ?>">
- <input type="checkbox" name="<?php echo $service; ?>" id="<?php echo $service; ?>" value="1"<?php echo $this->conf->sharing($service) ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ($service); ?>
- </label>
- <?php } ?>
+ <select>
+ <?php foreach($this->conf->shares as $key => $params):?>
+ <option value='<?php echo $key?>' data-form='<?php echo $params['form']?>' data-help='<?php if (!empty($params['help'])) {echo $params['help'];}?>'><?php echo Minz_Translate::t($key) ?></option>
+ <?php endforeach; ?>
+ </select>
+ <a href='#' class='share add btn'><?php echo FreshRSS_Themes::icon('add'); ?></a>
</div>
</div>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index b0867f711..bfb13f003 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -12,10 +12,44 @@
<?php $s = $this->conf->shortcuts; ?>
<form method="post" action="<?php echo _url ('configure', 'shortcut'); ?>">
- <legend><?php echo Minz_Translate::t ('shortcuts_management'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('shortcuts'); ?></legend>
<noscript><p class="alert alert-error"><?php echo Minz_Translate::t ('javascript_for_shortcuts'); ?></p></noscript>
+ <legend><?php echo Minz_Translate::t ('shortcuts_navigation'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="next_entry"><?php echo Minz_Translate::t ('next_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="prev_entry"><?php echo Minz_Translate::t ('previous_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="first_entry"><?php echo Minz_Translate::t ('first_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?php echo $s['first_entry']; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="last_entry"><?php echo Minz_Translate::t ('last_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?php echo $s['last_entry']; ?>" />
+ </div>
+ </div>
+
+ <div><?php echo Minz_Translate::t ('shortcuts_navigation_help');?></div>
+
+ <legend><?php echo Minz_Translate::t ('shortcuts_article_action');?></legend>
+
<div class="form-group">
<label class="group-name" for="mark_read"><?php echo Minz_Translate::t ('mark_read'); ?></label>
<div class="group-controls">
@@ -39,18 +73,10 @@
</div>
<div class="form-group">
- <label class="group-name" for="next_entry"><?php echo Minz_Translate::t ('next_article'); ?></label>
- <div class="group-controls">
- <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
- <?php echo Minz_Translate::t ('shift_for_last'); ?>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="prev_entry"><?php echo Minz_Translate::t ('previous_article'); ?></label>
+ <label class="group-name" for="auto_share_shortcut"><?php echo Minz_Translate::t ('auto_share'); ?></label>
<div class="group-controls">
- <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
- <?php echo Minz_Translate::t ('shift_for_first'); ?>
+ <input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?php echo $s['auto_share']; ?>" />
+ <?php echo Minz_Translate::t ('auto_share_help'); ?>
</div>
</div>
@@ -61,6 +87,8 @@
</div>
</div>
+ <legend><?php echo Minz_Translate::t ('shortcuts_other_action');?></legend>
+
<div class="form-group">
<label class="group-name" for="load_more_shortcut"><?php echo Minz_Translate::t ('load_more'); ?></label>
<div class="group-controls">
@@ -69,9 +97,9 @@
</div>
<div class="form-group">
- <label class="group-name" for="auto_share_shortcut"><?php echo Minz_Translate::t ('auto_share'); ?></label>
+ <label class="group-name" for="focus_search_shortcut"><?php echo Minz_Translate::t ('focus_search'); ?></label>
<div class="group-controls">
- <input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?php echo $s['auto_share']; ?>" />
+ <input type="text" id="focus_search_shortcut" name="shortcuts[focus_search]" list="keys" value="<?php echo $s['focus_search']; ?>" />
</div>
</div>
diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml
index 8ab4c04ba..272896fb2 100644
--- a/app/views/configure/users.phtml
+++ b/app/views/configure/users.phtml
@@ -20,16 +20,31 @@
<div class="form-group">
<label class="group-name" for="passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
<div class="group-controls">
- <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}" />
+ <div class="stick">
+ <input type="password" id="passwordPlain" name="passwordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password"><?php echo FreshRSS_Themes::icon('key'); ?></a>
+ </div>
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
+ <?php if (Minz_Configuration::apiEnabled()) { ?>
+ <div class="form-group">
+ <label class="group-name" for="apiPasswordPlain"><?php echo Minz_Translate::t('password_api'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password"><?php echo FreshRSS_Themes::icon('key'); ?></a>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+
<div class="form-group">
<label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">
- <input type="email" id="mail_login" name="mail_login" class="extend" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
+ <input type="email" id="mail_login" name="mail_login" class="extend" autocomplete="off" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
@@ -52,7 +67,7 @@
<?php if (!in_array(Minz_Configuration::authType(), array('form', 'persona', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
- <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
+ <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
<option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_persona'); ?></option>
<option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t('auth_none'); ?></option>
@@ -70,18 +85,49 @@
</div>
</div>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="anon_refresh">
+ <input type="checkbox" name="anon_refresh" id="anon_refresh" value="1"<?php echo Minz_Configuration::allowAnonymousRefresh() ? ' checked="checked"' : '',
+ Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('allow_anonymous_refresh'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="unsafe_autologin">
+ <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?php echo Minz_Configuration::unsafeAutologinEnabled() ? ' checked="checked"' : '',
+ Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('unsafe_autologin'); ?>
+ <kbd>p/i/?a=formLogin&amp;u=Alice&amp;p=1234</kbd>
+ </label>
+ </div>
+ </div>
+
<?php if (Minz_Configuration::canLogIn()) { ?>
<div class="form-group">
<label class="group-name" for="token"><?php echo Minz_Translate::t('auth_token'); ?></label>
<?php $token = $this->conf->token; ?>
<div class="group-controls">
- <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
+ <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
echo Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?>
</div>
</div>
<?php } ?>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="api_enabled">
+ <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?php echo Minz_Configuration::apiEnabled() ? ' checked="checked"' : '',
+ Minz_Configuration::needsLogin() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('api_enabled'); ?>
+ </label>
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
@@ -129,14 +175,17 @@
<div class="form-group">
<label class="group-name" for="new_user_name"><?php echo Minz_Translate::t('username'); ?></label>
<div class="group-controls">
- <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" placeholder="demo" />
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" autocomplete="off" pattern="[0-9a-zA-Z]{1,16}" placeholder="demo" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="new_user_passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
<div class="group-controls">
- <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" pattern=".{7,}" />
+ <div class="stick">
+ <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" autocomplete="off" pattern=".{7,}" />
+ <a class="btn toggle-password"><?php echo FreshRSS_Themes::icon('key'); ?></a>
+ </div>
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
@@ -145,7 +194,7 @@
<label class="group-name" for="new_user_email"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">
- <input type="email" id="new_user_email" name="new_user_email" class="extend" placeholder="alice@example.net" />
+ <input type="email" id="new_user_email" name="new_user_email" class="extend" autocomplete="off" placeholder="alice@example.net" />
</div>
</div>
diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml
index 36fcb56f9..6a09c3aa2 100644
--- a/app/views/error/index.phtml
+++ b/app/views/error/index.phtml
@@ -3,7 +3,15 @@
<h1 class="alert-head"><?php echo $this->code; ?></h1>
<p>
- <?php echo Minz_Translate::t ('page_not_found'); ?><br />
+ <?php
+ switch(Minz_Request::param ('code')) {
+ case 403:
+ echo Minz_Translate::t ('forbidden_access');
+ break;
+ case 404:
+ default:
+ echo Minz_Translate::t ('page_not_found');
+ } ?><br />
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
</p>
</div>
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml
new file mode 100644
index 000000000..849dacac6
--- /dev/null
+++ b/app/views/feed/add.phtml
@@ -0,0 +1,91 @@
+<?php if ($this->feed) { ?>
+<div class="post">
+ <h1><?php echo Minz_Translate::t ('add_rss_feed'); ?></h1>
+
+ <?php if (!$this->load_ok) { ?>
+ <p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t('damn'); ?></span> <?php echo Minz_Translate::t('internal_problem_feed', _url('index', 'logs')); ?></p>
+ <?php } ?>
+
+ <form method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off">
+ <legend><?php echo Minz_Translate::t('informations'); ?></legend>
+ <?php if ($this->load_ok) { ?>
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('title'); ?></label>
+ <div class="group-controls">
+ <label><?php echo $this->feed->name() ; ?></label>
+ </div>
+ </div>
+
+ <?php $desc = $this->feed->description(); if ($desc != '') { ?>
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('feed_description'); ?></label>
+ <div class="group-controls">
+ <label><?php echo htmlspecialchars($desc, ENT_NOQUOTES, 'UTF-8'); ?></label>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('website_url'); ?></label>
+ <div class="group-controls">
+ <?php echo $this->feed->website(); ?>
+ <a class="btn" target="_blank" href="<?php echo $this->feed->website(); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group">
+ <label class="group-name" for="url"><?php echo Minz_Translate::t('feed_url'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="text" name="url_rss" id="url" class="extend" value="<?php echo $this->feed->url(); ?>" />
+ <a class="btn" target="_blank" href="<?php echo $this->feed->url(); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ </div>
+ <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->feed->url(); ?>"><?php echo Minz_Translate::t('feed_validator'); ?></a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="group-name" for="category"><?php echo Minz_Translate::t('category'); ?></label>
+ <div class="group-controls">
+ <select name="category" id="category">
+ <?php foreach ($this->categories as $cat) { ?>
+ <option value="<?php echo $cat->id(); ?>"<?php echo $cat->id() == 1 ? ' selected="selected"' : ''; ?>>
+ <?php echo $cat->name(); ?>
+ </option>
+ <?php } ?>
+ <option value="nc"><?php echo Minz_Translate::t('new_category'); ?></option>
+ </select>
+
+ <span style="display: none;">
+ <input type="text" name="new_category[name]" id="new_category_name" autocomplete="off" placeholder="<?php echo Minz_Translate::t('new_category'); ?>" />
+ </span>
+ </div>
+ </div>
+
+ <legend><?php echo Minz_Translate::t('http_authentication'); ?></legend>
+ <?php $auth = $this->feed->httpAuth(false); ?>
+ <div class="form-group">
+ <label class="group-name" for="http_user"><?php echo Minz_Translate::t('http_username'); ?></label>
+ <div class="group-controls">
+ <input type="text" name="http_user" id="http_user" class="extend" value="<?php echo $auth['username']; ?>" autocomplete="off" />
+ </div>
+
+ <label class="group-name" for="http_pass"><?php echo Minz_Translate::t('http_password'); ?></label>
+ <div class="group-controls">
+ <input type="password" name="http_pass" id="http_pass" class="extend" value="<?php echo $auth['password']; ?>" autocomplete="off" />
+ </div>
+
+ <div class="group-controls">
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('access_protected_feeds'); ?>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+</div>
+<?php } ?>
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
new file mode 100644
index 000000000..ffdca1daa
--- /dev/null
+++ b/app/views/helpers/export/articles.phtml
@@ -0,0 +1,47 @@
+<?php
+ $username = Minz_Session::param('currentUser', '_');
+
+ $articles = array(
+ 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type,
+ 'title' => $this->list_title,
+ 'author' => $username,
+ 'items' => array()
+ );
+
+ foreach ($this->entries as $entry) {
+ if (!isset($this->feed)) {
+ $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $entry->feed ());
+ } else {
+ $feed = $this->feed;
+ }
+
+ $articles['items'][] = array(
+ 'id' => $entry->guid(),
+ 'categories' => array_values($entry->tags()),
+ 'title' => $entry->title(),
+ 'author' => $entry->author(),
+ 'published' => $entry->date(true),
+ 'updated' => $entry->date(true),
+ 'alternate' => array(array(
+ 'href' => $entry->link(),
+ 'type' => 'text/html'
+ )),
+ 'content' => array(
+ 'content' => $entry->content()
+ ),
+ 'origin' => array(
+ 'streamId' => $feed->id(),
+ 'title' => $feed->name(),
+ 'htmlUrl' => $feed->website(),
+ 'feedUrl' => $feed->url()
+ )
+ );
+ }
+
+ $options = 0;
+ if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
+ $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
+ }
+
+ echo json_encode($articles, $options);
+?>
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
new file mode 100644
index 000000000..f667d093c
--- /dev/null
+++ b/app/views/helpers/export/opml.phtml
@@ -0,0 +1,28 @@
+<?php
+
+$opml_array = array(
+ 'head' => array(
+ 'title' => Minz_Configuration::title(),
+ 'dateCreated' => date('D, d M Y H:i:s')
+ ),
+ 'body' => array()
+);
+
+foreach ($this->categories as $key => $cat) {
+ $opml_array['body'][$key] = array(
+ 'text' => $cat['name'],
+ '@outlines' => array()
+ );
+
+ foreach ($cat['feeds'] as $feed) {
+ $opml_array['body'][$key]['@outlines'][] = array(
+ 'text' => htmlspecialchars_decode($feed->name()),
+ 'type' => 'rss',
+ 'xmlUrl' => $feed->url(),
+ 'htmlUrl' => $feed->website(),
+ 'description' => $feed->description()
+ );
+ }
+}
+
+echo libopml_render($opml_array);
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 0ecdc1bca..6e0a20de3 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -5,12 +5,14 @@ echo '"use strict";', "\n";
$mark = $this->conf->mark_when;
echo 'var ',
'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
+ ',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"',
',auto_mark_article=', $mark['article'] ? 'true' : 'false',
',auto_mark_site=', $mark['site'] ? 'true' : 'false',
',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false',
',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false',
',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false',
- ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false';
+ ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false',
+ ',sticky_post=', $this->conf->sticky_post ? 'true' : 'false';
$s = $this->conf->shortcuts;
echo ',shortcuts={',
@@ -19,9 +21,12 @@ echo ',shortcuts={',
'go_website:"', $s['go_website'], '",',
'prev_entry:"', $s['prev_entry'], '",',
'next_entry:"', $s['next_entry'], '",',
+ 'first_entry:"', $s['first_entry'], '",',
+ 'last_entry:"', $s['last_entry'], '",',
'collapse_entry:"', $s['collapse_entry'], '",',
'load_more:"', $s['load_more'], '",',
- 'auto_share:"', $s['auto_share'], '"',
+ 'auto_share:"', $s['auto_share'], '",',
+ 'focus_search:"', $s['focus_search'], '"',
"},\n";
if (Minz_Request::param ('output') === 'global') {
@@ -30,7 +35,13 @@ if (Minz_Request::param ('output') === 'global') {
$authType = Minz_Configuration::authType();
if ($authType === 'persona') {
- echo 'current_user_mail="' . Minz_Session::param ('mail', '') . '",';
+ // If user is disconnected, current_user_mail MUST be null
+ $mail = Minz_Session::param ('mail', false);
+ if ($mail) {
+ echo 'current_user_mail="' . $mail . '",';
+ } else {
+ echo 'current_user_mail=null,';
+ }
}
echo 'authType="', $authType, '",',
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index 7b7faccee..6f172d579 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -8,19 +8,10 @@ if (!empty($this->entries)) {
$display_yesterday = true;
$display_others = true;
if ($this->loginOk) {
- $shaarli = $this->conf->sharing ('shaarli');
- $wallabag = $this->conf->sharing ('wallabag');
- $diaspora = $this->conf->sharing ('diaspora');
+ $sharing = $this->conf->sharing;
} else {
- $shaarli = '';
- $wallabag = '';
- $diaspora = '';
+ $sharing = array();
}
- $twitter = $this->conf->sharing ('twitter');
- $google_plus = $this->conf->sharing ('g+');
- $facebook = $this->conf->sharing ('facebook');
- $email = $this->conf->sharing ('email');
- $print = $this->conf->sharing ('print');
$hidePosts = !$this->conf->display_posts;
$lazyload = $this->conf->lazyload;
$topline_read = $this->conf->topline_read;
@@ -29,17 +20,17 @@ if (!empty($this->entries)) {
$topline_link = $this->conf->topline_link;
$bottomline_read = $this->conf->bottomline_read;
$bottomline_favorite = $this->conf->bottomline_favorite;
- $bottomline_sharing = $this->conf->bottomline_sharing && (
- $shaarli || $wallabag || $diaspora || $twitter ||
- $google_plus || $facebook || $email || $print);
+ $bottomline_sharing = $this->conf->bottomline_sharing && (count($sharing));
$bottomline_tags = $this->conf->bottomline_tags;
$bottomline_date = $this->conf->bottomline_date;
$bottomline_link = $this->conf->bottomline_link;
+
+ $content_width = $this->conf->content_width;
?>
<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
?><div id="new-article">
- <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
+ <a href="<?php echo Minz_Url::display ($this->url); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
</div><?php
foreach ($this->entries as $item) {
if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) {
@@ -98,8 +89,8 @@ if (!empty($this->entries)) {
</ul>
<div class="flux_content">
- <div class="content">
- <h1 class="title"><?php echo $item->title (); ?></h1>
+ <div class="content <?php echo $content_width; ?>">
+ <h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></h1>
<?php
$author = $item->author ();
echo $author != '' ? '<div class="author">' . Minz_Translate::t ('by_author', $author) . '</div>' : '';
@@ -146,55 +137,13 @@ if (!empty($this->entries)) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
- <?php if ($shaarli) { ?>
- <li class="item">
- <a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
- <?php echo Minz_Translate::t ('shaarli'); ?>
- </a>
- </li>
- <?php } if ($wallabag) { ?>
- <li class="item">
- <a target="_blank" href="<?php echo $wallabag . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
- <?php echo Minz_Translate::t ('wallabag'); ?>
- </a>
- </li>
- <?php } if ($diaspora) { ?>
- <li class="item">
- <a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
- <?php echo Minz_Translate::t ('diaspora'); ?>
- </a>
- </li>
- <?php } if ($twitter) { ?>
- <li class="item">
- <a target="_blank" href="https://twitter.com/share?url=<?php echo $link; ?>&amp;text=<?php echo $title; ?>">
- <?php echo Minz_Translate::t ('twitter'); ?>
- </a>
- </li>
- <?php } if ($google_plus) { ?>
- <li class="item">
- <a target="_blank" href="https://plus.google.com/share?url=<?php echo $link; ?>">
- <?php echo Minz_Translate::t ('g+'); ?>
- </a>
- </li>
- <?php } if ($facebook) { ?>
- <li class="item">
- <a target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $link; ?>&amp;t=<?php echo $title; ?>">
- <?php echo Minz_Translate::t ('facebook'); ?>
- </a>
- </li>
- <?php } if ($email) { ?>
- <li class="item">
- <a href="mailto:?subject=<?php echo urldecode($title); ?>&amp;body=<?php echo $link; ?>">
- <?php echo Minz_Translate::t ('by_email'); ?>
- </a>
- </li>
- <?php } if ($print) { ?>
- <li class="item">
- <a href="#" class="print-article">
- <?php echo Minz_Translate::t ('print'); ?>
- </a>
- </li>
- <?php } ?>
+ <?php foreach ($sharing as $share) :?>
+ <li class="item share">
+ <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl($this->conf->shares, $share, $item->link(), $item->title() . ' . ' . $feed->name())?>">
+ <?php echo Minz_Translate::t ($share['name']);?>
+ </a>
+ </li>
+ <?php endforeach;?>
</ul>
</div>
<?php } ?>
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml
index bda96e86d..e37c78cb4 100644
--- a/app/views/helpers/view/reader_view.phtml
+++ b/app/views/helpers/view/reader_view.phtml
@@ -3,6 +3,7 @@ $this->partial ('nav_menu');
if (!empty($this->entries)) {
$lazyload = $this->conf->lazyload;
+ $content_width = $this->conf->content_width;
?>
<div id="stream" class="reader">
@@ -10,7 +11,7 @@ if (!empty($this->entries)) {
<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
<div class="flux_content">
- <div class="content">
+ <div class="content <?php echo $content_width; ?>">
<?php
$feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
if (empty($feed)) $feed = $item->feed (true);
diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml
index 620bf1388..2c6ca610b 100755
--- a/app/views/helpers/view/rss_view.phtml
+++ b/app/views/helpers/view/rss_view.phtml
@@ -6,7 +6,7 @@
<description><?php echo Minz_Translate::t ('rss_feeds_of', $this->rss_title); ?></description>
<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
- <atom:link href="<?php echo Minz_Url::display ($this->rss_url, 'html', true); ?>" rel="self" type="application/rss+xml" />
+ <atom:link href="<?php echo Minz_Url::display ($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" />
<?php
foreach ($this->entries as $item) {
?>
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
new file mode 100644
index 000000000..309058959
--- /dev/null
+++ b/app/views/importExport/index.phtml
@@ -0,0 +1,52 @@
+<?php $this->partial ('aside_feed'); ?>
+
+<div class="post ">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('importExport', 'import'); ?>" enctype="multipart/form-data">
+ <legend><?php echo Minz_Translate::t ('import'); ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="file"><?php echo Minz_Translate::t ('file_to_import'); ?></label>
+ <div class="group-controls">
+ <input type="file" name="file" id="file" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('import'); ?></button>
+ </div>
+ </div>
+ </form>
+
+ <?php if (count($this->feeds) > 0) { ?>
+ <form method="post" action="<?php echo _url('importExport', 'export'); ?>">
+ <legend><?php echo Minz_Translate::t ('export'); ?></legend>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="export_opml">
+ <input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
+ <?php echo Minz_Translate::t ('export_opml'); ?>
+ </label>
+
+ <label class="checkbox" for="export_starred">
+ <input type="checkbox" name="export_starred" id="export_starred" value="1" checked="checked" />
+ <?php echo Minz_Translate::t ('export_starred'); ?>
+ </label>
+
+ <select name="export_feeds[]" size="<?php echo min(10, count($this->feeds)); ?>" multiple="multiple">
+ <?php foreach ($this->feeds as $feed) { ?>
+ <option value="<?php echo $feed->id(); ?>"><?php echo $feed->name(); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('export'); ?></button>
+ </div>
+ </div>
+ </form>
+ <?php } ?>
+</div>
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
index e4560c1a0..cc925ea59 100644
--- a/app/views/index/formLogin.phtml
+++ b/app/views/index/formLogin.phtml
@@ -1,34 +1,32 @@
<div class="prompt">
-<?php
-if (Minz_Configuration::canLogIn()) {
- ?><h1><?php echo Minz_Translate::t('login'); ?></h1><?php
- switch (Minz_Configuration::authType()) {
+ <h1><?php echo Minz_Translate::t('login'); ?></h1><?php
- case 'form':
- ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
- <p>
- <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
- <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
- </p><p>
- <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
- <input type="password" id="passwordPlain" required="required" />
- <input type="hidden" id="challenge" name="challenge" /><br />
- <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
- </p><p>
- <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
- </p>
- </form><?php
- break;
+ switch (Minz_Configuration::authType()) {
+ case 'form':
+ ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
+ <div>
+ <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
+ <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
+ </div>
+ <div>
+ <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
+ <input type="password" id="passwordPlain" required="required" />
+ <input type="hidden" id="challenge" name="challenge" /><br />
+ <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
+ </div>
+ <div>
+ <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
+ </div>
+ </form><?php
+ break;
- case 'persona':
- ?><p><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t('login'); ?></a></p><?php
- break;
- }
-} else {
- ?><h1>FreshRSS</h1>
- <p><?php echo Minz_Translate::t('forbidden_access', Minz_Configuration::authType()); ?></p><?php
-}
-?>
+ case 'persona':
+ ?><p>
+ <?php echo FreshRSS_Themes::icon('login'); ?>
+ <a class="signin" href="#"><?php echo Minz_Translate::t('login_with_persona'); ?></a>
+ </p><?php
+ break;
+ } ?>
-<p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
+ <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 4545a33e4..1ff36ca8e 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -5,26 +5,21 @@ $output = Minz_Request::param ('output', 'normal');
if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
if ($output === 'normal') {
$this->renderHelper ('view/normal_view');
- } elseif ($output === 'rss') {
- $this->renderHelper ('view/rss_view');
} elseif ($output === 'reader') {
$this->renderHelper ('view/reader_view');
} elseif ($output === 'global') {
$this->renderHelper ('view/global_view');
+ } elseif ($output === 'rss') {
+ $this->renderHelper ('view/rss_view');
} else {
Minz_Request::_param ('output', 'normal');
$output = 'normal';
$this->renderHelper ('view/normal_view');
}
} elseif ($output === 'rss') {
- $token = $this->conf->token;
- $token_param = Minz_Request::param ('token', '');
- $token_is_ok = ($token != '' && $token == $token_param);
- if ($token_is_ok) {
- $this->renderHelper ('view/rss_view');
- } else {
- Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
- }
+ // token has already been checked in the controller so we can show the view
+ $this->renderHelper ('view/rss_view');
} else {
- Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
+ // Normally, it should not happen, but log it anyway
+ Minz_Log::record ('Something is wrong in ' . __FILE__ . ' line ' . __LINE__, Minz_Log::ERROR);
}
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml
index 1f6072c29..6a92e5642 100644
--- a/app/views/javascript/actualize.phtml
+++ b/app/views/javascript/actualize.phtml
@@ -1,14 +1,17 @@
"use strict";
-var feeds = [];
-<?php foreach ($this->feeds as $feed) { ?>
-feeds.push("<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>");
-<?php } ?>
+var feeds = [<?php
+ foreach ($this->feeds as $feed) {
+ echo "'", Minz_Url::display(array('c' => 'feed', 'a' => 'actualize', 'params' => array('id' => $feed->id(), 'ajax' => '1')), 'php'), "',\n";
+ }
+ ?>],
+ feed_processed = 0,
+ feed_count = feeds.length;
function initProgressBar(init) {
if (init) {
- $("body").after("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\
- <?php echo Minz_Translate::t ('refresh'); ?> <span class=\"progress\">0 / " + feeds.length + "</span><br />\
- <progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feeds.length + "\"></progress>\
+ $("body").after("\<div id=\"actualizeProgress\" class=\"notification good\">\
+ <?php echo Minz_Translate::t ('refresh'); ?> <span class=\"progress\">0 / " + feed_count + "</span><br />\
+ <progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feed_count + "\"></progress>\
</div>");
} else {
window.location.reload();
@@ -16,27 +19,37 @@ function initProgressBar(init) {
}
function updateProgressBar(i) {
$("#actualizeProgressBar").val(i);
- $("#actualizeProgress .progress").html(i + " / " + feeds.length);
+ $("#actualizeProgress .progress").html(i + " / " + feed_count);
}
function updateFeeds() {
- if (feeds.length === 0) {
+ if (feed_count === 0) {
+ openNotification("<?php echo Minz_Translate::t ('no_feed_to_refresh'); ?>", "good");
return;
}
initProgressBar(true);
- var i = 0;
- for (var f in feeds) {
- $.ajax({
- type: 'POST',
- url: feeds[f],
- }).done(function (data) {
- i++;
- updateProgressBar(i);
+ for (var i = 0; i < 10; i++) {
+ updateFeed();
+ }
+}
- if (i === feeds.length) {
- initProgressBar(false);
- }
- });
+function updateFeed() {
+ var feed = feeds.pop();
+ if (feed == undefined) {
+ return;
}
+ $.ajax({
+ type: 'POST',
+ url: feed,
+ }).complete(function (data) {
+ feed_processed++;
+ updateProgressBar(feed_processed);
+
+ if (feed_processed === feed_count) {
+ initProgressBar(false);
+ } else {
+ updateFeed();
+ }
+ });
}
diff --git a/constants.php b/constants.php
index 2eba868b2..e32b8cbc3 100644
--- a/constants.php
+++ b/constants.php
@@ -1,7 +1,10 @@
<?php
-define('FRESHRSS_VERSION', '0.7');
+define('FRESHRSS_VERSION', '0.8-dev');
define('FRESHRSS_WEBSITE', 'http://freshrss.org');
+// PHP text output compression http://php.net/ob_gzhandler (better to do it at Web server level)
+define('PHP_COMPRESSION', false);
+
// Constantes de chemins
define('FRESHRSS_PATH', dirname(__FILE__));
@@ -15,3 +18,5 @@ define('FRESHRSS_PATH', dirname(__FILE__));
define('LIB_PATH', FRESHRSS_PATH . '/lib');
define('APP_PATH', FRESHRSS_PATH . '/app');
+
+define('TMP_PATH', sys_get_temp_dir());
diff --git a/data/shares.php b/data/shares.php
new file mode 100644
index 000000000..44176f1bf
--- /dev/null
+++ b/data/shares.php
@@ -0,0 +1,75 @@
+<?php
+
+/*
+ * This is a configuration file. You shouldn't modify it unless you know what
+ * you are doing. If you want to add a share type, this is where you need to do
+ * it.
+ *
+ * For each share there is different configuration options. Here is the description
+ * of those options:
+ * - url is a mandatory option. It is a string representing the share URL. It
+ * supports 3 different placeholders for custom data. The ~URL~ placeholder
+ * represents the URL of the system used to share, it is configured by the
+ * user. The ~LINK~ placeholder represents the link of the shared article.
+ * The ~TITLE~ placeholder represents the title of the shared article.
+ * - transform is an array of transformation to apply on links and titles
+ * - help is a URL to a help page
+ */
+
+return array(
+ 'shaarli' => array(
+ 'url' => '~URL~?post=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
+ 'transform' => array('urlencode'),
+ 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
+ 'form' => 'advanced',
+ ),
+ 'blogotext' => array(
+ 'url' => '~URL~/admin/links.php?url=~LINK~',
+ 'transform' => array(),
+ 'help' => 'http://lehollandaisvolant.net/blogotext/fr/',
+ 'form' => 'advanced',
+ ),
+ 'wallabag' => array(
+ 'url' => '~URL~?action=add&amp;url=~LINK~',
+ 'transform' => array(
+ 'link' => array('base64_encode'),
+ 'title' => array(),
+ ),
+ 'help' => 'http://www.wallabag.org/',
+ 'form' => 'advanced',
+ ),
+ 'diaspora' => array(
+ 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
+ 'transform' => array('urlencode'),
+ 'help' => 'https://diasporafoundation.org/',
+ 'form' => 'advanced',
+ ),
+ 'twitter' => array(
+ 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
+ 'transform' => array('urlencode'),
+ 'form' => 'simple',
+ ),
+ 'g+' => array(
+ 'url' => 'https://plus.google.com/share?url=~LINK~',
+ 'transform' => array('urlencode'),
+ 'form' => 'simple',
+ ),
+ 'facebook' => array(
+ 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
+ 'transform' => array('urlencode'),
+ 'form' => 'simple',
+ ),
+ 'email' => array(
+ 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
+ 'transform' => array(
+ 'link' => array('urlencode'),
+ 'title' => array(),
+ ),
+ 'form' => 'simple',
+ ),
+ 'print' => array(
+ 'url' => '#',
+ 'transform' => array(),
+ 'form' => 'simple',
+ ),
+);
diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php
index 409d9611f..b47c54554 100644
--- a/lib/Minz/ActionController.php
+++ b/lib/Minz/ActionController.php
@@ -8,16 +8,12 @@
* La classe ActionController représente le contrôleur de l'application
*/
class Minz_ActionController {
- protected $router;
protected $view;
/**
* Constructeur
- * @param $controller nom du controller
- * @param $action nom de l'action à lancer
*/
- public function __construct ($router) {
- $this->router = $router;
+ public function __construct () {
$this->view = new Minz_View ();
$this->view->attributeParams ();
}
diff --git a/lib/Minz/Cache.php b/lib/Minz/Cache.php
deleted file mode 100644
index fcb627eb2..000000000
--- a/lib/Minz/Cache.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-/**
- * MINZ - Copyright 2011 Marien Fressinaud
- * Sous licence AGPL3 <http://www.gnu.org/licenses/>
-*/
-
-/**
- * La classe Cache permet de gérer facilement les pages en cache
- */
-class Minz_Cache {
- /**
- * $expire timestamp auquel expire le cache de $url
- */
- private $expire = 0;
-
- /**
- * $file est le nom du fichier de cache
- */
- private $file = '';
-
- /**
- * $enabled permet de déterminer si le cache est activé
- */
- private static $enabled = true;
-
- /**
- * Constructeur
- */
- public function __construct () {
- $this->_fileName ();
- $this->_expire ();
- }
-
- /**
- * Setteurs
- */
- public function _fileName () {
- $file = md5 (Minz_Request::getURI ());
-
- $this->file = CACHE_PATH . '/'.$file;
- }
-
- public function _expire () {
- if ($this->exist ()) {
- $this->expire = filemtime ($this->file)
- + Minz_Configuration::delayCache ();
- }
- }
-
- /**
- * Permet de savoir si le cache est activé
- * @return true si activé, false sinon
- */
- public static function isEnabled () {
- return Minz_Configuration::cacheEnabled () && self::$enabled;
- }
-
- /**
- * Active / désactive le cache
- */
- public static function switchOn () {
- self::$enabled = true;
- }
- public static function switchOff () {
- self::$enabled = false;
- }
-
- /**
- * Détermine si le cache de $url a expiré ou non
- * @return true si il a expiré, false sinon
- */
- public function expired () {
- return time () > $this->expire;
- }
-
- /**
- * Affiche le contenu du cache
- * @print le code html du cache
- */
- public function render () {
- if ($this->exist ()) {
- include ($this->file);
- }
- }
-
- /**
- * Enregistre $html en cache
- * @param $html le html à mettre en cache
- */
- public function cache ($html) {
- file_put_contents ($this->file, $html);
- }
-
- /**
- * Permet de savoir si le cache existe
- * @return true si il existe, false sinon
- */
- public function exist () {
- return file_exists ($this->file);
- }
-
- /**
- * Nettoie le cache en supprimant tous les fichiers
- */
- public static function clean () {
- $files = opendir (CACHE_PATH);
-
- while ($fic = readdir ($files)) {
- if ($fic != '.' && $fic != '..') {
- unlink (CACHE_PATH.'/'.$fic);
- }
- }
-
- closedir ($files);
- }
-}
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php
index 572b9984d..16c8eb727 100644
--- a/lib/Minz/Configuration.php
+++ b/lib/Minz/Configuration.php
@@ -30,12 +30,9 @@ class Minz_Configuration {
* définition des variables de configuration
* $salt une chaîne de caractères aléatoires (obligatoire)
* $environment gère le niveau d'affichage pour log et erreurs
- * $use_url_rewriting indique si on utilise l'url_rewriting
* $base_url le chemin de base pour accéder à l'application
* $title le nom de l'application
* $language la langue par défaut de l'application
- * $cacheEnabled permet de savoir si le cache doit être activé
- * $delayCache la limite de cache
* $db paramètres pour la base de données (tableau)
* - host le serveur de la base
* - user nom d'utilisateur
@@ -45,14 +42,14 @@ class Minz_Configuration {
private static $salt = '';
private static $environment = Minz_Configuration::PRODUCTION;
private static $base_url = '';
- private static $use_url_rewriting = false;
private static $title = '';
private static $language = 'en';
- private static $cache_enabled = false;
- private static $delay_cache = 3600;
private static $default_user = '';
private static $allow_anonymous = false;
+ private static $allow_anonymous_refresh = false;
private static $auth_type = 'none';
+ private static $api_enabled = false;
+ private static $unsafe_autologin_enabled = false;
private static $db = array (
'type' => 'mysql',
@@ -91,21 +88,12 @@ class Minz_Configuration {
public static function baseUrl () {
return self::$base_url;
}
- public static function useUrlRewriting () {
- return self::$use_url_rewriting;
- }
public static function title () {
return self::$title;
}
public static function language () {
return self::$language;
}
- public static function cacheEnabled () {
- return self::$cache_enabled;
- }
- public static function delayCache () {
- return self::$delay_cache;
- }
public static function dataBase () {
return self::$db;
}
@@ -118,6 +106,9 @@ class Minz_Configuration {
public static function allowAnonymous() {
return self::$allow_anonymous;
}
+ public static function allowAnonymousRefresh() {
+ return self::$allow_anonymous_refresh;
+ }
public static function authType() {
return self::$auth_type;
}
@@ -127,10 +118,19 @@ class Minz_Configuration {
public static function canLogIn() {
return self::$auth_type === 'form' || self::$auth_type === 'persona';
}
+ public static function apiEnabled() {
+ return self::$api_enabled;
+ }
+ public static function unsafeAutologinEnabled() {
+ return self::$unsafe_autologin_enabled;
+ }
public static function _allowAnonymous($allow = false) {
self::$allow_anonymous = ((bool)$allow) && self::canLogIn();
}
+ public static function _allowAnonymousRefresh($allow = false) {
+ self::$allow_anonymous_refresh = ((bool)$allow) && self::allowAnonymous();
+ }
public static function _authType($value) {
$value = strtolower($value);
switch ($value) {
@@ -144,6 +144,13 @@ class Minz_Configuration {
self::_allowAnonymous(self::$allow_anonymous);
}
+ public static function _enableApi($value = false) {
+ self::$api_enabled = (bool)$value;
+ }
+ public static function _enableAutologin($value = false) {
+ self::$unsafe_autologin_enabled = (bool)$value;
+ }
+
/**
* Initialise les variables de configuration
* @exception Minz_FileNotExistException si le CONF_PATH_NAME n'existe pas
@@ -164,13 +171,15 @@ class Minz_Configuration {
$ini_array = array(
'general' => array(
'environment' => self::environment(true),
- 'use_url_rewriting' => self::$use_url_rewriting,
'salt' => self::$salt,
'base_url' => self::$base_url,
'title' => self::$title,
'default_user' => self::$default_user,
'allow_anonymous' => self::$allow_anonymous,
+ 'allow_anonymous_refresh' => self::$allow_anonymous_refresh,
'auth_type' => self::$auth_type,
+ 'api_enabled' => self::$api_enabled,
+ 'unsafe_autologin_enabled' => self::$unsafe_autologin_enabled,
),
'db' => self::$db,
);
@@ -247,9 +256,6 @@ class Minz_Configuration {
if (isset ($general['base_url'])) {
self::$base_url = $general['base_url'];
}
- if (isset ($general['use_url_rewriting'])) {
- self::$use_url_rewriting = $general['use_url_rewriting'];
- }
if (isset ($general['title'])) {
self::$title = $general['title'];
@@ -257,18 +263,6 @@ class Minz_Configuration {
if (isset ($general['language'])) {
self::$language = $general['language'];
}
- if (isset ($general['cache_enabled'])) {
- self::$cache_enabled = $general['cache_enabled'];
- if (CACHE_PATH === false && self::$cache_enabled) {
- throw new FileNotExistException (
- 'CACHE_PATH',
- Minz_Exception::ERROR
- );
- }
- }
- if (isset ($general['delay_cache'])) {
- self::$delay_cache = inval($general['delay_cache']);
- }
if (isset ($general['default_user'])) {
self::$default_user = $general['default_user'];
}
@@ -276,7 +270,28 @@ class Minz_Configuration {
self::_authType($general['auth_type']);
}
if (isset ($general['allow_anonymous'])) {
- self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no');
+ self::$allow_anonymous = (
+ ((bool)($general['allow_anonymous'])) &&
+ ($general['allow_anonymous'] !== 'no')
+ );
+ }
+ if (isset ($general['allow_anonymous_refresh'])) {
+ self::$allow_anonymous_refresh = (
+ ((bool)($general['allow_anonymous_refresh'])) &&
+ ($general['allow_anonymous_refresh'] !== 'no')
+ );
+ }
+ if (isset ($general['api_enabled'])) {
+ self::$api_enabled = (
+ ((bool)($general['api_enabled'])) &&
+ ($general['api_enabled'] !== 'no')
+ );
+ }
+ if (isset ($general['unsafe_autologin_enabled'])) {
+ self::$unsafe_autologin_enabled = (
+ ((bool)($general['unsafe_autologin_enabled'])) &&
+ ($general['unsafe_autologin_enabled'] !== 'no')
+ );
}
// Base de données
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php
index 71dfe8ac6..f62a92911 100644
--- a/lib/Minz/Dispatcher.php
+++ b/lib/Minz/Dispatcher.php
@@ -14,85 +14,55 @@ class Minz_Dispatcher {
/* singleton */
private static $instance = null;
+ private static $needsReset;
- private $router;
private $controller;
/**
* Récupère l'instance du Dispatcher
*/
- public static function getInstance ($router) {
+ public static function getInstance () {
if (self::$instance === null) {
- self::$instance = new Minz_Dispatcher ($router);
+ self::$instance = new Minz_Dispatcher ();
}
return self::$instance;
}
/**
- * Constructeur
- */
- private function __construct ($router) {
- $this->router = $router;
- }
-
- /**
* Lance le controller indiqué dans Request
* Remplit le body de Response à partir de la Vue
* @exception Minz_Exception
*/
- public function run ($ob = true) {
- $cache = new Minz_Cache();
- // Le ob_start est dupliqué : sans ça il y a un bug sous Firefox
- // ici on l'appelle avec 'ob_gzhandler', après sans.
- // Vraisemblablement la compression fonctionne mais c'est sale
- // J'ignore les effets de bord :(
- if ($ob) {
- ob_start ('ob_gzhandler');
- }
+ public function run () {
+ do {
+ self::$needsReset = false;
- if (Minz_Cache::isEnabled () && !$cache->expired ()) {
- if ($ob) {
- ob_start ();
- }
- $cache->render ();
- if ($ob) {
- $text = ob_get_clean();
- }
- } else {
- $text = ''; //TODO: Clean this code
- while (Minz_Request::$reseted) {
- Minz_Request::$reseted = false;
-
- try {
- $this->createController ('FreshRSS_' . Minz_Request::controllerName () . '_Controller');
- $this->controller->init ();
- $this->controller->firstAction ();
+ try {
+ $this->createController ('FreshRSS_' . Minz_Request::controllerName () . '_Controller');
+ $this->controller->init ();
+ $this->controller->firstAction ();
+ if (!self::$needsReset) {
$this->launchAction (
Minz_Request::actionName ()
. 'Action'
);
- $this->controller->lastAction ();
-
- if (!Minz_Request::$reseted) {
- if ($ob) {
- ob_start ();
- }
- $this->controller->view ()->build ();
- if ($ob) {
- $text = ob_get_clean();
- }
- }
- } catch (Minz_Exception $e) {
- throw $e;
}
- }
+ $this->controller->lastAction ();
- if (Minz_Cache::isEnabled ()) {
- $cache->cache ($text);
+ if (!self::$needsReset) {
+ $this->controller->view ()->build ();
+ }
+ } catch (Minz_Exception $e) {
+ throw $e;
}
- }
+ } while (self::$needsReset);
+ }
- Minz_Response::setBody ($text);
+ /**
+ * Informe le contrôleur qu'il doit recommancer car la requête a été modifiée
+ */
+ public static function reset() {
+ self::$needsReset = true;
}
/**
@@ -112,7 +82,7 @@ class Minz_Dispatcher {
Minz_Exception::ERROR
);
}
- $this->controller = new $controller_name ($this->router);
+ $this->controller = new $controller_name ();
if (! ($this->controller instanceof Minz_ActionController)) {
throw new Minz_ControllerNotActionControllerException (
@@ -129,21 +99,19 @@ class Minz_Dispatcher {
* le controller
*/
private function launchAction ($action_name) {
- if (!Minz_Request::$reseted) {
- if (!is_callable (array (
- $this->controller,
- $action_name
- ))) {
- throw new Minz_ActionException (
- get_class ($this->controller),
- $action_name,
- Minz_Exception::ERROR
- );
- }
- call_user_func (array (
- $this->controller,
- $action_name
- ));
+ if (!is_callable (array (
+ $this->controller,
+ $action_name
+ ))) {
+ throw new Minz_ActionException (
+ get_class ($this->controller),
+ $action_name,
+ Minz_Exception::ERROR
+ );
}
+ call_user_func (array (
+ $this->controller,
+ $action_name
+ ));
}
}
diff --git a/lib/Minz/Error.php b/lib/Minz/Error.php
index 337ab6c0a..c8222a430 100644
--- a/lib/Minz/Error.php
+++ b/lib/Minz/Error.php
@@ -23,13 +23,32 @@ class Minz_Error {
$logs = self::processLogs ($logs);
$error_filename = APP_PATH . '/Controllers/errorController.php';
+ switch ($code) {
+ case 200 :
+ header('HTTP/1.1 200 OK');
+ break;
+ case 403 :
+ header('HTTP/1.1 403 Forbidden');
+ break;
+ case 404 :
+ header('HTTP/1.1 404 Not Found');
+ break;
+ case 500 :
+ header('HTTP/1.1 500 Internal Server Error');
+ break;
+ case 503 :
+ header('HTTP/1.1 503 Service Unavailable');
+ break;
+ default :
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+
if (file_exists ($error_filename)) {
$params = array (
'code' => $code,
'logs' => $logs
);
- Minz_Response::setHeader ($code);
if ($redirect) {
Minz_Request::forward (array (
'c' => 'error'
@@ -41,19 +60,16 @@ class Minz_Error {
), false);
}
} else {
- $text = '<h1>An error occured</h1>'."\n";
+ echo '<h1>An error occured</h1>' . "\n";
if (!empty ($logs)) {
- $text .= '<ul>'."\n";
+ echo '<ul>' . "\n";
foreach ($logs as $log) {
- $text .= '<li>' . $log . '</li>'."\n";
+ echo '<li>' . $log . '</li>' . "\n";
}
- $text .= '</ul>'."\n";
+ echo '</ul>' . "\n";
}
- Minz_Response::setHeader ($code);
- Minz_Response::setBody ($text);
- Minz_Response::send ();
exit ();
}
}
diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php
index 80eda8877..f13882801 100644
--- a/lib/Minz/FrontController.php
+++ b/lib/Minz/FrontController.php
@@ -24,13 +24,10 @@
*/
class Minz_FrontController {
protected $dispatcher;
- protected $router;
-
- private $useOb = true;
/**
* Constructeur
- * Initialise le router et le dispatcher
+ * Initialise le dispatcher, met à jour la Request
*/
public function __construct () {
if (LOG_PATH === false) {
@@ -42,29 +39,50 @@ class Minz_FrontController {
Minz_Request::init ();
- $this->router = new Minz_Router ();
- $this->router->init ();
- } catch (Minz_RouteNotFoundException $e) {
- Minz_Log::record ($e->getMessage (), Minz_Log::ERROR);
- Minz_Error::error (
- 404,
- array ('error' => array ($e->getMessage ()))
+ $url = $this->buildUrl();
+ $url['params'] = array_merge (
+ $url['params'],
+ Minz_Request::fetchPOST ()
);
+ Minz_Request::forward ($url);
} catch (Minz_Exception $e) {
Minz_Log::record ($e->getMessage (), Minz_Log::ERROR);
$this->killApp ($e->getMessage ());
}
- $this->dispatcher = Minz_Dispatcher::getInstance ($this->router);
+ $this->dispatcher = Minz_Dispatcher::getInstance();
}
/**
- * Démarre l'application (lance le dispatcher et renvoie la réponse
+ * Retourne un tableau représentant l'url passée par la barre d'adresses
+ * @return tableau représentant l'url
+ */
+ private function buildUrl() {
+ $url = array ();
+
+ $url['c'] = Minz_Request::fetchGET (
+ 'c',
+ Minz_Request::defaultControllerName ()
+ );
+ $url['a'] = Minz_Request::fetchGET (
+ 'a',
+ Minz_Request::defaultActionName ()
+ );
+ $url['params'] = Minz_Request::fetchGET ();
+
+ // post-traitement
+ unset ($url['params']['c']);
+ unset ($url['params']['a']);
+
+ return $url;
+ }
+
+ /**
+ * Démarre l'application (lance le dispatcher et renvoie la réponse)
*/
public function run () {
try {
- $this->dispatcher->run ($this->useOb);
- Minz_Response::send ();
+ $this->dispatcher->run();
} catch (Minz_Exception $e) {
try {
Minz_Log::record ($e->getMessage (), Minz_Log::ERROR);
@@ -96,15 +114,4 @@ class Minz_FrontController {
}
exit ('### Application problem ###<br />'."\n".$txt);
}
-
- public function useOb() {
- return $this->useOb;
- }
-
- /**
- * Use ob_start('ob_gzhandler') or not.
- */
- public function _useOb($ob) {
- return $this->useOb = (bool)$ob;
- }
}
diff --git a/lib/Minz/Log.php b/lib/Minz/Log.php
index e710aad4a..d3eaec2ae 100644
--- a/lib/Minz/Log.php
+++ b/lib/Minz/Log.php
@@ -80,4 +80,21 @@ class Minz_Log {
self::record($msg_get, Minz_Log::DEBUG, $file_name);
self::record($msg_post, Minz_Log::DEBUG, $file_name);
}
+
+ /**
+ * Some helpers to Minz_Log::record() method
+ * Parameters are the same of those of the record() method.
+ */
+ public static function debug($msg, $file_name = null) {
+ self::record($msg, Minz_Log::DEBUG, $file_name);
+ }
+ public static function notice($msg, $file_name = null) {
+ self::record($msg, Minz_Log::NOTICE, $file_name);
+ }
+ public static function warning($msg, $file_name = null) {
+ self::record($msg, Minz_Log::WARNING, $file_name);
+ }
+ public static function error($msg, $file_name = null) {
+ self::record($msg, Minz_Log::ERROR, $file_name);
+ }
}
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index d4e1355d7..7e3c59990 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -15,8 +15,6 @@ class Minz_Request {
private static $default_controller_name = 'index';
private static $default_action_name = 'index';
- public static $reseted = true;
-
/**
* Getteurs
*/
@@ -137,14 +135,13 @@ class Minz_Request {
header ('Location: ' . Minz_Url::display ($url, 'php'));
exit ();
} else {
- self::$reseted = true;
-
self::_controllerName ($url['c']);
self::_actionName ($url['a']);
self::_params (array_merge (
self::$params,
$url['params']
));
+ Minz_Dispatcher::reset();
}
}
@@ -199,6 +196,6 @@ class Minz_Request {
}
public static function isPost () {
- return !empty ($_POST) || !empty ($_FILES);
+ return $_SERVER['REQUEST_METHOD'] === 'POST';
}
}
diff --git a/lib/Minz/Response.php b/lib/Minz/Response.php
deleted file mode 100644
index f8ea3d946..000000000
--- a/lib/Minz/Response.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * MINZ - Copyright 2011 Marien Fressinaud
- * Sous licence AGPL3 <http://www.gnu.org/licenses/>
-*/
-
-/**
- * Response représente la requête http renvoyée à l'utilisateur
- */
-class Minz_Response {
- private static $header = 'HTTP/1.0 200 OK';
- private static $body = '';
-
- /**
- * Mets à jour le body de la Response
- * @param $text le texte à incorporer dans le body
- */
- public static function setBody ($text) {
- self::$body = $text;
- }
-
- /**
- * Mets à jour le header de la Response
- * @param $code le code HTTP, valeurs possibles
- * - 200 (OK)
- * - 403 (Forbidden)
- * - 404 (Forbidden)
- * - 500 (Forbidden) -> par défaut si $code erroné
- * - 503 (Forbidden)
- */
- public static function setHeader ($code) {
- switch ($code) {
- case 200 :
- self::$header = 'HTTP/1.0 200 OK';
- break;
- case 403 :
- self::$header = 'HTTP/1.0 403 Forbidden';
- break;
- case 404 :
- self::$header = 'HTTP/1.0 404 Not Found';
- break;
- case 500 :
- self::$header = 'HTTP/1.0 500 Internal Server Error';
- break;
- case 503 :
- self::$header = 'HTTP/1.0 503 Service Unavailable';
- break;
- default :
- self::$header = 'HTTP/1.0 500 Internal Server Error';
- }
- }
-
- /**
- * Envoie la Response à l'utilisateur
- */
- public static function send () {
- header (self::$header);
- echo self::$body;
- }
-}
diff --git a/lib/Minz/RouteNotFoundException.php b/lib/Minz/RouteNotFoundException.php
deleted file mode 100644
index dc4f6fbad..000000000
--- a/lib/Minz/RouteNotFoundException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-class Minz_RouteNotFoundException extends Minz_Exception {
- private $route;
-
- public function __construct ($route, $code = self::ERROR) {
- $this->route = $route;
-
- $message = 'Route `' . $route . '` not found';
-
- parent::__construct ($message, $code);
- }
-
- public function route () {
- return $this->route;
- }
-}
diff --git a/lib/Minz/Router.php b/lib/Minz/Router.php
deleted file mode 100644
index 1ccd72597..000000000
--- a/lib/Minz/Router.php
+++ /dev/null
@@ -1,209 +0,0 @@
-<?php
-/**
- * MINZ - Copyright 2011 Marien Fressinaud
- * Sous licence AGPL3 <http://www.gnu.org/licenses/>
-*/
-
-/**
- * La classe Router gère le routage de l'application
- * Les routes sont définies dans APP_PATH.'/configuration/routes.php'
- */
-class Minz_Router {
- const ROUTES_PATH_NAME = '/configuration/routes.php';
-
- private $routes = array ();
-
- /**
- * Constructeur
- * @exception FileNotExistException si ROUTES_PATH_NAME n'existe pas
- * et que l'on utilise l'url rewriting
- */
- public function __construct () {
- if (Minz_Configuration::useUrlRewriting ()) {
- if (file_exists (APP_PATH . self::ROUTES_PATH_NAME)) {
- $routes = include (
- APP_PATH . self::ROUTES_PATH_NAME
- );
-
- if (!is_array ($routes)) {
- $routes = array ();
- }
-
- $this->routes = array_map (
- array ('Url', 'checkUrl'),
- $routes
- );
- } else {
- throw new Minz_FileNotExistException (
- self::ROUTES_PATH_NAME,
- Minz_Exception::ERROR
- );
- }
- }
- }
-
- /**
- * Initialise le Router en déterminant le couple Controller / Action
- * Mets à jour la Request
- * @exception RouteNotFoundException si l'uri n'est pas présente dans
- * > la table de routage
- */
- public function init () {
- $url = array ();
-
- if (Minz_Configuration::useUrlRewriting ()) {
- try {
- $url = $this->buildWithRewriting ();
- } catch (Minz_RouteNotFoundException $e) {
- throw $e;
- }
- } else {
- $url = $this->buildWithoutRewriting ();
- }
-
- $url['params'] = array_merge (
- $url['params'],
- Minz_Request::fetchPOST ()
- );
-
- Minz_Request::forward ($url);
- }
-
- /**
- * Retourne un tableau représentant l'url passée par la barre d'adresses
- * Ne se base PAS sur la table de routage
- * @return tableau représentant l'url
- */
- public function buildWithoutRewriting () {
- $url = array ();
-
- $url['c'] = Minz_Request::fetchGET (
- 'c',
- Minz_Request::defaultControllerName ()
- );
- $url['a'] = Minz_Request::fetchGET (
- 'a',
- Minz_Request::defaultActionName ()
- );
- $url['params'] = Minz_Request::fetchGET ();
-
- // post-traitement
- unset ($url['params']['c']);
- unset ($url['params']['a']);
-
- return $url;
- }
-
- /**
- * Retourne un tableau représentant l'url passée par la barre d'adresses
- * Se base sur la table de routage
- * @return tableau représentant l'url
- * @exception RouteNotFoundException si l'uri n'est pas présente dans
- * > la table de routage
- */
- public function buildWithRewriting () {
- $url = array ();
- $uri = Minz_Request::getURI ();
- $find = false;
-
- foreach ($this->routes as $route) {
- $regex = '*^' . $route['route'] . '$*';
- if (preg_match ($regex, $uri, $matches)) {
- $url['c'] = $route['controller'];
- $url['a'] = $route['action'];
- $url['params'] = $this->getParams (
- $route['params'],
- $matches
- );
- $find = true;
- break;
- }
- }
-
- if (!$find && $uri != '/') {
- throw new Minz_RouteNotFoundException (
- $uri,
- Minz_Exception::ERROR
- );
- }
-
- // post-traitement
- $url = Minz_Url::checkUrl ($url);
-
- return $url;
- }
-
- /**
- * Retourne l'uri d'une url en se basant sur la table de routage
- * @param l'url sous forme de tableau
- * @return l'uri formatée (string) selon une route trouvée
- */
- public function printUriRewrited ($url) {
- $route = $this->searchRoute ($url);
-
- if ($route !== false) {
- return $this->replaceParams ($route, $url['params']);
- }
-
- return '';
- }
-
- /**
- * Recherche la route correspondante à une url
- * @param l'url sous forme de tableau
- * @return la route telle que spécifiée dans la table de routage,
- * false si pas trouvée
- */
- public function searchRoute ($url) {
- foreach ($this->routes as $route) {
- if ($route['controller'] == $url['c']
- && $route['action'] == $url['a']) {
- // calcule la différence des tableaux de params
- $params = array_flip ($route['params']);
- $difference_params = array_diff_key (
- $params,
- $url['params']
- );
-
- // vérifie que pas de différence
- // et le cas où $params est vide et pas $url['params']
- if (empty ($difference_params)
- && (!empty ($params) || empty ($url['params']))) {
- return $route;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Récupère un tableau dont
- * - les clés sont définies dans $params_route
- * - les valeurs sont situées dans $matches
- * Le tableau $matches est décalé de +1 par rapport à $params_route
- */
- private function getParams($params_route, $matches) {
- $params = array ();
-
- for ($i = 0; $i < count ($params_route); $i++) {
- $param = $params_route[$i];
- $params[$param] = $matches[$i + 1];
- }
-
- return $params;
- }
-
- /**
- * Remplace les éléments de la route par les valeurs contenues dans $params
- */
- private function replaceParams ($route, $params_replace) {
- $uri = $route['route'];
- $params = array();
- foreach($route['params'] as $param) {
- $uri = preg_replace('#\((.+)\)#U', $params_replace[$param], $uri, 1);
- }
-
- return stripslashes($uri);
- }
-}
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php
index 17f1ddece..e9f9a69ba 100644
--- a/lib/Minz/Url.php
+++ b/lib/Minz/Url.php
@@ -5,8 +5,7 @@
*/
class Minz_Url {
/**
- * Affiche une Url formatée selon que l'on utilise l'url_rewriting ou non
- * si oui, on cherche dans la table de routage la correspondance pour formater
+ * Affiche une Url formatée
* @param $url l'url à formater définie comme un tableau :
* $url['c'] = controller
* $url['a'] = action
@@ -39,13 +38,7 @@ class Minz_Url {
}
if ($isArray) {
- $router = new Minz_Router ();
-
- if (Minz_Configuration::useUrlRewriting ()) {
- $url_string .= $router->printUriRewrited ($url);
- } else {
- $url_string .= self::printUri ($url, $encodage);
- }
+ $url_string .= self::printUri ($url, $encodage);
} else {
$url_string .= $url;
}
@@ -54,14 +47,14 @@ class Minz_Url {
}
/**
- * Construit l'URI d'une URL sans url rewriting
+ * Construit l'URI d'une URL
* @param l'url sous forme de tableau
* @param $encodage pour indiquer comment encoder les & (& ou &amp; pour html)
* @return l'uri sous la forme ?key=value&key2=value2
*/
private static function printUri ($url, $encodage) {
$uri = '';
- $separator = '/?';
+ $separator = '?';
if($encodage == 'html') {
$and = '&amp;';
diff --git a/lib/Minz/View.php b/lib/Minz/View.php
index e170bd406..f034ab10b 100644
--- a/lib/Minz/View.php
+++ b/lib/Minz/View.php
@@ -103,6 +103,16 @@ class Minz_View {
}
/**
+ * Retourne renderHelper() dans une chaîne
+ * @param $helper l'élément à traîter
+ */
+ public function helperToString($helper) {
+ ob_start();
+ $this->renderHelper($helper);
+ return ob_get_clean();
+ }
+
+ /**
* Permet de choisir si on souhaite utiliser le layout
* @param $use true si on souhaite utiliser le layout, false sinon
*/
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php
index f02037c10..685fe1cc0 100644
--- a/lib/SimplePie/SimplePie.php
+++ b/lib/SimplePie/SimplePie.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev-FreshRSS
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
/**
* SimplePie Version
*/
-define('SIMPLEPIE_VERSION', '1.3.1');
+define('SIMPLEPIE_VERSION', '1.4-dev-FreshRSS');
/**
* SimplePie Build
@@ -602,7 +602,7 @@ class SimplePie
public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');
/**
- * @var array Stores the default attributes to add to differet tags by add_attributes().
+ * @var array Stores the default attributes to add to different tags by add_attributes().
* @see SimplePie::add_attributes()
* @access private
*/
@@ -644,7 +644,7 @@ class SimplePie
if (func_num_args() > 0)
{
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.', $level);
+ trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_duration() directly.', $level);
$args = func_get_args();
switch (count($args)) {
@@ -1213,13 +1213,27 @@ class SimplePie
}
/**
+ * Enable throwing exceptions
+ *
+ * @param boolean $enable Should we throw exceptions, or use the old-style error property?
+ */
+ public function enable_exceptions($enable = true)
+ {
+ $this->enable_exceptions = $enable;
+ }
+
+ function cleanMd5($rss) { //FreshRSS
+ return md5(preg_replace(array('#<(lastBuildDate|pubDate|updated|feedDate|dc:date|slash:comments)>[^<]+</\\1>#', '#<!--.+?-->#s'), '', $rss));
+ }
+
+ /**
* Initialize the feed object
*
* This is what makes everything happen. Period. This is where all of the
* configuration options get processed, feeds are fetched, cached, and
* parsed, and all of that other good stuff.
*
- * @return boolean True if successful, false otherwise
+ * @return positive integer with modification time if using cache, boolean true if otherwise successful, false otherwise
*/
public function init()
{
@@ -1298,13 +1312,17 @@ class SimplePie
// Fetch the data via SimplePie_File into $this->raw_data
if (($fetched = $this->fetch_data($cache)) === true)
{
- return true;
+ return $this->data['mtime']; //FreshRSS
}
elseif ($fetched === false) {
return false;
}
list($headers, $sniffed) = $fetched;
+
+ if (isset($this->data['md5'])) { //FreshRSS
+ $md5 = $this->data['md5'];
+ }
}
// Set up array of possible encodings
@@ -1386,6 +1404,8 @@ class SimplePie
$this->data['headers'] = $headers;
}
$this->data['build'] = SIMPLEPIE_BUILD;
+ $this->data['mtime'] = time(); //FreshRSS
+ $this->data['md5'] = empty($md5) ? $this->cleanMd5($this->raw_data) : $md5; //FreshRSS
// Cache the file if caching is enabled
if ($cache && !$cache->save($this))
@@ -1461,7 +1481,7 @@ class SimplePie
elseif ($cache->mtime() + $this->cache_duration < time())
{
// If we have last-modified and/or etag set
- if (isset($this->data['headers']['last-modified']) || isset($this->data['headers']['etag']))
+ //if (isset($this->data['headers']['last-modified']) || isset($this->data['headers']['etag'])) //FreshRSS removed
{
$headers = array(
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
@@ -1475,7 +1495,7 @@ class SimplePie
$headers['if-none-match'] = $this->data['headers']['etag'];
}
- $file = $this->registry->create('File', array($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen));
+ $file = $this->registry->create('File', array($this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen)); //FreshRSS
if ($file->success)
{
@@ -1487,7 +1507,20 @@ class SimplePie
}
else
{
- unset($file);
+ $this->error = $file->error; //FreshRSS
+ return !empty($this->data); //FreshRSS
+ //unset($file); //FreshRSS removed
+ }
+ }
+ { //FreshRSS
+ $md5 = $this->cleanMd5($file->body);
+ if ($this->data['md5'] === $md5) {
+ syslog(LOG_DEBUG, 'SimplePie MD5 cache match for ' . $this->feed_url);
+ $cache->touch();
+ return true; //Content unchanged even though server did not send a 304
+ } else {
+ syslog(LOG_DEBUG, 'SimplePie MD5 cache no match for ' . $this->feed_url);
+ $this->data['md5'] = $md5;
}
}
}
@@ -1555,6 +1588,8 @@ class SimplePie
if ($cache)
{
$this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD);
+ $this->data['mtime'] = time(); //FreshRSS
+ $this->data['md5'] = empty($md5) ? $this->cleanMd5($file->body) : $md5; //FreshRSS
if (!$cache->save($this))
{
trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
@@ -1987,7 +2022,21 @@ class SimplePie
*/
public function sanitize($data, $type, $base = '')
{
- return $this->sanitize->sanitize($data, $type, $base);
+ try
+ {
+ return $this->sanitize->sanitize($data, $type, $base);
+ }
+ catch (SimplePie_Exception $e)
+ {
+ if (!$this->enable_exceptions)
+ {
+ $this->error = $e->getMessage();
+ $this->registry->call('Misc', 'error', array($this->error, E_USER_WARNING, $e->getFile(), $e->getLine()));
+ return '';
+ }
+
+ throw $e;
+ }
}
/**
diff --git a/lib/SimplePie/SimplePie/Author.php b/lib/SimplePie/SimplePie/Author.php
index bbf3812ff..19563c5cc 100644
--- a/lib/SimplePie/SimplePie/Author.php
+++ b/lib/SimplePie/SimplePie/Author.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Cache.php b/lib/SimplePie/SimplePie/Cache.php
index 75586d749..86b618693 100644
--- a/lib/SimplePie/SimplePie/Cache.php
+++ b/lib/SimplePie/SimplePie/Cache.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Cache/Base.php b/lib/SimplePie/SimplePie/Cache/Base.php
index 937e34631..d3f353961 100644
--- a/lib/SimplePie/SimplePie/Cache/Base.php
+++ b/lib/SimplePie/SimplePie/Cache/Base.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Cache/DB.php b/lib/SimplePie/SimplePie/Cache/DB.php
index ac509ae08..d728a9a6d 100644
--- a/lib/SimplePie/SimplePie/Cache/DB.php
+++ b/lib/SimplePie/SimplePie/Cache/DB.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Cache/File.php b/lib/SimplePie/SimplePie/Cache/File.php
index 5797b3aed..3b163545b 100644
--- a/lib/SimplePie/SimplePie/Cache/File.php
+++ b/lib/SimplePie/SimplePie/Cache/File.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Cache/Memcache.php b/lib/SimplePie/SimplePie/Cache/Memcache.php
index fd4478060..23b1c9367 100644
--- a/lib/SimplePie/SimplePie/Cache/Memcache.php
+++ b/lib/SimplePie/SimplePie/Cache/Memcache.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -95,10 +95,8 @@ class SimplePie_Cache_Memcache implements SimplePie_Cache_Base
'prefix' => 'simplepie_',
),
);
- $parsed = SimplePie_Cache::parse_URL($location);
- $this->options['host'] = empty($parsed['host']) ? $this->options['host'] : $parsed['host'];
- $this->options['port'] = empty($parsed['port']) ? $this->options['port'] : $parsed['port'];
- $this->options['extras'] = array_merge($this->options['extras'], $parsed['extras']);
+ $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
+
$this->name = $this->options['extras']['prefix'] . md5("$name:$type");
$this->cache = new Memcache();
@@ -147,7 +145,7 @@ class SimplePie_Cache_Memcache implements SimplePie_Cache_Base
if ($data !== false)
{
- // essentially ignore the mtime because Memcache expires on it's own
+ // essentially ignore the mtime because Memcache expires on its own
return time();
}
@@ -165,7 +163,7 @@ class SimplePie_Cache_Memcache implements SimplePie_Cache_Base
if ($data !== false)
{
- return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->duration);
+ return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
}
return false;
diff --git a/lib/SimplePie/SimplePie/Cache/MySQL.php b/lib/SimplePie/SimplePie/Cache/MySQL.php
index d53ebc117..511ef6d3a 100644
--- a/lib/SimplePie/SimplePie/Cache/MySQL.php
+++ b/lib/SimplePie/SimplePie/Cache/MySQL.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -96,7 +96,8 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
'prefix' => '',
),
);
- $this->options = array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
+
+ $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
// Path is prefixed with a "/"
$this->options['dbname'] = substr($this->options['path'], 1);
@@ -136,7 +137,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
if (!in_array($this->options['extras']['prefix'] . 'items', $db))
{
- $query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` TEXT CHARACTER SET utf8 NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))');
+ $query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` MEDIUMBLOB CHARACTER SET utf8 NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))');
if ($query === false)
{
$this->mysql = null;
diff --git a/lib/SimplePie/SimplePie/Caption.php b/lib/SimplePie/SimplePie/Caption.php
index 52922c5d9..a77b02ef1 100644
--- a/lib/SimplePie/SimplePie/Caption.php
+++ b/lib/SimplePie/SimplePie/Caption.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Category.php b/lib/SimplePie/SimplePie/Category.php
index ad0407b4e..c6a273989 100644
--- a/lib/SimplePie/SimplePie/Category.php
+++ b/lib/SimplePie/SimplePie/Category.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php b/lib/SimplePie/SimplePie/Content/Type/Sniffer.php
index 20d053dca..a32f47f59 100644
--- a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php
+++ b/lib/SimplePie/SimplePie/Content/Type/Sniffer.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Copyright.php b/lib/SimplePie/SimplePie/Copyright.php
index 57c535a64..09f22f8df 100644
--- a/lib/SimplePie/SimplePie/Copyright.php
+++ b/lib/SimplePie/SimplePie/Copyright.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Core.php b/lib/SimplePie/SimplePie/Core.php
index 46d996628..7cf34876f 100644
--- a/lib/SimplePie/SimplePie/Core.php
+++ b/lib/SimplePie/SimplePie/Core.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Credit.php b/lib/SimplePie/SimplePie/Credit.php
index d3a3442ad..50aef1c68 100644
--- a/lib/SimplePie/SimplePie/Credit.php
+++ b/lib/SimplePie/SimplePie/Credit.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Decode/HTML/Entities.php b/lib/SimplePie/SimplePie/Decode/HTML/Entities.php
index 069e8d8e5..cde06c884 100644
--- a/lib/SimplePie/SimplePie/Decode/HTML/Entities.php
+++ b/lib/SimplePie/SimplePie/Decode/HTML/Entities.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Enclosure.php b/lib/SimplePie/SimplePie/Enclosure.php
index 55674379c..fa0217800 100644
--- a/lib/SimplePie/SimplePie/Enclosure.php
+++ b/lib/SimplePie/SimplePie/Enclosure.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -942,7 +942,7 @@ class SimplePie_Enclosure
* - `height` (integer): The height of the embedded media. Accepts any
* numeric pixel value (such as `360`) or `auto`. Defaults to `auto`,
* and it is recommended that you use this default.
- * - `loop` (boolean): Do you want the media to loop when its done?
+ * - `loop` (boolean): Do you want the media to loop when it's done?
* Defaults to `false`.
* - `mediaplayer` (string): The location of the included
* `mediaplayer.swf` file. This allows for the playback of Flash Video
diff --git a/lib/SimplePie/SimplePie/File.php b/lib/SimplePie/SimplePie/File.php
index cf926cf5a..faf5dd1f1 100644
--- a/lib/SimplePie/SimplePie/File.php
+++ b/lib/SimplePie/SimplePie/File.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -108,7 +108,7 @@ class SimplePie_File
curl_setopt($fp, CURLOPT_REFERER, $url);
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
- curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false); //FreshRSS
if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>='))
{
curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
@@ -284,7 +284,7 @@ class SimplePie_File
else
{
$this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS;
- if (!$this->body = file_get_contents($url))
+ if (empty($url) || !($this->body = file_get_contents($url)))
{
$this->error = 'file_get_contents could not read the file';
$this->success = false;
diff --git a/lib/SimplePie/SimplePie/HTTP/Parser.php b/lib/SimplePie/SimplePie/HTTP/Parser.php
index bff2222b2..2fc3a6779 100644
--- a/lib/SimplePie/SimplePie/HTTP/Parser.php
+++ b/lib/SimplePie/SimplePie/HTTP/Parser.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/IRI.php b/lib/SimplePie/SimplePie/IRI.php
index d3198c04f..ed0574701 100644
--- a/lib/SimplePie/SimplePie/IRI.php
+++ b/lib/SimplePie/SimplePie/IRI.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Item.php b/lib/SimplePie/SimplePie/Item.php
index a77574b37..7bd96c15f 100644
--- a/lib/SimplePie/SimplePie/Item.php
+++ b/lib/SimplePie/SimplePie/Item.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -821,7 +821,7 @@ class SimplePie_Item
if (!empty($this->data['updated']['raw']))
{
$parser = $this->registry->call('Parse_Date', 'get');
- $this->data['updated']['parsed'] = $parser->parse($this->data['date']['raw']);
+ $this->data['updated']['parsed'] = $parser->parse($this->data['updated']['raw']);
}
else
{
@@ -1080,7 +1080,7 @@ class SimplePie_Item
*
* @since Beta 2
* @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4).
- * @todo If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists).
+ * @todo If an element exists at a level, but its value is empty, we should fall back to the value from the parent (if it exists).
* @return array|null List of SimplePie_Enclosure items
*/
public function get_enclosures()
diff --git a/lib/SimplePie/SimplePie/Locator.php b/lib/SimplePie/SimplePie/Locator.php
index 57e910c22..90ee7a302 100644
--- a/lib/SimplePie/SimplePie/Locator.php
+++ b/lib/SimplePie/SimplePie/Locator.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -277,7 +277,7 @@ class SimplePie_Locator
$parsed = $this->registry->call('Misc', 'parse_url', array($href));
if ($parsed['scheme'] === '' || preg_match('/^(http(s)|feed)?$/i', $parsed['scheme']))
{
- if ($this->base_location < $link->getLineNo())
+ if (method_exists($link, 'getLineNo') && $this->base_location < $link->getLineNo())
{
$href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->base));
}
diff --git a/lib/SimplePie/SimplePie/Misc.php b/lib/SimplePie/SimplePie/Misc.php
index 347520303..5a263a2e5 100644
--- a/lib/SimplePie/SimplePie/Misc.php
+++ b/lib/SimplePie/SimplePie/Misc.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -128,7 +128,7 @@ class SimplePie_Misc
{
$attribs[$j][2] = $attribs[$j][1];
}
- $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8');
+ $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8'); //FreshRSS
}
}
}
@@ -142,7 +142,7 @@ class SimplePie_Misc
foreach ($element['attribs'] as $key => $value)
{
$key = strtolower($key);
- $full .= " $key=\"" . htmlspecialchars($value['data'], ENT_COMPAT, 'UTF-8') . '"';
+ $full .= " $key=\"" . htmlspecialchars($value['data'], ENT_COMPAT, 'UTF-8') . '"'; //FreshRSS
}
if ($element['self_closing'])
{
@@ -228,6 +228,23 @@ class SimplePie_Misc
}
}
+ public static function array_merge_recursive($array1, $array2)
+ {
+ foreach ($array2 as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $array1[$key] = SimplePie_Misc::array_merge_recursive($array1[$key], $value);
+ }
+ else
+ {
+ $array1[$key] = $value;
+ }
+ }
+
+ return $array1;
+ }
+
public static function parse_url($url)
{
$iri = new SimplePie_IRI($url);
@@ -2161,36 +2178,12 @@ function embed_wmedia(width, height, link) {
/**
* Get the SimplePie build timestamp
*
- * Uses the git index if it exists, otherwise uses the modification time
- * of the newest file.
+ * Return SimplePie.php modification time.
*/
public static function get_build()
{
- $root = dirname(dirname(__FILE__));
- if (file_exists($root . '/.git/index'))
- {
- return filemtime($root . '/.git/index');
- }
- elseif (file_exists($root . '/SimplePie'))
- {
- $time = 0;
- foreach (glob($root . '/SimplePie/*.php') as $file)
- {
- if (($mtime = filemtime($file)) > $time)
- {
- $time = $mtime;
- }
- }
- return $time;
- }
- elseif (file_exists(dirname(__FILE__) . '/Core.php'))
- {
- return filemtime(dirname(__FILE__) . '/Core.php');
- }
- else
- {
- return filemtime(__FILE__);
- }
+ $mtime = @filemtime(dirname(dirname(__FILE__)) . '/SimplePie.php'); //FreshRSS
+ return $mtime ? $mtime : filemtime(__FILE__);
}
/**
diff --git a/lib/SimplePie/SimplePie/Net/IPv6.php b/lib/SimplePie/SimplePie/Net/IPv6.php
index da80d8aca..2ff1afc90 100644
--- a/lib/SimplePie/SimplePie/Net/IPv6.php
+++ b/lib/SimplePie/SimplePie/Net/IPv6.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Parse/Date.php b/lib/SimplePie/SimplePie/Parse/Date.php
index d51f500d3..ef800f125 100644
--- a/lib/SimplePie/SimplePie/Parse/Date.php
+++ b/lib/SimplePie/SimplePie/Parse/Date.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Parser.php b/lib/SimplePie/SimplePie/Parser.php
index bd6c4efd8..9300b4ba9 100644
--- a/lib/SimplePie/SimplePie/Parser.php
+++ b/lib/SimplePie/SimplePie/Parser.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -145,10 +145,15 @@ class SimplePie_Parser
$dom->loadXML($data);
$this->encoding = $encoding = $dom->encoding = 'UTF-8';
$data2 = $dom->saveXML();
+ if (function_exists('mb_convert_encoding'))
+ {
+ $data2 = mb_convert_encoding($data2, 'UTF-8', 'UTF-8');
+ }
if (strlen($data2) > (strlen($data) / 2.0))
{
$data = $data2;
}
+ unset($data2);
}
catch (Exception $e)
{
diff --git a/lib/SimplePie/SimplePie/Rating.php b/lib/SimplePie/SimplePie/Rating.php
index 8689e5dfb..b5fe80516 100644
--- a/lib/SimplePie/SimplePie/Rating.php
+++ b/lib/SimplePie/SimplePie/Rating.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Registry.php b/lib/SimplePie/SimplePie/Registry.php
index 1072cdebb..bd9c1f535 100755
--- a/lib/SimplePie/SimplePie/Registry.php
+++ b/lib/SimplePie/SimplePie/Registry.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Restriction.php b/lib/SimplePie/SimplePie/Restriction.php
index 4ba371bfb..a1d59916d 100644
--- a/lib/SimplePie/SimplePie/Restriction.php
+++ b/lib/SimplePie/SimplePie/Restriction.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/Sanitize.php b/lib/SimplePie/SimplePie/Sanitize.php
index 0974c150d..168a5e2e8 100644
--- a/lib/SimplePie/SimplePie/Sanitize.php
+++ b/lib/SimplePie/SimplePie/Sanitize.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -267,6 +267,10 @@ class SimplePie_Sanitize
if ($type & (SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML))
{
+ if (!class_exists('DOMDocument'))
+ {
+ throw new SimplePie_Exception('DOMDocument not found, unable to use sanitizer');
+ }
$document = new DOMDocument();
$document->encoding = 'UTF-8';
$data = $this->preprocess($data, $type);
@@ -339,7 +343,7 @@ class SimplePie_Sanitize
}
else
{
- $file = $this->registry->create('File', array($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen));
+ $file = $this->registry->create('File', array($img->getAttribute('src'), $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen));
$headers = $file->headers;
if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))
diff --git a/lib/SimplePie/SimplePie/Source.php b/lib/SimplePie/SimplePie/Source.php
index 51d8e6c25..2613798fd 100644
--- a/lib/SimplePie/SimplePie/Source.php
+++ b/lib/SimplePie/SimplePie/Source.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/XML/Declaration/Parser.php b/lib/SimplePie/SimplePie/XML/Declaration/Parser.php
index aec19f10a..589e452a2 100644
--- a/lib/SimplePie/SimplePie/XML/Declaration/Parser.php
+++ b/lib/SimplePie/SimplePie/XML/Declaration/Parser.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/SimplePie/SimplePie/gzdecode.php b/lib/SimplePie/SimplePie/gzdecode.php
index 52e024ea9..6e65f0811 100644
--- a/lib/SimplePie/SimplePie/gzdecode.php
+++ b/lib/SimplePie/SimplePie/gzdecode.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
+ * @version 1.4-dev
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
diff --git a/lib/lib_date.php b/lib/lib_date.php
new file mode 100644
index 000000000..9533711e3
--- /dev/null
+++ b/lib/lib_date.php
@@ -0,0 +1,131 @@
+<?php
+/**
+ * Author: Alexandre Alapetite http://alexandre.alapetite.fr
+ * 2014-06-01
+ * License: GNU AGPLv3 http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Parser of ISO 8601 time intervals http://en.wikipedia.org/wiki/ISO_8601#Time_intervals
+ * Examples: "2014-02/2014-04", "2014-02/04", "2014-06", "P1M"
+ */
+
+/*
+example('2014-03');
+example('201403');
+example('2014-03-30');
+example('2014-05-30T13');
+example('2014-05-30T13:30');
+example('2014-02/2014-04');
+example('2014-02--2014-04');
+example('2014-02/04');
+example('2014-02-03/05');
+example('2014-02-03T22:00/22:15');
+example('2014-02-03T22:00/15');
+example('2014-03/');
+example('/2014-03');
+example('2014-03/P1W');
+example('P1W/2014-05-25T23:59:59');
+example('P1Y/');
+example('P1Y');
+example('P2M/');
+example('P3W/');
+example('P4D/');
+example('PT5H/');
+example('PT6M/');
+example('PT7S/');
+example('P1DT1H/');
+
+function example($dateInterval) {
+ $dateIntervalArray = parseDateInterval($dateInterval);
+ echo $dateInterval, "\t=>\t",
+ $dateIntervalArray[0] == null ? 'null' : @date('c', $dateIntervalArray[0]), '/',
+ $dateIntervalArray[1] == null ? 'null' : @date('c', $dateIntervalArray[1]), "\n";
+}
+*/
+
+function _dateFloor($isoDate) {
+ $x = explode('T', $isoDate, 2);
+ $t = isset($x[1]) ? str_pad($x[1], 6, '0') : '000000';
+ return str_pad($x[0], 8, '01') . 'T' . $t;
+}
+
+function _dateCeiling($isoDate) {
+ $x = explode('T', $isoDate, 2);
+ $t = isset($x[1]) && strlen($x[1]) > 1 ? str_pad($x[1], 6, '59') : '235959';
+ switch (strlen($x[0])) {
+ case 4:
+ return $x[0] . '1231T' . $t;
+ case 6:
+ $d = @strtotime($x[0] . '01');
+ return $x[0] . date('t', $d) . 'T' . $t;
+ default:
+ return $x[0] . 'T' . $t;
+ }
+}
+
+function _noDelimit($isoDate) {
+ return $isoDate === null || $isoDate === '' ? null :
+ str_replace(array('-', ':'), '', $isoDate); //FIXME: Bug with negative time zone
+}
+
+function _dateRelative($d1, $d2) {
+ if ($d2 === null) {
+ return $d1 !== null && $d1[0] !== 'P' ? $d1 : null;
+ } elseif ($d2 !== '' && $d2[0] != 'P' && $d1 !== null && $d1[0] !== 'P') {
+ $y2 = substr($d2, 0, 4);
+ if (strlen($y2) < 4 || !ctype_digit($y2)) { //Does not start by a year
+ $d2 = _noDelimit($d2);
+ return substr($d1, 0, -strlen($d2)) . $d2; //Add prefix from $d1
+ }
+ }
+ return _noDelimit($d2);
+}
+
+/**
+ * Parameter $dateInterval is a string containing an ISO 8601 time interval.
+ * Returns an array with the minimum and maximum Unix timestamp of this interval,
+ * or null if open interval, or false if error.
+ */
+function parseDateInterval($dateInterval) {
+ $dateInterval = trim($dateInterval);
+ $dateInterval = str_replace('--', '/', $dateInterval);
+ $dateInterval = strtoupper($dateInterval);
+ $min = null;
+ $max = null;
+ $x = explode('/', $dateInterval, 2);
+ $d1 = _noDelimit($x[0]);
+ $d2 = _dateRelative($d1, count($x) > 1 ? $x[1] : null);
+ if ($d1 !== null && $d1[0] !== 'P') {
+ $min = @strtotime(_dateFloor($d1));
+ }
+ if ($d2 !== null) {
+ if ($d2[0] === 'P') {
+ try {
+ $di2 = new DateInterval($d2);
+ $dt1 = @date_create(); //new DateTime() would create an Exception if the default time zone is not defined
+ if ($min !== null && $min !== false) {
+ $dt1->setTimestamp($min);
+ }
+ $max = $dt1->add($di2)->getTimestamp() - 1;
+ } catch (Exception $e) {
+ $max = false;
+ }
+ } elseif ($d1 === null || $d1[0] !== 'P') {
+ $max = @strtotime(_dateCeiling($d2));
+ } else {
+ $max = @strtotime($d2);
+ }
+ }
+ if ($d1 !== null && $d1[0] === 'P') {
+ try {
+ $di1 = new DateInterval($d1);
+ $dt2 = @date_create();
+ if ($max !== null && $max !== false) {
+ $dt2->setTimestamp($max);
+ }
+ $min = $dt2->sub($di1)->getTimestamp() + 1;
+ } catch (Exception $e) {
+ $min = false;
+ }
+ }
+ return array($min, $max);
+}
diff --git a/lib/lib_opml.php b/lib/lib_opml.php
index 1b5517d7f..16a9921ea 100644
--- a/lib/lib_opml.php
+++ b/lib/lib_opml.php
@@ -1,23 +1,86 @@
<?php
-function opml_export ($cats) {
- $txt = '';
- foreach ($cats as $cat) {
- $txt .= '<outline text="' . $cat['name'] . '">' . "\n";
-
- foreach ($cat['feeds'] as $feed) {
- $txt .= "\t" . '<outline text="' . $feed->name () . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" description="' . htmlspecialchars($feed->description(), ENT_COMPAT, 'UTF-8') . '" />' . "\n";
+/* *
+ * lib_opml is a free library to manage OPML format in PHP.
+ * It takes in consideration only version 2.0 (http://dev.opml.org/spec2.html).
+ * Basically it means "text" attribute for outline elements is required.
+ *
+ * lib_opml requires SimpleXML (http://php.net/manual/en/book.simplexml.php)
+ *
+ * Usages:
+ * > include('lib_opml.php');
+ * > $filename = 'my_opml_file.xml';
+ * > $opml_array = libopml_parse_file($filename);
+ * > print_r($opml_array);
+ *
+ * > $opml_string = [...];
+ * > $opml_array = libopml_parse_string($opml_string);
+ * > print_r($opml_array);
+ *
+ * > $opml_array = [...];
+ * > $opml_string = libopml_render($opml_array);
+ * > $opml_object = libopml_render($opml_array, true);
+ * > echo $opml_string;
+ * > print_r($opml_object);
+ *
+ * If parsing fails for any reason (e.g. not an XML string, does not match with
+ * the specifications), a LibOPML_Exception is raised.
+ *
+ * Author: Marien Fressinaud <dev@marienfressinaud.fr>
+ * Url: https://github.com/marienfressinaud/lib_opml
+ * Version: 0.1
+ * Date: 2014-03-29
+ * License: public domain
+ *
+ * */
+
+class LibOPML_Exception extends Exception {}
+
+
+// These elements are optional
+define('HEAD_ELEMENTS', serialize(array(
+ 'title', 'dateCreated', 'dateModified', 'ownerName', 'ownerEmail',
+ 'ownerId', 'docs', 'expansionState', 'vertScrollState', 'windowTop',
+ 'windowLeft', 'windowBottom', 'windowRight'
+)));
+
+
+function libopml_parse_outline($outline_xml) {
+ $outline = array();
+
+ // An outline may contain any kind of attributes but "text" attribute is
+ // required !
+ $text_is_present = false;
+ foreach ($outline_xml->attributes() as $key => $value) {
+ $outline[$key] = (string)$value;
+
+ if ($key === 'text') {
+ $text_is_present = true;
}
+ }
- $txt .= '</outline>' . "\n";
+ if (!$text_is_present) {
+ throw new LibOPML_Exception(
+ 'Outline does not contain any text attribute'
+ );
}
- return $txt;
+ foreach ($outline_xml->children() as $key => $value) {
+ // An outline may contain any number of outline children
+ if ($key === 'outline') {
+ $outline['@outlines'][] = libopml_parse_outline($value);
+ } else {
+ throw new LibOPML_Exception(
+ 'Body can contain only outline elements'
+ );
+ }
+ }
+
+ return $outline;
}
-function opml_import ($xml) {
- $xml = html_only_entity_decode($xml); //!\ Assume UTF-8
+function libopml_parse_string($xml) {
$dom = new DOMDocument();
$dom->recover = true;
$dom->strictErrorChecking = false;
@@ -27,95 +90,142 @@ function opml_import ($xml) {
$opml = simplexml_import_dom($dom);
if (!$opml) {
- throw new FreshRSS_Opml_Exception ();
+ throw new LibOPML_Exception();
}
- $catDAO = new FreshRSS_CategoryDAO();
- $catDAO->checkDefault();
- $defCat = $catDAO->getDefault();
+ $array = array(
+ 'version' => (string)$opml['version'],
+ 'head' => array(),
+ 'body' => array()
+ );
+
+ // First, we get all "head" elements. Head is required but its sub-elements
+ // are optional.
+ foreach ($opml->head->children() as $key => $value) {
+ if (in_array($key, unserialize(HEAD_ELEMENTS), true)) {
+ $array['head'][$key] = (string)$value;
+ } else {
+ throw new LibOPML_Exception(
+ $key . 'is not part of OPML format'
+ );
+ }
+ }
- $categories = array ();
- $feeds = array ();
+ // Then, we get body oulines. Body must contain at least one outline
+ // element.
+ $at_least_one_outline = false;
+ foreach ($opml->body->children() as $key => $value) {
+ if ($key === 'outline') {
+ $at_least_one_outline = true;
+ $array['body'][] = libopml_parse_outline($value);
+ } else {
+ throw new LibOPML_Exception(
+ 'Body can contain only outline elements'
+ );
+ }
+ }
+
+ if (!$at_least_one_outline) {
+ throw new LibOPML_Exception(
+ 'Body must contain at least one outline element'
+ );
+ }
- foreach ($opml->body->outline as $outline) {
- if (!isset ($outline['xmlUrl'])) {
- // Catégorie
- $title = '';
+ return $array;
+}
- if (isset ($outline['text'])) {
- $title = (string) $outline['text'];
- } elseif (isset ($outline['title'])) {
- $title = (string) $outline['title'];
- }
- if ($title) {
- // Permet d'éviter les soucis au niveau des id :
- // ceux-ci sont générés en fonction de la date,
- // un flux pourrait être dans une catégorie X avec l'id Y
- // alors qu'il existe déjà la catégorie X mais avec l'id Z
- // Y ne sera pas ajouté et le flux non plus vu que l'id
- // de sa catégorie n'exisera pas
- $title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8');
- $catDAO = new FreshRSS_CategoryDAO ();
- $cat = $catDAO->searchByName ($title);
- if ($cat === false) {
- $cat = new FreshRSS_Category ($title);
- $values = array (
- 'name' => $cat->name (),
- 'color' => $cat->color ()
- );
- $cat->_id ($catDAO->addCategory ($values));
- }
-
- $feeds = array_merge ($feeds, getFeedsOutline ($outline, $cat->id ()));
+function libopml_parse_file($filename) {
+ $file_content = file_get_contents($filename);
+
+ if ($file_content === false) {
+ throw new LibOPML_Exception(
+ $filename . ' cannot be found'
+ );
+ }
+
+ return libopml_parse_string($file_content);
+}
+
+
+function libopml_render_outline($parent_elt, $outline) {
+ // Outline MUST be an array!
+ if (!is_array($outline)) {
+ throw new LibOPML_Exception(
+ 'Outline element must be defined as array'
+ );
+ }
+
+ $outline_elt = $parent_elt->addChild('outline');
+ $text_is_present = false;
+ foreach ($outline as $key => $value) {
+ // Only outlines can be an array and so we consider children are also
+ // outline elements.
+ if ($key === '@outlines' && is_array($value)) {
+ foreach ($value as $outline_child) {
+ libopml_render_outline($outline_elt, $outline_child);
}
+ } elseif (is_array($value)) {
+ throw new LibOPML_Exception(
+ 'Type of outline elements cannot be array: ' . $key
+ );
} else {
- // Flux rss sans catégorie, on récupère l'ajoute dans la catégorie par défaut
- $feeds[] = getFeed ($outline, $defCat->id());
+ // Detect text attribute is present, that's good :)
+ if ($key === 'text') {
+ $text_is_present = true;
+ }
+
+ $outline_elt->addAttribute($key, $value);
}
}
- return array ($categories, $feeds);
+ if (!$text_is_present) {
+ throw new LibOPML_Exception(
+ 'You must define at least a text element for all outlines'
+ );
+ }
}
-/**
- * import all feeds of a given outline tag
- */
-function getFeedsOutline ($outline, $cat_id) {
- $feeds = array ();
- foreach ($outline->children () as $child) {
- if (isset ($child['xmlUrl'])) {
- $feeds[] = getFeed ($child, $cat_id);
- } else {
- $feeds = array_merge(
- $feeds,
- getFeedsOutline ($child, $cat_id)
- );
+function libopml_render($array, $as_xml_object = false) {
+ $opml = new SimpleXMLElement('<opml version="2.0"></opml>');
+
+ // Create head element. $array['head'] is optional but head element will
+ // exist in the final XML object.
+ $head = $opml->addChild('head');
+ if (isset($array['head'])) {
+ foreach ($array['head'] as $key => $value) {
+ if (in_array($key, unserialize(HEAD_ELEMENTS), true)) {
+ $head->addChild($key, $value);
+ }
}
}
- return $feeds;
-}
+ // Check body is set and contains at least one element
+ if (!isset($array['body'])) {
+ throw new LibOPML_Exception(
+ '$array must contain a body element'
+ );
+ }
+ if (count($array['body']) <= 0) {
+ throw new LibOPML_Exception(
+ 'Body element must contain at least one element (array)'
+ );
+ }
-function getFeed ($outline, $cat_id) {
- $url = (string) $outline['xmlUrl'];
- $url = htmlspecialchars($url, ENT_COMPAT, 'UTF-8');
- $title = '';
- if (isset ($outline['text'])) {
- $title = (string) $outline['text'];
- } elseif (isset ($outline['title'])) {
- $title = (string) $outline['title'];
- }
- $title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8');
- $feed = new FreshRSS_Feed ($url);
- $feed->_category ($cat_id);
- $feed->_name ($title);
- if (isset($outline['htmlUrl'])) {
- $feed->_website(htmlspecialchars((string)$outline['htmlUrl'], ENT_COMPAT, 'UTF-8'));
- }
- if (isset($outline['description'])) {
- $feed->_description(sanitizeHTML((string)$outline['description']));
- }
- return $feed;
+ // Create outline elements
+ $body = $opml->addChild('body');
+ foreach ($array['body'] as $outline) {
+ libopml_render_outline($body, $outline);
+ }
+
+ // And return the final result
+ if ($as_xml_object) {
+ return $opml;
+ } else {
+ $dom = dom_import_simplexml($opml)->ownerDocument;
+ $dom->formatOutput = true;
+ $dom->encoding = 'UTF-8';
+ return $dom->saveXML();
+ }
}
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 1bb117ab6..0f8161129 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -27,7 +27,7 @@ function classAutoloader($class) {
include(APP_PATH . '/Models/' . $components[1] . '.php');
return;
case 3: //Controllers, Exceptions
- include(APP_PATH . '/' . $components[2] . 's/' . $components[1] . $components[2] . '.php');
+ @include(APP_PATH . '/' . $components[2] . 's/' . $components[1] . $components[2] . '.php');
return;
}
} elseif (strpos($class, 'Minz') === 0) {
@@ -214,12 +214,12 @@ function uSecString() {
}
function invalidateHttpCache() {
- touch(LOG_PATH . '/' . Minz_Session::param('currentUser', '_') . '.log');
Minz_Session::_param('touch', uTimeString());
+ return touch(LOG_PATH . '/' . Minz_Session::param('currentUser', '_') . '.log');
}
function usernameFromPath($userPath) {
- if (preg_match('%/([a-z0-9]{1,16})_user\.php$%', $userPath, $matches)) {
+ if (preg_match('%/([A-Za-z0-9]{1,16})_user\.php$%', $userPath, $matches)) {
return $matches[1];
} else {
return '';
@@ -233,3 +233,18 @@ function listUsers() {
function httpAuthUser() {
return isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : '';
}
+
+function cryptAvailable() {
+ if (version_compare(PHP_VERSION, '5.3.3', '>=')) {
+ try {
+ $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
+ return $hash === @crypt('password', $hash);
+ } catch (Exception $e) {
+ }
+ }
+ return false;
+}
+
+function html_chars_utf8($str) {
+ return htmlspecialchars($str, ENT_COMPAT, 'UTF-8');
+}
diff --git a/p/api/.htaccess b/p/api/.htaccess
new file mode 100644
index 000000000..41b653d96
--- /dev/null
+++ b/p/api/.htaccess
@@ -0,0 +1,4 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+</IfModule>
diff --git a/p/api/greader.php b/p/api/greader.php
new file mode 100644
index 000000000..8a8623966
--- /dev/null
+++ b/p/api/greader.php
@@ -0,0 +1,646 @@
+<?php
+/**
+== Description ==
+Server-side API compatible with Google Reader API layer 2
+ for the FreshRSS project http://freshrss.org
+
+== Credits ==
+* 2014-03: Released by Alexandre Alapetite http://alexandre.alapetite.fr
+ under GNU AGPL 3 license http://www.gnu.org/licenses/agpl-3.0.html
+
+== Documentation ==
+* http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
+* http://web.archive.org/web/20130718025427/http://undoc.in/
+* http://ranchero.com/downloads/GoogleReaderAPI-2009.pdf
+* http://code.google.com/p/google-reader-api/w/list
+* http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/
+* https://github.com/noinnion/newsplus/blob/master/extensions/GoogleReaderCloneExtension/src/com/noinnion/android/newsplus/extension/google_reader/GoogleReaderClient.java
+* https://github.com/ericmann/gReader-Library/blob/master/greader.class.php
+* https://github.com/devongovett/reader
+* https://github.com/theoldreader/api
+*/
+
+require('../../constants.php');
+require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
+
+$ORIGINAL_INPUT = file_get_contents('php://input');
+
+if (PHP_INT_SIZE < 8) { //32-bit
+ function dec2hex($dec) {
+ return str_pad(gmp_strval(gmp_init($dec, 10), 16), 16, '0', STR_PAD_LEFT);
+ }
+ function hex2dec($hex) {
+ return gmp_strval(gmp_init($hex, 16), 10);
+ }
+} else { //64-bit
+ function dec2hex($dec) { //http://code.google.com/p/google-reader-api/wiki/ItemId
+ return str_pad(dechex($dec), 16, '0', STR_PAD_LEFT);
+ }
+ function hex2dec($hex) {
+ return hexdec($hex);
+ }
+}
+
+function headerVariable($headerName, $varName) {
+ $header = '';
+ $upName = 'HTTP_' . strtoupper($headerName);
+ if (isset($_SERVER[$upName])) {
+ $header = $_SERVER[$upName];
+ } elseif (function_exists('getallheaders')) {
+ $ALL_HEADERS = getallheaders();
+ if (isset($ALL_HEADERS[$headerName])) {
+ $header = $ALL_HEADERS[$headerName];
+ }
+ }
+ parse_str($header, $pairs);
+ return isset($pairs[$varName]) ? $pairs[$varName] : null;
+}
+
+function multiplePosts($name) { //https://bugs.php.net/bug.php?id=51633
+ global $ORIGINAL_INPUT;
+ $inputs = explode('&', $ORIGINAL_INPUT);
+ $result = array();
+ $prefix = $name . '=';
+ $prefixLength = strlen($prefix);
+ foreach ($inputs as $input) {
+ if (strpos($input, $prefix) === 0) {
+ $result[] = urldecode(substr($input, $prefixLength));
+ }
+ }
+ return $result;
+}
+
+class MyPDO extends Minz_ModelPdo {
+ function prepare($sql) {
+ return $this->bd->prepare(str_replace('%_', $this->prefix, $sql));
+ }
+}
+
+function logMe($text) {
+ file_put_contents(LOG_PATH . '/api.log', $text, FILE_APPEND);
+}
+
+function debugInfo() {
+ if (function_exists('getallheaders')) {
+ $ALL_HEADERS = getallheaders();
+ } else { //nginx http://php.net/getallheaders#84262
+ $ALL_HEADERS = '';
+ foreach ($_SERVER as $name => $value) {
+ if (substr($name, 0, 5) === 'HTTP_') {
+ $ALL_HEADERS[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
+ }
+ }
+ }
+ global $ORIGINAL_INPUT;
+ return print_r(array('date' => date('c'), 'headers' => $ALL_HEADERS, '_SERVER' => $_SERVER, '_GET' => $_GET, '_POST' => $_POST, '_COOKIE' => $_COOKIE, 'INPUT' => $ORIGINAL_INPUT), true);
+}
+
+function badRequest() {
+ logMe("badRequest()\n");
+ logMe(debugInfo());
+ header('HTTP/1.1 400 Bad Request');
+ header('Content-Type: text/plain; charset=UTF-8');
+ die('Bad Request!');
+}
+
+function unauthorized() {
+ logMe("unauthorized()\n");
+ logMe(debugInfo());
+ header('HTTP/1.1 401 Unauthorized');
+ header('Content-Type: text/plain; charset=UTF-8');
+ header('Google-Bad-Token: true');
+ die('Unauthorized!');
+}
+
+function notImplemented() {
+ logMe("notImplemented()\n");
+ logMe(debugInfo());
+ header('HTTP/1.1 501 Not Implemented');
+ header('Content-Type: text/plain; charset=UTF-8');
+ die('Not Implemented!');
+}
+
+function serviceUnavailable() {
+ logMe("serviceUnavailable()\n");
+ header('HTTP/1.1 503 Service Unavailable');
+ header('Content-Type: text/plain; charset=UTF-8');
+ die('Service Unavailable!');
+}
+
+function checkCompatibility() {
+ logMe("checkCompatibility()\n");
+ header('Content-Type: text/plain; charset=UTF-8');
+ if (PHP_INT_SIZE < 8 && !function_exists('gmp_init')) {
+ die('FAIL 64-bit or GMP extension!');
+ }
+ if ((!array_key_exists('HTTP_AUTHORIZATION', $_SERVER)) && //Apache mod_rewrite trick should be fine
+ (empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') === false)) && //nginx should be fine
+ ((!function_exists('getallheaders')) || (stripos(php_sapi_name(), 'cgi') !== false))) { //Main problem is Apache/CGI mode
+ die('FAIL getallheaders! (probably)');
+ }
+ echo 'PASS';
+ exit();
+}
+
+function authorizationToUserConf() {
+ $headerAuth = headerVariable('Authorization', 'GoogleLogin_auth'); //Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external
+ if ($headerAuth != '') {
+ $headerAuthX = explode('/', $headerAuth, 2);
+ if (count($headerAuthX) === 2) {
+ $user = $headerAuthX[0];
+ if (ctype_alnum($user)) {
+ try {
+ $conf = new FreshRSS_Configuration($user);
+ } catch (Exception $e) {
+ logMe($e->getMessage() . "\n");
+ unauthorized();
+ }
+ if ($headerAuthX[1] === sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash)) {
+ return $conf;
+ } else {
+ logMe('Invalid API authorisation for user ' . $user . ': ' . $headerAuthX[1] . "\n");
+ Minz_Log::record('Invalid API authorisation for user ' . $user . ': ' . $headerAuthX[1], Minz_Log::WARNING);
+ unauthorized();
+ }
+ } else {
+ badRequest();
+ }
+ }
+ }
+ return null;
+}
+
+function clientLogin($email, $pass) { //http://web.archive.org/web/20130604091042/http://undoc.in/clientLogin.html
+ logMe('clientLogin(' . $email . ")\n");
+ if (ctype_alnum($email)) {
+ if (!function_exists('password_verify')) {
+ include_once(LIB_PATH . '/password_compat.php');
+ }
+ try {
+ $conf = new FreshRSS_Configuration($email);
+ } catch (Exception $e) {
+ logMe($e->getMessage() . "\n");
+ Minz_Log::record('Invalid API user ' . $email, Minz_Log::WARNING);
+ unauthorized();
+ }
+ if ($conf->apiPasswordHash != '' && password_verify($pass, $conf->apiPasswordHash)) {
+ header('Content-Type: text/plain; charset=UTF-8');
+ $auth = $email . '/' . sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash);
+ echo 'SID=', $auth, "\n",
+ 'Auth=', $auth, "\n";
+ exit();
+ } else {
+ Minz_Log::record('Password API mismatch for user ' . $email, Minz_Log::WARNING);
+ unauthorized();
+ }
+ } else {
+ badRequest();
+ }
+ die();
+}
+
+function token($conf) {
+//http://blog.martindoms.com/2009/08/15/using-the-google-reader-api-part-1/
+//https://github.com/ericmann/gReader-Library/blob/master/greader.class.php
+ logMe('token('. $conf->user . ")\n"); //TODO: Implement real token that expires
+ $token = str_pad(sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash), 57, 'Z'); //Must have 57 characters
+ echo $token, "\n";
+ exit();
+}
+
+function checkToken($conf, $token) {
+//http://code.google.com/p/google-reader-api/wiki/ActionToken
+ logMe('checkToken(' . $token . ")\n");
+ if ($token === str_pad(sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash), 57, 'Z')) {
+ return true;
+ }
+ unauthorized();
+}
+
+function tagList() {
+ logMe("tagList()\n");
+ header('Content-Type: application/json; charset=UTF-8');
+
+ $pdo = new MyPDO();
+ $stm = $pdo->prepare('SELECT c.name FROM `%_category` c');
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
+
+ $tags = array(
+ array('id' => 'user/-/state/com.google/starred'),
+ //array('id' => 'user/-/state/com.google/broadcast', 'sortid' => '2'),
+ );
+
+ foreach ($res as $cName) {
+ $tags[] = array(
+ 'id' => 'user/-/label/' . $cName,
+ //'sortid' => $cName,
+ );
+ }
+
+ echo json_encode(array('tags' => $tags)), "\n";
+ exit();
+}
+
+function subscriptionList() {
+ logMe("subscriptionList()\n");
+ header('Content-Type: application/json; charset=UTF-8');
+
+ $pdo = new MyPDO();
+ $stm = $pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `%_feed` f
+ INNER JOIN `%_category` c ON c.id = f.category');
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+
+ $subscriptions = array();
+
+ foreach ($res as $line) {
+ $subscriptions[] = array(
+ 'id' => 'feed/' . $line['id'],
+ 'title' => $line['name'],
+ 'categories' => array(
+ array(
+ 'id' => 'user/-/label/' . $line['c_name'],
+ 'label' => $line['c_name'],
+ ),
+ ),
+ //'sortid' => $line['name'],
+ //'firstitemmsec' => 0,
+ 'url' => $line['url'],
+ 'htmlUrl' => $line['website'],
+ //'iconUrl' => '',
+ );
+ }
+
+ echo json_encode(array('subscriptions' => $subscriptions)), "\n";
+ exit();
+}
+
+function unreadCount() { //http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#unread-count
+ logMe("unreadCount()\n");
+ header('Content-Type: application/json; charset=UTF-8');
+
+ $totalUnreads = 0;
+ $totalLastUpdate = 0;
+
+ $categoryDAO = new FreshRSS_CategoryDAO();
+ foreach ($categoryDAO->listCategories(true, true) as $cat) {
+ $catLastUpdate = 0;
+ foreach ($cat->feeds() as $feed) {
+ $lastUpdate = $feed->lastUpdate();
+ $unreadcounts[] = array(
+ 'id' => 'feed/' . $feed->id(),
+ 'count' => $feed->nbNotRead(),
+ 'newestItemTimestampUsec' => $lastUpdate . '000000',
+ );
+ if ($catLastUpdate < $lastUpdate) {
+ $catLastUpdate = $lastUpdate;
+ }
+ }
+ $unreadcounts[] = array(
+ 'id' => 'user/-/label/' . $cat->name(),
+ 'count' => $cat->nbNotRead(),
+ 'newestItemTimestampUsec' => $catLastUpdate . '000000',
+ );
+ $totalUnreads += $cat->nbNotRead();
+ if ($totalLastUpdate < $catLastUpdate) {
+ $totalLastUpdate = $catLastUpdate;
+ }
+ }
+
+ $unreadcounts[] = array(
+ 'id' => 'user/-/state/com.google/reading-list',
+ 'count' => $totalUnreads,
+ 'newestItemTimestampUsec' => $totalLastUpdate . '000000',
+ );
+
+ echo json_encode(array(
+ 'max' => $totalUnreads,
+ 'unreadcounts' => $unreadcounts,
+ )), "\n";
+ exit();
+}
+
+function streamContents($path, $include_target, $start_time, $count, $order, $exclude_target, $continuation) {
+//http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
+//http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed
+ logMe("streamContents($path, $include_target, $start_time, $count, $order, $exclude_target, $continuation)\n");
+ header('Content-Type: application/json; charset=UTF-8');
+
+ $feedDAO = new FreshRSS_FeedDAO();
+ $arrayFeedCategoryNames = $feedDAO->arrayFeedCategoryNames();
+
+ switch ($path) {
+ case 'reading-list':
+ $type = 'A';
+ break;
+ case 'starred':
+ $type = 's';
+ break;
+ case 'feed':
+ $type = 'f';
+ break;
+ case 'label':
+ $type = 'c';
+ $categoryDAO = new FreshRSS_CategoryDAO();
+ $cat = $categoryDAO->searchByName($include_target);
+ $include_target = $cat == null ? -1 : $cat->id();
+ break;
+ default:
+ $type = 'A';
+ break;
+ }
+
+ switch ($exclude_target) {
+ case 'user/-/state/com.google/read':
+ $state = FreshRSS_Entry::STATE_NOT_READ;
+ break;
+ default:
+ $state = FreshRSS_Entry::STATE_ALL;
+ break;
+ }
+
+ if (!empty($continuation)) {
+ $count++; //Shift by one element
+ }
+
+ $entryDAO = new FreshRSS_EntryDAO();
+ $entries = $entryDAO->listWhere($type, $include_target, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, '', $start_time);
+
+ $items = array();
+ foreach ($entries as $entry) {
+ $f_id = $entry->feed();
+ if (isset($arrayFeedCategoryNames[$f_id])) {
+ $c_name = $arrayFeedCategoryNames[$f_id]['c_name'];
+ $f_name = $arrayFeedCategoryNames[$f_id]['name'];
+ } else {
+ $c_name = '_';
+ $f_name = '_';
+ }
+ $item = array(
+ 'id' => /*'tag:google.com,2005:reader/item/' .*/ dec2hex($entry->id()), //64-bit hexa http://code.google.com/p/google-reader-api/wiki/ItemId
+ 'crawlTimeMsec' => substr($entry->id(), 0, -3),
+ 'timestampUsec' => $entry->id(), //EasyRSS
+ 'published' => $entry->date(true),
+ 'title' => $entry->title(),
+ 'summary' => array('content' => $entry->content()),
+ 'alternate' => array(
+ array('href' => $entry->link()),
+ ),
+ 'categories' => array(
+ 'user/-/state/com.google/reading-list',
+ 'user/-/label/' . $c_name,
+ ),
+ 'origin' => array(
+ 'streamId' => 'feed/' . $f_id,
+ 'title' => $f_name, //EasyRSS
+ //'htmlUrl' => $line['f_website'],
+ ),
+ );
+ if ($entry->author() != '') {
+ $item['author'] = $entry->author();
+ }
+ if ($entry->isRead()) {
+ $item['categories'][] = 'user/-/state/com.google/read';
+ }
+ if ($entry->isFavorite()) {
+ $item['categories'][] = 'user/-/state/com.google/starred';
+ }
+ $items[] = $item;
+ }
+
+ if (!empty($continuation)) {
+ array_shift($items); //Discard first element that was already sent in the previous response
+ }
+
+ $response = array(
+ 'id' => 'user/-/state/com.google/reading-list',
+ 'updated' => time(),
+ 'items' => $items,
+ );
+ if ((count($entries) >= $count) && (!empty($entry))) {
+ $response['continuation'] = $entry->id();
+ }
+
+ echo json_encode($response), "\n";
+ exit();
+}
+
+function streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude_target) {
+//http://code.google.com/p/google-reader-api/wiki/ApiStreamItemsIds
+//http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
+//http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed
+ logMe("streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude_target)\n");
+
+ $type = 'A';
+ $id = '';
+ if ($streamId === 'user/-/state/com.google/reading-list') {
+ $type = 'A';
+ } elseif ('user/-/state/com.google/starred') {
+ $type = 's';
+ } elseif (strpos($streamId, 'feed/') === 0) {
+ $type = 'f';
+ $id = basename($streamId);
+ } elseif (strpos($streamId, 'user/-/label/') === 0) {
+ $type = 'c';
+ $c_name = basename($streamId);
+ $categoryDAO = new FreshRSS_CategoryDAO();
+ $cat = $categoryDAO->searchByName($c_name);
+ $id = $cat == null ? -1 : $cat->id();
+ }
+
+ switch ($exclude_target) {
+ case 'user/-/state/com.google/read':
+ $state = FreshRSS_Entry::STATE_NOT_READ;
+ break;
+ default:
+ $state = FreshRSS_Entry::STATE_ALL;
+ break;
+ }
+
+ $entryDAO = new FreshRSS_EntryDAO();
+ $ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, '', '', $start_time);
+
+ $itemRefs = array();
+ foreach ($ids as $id) {
+ $itemRefs[] = array(
+ 'id' => $id, //64-bit decimal
+ );
+ }
+
+ echo json_encode(array(
+ 'itemRefs' => $itemRefs,
+ )), "\n";
+ exit();
+}
+
+function editTag($e_ids, $a, $r) {
+ logMe("editTag()\n");
+
+ foreach ($e_ids as $i => $e_id) {
+ $e_ids[$i] = hex2dec(basename($e_id)); //Strip prefix 'tag:google.com,2005:reader/item/'
+ }
+
+ $entryDAO = new FreshRSS_EntryDAO();
+
+ switch ($a) {
+ case 'user/-/state/com.google/read':
+ $entryDAO->markRead($e_ids, true);
+ break;
+ case 'user/-/state/com.google/starred':
+ $entryDAO->markFavorite($e_ids, true);
+ break;
+ /*case 'user/-/state/com.google/tracking-kept-unread':
+ break;
+ case 'user/-/state/com.google/like':
+ break;
+ case 'user/-/state/com.google/broadcast':
+ break;*/
+ }
+ switch ($r) {
+ case 'user/-/state/com.google/read':
+ $entryDAO->markRead($e_ids, false);
+ break;
+ case 'user/-/state/com.google/starred':
+ $entryDAO->markFavorite($e_ids, false);
+ break;
+ }
+
+ echo 'OK';
+ exit();
+}
+
+function markAllAsRead($streamId, $olderThanId) {
+ logMe("markAllAsRead($streamId, $olderThanId)\n");
+ $entryDAO = new FreshRSS_EntryDAO();
+ if (strpos($streamId, 'feed/') === 0) {
+ $f_id = basename($streamId);
+ $entryDAO->markReadFeed($f_id, $olderThanId);
+ } elseif (strpos($streamId, 'user/-/label/') === 0) {
+ $c_name = basename($streamId);
+ $entryDAO->markReadCatName($c_name, $olderThanId);
+ } elseif ($streamId === 'user/-/state/com.google/reading-list') {
+ $entryDAO->markReadEntries($olderThanId, false, -1);
+ }
+
+ echo 'OK';
+ exit();
+}
+
+logMe('----------------------------------------------------------------'."\n");
+//logMe(debugInfo());
+
+$pathInfo = empty($_SERVER['PATH_INFO']) ? '/Error' : urldecode($_SERVER['PATH_INFO']);
+$pathInfos = explode('/', $pathInfo);
+
+Minz_Configuration::init();
+
+if (!Minz_Configuration::apiEnabled()) {
+ serviceUnavailable();
+}
+
+Minz_Session::init('FreshRSS');
+
+$conf = authorizationToUserConf();
+$user = $conf == null ? '' : $conf->user;
+
+logMe('User => ' . $user . "\n");
+
+Minz_Session::_param('currentUser', $user);
+
+if (count($pathInfos) < 3) {
+ badRequest();
+}
+elseif ($pathInfos[1] === 'accounts') {
+ if (($pathInfos[2] === 'ClientLogin') && isset($_REQUEST['Email']) && isset($_REQUEST['Passwd'])) {
+ clientLogin($_REQUEST['Email'], $_REQUEST['Passwd']);
+ }
+}
+elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfos[3]) && $pathInfos[3] === '0' && isset($pathInfos[4])) {
+ if ($user == '') {
+ unauthorized();
+ }
+ $timestamp = isset($_GET['ck']) ? intval($_GET['ck']) : 0; //ck=[unix timestamp] : Use the current Unix time here, helps Google with caching.
+ switch ($pathInfos[4]) {
+ case 'stream':
+ $exclude_target = isset($_GET['xt']) ? $_GET['xt'] : ''; //xt=[exclude target] : Used to exclude certain items from the feed. For example, using xt=user/-/state/com.google/read will exclude items that the current user has marked as read, or xt=feed/[feedurl] will exclude items from a particular feed (obviously not useful in this request, but xt appears in other listing requests).
+ $count = isset($_GET['n']) ? intval($_GET['n']) : 20; //n=[integer] : The maximum number of results to return.
+ $order = isset($_GET['r']) ? $_GET['r'] : 'd'; //r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order.
+ $start_time = isset($_GET['ot']) ? intval($_GET['ot']) : 0; //ot=[unix timestamp] : The time from which you want to retrieve items. Only items that have been crawled by Google Reader after this time will be returned.
+ $continuation = isset($_GET['c']) ? $_GET['c'] : ''; //Continuation token. If a StreamContents response does not represent all items in a timestamp range, it will have a continuation attribute. The same request can be re-issued with the value of that attribute put in this parameter to get more items
+ if (isset($pathInfos[5]) && $pathInfos[5] === 'contents' && isset($pathInfos[6])) {
+ if (isset($pathInfos[7])) {
+ if ($pathInfos[6] === 'feed') {
+ $include_target = $pathInfos[7];
+ StreamContents($pathInfos[6], $include_target, $start_time, $count, $order, $exclude_target, $continuation);
+ } elseif ($pathInfos[6] === 'user' && isset($pathInfos[8]) && isset($pathInfos[9])) {
+ if ($pathInfos[8] === 'state') {
+ if ($pathInfos[9] === 'com.google' && isset($pathInfos[10])) {
+ if ($pathInfos[10] === 'reading-list' || $pathInfos[10] === 'starred') {
+ $include_target = '';
+ streamContents($pathInfos[10], $include_target, $start_time, $count, $order, $exclude_target, $continuation);
+ }
+ }
+ } elseif ($pathInfos[8] === 'label') {
+ $include_target = $pathInfos[9];
+ streamContents($pathInfos[8], $include_target, $start_time, $count, $order, $exclude_target, $continuation);
+ }
+ }
+ } else { //EasyRSS
+ $include_target = '';
+ streamContents('reading-list', $include_target, $start_time, $count, $order, $exclude_target, $continuation);
+ }
+ } elseif ($pathInfos[5] === 'items') {
+ if ($pathInfos[6] === 'ids' && isset($_GET['s'])) {
+ $streamId = $_GET['s']; //StreamId for which to fetch the item IDs. The parameter may be repeated to fetch the item IDs from multiple streams at once (more efficient from a backend perspective than multiple requests).
+ streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude_target);
+ }
+ }
+ break;
+ case 'tag':
+ if (isset($pathInfos[5]) && $pathInfos[5] === 'list') {
+ $output = isset($_GET['output']) ? $_GET['output'] : '';
+ if ($output !== 'json') notImplemented();
+ tagList($_GET['output']);
+ }
+ break;
+ case 'subscription':
+ if (isset($pathInfos[5]) && $pathInfos[5] === 'list') {
+ $output = isset($_GET['output']) ? $_GET['output'] : '';
+ if ($output !== 'json') notImplemented();
+ subscriptionList($_GET['output']);
+ }
+ break;
+ case 'unread-count':
+ $output = isset($_GET['output']) ? $_GET['output'] : '';
+ if ($output !== 'json') notImplemented();
+ $all = isset($_GET['all']) ? $_GET['all'] : '';
+ unreadCount($all);
+ break;
+ case 'edit-tag': //http://blog.martindoms.com/2010/01/20/using-the-google-reader-api-part-3/
+ $token = isset($_POST['T']) ? trim($_POST['T']) : '';
+ checkToken($conf, $token);
+ $a = isset($_POST['a']) ? $_POST['a'] : ''; //Add: user/-/state/com.google/read user/-/state/com.google/starred
+ $r = isset($_POST['r']) ? $_POST['r'] : ''; //Remove: user/-/state/com.google/read user/-/state/com.google/starred
+ $e_ids = multiplePosts('i'); //item IDs
+ editTag($e_ids, $a, $r);
+ break;
+ case 'mark-all-as-read':
+ $token = isset($_POST['T']) ? trim($_POST['T']) : '';
+ checkToken($conf, $token);
+ $streamId = $_POST['s']; //StreamId
+ $ts = isset($_POST['ts']) ? $_POST['ts'] : '0'; //Older than timestamp in nanoseconds
+ if (!ctype_digit($ts)) {
+ $ts = '0';
+ }
+ markAllAsRead($streamId, $ts);
+ break;
+ case 'token':
+ Token($conf);
+ break;
+ }
+} elseif ($pathInfos[1] === 'check' && $pathInfos[2] === 'compatibility') {
+ checkCompatibility();
+}
+
+badRequest();
diff --git a/p/api/index.html b/p/api/index.html
new file mode 100644
index 000000000..8da0bcb58
--- /dev/null
+++ b/p/api/index.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
+<head>
+<meta charset="UTF-8" />
+<title>FreshRSS API</title>
+<meta name="robots" content="noindex" />
+<link rel="start" href="../i/" />
+</head>
+
+<body>
+<h1>FreshRSS API</h1>
+
+<h2>Google Reader compatible API</h2>
+<ul>
+<li><a href="greader.php/check%2Fcompatibility" rel="nofollow">Check full server configuration (with <code>%2F</code> support)</a></li>
+<li><a href="greader.php/check/compatibility" rel="nofollow">Check partial server configuration (without <code>%2F</code> support)</a></li>
+</ul>
+
+</body>
+</html>
diff --git a/p/i/index.php b/p/i/index.php
index 187bbabe8..4afffb3dd 100755
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -35,7 +35,7 @@ if (file_exists ('install.php')) {
@filemtime(LOG_PATH . '/' . $currentUser . '.log'),
@filemtime(DATA_PATH . '/config.php')
);
- if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
+ if (httpConditional($dateLastModification, 0, 0, false, PHP_COMPRESSION, true)) {
exit(); //No need to send anything
}
}
diff --git a/p/i/install.php b/p/i/install.php
index 8002a45da..bc9483f73 100644
--- a/p/i/install.php
+++ b/p/i/install.php
@@ -44,8 +44,8 @@ UPDATE `%1$sfeed006` f
INNER JOIN `%1$scategory006` c ON f.category = c.id
SET f.category2 = c.id2;
-INSERT IGNORE INTO `%2$scategory` (name, color)
-SELECT name, color
+INSERT IGNORE INTO `%2$scategory` (name)
+SELECT name
FROM `%1$scategory006`
ORDER BY id2;
@@ -228,13 +228,15 @@ function saveStep3 () {
$ini_array = array(
'general' => array(
'environment' => empty($_SESSION['environment']) ? 'production' : $_SESSION['environment'],
- 'use_url_rewriting' => false,
'salt' => $_SESSION['salt'],
'base_url' => '',
'title' => $_SESSION['title'],
'default_user' => $_SESSION['default_user'],
'auth_type' => $_SESSION['auth_type'],
'allow_anonymous' => isset($_SESSION['allow_anonymous']) ? $_SESSION['allow_anonymous'] : false,
+ 'allow_anonymous_refresh' => false,
+ 'unsafe_autologin_enabled' => false,
+ 'api_enabled' => false,
),
'db' => array(
'type' => $_SESSION['bd_type'],
@@ -548,8 +550,9 @@ function checkStep0 () {
'all' => $language ? 'ok' : 'ko'
);
}
+
function checkStep1 () {
- $php = version_compare (PHP_VERSION, '5.2.0') >= 0;
+ $php = version_compare (PHP_VERSION, '5.2.1') >= 0;
$minz = file_exists (LIB_PATH . '/Minz');
$curl = extension_loaded ('curl');
$pdo = extension_loaded ('pdo_mysql');
@@ -721,7 +724,7 @@ function printStep1 () {
<?php if ($res['php'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t ('ok'); ?></span> <?php echo _t ('php_is_ok', PHP_VERSION); ?></p>
<?php } else { ?>
- <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('php_is_nok', PHP_VERSION, '5.1.0'); ?></p>
+ <p class="alert alert-error"><span class="alert-head"><?php echo _t ('damn'); ?></span> <?php echo _t ('php_is_nok', PHP_VERSION, '5.2.1'); ?></p>
<?php } ?>
<?php if ($res['minz'] == 'ok') { ?>
@@ -836,7 +839,7 @@ function printStep2 () {
<?php if (!in_array($_SESSION['auth_type'], array('form', 'persona', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
- <option value="form"<?php echo $_SESSION['auth_type'] === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo _t('auth_form'); ?></option>
+ <option value="form"<?php echo $_SESSION['auth_type'] === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo _t('auth_form'); ?></option>
<option value="persona"<?php echo $_SESSION['auth_type'] === 'persona' ? ' selected="selected"' : ''; ?>><?php echo _t('auth_persona'); ?></option>
<option value="http_auth"<?php echo $_SESSION['auth_type'] === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo $_SESSION['auth_type'] === 'none' ? ' selected="selected"' : ''; ?>><?php echo _t('auth_none'); ?></option>
@@ -910,7 +913,7 @@ function printStep3 () {
<div class="form-group">
<label class="group-name" for="user"><?php echo _t ('username'); ?></label>
<div class="group-controls">
- <input type="text" id="user" name="user" maxlength="16" pattern="[0-9A-Za-z_]{1,16}" value="<?php echo isset ($_SESSION['bd_user']) ? $_SESSION['bd_user'] : ''; ?>" />
+ <input type="text" id="user" name="user" maxlength="16" pattern="[0-9A-Za-z_.-]{1,16}" value="<?php echo isset ($_SESSION['bd_user']) ? $_SESSION['bd_user'] : ''; ?>" />
</div>
</div>
@@ -954,7 +957,7 @@ function printStep4 () {
<legend><?php echo _t ('version_update'); ?></legend>
<?php if (updateDatabase(false)) { ?>
- <p class="alert"><?php echo _t ('update_long'); ?></p>
+ <p class="alert alert-warn"><?php echo _t ('update_long'); ?></p>
<div class="form-group form-actions">
<div class="group-controls">
@@ -964,7 +967,7 @@ function printStep4 () {
</div>
<?php } else { ?>
- <p class="alert"><?php echo _t ('update_end'); ?></p>
+ <p class="alert alert-warn"><?php echo _t ('update_end'); ?></p>
<div class="form-group form-actions">
<div class="group-controls">
@@ -1025,8 +1028,8 @@ case 6:
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0">
<title><?php echo _t ('freshrss_installation'); ?></title>
- <link rel="stylesheet" type="text/css" media="all" href="../themes/Origine/global.css" />
- <link rel="stylesheet" type="text/css" media="all" href="../themes/Origine/freshrss.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="../themes/Origine/template.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="../themes/Origine/origine.css" />
</head>
<body>
diff --git a/p/scripts/jquery.min.js b/p/scripts/jquery.min.js
index cbe6abe59..e5ace116b 100644
--- a/p/scripts/jquery.min.js
+++ b/p/scripts/jquery.min.js
@@ -1,4 +1,4 @@
-/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;
-while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?o.queue(this[0],a):void 0===b?this:this.each(function(){var c=o.queue(this,a,b);o._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&o.dequeue(this,a)})},dequeue:function(a){return this.each(function(){o.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=o.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===o.css(a,"display")||!o.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=m.createDocumentFragment(),b=a.appendChild(m.createElement("div"));b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||m,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[o.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new o.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=m),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return o.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=o.extend(new o.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?o.event.trigger(e,null,b):o.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},o.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},o.Event=function(a,b){return this instanceof o.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.getPreventDefault&&a.getPreventDefault()?Z:$):this.type=a,b&&o.extend(this,b),this.timeStamp=a&&a.timeStamp||o.now(),void(this[o.expando]=!0)):new o.Event(a,b)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){o.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!o.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){o.event.simulate(b,a.target,o.event.fix(a),!0)};o.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),o.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return o().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=o.guid++)),this.each(function(){o.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,o(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){o.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){o.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?o.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||o.contains(a.ownerDocument,a)||(g=o.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",e=m.documentElement,f=m.createElement("div"),g=m.createElement("div");g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",f.appendChild(g);function h(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",e.appendChild(f);var d=a.getComputedStyle(g,null);b="1%"!==d.top,c="4px"===d.width,e.removeChild(f)}a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return h(),b},boxSizingReliable:function(){return null==c&&h(),c},reliableMarginRight:function(){var b,c=g.appendChild(m.createElement("div"));return c.style.cssText=g.style.cssText=d,c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.innerHTML="",b}})}(),o.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=o.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=o.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=o.css(a,"border"+R[f]+"Width",!0,e))):(g+=o.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=o.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===o.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):f[g]||(e=S(d),(c&&"none"!==c||!e)&&L.set(d,"olddisplay",e?c:o.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}o.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=o.camelCase(b),i=a.style;return b=o.cssProps[h]||(o.cssProps[h]=Fb(i,h)),g=o.cssHooks[b]||o.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(o.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||o.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]="",i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=o.camelCase(b);return b=o.cssProps[h]||(o.cssProps[h]=Fb(a.style,h)),g=o.cssHooks[b]||o.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||o.isNumeric(f)?f||0:e):e}}),o.each(["height","width"],function(a,b){o.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&zb.test(o.css(a,"display"))?o.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===o.css(a,"boxSizing",!1,e),e):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(a,b){return b?o.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(a,b){o.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(o.cssHooks[a+b].set=Gb)}),o.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(o.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=o.css(a,b[g],!1,d);return f}return void 0!==c?o.style(a,b,c):o.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(o.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?o.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=o.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){o.fx.step[a.prop]?o.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[o.cssProps[a.prop]]||o.cssHooks[a.prop])?o.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},o.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(o.cssNumber[a]?"":"px"),g=(o.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(o.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,o.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&S(a),p=L.get(a,"fxshow");c.queue||(h=o._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,o.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=o.css(a,"display"),"none"===j&&(j=tb(a.nodeName)),"inline"===j&&"none"===o.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;n=!0}l[d]=p&&p[d]||o.style(a,d)}if(!o.isEmptyObject(l)){p?"hidden"in p&&(n=p.hidden):p=L.access(a,"fxshow",{}),f&&(p.hidden=!n),n?o(a).show():k.done(function(){o(a).hide()}),k.done(function(){var b;L.remove(a,"fxshow");for(b in l)o.style(a,b,l[b])});for(d in l)g=Ub(n?p[d]:0,d,k),d in p||(p[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=o.camelCase(c),e=b[d],f=a[c],o.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=o.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=o.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:o.extend({},b),opts:o.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=o.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return o.map(k,Ub,j),o.isFunction(j.opts.start)&&j.opts.start.call(a,j),o.fx.timer(o.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}o.Animation=o.extend(Xb,{tweener:function(a,b){o.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),o.speed=function(a,b,c){var d=a&&"object"==typeof a?o.extend({},a):{complete:c||!c&&b||o.isFunction(a)&&a,duration:a,easing:c&&b||b&&!o.isFunction(b)&&b};return d.duration=o.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in o.fx.speeds?o.fx.speeds[d.duration]:o.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){o.isFunction(d.old)&&d.old.call(this),d.queue&&o.dequeue(this,d.queue)},d},o.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=o.isEmptyObject(a),f=o.speed(b,c,d),g=function(){var b=Xb(this,o.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=o.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&o.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=o.timers,g=d?d.length:0;for(c.finish=!0,o.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),o.each(["toggle","show","hide"],function(a,b){var c=o.fn[b];o.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){o.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),o.timers=[],o.fx.tick=function(){var a,b=0,c=o.timers;for(Lb=o.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(a){o.timers.push(a),a()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(a,b){return a=o.fx?o.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=m.createElement("input"),b=m.createElement("select"),c=b.appendChild(m.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=m.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(a,b){return J(this,o.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){o.removeAttr(this,a)})}}),o.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?o.prop(a,b,c):(1===f&&o.isXMLDoc(a)||(b=b.toLowerCase(),d=o.attrHooks[b]||(o.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=o.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void o.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=o.propFix[c]||c,o.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&o.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?o.removeAttr(a,c):a.setAttribute(c,c),c}},o.each(o.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||o.find.attr;$b[b]=function(a,b,d){var e,f;
-return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(a,b){return J(this,o.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[o.propFix[a]||a]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!o.isXMLDoc(a),f&&(b=o.propFix[b]||b,e=o.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=o.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?o.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(o.isFunction(a)?function(c){o(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=o(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=o.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,o(this).val()):a,null==e?e="":"number"==typeof e?e+="":o.isArray(e)&&(e=o.map(e,function(a){return null==a?"":a+""})),b=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=o.valHooks[e.type]||o.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),o.extend({valHooks:{select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&o.nodeName(c.parentNode,"optgroup"))){if(b=o(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=o.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=o.inArray(o(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(a,b){return o.isArray(b)?a.checked=o.inArray(o(a).val(),b)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){o.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),o.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(a){return JSON.parse(a+"")},o.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(o.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,o.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=o.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&o.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,o.ajaxSettings),b):tc(o.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=o.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?o(l):o.event,n=o.Deferred(),p=o.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(n.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=o.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=o.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===o.active++&&o.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(o.lastModified[d]&&v.setRequestHeader("If-Modified-Since",o.lastModified[d]),o.etag[d]&&v.setRequestHeader("If-None-Match",o.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(o.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(o.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?n.resolveWith(l,[r,x,v]):n.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--o.active||o.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return o.get(a,b,c,"json")},getScript:function(a,b){return o.get(a,void 0,b,"script")}}),o.each(["get","post"],function(a,b){o[b]=function(a,c,d,e){return o.isFunction(c)&&(e=e||d,d=c,c=void 0),o.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){o.fn[b]=function(a){return this.on(b,a)}}),o._evalUrl=function(a){return o.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(a){var b;return o.isFunction(a)?this.each(function(b){o(this).wrapAll(a.call(this,b))}):(this[0]&&(b=o(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(o.isFunction(a)?function(b){o(this).wrapInner(a.call(this,b))}:function(){var b=o(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=o.isFunction(a);return this.each(function(c){o(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},o.expr.filters.visible=function(a){return!o.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(o.isArray(b))o.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==o.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}o.param=function(a,b){var c,d=[],e=function(a,b){b=o.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(a)||a.jquery&&!o.isPlainObject(a))o.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=o.prop(this,"elements");return a?o.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=o(this).val();return null==c?null:o.isArray(c)?o.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var a in Dc)Dc[a]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(a){var b;return l.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort"),f.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return o.globalEval(a),a}}}),o.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),o.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=o("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),m.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||o.expando+"_"+cc++;return this[a]=!0,a}}),o.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=o.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||o.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&o.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||m;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=o.buildFragment([a],b,e),e&&e.length&&o(e).remove(),o.merge([],d.childNodes))};var Ic=o.fn.load;o.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),o.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&o.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?o("<div>").append(o.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},o.expr.filters.animated=function(a){return o.grep(o.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return o.isWindow(a)?a:9===a.nodeType&&a.defaultView}o.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=o.css(a,"position"),l=o(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=o.css(a,"top"),i=o.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),o.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},o.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){o.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,o.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===o.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),o.nodeName(a[0],"html")||(d=a.offset()),d.top+=o.css(a[0],"borderTopWidth",!0),d.left+=o.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-o.css(c,"marginTop",!0),left:b.left-d.left-o.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!o.nodeName(a,"html")&&"static"===o.css(a,"position"))a=a.offsetParent;return a||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;o.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),o.each(["top","left"],function(a,b){o.cssHooks[b]=yb(l.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?o(a).position()[b]+"px":c):void 0})}),o.each({Height:"height",Width:"width"},function(a,b){o.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){o.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return o.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?o.css(b,c,g):o.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(b){return a.$===o&&(a.$=Mc),b&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o});
+/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
+},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
+},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
diff --git a/p/scripts/main.js b/p/scripts/main.js
index f0d2bbf7b..f1dd7117c 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1,6 +1,7 @@
"use strict";
var $stream = null,
- isCollapsed = true;
+ isCollapsed = true,
+ shares = 0;
function is_normal_mode() {
return $stream.hasClass('normal');
@@ -20,6 +21,16 @@ function redirect(url, new_tab) {
}
}
+function needsScroll($elem) {
+ var $win = $(window),
+ winTop = $win.scrollTop(),
+ winHeight = $win.height(),
+ winBottom = winTop + winHeight,
+ elemTop = $elem.offset().top,
+ elemBottom = elemTop + $elem.outerHeight();
+ return (elemTop < winTop || elemBottom > winBottom) ? elemTop - (winHeight / 2) : 0;
+}
+
function str2int(str) {
if (str == '') {
return 0;
@@ -96,8 +107,10 @@ function incUnreadsFeed(article, feed_id, nb) {
return isCurrentView;
}
+var pending_feeds = [];
function mark_read(active, only_not_read) {
- if (active.length === 0 || (only_not_read === true && !active.hasClass("not_read"))) {
+ if (active.length === 0 ||
+ (only_not_read === true && !active.hasClass("not_read"))) {
return false;
}
@@ -106,6 +119,16 @@ function mark_read(active, only_not_read) {
return false;
}
+ var feed_url = active.find(".website>a").attr("href"),
+ feed_id = feed_url.substr(feed_url.lastIndexOf('f_')),
+ index_pending = pending_feeds.indexOf(feed_id);
+
+ if (index_pending !== -1) {
+ return false;
+ }
+
+ pending_feeds.push(feed_id);
+
$.ajax({
type: 'POST',
url: url,
@@ -122,9 +145,9 @@ function mark_read(active, only_not_read) {
}
$r.find('.icon').replaceWith(data.icon);
- var feed_url = active.find(".website>a").attr("href"),
- feed_id = feed_url.substr(feed_url.lastIndexOf('f_'));
incUnreadsFeed(active, feed_id, inc);
+
+ pending_feeds.splice(index_pending, 1);
});
}
@@ -138,6 +161,16 @@ function mark_favorite(active) {
return false;
}
+ var feed_url = active.find(".website>a").attr("href"),
+ feed_id = feed_url.substr(feed_url.lastIndexOf('f_')),
+ index_pending = pending_feeds.indexOf(feed_id);
+
+ if (index_pending !== -1) {
+ return false;
+ }
+
+ pending_feeds.push(feed_id);
+
$.ajax({
type: 'POST',
url: url,
@@ -168,12 +201,12 @@ function mark_favorite(active) {
elem.setAttribute('data-unread', numberFormat(feed_unreads + inc));
}
}
+
+ pending_feeds.splice(index_pending, 1);
});
}
function toggleContent(new_active, old_active) {
- old_active.removeClass("active").removeClass("current");
-
if (new_active.length === 0) {
return;
}
@@ -189,7 +222,10 @@ function toggleContent(new_active, old_active) {
if (isCollapsed) {
new_active.addClass("active");
}
+ old_active.removeClass("active current");
new_active.addClass("current");
+ } else {
+ new_active.toggleClass('active');
}
var box_to_move = "html,body",
@@ -199,28 +235,27 @@ function toggleContent(new_active, old_active) {
relative_move = true;
}
- var new_pos = new_active.position().top,
- old_scroll = $(box_to_move).scrollTop();
- if (hide_posts) {
+ if (sticky_post) {
+ var new_pos = new_active.position().top - new_active.children('.flux_header').outerHeight(),
+ old_scroll = $(box_to_move).scrollTop();
- new_pos = new_active.position().top;
- old_scroll = $(box_to_move).scrollTop();
+ if (hide_posts) {
+ if (relative_move) {
+ new_pos += old_scroll;
+ }
- if (relative_move) {
- new_pos += old_scroll;
- }
+ if (old_active[0] !== new_active[0]) {
+ new_active.children(".flux_content").first().each(function () {
+ $(box_to_move).scrollTop(new_pos).scrollTop();
+ });
+ }
+ } else {
+ if (relative_move) {
+ new_pos += old_scroll;
+ }
- if (old_active[0] !== new_active[0]) {
- new_active.children(".flux_content").first().each(function () {
- $(box_to_move).scrollTop(new_pos).scrollTop();
- });
+ $(box_to_move).scrollTop(new_pos).scrollTop();
}
- } else {
- if (relative_move) {
- new_pos += old_scroll;
- }
-
- $(box_to_move).scrollTop(new_pos).scrollTop();
}
if (auto_mark_article) {
@@ -239,11 +274,82 @@ function next_entry() {
new_active = old_active.length === 0 ? $(".flux:first") : old_active.nextAll(".flux:first");
toggleContent(new_active, old_active);
- if (!auto_load_more) {
- var last_active = $(".flux:last");
- if (last_active.attr("id") === new_active.attr("id")) {
- load_more_posts();
+ if (new_active.nextAll().length < 3) {
+ load_more_posts();
+ }
+}
+
+function prev_feed() {
+ var active_feed = $("#aside_flux .feeds li.active");
+ if (active_feed.length > 0) {
+ active_feed.prev().find('a.feed').each(function(){this.click();});
+ } else {
+ last_feed();
+ }
+}
+
+function next_feed() {
+ var active_feed = $("#aside_flux .feeds li.active");
+ if (active_feed.length > 0) {
+ active_feed.next().find('a.feed').each(function(){this.click();});
+ } else {
+ first_feed();
+ }
+}
+
+function first_feed() {
+ var feed = $("#aside_flux .feeds.active li:first");
+ if (feed.length > 0) {
+ feed.find('a')[1].click();
+ }
+}
+
+function last_feed() {
+ var feed = $("#aside_flux .feeds.active li:last");
+ if (feed.length > 0) {
+ feed.find('a')[1].click();
+ }
+}
+
+function prev_category() {
+ var active_cat = $("#aside_flux .category.stick.active");
+
+ if (active_cat.length > 0) {
+ var prev_cat = active_cat.parent('li').prev().find('.category.stick a.btn');
+ if (prev_cat.length > 0) {
+ prev_cat[0].click();
+ }
+ } else {
+ last_category();
+ }
+ return;
+}
+
+function next_category() {
+ var active_cat = $("#aside_flux .category.stick.active");
+
+ if (active_cat.length > 0) {
+ var next_cat = active_cat.parent('li').next().find('.category.stick a.btn');
+ if (next_cat.length > 0) {
+ next_cat[0].click();
}
+ } else {
+ first_category();
+ }
+ return;
+}
+
+function first_category() {
+ var cat = $("#aside_flux .category.stick:first");
+ if (cat.length > 0) {
+ cat.find('a.btn')[0].click();
+ }
+}
+
+function last_category() {
+ var cat = $("#aside_flux .category.stick:last");
+ if (cat.length > 0) {
+ cat.find('a.btn')[0].click();
}
}
@@ -252,10 +358,32 @@ function collapse_entry() {
$(".flux.current").toggleClass("active");
}
-function auto_share() {
+function auto_share(key) {
var share = $(".flux.current.active").find('.dropdown-target[id^="dropdown-share"]');
- if (share.length) {
+ var shares = share.siblings('.dropdown-menu').find('.item a');
+ if (typeof key === "undefined") {
+ if (!share.length) {
+ return;
+ }
+ // Display the share div
window.location.hash = share.attr('id');
+ // Force scrolling to the share div
+ var scroll = needsScroll(share.closest('.bottom'));
+ if (scroll !== 0) {
+ $('html,body').scrollTop(scroll);
+ }
+ // Force the key value if there is only one action, so we can trigger it automatically
+ if (shares.length === 1) {
+ key = 1;
+ } else {
+ return;
+ }
+ }
+ // Trigger selected share action and hide the share div
+ key = parseInt(key);
+ if (key <= shares.length) {
+ shares[key - 1].click();
+ share.siblings('.dropdown-menu').find('.dropdown-close a')[0].click();
}
}
@@ -390,12 +518,19 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
+ for(var i = 1; i < 10; i++){
+ shortcut.add(i.toString(), function (e) {
+ auto_share(String.fromCharCode(e.keyCode));
+ }, {
+ 'disable_in_input': true
+ });
+ }
- // Touches de navigation
+ // Touches de navigation pour les articles
shortcut.add(shortcuts.prev_entry, prev_entry, {
'disable_in_input': true
});
- shortcut.add("shift+" + shortcuts.prev_entry, function () {
+ shortcut.add(shortcuts.first_entry, function () {
var old_active = $(".flux.current"),
first = $(".flux:first");
@@ -408,7 +543,7 @@ function init_shortcuts() {
shortcut.add(shortcuts.next_entry, next_entry, {
'disable_in_input': true
});
- shortcut.add("shift+" + shortcuts.next_entry, function () {
+ shortcut.add(shortcuts.last_entry, function () {
var old_active = $(".flux.current"),
last = $(".flux:last");
@@ -418,8 +553,35 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
+ // Touches de navigation pour les flux
+ shortcut.add("shift+" + shortcuts.prev_entry, prev_feed, {
+ 'disable_in_input': true
+ });
+ shortcut.add("shift+" + shortcuts.next_entry, next_feed, {
+ 'disable_in_input': true
+ });
+ shortcut.add("shift+" + shortcuts.first_entry, first_feed, {
+ 'disable_in_input': true
+ });
+ shortcut.add("shift+" + shortcuts.last_entry, last_feed, {
+ 'disable_in_input': true
+ });
+ // Touches de navigation pour les categories
+ shortcut.add("alt+" + shortcuts.prev_entry, prev_category, {
+ 'disable_in_input': true
+ });
+ shortcut.add("alt+" + shortcuts.next_entry, next_category, {
+ 'disable_in_input': true
+ });
+ shortcut.add("alt+" + shortcuts.first_entry, first_category, {
+ 'disable_in_input': true
+ });
+ shortcut.add("alt+" + shortcuts.last_entry, last_category, {
+ 'disable_in_input': true
+ });
+
shortcut.add(shortcuts.go_website, function () {
- var url_website = $(".flux.active .link a").attr("href");
+ var url_website = $('.flux.current > .flux_header > .title > a').attr("href");
if (auto_mark_site) {
$(".flux.current").each(function () {
@@ -437,11 +599,17 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
+
+ shortcut.add(shortcuts.focus_search, function () {
+ focus_search();
+ }, {
+ 'disable_in_input': true
+ });
}
function init_stream(divStream) {
- divStream.on('click', '.flux_header', function (e) { //flux_header_toggle
- if ($(e.target).closest('.item.website > a').length > 0) {
+ divStream.on('click', '.flux_header,.flux_content', function (e) { //flux_toggle
+ if ($(e.target).closest('.content, .item.website, .item.link').length > 0) {
return;
}
var old_active = $(".flux.current"),
@@ -468,7 +636,7 @@ function init_stream(divStream) {
return false;
});
- divStream.on('click', '.item.title>a', function (e) {
+ divStream.on('click', '.item.title > a', function (e) {
if (e.ctrlKey) {
return true; //Allow default control-click behaviour such as open in backround-tab
}
@@ -481,7 +649,7 @@ function init_stream(divStream) {
});
if (auto_mark_site) {
- divStream.on('click', '.flux .link a', function () {
+ divStream.on('click', '.flux .link > a', function () {
mark_read($(this).parent().parent().parent(), true);
});
}
@@ -512,37 +680,72 @@ function init_nav_entries() {
}
function init_actualize() {
+ var auto = false;
+
$("#actualize").click(function () {
$.getScript('./?c=javascript&a=actualize').done(function () {
+ if (auto && feed_count < 1) {
+ auto = false;
+ return;
+ }
+
updateFeeds();
});
return false;
});
- if(auto_actualize_feeds) {
- $.getScript('./?c=javascript&a=actualize').done(function () {
- updateFeeds();
- });
+ if (auto_actualize_feeds) {
+ auto = true;
+ $("#actualize").click();
+ }
+}
+
+
+// <notification>
+var notification = null,
+ notification_interval = null,
+ notification_working = false;
+
+function openNotification(msg, status) {
+ if (notification_working === true) {
+ return false;
}
+
+ notification_working = true;
+
+ notification.removeClass();
+ notification.addClass("notification");
+ notification.addClass(status);
+ notification.find(".msg").html(msg);
+ notification.fadeIn(300);
+
+ notification_interval = window.setInterval(closeNotification, 4000);
}
function closeNotification() {
- $(".notification").fadeOut(600, function () {
- $(".notification").remove();
+ notification.fadeOut(600, function() {
+ notification.removeClass();
+ notification.addClass('closed');
+
+ window.clearInterval(notification_interval);
+ notification_working = false;
});
}
function init_notifications() {
- var notif = $(".notification");
- if (notif.length > 0) {
- window.setInterval(closeNotification, 4000);
+ notification = $("#notification");
- notif.find("a.close").click(function () {
- closeNotification();
- return false;
- });
+ notification.find("a.close").click(function () {
+ closeNotification();
+ return false;
+ });
+
+ if (notification.find(".msg").html().length > 0) {
+ notification_working = true;
+ notification_interval = window.setInterval(closeNotification, 4000);
}
}
+// </notification>
function refreshUnreads() {
$.getJSON('./?c=javascript&a=nbUnreadsPerFeed').done(function (data) {
@@ -574,7 +777,11 @@ function load_more_posts() {
$.get(url_load_more, function (data) {
box_load_more.children('.flux:last').after($('#stream', data).children('.flux, .day'));
$('.pagination').replaceWith($('.pagination', data));
- $('#bigMarkAsRead').attr('href', $('#nav_menu_read_all>a').attr('href'));
+ if (display_order === 'ASC') {
+ $('#nav_menu_read_all>a').attr('href', $('#bigMarkAsRead').attr('href'));
+ } else {
+ $('#bigMarkAsRead').attr('href', $('#nav_menu_read_all>a').attr('href'));
+ }
$('[id^=day_]').each(function (i) {
var ids = $('[id="' + this.id + '"]');
@@ -591,6 +798,10 @@ function load_more_posts() {
});
}
+function focus_search() {
+ $('#search').focus();
+}
+
function init_load_more(box) {
box_load_more = box;
@@ -741,7 +952,7 @@ function init_confirm_action() {
}
function init_print_action() {
- $('.print-article').click(function () {
+ $('.item.share > a[href="#"]').click(function () {
var content = "<html><head><style>"
+ "body { font-family: Serif; text-align: justify; }"
+ "a { color: #000; text-decoration: none; }"
@@ -761,6 +972,57 @@ function init_print_action() {
});
}
+function init_share_observers() {
+ shares = $('.form-group:not(".form-actions")').length;
+
+ $('.post').on('click', '.share.remove', function(e) {
+ e.preventDefault();
+ $(this).parents('.form-group').remove();
+ });
+
+ $('.share.add').on('click', function(e) {
+ var opt = $(this).siblings('select').find(':selected');
+ var row = $(this).parents('form').data(opt.data('form'));
+ row = row.replace('##label##', opt.html(), 'g');
+ row = row.replace('##type##', opt.val(), 'g');
+ row = row.replace('##help##', opt.data('help'), 'g');
+ row = row.replace('##key##', shares, 'g');
+ $(this).parents('.form-group').before(row);
+ shares++;
+
+ return false;
+ });
+}
+
+function init_feed_observers() {
+ $('select[id="category"]').on('change', function() {
+ var detail = $('#new_category_name').parent();
+ if ($(this).val() === 'nc') {
+ detail.show();
+ detail.find('input').focus();
+ } else {
+ detail.hide();
+ }
+ });
+}
+
+function init_password_observers() {
+ $('input[type="password"] + a.btn.toggle-password').on('click', function(e) {
+ var button = $(this);
+ var passwordField = $(this).siblings('input[type="password"]');
+
+ passwordField.attr('type', 'text');
+ button.addClass('active');
+
+ setTimeout(function() {
+ passwordField.attr('type', 'password');
+ button.removeClass('active');
+ }, 2000);
+
+ return false;
+ });
+}
+
function init_all() {
if (!(window.$ && window.url_freshrss && ((!full_lazyload) || $.fn.lazyload))) {
if (window.console) {
@@ -790,6 +1052,10 @@ function init_all() {
init_shortcuts();
init_print_action();
window.setInterval(refreshUnreads, 120000);
+ } else {
+ init_share_observers();
+ init_feed_observers();
+ init_password_observers();
}
if (window.console) {
diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css
index e54a0eadd..aef9a7469 100644
--- a/p/themes/Dark/freshrss.css
+++ b/p/themes/Dark/freshrss.css
@@ -290,7 +290,7 @@
.flux .item.title {
background: inherit;
}
- .flux .item.title a {
+ .flux .title a {
color: #888;
outline: none;
}
@@ -354,13 +354,15 @@
font-size: 120%;
}
#stream.global .btn:not([data-unread="0"]) {
- font-weight:bold;
+ background: #34495e;
+ color: #fff;
+ font-weight: bold;
}
#stream.global .btn:first-child:not([data-unread="0"]):after {
top: 0; right: 5px;
border: 0;
background: none;
- color: #666;
+ color: #fff;
font-weight: bold;
box-shadow: none;
}
@@ -381,12 +383,20 @@
.content {
min-height: 150px;
- max-width: 550px;
margin: 0 auto;
padding: 20px 10px;
line-height: 170%;
word-wrap: break-word;
}
+ .content.large {
+ max-width: 1000px;
+ }
+ .content.medium {
+ max-width: 800px;
+ }
+ .content.thin {
+ max-width: 550px;
+ }
.content h1, .content h2, .content h3 {
margin: 20px 0 5px;
}
@@ -504,10 +514,10 @@
font-style: italic;
}
.pagination:first-child .item {
- border-bottom: 1px solid #aaa;
+ border-bottom: 1px solid #2f2f2f;
}
.pagination:last-child .item {
- border-top: 1px solid #aaa;
+ border-top: 1px solid #2f2f2f;
}
#nav_entries {
@@ -570,56 +580,40 @@
box-shadow: 0 0 5px #666;
background: #1a1a1a;
color: #888;
+ border: 1px solid #f4f899;
font-weight: bold;
z-index: 10;
}
- .notification.good {
- border:1px solid #f4f899;
- }
- .notification.bad {
- border:1px solid #f4a899;
+ .notification.closed {
+ display: none;
}
.notification a.close {
+ position: absolute;
+ top: -10px; right: -10px;
display: inline-block;
width: 16px;
height: 16px;
- float: right;
- margin: -20px -20px 0 0;
padding: 5px;
background: #1a1a1a;
border-radius: 50px;
line-height: 16px;
- }
- .notification.good a.close{
border:1px solid #f4f899;
}
- .notification.bad a.close{
- border:1px solid #f4a899;
- }
.toggle_aside, .btn.toggle_aside {
display: none;
}
-.actualizeProgress {
+#actualizeProgress {
position: fixed;
- top: 10px;
- left: 25%; right: 25%;
- padding: 5px;
- background: #1a1a1a;
- text-align: center;
- border: 1px solid #2f2f2f;
- border-radius: 5px;
}
- .actualizeProgress progress {
- max-width: 100%;
- vertical-align: middle;
- }
- .actualizeProgress .progress {
- color: #888;
- font-size: 90%;
- vertical-align: middle;
- }
+#actualizeProgress progress {
+ max-width: 100%;
+ vertical-align: middle;
+}
+#actualizeProgress .progress {
+ vertical-align: middle;
+}
.logs {
border: 1px solid #aaa;
@@ -778,9 +772,24 @@ select.number option {
}
.notification,
- .actualizeProgress {
- left: 10px;
- right: 10px;
+ #actualizeProgress {
+ top: 0;
+ left: 0;
+ right: 0;
+ border-radius: 0;
+ border: none;
+ border-bottom: 1px solid #f4f899;
+ }
+ .notification a.close {
+ left: 0; right: 0;
+ top: 0; bottom: 0;
+ width: auto;
+ height: auto;
+ background: transparent;
+ border: none;
+ }
+ .notification a.close .icon {
+ display: none;
}
}
diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css
index f96f83fc8..0f1baa216 100644
--- a/p/themes/Dark/global.css
+++ b/p/themes/Dark/global.css
@@ -407,16 +407,15 @@ input, select, textarea {
padding: 0 25px;
line-height: 30px;
}
+ .dropdown-menu > .item.share > a {
+ display: list-item;
+ list-style-position:inside;
+ list-style-type:decimal;
+ }
.dropdown-menu > .item:hover {
background: #26303F;
color: #888;
}
- .dropdown-menu > .item[aria-checked="true"] > a:before {
- content: '✓ ';
- font-weight: bold;
- margin: 0 0 0 -1.2em;
- padding: 0 0.2em 0 0;
- }
.dropdown-menu > .item:hover > a {
color: #888;
text-decoration: none;
@@ -507,18 +506,20 @@ input, select, textarea {
}
/* Prompt (centré) */
-.prompt > h1, .prompt > p {
- text-align:center;
-}
-.prompt > form {
- margin:1em auto 2.5em auto;
- width:10em;
-}
-.prompt .btn {
- display:block;
- margin:.5em auto;
-}
-.prompt input {
- margin:.4em auto 1.1em auto;
- width:99%;
+.prompt {
+ text-align: center;
}
+ .prompt label {
+ text-align: left;
+ }
+ .prompt form {
+ margin: 1em auto 2.5em auto;
+ width: 10em;
+ }
+ .prompt input {
+ margin: .4em auto 1.1em auto;
+ width: 100%;
+ }
+ .prompt p {
+ margin: 20px 0;
+ }
diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css
index 19f5967ea..503eec813 100644
--- a/p/themes/Flat/freshrss.css
+++ b/p/themes/Flat/freshrss.css
@@ -286,7 +286,7 @@ body {
.flux .item.title {
background: inherit;
}
- .flux .item.title a {
+ .flux .title a {
color: #333;
outline: none;
}
@@ -350,13 +350,15 @@ body {
font-size: 120%;
}
#stream.global .btn:not([data-unread="0"]) {
- font-weight:bold;
+ background: #3498db;
+ color: #fff;
+ font-weight: bold;
}
#stream.global .btn:first-child:not([data-unread="0"]):after {
top: 0; right: 5px;
border: 0;
background: none;
- color: #333;
+ color: #fff;
font-weight: bold;
box-shadow: none;
}
@@ -377,12 +379,20 @@ body {
.content {
min-height: 150px;
- max-width: 550px;
margin: 0 auto;
padding: 20px 10px;
line-height: 170%;
word-wrap: break-word;
}
+ .content.large {
+ max-width: 1000px;
+ }
+ .content.medium {
+ max-width: 800px;
+ }
+ .content.thin {
+ max-width: 550px;
+ }
.content h1, .content h2, .content h3 {
margin: 20px 0 5px;
}
@@ -575,6 +585,9 @@ body {
font-weight: bold;
z-index: 10;
}
+ .notification.closed {
+ display: none;
+ }
.notification.good {
background: #1abc9c;
color: #fff;
@@ -584,11 +597,11 @@ body {
color: #fff;
}
.notification a.close {
+ position: absolute;
+ top: -6px; right: -6px;
display: inline-block;
width: 16px;
height: 16px;
- float: right;
- margin: -16px -16px 0 0;
padding: 5px;
border-radius: 3px;
line-height: 16px;
@@ -604,28 +617,16 @@ body {
display: none;
}
-.actualizeProgress {
+#actualizeProgress {
position: fixed;
- top: 10px;
- left: 25%; right: 25%;
- padding: 5px;
- background: #3498db;
- color: #fff;
- text-align: center;
- border-radius: 3px;
- font-weight: bold;
}
- .actualizeProgress progress {
- max-width: 100%;
- width: 250px;
- height: 15px;
- vertical-align: middle;
- background: #fff;
- border: none;
- }
- .actualizeProgress .progress {
- color: #ecf0f1;
- }
+#actualizeProgress progress {
+ max-width: 100%;
+ vertical-align: middle;
+}
+#actualizeProgress .progress {
+ vertical-align: middle;
+}
.logs {
border: 1px solid #34495e;
@@ -785,10 +786,24 @@ select.number option {
text-shadow: none;
}
- .notification,
- .actualizeProgress {
- left: 10px;
- right: 10px;
+ .notification {
+ top: 0;
+ left: 0;
+ right: 0;
+ border-radius: 0;
+ }
+ .notification a.close,
+ .notification.good a.close,
+ .notification.bad a.close {
+ left: 0; right: 0;
+ top: 0; bottom: 0;
+ width: auto;
+ height: auto;
+ background: transparent;
+ border: none;
+ }
+ .notification a.close .icon {
+ display: none;
}
}
diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css
index e3baa26ab..68e9fa359 100644
--- a/p/themes/Flat/global.css
+++ b/p/themes/Flat/global.css
@@ -403,16 +403,15 @@ input, select, textarea {
padding: 0 25px;
line-height: 30px;
}
+ .dropdown-menu > .item.share > a {
+ display: list-item;
+ list-style-position:inside;
+ list-style-type:decimal;
+ }
.dropdown-menu > .item:hover > a {
background: #2980b9;
color: #fff;
}
- .dropdown-menu > .item[aria-checked="true"] > a:before {
- content: '✓ ';
- font-weight: bold;
- margin: 0 0 0 -1.2em;
- padding: 0 0.2em 0 0;
- }
.dropdown-menu > .item:hover > a {
color: #fff;
text-decoration: none;
@@ -510,18 +509,20 @@ input, select, textarea {
}
/* Prompt (centré) */
-.prompt > h1, .prompt > p {
- text-align:center;
-}
-.prompt > form {
- margin:1em auto 2.5em auto;
- width:10em;
-}
-.prompt .btn {
- display:block;
- margin:.5em auto;
-}
-.prompt input {
- margin:.4em auto 1.1em auto;
- width:99%;
+.prompt {
+ text-align: center;
}
+ .prompt label {
+ text-align: left;
+ }
+ .prompt form {
+ margin: 1em auto 2.5em auto;
+ width: 10em;
+ }
+ .prompt input {
+ margin: .4em auto 1.1em auto;
+ width: 100%;
+ }
+ .prompt p {
+ margin: 20px 0;
+ }
diff --git a/p/themes/Flat/icons/rss.svg b/p/themes/Flat/icons/rss.svg
new file mode 100644
index 000000000..4d4faf7ae
--- /dev/null
+++ b/p/themes/Flat/icons/rss.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g fill-rule="nonzero" transform="translate(-561,-301.00012)" fill="#fff">
+<path style="enable-background:new;color:#000000;" d="m325.06,97.188c0,1.7872-0.89543,3.2361-2,3.2361s-2-1.4488-2-3.2361c0-1.7872,0.89543-3.2361,2-3.2361s2,1.4488,2,3.2361z" transform="matrix(1.0000007,0,0,0.61803426,241.93747,252.93479)"/>
+<path style="enable-background:new;color:#000000;" d="m563,303,0,1c0,0.55016,0.45347,1,1,1,4.9706,0,9,4.0294,9,9,0,0.55016,0.45347,1,1,1h1v-1c0-6.0751-4.9249-11-11-11h-1zm0,4,0,1c0,0.55016,0.45347,1,1,1,2.7614,0,5,2.2386,5,5,0,0.55016,0.45347,1,1,1h1v-1c0-3.866-3.134-7-7-7h-1z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/Flat/icons/view-global.svg b/p/themes/Flat/icons/view-global.svg
new file mode 100644
index 000000000..9d2cd0f32
--- /dev/null
+++ b/p/themes/Flat/icons/view-global.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-61-867)" fill="#fff" color="#000"><rect height="2" rx=".385" ry=".379" width="2" x="64" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="64" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="64" y="878"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="878"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="878"/></g></svg> \ No newline at end of file
diff --git a/p/themes/Flat/icons/view-normal.svg b/p/themes/Flat/icons/view-normal.svg
new file mode 100644
index 000000000..8eda2047e
--- /dev/null
+++ b/p/themes/Flat/icons/view-normal.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-40-746)" fill="#fff" color="#fff"><path d="m43 749h10v2h-10z"/><path d="m43 753h10v2h-10z"/><path d="m43 757h10v2h-10z"/></g></svg> \ No newline at end of file
diff --git a/p/themes/Flat/icons/view-reader.svg b/p/themes/Flat/icons/view-reader.svg
new file mode 100644
index 000000000..0e4f60a1a
--- /dev/null
+++ b/p/themes/Flat/icons/view-reader.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-181-867)" fill="#fff" color="#fff"><path d="m 181,868 0,1 0,11 0,1 1,0 5,0 c 0.1754,0 0.52538,0.15166 0.8125,0.34375 0.28712,0.19209 0.46875,0.375 0.46875,0.375 L 189,882.4375 l 0.71875,-0.75 c 0,0 0.8963,-0.6875 1.28125,-0.6875 l 5,0 1,0 0,-1 0,-11 0,-1 -1,0 -5,0 c -0.87652,0 -1.56017,0.34756 -2.03125,0.6875 -0.0301,-0.0207 -0.031,-0.0105 -0.0625,-0.0312 C 188.44557,868.35254 187.82811,868 187,868 l -5,0 -1,0 z m 2,2 4,0 c 0.13821,0 0.51476,0.14746 0.8125,0.34375 0.29774,0.19629 0.5,0.375 0.5,0.375 l 0.71875,0.6875 0.6875,-0.71875 c 0,0 0.89975,-0.6875 1.28125,-0.6875 l 4,0 0,9 -4,0 c -0.87693,0 -1.56008,0.34735 -2.03125,0.6875 -0.0196,-0.0135 -0.011,-0.0177 -0.0312,-0.0312 C 188.47725,879.34834 187.83512,879 187,879 l -4,0 0,-9 z"/><g transform="scale(-1 1)"><rect height="2" rx=".375" width="3" x="-187" y="872"/><rect height="2" rx=".375" width="3" x="-187" y="875"/><rect height="2" rx=".375" width="3" x="-194" y="872"/><rect height="2" rx=".375" width="3" x="-194" y="875"/></g></g></svg> \ No newline at end of file
diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css
deleted file mode 100644
index 85a23140c..000000000
--- a/p/themes/Origine/freshrss.css
+++ /dev/null
@@ -1,941 +0,0 @@
-@charset "UTF-8";
-
-/* STRUCTURE */
-.header {
- display: table;
- width: 100%;
- background: #f4f4f4;
- table-layout: fixed;
-}
- .header > .item {
- display: table-cell;
- padding: 10px 0;
- border-bottom: 1px solid #aaa;
- vertical-align: middle;
- text-align: center;
- }
- .header > .item.title {
- width: 250px;
- white-space: nowrap;
- }
- .logo {
- display: inline-block;
- font-size: 48px;
- height: 32px;
- width: 32px;
- padding: 10px;
- }
- .header > .item.title h1 {
- display: inline-block;
- margin: 0;
- text-shadow: 1px -1px 0 #ccc;
- }
- .header > .item.search input {
- width: 230px;
- }
- .header .item.search input:focus {
- width: 330px;
- }
- .header > .item.configure {
- width: 100px;
- }
-
-.item a:hover {
- text-decoration: none;
-}
-
-#global {
- display: table;
- width: 100%;
- height: 100%;
- background: #fafafa;
- table-layout: fixed;
-}
- .aside {
- display: table-cell;
- height: 100%;
- width: 250px;
- vertical-align: top;
- border-right: 1px solid #aaa;
- background: #fff;
- }
- .aside .nav-form input {
- width: 180px;
- }
- .aside.aside_flux {
- padding: 10px 0 40px;
- }
- .aside.aside_feed .nav-form input {
- width: 140px;
- }
- .aside.aside_feed .nav-form .dropdown .dropdown-menu {
- right: -20px;
- }
- .aside.aside_feed .nav-form .dropdown .dropdown-menu:after {
- right: 33px;
- }
-
- .nav-login {
- display: none;
- }
-
- .nav_menu {
- width: 100%;
- background: #fafafa;
- border-bottom: 1px solid #aaa;
- text-align: center;
- padding: 5px 0;
- }
- .nav_menu .search {
- display:none;
- }
-
-.favicon {
- height: 16px;
- width: 16px;
-}
-
-.categories {
- margin: 0;
- padding: 0;
- text-align: center;
- list-style: none;
-}
- .category {
- display: block;
- width: 220px;
- margin: 10px auto;
- text-align: left;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .category .btn:first-child {
- width: 195px;
- position: relative;
- }
- .category.stick .btn:first-child {
- width:160px;
- }
- .category .btn:first-child:not([data-unread="0"]):after {
- content: attr(data-unread);
- position: absolute;
- top: 3px; right: 3px;
- padding: 1px 5px;
- background: #ccc;
- color: #fff;
- font-size: 90%;
- border: 1px solid #bbb;
- border-radius: 5px;
- box-shadow: 1px 3px 3px #aaa inset;
- text-shadow: 0 0 1px #aaa;
- }
- .category + .feeds:not(.active) {
- display:none;
- }
- .categories .feeds {
- width: 100%;
- margin: 0;
- list-style: none;
- }
- .categories .feeds .item.active {
- background: #0062BE;
- }
- .categories .feeds .item.active .feed {
- color: #fff;
- }
- .categories .feeds .item.empty .feed {
- color: #e67e22;
- }
- .categories .feeds .item.empty.active {
- background: #e67e22;
- }
- .categories .feeds .item.empty.active .feed {
- color: #fff;
- }
- .categories .feeds .item.error .feed {
- color: #BD362F;
- }
- .categories .feeds .item .feed {
- display: inline-block;
- margin: 0;
- width: 165px;
- line-height: 35px;
- font-size: 90%;
- vertical-align: middle;
- text-align: left;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .feed:not([data-unread="0"]) {
- font-weight:bold;
- }
- .feed:not([data-unread="0"]):before {
- content: "(" attr(data-unread) ") ";
- }
- .categories .feeds .dropdown-menu {
- left: 0;
- }
- .categories .feeds .dropdown-menu:after {
- left: 2px;
- }
- .categories .feeds .item .dropdown-toggle > .icon {
- visibility: hidden;
- cursor: pointer;
- }
- .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon,
- .categories .feeds .item:hover .dropdown-toggle > .icon,
- .categories .feeds .item.active .dropdown-toggle > .icon {
- background-color: #fff;
- border-radius: 3px;
- visibility: visible;
- }
-
-.post {
- padding: 10px 50px;
-}
- .post form {
- margin: 10px 0;
- }
-
-.day {
- min-height: 50px;
- padding: 0 10px;
- font-size: 130%;
- font-weight: bold;
- line-height: 50px;
- background: #fff;
- border-top: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
-}
- #new-article + .day {
- border-top: none;
- }
- .day .name {
- position: absolute;
- right: 0;
- width: 50%;
- height: 1.5em;
- padding: 0 10px 0 0;
- overflow: hidden;
- color: #aab;
- font-size: 1.8em;
- opacity: .3;
- text-shadow: 0px -1px 0px #333;
- font-style: italic;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: right;
- }
-
-#new-article {
- display: none;
- min-height: 40px;
- background: #0084CC;
- text-align: center;
-}
- #new-article:hover {
- background: #0066CC;
- }
- #new-article > a {
- display: block;
- line-height: 40px;
- color: #fff;
- font-weight: bold;
- }
- #new-article > a:hover {
- text-decoration: none;
- }
-
-.flux {
- border-left: 3px solid #aaa;
- background: #fafafa;
-}
- .flux:hover {
- background: #fff;
- }
- .flux.not_read {
- border-left: 3px solid #FF5300;
- background: #FFF3ED;
- }
- .flux.favorite {
- border-left: 3px solid #FFC300;
- background: #FFF6DA;
- }
- .flux.current {
- border-left: 3px solid #0062BE;
- background: #fff;
- }
-
- .horizontal-list > .item:not(.title):not(.website) > a {
- display: block;
- }
-
- .flux_header {
- background: inherit;
- height: 25px;
- font-size: 12px;
- border-top: 1px solid #ddd;
- cursor: pointer;
- }
- .flux .item {
- line-height: 40px;
- white-space: nowrap;
- }
- .flux_header > .item {
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .flux .item.manage {
- width: 40px;
- text-align: center;
- }
- .flux .item.website {
- width: 200px;
- }
- .website .favicon {
- padding: 5px;
- }
- .flux .item.title {
- background: inherit;
- }
- .flux .item.title a {
- color: #000;
- outline: none;
- }
- .flux.not_read .item.title,
- .flux.current .item.title {
- font-weight: bold;
- }
- .flux .item.date {
- width: 145px;
- padding:0 5px 0 0;
- text-align: right;
- font-size: 10px;
- color: #666;
- }
- .link {
- width: 40px;
- text-align: center;
- }
-
-#stream.reader .flux {
- padding: 0 0 30px;
- border: none;
- background: #f0f0f0;
- color: #333;
-}
- #stream.reader .flux .author {
- margin: 0 0 10px;
- font-size: 90%;
- color: #666;
- }
-
-#stream.global {
- text-align: center;
-}
- #stream.global .box-category {
- display: inline-block;
- width: 280px;
- margin: 20px 10px;
- vertical-align: top;
- background: #fff;
- border: 1px solid #aaa;
- border-radius: 5px;
- text-align: left;
- box-shadow: 0 0 5px #bbb;
- }
- #stream.global .category {
- width: 100%;
- margin: 0;
- }
- #stream.global .btn {
- display: block;
- width: auto;
- height: 35px;
- margin: 0;
- padding: 0 10px;
- background: #eee;
- border: none;
- border-bottom: 1px solid #aaa;
- border-radius: 5px 5px 0 0;
- line-height: 35px;
- font-size: 120%;
- }
- #stream.global .btn:not([data-unread="0"]) {
- font-weight:bold;
- }
- #stream.global .btn:first-child:not([data-unread="0"]):after {
- top: 0; right: 5px;
- border: 0;
- background: none;
- color: #666;
- font-weight: bold;
- box-shadow: none;
- }
- #stream.global .box-category .feeds {
- display: block;
- max-height: 250px;
- margin: 0;
- list-style: none;
- overflow: auto;
- }
- #stream.global .box-category .feeds .item {
- padding: 2px 10px;
- font-size: 90%;
- }
- #stream.global .box-category .feed {
- width: 220px;
- }
-
-.content {
- min-height: 150px;
- max-width: 550px;
- margin: 0 auto;
- padding: 20px 10px;
- line-height: 170%;
- word-wrap: break-word;
-}
- .content h1, .content h2, .content h3 {
- margin: 20px 0 5px;
- }
- .content > .title {
- font-size: x-large;
- margin: 0;
- }
-
- .content p {
- margin: 0 0 20px;
- }
- img.big {
- display: block;
- margin: 10px auto;
- }
- figure img.big {
- margin: 0;
- }
- .content hr {
- margin: 30px 0;
- height: 1px;
- background: #ddd;
- border: 0;
- }
- .content pre {
- margin: 10px auto;
- padding: 10px;
- overflow: auto;
- background: #000;
- color: #fff;
- font-size: 110%;
- }
- .content q, .content blockquote {
- display: block;
- margin: 5px 0;
- padding: 5px 20px;
- font-style: italic;
- border-left: 4px solid #ccc;
- color: #666;
- }
- .content blockquote p {
- margin: 0;
- }
-
-#panel {
- display: none;
- position: fixed;
- top: 10px; bottom: 10px;
- left: 100px; right: 100px;
- overflow: auto;
- background: #fff;
- border: 1px solid #95a5a6;
- border-radius: 5px;
-}
- #panel .close {
- position: fixed;
- top: 10px; right: 0;
- display: inline-block;
- width: 26px;
- height: 26px;
- margin: 0 10px 0 0;
- border: 1px solid #ccc;
- border-radius: 20px;
- text-align: center;
- line-height: 26px;
- background: #fff;
- }
-
-#overlay {
- display: none;
- position: fixed;
- top: 0; bottom: 0;
- left: 0; right: 0;
- background: rgba(0, 0, 0, 0.9);
-}
-
-.flux_content .bottom {
- font-size: 90%;
- text-align: center;
-}
-
-.hide_posts > :not(.active) > .flux_content {
- display:none;
-}
-
-/*** PAGINATION ***/
-.pagination {
- display: table;
- width: 100%;
- margin: 0;
- background: #fafafa;
- text-align: center;
- color: #333;
- font-size: 80%;
- line-height: 200%;
- table-layout: fixed;
-}
- .pagination .item {
- display: table-cell;
- line-height: 40px;
- }
- .pagination .item.pager-current {
- font-weight: bold;
- font-size: 140%;
- }
- .pagination .pager-first,
- .pagination .pager-previous,
- .pagination .pager-next,
- .pagination .pager-last {
- width: 100px;
- }
- .pagination .item a {
- display: block;
- color: #333;
- font-style: italic;
- }
- .pagination:first-child .item {
- border-bottom: 1px solid #aaa;
- }
- .pagination:last-child .item {
- border-top: 1px solid #aaa;
- }
-
-#nav_entries {
- display: table;
- width: 250px;
- height: 40px;
- position: fixed;
- bottom: 0;
- left: 0;
- margin: 0;
- background: #fff;
- border-top: 1px solid #ddd;
- text-align: center;
- line-height: 40px;
- table-layout: fixed;
-}
- #nav_entries .item {
- display: table-cell;
- width: 30%;
- }
- #nav_entries a {
- display: block;
- }
- #nav_entries .i_up {
- margin: 5px 0 0;
- vertical-align: top;
- }
-
-.loading {
- background: url("loader.gif") center center no-repeat;
- font-size: 0;
-}
-
-#bigMarkAsRead {
- display: block;
- font-style: normal;
- padding: 32px 0 64px 0;
- text-align: center;
- text-decoration: none;
- text-shadow: 0 -1px 0 #aaa;
-}
- #bigMarkAsRead:hover {
- background: #333;
- color: #fff;
- }
- .bigTick {
- font-size: 72pt;
- line-height: 1.6em;
- }
-
-/*** NOTIFICATION ***/
-.notification {
- position: absolute;
- top: 10px;
- left: 25%; right: 25%;
- min-height: 30px;
- padding: 10px;
- line-height: 30px;
- text-align: center;
- border-radius: 5px;
- box-shadow: 0 0 5px #666;
- background: #ddd;
- color: #666;
- font-weight: bold;
- z-index: 10;
-}
- .notification.good {
- background: #f4f899;
- }
- .notification.bad {
- background: #f4a899;
- }
- .notification a.close {
- display: inline-block;
- width: 16px;
- height: 16px;
- float: right;
- margin: -20px -20px 0 0;
- padding: 5px;
- background: #fff;
- border-radius: 50px;
- border: 1px solid #aaa;
- line-height: 16px;
- }
-
-.toggle_aside, .btn.toggle_aside {
- display: none;
-}
-
-.actualizeProgress {
- position: fixed;
- top: 10px;
- left: 25%; right: 25%;
- padding: 5px;
- background: #fff;
- text-align: center;
- border: 1px solid #ddd;
- border-radius: 5px;
-}
- .actualizeProgress progress {
- max-width: 100%;
- vertical-align: middle;
- }
- .actualizeProgress .progress {
- color: #999;
- font-size: 90%;
- vertical-align: middle;
- }
-
-.logs {
- border: 1px solid #aaa;
-}
- .log {
- padding: 5px 2%;
- overflow: auto;
- background: #fafafa;
- border-bottom: 1px solid #999;
- color: #333;
- font-size: 90%;
- }
- .log .date {
- display: block;
- }
- .log.error {
- background: #fdd;
- color: #844;
- }
- .log.warning {
- background: #ffe;
- color: #c95;
- }
- .log.notice {
- background: #f4f4f4;
- color: #aaa;
- }
- .log.debug {
- background: #111;
- color: #eee;
- }
-
-.form-group table {
- border-collapse:collapse;
- margin:10px 0 0 220px;
- text-align:center;
-}
-
-.form-group tr, .form-group th, .form-group td {
- border:1px solid #DDD;
- font-weight:normal;
- padding:.5em;
-}
-
-select.number option {
- text-align:right;
-}
-
-@media(min-width: 841px) {
- .flux:not(.current):hover .item.title {
- max-width: calc(100% - 580px);
- padding-right: 1.5em;
- position: absolute;
- }
-}
-
-@media(max-width: 840px) {
- .header,
- .aside .btn-important,
- .aside .feeds .dropdown,
- .flux_header .item.website span,
- .item.date {
- display: none;
- }
- .flux_header .item.website {
- width: 40px;
- text-align: center;
- }
- .flux_header .item.website .favicon {
- padding: 12px;
- }
-
- .nav-login {
- display: block;
- }
-
- .pagination {
- margin: 0 0 40px;
- }
- .pagination .pager-previous, .pagination .pager-next {
- width: 100px;
- }
-
- .toggle_aside, .btn.toggle_aside {
- display: inline-block;
- }
- .aside {
- position: fixed;
- top: 0; left: 0;
- width: 0;
- overflow: hidden;
- border-right: none;
- z-index: 10;
- transition: width 200ms linear;
- }
- .aside.aside_flux {
- padding: 10px 0 0;
- }
- .aside:target {
- width: 80%;
- border-right: 1px solid #aaa;
- overflow: auto;
- }
- .aside .toggle_aside {
- position: absolute;
- right: 0;
- display: inline-block;
- width: 26px;
- height: 26px;
- margin: 0 10px 0 0;
- border: 1px solid #ccc;
- border-radius: 20px;
- text-align: center;
- line-height: 26px;
- }
- .aside .categories {
- margin: 30px 0;
- }
-
- #nav_entries {
- width: 100%;
- }
-
- .nav_menu .btn {
- margin: 5px 10px;
- }
- .nav_menu .stick {
- margin: 0 10px;
- }
- .nav_menu .stick .btn {
- margin: 5px 0;
- }
- .nav_menu .search {
- display: inline-block;
- max-width: 97%;
- }
- .nav_menu .search input {
- max-width: 97%;
- width: 90px;
- }
- .nav_menu .search input:focus {
- width: 400px;
- }
-
- #panel {
- left: 5px; right: 5px;
- }
-
- .day .date {
- display: none;
- }
- .day .name {
- height: 2.6em;
- font-size: 1em;
- text-shadow: none;
- }
-
- .notification,
- .actualizeProgress {
- left: 10px;
- right: 10px;
- }
-}
-
-/*** FALLBACK ***/
-.btn {
- background: #fff;
- background: -moz-linear-gradient(top, #fff 0%, #eee 100%);
- background: -webkit-linear-gradient(top, #fff 0%, #eee 100%);
- background: -o-linear-gradient(top, #fff 0%, #eee 100%);
- background: -ms-linear-gradient(top, #fff 0%, #eee 100%);
-}
- .btn:hover {
- background: #f0f0f0;
- background: -moz-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
- background: -webkit-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
- background: -o-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
- background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
- }
- .btn-important {
- background: #0084CC;
- background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%);
- background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%);
- background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%);
- background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%);
- }
- .btn-important:hover {
- background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%);
- background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%);
- background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%);
- background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%);
- }
- .btn-attention {
- background: #E95B57;
- background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%);
- background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%);
- background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%);
- background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%);
- }
- .btn-attention:hover {
- background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%);
- background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%);
- background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%);
- background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%);
- }
-
-.dropdown-menu:after {
- -moz-transform: rotate(45deg);
- -webkit-transform: rotate(45deg);
- -ms-transform: rotate(45deg);
-}
-
-.nav-head {
- background: #fff;
- background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
- background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%);
- background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%);
- background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%);
-}
-
-input.extend {
- -moz-transition: width 200ms linear;
- -webkit-transition: width 200ms linear;
- -o-transition: width 200ms linear;
- -ms-transition: width 200ms linear;
-}
-
-@media(max-width: 840px) {
- .aside {
- -moz-transition: width 200ms linear;
- -webkit-transition: width 200ms linear;
- -o-transition: width 200ms linear;
- -ms-transition: width 200ms linear;
- }
-}
-
-@media print {
- .header,
- .aside,
- .nav_menu,
- .day,
- .flux_header,
- .flux_content .bottom,
- .pagination {
- display: none;
- }
-
- html, body {
- background: #fff;
- color: #000;
- font-family: Serif;
- font-size: 12pt;
- }
-
- #global,
- .flux_content {
- display: block !important;
- }
-
- .flux_content .content {
- width: 100% !important;
- text-align: justify;
- }
-
- .flux_content .content a {
- color: #000;
- }
- .flux_content .content a:after {
- content: " (" attr(href) ") ";
- text-decoration: underline;
- }
-}
-
-.stat {
- border:1px solid #aaa;
- border-radius:10px;
- box-shadow:2px 2px 5px #aaa;
- margin:10px 0;
- padding:0 5px;
-}
-.stat > h2 {
- border-bottom:1px solid #aaa;
- margin:0 -5px;
- padding-left:5px;
-}
-.stat > div {
- margin:5px 0;
-}
-.stat > table {
- border-collapse:collapse;
- margin:5px 0;
- width:100%;
-}
-.stat > table > thead > tr {
- border-bottom:2px solid #aaa;
-}
-.stat > table > tbody > tr {
- border-bottom:1px solid #aaa;
-}
-.stat > table > tbody > tr:last-child {
- border-bottom:0;
-}
-.stat > table th, .stat > table td {
- border-left:2px solid #aaa;
- padding:5px;
-}
-.stat > table th:first-child, .stat > table td:first-child {
- border-left:0;
-}
-.stat > table td.numeric{
- margin:5px 0;
- text-align:center;
-} \ No newline at end of file
diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css
deleted file mode 100644
index 58a3a52b1..000000000
--- a/p/themes/Origine/global.css
+++ /dev/null
@@ -1,540 +0,0 @@
-@charset "UTF-8";
-
-/* FONTS */
-@font-face {
- font-family: "OpenSans";
- src: url("../fonts/openSans.woff") format("woff");
-}
-
-
-* {
- margin: 0;
- padding: 0;
-}
-html, body {
- height: 100%;
- font-size: 95%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
-}
-
-/* LIENS */
-a {
- color: #0062BE;
- text-decoration: none;
-}
- a:hover {
- text-decoration: underline;
- }
-
-/* LISTES */
-ul, ol, dl {
- margin: 10px 0 10px 30px;
- line-height: 190%;
-}
- dd {
- margin: 0 0 10px 30px;
- }
-
-/* TITRES */
-h1, h2, h3 {
- min-height: 40px;
- margin: 15px 0 5px;
- line-height: 40px;
-}
-
-/* IMG */
-figure {
- margin: 5px 0 10px;
- text-align: center;
-}
- figcaption {
- display: inline-block;
- padding: 3px 20px;
- color: #999;
- font-style: italic;
- border-bottom: 1px solid #ccc;
- }
-img {
- height: auto;
- max-width: 100%;
- vertical-align: middle;
-}
- a img {
- border: none;
- }
-
-/* VIDEOS */
-iframe, embed, object, video {
- max-width: 100%;
-}
-
-/* FORMULAIRES */
-legend {
- display: block;
- width: 100%;
- margin: 20px 0 5px;
- padding: 5px 0;
- border-bottom: 1px solid #ddd;
- font-size: 150%;
- clear: both;
-}
-label {
- display: block;
- min-height: 25px;
- padding: 5px 0;
- font-size: 14px;
- line-height: 25px;
- cursor: pointer;
-}
-input {
- width: 180px;
-}
-textarea {
- width: 360px;
- height: 100px;
-}
-input, select, textarea {
- display: inline-block;
- max-width: 100%;
- min-height: 25px;
- padding: 5px;
- background: #fdfdfd;
- border: 1px solid #bbb;
- border-radius: 3px;
- color: #666;
- line-height: 25px;
- vertical-align: middle;
- box-shadow: 0 2px 2px #eee inset;
-}
- option {
- padding:0 .5em 0 .5em;
- }
- input[type="radio"],
- input[type="checkbox"] {
- width: 15px !important;
- min-height: 15px !important;
- }
- input:focus, select:focus, textarea:focus {
- color: #0062BE;
- border-color: #33BBFF;
- box-shadow: 0 2px 2px #DDDDFF inset;
- }
- input:invalid, select:invalid {
- border-color: red;
- box-shadow: 0 0 2px 1px red;
- }
- input:focus.extend {
- width: 300px;
- transition: width 200ms linear;
- }
-
-.form-group {
- margin: 0;
-}
- .form-group:after {
- content: "";
- display: block;
- clear: both;
- }
- .form-group.form-actions {
- min-width: 250px;
- padding: 5px 0;
- background: #f4f4f4;
- border-top: 1px solid #ddd;
- }
- .form-group.form-actions .btn {
- margin: 0 10px;
- }
- .form-group .group-name {
- display: block;
- float: left;
- width: 200px;
- padding: 10px 0;
- text-align: right;
- }
- .form-group .group-controls {
- min-width: 250px;
- min-height: 25px;
- margin: 0 0 0 220px;
- padding: 5px 0;
- }
- .form-group .group-controls .control {
- display: block;
- min-height: 30px;
- padding: 5px 0;
- line-height: 25px;
- font-size: 14px;
- }
-
-.stick {
- display: inline-block;
- white-space: nowrap;
- font-size: 0px;
- vertical-align: middle;
-}
- .stick input,
- .stick .btn {
- border-radius: 0;
- font-size: 14px;
- }
- .stick .btn:first-child,
- .stick input:first-child {
- border-radius: 3px 0 0 3px;
- }
- .stick .btn-important:first-child {
- border-right: 1px solid #06f;
- }
- .stick .btn:last-child,
- .stick input:last-child {
- border-radius: 0 3px 3px 0;
- }
- .stick .btn + .btn,
- .stick .btn + input,
- .stick .btn + .dropdown > .btn,
- .stick input + .btn,
- .stick input + input,
- .stick input + .dropdown > .btn,
- .stick .dropdown + .btn,
- .stick .dropdown + input,
- .stick .dropdown + .dropdown > .btn {
- border-left: none;
- }
- .stick input + .btn {
- border-top: 1px solid #bbb;
- }
- .stick .btn + .dropdown > .btn {
- border-left: none;
- border-radius: 0 3px 3px 0;
- }
- .stick .btn + .dropdown a {
- font-size: 12px;
- }
-
-.btn {
- display: inline-block;
- min-height: 37px;
- min-width: 15px;
- padding: 5px 10px;
- background: linear-gradient(to bottom, #fff 0%, #eee 100%);
- border-radius: 3px;
- border: 1px solid #ddd;
- border-bottom: 1px solid #aaa;
- border-right: 1px solid #aaa;
- color: #666;
- text-shadow: 0px -1px 0 #ddd;
- line-height: 20px;
- vertical-align: middle;
- cursor: pointer;
- overflow: hidden;
-}
- a.btn {
- min-height: 25px;
- line-height: 25px;
- }
- .btn:hover {
- background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
- text-decoration: none;
- }
- .btn.active,
- .btn:active,
- .dropdown-target:target ~ .btn.dropdown-toggle {
- box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa;
- background: #eee;
- }
-
- .btn-important {
- background: linear-gradient(to bottom, #0084CC, #0045CC);
- color: #fff;
- border: 1px solid #0062B7;
- text-shadow: 0px -1px 0 #aaa;
- }
- .btn-important:hover {
- background: linear-gradient(to bottom, #0066CC, #0045CC);
- }
- .btn-important:active {
- background: #0044CB;
- box-shadow: none;
- }
-
- .btn-attention {
- background: linear-gradient(to bottom, #E95B57, #BD362F);
- color: #fff;
- border: 1px solid #C44742;
- text-shadow: 0px -1px 0px #666;
- }
- .btn-attention:hover {
- background: linear-gradient(to bottom, #D14641, #BD362F);
- }
- .btn-attention:active {
- background: #BD362F;
- box-shadow: none;
- }
-
-/* NAVIGATION */
-.nav-list .nav-header,
-.nav-list .item {
- display: block;
- height: 35px;
- line-height: 35px;
-}
- .nav-list .item:hover {
- background: #fafafa;
- }
- .nav-list .item:hover a {
- color: #003388;
- }
- .nav-list .item.active {
- background: #0062BE;
- color: #fff;
- }
- .nav-list .item.active a {
- color: #fff;
- }
- .nav-list .disable {
- color: #aaa;
- background: #fafafa;
- text-align: center;
- }
- .nav-list .item > * {
- display: block;
- padding: 0 10px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .nav-list a:hover {
- text-decoration: none;
- }
- .nav-list .item.error a {
- color: #BD362F;
- }
- .nav-list .item.active.error a {
- color: #fff;
- background: #BD362F;
- }
- .nav-list .item.empty a {
- color: #f39c12;
- }
- .nav-list .item.active.empty a {
- color: #fff;
- background: #f39c12;
- }
-
- .nav-list .nav-header {
- padding: 0 10px;
- color: #888;
- background: #f4f4f4;
- border-bottom: 1px solid #ddd;
- font-weight: bold;
- text-shadow: 0 0 1px #ddd;
- }
- .nav-list .separator {
- display: block;
- height: 0;
- margin: 5px 0;
- border-bottom: 1px solid #ddd;
- }
-
- .nav-list .nav-form {
- padding: 3px;
- text-align: center;
- }
-
-.nav-head {
- display: block;
- margin: 0;
- background: linear-gradient(to bottom, #fff, #f0f0f0);
- border-bottom: 1px solid #ddd;
- text-align: right;
-}
- .nav-head .item {
- display: inline-block;
- padding: 5px 10px;
- }
-
-/* HORIZONTAL-LIST */
-.horizontal-list {
- display: table;
- table-layout: fixed;
- margin: 0;
- padding: 0;
- width: 100%;
-}
- .horizontal-list .item {
- display: table-cell;
- vertical-align: middle;
- }
-
-/* DROPDOWN */
-.dropdown {
- position: relative;
- display: inline-block;
-}
- .dropdown-target {
- display: none;
- }
-
- .dropdown-menu {
- display: none;
- min-width: 200px;
- margin: 5px 0 0;
- padding: 5px 0;
- position: absolute;
- right: 0px;
- background: #fff;
- border: 1px solid #ddd;
- border-radius: 5px;
- text-align: left;
- box-shadow: 3px 3px 3px #ddd;
- }
- .dropdown-menu:after {
- content: "";
- position: absolute;
- top: -6px;
- right: 13px;
- width: 10px;
- height: 10px;
- background: #fff;
- border-top: 1px solid #ddd;
- border-left: 1px solid #ddd;
- z-index: -10;
- transform: rotate(45deg);
- }
- .dropdown-header {
- display: block;
- padding: 0 5px;
- color: #888;
- font-weight: bold;
- font-size: 14px;
- line-height: 30px;
- }
- .dropdown-menu > .item {
- display: block;
- height: 30px;
- font-size: 90%;
- line-height: 30px;
- }
- .dropdown-menu > .item > a {
- display: block;
- padding: 0 25px;
- line-height: 30px;
- }
- .dropdown-menu > .item:hover {
- background: #0062BE;
- color: #fff;
- }
- .dropdown-menu > .item[aria-checked="true"] > a:before {
- content: '✓ ';
- font-weight: bold;
- margin: 0 0 0 -1.2em;
- padding: 0 0.2em 0 0;
- }
- .dropdown-menu > .item:hover > a {
- color: #fff;
- text-decoration: none;
- }
- .dropdown-menu .input {
- display: block;
- height: 40px;
- font-size: 90%;
- line-height: 30px;
- }
- .dropdown-menu .input select,
- .dropdown-menu .input input {
- display: block;
- height: 20px;
- width: 95%;
- margin: auto;
- padding: 2px 5px;
- border-radius: 3px;
- }
- .dropdown-menu .input select {
- width: 70%;
- height: auto;
- }
- .dropdown-menu .separator {
- display: block;
- height: 0;
- margin: 5px 0;
- border-bottom: 1px solid #ddd;
- }
- .dropdown-target:target ~ .dropdown-menu {
- display: block;
- z-index: 10;
- }
- .dropdown-close {
- display: inline;
- }
- .dropdown-close a {
- font-size: 0;
- position: fixed;
- top: 0; bottom: 0;
- left: 0; right: 0;
- display: block;
- z-index: -10;
- }
-
-/* ALERTS */
-.alert {
- display: block;
- width: 90%;
- margin: 15px auto;
- padding: 10px 15px;
- background: #f4f4f4;
- border: 1px solid #ccc;
- border-right: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
- border-radius: 5px;
- color: #aaa;
- text-shadow: 0 0 1px #eee;
-}
- .alert-head {
- margin: 0;
- font-weight: bold;
- font-size: 110%;
- }
- .alert > a {
- color: inherit;
- text-decoration: underline;
- }
- .alert-warn {
- background: #ffe;
- border: 1px solid #eeb;
- color: #c95;
- }
- .alert-success {
- background: #dfd;
- border: 1px solid #cec;
- color: #484;
- }
- .alert-error {
- background: #fdd;
- border: 1px solid #ecc;
- color: #844;
- }
-
-/* ICÔNES */
-.icon {
- display: inline-block;
- width: 16px;
- height: 16px;
- vertical-align: middle;
- line-height: 16px;
-}
-
-/* Prompt (centré) */
-.prompt > h1, .prompt > p {
- text-align:center;
-}
-.prompt > form {
- margin:1em auto 2.5em auto;
- width:10em;
-}
-.prompt .btn {
- display:block;
- margin:.5em auto;
-}
-.prompt input {
- margin:.4em auto 1.1em auto;
- width:99%;
-}
diff --git a/p/themes/Origine/metadata.json b/p/themes/Origine/metadata.json
index f93dcbc3f..59a45e8f6 100644
--- a/p/themes/Origine/metadata.json
+++ b/p/themes/Origine/metadata.json
@@ -2,6 +2,6 @@
"name": "Origine",
"author": "Marien Fressinaud",
"description": "Le thème par défaut pour FreshRSS",
- "version": 0.1,
- "files": ["global.css", "freshrss.css"]
+ "version": 0.2,
+ "files": ["template.css", "origine.css"]
}
diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css
new file mode 100644
index 000000000..1835e9ff9
--- /dev/null
+++ b/p/themes/Origine/origine.css
@@ -0,0 +1,1020 @@
+@charset "UTF-8";
+
+/*=== FONTS */
+@font-face {
+ font-family: "OpenSans";
+ src: url("../fonts/openSans.woff") format("woff");
+}
+
+/*=== GENERAL */
+/*============*/
+html, body {
+ height: 100%;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+}
+
+/*=== Links */
+a {
+ color: #0062be;
+}
+
+/*=== Forms */
+legend {
+ margin: 20px 0 5px;
+ padding: 5px 0;
+ border-bottom: 1px solid #ddd;
+ font-size: 1.4em;
+}
+label {
+ min-height: 25px;
+ padding: 5px 0;
+ cursor: pointer;
+}
+textarea {
+ width: 360px;
+ height: 100px;
+}
+input, select, textarea {
+ min-height: 25px;
+ padding: 5px;
+ background: #fdfdfd;
+ border: 1px solid #bbb;
+ border-radius: 3px;
+ color: #666;
+ line-height: 25px;
+ vertical-align: middle;
+ box-shadow: 0 2px 2px #eee inset;
+}
+option {
+ padding: 0 .5em;
+}
+input:focus, select:focus, textarea:focus {
+ color: #0062be;
+ border-color: #33bbff;
+ box-shadow: 0 2px 2px #ddddff inset;
+}
+input:invalid, select:invalid {
+ border-color: #f00;
+ box-shadow: 0 0 2px 2px #fdd inset;
+}
+input:disabled, select:disabled {
+ background: #eee;
+}
+input.extend {
+ transition: width 200ms linear;
+ -moz-transition: width 200ms linear;
+ -webkit-transition: width 200ms linear;
+ -o-transition: width 200ms linear;
+ -ms-transition: width 200ms linear;
+}
+
+/*=== Tables */
+table {
+ border-collapse: collapse;
+}
+
+tr, th, td {
+ padding: 0.5em;
+ border: 1px solid #ddd;
+}
+th {
+ background: #f6f6f6;
+}
+form td,
+form th {
+ font-weight: normal;
+ text-align: center;
+}
+
+/*=== COMPONENTS */
+/*===============*/
+/*=== Forms */
+.form-group.form-actions {
+ padding: 5px 0;
+ background: #f4f4f4;
+ border-top: 1px solid #ddd;
+}
+.form-group.form-actions .btn {
+ margin: 0 10px;
+}
+.form-group .group-name {
+ padding: 10px 0;
+ text-align: right;
+}
+.form-group .group-controls {
+ min-height: 25px;
+ padding: 5px 0;
+}
+.form-group table {
+ margin: 10px 0 0 220px;
+}
+
+/*=== Buttons */
+.stick {
+ vertical-align: middle;
+ font-size: 0;
+}
+.stick input,
+.stick .btn {
+ border-radius: 0;
+}
+.stick .btn:first-child,
+.stick input:first-child {
+ border-radius: 3px 0 0 3px;
+}
+.stick .btn-important:first-child {
+ border-right: 1px solid #06f;
+}
+.stick .btn:last-child,
+.stick input:last-child {
+ border-radius: 0 3px 3px 0;
+}
+.stick .btn + .btn,
+.stick .btn + input,
+.stick .btn + .dropdown > .btn,
+.stick input + .btn,
+.stick input + input,
+.stick input + .dropdown > .btn,
+.stick .dropdown + .btn,
+.stick .dropdown + input,
+.stick .dropdown + .dropdown > .btn {
+ border-left: none;
+}
+.stick input + .btn {
+ border-top: 1px solid #bbb;
+}
+.stick .btn + .dropdown > .btn {
+ border-left: none;
+ border-radius: 0 3px 3px 0;
+}
+
+.btn {
+ display: inline-block;
+ min-height: 37px;
+ min-width: 15px;
+ margin: 0;
+ padding: 5px 10px;
+ background: #fff;
+ background: linear-gradient(to bottom, #fff 0%, #eee 100%);
+ background: -moz-linear-gradient(top, #fff 0%, #eee 100%);
+ background: -webkit-linear-gradient(top, #fff 0%, #eee 100%);
+ background: -o-linear-gradient(top, #fff 0%, #eee 100%);
+ background: -ms-linear-gradient(top, #fff 0%, #eee 100%);
+ border-radius: 3px;
+ border: 1px solid #ddd;
+ border-bottom: 1px solid #aaa;
+ border-right: 1px solid #aaa;
+ color: #666;
+ text-shadow: 0px -1px 0 #ddd;
+ font-size: 0.9rem;
+ vertical-align: middle;
+ cursor: pointer;
+ overflow: hidden;
+}
+a.btn {
+ min-height: 25px;
+ line-height: 25px;
+}
+.btn:hover {
+ background: #f0f0f0;
+ background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
+ background: -moz-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
+ background: -webkit-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
+ background: -o-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
+ background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%);
+ text-decoration: none;
+}
+.btn.active,
+.btn:active,
+.dropdown-target:target ~ .btn.dropdown-toggle {
+ box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa;
+ background: #eee;
+}
+
+.btn-important {
+ background: #0084CC;
+ background: linear-gradient(to bottom, #0084CC, #0045CC);
+ background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%);
+ background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%);
+ background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%);
+ background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%);
+ color: #fff;
+ border: 1px solid #0062B7;
+ text-shadow: 0px -1px 0 #aaa;
+ font-weight: normal;
+}
+.btn-important:hover {
+ background: linear-gradient(to bottom, #0066CC, #0045CC);
+ background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%);
+ background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%);
+ background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%);
+ background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%);
+}
+.btn-important:active {
+ background: #0044CB;
+ box-shadow: none;
+}
+
+.btn-attention {
+ background: #E95B57;
+ background: linear-gradient(to bottom, #E95B57, #BD362F);
+ background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%);
+ background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%);
+ background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%);
+ background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%);
+ color: #fff;
+ border: 1px solid #C44742;
+ text-shadow: 0px -1px 0px #666;
+}
+.btn-attention:hover {
+ background: linear-gradient(to bottom, #D14641, #BD362F);
+ background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%);
+ background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%);
+ background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%);
+ background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%);
+}
+.btn-attention:active {
+ background: #BD362F;
+ box-shadow: none;
+}
+
+/*=== Navigation */
+.nav-list .nav-header,
+.nav-list .item {
+ height: 2.5em;
+ line-height: 2.5em;
+ font-size: 0.9rem;
+}
+.nav-list .item:hover {
+ background: #fafafa;
+}
+.nav-list .item:hover a {
+ color: #003388;
+}
+.nav-list .item.active {
+ background: #0062BE;
+ color: #fff;
+}
+.nav-list .item.active a {
+ color: #fff;
+}
+.nav-list .disable {
+ color: #aaa;
+ background: #fafafa;
+ text-align: center;
+}
+.nav-list .item > a {
+ padding: 0 10px;
+}
+.nav-list a:hover {
+ text-decoration: none;
+}
+.nav-list .item.empty a {
+ color: #f39c12;
+}
+.nav-list .item.active.empty a {
+ color: #fff;
+ background: #f39c12;
+}
+.nav-list .item.error a {
+ color: #BD362F;
+}
+.nav-list .item.active.error a {
+ color: #fff;
+ background: #BD362F;
+}
+
+.nav-list .nav-header {
+ padding: 0 10px;
+ color: #888;
+ background: #f4f4f4;
+ border-bottom: 1px solid #ddd;
+ font-weight: bold;
+ text-shadow: 0 0 1px #ddd;
+}
+
+.nav-list .nav-form {
+ padding: 3px;
+ text-align: center;
+}
+
+.nav-head {
+ margin: 0;
+ background: #fff;
+ background: linear-gradient(to bottom, #fff, #f0f0f0);
+ background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ border-bottom: 1px solid #ddd;
+ text-align: right;
+}
+.nav-head .item {
+ padding: 5px 10px;
+ font-size: 0.9rem;
+ line-height: 1.5rem;
+}
+
+/*=== Horizontal-list */
+.horizontal-list {
+ margin: 0;
+ padding: 0;
+}
+.horizontal-list .item {
+ vertical-align: middle;
+}
+
+/*=== Dropdown */
+.dropdown-menu {
+ margin: 5px 0 0;
+ padding: 5px 0;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ box-shadow: 3px 3px 3px #ddd;
+ font-size: 0.8rem;
+ text-align: left;
+}
+.dropdown-menu:after {
+ content: "";
+ position: absolute;
+ top: -6px;
+ right: 13px;
+ width: 10px;
+ height: 10px;
+ background: #fff;
+ border-top: 1px solid #ddd;
+ border-left: 1px solid #ddd;
+ z-index: -10;
+ transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -webkit-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+}
+.dropdown-header {
+ padding: 0 5px 5px;
+ color: #888;
+ font-weight: bold;
+ text-align: left;
+}
+.dropdown-menu > .item {
+}
+.dropdown-menu > .item > a {
+ padding: 0 25px;
+ line-height: 2.5em;
+}
+.dropdown-menu > .item:hover {
+ background: #0062BE;
+ color: #fff;
+}
+.dropdown-menu > .item[aria-checked="true"] > a:before {
+ font-weight: bold;
+ margin: 0 0 0 -14px;
+}
+.dropdown-menu > .item:hover > a {
+ color: #fff;
+ text-decoration: none;
+}
+.dropdown-menu .input select,
+.dropdown-menu .input input {
+ margin: 0 auto 5px;
+ padding: 2px 5px;
+ border-radius: 3px;
+}
+
+.separator {
+ margin: 5px 0;
+ border-bottom: 1px solid #ddd;
+}
+
+/*=== Alerts */
+.alert {
+ margin: 15px auto;
+ padding: 10px 15px;
+ background: #f4f4f4;
+ border: 1px solid #ccc;
+ border-right: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
+ border-radius: 5px;
+ color: #aaa;
+ text-shadow: 0 0 1px #eee;
+ font-size: 0.9em;
+}
+.alert-head {
+ font-size: 1.2em;
+}
+.alert > a {
+ color: inherit;
+ text-decoration: underline;
+}
+.alert-warn {
+ background: #ffe;
+ border: 1px solid #eeb;
+ color: #c95;
+}
+.alert-success {
+ background: #dfd;
+ border: 1px solid #cec;
+ color: #484;
+}
+.alert-error {
+ background: #fdd;
+ border: 1px solid #ecc;
+ color: #844;
+}
+
+/*=== Pagination */
+.pagination {
+ background: #fafafa;
+ text-align: center;
+ color: #333;
+ font-size: 0.8em;
+}
+.content .pagination {
+ margin: 0;
+ padding: 0;
+}
+.pagination .item.pager-current {
+ font-weight: bold;
+ font-size: 1.5em;
+}
+.pagination .item a {
+ display: block;
+ color: #333;
+ font-style: italic;
+ line-height: 3em;
+ text-decoration: none;
+}
+.pagination .item a:hover {
+ background: #ddd;
+}
+.pagination:first-child .item {
+ border-bottom: 1px solid #aaa;
+}
+.pagination:last-child .item {
+ border-top: 1px solid #aaa;
+}
+
+.pagination .loading,
+.pagination a:hover.loading {
+ background: url("loader.gif") center center no-repeat #fff;
+ font-size: 0;
+}
+
+/*=== STRUCTURE */
+/*===============*/
+/*=== Header */
+.header {
+ background: #f4f4f4;
+}
+.header > .item {
+ padding: 10px 0;
+ border-bottom: 1px solid #aaa;
+ vertical-align: middle;
+ text-align: center;
+}
+.header > .item.title h1 {
+ text-shadow: 1px -1px 0 #ccc;
+}
+.header > .item.title h1 a {
+ text-decoration: none;
+}
+.header > .item.search input {
+ width: 230px;
+}
+.header .item.search input:focus {
+ width: 350px;
+}
+
+/*=== Body */
+#global {
+ background: #fafafa;
+}
+.aside {
+ border-right: 1px solid #aaa;
+ background: #fff;
+}
+.aside.aside_flux {
+ padding: 10px 0 40px;
+}
+
+/*=== Aside main page (categories) */
+.categories {
+ text-align: center;
+}
+.category {
+ width: 235px;
+ margin: 10px auto;
+ text-align: left;
+}
+.category .btn:first-child {
+ position: relative;
+ width: 213px;
+}
+.category.stick .btn:first-child {
+ width: 176px;
+}
+.category .btn:first-child:not([data-unread="0"]):after {
+ position: absolute;
+ top: 3px; right: 3px;
+ padding: 1px 5px;
+ background: #ccc;
+ color: #fff;
+ border: 1px solid #bbb;
+ border-radius: 5px;
+ box-shadow: 1px 3px 3px #aaa inset;
+ text-shadow: 0 0 1px #aaa;
+}
+
+/*=== Aside main page (feeds) */
+.categories .feeds .item.active {
+ background: #0062BE;
+}
+.categories .feeds .item.active .feed {
+ color: #fff;
+}
+.categories .feeds .item.empty .feed {
+ color: #e67e22;
+}
+.categories .feeds .item.empty.active {
+ background: #e67e22;
+}
+.categories .feeds .item.empty.active .feed {
+ color: #fff;
+}
+.categories .feeds .item.error .feed {
+ color: #BD362F;
+}
+.categories .feeds .item .feed {
+ margin: 0;
+ width: 165px;
+ line-height: 3em;
+ font-size: 0.8em;
+ text-align: left;
+ text-decoration: none;
+}
+.categories .feeds .feed:not([data-unread="0"]) {
+ font-weight: bold;
+}
+.categories .feeds .dropdown-menu:after {
+ left: 2px;
+}
+.categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon,
+.categories .feeds .item:hover .dropdown-toggle > .icon,
+.categories .feeds .item.active .dropdown-toggle > .icon {
+ background-color: #fff;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+/*=== Configuration pages */
+.post {
+ padding: 10px 50px;
+ font-size: 0.9em;
+}
+.post form {
+ margin: 10px 0;
+}
+.post.content {
+ max-width: 550px;
+}
+
+/*=== Prompt (centered) */
+.prompt {
+ text-align: center;
+}
+.prompt label {
+ text-align: left;
+}
+.prompt form {
+ margin: 10px auto 20px auto;
+ width: 180px;
+}
+.prompt input {
+ margin: 5px auto;
+ width: 100%;
+}
+.prompt p {
+ margin: 20px 0;
+}
+
+/*=== New article notification */
+#new-article {
+ background: #0084CC;
+ text-align: center;
+ font-size: 0.9em;
+}
+#new-article:hover {
+ background: #0066CC;
+}
+#new-article > a {
+ line-height: 3em;
+ color: #fff;
+ font-weight: bold;
+}
+#new-article > a:hover {
+ text-decoration: none;
+}
+
+/*=== Day indication */
+.day {
+ padding: 0 10px;
+ font-weight: bold;
+ line-height: 3em;
+ background: #fff;
+ border-top: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
+}
+#new-article + .day {
+ border-top: none;
+}
+.day .name {
+ padding: 0 10px 0 0;
+ color: #aab;
+ font-size: 1.8em;
+ opacity: 0.3;
+ text-shadow: 0px -1px 0px #666;
+ font-style: italic;
+ text-align: right;
+}
+
+/*=== Index menu */
+.nav_menu {
+ background: #fafafa;
+ border-bottom: 1px solid #aaa;
+ text-align: center;
+ padding: 5px 0;
+}
+
+/*=== Feed articles */
+.flux {
+ border-left: 2px solid #aaa;
+ background: #fafafa;
+}
+.flux:hover {
+ background: #fff;
+}
+.flux.current {
+ border-left: 2px solid #0062BE;
+}
+.flux.not_read {
+ border-left: 2px solid #FF5300;
+ background: #FFF3ED;
+}
+.flux.not_read:not(.current):hover .item.title {
+ background: #FFF3ED;
+}
+.flux.favorite {
+ border-left: 2px solid #FFC300;
+ background: #FFF6DA;
+}
+.flux.favorite:not(.current):hover .item.title {
+ background: #FFF6DA;
+}
+.flux.current {
+ background: #fff;
+}
+
+
+.flux_header {
+ border-top: 1px solid #ddd;
+ font-size: 0.8rem;
+ cursor: pointer;
+}
+.flux_header .title {
+ font-size: 0.9rem;
+}
+.flux .website .favicon {
+ padding: 5px;
+}
+.flux .date {
+ color: #666;
+ font-size: 0.7rem;
+}
+.flux:not(.current):hover .item.title {
+ top: 1px;
+}
+
+.flux .bottom {
+ font-size: 0.8rem;
+ text-align: center;
+}
+
+/*=== Content of feed articles */
+.content {
+ padding: 20px 10px;
+}
+.content > h1.title > a {
+ color: #000;
+}
+
+.content hr {
+ margin: 30px 10px;
+ height: 1px;
+ background: #ddd;
+ border: 0;
+ box-shadow: 0 2px 5px #ccc;
+}
+
+.content pre {
+ margin: 10px auto;
+ padding: 10px 20px;
+ overflow: auto;
+ background: #222;
+ color: #fff;
+ font-size: 0.9rem;
+ border-radius: 3px;
+}
+.content code {
+ padding: 2px 5px;
+ color: #dd1144;
+ background: #fafafa;
+ border: 1px solid #eee;
+ border-radius: 3px;
+}
+.content pre code {
+ background: transparent;
+ color: #fff;
+ border: none;
+}
+
+.content blockquote {
+ display: block;
+ margin: 0;
+ padding: 5px 20px;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ background: #fafafa;
+ color: #333;
+}
+.content blockquote p {
+ margin: 0;
+}
+
+/*=== Notification and actualize notification */
+.notification {
+ padding: 0 0 0 5px;
+ text-align: center;
+ border: 1px solid #eeb;
+ border-radius: 3px;
+ box-shadow: 0 0 5px #ddd;
+ font-weight: bold;
+ font-size: 0.9em;
+ line-height: 3em;
+ z-index: 10;
+ vertical-align: middle;
+}
+.notification.good {
+ background: #ffe;
+ border: 1px solid #eeb;
+ color: #c95;
+}
+.notification.bad {
+ background: #fdd;
+ border: 1px solid #ecc;
+ color: #844;
+}
+.notification a.close {
+ padding: 0 15px;
+ line-height: 3em;
+}
+.notification.good a.close:hover {
+ background: #eeb;
+}
+.notification.bad a.close:hover {
+ background: #ecc;
+}
+
+.notification#actualizeProgress {
+ line-height: 2em;
+}
+
+/*=== "Load more" part */
+#bigMarkAsRead {
+ text-align: center;
+ text-decoration: none;
+ text-shadow: 0 -1px 0 #aaa;
+ color: #666;
+ background: #fafafa;
+}
+#bigMarkAsRead:hover {
+ color: #000;
+ background: #ccc;
+ background: radial-gradient(circle at 50% -25% , #ccc 0%, #fafafa 50%);
+ background: -moz-radial-gradient(circle at 50% -25% , #ccc 0%, #fafafa 50%);
+ background: -webkit-radial-gradient(circle at 50% -25% , #ccc 0%, #fafafa 50%);
+ background: -o-radial-gradient(circle at 50% -25% , #ccc 0%, #fafafa 50%);
+ background: -ms-radial-gradient(circle at 50% -25% , #ccc 0%, #fafafa 50%);
+}
+#bigMarkAsRead:hover .bigTick {
+ text-shadow: 0 0 10px #666;
+}
+
+/*=== Navigation menu (for articles) */
+#nav_entries {
+ margin: 0;
+ background: #fff;
+ border-top: 1px solid #ddd;
+ text-align: center;
+ line-height: 3em;
+ table-layout: fixed;
+}
+
+/*=== READER VIEW */
+/*================*/
+#stream.reader .flux {
+ padding: 0 0 50px;
+ border: none;
+ background: #f0f0f0;
+ color: #333;
+}
+#stream.reader .flux .author {
+ margin: 0 0 10px;
+ font-size: 90%;
+ color: #666;
+}
+
+/*=== GLOBAL VIEW */
+/*================*/
+#stream.global .box-category {
+ background: #fff;
+ border-radius: 5px;
+ text-align: left;
+ box-shadow: 0 0 3px #bbb;
+}
+#stream.global .category {
+ margin: 0;
+}
+#stream.global .btn {
+ width: auto;
+ height: 2em;
+ margin: 0;
+ padding: 0 10px;
+ background: #f6f6f6;
+ border: none;
+ border-bottom: 1px solid #ddd;
+ border-radius: 5px 5px 0 0;
+ line-height: 2em;
+ font-size: 1.2rem;
+}
+#stream.global .btn:not([data-unread="0"]) {
+ background: #0084CC;
+ color: #fff;
+ font-weight: bold;
+ text-shadow: none;
+}
+#stream.global .btn:first-child:not([data-unread="0"]):after {
+ top: 0; right: 5px;
+ border: 0;
+ background: none;
+ color: #fff;
+ font-weight: bold;
+ box-shadow: none;
+ text-shadow: none;
+}
+#stream.global .box-category .feeds {
+ max-height: 250px;
+}
+#stream.global .box-category .feeds .item {
+ padding: 2px 10px;
+ font-size: 0.9rem;
+}
+
+/*=== DIVERS */
+/*===========*/
+.aside.aside_feed .nav-form input,
+.aside.aside_feed .nav-form select {
+ width: 140px;
+}
+.aside.aside_feed .nav-form .dropdown .dropdown-menu {
+ right: -20px;
+}
+.aside.aside_feed .nav-form .dropdown .dropdown-menu:after {
+ right: 33px;
+}
+
+/*=== STATISTICS */
+/*===============*/
+.stat {
+ margin: 10px 0 20px;
+}
+
+.stat th,
+.stat td,
+.stat tr {
+ border: none;
+}
+.stat > table td,
+.stat > table th {
+ border-bottom: 1px solid #ddd;
+ text-align: center;
+}
+
+/*=== LOGS */
+/*=========*/
+.logs {
+ border: 1px solid #aaa;
+ border-radius: 5px;
+ overflow: hidden;
+}
+.log {
+ padding: 5px 10px;
+ background: #fafafa;
+ color: #333;
+ font-size: 90%;
+}
+.log+.log {
+ border-top: 1px solid #aaa;
+}
+.log .date {
+ display: block;
+ font-weight: bold;
+}
+.log.error {
+ background: #fdd;
+ color: #844;
+}
+.log.warning {
+ background: #ffe;
+ color: #c95;
+}
+.log.notice {
+ background: #f4f4f4;
+ color: #aaa;
+}
+.log.debug {
+ background: #333;
+ color: #eee;
+}
+
+/*=== MOBILE */
+/*===========*/
+@media(max-width: 840px) {
+ .aside {
+ box-shadow: 3px 0 3px #aaa;
+ transition: width 200ms linear;
+ -moz-transition: width 200ms linear;
+ -webkit-transition: width 200ms linear;
+ -o-transition: width 200ms linear;
+ -ms-transition: width 200ms linear;
+ }
+ .aside .toggle_aside,
+ #panel .close {
+ position: absolute;
+ display: block;
+ top: 0; right: 0;
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+ background: #f6f6f6;
+ border-left: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ border-radius: 0 0 0 5px;
+ }
+
+ .nav_menu .btn {
+ margin: 5px 10px;
+ }
+ .nav_menu .stick {
+ margin: 0 10px;
+ }
+ .nav_menu .stick .btn {
+ margin: 5px 0;
+ }
+ .nav_menu .search {
+ display: inline-block;
+ max-width: 97%;
+ }
+ .nav_menu .search input {
+ max-width: 97%;
+ width: 90px;
+ }
+ .nav_menu .search input:focus {
+ width: 400px;
+ }
+
+ .day .name {
+ font-size: 1.1rem;
+ text-shadow: none;
+ }
+
+ .flux_header .item.website .favicon {
+ padding: 12px;
+ }
+
+ .pagination {
+ margin: 0 0 3.5em;
+ }
+
+ .notification a.close {
+ display: block;
+ left: 0;
+ background: transparent;
+ }
+ .notification a.close:hover {
+ opacity: 0.5;
+ }
+ .notification a.close .icon {
+ display: none;
+ }
+}
diff --git a/p/themes/Origine/template.css b/p/themes/Origine/template.css
new file mode 100644
index 000000000..f68fdfca3
--- /dev/null
+++ b/p/themes/Origine/template.css
@@ -0,0 +1,686 @@
+@charset "UTF-8";
+
+/*=== GENERAL */
+/*============*/
+html, body {
+ margin: 0;
+ padding: 0;
+ font-size: 100%;
+}
+
+/*=== Links */
+a {
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
+
+/*=== Lists */
+ul, ol, dd {
+ margin: 0;
+ padding: 0;
+}
+
+/*=== Titles */
+h1 {
+ margin: 0.6em 0 0.3em;
+ font-size: 1.5em;
+ line-height: 1.6em;
+}
+h2 {
+ margin: 0.5em 0 0.25em;
+ font-size: 1.3em;
+ line-height: 2em;
+}
+h3 {
+ margin: 0.5em 0 0.25em;
+ font-size: 1.1em;
+ line-height: 2em;
+}
+
+/*=== Paragraphs */
+p {
+ margin: 1em 0 0.5em;
+ font-size: 1em;
+}
+
+/*=== Images */
+img {
+ height: auto;
+ max-width: 100%;
+}
+img.favicon {
+ height: 16px;
+ width: 16px;
+ vertical-align: middle;
+}
+
+/*=== Videos */
+iframe, embed, object, video {
+ max-width: 100%;
+}
+
+/*=== Forms */
+legend {
+ display: block;
+ width: 100%;
+ clear: both;
+}
+label {
+ display: block;
+}
+input {
+ width: 180px;
+}
+textarea {
+ width: 300px;
+}
+input, select, textarea {
+ display: inline-block;
+ max-width: 100%;
+}
+input[type="radio"],
+input[type="checkbox"] {
+ width: 15px !important;
+ min-height: 15px !important;
+}
+input.extend:focus {
+ width: 300px;
+}
+
+/*=== COMPONENTS */
+/*===============*/
+/*=== Forms */
+.form-group:after {
+ content: "";
+ display: block;
+ clear: both;
+}
+.form-group.form-actions {
+ min-width: 250px;
+}
+.form-group .group-name {
+ display: block;
+ float: left;
+ width: 200px;
+}
+.form-group .group-controls {
+ min-width: 250px;
+ margin: 0 0 0 220px;
+}
+.form-group .group-controls .control {
+ display: block;
+}
+
+/*=== Buttons */
+.stick {
+ display: inline-block;
+ white-space: nowrap;
+}
+.btn,
+a.btn {
+ display: inline-block;
+ cursor: pointer;
+ overflow: hidden;
+}
+.btn-important {
+ font-weight: bold;
+}
+
+/*=== Navigation */
+.nav-list .nav-header,
+.nav-list .item {
+ display: block;
+}
+.nav-list .item,
+.nav-list .item > a {
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.nav-head {
+ display: block;
+}
+.nav-head .item {
+ display: inline-block;
+}
+
+/*=== Horizontal-list */
+.horizontal-list {
+ display: table;
+ table-layout: fixed;
+ width: 100%;
+}
+.horizontal-list .item {
+ display: table-cell;
+}
+
+/*=== Dropdown */
+.dropdown {
+ position: relative;
+ display: inline-block;
+}
+.dropdown-target {
+ display: none;
+}
+.dropdown-menu {
+ display: none;
+ min-width: 200px;
+ margin: 0;
+ position: absolute;
+ right: 0;
+ background: #fff;
+ border: 1px solid #aaa;
+}
+.dropdown-header {
+ display: block;
+}
+.dropdown-menu > .item {
+ display: block;
+}
+.dropdown-menu > .item > a {
+ display: block;
+}
+.dropdown-menu > .item[aria-checked="true"] > a:before {
+ content: '✓';
+}
+.dropdown-menu .input {
+ display: block;
+}
+.dropdown-menu .input select,
+.dropdown-menu .input input {
+ display: block;
+ max-width: 95%;
+}
+.dropdown-target:target ~ .dropdown-menu {
+ display: block;
+ z-index: 10;
+}
+.dropdown-close {
+ display: inline;
+}
+.dropdown-close a {
+ font-size: 0;
+ position: fixed;
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ display: block;
+ z-index: -10;
+}
+.separator {
+ display: block;
+ height: 0;
+ border-bottom: 1px solid #aaa;
+}
+
+/*=== Alerts */
+.alert {
+ display: block;
+ width: 90%;
+}
+.alert-head {
+ margin: 0;
+ font-weight: bold;
+}
+
+/*=== Icons */
+.icon {
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ vertical-align: middle;
+ line-height: 16px;
+}
+
+/*=== Pagination */
+.pagination {
+ display: table;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ table-layout: fixed;
+}
+.pagination .item {
+ display: table-cell;
+}
+.pagination .pager-first,
+.pagination .pager-previous,
+.pagination .pager-next,
+.pagination .pager-last {
+ width: 100px;
+}
+
+/*=== STRUCTURE */
+/*===============*/
+/*=== Header */
+.header {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+}
+.header > .item {
+ display: table-cell;
+}
+.header > .item.title {
+ width: 250px;
+ white-space: nowrap;
+}
+.header > .item.title h1 {
+ display: inline-block;
+}
+.header > .item.title .logo {
+ display: inline-block;
+ height: 32px;
+ width: 32px;
+ vertical-align: middle;
+}
+.header > .item.configure {
+ width: 100px;
+}
+
+/*=== Body */
+#global {
+ display: table;
+ width: 100%;
+ height: 100%;
+ table-layout: fixed;
+}
+.aside {
+ display: table-cell;
+ height: 100%;
+ width: 250px;
+ vertical-align: top;
+}
+.aside.aside_flux {
+ background: #fff;
+}
+
+/*=== Aside main page (categories) */
+.categories {
+ list-style: none;
+ margin: 0;
+}
+.category {
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.category .btn:not([data-unread="0"]):after {
+ content: attr(data-unread);
+}
+
+/*=== Aside main page (feeds) */
+.categories .feeds {
+ width: 100%;
+ list-style: none;
+}
+.categories .feeds:not(.active) {
+ display: none;
+}
+.categories .feeds .feed {
+ display: inline-block;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+}
+.categories .feeds .feed:not([data-unread="0"]):before {
+ content: "(" attr(data-unread) ") ";
+}
+.categories .feeds .dropdown-menu {
+ left: 0;
+}
+.categories .feeds .item .dropdown-toggle > .icon {
+ visibility: hidden;
+ cursor: pointer;
+ vertical-align: top;
+}
+.categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon,
+.categories .feeds .item:hover .dropdown-toggle > .icon,
+.categories .feeds .item.active .dropdown-toggle > .icon {
+ visibility: visible;
+}
+
+/*=== New article notification */
+#new-article {
+ display: none;
+}
+#new-article > a {
+ display: block;
+}
+
+/*=== Day indication */
+.day .name {
+ position: absolute;
+ right: 0;
+ width: 50%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+/*=== Feed article header and footer */
+.flux_header {
+ position: relative;
+}
+.flux .item {
+ line-height: 40px;
+ white-space: nowrap;
+}
+.flux .item.manage,
+.flux .item.link {
+ width: 40px;
+ text-align: center;
+}
+.flux .item.website {
+ width: 200px;
+}
+.flux.not_read .item.title,
+.flux.current .item.title {
+ font-weight: bold;
+}
+.flux:not(.current):hover .item.title {
+ position: absolute;
+ max-width: calc(100% - 320px);
+ background: #fff;
+}
+.flux .item.title a {
+ color: #000;
+ text-decoration: none;
+}
+.flux .item.date {
+ width: 145px;
+ text-align: right;
+}
+.flux .item > a {
+ display: block;
+}
+.flux .item > a {
+ display: block;
+ text-decoration: none;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+.flux .item.share > a {
+ display: list-item;
+ list-style-position: inside;
+ list-style-type: decimal;
+}
+
+/*=== Feed article content */
+.hide_posts > .flux:not(.active) > .flux_content {
+ display: none;
+}
+.content {
+ min-height: 20em;
+ margin: auto;
+ line-height: 1.7em;
+ word-wrap: break-word;
+}
+.content.large {
+ max-width: 1000px;
+}
+.content.medium {
+ max-width: 800px;
+}
+.content.thin {
+ max-width: 550px;
+}
+.content ul,
+.content ol,
+.content dd {
+ margin: 0 0 0 15px;
+ padding: 0 0 5px 15px;
+}
+.content pre {
+ overflow: auto;
+}
+
+/*=== Notification and actualize notification */
+.notification {
+ position: absolute;
+ top: 1em;
+ left: 25%; right: 25%;
+ z-index: 10;
+ background: #fff;
+ border: 1px solid #aaa;
+}
+.notification.closed {
+ display: none;
+}
+.notification a.close {
+ position: absolute;
+ top: 0; bottom: 0;
+ right: 0;
+ display: inline-block;
+}
+
+#actualizeProgress {
+ position: fixed;
+}
+#actualizeProgress progress {
+ max-width: 100%;
+ vertical-align: middle;
+}
+#actualizeProgress .progress {
+ vertical-align: middle;
+}
+
+/*=== Navigation menu (for articles) */
+#nav_entries {
+ position: fixed;
+ bottom: 0; left: 0;
+ display: table;
+ width: 250px;
+ background: #fff;
+ table-layout: fixed;
+}
+#nav_entries .item {
+ display: table-cell;
+ width: 30%;
+}
+#nav_entries a {
+ display: block;
+}
+
+/*=== "Load more" part */
+#load_more {
+ min-height: 40px;
+}
+.loading {
+ background: url("loader.gif") center center no-repeat;
+ font-size: 0;
+}
+#bigMarkAsRead {
+ display: block;
+ padding: 3em 0;
+ text-align: center;
+}
+.bigTick {
+ font-size: 7em;
+ line-height: 1.6em;
+}
+
+/*=== Statistiques */
+.stat > table {
+ width: 100%;
+}
+
+/*=== GLOBAL VIEW */
+/*================*/
+/*=== Category boxes */
+#stream.global .box-category {
+ display: inline-block;
+ width: 19em;
+ max-width: 95%;
+ margin: 20px 10px;
+ border: 1px solid #ccc;
+ vertical-align: top;
+}
+#stream.global .category {
+ width: 100%;
+}
+#stream.global .btn {
+ display: block;
+}
+#stream.global .box-category .feeds {
+ display: block;
+ overflow: auto;
+}
+#stream.global .box-category .feed {
+ width: 19em;
+ max-width: 90%;
+}
+
+/*=== Panel */
+#overlay {
+ display: none;
+ position: fixed;
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ background: rgba(0, 0, 0, 0.9);
+}
+#panel {
+ display: none;
+ position: fixed;
+ top: 1em; bottom: 1em;
+ left: 2em; right: 2em;
+ overflow: auto;
+ background: #fff;
+}
+#panel .close {
+ position: fixed;
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ display: block;
+}
+#panel .close img {
+ display: none;
+}
+
+/*=== DIVERS */
+/*===========*/
+.nav-login,
+.nav_menu .search,
+.nav_menu .toggle_aside {
+ display: none;
+}
+
+.aside .toggle_aside {
+ position: absolute;
+ right: 0;
+ display: none;
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+}
+
+/*=== MOBILE */
+/*===========*/
+@media(max-width: 840px) {
+ .header,
+ .aside .btn-important,
+ .aside .feeds .dropdown,
+ .flux_header .item.website span,
+ .item.date, .day .date {
+ display: none;
+ }
+ .nav-login {
+ display: block;
+ }
+ .nav_menu .toggle_aside,
+ .aside .toggle_aside,
+ .nav_menu .search,
+ #panel .close img {
+ display: inline-block;
+ }
+
+ .aside {
+ position: fixed;
+ top: 0; bottom: 0;
+ left: 0;
+ width: 0;
+ overflow: hidden;
+ z-index: 100;
+ }
+ .aside:target {
+ width: 90%;
+ overflow: auto;
+ }
+ .aside .categories {
+ margin: 10px 0 75px;
+ }
+
+ .flux_header .item.website {
+ width: 40px;
+ }
+
+ .flux:not(.current):hover .item.title {
+ position: relative;
+ width: auto;
+ white-space: nowrap;
+ }
+
+ .notification {
+ top: 0;
+ left: 0;
+ right: 0;
+ }
+
+ #nav_entries {
+ width: 100%;
+ }
+
+ #stream.global .box-category {
+ margin: 10px 0;
+ }
+
+ #panel {
+ top: 0; bottom: 0;
+ left: 0; right: 0;
+ }
+ #panel .close {
+ top: 0; right: 0;
+ left: auto; bottom: auto;
+ display: inline-block;
+ width: 30px;
+ height: 30px;
+ }
+}
+
+/*=== PRINTER */
+/*============*/
+@media print {
+ .header, .aside,
+ .nav_menu, .day,
+ .flux_header,
+ .flux_content .bottom,
+ .pagination,
+ #nav_entries {
+ display: none;
+ }
+ html, body {
+ background: #fff;
+ color: #000;
+ font-family: Serif;
+ }
+ #global,
+ .flux_content {
+ display: block !important;
+ }
+ .flux_content .content {
+ width: 100% !important;
+ }
+ .flux_content .content a {
+ color: #000;
+ }
+ .flux_content .content a:after {
+ content: " [" attr(href) "] ";
+ font-style: italic;
+ }
+}
diff --git a/p/themes/icons/add.svg b/p/themes/icons/add.svg
index 425c9b4aa..652491775 100644
--- a/p/themes/icons/add.svg
+++ b/p/themes/icons/add.svg
@@ -1,30 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' version='1.1' inkscape:version='0.47 r22583' height='16' sodipodi:docname='list-add-symbolic.svg' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:object-paths='true' inkscape:cy='17.83946' inkscape:current-layer='layer12' inkscape:window-width='1920' pagecolor='#555753' showborder='false' showguides='true' inkscape:snap-nodes='false' objecttolerance='10' showgrid='true' inkscape:object-nodes='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:window-x='0' inkscape:snap-bbox='true' bordercolor='#666666' id='namedview88' inkscape:window-maximized='1' inkscape:snap-global='true' inkscape:window-y='26' gridtolerance='10' inkscape:zoom='1' inkscape:window-height='1021' borderopacity='1' guidetolerance='10' inkscape:snap-bbox-midpoints='false' inkscape:cx='-2.56708' inkscape:bbox-paths='false' inkscape:snap-grids='true' inkscape:pageopacity='1' inkscape:snap-to-guides='true'>
- <inkscape:grid visible='true' spacingx='1px' type='xygrid' spacingy='1px' id='grid4866' empspacing='2' enabled='true' snapvisiblegridlinesonly='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer10' inkscape:label='devices'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer11' inkscape:label='apps'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer12' inkscape:label='actions'>
-
- <path d='m 67.0002,729 0,4 -4,0 0,2 4,0 0,4 2,0 0,-4 4,0 0,-2 -4,0 0,-4 -2,0 z' id='rect31992' style='color:#666666;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible'/>
- </g>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer13' inkscape:label='places'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline'/>
- <g transform='translate(-60.0002,-726)' inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-60.0002,-726)">
+<path style="color:#666666;" fill="#666" d="m67,729,0,4-4,0,0,2,4,0,0,4,2,0,0-4,4,0,0-2-4,0,0-4-2,0z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/all.svg b/p/themes/icons/all.svg
index 2180f7a4b..aeaa96277 100644
--- a/p/themes/icons/all.svg
+++ b/p/themes/icons/all.svg
@@ -1,32 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='view-list-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='71.95215' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1198' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='1582' inkscape:snap-global='true' inkscape:window-y='85' gridtolerance='10' inkscape:window-height='1079' inkscape:snap-to-guides='true' inkscape:current-layer='layer12' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='244.57499' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer9' style='display:inline'/>
- <g inkscape:label='devices' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer12'>
-
- <rect inkscape:label='a' x='43.000397' y='748.99976' id='rect7356' height='2.0002136' width='9.9996014' style='color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible'/>
- <rect inkscape:label='a' x='43.000397' y='752.99976' id='rect7358' height='2.0002136' width='9.9996014' style='color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible'/>
- <rect inkscape:label='a' x='43.000397' y='756.99976' id='rect7360' height='2.0002136' width='9.9996014' style='color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible'/>
- </g>
- <g inkscape:label='places' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-40.0002,-746)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-40.0002,-746)" fill="#bebebe">
+<rect style="color:#bebebe;" height="2.0002" width="9.9996" y="749" x="43"/>
+<rect style="color:#bebebe;" height="2.0002" width="9.9996" y="753" x="43"/>
+<rect style="color:#bebebe;" height="2.0002" width="9.9996" y="757" x="43"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/apple-touch-icon.png b/p/themes/icons/apple-touch-icon.png
new file mode 100644
index 000000000..0bbab07ea
--- /dev/null
+++ b/p/themes/icons/apple-touch-icon.png
Binary files differ
diff --git a/p/themes/icons/bookmark.svg b/p/themes/icons/bookmark.svg
index d6e2cebb5..63a44908f 100644
--- a/p/themes/icons/bookmark.svg
+++ b/p/themes/icons/bookmark.svg
@@ -1,32 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='starred-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='0.50817' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1457' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='86' inkscape:snap-global='true' inkscape:window-y='51' gridtolerance='10' inkscape:window-height='1093' inkscape:snap-to-guides='true' inkscape:current-layer='layer9' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='19.029058' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer9' style='display:inline'>
- <g inkscape:label='folder-remote' transform='translate(-186.9996,-599)' id='g11910-1'>
-
- </g>
- <path sodipodi:cy='180.96373' sodipodi:r2='3.8276224' transform='matrix(1.0472113,-0.00871584,0.00871584,1.0472113,-504.35434,220.15425)' inkscape:rounded='0.2104596' inkscape:flatsided='false' inkscape:transform-center-x='-0.0094346789' inkscape:transform-center-y='-0.69491065' d='m 530.9488,186.70897 c -0.77941,0.55189 -3.15759,-1.90601 -4.11253,-1.9179 -0.95532,-0.0119 -3.39494,2.38585 -4.16096,1.8149 -0.76573,-0.57072 0.83698,-3.59203 0.55319,-4.50391 -0.2839,-0.91223 -3.31818,-2.49151 -3.01189,-3.39647 0.30617,-0.90461 3.67487,-0.31399 4.45442,-0.86567 0.77986,-0.5519 1.3442,-3.92569 2.29952,-3.91404 0.95494,0.0116 1.43421,3.39798 2.19979,3.9689 0.76588,0.57114 4.14893,0.0653 4.43307,0.97746 0.28402,0.9118 -2.78848,2.41405 -3.09488,3.31858 -0.30652,0.90489 1.21999,3.96605 0.44027,4.51815 z' id='path11922-0' sodipodi:type='star' sodipodi:arg1='0.95492637' sodipodi:r1='7.0383992' style='color:#000000;fill:#f1c40f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate' sodipodi:arg2='1.5829876' inkscape:randomized='0' sodipodi:cx='526.88293' sodipodi:sides='5'/>
- </g>
- <g inkscape:label='devices' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-41.000202,-397)">
+<path style="enable-background:accumulate;color:#000000;" d="m530.95,186.71c-0.77941,0.55189-3.1576-1.906-4.1125-1.9179-0.95532-0.0119-3.3949,2.3858-4.161,1.8149-0.76573-0.57072,0.83698-3.592,0.55319-4.5039-0.2839-0.91223-3.3182-2.4915-3.0119-3.3965,0.30617-0.90461,3.6749-0.31399,4.4544-0.86567,0.77986-0.5519,1.3442-3.9257,2.2995-3.914,0.95494,0.0116,1.4342,3.398,2.1998,3.9689,0.76588,0.57114,4.1489,0.0653,4.4331,0.97746,0.28402,0.9118-2.7885,2.414-3.0949,3.3186-0.30652,0.90489,1.22,3.966,0.44027,4.5182z" fill-rule="nonzero" transform="matrix(1.0472113,-0.00871584,0.00871584,1.0472113,-504.35434,220.15425)" fill="#f1c40f"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/category-white.svg b/p/themes/icons/category-white.svg
index 5e61aeea5..5bb5cecd9 100644
--- a/p/themes/icons/category-white.svg
+++ b/p/themes/icons/category-white.svg
@@ -1,31 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='folder-symbolic.svg' version='1.1' inkscape:version='0.48.0 r9654' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='-173.07332' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:window-width='1310' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='true' bordercolor='#FFFFFF' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='52' inkscape:snap-global='true' inkscape:window-y='24' gridtolerance='10' inkscape:window-height='690' inkscape:snap-to-guides='true' inkscape:current-layer='layer13' inkscape:zoom='1' inkscape:cx='-157.67647' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer9' style='display:inline'/>
- <g inkscape:label='devices' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer13'>
- <g transform='translate(234.0002,-820)' id='g14154'>
- <path inkscape:connector-curvature='0' d='m 208.53105,997 c -0.28913,0 -0.53125,0.24212 -0.53125,0.53125 l 0,13.93755 c 0,0.2985 0.23264,0.5312 0.53125,0.5312 l 14.9375,0 c 0.2986,0 0.53125,-0.2326 0.53125,-0.5312 l 0,-8.9376 c 0,-0.2891 -0.24212,-0.5312 -0.53125,-0.5312 l -12.46875,0 0,7.5 c 0,0.277 -0.223,0.5 -0.5,0.5 -0.277,0 -0.5,-0.223 -0.5,-0.5 l 0,-8 c 0,-0.277 0.223,-0.5 0.5,-0.5 l 2.96875,0 8.53125,0 0,-1.4062 c 0,-0.3272 -0.26666,-0.5938 -0.59375,-0.5938 l -7.40625,0 0,-1.46875 C 213.9998,997.2421 213.75768,997 213.46855,997 z' id='rect3845' sodipodi:nodetypes='ccccccccccsccccccccccc' style='fill:#FFFFFF;fill-opacity:1;stroke:none;display:inline'/>
-
- </g>
- </g>
- <g inkscape:label='mimetypes' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-442,-176)">
+<g transform="translate(234.0002,-820)">
+<path d="m208.53,997c-0.28913,0-0.53125,0.24212-0.53125,0.53125v13.938c0,0.2985,0.23264,0.5312,0.53125,0.5312h14.938c0.2986,0,0.53125-0.2326,0.53125-0.5312v-8.9376c0-0.2891-0.24212-0.5312-0.53125-0.5312h-12.469v7.5c0,0.277-0.223,0.5-0.5,0.5s-0.5-0.223-0.5-0.5v-8c0-0.277,0.223-0.5,0.5-0.5h2.9688,8.5312v-1.4062c0-0.3272-0.26666-0.5938-0.59375-0.5938h-7.4062v-1.4688c0-0.39-0.24-0.63-0.53-0.63z" fill="#FFF"/>
+</g>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/category.svg b/p/themes/icons/category.svg
index 71f95490e..b5470d84a 100644
--- a/p/themes/icons/category.svg
+++ b/p/themes/icons/category.svg
@@ -1,31 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='folder-symbolic.svg' version='1.1' inkscape:version='0.48.0 r9654' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='-173.07332' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:window-width='1310' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='true' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='52' inkscape:snap-global='true' inkscape:window-y='24' gridtolerance='10' inkscape:window-height='690' inkscape:snap-to-guides='true' inkscape:current-layer='layer13' inkscape:zoom='1' inkscape:cx='-157.67647' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer9' style='display:inline'/>
- <g inkscape:label='devices' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer13'>
- <g transform='translate(234.0002,-820)' id='g14154'>
- <path inkscape:connector-curvature='0' d='m 208.53105,997 c -0.28913,0 -0.53125,0.24212 -0.53125,0.53125 l 0,13.93755 c 0,0.2985 0.23264,0.5312 0.53125,0.5312 l 14.9375,0 c 0.2986,0 0.53125,-0.2326 0.53125,-0.5312 l 0,-8.9376 c 0,-0.2891 -0.24212,-0.5312 -0.53125,-0.5312 l -12.46875,0 0,7.5 c 0,0.277 -0.223,0.5 -0.5,0.5 -0.277,0 -0.5,-0.223 -0.5,-0.5 l 0,-8 c 0,-0.277 0.223,-0.5 0.5,-0.5 l 2.96875,0 8.53125,0 0,-1.4062 c 0,-0.3272 -0.26666,-0.5938 -0.59375,-0.5938 l -7.40625,0 0,-1.46875 C 213.9998,997.2421 213.75768,997 213.46855,997 z' id='rect3845' sodipodi:nodetypes='ccccccccccsccccccccccc' style='fill:#666666;fill-opacity:1;stroke:none;display:inline'/>
-
- </g>
- </g>
- <g inkscape:label='mimetypes' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-442,-176)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-442,-176)">
+<g transform="translate(234.0002,-820)">
+<path d="m208.53,997c-0.28913,0-0.53125,0.24212-0.53125,0.53125v13.938c0,0.2985,0.23264,0.5312,0.53125,0.5312h14.938c0.2986,0,0.53125-0.2326,0.53125-0.5312v-8.9376c0-0.2891-0.24212-0.5312-0.53125-0.5312h-12.469v7.5c0,0.277-0.223,0.5-0.5,0.5s-0.5-0.223-0.5-0.5v-8c0-0.277,0.223-0.5,0.5-0.5h2.9688,8.5312v-1.4062c0-0.3272-0.26666-0.5938-0.59375-0.5938h-7.4062v-1.4688c0-0.39-0.24-0.63-0.53-0.63z" fill="#666"/>
+</g>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/close.svg b/p/themes/icons/close.svg
index c0c786fd6..20d1577ab 100644
--- a/p/themes/icons/close.svg
+++ b/p/themes/icons/close.svg
@@ -1,28 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' version='1.1' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs id='defs7386'/>
- <g transform='translate(-60,-518)' id='layer9' style='display:inline'/>
- <g transform='translate(-60,-518)' id='layer10'/>
- <g transform='translate(-60,-518)' id='layer11'/>
- <g transform='translate(-60,-518)' id='layer12'>
- <g transform='translate(19,-242)' id='layer4-4-1' style='display:inline'>
-
- <path inkscape:connector-curvature='0' d='m 45,764 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 L 49,766.59375 51.3125,764.3125 C 51.578125,764.082 51.759172,764.007 52,764 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 C 52.906938,770.46942 52.999992,770.7347 53,771 l 0,1 -1,0 c -0.265301,-10e-6 -0.530586,-0.0931 -0.71875,-0.28125 L 49,769.4375 46.71875,771.71875 C 46.530586,771.90694 46.26529,772 46,772 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 L 45.28125,765.75 C 45.070508,765.55537 44.97809,765.28075 45,765 l 0,-1 z' id='path10839-9' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono'/>
- </g>
- </g>
- <g transform='translate(-60,-518)' id='layer13'/>
- <g transform='translate(-60,-518)' id='layer14'/>
- <g transform='translate(-60,-518)' id='layer15'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-60,-518)">
+<g transform="translate(19,-242)">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m45,764,1,0c0.01037-0.00012,0.02079-0.00046,0.03125,0,0.25495,0.0112,0.50987,0.12858,0.6875,0.3125l2.282,2.28,2.312-2.28c0.266-0.23,0.447-0.3,0.688-0.31h1v1c0,0.28647-0.03434,0.55065-0.25,0.75l-2.2812,2.2812,2.25,2.25c0.188,0.19,0.281,0.45,0.281,0.72v1h-1c-0.2653-0.00001-0.53059-0.0931-0.71875-0.28125l-2.281-2.28-2.281,2.28c-0.188,0.19-0.454,0.28-0.719,0.28h-1v-1c-0.000003-0.26529,0.09306-0.53058,0.28125-0.71875l2.2812-2.25-2.281-2.28c-0.21-0.19-0.303-0.47-0.281-0.75v-1z" fill-rule="nonzero" fill="#bebebe"/>
+</g>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/configure.svg b/p/themes/icons/configure.svg
index 52df8bca7..2957a7abe 100644
--- a/p/themes/icons/configure.svg
+++ b/p/themes/icons/configure.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns='http://www.w3.org/2000/svg' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' width='16' sodipodi:docname='emblem-system-symbolic.svg' height='16' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' version='1.1' inkscape:version='0.48.1 r9760'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:window-height='967' inkscape:snap-bbox-midpoints='false' inkscape:snap-grids='true' inkscape:object-paths='false' pagecolor='#555753' inkscape:zoom='1' inkscape:current-layer='layer15' borderopacity='1' inkscape:snap-others='false' inkscape:window-x='2259' inkscape:window-y='356' inkscape:snap-to-guides='true' gridtolerance='10' id='namedview88' inkscape:snap-global='true' inkscape:cx='9.30971' inkscape:cy='-0.23089111' bordercolor='#666666' inkscape:window-width='1226' inkscape:snap-bbox='true' guidetolerance='10' showguides='true' showborder='false' inkscape:guide-bbox='true' inkscape:object-nodes='false' inkscape:pageopacity='1' inkscape:window-maximized='0' objecttolerance='10' showgrid='false' inkscape:snap-nodes='true' inkscape:bbox-paths='false' inkscape:pageshadow='2'>
- <inkscape:grid visible='true' spacingx='1px' spacingy='1px' id='grid4866' type='xygrid' empspacing='2' enabled='true' snapvisiblegridlinesonly='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' id='layer9' style='display:inline' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='devices' id='layer10' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='apps' id='layer11' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='places' id='layer13' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='mimetypes' id='layer14' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='emblems' id='layer15' style='display:inline' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'>
-
- <path id='path35543-6-4' d='m 449.0004,402.00002 c -0.22065,0 -0.44081,0.0113 -0.65625,0.0312 l -0.40625,2.09375 c -0.33446,0.0733 -0.66305,0.17589 -0.96875,0.3125 l -1.53125,-1.46875 c -0.38863,0.23011 -0.72695,0.51408 -1.0625,0.8125 l 0.90625,1.90625 c -0.22242,0.24899 -0.42425,0.5225 -0.59375,0.8125 l -2.09375,-0.28125 c -0.17772,0.40877 -0.30872,0.83637 -0.40625,1.28125 l 1.84375,1 c -0.0171,0.16809 -0.0312,0.3274 -0.0312,0.5 0,0.1726 0.0142,0.33191 0.0312,0.5 l -1.84375,1 c 0.0975,0.44488 0.22853,0.87248 0.40625,1.28125 l 2.09375,-0.28125 c 0.1695,0.29 0.37133,0.56351 0.59375,0.8125 l -0.90625,1.90625 c 0.33555,0.29842 0.67387,0.58239 1.0625,0.8125 l 1.53125,-1.46875 c 0.3057,0.13661 0.63429,0.23916 0.96875,0.3125 l 0.40625,2.09375 c 0.21544,0.02 0.4356,0.0312 0.65625,0.0312 0.22065,0 0.44081,-0.0113 0.65625,-0.0312 l 0.40625,-2.09375 c 0.33446,-0.0733 0.66305,-0.17589 0.96875,-0.3125 l 1.53125,1.46875 c 0.38863,-0.23011 0.72695,-0.51408 1.0625,-0.8125 l -0.90625,-1.90625 c 0.22242,-0.24899 0.42425,-0.5225 0.59375,-0.8125 l 2.09375,0.28125 c 0.17772,-0.40877 0.30872,-0.83637 0.40625,-1.28125 l -1.84375,-1 c 0.0171,-0.16809 0.0312,-0.3274 0.0312,-0.5 0,-0.1726 -0.0142,-0.33191 -0.0312,-0.5 l 1.84375,-1 c -0.0975,-0.44488 -0.22853,-0.87248 -0.40625,-1.28125 l -2.09375,0.28125 c -0.1695,-0.29 -0.37133,-0.56351 -0.59375,-0.8125 l 0.90625,-1.90625 c -0.33555,-0.29842 -0.67387,-0.58239 -1.0625,-0.8125 l -1.53125,1.46875 c -0.3057,-0.13661 -0.63429,-0.23916 -0.96875,-0.3125 l -0.40625,-2.09375 c -0.21544,-0.02 -0.4356,-0.0312 -0.65625,-0.0312 z m 0,4 c 1.65685,0 3,1.34315 3,3 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 z' style='color:#666666;fill:#666666;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate' inkscape:connector-curvature='0' sodipodi:nodetypes='sccccccccccsccccccccccsccccccccccsccccccccccssssss'/>
- </g>
- <g inkscape:label='emotes' id='g71291' style='display:inline' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='categories' id='g4953' style='display:inline' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
- <g inkscape:label='actions' id='layer12' style='display:inline' transform='translate(-441.0002,-400.99999)' inkscape:groupmode='layer'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-441.0002,-400.99999)">
+<path style="color:#666666;enable-background:accumulate;" d="m449,402c-0.22065,0-0.44081,0.0113-0.65625,0.0312l-0.40625,2.0938c-0.33446,0.0733-0.66305,0.17589-0.96875,0.3125l-1.5312-1.4688c-0.38863,0.23011-0.72695,0.51408-1.0625,0.8125l0.90625,1.9062c-0.22242,0.24899-0.42425,0.5225-0.59375,0.8125l-2.0938-0.28125c-0.17772,0.40877-0.30872,0.83637-0.40625,1.2812l1.8438,1c-0.0171,0.16809-0.0312,0.3274-0.0312,0.5s0.0142,0.33191,0.0312,0.5l-1.8438,1c0.0975,0.44488,0.22853,0.87248,0.40625,1.2812l2.0938-0.28125c0.1695,0.29,0.37133,0.56351,0.59375,0.8125l-0.90625,1.9062c0.33555,0.29842,0.67387,0.58239,1.0625,0.8125l1.5312-1.4688c0.3057,0.13661,0.63429,0.23916,0.96875,0.3125l0.40625,2.0938c0.21544,0.02,0.4356,0.0312,0.65625,0.0312s0.44081-0.0113,0.65625-0.0312l0.40625-2.0938c0.33446-0.0733,0.66305-0.17589,0.96875-0.3125l1.5312,1.4688c0.38863-0.23011,0.72695-0.51408,1.0625-0.8125l-0.90625-1.9062c0.22242-0.24899,0.42425-0.5225,0.59375-0.8125l2.0938,0.28125c0.17772-0.40877,0.30872-0.83637,0.40625-1.2812l-1.8438-1c0.0171-0.16809,0.0312-0.3274,0.0312-0.5s-0.0142-0.33191-0.0312-0.5l1.8438-1c-0.0975-0.44488-0.22853-0.87248-0.40625-1.2812l-2.0938,0.28125c-0.1695-0.29-0.37133-0.56351-0.59375-0.8125l0.90625-1.9062c-0.33555-0.29842-0.67387-0.58239-1.0625-0.8125l-1.5312,1.4688c-0.3057-0.13661-0.63429-0.23916-0.96875-0.3125l-0.40625-2.0938c-0.21544-0.02-0.4356-0.0312-0.65625-0.0312zm0,4c1.6568,0,3,1.3432,3,3s-1.3432,3-3,3-3-1.3432-3-3,1.3432-3,3-3z" fill-rule="nonzero" fill="#666"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/down.svg b/p/themes/icons/down.svg
index 06d031fae..8a234ee99 100644
--- a/p/themes/icons/down.svg
+++ b/p/themes/icons/down.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='go-down-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.4 r9939' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-nodes='false' inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer12' inkscape:cx='18.648774' inkscape:cy='9.99302' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1408' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='0' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='60px' originy='530px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-181.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-181.0002,-747)'>
-
- <path inkscape:connector-curvature='0' d='m 195.03152,751.00323 0,1.00001 c -9.1e-4,0.0111 5.9e-4,0.021 -9e-5,0.0312 -0.0112,0.25496 -0.12835,0.50994 -0.31251,0.6875 l -5.71875,6.29767 -5.71875,-6.29773 c -0.18821,-0.1881 -0.28121,-0.45346 -0.28122,-0.71875 l 0,-1.00001 1,0 c 0.26531,7e-5 0.53059,0.0931 0.71873,0.28131 l 4.28125,4.82896 4.28127,-4.82896 c 0.19464,-0.21073 0.46925,-0.30315 0.74998,-0.2813 z' id='path10839-9-9-5-9-1' sodipodi:nodetypes='ccsccccccccccc' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono'/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-181.0002,-747)">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m195.03,751,0,1c-0.00091,0.0111,0.00059,0.021-0.00009,0.0312-0.0112,0.25496-0.12835,0.50994-0.31251,0.6875l-5.7188,6.2977-5.7188-6.2977c-0.18821-0.1881-0.28121-0.45346-0.28122-0.71875v-1h1c0.26531,0.00007,0.53059,0.0931,0.71873,0.28131l4.2812,4.829,4.2813-4.829c0.19464-0.21073,0.46925-0.30315,0.74998-0.2813z" fill-rule="nonzero" fill="#bebebe"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/favicon.svg b/p/themes/icons/favicon.svg
index a44f0a1c0..a252050b9 100644
--- a/p/themes/icons/favicon.svg
+++ b/p/themes/icons/favicon.svg
@@ -1,11 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
<title>Logo FreshRSS</title>
-
<circle fill="#FFF" cx="128" cy="128" r="128"/>
-
<circle fill="#0062BE" cx="128" cy="128" r="33"/>
-
<g fill="none" stroke="#0062BE" stroke-width="24">
<g stroke-opacity="0.3">
<path d="M12,128 A116,116 0 1,1 128,244"/>
diff --git a/p/themes/icons/help.svg b/p/themes/icons/help.svg
index b103ec46d..9a0022f76 100644
--- a/p/themes/icons/help.svg
+++ b/p/themes/icons/help.svg
@@ -1,32 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' version='1.1' inkscape:version='0.47 r22583' height='16' sodipodi:docname='help-browser-symbolic.svg' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:object-paths='true' inkscape:cy='-218.16054' inkscape:current-layer='layer11' inkscape:window-width='1920' pagecolor='#555753' showborder='false' showguides='true' inkscape:snap-nodes='false' objecttolerance='10' showgrid='true' inkscape:object-nodes='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:window-x='0' inkscape:snap-bbox='true' bordercolor='#666666' id='namedview88' inkscape:window-maximized='1' inkscape:snap-global='true' inkscape:window-y='26' gridtolerance='10' inkscape:zoom='1' inkscape:window-height='1021' borderopacity='1' guidetolerance='10' inkscape:snap-bbox-midpoints='false' inkscape:cx='-124.56688' inkscape:bbox-paths='false' inkscape:snap-grids='true' inkscape:pageopacity='1' inkscape:snap-to-guides='true'>
- <inkscape:grid visible='true' spacingx='1px' type='xygrid' spacingy='1px' id='grid4866' empspacing='2' enabled='true' snapvisiblegridlinesonly='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer10' inkscape:label='devices'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer11' inkscape:label='apps'>
- <path d='m 190,490 c -4.4147,0 -8,3.5853 -8,8 0,4.4147 3.5853,8 8,8 4.4147,0 8,-3.5853 8,-8 0,-4.4147 -3.5853,-8 -8,-8 z m 0,2 c 3.3413,0 6,2.6587 6,6 0,3.3413 -2.6587,6 -6,6 -3.3413,0 -6,-2.6587 -6,-6 0,-3.3413 2.6587,-6 6,-6 z' id='rect11749-5-0-3' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans'/>
-
- <path d='M 189.34375,495 C 188.05763,495 187,496.05763 187,497.34375 l 0,1.3125 c 0,1.28612 1.05763,2.34375 2.34375,2.34375 l 1.3125,0 C 191.94237,501 193,499.94237 193,498.65625 l 0,-1.3125 C 193,496.05763 191.94237,495 190.65625,495 l -1.3125,0 z m 0,1 1.3125,0 c 0.74942,0 1.34375,0.59433 1.34375,1.34375 l 0,1.3125 C 192,499.40567 191.40567,500 190.65625,500 l -1.3125,0 C 188.59433,500 188,499.40567 188,498.65625 l 0,-1.3125 C 188,496.59433 188.59433,496 189.34375,496 z' id='rect11749-5-0-3-3' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans'/>
- <path inkscape:connector-curvature='0' d='m 186.71875,491.4375 c -1.51031,0.6073 -2.6811,1.7985 -3.28125,3.3125 l 3.75,1.875 c 0.25196,-0.64029 0.74249,-1.17056 1.375,-1.4375 l -1.84375,-3.75 z m 6.5625,0 -1.84375,3.75 c 0.63251,0.26694 1.12304,0.79721 1.375,1.4375 l 3.75,-1.875 c -0.60015,-1.514 -1.77094,-2.7052 -3.28125,-3.3125 z m -6.09375,8 -3.75,1.875 c 0.60709,1.48862 1.78896,2.64995 3.28125,3.25 l 1.875,-3.75 c -0.62682,-0.25556 -1.14334,-0.75203 -1.40625,-1.375 z m 5.625,0 c -0.26291,0.62297 -0.77943,1.11944 -1.40625,1.375 l 1.875,3.75 c 1.49229,-0.60005 2.67416,-1.76138 3.28125,-3.25 l -3.75,-1.875 z' id='path4624' style='fill:#bebebe;fill-opacity:1;stroke:none'/>
- </g>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer12' inkscape:label='actions'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer13' inkscape:label='places'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline'/>
- <g transform='translate(-182,-490)' inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-182,-490)" fill="#bebebe">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m190,490c-4.4147,0-8,3.5853-8,8s3.5853,8,8,8,8-3.5853,8-8-3.5853-8-8-8zm0,2c3.3413,0,6,2.6587,6,6s-2.6587,6-6,6-6-2.6587-6-6,2.6587-6,6-6z"/>
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="M189.34,495c-1.28,0-2.34,1.06-2.34,2.34v1.3125c0,1.2861,1.0576,2.3438,2.3438,2.3438h1.3125c1.29,0.01,2.35-1.05,2.35-2.33v-1.3125c0-1.29-1.06-2.35-2.34-2.35h-1.3125zm0,1,1.3125,0c0.74942,0,1.3438,0.59433,1.3438,1.3438v1.3125c0.01,0.76-0.58,1.35-1.33,1.35h-1.3125c-0.76,0-1.35-0.59-1.35-1.34v-1.3125c0-0.76,0.59-1.35,1.34-1.35z"/>
+<path d="m186.72,491.44c-1.5103,0.6073-2.6811,1.7985-3.2812,3.3125l3.75,1.875c0.25196-0.64029,0.74249-1.1706,1.375-1.4375l-1.8438-3.75zm6.5625,0-1.8438,3.75c0.63251,0.26694,1.123,0.79721,1.375,1.4375l3.75-1.875c-0.60015-1.514-1.7709-2.7052-3.2812-3.3125zm-6.0938,8-3.75,1.875c0.60709,1.4886,1.789,2.65,3.2812,3.25l1.875-3.75c-0.62682-0.25556-1.1433-0.75203-1.4062-1.375zm5.625,0c-0.26291,0.62297-0.77943,1.1194-1.4062,1.375l1.875,3.75c1.4923-0.60005,2.6742-1.7614,3.2812-3.25l-3.75-1.875z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/icon.svg b/p/themes/icons/icon.svg
index 742c04b6e..caa987dac 100644
--- a/p/themes/icons/icon.svg
+++ b/p/themes/icons/icon.svg
@@ -1,9 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
<title>Logo FreshRSS</title>
-
<circle fill="#0062BE" cx="128" cy="128" r="33"/>
-
<g fill="none" stroke="#0062BE" stroke-width="24">
<g stroke-opacity="0.3">
<path d="M12,128 A116,116 0 1,1 128,244"/>
diff --git a/p/themes/icons/key.svg b/p/themes/icons/key.svg
new file mode 100644
index 000000000..9193f4552
--- /dev/null
+++ b/p/themes/icons/key.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(-340.99994,-257)" fill="#666666">
+<path style="block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m346,260c-2.7496,0-5,2.2504-5,5s2.2504,5,5,5c1.5862,0,2.9034-0.84459,3.8125-2h4.8438,0.75l0.21875-0.75,1.0312-4,0.3125-1.25h-1.2812-5.875c-0.90914-1.1554-2.2263-2-3.8125-2zm0,2c1.1158,0,2.0379,0.59507,2.5625,1.5l0.3125,0.5h0.5625,4.9688l-0.53125,2h-4.4375-0.5625l-0.3125,0.5c-0.52462,0.90493-1.4466,1.5-2.5625,1.5-1.6687,0-3-1.3313-3-3s1.3313-3,3-3z"/>
+<path opacity="0.35" style="enable-background:accumulate;color:#000000;" d="M355.5,265,350,265,349.44,267,355,267z" fill-rule="nonzero"/>
+<path style="enable-background:accumulate;color:#000000;" d="m346,265c0,0.55228-0.44772,1-1,1s-1-0.44772-1-1,0.44772-1,1-1,1,0.44772,1,1z" fill-rule="nonzero"/>
+</g>
+</svg>
diff --git a/p/themes/icons/link.svg b/p/themes/icons/link.svg
index ddc8e0706..e5290af76 100644
--- a/p/themes/icons/link.svg
+++ b/p/themes/icons/link.svg
@@ -1,33 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' id='svg7384' sodipodi:docname='web-browser-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' width='16' xmlns='http://www.w3.org/2000/svg' height='16.00366'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:object-paths='false' inkscape:current-layer='layer11' inkscape:bbox-paths='false' inkscape:pageshadow='2' inkscape:snap-bbox='true' inkscape:pageopacity='1' inkscape:guide-bbox='true' pagecolor='#555753' bordercolor='#666666' showguides='true' inkscape:snap-bbox-midpoints='false' inkscape:window-maximized='0' inkscape:snap-grids='true' inkscape:window-width='1595' id='namedview88' inkscape:window-x='2191' inkscape:window-y='111' gridtolerance='10' borderopacity='1' showgrid='false' inkscape:cx='21.026784' inkscape:cy='2.9913602' inkscape:snap-nodes='false' inkscape:window-height='1162' inkscape:snap-global='true' inkscape:object-nodes='false' objecttolerance='10' inkscape:snap-others='false' inkscape:zoom='1' guidetolerance='10' inkscape:snap-to-guides='true' showborder='false'>
- <inkscape:grid enabled='true' type='xygrid' id='grid4866' visible='true' snapvisiblegridlinesonly='true' empspacing='2' spacingx='1px' spacingy='1px'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g style='display:inline' inkscape:groupmode='layer' id='layer9' inkscape:label='status' transform='translate(-183,-529)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-183,-529)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-183,-529)'>
-
- <path style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate' sodipodi:nodetypes='cccccccc' id='path6242' inkscape:connector-curvature='0' d='m 191.0002,533.84553 0,10.38049 -2.34399,-2.28818 -1.33941,2.73465 c -0.32808,0.73962 -2.03368,0.14492 -1.5487,-0.84412 l 1.32547,-2.83928 -2.95789,0 6.86452,-7.14356 z'/>
- <path style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans' sodipodi:nodetypes='csccssccsssc' id='path23405' inkscape:connector-curvature='0' d='m 190.15645,530.0625 c -3.82659,0.46006 -6.57883,3.95775 -6.09375,7.78125 0.13127,1.03473 0.29377,1.38184 0.29377,1.38184 l 1.67498,-1.63184 c -0.33104,-2.75343 1.62156,-5.23146 4.375,-5.5625 2.75344,-0.33104 5.23146,1.62156 5.5625,4.375 0.31355,2.60795 -1.39127,5.02493 -3.96875,5.53125 l 0.0312,2 c 0,0 0.52086,-0.1059 0.62354,-0.13097 3.41561,-0.83385 5.70627,-4.1273 5.28271,-7.65028 -0.46006,-3.8266 -3.95466,-6.55381 -7.78125,-6.09375 z'/>
- <path style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate' id='path11289' inkscape:connector-curvature='0' d='m 187.11293,536.81497 0,-0.20574 -0.19826,0.0186 c 0.0165,-0.13095 0.0329,-0.26167 0.0496,-0.3926 l -0.11578,0 -0.11556,0.14959 -0.11578,0.0559 -0.1653,-0.0932 -0.0165,-0.20575 0.0331,-0.22438 0.24798,-0.18688 0.19826,0 0.0329,-0.11229 0.24786,0.0559 0.18183,0.2246 0.0331,-0.37419 0.31401,-0.26167 0.11567,-0.28055 0.23133,-0.0934 0.1322,-0.18688 0.29738,-0.0564 0.14885,-0.22415 c -0.14874,0 -0.29749,0 -0.44623,0 l 0.28094,-0.13095 0.19814,0 0.28106,-0.0937 0.0331,-0.11186 -0.0992,-0.0937 -0.11567,-0.0375 0.0331,-0.11208 -0.0826,-0.16822 -0.19837,0.0746 0.0331,-0.14947 -0.23134,-0.13096 -0.18171,0.3177 0.0165,0.11229 -0.18171,0.075 -0.11578,0.24302 -0.0495,-0.22438 -0.31402,-0.13095 -0.0496,-0.16822 0.41315,-0.24325 0.18182,-0.16822 0.0165,-0.20563 -0.0991,-0.0562 -0.13219,-0.0188 -0.0826,0.20575 c 0,0 -0.1382,0.0271 -0.17373,0.0358 -0.45378,0.41804 -1.37066,1.32044 -1.58368,3.02405 0.008,0.0395 0.15441,0.26854 0.15441,0.26854 l 0.347,0.20552 0.347,0.0937 m 3.96609,-4.30034 -0.4298,-0.16833 -0.49552,0.0561 -0.61161,0.16822 -0.11567,0.11229 0.38008,0.26167 0,0.14959 -0.14875,0.14959 0.19846,0.39294 0.13188,-0.075 0.16561,-0.26168 c 0.2553,-0.0789 0.4842,-0.16833 0.72686,-0.28053 l 0.19846,-0.5048 m 2.52925,0.34192 -0.375,0.0937 -0.21875,0.15625 0,0.125 -0.375,0.25 0.0937,0.34375 0.21875,-0.15625 0.125,0.15625 0.15625,0.0937 0.0937,-0.28125 -0.0625,-0.15625 0.0625,-0.0937 0.21875,-0.1875 0.0937,0 -0.0937,0.21875 0,0.1875 c 0.0892,-0.0242 0.1588,-0.051 0.25,-0.0625 l -0.25,0.1875 0,0.125 -0.3125,0.21875 -0.28125,-0.0625 0,-0.15625 -0.125,0.0625 0.0625,0.15625 -0.21875,0 -0.125,0.21875 -0.15625,0.15625 -0.0937,0.0312 0,0.1875 0.0312,0.15625 -0.0312,0 0,0.53125 0.0625,-0.0312 0.0937,-0.21875 0.1875,-0.125 0.0312,-0.0937 0.28125,-0.0625 0.15625,0.1875 0.1875,0.0937 -0.0937,0.1875 0.15625,-0.0312 0.0625,-0.21875 -0.1875,-0.21875 0.0625,0 0.21875,0.15625 0.0312,0.21875 0.15625,0.21875 0.0625,-0.3125 0.0937,-0.0312 c 0.0959,0.0996 0.1692,0.23163 0.25,0.34375 l 0.28125,0 0.1875,0.125 -0.0937,0.0937 -0.15625,0.15625 -0.25,0 -0.34375,-0.0937 -0.1875,0 -0.125,0.15625 -0.34375,-0.375 -0.25,-0.0625 -0.375,0.0625 -0.15625,0.0937 0,2.40625 0.0312,0.0312 0.25,-0.15625 0.0937,0.0937 0.28125,0 0.125,0.15625 -0.0937,0.3125 0.1875,0.1875 0,0.375 0.125,0.25 -0.0937,0.25 c -0.009,0.16159 0,0.30714 0,0.46875 0.0795,0.21894 0.14355,0.43575 0.21875,0.65625 l 0.0625,0.34375 0,0.1875 0.125,0 0.21875,-0.125 0.25,0 0.375,-0.4375 -0.0312,-0.15625 0.25,-0.21875 -0.1875,-0.1875 0.21875,-0.1875 0.21875,-0.125 0.0937,-0.125 -0.0625,-0.25 0,-0.59375 0.1875,-0.375 0.1875,-0.25 0.25,-0.5625 0,-0.15625 c -0.11654,0.0146 -0.22972,0.0231 -0.34375,0.0312 -0.0722,0.005 -0.14446,0 -0.21875,0 -0.12359,-0.25961 -0.2183,-0.50966 -0.3125,-0.78125 l -0.15625,-0.1875 -0.0937,-0.3125 0.0625,-0.0625 0.21875,0.25 0.25,0.5625 0.15625,0.15625 -0.0625,0.21875 0.15625,0.15625 0.25,-0.25 0.3125,-0.21875 0.15625,-0.1875 0,-0.21875 c -0.0389,-0.0732 -0.0547,-0.14545 -0.0937,-0.21875 l -0.15625,0.1875 -0.125,-0.15625 -0.1875,-0.125 0,-0.28125 0.21875,0.21875 0.21875,-0.0312 c 0.10166,0.0923 0.19205,0.20751 0.28125,0.3125 l 0.15625,-0.1875 c 0,-0.17463 -0.19976,-1.02044 -0.625,-1.75 -0.42526,-0.72932 -1.15625,-1.40625 -1.15625,-1.40625 l -0.0625,0.0937 -0.21875,0.21875 -0.25,-0.25 0.25,0 0.125,-0.125 -0.46875,-0.0937 -0.25,-0.0937 z'/>
- </g>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-183,-529)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-183,-529)'/>
- <g style='display:inline' inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' transform='translate(-183,-529)'/>
- <g style='display:inline' inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' transform='translate(-183,-529)'/>
- <g style='display:inline' inkscape:groupmode='layer' id='g4953' inkscape:label='categories' transform='translate(-183,-529)'/>
- <g style='display:inline' inkscape:groupmode='layer' id='layer12' inkscape:label='actions' transform='translate(-183,-529)'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16.004" width="16">
+<g fill="#bebebe" transform="translate(-183,-529)">
+<path style="enable-background:accumulate;color:#000000;" d="m191,533.85,0,10.38-2.344-2.2882-1.3394,2.7346c-0.32808,0.73962-2.0337,0.14492-1.5487-0.84412l1.3255-2.8393h-2.9579l6.8645-7.1436z" fill-rule="nonzero" display="block"/>
+<path d="m190.16,530.06c-3.8266,0.46006-6.5788,3.9578-6.0938,7.7812,0.13127,1.0347,0.29377,1.3818,0.29377,1.3818l1.675-1.6318c-0.33104-2.7534,1.6216-5.2315,4.375-5.5625,2.7534-0.33104,5.2315,1.6216,5.5625,4.375,0.31355,2.608-1.3913,5.0249-3.9688,5.5312l0.0312,2s0.52086-0.1059,0.62354-0.13097c3.4156-0.83385,5.7063-4.1273,5.2827-7.6503-0.46006-3.8266-3.9547-6.5538-7.7812-6.0938z" style="baseline-shift:baseline;block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;"/>
+<path opacity="0.3" style="enable-background:accumulate;color:#000000;" d="m187.11,536.81,0-0.20574-0.19826,0.0186c0.0165-0.13095,0.0329-0.26167,0.0496-0.3926h-0.11578l-0.11556,0.14959-0.11578,0.0559-0.1653-0.0932-0.0165-0.20575,0.0331-0.22438,0.24798-0.18688h0.19826l0.0329-0.11229,0.24786,0.0559,0.18183,0.2246,0.0331-0.37419,0.31401-0.26167,0.11567-0.28055,0.23133-0.0934,0.1322-0.18688,0.29738-0.0564,0.14885-0.22415h-0.44623l0.28094-0.13095h0.19814l0.28106-0.0937,0.0331-0.11186-0.0992-0.0937-0.11567-0.0375,0.0331-0.11208-0.0826-0.16822-0.19837,0.0746,0.0331-0.14947-0.23134-0.13096-0.18171,0.3177,0.0165,0.11229-0.18171,0.075-0.11578,0.24302-0.0495-0.22438-0.31402-0.13095-0.0496-0.16822,0.41315-0.24325,0.18182-0.16822,0.0165-0.20563-0.0991-0.0562-0.13219-0.0188-0.0826,0.20575s-0.1382,0.0271-0.17373,0.0358c-0.45378,0.41804-1.3707,1.3204-1.5837,3.024,0.008,0.0395,0.15441,0.26854,0.15441,0.26854l0.347,0.20552,0.347,0.0937m3.9661-4.3003-0.4298-0.16833-0.49552,0.0561-0.61161,0.16822-0.11567,0.11229,0.38008,0.26167,0,0.14959-0.14875,0.14959,0.19846,0.39294,0.13188-0.075,0.16561-0.26168c0.2553-0.0789,0.4842-0.16833,0.72686-0.28053l0.19846-0.5048m2.5292,0.34192-0.375,0.0937-0.21875,0.15625,0,0.125-0.375,0.25,0.0937,0.34375,0.21875-0.15625,0.125,0.15625,0.15625,0.0937,0.0937-0.28125-0.0625-0.15625,0.0625-0.0937,0.21875-0.1875,0.0937,0-0.0937,0.21875,0,0.1875c0.0892-0.0242,0.1588-0.051,0.25-0.0625l-0.25,0.1875v0.125l-0.3125,0.21875-0.28125-0.0625v-0.15625l-0.125,0.0625,0.0625,0.15625h-0.21875l-0.125,0.21875-0.15625,0.15625-0.0937,0.0312v0.1875l0.0312,0.15625h-0.0312v0.53125l0.0625-0.0312,0.0937-0.21875,0.1875-0.125,0.0312-0.0937,0.28125-0.0625,0.15625,0.1875,0.1875,0.0937-0.0937,0.1875,0.15625-0.0312,0.0625-0.21875-0.1875-0.21875h0.0625l0.21875,0.15625,0.0312,0.21875,0.15625,0.21875,0.0625-0.3125,0.0937-0.0312c0.0959,0.0996,0.1692,0.23163,0.25,0.34375h0.28125l0.1875,0.125-0.0937,0.0937-0.15625,0.15625h-0.25l-0.34375-0.0937h-0.1875l-0.125,0.15625-0.34375-0.375-0.25-0.0625-0.375,0.0625-0.15625,0.0937v2.4062l0.0312,0.0312,0.25-0.15625,0.0937,0.0937h0.28125l0.125,0.15625-0.0937,0.3125,0.1875,0.1875v0.375l0.125,0.25-0.0937,0.25c-0.009,0.16159,0,0.30714,0,0.46875,0.0795,0.21894,0.14355,0.43575,0.21875,0.65625l0.0625,0.34375v0.1875h0.125l0.21875-0.125h0.25l0.375-0.4375-0.0312-0.15625,0.25-0.21875-0.1875-0.1875,0.21875-0.1875,0.21875-0.125,0.0937-0.125-0.0625-0.25v-0.59375l0.1875-0.375,0.1875-0.25,0.25-0.5625v-0.15625c-0.11654,0.0146-0.22972,0.0231-0.34375,0.0312-0.0722,0.005-0.14446,0-0.21875,0-0.12359-0.25961-0.2183-0.50966-0.3125-0.78125l-0.15625-0.1875-0.0937-0.3125,0.0625-0.0625,0.21875,0.25,0.25,0.5625,0.15625,0.15625-0.0625,0.21875,0.15625,0.15625,0.25-0.25,0.3125-0.21875,0.15625-0.1875v-0.21875c-0.0389-0.0732-0.0547-0.14545-0.0937-0.21875l-0.15625,0.1875-0.125-0.15625-0.1875-0.125v-0.28125l0.21875,0.21875,0.21875-0.0312c0.10166,0.0923,0.19205,0.20751,0.28125,0.3125l0.15625-0.1875c0-0.17463-0.19976-1.0204-0.625-1.75-0.42526-0.72932-1.1562-1.4062-1.1562-1.4062l-0.0625,0.0937-0.21875,0.21875-0.25-0.25h0.25l0.125-0.125-0.46875-0.0937-0.25-0.0937z" fill-rule="nonzero"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/login.svg b/p/themes/icons/login.svg
index 0a8af162f..954a0b74b 100644
--- a/p/themes/icons/login.svg
+++ b/p/themes/icons/login.svg
@@ -1,33 +1,6 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='changes-prevent-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='9.416826' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1296' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='1941' inkscape:snap-global='true' inkscape:window-y='81' gridtolerance='10' inkscape:window-height='1013' inkscape:snap-to-guides='true' inkscape:current-layer='layer9' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='52.563336' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer9' style='display:inline'>
- <g inkscape:label='lock' transform='translate(161.0002,-39)' id='g4053' style='fill:#bebebe;fill-opacity:1'>
-
- </g>
- <path inkscape:connector-curvature='0' d='m 184,244 c -0.554,0 -1,0.446 -1,1 l 0,0.53125 0,5.46875 12,0 0,-5.46875 L 195,245 c 0,-0.554 -0.446,-1 -1,-1 l -10,0 z' id='rect4063' sodipodi:nodetypes='csccccscc' style='color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible'/>
- <path inkscape:connector-curvature='0' d='m 188,238 c -1.6447,0 -3,1.3553 -3,3 l 0,7 c 0,1.6447 1.3553,3 3,3 l 2,0 c 1.6447,0 3,-1.3553 3,-3 l 0,-7 c 0,-1.6447 -1.3553,-3 -3,-3 l -2,0 z m 0,2 2,0 c 0.5713,0 1,0.4287 1,1 l 0,7 c 0,0.5713 -0.4287,1 -1,1 l -2,0 c -0.5713,0 -1,-0.4287 -1,-1 l 0,-7 c 0,-0.5713 0.4287,-1 1,-1 z' id='rect4291' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans'/>
- </g>
- <g inkscape:label='devices' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-181.0002,-237)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-181.0002,-237)" fill="#bebebe">
+<path style="color:#bebebe;" d="m184,244c-0.554,0-1,0.446-1,1v0.53125,5.4688h12v-5.4688-0.53c0-0.554-0.446-1-1-1h-10z" fill-rule="nonzero"/>
+<path style="baseline-shift:baseline;block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m188,238c-1.6447,0-3,1.3553-3,3v7c0,1.6447,1.3553,3,3,3h2c1.6447,0,3-1.3553,3-3v-7c0-1.6447-1.3553-3-3-3h-2zm0,2,2,0c0.5713,0,1,0.4287,1,1v7c0,0.5713-0.4287,1-1,1h-2c-0.5713,0-1-0.4287-1-1v-7c0-0.5713,0.4287-1,1-1z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/logout.svg b/p/themes/icons/logout.svg
index 284a67578..8dd4ef08b 100644
--- a/p/themes/icons/logout.svg
+++ b/p/themes/icons/logout.svg
@@ -1,33 +1,6 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='changes-allow-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='9.416826' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1296' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='1941' inkscape:snap-global='true' inkscape:window-y='81' gridtolerance='10' inkscape:window-height='1013' inkscape:snap-to-guides='true' inkscape:current-layer='layer9' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='32.563336' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer9' style='display:inline'>
- <g inkscape:label='lock' transform='translate(181.0002,-39)' id='g4053-3' style='fill:#bebebe;fill-opacity:1'>
-
- </g>
- <path inkscape:connector-curvature='0' d='m 204,246 c -0.554,0 -1,0.446 -1,1 l 0,0.53125 0,5.46875 12,0 0,-5.46875 L 215,247 c 0,-0.554 -0.446,-1 -1,-1 l -10,0 z' id='rect4063-6' sodipodi:nodetypes='csccccscc' style='color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible'/>
- <path inkscape:connector-curvature='0' d='m 208.0002,237 c -1.64469,0 -3,1.35529 -3,3 l 0,3 2,0 0,-3 c 0,-0.57129 0.42873,-1 1,-1 l 2,0 c 0.57127,0 1,0.42871 1,1 l 0,7 2,0 0,-7 c 0,-1.64471 -1.35531,-3 -3,-3 l -2,0 z' id='rect4291-4' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#bebebe;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans'/>
- </g>
- <g inkscape:label='devices' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-201.0002,-237)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-201.0002,-237)" fill="#bebebe">
+<path style="color:#bebebe;" d="m204,246c-0.554,0-1,0.446-1,1v0.53125,5.4688h12v-5.4688-0.53c0-0.554-0.446-1-1-1h-10z" fill-rule="nonzero"/>
+<path style="baseline-shift:baseline;block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m208,237c-1.6447,0-3,1.3553-3,3v3h2v-3c0-0.57129,0.42873-1,1-1h2c0.57127,0,1,0.42871,1,1v7h2v-7c0-1.6447-1.3553-3-3-3h-2z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/next.svg b/p/themes/icons/next.svg
index 72637b4e6..d504d096c 100644
--- a/p/themes/icons/next.svg
+++ b/p/themes/icons/next.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='go-next-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.4 r9939' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-nodes='false' inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer12' inkscape:cx='78.648774' inkscape:cy='9.99302' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1408' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='0' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='120px' originy='530px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-121.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-121.0002,-747)'>
-
- <path inkscape:connector-curvature='0' d='m 125.0004,749 1,0 c 0.0104,-1.2e-4 0.0208,-4.6e-4 0.0313,0 0.25495,0.0112 0.50987,0.12858 0.6875,0.3125 l 6.29767,5.71875 -6.29772,5.71875 c -0.18816,0.18819 -0.45346,0.28125 -0.71875,0.28125 l -1,0 0,-1 c 0,-0.26529 0.0931,-0.53058 0.28125,-0.71875 l 4.82897,-4.28125 -4.82897,-4.28125 c -0.21074,-0.19463 -0.30316,-0.46925 -0.28125,-0.75 z' id='path10839-9-9-5-9' sodipodi:nodetypes='ccsccccccccccc' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono'/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-121.0002,-747)">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m125,749,1,0c0.0104-0.00012,0.0208-0.00046,0.0313,0,0.25495,0.0112,0.50987,0.12858,0.6875,0.3125l6.2977,5.7188-6.2977,5.7188c-0.18816,0.18819-0.45346,0.28125-0.71875,0.28125h-1v-1c0-0.26529,0.0931-0.53058,0.28125-0.71875l4.829-4.2812-4.829-4.2812c-0.21074-0.19463-0.30316-0.46925-0.28125-0.75z" fill-rule="nonzero" fill="#bebebe"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/non-starred.svg b/p/themes/icons/non-starred.svg
index 346717f78..4ebcfccbd 100644
--- a/p/themes/icons/non-starred.svg
+++ b/p/themes/icons/non-starred.svg
@@ -1,32 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='non-starred-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='0.50817' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1457' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='86' inkscape:snap-global='true' inkscape:window-y='51' gridtolerance='10' inkscape:window-height='1093' inkscape:snap-to-guides='true' inkscape:current-layer='layer9' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='-0.97094164' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer9' style='display:inline'>
- <g inkscape:label='folder-remote' transform='translate(-166.9996,-599)' id='g5516'>
-
- </g>
- <path inkscape:connector-curvature='0' d='m 69.002994,398.0051 c -0.2659,-9.9e-4 -0.498591,0.1006 -0.664702,0.2393 -0.166111,0.13869 -0.277415,0.32137 -0.389683,0.50028 -0.224526,0.35782 -0.392692,0.76873 -0.565462,1.20357 -0.17277,0.43483 -0.347131,0.88766 -0.504599,1.23232 -0.157468,0.34465 -0.345596,0.57871 -0.35862,0.58776 -0.01287,0.009 -0.307217,0.117 -0.695765,0.15181 -0.388547,0.0348 -0.881219,0.0492 -1.36324,0.0694 -0.482021,0.0202 -0.970296,0.0362 -1.393042,0.12817 -0.211377,0.046 -0.4154,0.10148 -0.604343,0.20956 -0.188943,0.10808 -0.366894,0.28631 -0.450041,0.53002 -0.08315,0.24371 -0.04901,0.50627 0.03636,0.70157 0.08537,0.19531 0.226562,0.36514 0.368205,0.52344 0.283296,0.31663 0.632701,0.60557 1.007899,0.89849 0.375198,0.29292 0.776711,0.55926 1.067753,0.81027 0.291042,0.25101 0.454223,0.50796 0.459122,0.52271 0.0048,0.0146 0.03119,0.33498 -0.05456,0.70231 -0.08575,0.36732 -0.223801,0.81174 -0.352819,1.26034 -0.129019,0.44861 -0.25176,0.90196 -0.291704,1.31835 -0.01997,0.20819 -0.04285,0.40729 0.0053,0.61409 0.04814,0.20679 0.184498,0.43007 0.399016,0.58168 0.214508,0.15161 0.449359,0.1881 0.668233,0.1701 0.218874,-0.018 0.435347,-0.0703 0.635153,-0.15132 0.399612,-0.16214 0.801767,-0.42851 1.206417,-0.68231 0.404649,-0.2538 0.808218,-0.52155 1.145553,-0.71107 0.337335,-0.18952 0.648398,-0.2686 0.66445,-0.26854 0.01586,6e-5 0.303381,0.0951 0.638936,0.28732 0.335555,0.19221 0.725321,0.46503 1.127607,0.72205 0.402287,0.25702 0.819957,0.49752 1.218019,0.66284 0.199027,0.0827 0.388928,0.15086 0.607623,0.17059 0.218695,0.0197 0.479784,-0.031 0.695512,-0.18105 0.215717,-0.15001 0.339276,-0.35235 0.389178,-0.55877 0.0499,-0.20642 0.04291,-0.43517 0.02476,-0.64358 -0.03632,-0.41683 -0.158989,-0.86394 -0.284099,-1.31372 -0.12511,-0.44978 -0.261649,-0.88661 -0.344206,-1.25475 -0.08256,-0.36813 -0.07169,-0.68662 -0.06666,-0.70133 0.005,-0.0145 0.187465,-0.25247 0.480599,-0.50101 0.293134,-0.24854 0.675989,-0.53755 1.053628,-0.82731 0.37764,-0.28976 0.767161,-0.57158 1.053124,-0.88579 0.142977,-0.1571 0.241796,-0.33444 0.32882,-0.52904 0.08702,-0.1946 0.135998,-0.42874 0.05481,-0.67306 -0.08119,-0.24432 -0.271084,-0.41314 -0.459122,-0.52272 -0.188037,-0.10958 -0.366789,-0.18158 -0.577821,-0.22931 -0.422064,-0.0955 -0.913586,-0.14009 -1.395564,-0.16426 -0.481977,-0.0242 -0.945835,-0.039 -1.334196,-0.077 -0.388361,-0.038 -0.715653,-0.13122 -0.728592,-0.14037 -0.01279,-0.009 -0.184019,-0.23636 -0.338404,-0.58217 -0.154385,-0.34581 -0.326584,-0.78819 -0.495481,-1.22429 -0.168896,-0.4361 -0.334766,-0.86429 -0.556091,-1.2238 -0.110668,-0.17977 -0.233352,-0.35397 -0.398259,-0.49396 -0.164907,-0.13999 -0.40309,-0.25684 -0.66899,-0.25783 z m 0.0086,0.99424 c 0.0422,0.0358 0.106711,0.13602 0.184103,0.26173 0.154773,0.25141 0.330675,0.6272 0.493967,1.04883 0.163292,0.42163 0.319052,0.88645 0.495985,1.28277 0.176933,0.39633 0.314564,0.73379 0.675296,0.98889 0.360721,0.25509 0.770187,0.29763 1.215244,0.34118 0.445058,0.0435 0.92882,0.0532 1.394807,0.0765 0.465988,0.0234 0.918236,0.0697 1.213479,0.13647 0.147627,0.0334 0.255581,0.0572 0.303811,0.0853 -0.02227,0.0498 -0.07958,0.15478 -0.179562,0.26464 -0.199968,0.21973 -0.537491,0.48746 -0.902606,0.7676 -0.365114,0.28015 -0.778037,0.57219 -1.113986,0.85704 -0.33595,0.28485 -0.639918,0.53221 -0.779871,0.94209 -0.139952,0.40986 -0.05396,0.77681 0.04065,1.19869 0.09461,0.42189 0.25406,0.87813 0.375016,1.31299 0.120956,0.43486 0.226877,0.84692 0.25228,1.13851 0.01156,0.13264 -0.01699,0.23485 -0.02778,0.29267 -0.05993,-0.008 -0.176402,-0.0324 -0.303811,-0.0853 -0.278362,-0.11561 -0.646494,-0.32808 -1.03543,-0.57657 -0.388935,-0.24849 -0.803899,-0.53053 -1.18847,-0.75081 -0.38457,-0.22028 -0.707909,-0.39837 -1.155138,-0.40015 -0.447219,-0.002 -0.792046,0.17245 -1.178633,0.38965 -0.386587,0.21719 -0.784375,0.49517 -1.175607,0.74055 -0.391232,0.24538 -0.776359,0.4507 -1.055898,0.56412 -0.139769,0.0567 -0.246155,0.0856 -0.302298,0.0902 -0.01026,-0.0578 -0.01522,-0.16008 -0.0025,-0.29243 0.02793,-0.29118 0.138178,-0.70893 0.262912,-1.14264 0.124734,-0.43372 0.254035,-0.89785 0.352315,-1.31883 0.09828,-0.42099 0.186721,-0.78846 0.05027,-1.19943 -0.136442,-0.41097 -0.43218,-0.64202 -0.765707,-0.92967 -0.333527,-0.28766 -0.705509,-0.58555 -1.068257,-0.86876 -0.362749,-0.2832 -0.717797,-0.56075 -0.915974,-0.78224 -0.09908,-0.11075 -0.162208,-0.21163 -0.184103,-0.26173 0.04834,-0.0276 0.154481,-0.058 0.302298,-0.0902 0.295625,-0.0643 0.745175,-0.10714 1.211209,-0.1267 0.466034,-0.0196 0.948238,-0.0298 1.393546,-0.0697 0.445308,-0.0399 0.846793,-0.0499 1.209695,-0.30216 0.362893,-0.25221 0.5383,-0.60511 0.718755,-1.00009 0.180456,-0.39497 0.33731,-0.84115 0.504347,-1.26156 0.167037,-0.42041 0.318485,-0.83556 0.475555,-1.08586 0.07853,-0.12515 0.167511,-0.20007 0.21012,-0.23565 z' id='path5520' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1.04970646;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans'/>
- </g>
- <g inkscape:label='devices' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-61.000202,-397)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-61.000202,-397)">
+<path style="baseline-shift:baseline;block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" fill="#bebebe" d="m69.003,398.01c-0.2659-0.00099-0.49859,0.1006-0.6647,0.2393-0.16611,0.13869-0.27742,0.32137-0.38968,0.50028-0.22453,0.35782-0.39269,0.76873-0.56546,1.2036-0.17277,0.43483-0.34713,0.88766-0.5046,1.2323-0.15747,0.34465-0.3456,0.57871-0.35862,0.58776-0.01287,0.009-0.30722,0.117-0.69576,0.15181-0.38855,0.0348-0.88122,0.0492-1.3632,0.0694-0.48202,0.0202-0.9703,0.0362-1.393,0.12817-0.21138,0.046-0.4154,0.10148-0.60434,0.20956s-0.36689,0.28631-0.45004,0.53002-0.04901,0.50627,0.03636,0.70157c0.08537,0.19531,0.22656,0.36514,0.3682,0.52344,0.2833,0.31663,0.6327,0.60557,1.0079,0.89849s0.77671,0.55926,1.0678,0.81027c0.29104,0.25101,0.45422,0.50796,0.45912,0.52271,0.0048,0.0146,0.03119,0.33498-0.05456,0.70231-0.08575,0.36732-0.2238,0.81174-0.35282,1.2603-0.12902,0.44861-0.25176,0.90196-0.2917,1.3184-0.01997,0.20819-0.04285,0.40729,0.0053,0.61409,0.04814,0.20679,0.1845,0.43007,0.39902,0.58168,0.21451,0.15161,0.44936,0.1881,0.66823,0.1701s0.43535-0.0703,0.63515-0.15132c0.39961-0.16214,0.80177-0.42851,1.2064-0.68231,0.40465-0.2538,0.80822-0.52155,1.1456-0.71107,0.33734-0.18952,0.6484-0.2686,0.66445-0.26854,0.01586,0.00006,0.30338,0.0951,0.63894,0.28732,0.33556,0.19221,0.72532,0.46503,1.1276,0.72205,0.40229,0.25702,0.81996,0.49752,1.218,0.66284,0.19903,0.0827,0.38893,0.15086,0.60762,0.17059,0.2187,0.0197,0.47978-0.031,0.69551-0.18105,0.21572-0.15001,0.33928-0.35235,0.38918-0.55877s0.04291-0.43517,0.02476-0.64358c-0.03632-0.41683-0.15899-0.86394-0.2841-1.3137-0.12511-0.44978-0.26165-0.88661-0.34421-1.2548-0.08256-0.36813-0.07169-0.68662-0.06666-0.70133,0.005-0.0145,0.18746-0.25247,0.4806-0.50101,0.29313-0.24854,0.67599-0.53755,1.0536-0.82731,0.37764-0.28976,0.76716-0.57158,1.0531-0.88579,0.14298-0.1571,0.2418-0.33444,0.32882-0.52904s0.136-0.42874,0.05481-0.67306-0.27108-0.41314-0.45912-0.52272-0.36679-0.18158-0.57782-0.22931c-0.42206-0.0955-0.91359-0.14009-1.3956-0.16426-0.48198-0.0242-0.94584-0.039-1.3342-0.077s-0.71565-0.13122-0.72859-0.14037c-0.01279-0.009-0.18402-0.23636-0.3384-0.58217s-0.32658-0.78819-0.49548-1.2243c-0.1689-0.4361-0.33477-0.86429-0.55609-1.2238-0.11067-0.17977-0.23335-0.35397-0.39826-0.49396s-0.40309-0.25684-0.66899-0.25783zm0.0086,0.99424c0.0422,0.0358,0.10671,0.13602,0.1841,0.26173,0.15477,0.25141,0.33068,0.6272,0.49397,1.0488,0.16329,0.42163,0.31905,0.88645,0.49598,1.2828,0.17693,0.39633,0.31456,0.73379,0.6753,0.98889,0.36072,0.25509,0.77019,0.29763,1.2152,0.34118,0.44506,0.0435,0.92882,0.0532,1.3948,0.0765,0.46599,0.0234,0.91824,0.0697,1.2135,0.13647,0.14763,0.0334,0.25558,0.0572,0.30381,0.0853-0.02227,0.0498-0.07958,0.15478-0.17956,0.26464-0.19997,0.21973-0.53749,0.48746-0.90261,0.7676-0.36511,0.28015-0.77804,0.57219-1.114,0.85704-0.33595,0.28485-0.63992,0.53221-0.77987,0.94209-0.13995,0.40986-0.05396,0.77681,0.04065,1.1987s0.25406,0.87813,0.37502,1.313c0.12096,0.43486,0.22688,0.84692,0.25228,1.1385,0.01156,0.13264-0.01699,0.23485-0.02778,0.29267-0.05993-0.008-0.1764-0.0324-0.30381-0.0853-0.27836-0.11561-0.64649-0.32808-1.0354-0.57657-0.38894-0.24849-0.8039-0.53053-1.1885-0.75081-0.38457-0.22028-0.70791-0.39837-1.1551-0.40015-0.44722-0.002-0.79205,0.17245-1.1786,0.38965-0.38659,0.21719-0.78438,0.49517-1.1756,0.74055-0.39123,0.24538-0.77636,0.4507-1.0559,0.56412-0.13977,0.0567-0.24616,0.0856-0.3023,0.0902-0.01026-0.0578-0.01522-0.16008-0.0025-0.29243,0.02793-0.29118,0.13818-0.70893,0.26291-1.1426,0.12473-0.43372,0.25404-0.89785,0.35232-1.3188,0.09828-0.42099,0.18672-0.78846,0.05027-1.1994-0.13644-0.41097-0.43218-0.64202-0.76571-0.92967-0.33353-0.28766-0.70551-0.58555-1.0683-0.86876-0.36275-0.2832-0.7178-0.56075-0.91597-0.78224-0.09908-0.11075-0.16221-0.21163-0.1841-0.26173,0.04834-0.0276,0.15448-0.058,0.3023-0.0902,0.29562-0.0643,0.74518-0.10714,1.2112-0.1267,0.46603-0.0196,0.94824-0.0298,1.3935-0.0697,0.44531-0.0399,0.84679-0.0499,1.2097-0.30216,0.36289-0.25221,0.5383-0.60511,0.71876-1.0001,0.18046-0.39497,0.33731-0.84115,0.50435-1.2616,0.16704-0.42041,0.31848-0.83556,0.47556-1.0859,0.07853-0.12515,0.16751-0.20007,0.21012-0.23565z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/prev.svg b/p/themes/icons/prev.svg
index 67685c50c..ea4372098 100644
--- a/p/themes/icons/prev.svg
+++ b/p/themes/icons/prev.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='go-next-rtl-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.4 r9939' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-nodes='false' inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer12' inkscape:cx='-101.35123' inkscape:cy='9.99302' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1408' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='0' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-60px' originy='530px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-301.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-301.0002,-747)'>
-
- <path inkscape:connector-curvature='0' d='m 313.01372,749 -1,0 c -0.0104,-1.2e-4 -0.0208,-4.6e-4 -0.0313,0 -0.25495,0.0112 -0.50987,0.12858 -0.6875,0.3125 l -6.29767,5.71875 6.29772,5.71875 c 0.18816,0.18819 0.45346,0.28125 0.71875,0.28125 l 1,0 0,-1 c 0,-0.26529 -0.0931,-0.53058 -0.28125,-0.71875 l -4.82897,-4.28125 4.82897,-4.28125 c 0.21074,-0.19463 0.30316,-0.46925 0.28125,-0.75 z' id='path5441' sodipodi:nodetypes='ccsccccccccccc' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono'/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-301.0002,-747)">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m313.01,749-1,0c-0.0104-0.00012-0.0208-0.00046-0.0313,0-0.25495,0.0112-0.50987,0.12858-0.6875,0.3125l-6.2977,5.7188,6.2977,5.7188c0.18816,0.18819,0.45346,0.28125,0.71875,0.28125h1v-1c0-0.26529-0.0931-0.53058-0.28125-0.71875l-4.829-4.2812,4.829-4.2812c0.21074-0.19463,0.30316-0.46925,0.28125-0.75z" fill-rule="nonzero" fill="#bebebe"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/read.svg b/p/themes/icons/read.svg
index 932bfd860..d72c198df 100644
--- a/p/themes/icons/read.svg
+++ b/p/themes/icons/read.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns='http://www.w3.org/2000/svg' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' width='16' xmlns:cc='http://creativecommons.org/ns#' height='16.001099' sodipodi:docname='mail-read-symbolic.svg' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.1 r9760' version='1.1'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:window-width='1226' id='namedview88' showgrid='false' objecttolerance='10' inkscape:pageopacity='1' inkscape:cx='12.92257' inkscape:cy='-1.422716' inkscape:snap-bbox='true' borderopacity='1' inkscape:object-nodes='false' inkscape:current-layer='layer9' inkscape:snap-to-guides='true' inkscape:snap-others='false' inkscape:snap-grids='true' bordercolor='#666666' inkscape:window-height='967' inkscape:snap-bbox-midpoints='false' showborder='false' inkscape:bbox-paths='false' inkscape:guide-bbox='true' inkscape:window-x='2657' inkscape:window-y='338' inkscape:snap-global='true' inkscape:snap-nodes='true' pagecolor='#555753' inkscape:object-paths='false' inkscape:pageshadow='2' inkscape:zoom='1' inkscape:window-maximized='0' gridtolerance='10' guidetolerance='10' showguides='true'>
- <inkscape:grid id='grid4866' empspacing='2' type='xygrid' visible='true' snapvisiblegridlinesonly='true' enabled='true' spacingx='1px' spacingy='1px'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g id='layer9' inkscape:groupmode='layer' style='display:inline' transform='translate(-60.99995,-296.9989)' inkscape:label='status'>
-
- <path id='path35631' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.35;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans' d='m 68.8752,297 a 1.0001,1.0001 0 0 0 -0.5,0.25 l -4.90625,4 a 1.0001,1.0001 0 0 0 -0.0625,0.0312 c 0,0 -0.32587,0.29728 -0.65625,0.75 -0.22334,0.30605 -0.3527,0.8316 -0.5,1.3125 a 1.0001,1.0001 0 0 0 -0.03125,0.0312 1.0001,1.0001 0 0 0 -0.21875,0.5625 c -5.1e-4,0.0118 3.6e-4,0.0195 0,0.0312 a 1.0001,1.0001 0 0 0 0,0.0312 1.0001,1.0001 0 0 0 0,0.15625 l 0,7.84375 a 1.0001,1.0001 0 0 0 1,1 l 12,0 a 1.0001,1.0001 0 0 0 1,-1 l 0,-7.84375 a 1.0001,1.0001 0 0 0 0,-0.15625 1.0001,1.0001 0 0 0 -0.21875,-0.65625 1.0001,1.0001 0 0 0 -0.03125,-0.0312 c -0.32774,-1.18787 -1.125,-2 -1.125,-2 a 1.0001,1.0001 0 0 0 -0.0312,-0.0312 L 69.6252,297.25 a 1.0001,1.0001 0 0 0 -0.65625,-0.25 1.0001,1.0001 0 0 0 -0.0937,0 z m 0.125,2.28125 4.3125,3.53125 0.0312,0.0312 c 0.021,0.0255 0.18032,0.24952 0.34375,0.5 l -4.68745,3.53125 -4.6875,-3.53125 c 0.0259,-0.0394 0.0349,-0.0872 0.0625,-0.125 0.1908,-0.26146 0.31874,-0.41421 0.34375,-0.4375 l 0.03125,-0.0312 4.25,-3.46875 z m -5,5.09375 4.6875,3.53125 0.3125,0.21875 0.3125,-0.21875 4.6875,-3.53125 0,6.625 -10,0 0,-6.625 z' inkscape:connector-curvature='0'/>
- </g>
- <g id='layer10' inkscape:groupmode='layer' transform='translate(-60.99995,-296.9989)' inkscape:label='devices'/>
- <g id='layer11' inkscape:groupmode='layer' transform='translate(-60.99995,-296.9989)' inkscape:label='apps'/>
- <g id='layer13' inkscape:groupmode='layer' transform='translate(-60.99995,-296.9989)' inkscape:label='places'/>
- <g id='layer14' inkscape:groupmode='layer' transform='translate(-60.99995,-296.9989)' inkscape:label='mimetypes'/>
- <g id='layer15' inkscape:groupmode='layer' style='display:inline' transform='translate(-60.99995,-296.9989)' inkscape:label='emblems'/>
- <g id='g71291' inkscape:groupmode='layer' style='display:inline' transform='translate(-60.99995,-296.9989)' inkscape:label='emotes'/>
- <g id='g4953' inkscape:groupmode='layer' style='display:inline' transform='translate(-60.99995,-296.9989)' inkscape:label='categories'/>
- <g id='layer12' inkscape:groupmode='layer' style='display:inline' transform='translate(-60.99995,-296.9989)' inkscape:label='actions'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16.001" width="16">
+<g transform="translate(-60.99995,-296.9989)">
+<path opacity="0.35" style="baseline-shift:baseline;block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" fill="#bebebe" d="m68.875,297a1.0001,1.0001,0,0,0,-0.5,0.25l-4.9062,4a1.0001,1.0001,0,0,0,-0.0625,0.0312s-0.32587,0.29728-0.65625,0.75c-0.22334,0.30605-0.3527,0.8316-0.5,1.3125a1.0001,1.0001,0,0,0,-0.03125,0.0312,1.0001,1.0001,0,0,0,-0.21875,0.5625c-0.00051,0.0118,0.00036,0.0195,0,0.0312a1.0001,1.0001,0,0,0,0,0.0312,1.0001,1.0001,0,0,0,0,0.15625v7.8438a1.0001,1.0001,0,0,0,1,1h12a1.0001,1.0001,0,0,0,1,-1v-7.8438a1.0001,1.0001,0,0,0,0,-0.15625,1.0001,1.0001,0,0,0,-0.21875,-0.65625,1.0001,1.0001,0,0,0,-0.03125,-0.0312c-0.32774-1.1879-1.125-2-1.125-2a1.0001,1.0001,0,0,0,-0.0312,-0.0312l-4.969-4.02a1.0001,1.0001,0,0,0,-0.65625,-0.25,1.0001,1.0001,0,0,0,-0.0937,0zm0.125,2.2812,4.3125,3.5312,0.0312,0.0312c0.021,0.0255,0.18032,0.24952,0.34375,0.5l-4.6874,3.5312-4.6875-3.5312c0.0259-0.0394,0.0349-0.0872,0.0625-0.125,0.1908-0.26146,0.31874-0.41421,0.34375-0.4375l0.03125-0.0312,4.25-3.4688zm-5,5.0938,4.6875,3.5312,0.3125,0.21875,0.3125-0.21875,4.6875-3.5312,0,6.625-10,0,0-6.625z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/refresh.svg b/p/themes/icons/refresh.svg
index 11728fc5d..62fe56c1e 100644
--- a/p/themes/icons/refresh.svg
+++ b/p/themes/icons/refresh.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' xmlns:cc='http://creativecommons.org/ns#' id='svg7384' sodipodi:docname='view-refresh-symbolic.svg' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns='http://www.w3.org/2000/svg' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' inkscape:version='0.48.1 r9760' version='1.1' width='16' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:zoom='1' inkscape:bbox-paths='false' inkscape:pageopacity='1' guidetolerance='10' inkscape:snap-bbox='true' inkscape:window-height='1162' objecttolerance='10' id='namedview88' showborder='false' inkscape:window-x='2191' inkscape:window-y='111' inkscape:cx='9.3351214' inkscape:cy='10.6119' gridtolerance='10' inkscape:snap-bbox-midpoints='false' showguides='true' inkscape:pageshadow='2' pagecolor='#555753' bordercolor='#666666' inkscape:snap-global='true' inkscape:window-maximized='0' inkscape:object-nodes='false' inkscape:snap-nodes='false' inkscape:guide-bbox='true' inkscape:window-width='1595' inkscape:snap-others='false' borderopacity='1' showgrid='false' inkscape:snap-to-guides='true' inkscape:object-paths='false' inkscape:snap-grids='true' inkscape:current-layer='layer12'>
- <inkscape:grid enabled='true' spacingx='1px' spacingy='1px' id='grid4866' visible='true' snapvisiblegridlinesonly='true' empspacing='2' type='xygrid'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g id='layer9' transform='translate(-241.0002,-627)' inkscape:label='status' style='display:inline' inkscape:groupmode='layer'/>
- <g id='layer10' transform='translate(-241.0002,-627)' inkscape:label='devices' inkscape:groupmode='layer'/>
- <g id='layer11' transform='translate(-241.0002,-627)' inkscape:label='apps' inkscape:groupmode='layer'/>
- <g id='layer13' transform='translate(-241.0002,-627)' inkscape:label='places' inkscape:groupmode='layer'/>
- <g id='layer14' transform='translate(-241.0002,-627)' inkscape:label='mimetypes' inkscape:groupmode='layer'/>
- <g id='layer15' transform='translate(-241.0002,-627)' inkscape:label='emblems' style='display:inline' inkscape:groupmode='layer'/>
- <g id='g71291' transform='translate(-241.0002,-627)' inkscape:label='emotes' style='display:inline' inkscape:groupmode='layer'/>
- <g id='g4953' transform='translate(-241.0002,-627)' inkscape:label='categories' style='display:inline' inkscape:groupmode='layer'/>
- <g id='layer12' transform='translate(-241.0002,-627)' inkscape:label='actions' style='display:inline' inkscape:groupmode='layer'>
-
- <path id='path4597' d='m 253.90645,628.96875 a 1.0001,1.0001 0 0 0 -0.125,0.0312 1.0001,1.0001 0 0 0 -0.78125,1 l 0,1.6875 c -0.38225,-0.57796 -0.84927,-1.08223 -1.40625,-1.5 -1.15563,-0.86677 -2.53199,-1.25227 -3.875,-1.1875 -0.19186,0.009 -0.37223,0.0353 -0.5625,0.0625 -1.52218,0.21741 -2.97815,1.02304 -3.96875,2.34375 -1.98119,2.64144 -1.42267,6.42505 1.21875,8.40625 2.64147,1.98122 6.42504,1.42267 8.40625,-1.21875 A 1.0063276,1.0063276 0 0 0 253.0002,638 a 1.0063276,1.0063276 0 0 0 0,-0.15625 l 0,-0.84375 -0.8125,0 -0.0937,0 a 1.0063276,1.0063276 0 0 0 -0.0937,0 1.0063276,1.0063276 0 0 0 -0.8125,0.40625 c -1.33265,1.77674 -3.81702,2.11387 -5.59375,0.78125 -1.77674,-1.33264 -2.1139,-3.81699 -0.78125,-5.59375 1.33265,-1.77674 3.817,-2.11389 5.59375,-0.78125 0.42946,0.32212 0.76954,0.73295 1.03125,1.1875 l -1.4375,0 a 1.0001,1.0001 0 0 0 -1,1 1.0001,1.0001 0 0 0 0,0.21875 l 0,0.78125 0.84375,0 0.15625,0 4,0 1,0 0,-1 0,-4 a 1.0001,1.0001 0 0 0 0,-0.1875 l 0,-0.8125 -0.8125,0 a 1.0001,1.0001 0 0 0 -0.28125,-0.0312 z' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#666666;fill:#666666;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans' inkscape:connector-curvature='0'/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-241.0002,-627)">
+<path style="baseline-shift:baseline;block-progression:tb;color:#666666;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" fill="#666" d="m253.91,628.97a1.0001,1.0001,0,0,0,-0.125,0.0312,1.0001,1.0001,0,0,0,-0.78125,1v1.6875c-0.38225-0.57796-0.84927-1.0822-1.4062-1.5-1.1556-0.86677-2.532-1.2523-3.875-1.1875-0.19186,0.009-0.37223,0.0353-0.5625,0.0625-1.5222,0.21741-2.9782,1.023-3.9688,2.3438-1.9812,2.6414-1.4227,6.425,1.2188,8.4062s6.425,1.4227,8.4062-1.2188a1.0063,1.0063,0,0,0,0.18,-0.59,1.0063,1.0063,0,0,0,0,-0.15625v-0.84375h-0.8125-0.0937a1.0063,1.0063,0,0,0,-0.0937,0,1.0063,1.0063,0,0,0,-0.8125,0.40625c-1.3326,1.7767-3.817,2.1139-5.5938,0.78125-1.7767-1.3326-2.1139-3.817-0.78125-5.5938,1.3326-1.7767,3.817-2.1139,5.5938-0.78125,0.42946,0.32212,0.76954,0.73295,1.0312,1.1875h-1.4375a1.0001,1.0001,0,0,0,-1,1,1.0001,1.0001,0,0,0,0,0.21875v0.78125h0.84375,0.15625,4,1v-1-4a1.0001,1.0001,0,0,0,0,-0.1875v-0.8125h-0.8125a1.0001,1.0001,0,0,0,-0.28125,-0.0312z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/rss.svg b/p/themes/icons/rss.svg
index ceaddceee..2a8713be3 100644
--- a/p/themes/icons/rss.svg
+++ b/p/themes/icons/rss.svg
@@ -1,32 +1,6 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='application-rss+xml-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.3.1 r9886' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-paths='false' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer14' inkscape:cx='27.01134' inkscape:cy='1.367038' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='709' inkscape:window-maximized='1' inkscape:window-width='1366' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-319.9998px' originy='84.00012px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-561,-301.00012)'>
-
- <path sodipodi:cx='323.0625' sodipodi:cy='97.1875' d='m 325.0625,97.1875 a 2,3.236068 0 1 1 -4,0 2,3.236068 0 1 1 4,0 z' id='path4983' sodipodi:rx='2' sodipodi:ry='3.236068' style='color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.69602728;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(1.0000007,0,0,0.61803426,241.93747,252.93479)' sodipodi:type='arc'/>
- <path inkscape:connector-curvature='0' d='m 563.0002,303 0,1 c 0,0.55016 0.45347,1 1,1 4.97056,0 9,4.02944 9,9 0,0.55016 0.45347,1 1,1 l 1,0 0,-1 c 0,-6.07513 -4.92487,-11 -11,-11 l -1,0 z m 0,4 0,1 c 0,0.55016 0.45347,1 1,1 2.76143,0 5,2.23857 5,5 0,0.55016 0.45347,1 1,1 l 1,0 0,-1 c 0,-3.866 -3.134,-7 -7,-7 l -1,0 z' id='path5814' style='color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333492;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new'/>
- </g>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-561,-301.00012)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-561,-301.00012)'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g fill-rule="nonzero" transform="translate(-561,-301.00012)" fill="#666">
+<path style="enable-background:new;color:#000000;" d="m325.06,97.188c0,1.7872-0.89543,3.2361-2,3.2361s-2-1.4488-2-3.2361c0-1.7872,0.89543-3.2361,2-3.2361s2,1.4488,2,3.2361z" transform="matrix(1.0000007,0,0,0.61803426,241.93747,252.93479)"/>
+<path style="enable-background:new;color:#000000;" d="m563,303,0,1c0,0.55016,0.45347,1,1,1,4.9706,0,9,4.0294,9,9,0,0.55016,0.45347,1,1,1h1v-1c0-6.0751-4.9249-11-11-11h-1zm0,4,0,1c0,0.55016,0.45347,1,1,1,2.7614,0,5,2.2386,5,5,0,0.55016,0.45347,1,1,1h1v-1c0-3.866-3.134-7-7-7h-1z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/search.svg b/p/themes/icons/search.svg
index acfb364cc..35a28dfca 100644
--- a/p/themes/icons/search.svg
+++ b/p/themes/icons/search.svg
@@ -1,32 +1,6 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='folder-saved-search-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.2 r9819' version='1.1' width='16.000002' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-paths='false' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer13' inkscape:cx='-151.02446' inkscape:cy='0.353386' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1168' inkscape:window-maximized='1' inkscape:window-width='1600' inkscape:window-x='0' inkscape:window-y='0' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-441.0004,-195)'>
- <path inkscape:connector-curvature='0' d='m 447.50781,195.99554 c -3.02886,0 -5.51073,2.47905 -5.51073,5.50447 0,3.02541 2.48187,5.50446 5.51073,5.50446 3.02885,0 5.51072,-2.47905 5.51072,-5.50446 0,-3.02542 -2.48187,-5.50447 -5.51072,-5.50447 z m 0,2.00893 c 1.94735,0 3.49951,1.55039 3.49951,3.49554 0,1.94514 -1.55216,3.49553 -3.49951,3.49553 -1.94736,0 -3.49952,-1.55039 -3.49952,-3.49553 0,-1.94515 1.55216,-3.49554 3.49952,-3.49554 z' id='path5079' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#666666;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1.55467153;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans'/>
- <path inkscape:connector-curvature='0' d='m 450.8125,204 a 1.0001,1.0001 0 0 0 -0.5,1.71875 l 4,4 a 1.0054782,1.0054782 0 1 0 1.40625,-1.4375 l -4,-4 A 1.0001,1.0001 0 0 0 450.8125,204 z' id='path5081' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#666666;fill:#666666;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans'/>
-
- </g>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-441.0004,-195)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-441.0004,-195)'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g fill="#666" transform="translate(-441.0004,-195)">
+<path style="baseline-shift:baseline;block-progression:tb;color:#666666;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m447.51,196c-3.0289,0-5.5107,2.479-5.5107,5.5045,0,3.0254,2.4819,5.5045,5.5107,5.5045s5.5107-2.479,5.5107-5.5045c0-3.0254-2.4819-5.5045-5.5107-5.5045zm0,2.0089c1.9474,0,3.4995,1.5504,3.4995,3.4955s-1.5522,3.4955-3.4995,3.4955c-1.9474,0-3.4995-1.5504-3.4995-3.4955,0-1.9452,1.5522-3.4955,3.4995-3.4955z"/>
+<path style="baseline-shift:baseline;block-progression:tb;color:#666666;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m450.81,204a1.0001,1.0001,0,0,0,-0.5,1.7188l4,4a1.0055,1.0055,0,1,0,1.4062,-1.4375l-4-4a1.0001,1.0001,0,0,0,-0.91,-0.28z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/share.svg b/p/themes/icons/share.svg
index 443321882..db7a3649c 100644
--- a/p/themes/icons/share.svg
+++ b/p/themes/icons/share.svg
@@ -1,34 +1,8 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='folder-publicshare-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.3.1 r9886' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-paths='false' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer13' inkscape:cx='-55.50224' inkscape:cy='-178.38158' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1381' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='1600' inkscape:window-y='27' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-340px' originy='-20.999999px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-581.0002,-196)'>
-
- <path sodipodi:cx='289.03125' sodipodi:cy='178.03125' d='m 291,178.03125 a 1.96875,1.96875 0 1 1 -3.9375,0 1.96875,1.96875 0 1 1 3.9375,0 z' id='path8192' sodipodi:rx='1.96875' sodipodi:ry='1.96875' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(1.5079365,0,0,1.5079365,148.15963,-64.49107)' sodipodi:type='arc'/>
- <path sodipodi:cx='289.03125' sodipodi:cy='178.03125' d='m 291,178.03125 a 1.96875,1.96875 0 1 1 -3.9375,0 1.96875,1.96875 0 1 1 3.9375,0 z' id='path8194' sodipodi:rx='1.96875' sodipodi:ry='1.96875' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(1.5079365,0,0,1.5079365,158.12818,-59.49107)' sodipodi:type='arc'/>
- <path sodipodi:cx='289.03125' sodipodi:cy='178.03125' d='m 291,178.03125 a 1.96875,1.96875 0 1 1 -3.9375,0 1.96875,1.96875 0 1 1 3.9375,0 z' id='path8196' sodipodi:rx='1.96875' sodipodi:ry='1.96875' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(1.5079365,0,0,1.5079365,158.12818,-69.49107)' sodipodi:type='arc'/>
- <path inkscape:connector-curvature='0' d='m 593.625,198.15625 -10.0625,4.875 -1.8125,0.90625 1.8125,0.90625 10.03125,5.0625 0.90625,-1.8125 -8.21875,-4.15625 8.21875,-4 -0.875,-1.78125 z' id='path8198' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans'/>
- </g>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-581.0002,-196)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-581.0002,-196)'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g fill="#bebebe" transform="translate(-581.0002,-196)">
+<path style="enable-background:new;color:#000000;" d="m291,178.03c0,1.0873-0.88144,1.9688-1.9688,1.9688-1.0873,0-1.9688-0.88144-1.9688-1.9688,0-1.0873,0.88144-1.9688,1.9688-1.9688,1.0873,0,1.9688,0.88144,1.9688,1.9688z" fill-rule="nonzero" transform="matrix(1.5079365,0,0,1.5079365,148.15963,-64.49107)"/>
+<path style="enable-background:new;color:#000000;" d="m291,178.03c0,1.0873-0.88144,1.9688-1.9688,1.9688-1.0873,0-1.9688-0.88144-1.9688-1.9688,0-1.0873,0.88144-1.9688,1.9688-1.9688,1.0873,0,1.9688,0.88144,1.9688,1.9688z" fill-rule="nonzero" transform="matrix(1.5079365,0,0,1.5079365,158.12818,-59.49107)"/>
+<path style="enable-background:new;color:#000000;" d="m291,178.03c0,1.0873-0.88144,1.9688-1.9688,1.9688-1.0873,0-1.9688-0.88144-1.9688-1.9688,0-1.0873,0.88144-1.9688,1.9688-1.9688,1.0873,0,1.9688,0.88144,1.9688,1.9688z" fill-rule="nonzero" transform="matrix(1.5079365,0,0,1.5079365,158.12818,-69.49107)"/>
+<path style="baseline-shift:baseline;block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m593.62,198.16-10.062,4.875-1.8125,0.90625,1.8125,0.90625,10.031,5.0625,0.90625-1.8125-8.2188-4.1562,8.2188-4-0.875-1.7812z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/starred.svg b/p/themes/icons/starred.svg
index d6e2cebb5..63a44908f 100644
--- a/p/themes/icons/starred.svg
+++ b/p/themes/icons/starred.svg
@@ -1,32 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:svg='http://www.w3.org/2000/svg' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' sodipodi:docname='starred-symbolic.svg' version='1.1' inkscape:version='0.48.1 r9760' height='16' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='0.50817' pagecolor='#555753' borderopacity='1' showborder='false' inkscape:bbox-paths='false' guidetolerance='10' inkscape:object-paths='true' inkscape:window-width='1457' showguides='true' inkscape:object-nodes='true' inkscape:snap-bbox='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:snap-nodes='false' bordercolor='#666666' objecttolerance='10' id='namedview88' showgrid='false' inkscape:window-maximized='0' inkscape:window-x='86' inkscape:snap-global='true' inkscape:window-y='51' gridtolerance='10' inkscape:window-height='1093' inkscape:snap-to-guides='true' inkscape:current-layer='layer9' inkscape:snap-bbox-midpoints='false' inkscape:zoom='1' inkscape:cx='19.029058' inkscape:snap-grids='true' inkscape:pageopacity='1'>
- <inkscape:grid spacingx='1px' spacingy='1px' id='grid4866' empspacing='2' enabled='true' type='xygrid' snapvisiblegridlinesonly='true' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:label='status' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer9' style='display:inline'>
- <g inkscape:label='folder-remote' transform='translate(-186.9996,-599)' id='g11910-1'>
-
- </g>
- <path sodipodi:cy='180.96373' sodipodi:r2='3.8276224' transform='matrix(1.0472113,-0.00871584,0.00871584,1.0472113,-504.35434,220.15425)' inkscape:rounded='0.2104596' inkscape:flatsided='false' inkscape:transform-center-x='-0.0094346789' inkscape:transform-center-y='-0.69491065' d='m 530.9488,186.70897 c -0.77941,0.55189 -3.15759,-1.90601 -4.11253,-1.9179 -0.95532,-0.0119 -3.39494,2.38585 -4.16096,1.8149 -0.76573,-0.57072 0.83698,-3.59203 0.55319,-4.50391 -0.2839,-0.91223 -3.31818,-2.49151 -3.01189,-3.39647 0.30617,-0.90461 3.67487,-0.31399 4.45442,-0.86567 0.77986,-0.5519 1.3442,-3.92569 2.29952,-3.91404 0.95494,0.0116 1.43421,3.39798 2.19979,3.9689 0.76588,0.57114 4.14893,0.0653 4.43307,0.97746 0.28402,0.9118 -2.78848,2.41405 -3.09488,3.31858 -0.30652,0.90489 1.21999,3.96605 0.44027,4.51815 z' id='path11922-0' sodipodi:type='star' sodipodi:arg1='0.95492637' sodipodi:r1='7.0383992' style='color:#000000;fill:#f1c40f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate' sodipodi:arg2='1.5829876' inkscape:randomized='0' sodipodi:cx='526.88293' sodipodi:sides='5'/>
- </g>
- <g inkscape:label='devices' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer10'/>
- <g inkscape:label='apps' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer11'/>
- <g inkscape:label='actions' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer12'/>
- <g inkscape:label='places' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer13'/>
- <g inkscape:label='mimetypes' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer14'/>
- <g inkscape:label='emblems' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='layer15' style='display:inline'/>
- <g inkscape:label='categories' transform='translate(-41.000202,-397)' inkscape:groupmode='layer' id='g4953' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-41.000202,-397)">
+<path style="enable-background:accumulate;color:#000000;" d="m530.95,186.71c-0.77941,0.55189-3.1576-1.906-4.1125-1.9179-0.95532-0.0119-3.3949,2.3858-4.161,1.8149-0.76573-0.57072,0.83698-3.592,0.55319-4.5039-0.2839-0.91223-3.3182-2.4915-3.0119-3.3965,0.30617-0.90461,3.6749-0.31399,4.4544-0.86567,0.77986-0.5519,1.3442-3.9257,2.2995-3.914,0.95494,0.0116,1.4342,3.398,2.1998,3.9689,0.76588,0.57114,4.1489,0.0653,4.4331,0.97746,0.28402,0.9118-2.7885,2.414-3.0949,3.3186-0.30652,0.90489,1.22,3.966,0.44027,4.5182z" fill-rule="nonzero" transform="matrix(1.0472113,-0.00871584,0.00871584,1.0472113,-504.35434,220.15425)" fill="#f1c40f"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/tag.svg b/p/themes/icons/tag.svg
index 688aca7a4..0d6db6ed8 100644
--- a/p/themes/icons/tag.svg
+++ b/p/themes/icons/tag.svg
@@ -1,134 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- sodipodi:docname="tag.svg"
- height="16"
- id="svg7384"
- inkscape:version="0.48.4 r9939"
- version="1.1"
- width="16">
- <metadata
- id="metadata90">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview
- inkscape:bbox-paths="false"
- bordercolor="#666666"
- borderopacity="1"
- inkscape:current-layer="layer12"
- inkscape:cx="63.620645"
- inkscape:cy="27.761176"
- gridtolerance="10"
- inkscape:guide-bbox="true"
- guidetolerance="10"
- id="namedview88"
- inkscape:object-nodes="false"
- inkscape:object-paths="false"
- objecttolerance="10"
- pagecolor="#555753"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- showborder="false"
- showgrid="false"
- showguides="true"
- inkscape:snap-bbox="true"
- inkscape:snap-bbox-midpoints="false"
- inkscape:snap-global="true"
- inkscape:snap-grids="true"
- inkscape:snap-nodes="false"
- inkscape:snap-others="false"
- inkscape:snap-to-guides="true"
- inkscape:window-height="709"
- inkscape:window-maximized="1"
- inkscape:window-width="1366"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:zoom="4">
- <inkscape:grid
- empspacing="2"
- enabled="true"
- id="grid4866"
- snapvisiblegridlinesonly="true"
- spacingx="1px"
- spacingy="1px"
- type="xygrid"
- visible="true" />
- </sodipodi:namedview>
- <title
- id="title9167">Gnome Symbolic Icon Theme</title>
- <defs
- id="defs7386" />
- <g
- inkscape:groupmode="layer"
- id="layer9"
- inkscape:label="status"
- style="display:inline"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer10"
- inkscape:label="devices"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer11"
- inkscape:label="apps"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer13"
- inkscape:label="places"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer14"
- inkscape:label="mimetypes"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer15"
- inkscape:label="emblems"
- style="display:inline"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="g71291"
- inkscape:label="emotes"
- style="display:inline"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="g4953"
- inkscape:label="categories"
- style="display:inline"
- transform="translate(-141.0002,-807)" />
- <g
- inkscape:groupmode="layer"
- id="layer12"
- inkscape:label="actions"
- style="display:inline"
- transform="translate(-141.0002,-807)">
- <path
- inkscape:connector-curvature="0"
- d="m 149.0002,809 0,13 4,-4 4,4 c 0.0525,-6.84943 -0.0285,-10.58353 0,-13 z"
- id="path12292"
- sodipodi:nodetypes="cccccc"
- style="fill:#bebebe;fill-opacity:1;stroke:none" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-141.0002,-807)">
+<path d="m149,809,0,13,4-4,4,4c0.0525-6.8494-0.0285-10.584,0-13z" fill="#bebebe"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/unread.svg b/p/themes/icons/unread.svg
index f541fb25b..dc1cc609c 100644
--- a/p/themes/icons/unread.svg
+++ b/p/themes/icons/unread.svg
@@ -1,30 +1,6 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' id='svg7384' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' version='1.1' inkscape:version='0.47 r22583' height='16' sodipodi:docname='mail-unread-symbolic.svg' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.w3.org/2000/svg' width='16'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:cy='-166.8292' inkscape:current-layer='layer9' inkscape:window-width='1310' pagecolor='#555753' showborder='false' showguides='true' inkscape:snap-nodes='true' objecttolerance='10' showgrid='false' inkscape:object-nodes='true' inkscape:pageshadow='2' inkscape:guide-bbox='true' inkscape:window-x='54' inkscape:snap-bbox='true' bordercolor='#666666' id='namedview88' inkscape:window-maximized='0' inkscape:snap-global='true' inkscape:window-y='25' gridtolerance='10' inkscape:zoom='1' inkscape:window-height='690' borderopacity='1' guidetolerance='10' inkscape:cx='315.82499' inkscape:bbox-paths='false' inkscape:snap-grids='true' inkscape:pageopacity='1' inkscape:snap-to-guides='true'>
- <inkscape:grid visible='true' spacingx='1px' type='xygrid' spacingy='1px' id='grid4866' empspacing='2' enabled='true' snapvisiblegridlinesonly='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline'>
-
- <path d='m 43.78125,301 a 1.0000999,1.0000999 0 0 0 -0.40625,1.78125 l 5,4 0.625,0.5 0.625,-0.5 5,-4 a 1.0004882,1.0004882 0 1 0 -1.25,-1.5625 l -4.375,3.5 -4.375,-3.5 A 1.0000999,1.0000999 0 0 0 43.78125,301 z' id='path35600' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#e74c3c;fill-opacity:1;stroke:none;stroke-width:1.99999976;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans'/>
- <path d='M 42.90625,300 A 1.0001,1.0001 0 0 0 42,301 l 0,9 a 1.0001,1.0001 0 0 0 1,1 l 12,0 a 1.0001,1.0001 0 0 0 1,-1 l 0,-9 a 1.0001,1.0001 0 0 0 -1,-1 l -12,0 a 1.0001,1.0001 0 0 0 -0.09375,0 z M 44,302 l 10,0 0,7 -10,0 0,-7 z' id='rect35604' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#e74c3c;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans'/>
- </g>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer10' inkscape:label='devices'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer11' inkscape:label='apps'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer12' inkscape:label='actions'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer13' inkscape:label='places'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes'/>
- <g transform='translate(-40.99995,-297)' inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline'/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-40.99995,-297)" fill="#e74c3c">
+<path style="block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="m43.781,301a1.0001,1.0001,0,0,0,-0.40625,1.7812l5,4,0.625,0.5,0.625-0.5,5-4a1.0005,1.0005,0,1,0,-1.25,-1.5625l-4.375,3.5-4.375-3.5a1.0001,1.0001,0,0,0,-0.844,-0.22z"/>
+<path style="block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" d="M42.906,300a1.0001,1.0001,0,0,0,-0.906,1v9a1.0001,1.0001,0,0,0,1,1h12a1.0001,1.0001,0,0,0,1,-1v-9a1.0001,1.0001,0,0,0,-1,-1h-12a1.0001,1.0001,0,0,0,-0.09375,0zm1.094,2h10v7h-10v-7z"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/up.svg b/p/themes/icons/up.svg
index dab31a20d..4819c9205 100644
--- a/p/themes/icons/up.svg
+++ b/p/themes/icons/up.svg
@@ -1,31 +1,5 @@
-<?xml version='1.0' encoding='UTF-8' standalone='no'?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='go-up-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.4 r9939' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
- <metadata id='metadata90'>
- <rdf:RDF>
- <cc:Work rdf:about=''>
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
- <dc:title>Gnome Symbolic Icon Theme</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview inkscape:bbox-nodes='false' inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer12' inkscape:cx='-1.351226' inkscape:cy='9.99302' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#3a3b39' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='false' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1408' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='0' inkscape:zoom='1'>
- <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='40px' originy='530px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
- </sodipodi:namedview>
- <title id='title9167'>Gnome Symbolic Icon Theme</title>
- <defs id='defs7386'/>
- <g inkscape:groupmode='layer' id='layer9' inkscape:label='status' style='display:inline' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer10' inkscape:label='devices' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer11' inkscape:label='apps' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer13' inkscape:label='places' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer14' inkscape:label='mimetypes' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer15' inkscape:label='emblems' style='display:inline' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g71291' inkscape:label='emotes' style='display:inline' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='g4953' inkscape:label='categories' style='display:inline' transform='translate(-201.0002,-747)'/>
- <g inkscape:groupmode='layer' id='layer12' inkscape:label='actions' style='display:inline' transform='translate(-201.0002,-747)'>
-
- <path inkscape:connector-curvature='0' d='m 215.03152,758.99677 0,-1.00001 c -9.1e-4,-0.0111 5.9e-4,-0.021 -9e-5,-0.0312 -0.0112,-0.25496 -0.12835,-0.50994 -0.31251,-0.6875 l -5.71875,-6.29767 -5.71875,6.29773 c -0.18821,0.1881 -0.28121,0.45346 -0.28122,0.71875 l 0,1.00001 1,0 c 0.26531,-7e-5 0.53059,-0.0931 0.71873,-0.28131 l 4.28125,-4.82896 4.28127,4.82896 c 0.19464,0.21073 0.46925,0.30315 0.74998,0.2813 z' id='path10839-9-9-5-9-1-0' sodipodi:nodetypes='ccsccccccccccc' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono'/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+<g transform="translate(-201.0002,-747)">
+<path style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:new;text-transform:none;" d="m215.03,759,0-1c-0.00091-0.0111,0.00059-0.021-0.00009-0.0312-0.0112-0.25496-0.12835-0.50994-0.31251-0.6875l-5.7188-6.2977-5.7188,6.2977c-0.18821,0.1881-0.28121,0.45346-0.28122,0.71875v1h1c0.26531-0.00007,0.53059-0.0931,0.71873-0.28131l4.2812-4.829,4.2813,4.829c0.19464,0.21073,0.46925,0.30315,0.74998,0.2813z" fill-rule="nonzero" fill="#bebebe"/>
+</g>
+</svg> \ No newline at end of file
diff --git a/p/themes/icons/view-global.svg b/p/themes/icons/view-global.svg
new file mode 100644
index 000000000..d81e79790
--- /dev/null
+++ b/p/themes/icons/view-global.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-61-867)" fill="#666" color="#000"><rect height="2" rx=".385" ry=".379" width="2" x="64" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="870"/><rect height="2" rx=".385" ry=".379" width="2" x="64" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="874.02"/><rect height="2" rx=".385" ry=".379" width="2" x="64" y="878"/><rect height="2" rx=".385" ry=".379" width="2" x="68" y="878"/><rect height="2" rx=".385" ry=".379" width="2" x="72" y="878"/></g></svg> \ No newline at end of file
diff --git a/p/themes/icons/view-normal.svg b/p/themes/icons/view-normal.svg
new file mode 100644
index 000000000..c35b101df
--- /dev/null
+++ b/p/themes/icons/view-normal.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-40-746)" fill="#666" color="#666"><path d="m43 749h10v2h-10z"/><path d="m43 753h10v2h-10z"/><path d="m43 757h10v2h-10z"/></g></svg> \ No newline at end of file
diff --git a/p/themes/icons/view-reader.svg b/p/themes/icons/view-reader.svg
new file mode 100644
index 000000000..3243aed6e
--- /dev/null
+++ b/p/themes/icons/view-reader.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g transform="translate(-181-867)" fill="#666" color="#666"><path d="m 181,868 0,1 0,11 0,1 1,0 5,0 c 0.1754,0 0.52538,0.15166 0.8125,0.34375 0.28712,0.19209 0.46875,0.375 0.46875,0.375 L 189,882.4375 l 0.71875,-0.75 c 0,0 0.8963,-0.6875 1.28125,-0.6875 l 5,0 1,0 0,-1 0,-11 0,-1 -1,0 -5,0 c -0.87652,0 -1.56017,0.34756 -2.03125,0.6875 -0.0301,-0.0207 -0.031,-0.0105 -0.0625,-0.0312 C 188.44557,868.35254 187.82811,868 187,868 l -5,0 -1,0 z m 2,2 4,0 c 0.13821,0 0.51476,0.14746 0.8125,0.34375 0.29774,0.19629 0.5,0.375 0.5,0.375 l 0.71875,0.6875 0.6875,-0.71875 c 0,0 0.89975,-0.6875 1.28125,-0.6875 l 4,0 0,9 -4,0 c -0.87693,0 -1.56008,0.34735 -2.03125,0.6875 -0.0196,-0.0135 -0.011,-0.0177 -0.0312,-0.0312 C 188.47725,879.34834 187.83512,879 187,879 l -4,0 0,-9 z"/><g transform="scale(-1 1)"><rect height="2" rx=".375" width="3" x="-187" y="872"/><rect height="2" rx=".375" width="3" x="-187" y="875"/><rect height="2" rx=".375" width="3" x="-194" y="872"/><rect height="2" rx=".375" width="3" x="-194" y="875"/></g></g></svg> \ No newline at end of file