Added setupUserSpans() JavaScript function to set up user data spans
Signed-off-by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
parent
de5a4067cb
commit
f15d0215dd
@ -55,6 +55,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#top-line .gomb {
|
#top-line .gomb {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #c4d3ff;
|
color: #c4d3ff;
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,13 @@ function resizeBoxes()
|
|||||||
contentOutlineTop = $('#content-outline').position().top;
|
contentOutlineTop = $('#content-outline').position().top;
|
||||||
contentHeight = $('#content-outline').outerHeight();
|
contentHeight = $('#content-outline').outerHeight();
|
||||||
newsHeight = $('#hirek').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
|
// 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) {
|
if ($('#content-outline').outerHeight() < height) {
|
||||||
$('#content-outline').css('height', height + 'px');
|
$('#content-outline').css('height', height + 'px');
|
||||||
}
|
}
|
||||||
@ -47,6 +50,14 @@ function resizeBoxes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupUserSpans()
|
||||||
|
{
|
||||||
|
$('.userdata-secret').cluetip({
|
||||||
|
splitTitle: '|',
|
||||||
|
showTitle: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.fn.center = function() {
|
jQuery.fn.center = function() {
|
||||||
this.css('top', Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + 'px');
|
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');
|
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() {
|
$(document).ready(function() {
|
||||||
// Resize news and content boxes to correctly fill the page
|
// Resize news and content boxes to correctly fill the page
|
||||||
resizeBoxes();
|
resizeBoxes();
|
||||||
|
setupUserSpans();
|
||||||
|
|
||||||
$('#popup-close').click(function() { $('#popup-container').fadeOut(); });
|
$('#popup-close').click(function() { $('#popup-container').fadeOut(); });
|
||||||
$('#popup-scrollable').tinyscrollbar();
|
$('#popup-scrollable').tinyscrollbar();
|
||||||
@ -79,6 +91,7 @@ $(document).ready(function() {
|
|||||||
$('#news-list').html('Nem sikerült betölteni a híreket!');
|
$('#news-list').html('Nem sikerült betölteni a híreket!');
|
||||||
resizeBoxes();
|
resizeBoxes();
|
||||||
});
|
});
|
||||||
|
setupUserSpans();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#news-close-button').click(function()
|
$('#news-close-button').click(function()
|
||||||
|
@ -92,6 +92,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var environment = '{{ app.environment }}';
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
$('#profil-mutato').click(function() {
|
$('#profil-mutato').click(function() {
|
||||||
if ($('#profil-box').is(':visible'))
|
if ($('#profil-box').is(':visible'))
|
||||||
@ -121,10 +122,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.userdata').cluetip();
|
$('.userdata').cluetip();
|
||||||
$('.userdata-secret').cluetip({
|
|
||||||
splitTitle: '|',
|
|
||||||
showTitle: false
|
|
||||||
});
|
|
||||||
{% else %}
|
{% else %}
|
||||||
$('#login-mutato').click(function() {
|
$('#login-mutato').click(function() {
|
||||||
if ($('#login-box').is(':visible'))
|
if ($('#login-box').is(':visible'))
|
||||||
|
Loading…
Reference in New Issue
Block a user