/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Functions used in Setup configuration forms
*/
// show this window in top frame
if (top != self) {
window.top.location.href = location;
}
// ------------------------------------------------------------------
// Messages
//
// stores hidden message ids
var hiddenMessages = [];
$(function () {
var hidden = hiddenMessages.length;
for (var i = 0; i < hidden; i++) {
$('#' + hiddenMessages[i]).css('display', 'none');
}
if (hidden > 0) {
var link = $('#show_hidden_messages');
link.click(function (e) {
e.preventDefault();
for (var i = 0; i < hidden; i++) {
$('#' + hiddenMessages[i]).show(500);
}
$(this).remove();
});
link.html(link.html().replace('#MSG_COUNT', hidden));
link.css('display', '');
}
});
//set document width
$(document).ready(function(){
width = 0;
$('ul.tabs li').each(function(){
tabWidth = $(this).width() + 10;
width += tabWidth;
});
contentWidth = width;
width += 250;
$('body').css('min-width', width);
$('.tabs_contents').css('min-width', contentWidth);
});
//
// END: Messages
// ------------------------------------------------------------------
// ------------------------------------------------------------------
// Form validation and field operations
//
/**
* Calls server-side validation procedures
*
* @param {Element} parent input field in