From 371434c63acedb4229c48ea8e737b908f271ca26 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 2 Jul 2013 18:04:02 +0200 Subject: Fix issues #93 et #94 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- app/views/javascript/main.phtml | 4 +++- public/theme/global.css | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index b3da278bc..9226efe63 100644 --- a/app/views/javascript/main.phtml +++ b/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 (); diff --git a/public/theme/global.css b/public/theme/global.css index b1fd01436..081d26730 100644 --- a/public/theme/global.css +++ b/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; -- cgit v1.2.3