Changeset 6760 for sandbox/2.4.2-expresso2
- Timestamp:
- 07/11/12 17:39:49 (12 years ago)
- Location:
- sandbox/2.4.2-expresso2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso2/expressoMail1_2/js/draw_api.js
r6752 r6760 4384 4384 attach.fileSize = formatBytes(file.size); 4385 4385 if(maxAttachmentSize && file.size > maxAttachmentSize) 4386 attach.error = 'Tamanho de arquivo nao permitido !!'4386 attach.error = 'Tamanho de arquivo nao permitido' 4387 4387 else 4388 attach.error = 'Loading...';4388 attach.error = true; 4389 4389 var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 4390 4390 upload.find('.att-box-delete').click(function(){ … … 4423 4423 radius: 5 4424 4424 }, 4425 padding: 5,4426 textAlign: ' center',4425 padding: 3, 4426 textAlign: 'left', 4427 4427 tip: true, // Give it a speech bubble tip with automatic corner detection 4428 name: 'blue'// Style it according to the preset 'cream' style4428 name: (typeof(attach.error) == 'boolean' ? 'light' : 'red') // Style it according to the preset 'cream' style 4429 4429 } 4430 4430 }); … … 4440 4440 }, 4441 4441 done: function(e, data){ 4442 var attach_box = fileUploadMSG.find('.att-box-loading:first').parents('.att-box'); 4443 var attach = { 4444 fullFileName : attach_box.find(".att-box-fullfilename").text(), 4445 fileSize : attach_box.find(".att-box-filesize").text(), 4446 OK : true, 4447 error : false 4448 }; 4442 4449 if(!!data.result && data.result != "[]" ){ 4443 4450 var newAttach = data.result; 4444 if(!newAttach.mailAttachment.error){ 4445 if(newAttach.rollback !== false) 4446 { 4447 fileUploadMSG.find('.att-box-loading:first').parents('div:first').append('<input type="hidden" name="fileId[]" value="'+newAttach['mailAttachment'][0][0].id+'"/>'); 4448 addAttachment(ID,newAttach['mailAttachment'][0][0].id); 4449 } 4450 else 4451 fileUploadMSG.find('.att-box-loading:first').parents('div:first').find('.status-upload').append('Erro ao fazer upload!').addClass('message-attach-error'); 4452 }else{ 4453 fileUploadMSG.find('.att-box-loading:first').parents('div:first').find('.status-upload').append(newAttach.mailAttachment.error).addClass('message-attach-error'); 4454 } 4455 4451 if(!newAttach.mailAttachment.error || newAttach.rollback !== false){ 4452 attach_box.append('<input type="hidden" name="fileId[]" value="'+newAttach['mailAttachment'][0][0].id+'"/>'); 4453 addAttachment(ID,newAttach['mailAttachment'][0][0].id); 4454 }else { 4455 attach_box.addClass('invalid-email-box'); 4456 attach.error = newAttach.mailAttachment.error ? newAttach.mailAttachment.error : 'Erro ao anexar...';//.append(newAttach.mailAttachment.error).addClass('message-attach-error'); 4457 } 4456 4458 }else { 4457 fileUploadMSG.find(' .progress.on-complete:first').parents('div:first').find('.status-upload').append('Erro ao fazer upload!').addClass('message-attach-error'); 4458 } 4459 attach_box.addClass('invalid-email-box');//.qtip("api").updateContent("oi", true); 4460 attach.error = 'Erro ao anexar...'; 4461 } 4462 attach_box.qtip("destroy").qtip({ 4463 content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {attach : attach}), 4464 position: { 4465 corner: { 4466 tooltip: 'bottomMiddle', 4467 target: 'topMiddle' 4468 }, 4469 adjust: { 4470 resize: true, 4471 scroll: true 4472 } 4473 }, 4474 show: { 4475 when: 'mouseover', // Don't specify a show event 4476 ready: false // Show the tooltip when ready 4477 }, 4478 hide: 'mouseout', // Don't specify a hide event 4479 style: { 4480 border: { 4481 width: 1, 4482 radius: 5 4483 }, 4484 padding: 3, 4485 textAlign: 'left', 4486 tip: true, // Give it a speech bubble tip with automatic corner detection 4487 name: (attach.error == false ? 'blue' : 'red')// Style it according to the preset 'cream' style 4488 } 4489 }); 4459 4490 fileUploadMSG.find(' .att-box-loading:first').remove(); 4460 4491 } -
sandbox/2.4.2-expresso2/prototype/modules/mail/templates/attachment_add_itemlist.ejs
r6752 r6760 1 <div class="att-box ui-corner-all <%= ( data.file.error != '' ? 'invalid-email-box' : '') %>" tabindex="0">1 <div class="att-box ui-corner-all <%= (typeof(data.file.error) != 'boolean' ? 'invalid-email-box' : '') %>"> 2 2 <span class="att-box-value" style="padding: 5px;"><%=data.file.fileName%> <b>(<%=data.file.fileSize%>)</b></span> 3 <% if(data.file.error == ''){ %> 3 <span class="att-box-fullfilename" style="display:none;"><%=data.file.fullFileName%></span> 4 <span class="att-box-filesize" style="display:none;"><%=data.file.fileSize%></span> 5 <% if(typeof(data.file.error) == 'boolean'){ %> 4 6 <span class="att-box-loading"> </span> 5 7 <% } %> -
sandbox/2.4.2-expresso2/prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs
r6752 r6760 11 11 <span style="display:inline-block;"> 12 12 <b>Status: </b> 13 <%=(data.attach.error == "" ? "Success " : data.attach.error)%> 14 13 <%if(typeof(data.attach.error) == "boolean"){%> 14 <%=(data.attach.error ? "Loading... " : "Success")%> 15 <%}else{%> 16 <%=data.attach.error%> 17 <%}%> 15 18 </span> 16 <% if(data.attach.error == ''){ %>17 18 <span style="display:inline-block;" class="ui-icon <%=(data.attach.error == ''? 'ui-icon-check' : 'ui-icon-close')%>"></span>19 <% } %>
Note: See TracChangeset
for help on using the changeset viewer.