Просмотр исходного кода

Fix issues #93 et #94

Les noms de catégorie trop longs ne cassent plus les boutons dans la
colonne de gauche (ajout d'un overflow hidden)

Les articles enroulés ne bugguent plus lorsqu'on charge plus d'articles.
L'action au clic pour dérouler un article était appliqué deux fois,
désormais on "unbind" d'abord l'action avant de la réappliquer (pas très
efficace mais c'est la façon la plus simple)
Marien Fressinaud 12 лет назад
Родитель
Сommit
371434c63a
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 1
      app/views/javascript/main.phtml
  2. 1 0
      public/theme/global.css

+ 3 - 1
app/views/javascript/main.phtml

@@ -163,7 +163,9 @@ function init_posts () {
 		$(".flux:not(.active) .flux_content").hide ();
 	}
 
-	$(".flux_header .item.title, .flux_header .item.date").click (function () {
+	var flux_header_toggle = $(".flux_header .item.title, .flux_header .item.date");
+	flux_header_toggle.unbind('click'); // évite d'associer 2 fois le toggle
+	flux_header_toggle.click (function () {
 		old_active = $(".flux.active");
 		new_active = $(this).parent ().parent ();
 

+ 1 - 0
public/theme/global.css

@@ -188,6 +188,7 @@ input, select, textarea {
 	line-height: 20px;
 	vertical-align: middle;
 	cursor: pointer;
+	overflow: hidden;
 }
 	a.btn {
 		min-height: 25px;