From f15d0215dd2b376f13e7ddcd258d6bc09d629e11 Mon Sep 17 00:00:00 2001 From: Gergely POLONKAI Date: Thu, 16 Aug 2012 21:56:39 +0200 Subject: [PATCH] Added setupUserSpans() JavaScript function to set up user data spans Signed-off-by: Gergely POLONKAI --- .../Resources/public/css/statuslines.css | 4 ++-- .../Resources/public/js/kekrozsak.js | 17 +++++++++++++++-- .../views/Default/main_template.html.twig | 5 +---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/KekRozsak/FrontBundle/Resources/public/css/statuslines.css b/src/KekRozsak/FrontBundle/Resources/public/css/statuslines.css index eef7039..3015f86 100644 --- a/src/KekRozsak/FrontBundle/Resources/public/css/statuslines.css +++ b/src/KekRozsak/FrontBundle/Resources/public/css/statuslines.css @@ -55,6 +55,6 @@ } #top-line .gomb { - background-color: transparent; - color: #c4d3ff; + background-color: transparent; + color: #c4d3ff; } diff --git a/src/KekRozsak/FrontBundle/Resources/public/js/kekrozsak.js b/src/KekRozsak/FrontBundle/Resources/public/js/kekrozsak.js index fa802b3..6325a70 100644 --- a/src/KekRozsak/FrontBundle/Resources/public/js/kekrozsak.js +++ b/src/KekRozsak/FrontBundle/Resources/public/js/kekrozsak.js @@ -35,10 +35,13 @@ function resizeBoxes() contentOutlineTop = $('#content-outline').position().top; contentHeight = $('#content-outline').outerHeight(); newsHeight = $('#hirek').outerHeight(); - minHeight = bottomLineTop - contentOutlineTop; + minContentHeight = bottomLineTop - contentOutlineTop + 33; + if (environment == 'dev') { + minContentHeight += 40; + } // TODO: Resize content to its original small size if news is hidden - height = Math.max(contentHeight, newsHeight, minHeight); + height = Math.max(contentHeight, newsHeight, minContentHeight); if ($('#content-outline').outerHeight() < height) { $('#content-outline').css('height', height + 'px'); } @@ -47,6 +50,14 @@ function resizeBoxes() } } +function setupUserSpans() +{ + $('.userdata-secret').cluetip({ + splitTitle: '|', + showTitle: false + }); +} + jQuery.fn.center = function() { this.css('top', Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + 'px'); this.css('left', Math.max(0, (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft()) + 'px'); @@ -56,6 +67,7 @@ jQuery.fn.center = function() { $(document).ready(function() { // Resize news and content boxes to correctly fill the page resizeBoxes(); + setupUserSpans(); $('#popup-close').click(function() { $('#popup-container').fadeOut(); }); $('#popup-scrollable').tinyscrollbar(); @@ -79,6 +91,7 @@ $(document).ready(function() { $('#news-list').html('Nem sikerült betölteni a híreket!'); resizeBoxes(); }); + setupUserSpans(); }); $('#news-close-button').click(function() diff --git a/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig index 067d42d..2f53187 100644 --- a/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig +++ b/src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig @@ -92,6 +92,7 @@