Revision ff8333db snf-astakos-app/astakos/im/static/im/js/quotas.js
b/snf-astakos-app/astakos/im/static/im/js/quotas.js | ||
---|---|---|
7 | 7 |
|
8 | 8 |
$(this).appendTo('.visible'); |
9 | 9 |
$(this).show('slow'); |
10 |
$(this).find('input')[0].focus() |
|
10 |
console.info('lala'); |
|
11 |
$(this).find('input').first().focus(); |
|
12 |
console.info($(this).find('input').first()); |
|
13 |
console.info('boo'); |
|
11 | 14 |
} |
12 | 15 |
}); |
13 | 16 |
if ($('.quotas-form .with-info .with-errors input[type="text"]')){ |
... | ... | |
23 | 26 |
return (bytes / Math.pow(1024, i)).toFixed( 0 ) + sizes[ isNaN( bytes ) ? 0 : i+1 ]; |
24 | 27 |
} |
25 | 28 |
|
26 |
$(document).ready(function() { |
|
27 | 29 |
|
30 |
function goToByScroll(id){ |
|
31 |
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); |
|
32 |
} |
|
28 | 33 |
|
34 |
$(document).ready(function() { |
|
35 |
|
|
29 | 36 |
|
37 |
|
|
30 | 38 |
// ugly fix to transfer data easily |
31 | 39 |
$('.with-info input[name^="is_selected_"]').each(function() { |
32 | 40 |
$(this).parents('.form-row').hide(); |
... | ... | |
296 | 304 |
} |
297 | 305 |
}); |
298 | 306 |
|
299 |
function goToByScroll(id){ |
|
300 |
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); |
|
301 |
} |
|
307 |
|
|
302 | 308 |
|
303 | 309 |
|
304 | 310 |
$('#group_create_form').submit(function(){ |
... | ... | |
327 | 333 |
|
328 | 334 |
}); |
329 | 335 |
|
330 |
|
|
336 |
goToByScroll("top"); |
|
331 | 337 |
$('.quotas-form .form-row.with-errors input[type="text"]').first().focus(); |
332 | 338 |
|
333 | 339 |
|
334 | 340 |
|
341 |
|
|
335 | 342 |
}); |
Also available in: Unified diff