소스 검색

Corrige style bigMarkAsRead

Corrige problème héritage de style pour bigMarkAsRead.
Plus détails
Alexandre Alapetite 12 년 전
부모
커밋
c805b03148
4개의 변경된 파일28개의 추가작업 그리고 24개의 파일을 삭제
  1. 2 2
      app/views/helpers/pagination.phtml
  2. 8 4
      public/scripts/main.js
  3. 9 9
      public/themes/default/freshrss.css
  4. 9 9
      public/themes/flat-design/freshrss.css

+ 2 - 2
app/views/helpers/pagination.phtml

@@ -12,13 +12,13 @@
 	<?php $params[$getteur] = $this->next; ?>
 	<a id="load_more" href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t ('load_more'); ?></a>
 	<?php } elseif ($markReadUrl) { ?>
-	<a class="bigMarkAsRead" href="<?php echo $markReadUrl; ?>">
+	<a id="bigMarkAsRead" href="<?php echo $markReadUrl; ?>">
 		<?php echo Translate::t ('nothing_to_load'); ?><br />
 		<span class="bigTick">✔</span><br />
 		<?php echo Translate::t ('mark_all_read'); ?>
 	</a>
 	<?php } else { ?>
-	<a class="bigMarkAsRead" href=".">
+	<a id="bigMarkAsRead" href=".">
 		<?php echo Translate::t ('nothing_to_load'); ?><br />
 	</a>
 	<?php } ?>

+ 8 - 4
public/scripts/main.js

@@ -58,12 +58,16 @@ function mark_read(active, only_not_read) {
 			elem = $('#' + feed_id + ' .feed').get(0),
 			feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0,
 			feed_priority = elem ? (parseInt(elem.getAttribute('data-priority'), 10) || 0) : 0;
-		elem.setAttribute('data-unread', Math.max(0, feed_unread + inc));
+		if (elem) {
+			elem.setAttribute('data-unread', Math.max(0, feed_unread + inc));
+		}
 
 		//Update unread: category
 		elem = $('#' + feed_id).parent().prevAll('.category').children(':first').get(0);
 		feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0;
-		elem.setAttribute('data-unread', Math.max(0, feed_unread + inc));
+		if (elem) {
+			elem.setAttribute('data-unread', Math.max(0, feed_unread + inc));
+		}
 
 		//Update unread: all
 		if (feed_priority > 0) {
@@ -589,8 +593,8 @@ function init_persona() {
 
 function init_confirm_action() {
 	$('.confirm').click(function () {
-        return confirm(str_confirmation);
-    });
+		return confirm(str_confirmation);
+	});
 }
 
 function init_all() {

+ 9 - 9
public/themes/default/freshrss.css

@@ -575,7 +575,7 @@
 	font-size: 0;
 }
 
-a.bigMarkAsRead {
+#bigMarkAsRead {
 	display: block;
 	font-style: normal;
 	padding: 32px 0 64px 0;
@@ -583,14 +583,14 @@ a.bigMarkAsRead {
 	text-decoration: none;
 	text-shadow: 0 -1px 0 #aaa;
 }
-a.bigMarkAsRead:hover {
-	background: #333;
-	color: #fff;
-}
-.bigTick {
-	font-size: 72pt;
-	line-height: 1.6em;
-}
+	#bigMarkAsRead:hover {
+		background: #333;
+		color: #fff;
+	}
+	.bigTick {
+		font-size: 72pt;
+		line-height: 1.6em;
+	}
 
 /*** NOTIFICATION ***/
 .notification {

+ 9 - 9
public/themes/flat-design/freshrss.css

@@ -562,7 +562,7 @@ body {
 	font-size: 0;
 }
 
-a.bigMarkAsRead {
+#bigMarkAsRead {
 	background: #ecf0f1;
 	display: block;
 	font-style: normal;
@@ -571,14 +571,14 @@ a.bigMarkAsRead {
 	text-decoration: none;
 	text-shadow: 0 -1px 0 #aaa;
 }
-a.bigMarkAsRead:hover {
-	background: #34495e;
-	color: #fff;
-}
-.bigTick {
-	font-size: 72pt;
-	line-height: 1.6em;
-}
+	#bigMarkAsRead:hover {
+		background: #34495e;
+		color: #fff;
+	}
+	.bigTick {
+		font-size: 72pt;
+		line-height: 1.6em;
+	}
 
 /*** NOTIFICATION ***/
 .notification {