forked from extern/egroupware
need to wait for jQuery to be loaded
This commit is contained in:
parent
0389960e32
commit
3bace4e0d7
@ -12,19 +12,22 @@
|
|||||||
/**
|
/**
|
||||||
* Handle HTML5 validation on tabs
|
* Handle HTML5 validation on tabs
|
||||||
*/
|
*/
|
||||||
jQuery().ready(function() {
|
egw_LAB.wait(function() {
|
||||||
jQuery('.tab_body :input').bind('invalid', function(e) {
|
jQuery().ready(function() {
|
||||||
// Activate the appropriate tab
|
jQuery('.tab_body :input').bind('invalid', function(e) {
|
||||||
var tab = jQuery(this).parentsUntil('.tab_body').last();
|
// Activate the appropriate tab
|
||||||
var alltabs = [tab.attr("id")];
|
var tab = jQuery(this).parentsUntil('.tab_body').last();
|
||||||
tab.siblings('div').each(function() {
|
var alltabs = [tab.attr("id")];
|
||||||
alltabs.push(this.id);
|
tab.siblings('div').each(function() {
|
||||||
|
alltabs.push(this.id);
|
||||||
|
});
|
||||||
|
activate_tab(tab.attr("id"), alltabs.join('|'));
|
||||||
});
|
});
|
||||||
activate_tab(tab.attr("id"), alltabs.join('|'));
|
// focus on input with tabindex=1
|
||||||
|
jQuery('input[tabindex="1"],select[tabindex="1"],textarea[tabindex="1"]').focus();
|
||||||
});
|
});
|
||||||
// focus on input with tabindex=1
|
|
||||||
jQuery('input[tabindex="1"],select[tabindex="1"],textarea[tabindex="1"]').focus();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function submitit(form,name)
|
function submitit(form,name)
|
||||||
{
|
{
|
||||||
//alert(name+' pressed');
|
//alert(name+' pressed');
|
||||||
@ -405,7 +408,7 @@ function popup_resize()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var positionY = (document.all?window.screenTop:window.screenY);
|
var positionY = (document.all?window.screenTop:window.screenY);
|
||||||
var moveMe = height2grow / 2;
|
var moveMe = height2grow / 2;
|
||||||
if ( moveMe <= positionY )
|
if ( moveMe <= positionY )
|
||||||
{
|
{
|
||||||
moveMe = -(moveMe);
|
moveMe = -(moveMe);
|
||||||
|
Loading…
Reference in New Issue
Block a user