[ Index ] |
|
Code source de Seagull 0.6.1 |
1 /** 2 * Default loading implementation 3 * 4 * @category HTML 5 * @package Ajax 6 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 7 * @copyright 2005 Joshua Eichorn 8 * see Main.js for license Author details 9 */ 10 HTML_AJAX.Open = function(request) { 11 var loading = document.getElementById('HTML_AJAX_LOADING'); 12 if (!loading) { 13 loading = document.createElement('div'); 14 loading.id = 'HTML_AJAX_LOADING'; 15 loading.innerHTML = 'Loading...'; 16 17 loading.style.color = '#fff'; 18 loading.style.position = 'absolute'; 19 loading.style.top = 0; 20 loading.style.right = 0; 21 loading.style.backgroundColor = '#f00'; 22 loading.style.border = '1px solid #f99'; 23 loading.style.width = '80px'; 24 loading.style.padding = '4px'; 25 loading.style.fontFamily = 'Arial, Helvetica, sans'; 26 loading.count = 0; 27 28 document.body.insertBefore(loading,document.body.firstChild); 29 } 30 else { 31 if (loading.count == undefined) { 32 loading.count = 0; 33 } 34 } 35 loading.count++; 36 if (request.isAsync) { 37 request.loadingId = window.setTimeout(function() { loading.style.display = 'block'; },500); 38 } 39 else { 40 loading.style.display = 'block'; 41 } 42 } 43 HTML_AJAX.Load = function(request) { 44 if (request.loadingId) { 45 window.clearTimeout(request.loadingId); 46 } 47 var loading = document.getElementById('HTML_AJAX_LOADING'); 48 loading.count--; 49 50 if (loading.count == 0) { 51 loading.style.display = 'none'; 52 } 53 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 30 01:27:52 2007 | par Balluche grâce à PHPXref 0.7 |