Changeset 67 for trunk/instant_messenger/js/im_templates.js
- Timestamp:
- 09/11/07 17:35:40 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instant_messenger/js/im_templates.js
r64 r67 243 243 } 244 244 245 Templates.prototype.Wait_file = function(pJid) 246 { 247 if(document.getElementById("send_file_im").value != ""){ 248 document.getElementById("div_send_file_im").style.display = "none"; 249 document.getElementById("status_upload").style.display = "block"; 250 this.UpdateStatusSendFile(pJid); 251 }else{ 252 alert("É necessário informar um arquivo para envio!"); 253 } 254 } 255 256 Templates.prototype.UpdateStatusSendFile = function(pJid) 257 { 258 var _this = this; 259 this.time_set = setTimeout("Templates.Wait_file('" + pJid + "')",80); 260 if(this.transfer == 100){ 261 clearTimeout(this.time_set); 262 document.getElementById("div_send_file_im").style.display = "block"; 263 document.getElementById("status_upload").style.display = "none"; 264 document.getElementById("send_file_im").value = ""; 265 this.transfer = 0; 266 this.time_set = ""; 267 268 var h_name_file = function(data){ 269 var pJID = pJid; 270 var message_conf = '<iframe name="IM_down_file" style="display:none"></iframe>'+ 271 '<b>VOCÊ ACABA DE RECEBER UM ARQUIVO !!!! </b>'+ 272 '<a href="../instant_messenger/inc/class.download.inc.php?file=' + data + '" target="IM_down_file">Clique aqui</a>'; 273 var Conf_send_file = function(data){ 274 if(!data) 275 alert(data); 276 } 277 cIM.cExecute("$this.Ujabber.SendMessage",Conf_send_file,"to="+pJID+"&body="+url_encode(encodeURI(message_conf))); 278 } 279 cIM.cExecute("$this.upload.name_file",h_name_file); 280 }else{ 281 var h_size_file = function(data){ 282 _this.transfer++; 283 document.getElementById("progressbar_f").style.width = _this.transfer + "%"; 284 document.getElementById("porcent_im").innerHTML = _this.transfer + "%"; 285 } 286 cIM.cExecute("$this.upload.size_file",h_size_file); 287 } 288 } 289 290 //Templates 291 var Templates = new Templates(); 245 //Templates 246 var Templates = new Templates();
Note: See TracChangeset
for help on using the changeset viewer.