4
0
Эх сурвалжийг харах

Option globale pour la taille minimale de l'historique par défaut

Plus une réorganisation des options
Alexandre Alapetite 12 жил өмнө
parent
commit
06d4b8d102

+ 4 - 1
app/Controllers/configureController.php

@@ -97,7 +97,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 					$description = sanitizeHTML(Minz_Request::param('description', '', true));
 					$website = Minz_Request::param('website', '');
 					$url = Minz_Request::param('url', '');
-					$keep_history = intval(Minz_Request::param ('keep_history', 0));
+					$keep_history = intval(Minz_Request::param ('keep_history', -2));
 					$cat = Minz_Request::param ('category', 0);
 					$path = Minz_Request::param ('path_entries', '');
 					$priority = Minz_Request::param ('priority', 0);
@@ -160,6 +160,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 			$lazyload = Minz_Request::param ('lazyload', 'no');
 			$sort = Minz_Request::param ('sort_order', 'DESC');
 			$old = Minz_Request::param ('old_entries', 3);
+			$keepHistoryDefault = Minz_Request::param('keep_history_default', 0);
 			$mail = Minz_Request::param ('mail_login', false);
 			$anon = Minz_Request::param ('anon_access', 'no');
 			$token = Minz_Request::param ('token', $current_token);
@@ -189,6 +190,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 			$this->view->conf->_lazyload ($lazyload);
 			$this->view->conf->_sortOrder ($sort);
 			$this->view->conf->_oldEntries ($old);
+			$this->view->conf->_keepHistoryDefault($keepHistoryDefault);
 			$this->view->conf->_mailLogin ($mail);
 			$this->view->conf->_anonAccess ($anon);
 			$this->view->conf->_token ($token);
@@ -221,6 +223,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 				'lazyload' => $this->view->conf->lazyload (),
 				'sort_order' => $this->view->conf->sortOrder (),
 				'old_entries' => $this->view->conf->oldEntries (),
+				'keep_history_default' => $this->view->conf->keepHistoryDefault(),
 				'mail_login' => $this->view->conf->mailLogin (),
 				'anon_access' => $this->view->conf->anonAccess (),
 				'token' => $this->view->conf->token (),

+ 7 - 2
app/Controllers/feedController.php

@@ -223,8 +223,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
 					}
 				}
 
-				if (($feed->keepHistory() >= 0) && (rand(0, 30) === 1)) {
-					$nb = $feedDAO->cleanOldEntries ($feed->id (), $date_min, max($feed->keepHistory(), count($entries) + 10));
+				$feedHistory = $feed->keepHistory();
+				if ($feedHistory == -2) {	//default
+					$feedHistory = $this->view->conf->keepHistoryDefault();
+				}
+
+				if (($feedHistory >= 0) && (rand(0, 30) === 1)) {
+					$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->id (), Minz_Log::DEBUG);
 					}

+ 3 - 2
app/Controllers/indexController.php

@@ -130,16 +130,17 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 		// on calcule la date des articles les plus anciens qu'on affiche
 		$nb_month_old = $this->view->conf->oldEntries ();
 		$date_min = $today - (3600 * 24 * 30 * $nb_month_old);	//Do not use a fast changing value such as time() to allow SQL caching
+		$keepHistoryDefault = $this->view->conf->keepHistoryDefault();
 
 		try {
-			$entries = $this->entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min);
+			$entries = $this->entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, $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)) {	//TODO: Remove in v0.8
 				Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
 				$this->view->state = 'all';
-				$entries = $this->entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min);
+				$entries = $this->entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);
 			}
 
 			if (count($entries) <= $nb) {

+ 13 - 1
app/Models/Configuration.php

@@ -14,6 +14,7 @@ class FreshRSS_Configuration extends Minz_Model {
 	private $lazyload;
 	private $sort_order;
 	private $old_entries;
+	private $keep_history_default;
 	private $shortcuts = array ();
 	private $mail_login = '';
 	private $mark_when = array ();
@@ -44,6 +45,7 @@ class FreshRSS_Configuration extends Minz_Model {
 		$this->_lazyload ($confDAO->lazyload);
 		$this->_sortOrder ($confDAO->sort_order);
 		$this->_oldEntries ($confDAO->old_entries);
+		$this->_keepHistoryDefault($confDAO->keep_history_default);
 		$this->_shortcuts ($confDAO->shortcuts);
 		$this->_mailLogin ($confDAO->mail_login);
 		$this->_markWhen ($confDAO->mark_when);
@@ -95,6 +97,9 @@ class FreshRSS_Configuration extends Minz_Model {
 	public function oldEntries () {
 		return $this->old_entries;
 	}
+	public function keepHistoryDefault() {
+		return $this->keep_history_default;
+	}
 	public function shortcuts () {
 		return $this->shortcuts;
 	}
@@ -217,11 +222,18 @@ class FreshRSS_Configuration extends Minz_Model {
 	}
 	public function _oldEntries ($value) {
 		if (ctype_digit ($value) && $value > 0) {
-			$this->old_entries = $value;
+			$this->old_entries = intval($value);
 		} else {
 			$this->old_entries = 3;
 		}
 	}
+	public function _keepHistoryDefault($value) {
+		if (ctype_digit($value) && $value >= -1) {
+			$this->keep_history_default = intval($value);
+		} else {
+			$this->keep_history_default = 0;
+		}
+	}
 	public function _shortcuts ($values) {
 		foreach ($values as $key => $value) {
 			$this->shortcuts[$key] = $value;

+ 6 - 2
app/Models/ConfigurationDAO.php

@@ -10,6 +10,7 @@ class FreshRSS_ConfigurationDAO extends Minz_ModelArray {
 	public $lazyload = 'yes';
 	public $sort_order = 'DESC';
 	public $old_entries = 3;
+	public $keep_history_default = 0;
 	public $shortcuts = array (
 		'mark_read' => 'r',
 		'mark_favorite' => 'f',
@@ -62,7 +63,7 @@ class FreshRSS_ConfigurationDAO extends Minz_ModelArray {
 			$this->language = $this->array['language'];
 		}
 		if (isset ($this->array['posts_per_page'])) {
-			$this->posts_per_page = $this->array['posts_per_page'];
+			$this->posts_per_page = intval($this->array['posts_per_page']);
 		}
 		if (isset ($this->array['view_mode'])) {
 			$this->view_mode = $this->array['view_mode'];
@@ -83,7 +84,10 @@ class FreshRSS_ConfigurationDAO extends Minz_ModelArray {
 			$this->sort_order = $this->array['sort_order'];
 		}
 		if (isset ($this->array['old_entries'])) {
-			$this->old_entries = $this->array['old_entries'];
+			$this->old_entries = intval($this->array['old_entries']);
+		}
+		if (isset ($this->array['keep_history_default'])) {
+			$this->keep_history_default = intval($this->array['keep_history_default']);
 		}
 		if (isset ($this->array['shortcuts'])) {
 			$this->shortcuts = array_merge (

+ 6 - 2
app/Models/EntryDAO.php

@@ -260,7 +260,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
 		return isset ($entries[0]) ? $entries[0] : false;
 	}
 
-	public function listWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0) {
+	public function listWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $keepHistoryDefault = 0) {
 		$where = '';
 		$joinFeed = false;
 		$values = array();
@@ -307,7 +307,11 @@ 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_favorite = 1 OR f.keep_history <> 0) ';
+			$where .= 'AND (e1.id >= ' . $date_min . '000000 OR e1.is_favorite = 1 OR (f.keep_history <> 0';
+			if (intval($keepHistoryDefault) === 0) {
+				$where .= ' AND f.keep_history <> -2';	//default
+			}
+			$where .= ')) ';
 			$joinFeed = true;
 		}
 		$search = '';

+ 2 - 2
app/Models/Feed.php

@@ -15,7 +15,7 @@ class FreshRSS_Feed extends Minz_Model {
 	private $pathEntries = '';
 	private $httpAuth = '';
 	private $error = false;
-	private $keep_history = 0;
+	private $keep_history = -2;
 
 	public function __construct ($url, $validate=true) {
 		if ($validate) {
@@ -168,7 +168,7 @@ class FreshRSS_Feed extends Minz_Model {
 	public function _keepHistory ($value) {
 		$value = intval($value);
 		$value = min($value, 1000000);
-		$value = max($value, -1);
+		$value = max($value, -2);
 		$this->keep_history = $value;
 	}
 	public function _nbNotRead ($value) {

+ 2 - 2
app/Models/FeedDAO.php

@@ -2,7 +2,7 @@
 
 class FreshRSS_FeedDAO extends Minz_ModelPdo {
 	public function addFeed ($valuesTmp) {
-		$sql = 'INSERT INTO `' . $this->prefix . 'feed` (url, category, name, website, description, lastUpdate, priority, httpAuth, error, keep_history) VALUES(?, ?, ?, ?, ?, ?, 10, ?, 0, 0)';
+		$sql = 'INSERT INTO `' . $this->prefix . 'feed` (url, category, name, website, description, lastUpdate, priority, httpAuth, error, keep_history) VALUES(?, ?, ?, ?, ?, ?, 10, ?, 0, -2)';
 		$stm = $this->bd->prepare ($sql);
 
 		$values = array (
@@ -326,7 +326,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
 			$myFeed->_pathEntries (isset($dao['pathEntries']) ? $dao['pathEntries'] : '');
 			$myFeed->_httpAuth (isset($dao['httpAuth']) ? base64_decode ($dao['httpAuth']) : '');
 			$myFeed->_error ($dao['error']);
-			$myFeed->_keepHistory (isset($dao['keep_history']) ? $dao['keep_history'] : 0);
+			$myFeed->_keepHistory(isset($dao['keep_history']) ? $dao['keep_history'] : -2);
 			$myFeed->_nbNotRead ($dao['cache_nbUnreads']);
 			$myFeed->_nbEntries ($dao['cache_nbEntries']);
 			if (isset ($dao['id'])) {

+ 5 - 3
app/i18n/en.php

@@ -137,8 +137,9 @@ return array (
 	'feed_url'			=> 'Feed URL',
 	'articles'			=> 'articles',
 	'number_articles'		=> 'Number of articles',
+	'by_feed'			=> 'by feed',
+	'by_default'		=> 'By default',
 	'keep_history'			=> 'Minimum number of articles to keep',
-	'keep_history_help'		=> 'Set to -1 to keep everything',
 	'categorize'			=> 'Store in a category',
 	'truncate'			=> 'Delete all articles',
 	'advanced'			=> 'Advanced',
@@ -164,10 +165,11 @@ return array (
 	'allow_anonymous'		=> 'Allow anonymous reading',
 	'auth_token'			=> 'Authentication token',
 	'explain_token'			=> 'Allows to access RSS output without authentication.<br />%s?token=%s',
-	'archiving_configuration'	=> 'Archiving configuration',
+	'login_configuration'	=> 'Login',
+	'archiving_configuration'	=> 'Archiving',
 	'delete_articles_every'	=> 'Remove articles after',
 	'archiving_configuration_help'	=> 'More options are available in the individual stream settings',
-	'reading_configuration'		=> 'Reading configuration',
+	'reading_configuration'		=> 'Reading',
 	'articles_per_page'		=> 'Number of articles per page',
 	'default_view'			=> 'Default view',
 	'sort_order'			=> 'Sort order',

+ 5 - 3
app/i18n/fr.php

@@ -137,8 +137,9 @@ return array (
 	'feed_url'			=> 'URL du flux',
 	'articles'			=> 'articles',
 	'number_articles'		=> 'Nombre d’articles',
+	'by_feed'			=> 'par flux',
+	'by_default'		=> 'Par défaut',
 	'keep_history'			=> 'Nombre minimum d’articles à conserver',
-	'keep_history_help'		=> 'Mettre à -1 pour tout conserver',
 	'categorize'			=> 'Ranger dans une catégorie',
 	'truncate'			=> 'Supprimer tous les articles',
 	'advanced'			=> 'Avancé',
@@ -165,10 +166,11 @@ return array (
 	'allow_anonymous'		=> 'Autoriser la lecture anonyme',
 	'auth_token'			=> 'Jeton d’identification',
 	'explain_token'			=> 'Permet d’accéder à la sortie RSS sans besoin de s’authentifier.<br />%s?output=rss&token=%s',
-	'archiving_configuration'	=> 'Configuration de l’archivage',
+	'login_configuration'	=> 'Identification',
+	'archiving_configuration'	=> 'Archivage',
 	'delete_articles_every'	=> 'Supprimer les articles après',
 	'archiving_configuration_help'	=> 'D’autres options sont disponibles dans la configuration individuelle des flux',
-	'reading_configuration'		=> 'Configuration de lecture',
+	'reading_configuration'		=> 'Lecture',
 	'articles_per_page'		=> 'Nombre d’articles par page',
 	'default_view'			=> 'Vue par défaut',
 	'sort_order'			=> 'Ordre de tri',

+ 22 - 13
app/views/configure/display.phtml

@@ -31,6 +31,15 @@
 			</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 ('login_configuration'); ?></legend>
+
 		<div class="form-group">
 			<label class="group-name" for="mail_login"><?php echo Minz_Translate::t ('persona_connection_email'); ?></label>
 			<?php $mail = $this->conf->mailLogin (); ?>
@@ -61,22 +70,22 @@
 		</div>
 
 		<legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>
-
+		<p><?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('archiving_configuration_help'); ?></p>
+		
 		<div class="form-group">
 			<label class="group-name" for="old_entries"><?php echo Minz_Translate::t ('delete_articles_every'); ?></label>
 			<div class="group-controls">
-				<input type="number" id="old_entries" name="old_entries" list="list_months" min="1" max="1200" value="<?php echo $this->conf->oldEntries (); ?>" /> <?php echo Minz_Translate::t ('month'); ?>
-				<datalist id="list_months">
-					<option>1</option>
-					<option>2</option>
-					<option>3</option>
-					<option>6</option>
-					<option>12</option>
-					<option>18</option>
-					<option>24</option>
-					<option>36</option>
-				</datalist><br />
-				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('archiving_configuration_help'); ?>
+				<input type="number" id="old_entries" name="old_entries" min="1" max="1200" value="<?php echo $this->conf->oldEntries (); ?>" /> <?php echo Minz_Translate::t ('month'); ?>
+			</div>
+		</div>
+		<div class="form-group">
+			<label class="group-name" for="keep_history_default"><?php echo Minz_Translate::t('keep_history'), ' ', Minz_Translate::t('by_feed'); ?> (<?php echo Minz_Translate::t('by_default'); ?>)</label>
+			<div class="group-controls">
+				<select class="number" name="keep_history_default" id="keep_history_default"><?php
+					foreach (array(-3 => '', 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+						echo '<option value="' . $v . ($this->conf->keepHistoryDefault() == $v ? '" selected="selected' : '') . '">' . $t . ' </option>';
+					}
+				?></select>
 			</div>
 		</div>
 

+ 33 - 29
app/views/configure/feed.phtml

@@ -52,6 +52,15 @@
 				</select>
 			</div>
 		</div>
+		<div class="form-group">
+			<label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
+			<div class="group-controls">
+				<label class="checkbox" for="priority">
+					<input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
+					<?php echo Minz_Translate::t ('yes'); ?>
+				</label>
+			</div>
+		</div>
 		<div class="form-group form-actions">
 			<div class="group-controls">
 				<button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
@@ -78,16 +87,11 @@
 		<div class="form-group">
 			<label class="group-name" for="keep_history"><?php echo Minz_Translate::t ('keep_history'); ?></label>
 			<div class="group-controls">
-				<input type="number" name="keep_history" id="keep_history" list="old_values" min="-1" max="1000000" value="<?php echo $this->flux->keepHistory(); ?>" />
-				<datalist id="old_values">
-					<option value="0">0</option>
-					<option value="10">10</option>
-					<option value="100">100</option>
-					<option value="1000">1 000</option>
-					<option value="10000">10 000</option>
-					<option value="-1">∞</option>
-				</datalist>
-				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('keep_history_help'); ?>
+				<select class="number" name="keep_history" id="keep_history"><?php
+					foreach (array(-3 => '', -2 => Minz_Translate::t('by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+						echo '<option value="' . $v . ($this->flux->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
+					}
+				?></select>
 			</div>
 		</div>
 		<div class="form-group form-actions">
@@ -97,24 +101,7 @@
 			</div>
 		</div>
 
-		<legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
-		<div class="form-group">
-			<label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
-			<div class="group-controls">
-				<label class="checkbox" for="priority">
-					<input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
-					<?php echo Minz_Translate::t ('yes'); ?>
-				</label>
-			</div>
-		</div>
-		<div class="form-group">
-			<label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
-			<div class="group-controls">
-				<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
-				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
-			</div>
-		</div>
-
+		<legend><?php echo Minz_Translate::t ('login_configuration'); ?></legend>
 		<?php $auth = $this->flux->httpAuth (false); ?>
 		<div class="form-group">
 			<label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
@@ -131,7 +118,24 @@
 
 		<div class="form-group form-actions">
 			<div class="group-controls">
-				<button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+				<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 ('advanced'); ?></legend>
+		<div class="form-group">
+			<label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
+			<div class="group-controls">
+				<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
+				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_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>

+ 2 - 2
public/install.php

@@ -33,7 +33,7 @@ define ('SQL_FEED', 'CREATE TABLE IF NOT EXISTS `%1$sfeed` (
 	`pathEntries` varchar(511) DEFAULT NULL,
 	`httpAuth` varchar(511) DEFAULT NULL,
 	`error` boolean DEFAULT 0,
-	`keep_history` MEDIUMINT NOT NULL DEFAULT 0,
+	`keep_history` MEDIUMINT NOT NULL DEFAULT -2,	-- v0.7, -2 = default
 	`cache_nbEntries` int DEFAULT 0,	-- v0.7
 	`cache_nbUnreads` int DEFAULT 0,	-- v0.7
 	PRIMARY KEY (`id`),
@@ -93,7 +93,7 @@ FROM `%1$scategory006`
 ORDER BY id2;
 
 INSERT IGNORE INTO `%2$sfeed` (url, category, name, website, description, priority, pathEntries, httpAuth, keep_history)
-SELECT url, category2, name, website, description, priority, pathEntries, httpAuth, -1 * keep_history
+SELECT url, category2, name, website, description, priority, pathEntries, httpAuth, IF(keep_history = 1, -1, -2)
 FROM `%1$sfeed006`
 ORDER BY id2;
 

+ 4 - 0
public/themes/default/freshrss.css

@@ -667,6 +667,10 @@
 	padding:.5em;
 }
 
+select.number option {
+	text-align:right;
+}
+
 @media(max-width: 840px) {
 	.header,
 	.aside .btn-important,

+ 3 - 0
public/themes/default/global.css

@@ -99,6 +99,9 @@ input, select, textarea {
 	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;

+ 4 - 0
public/themes/flat-design/freshrss.css

@@ -662,6 +662,10 @@ body {
 	padding:.5em;
 }
 
+select.number option {
+	text-align:right;
+}
+
 @media(max-width: 840px) {
 	.header,
 	.aside .btn-important,

+ 3 - 0
public/themes/flat-design/global.css

@@ -101,6 +101,9 @@ input, select, textarea {
 	vertical-align: middle;
 	border-radius: 5px;
 }
+	option {
+		padding:0 .5em 0 .5em;
+	}
 	input[type="radio"],
 	input[type="checkbox"] {
 		width: 15px !important;