- Timestamp:
- 10/07/10 10:35:49 (14 years ago)
- Location:
- branches/2.2/expressoMail1_2/js
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/js/abas.js
r3188 r3336 169 169 function resize_borders() 170 170 { 171 var children; 172 var numBorders = 0; 173 var widthTD = 0; 174 var newWidthTD = 0; 175 children = Element('border_tr').childNodes; 176 for (var i=0; i<children.length; i++) { 177 if ((children[i].nodeName === 'TD') && (children[i].id!=='border_id_0') && (children[i].id!=='border_blank')) { 178 numBorders++; 179 if(!widthTD) 180 widthTD = children[i].clientWidth; 181 } 182 } 171 var numBorders = count_borders(); 172 183 173 if (numBorders > 8) 184 174 return false; 185 186 newWidthTD = ((numBorders*widthTD)+(Element("border_blank").clientWidth-44))/(numBorders+1); 175 176 return redim_borders(numBorders+1); 177 } 178 179 function count_borders() 180 { 181 var numBorders = 0; 182 var children = Element('border_tr').childNodes; 183 for (var i=0; i<children.length; i++) { 184 if ((children[i].nodeName === 'TD') && (children[i].id!=='border_id_0') && (children[i].id!=='border_blank')) 185 numBorders++; 186 } 187 188 return numBorders; 189 } 190 191 function redim_borders(numBorders) 192 { 193 var children = Element('border_tr').childNodes; 194 var clientWidth = (window.document.body.clientWidth - findPosX(Element("exmail_main_body"))) - Element("border_id_0").clientWidth - 30; 195 var newWidthTD = (clientWidth/numBorders)-6; 196 newWidthTD = newWidthTD > 200 ? 200 : (newWidthTD < 50 ? 50 : newWidthTD); 197 children = Element('border_tr').childNodes; 187 198 for (var i=0; i<children.length; i++) { 188 199 if ((children[i].nodeName === 'TD') && (children[i].id!=='border_id_0') && (children[i].id!=='border_blank')){ 189 200 children[i].style.width = newWidthTD; 190 Element("font_"+children[i].id).innerHTML = Element("font_"+children[i].id).innerHTML.substring(0, newWidthTD*0.08); 201 if (children[i].title.substring(0, (newWidthTD-44)*0.14).length == children[i].title.length) 202 Element("font_"+children[i].id).innerHTML = children[i].title; 203 else 204 Element("font_"+children[i].id).innerHTML = children[i].title.substring(0, (newWidthTD-44)*0.14) + "..."; 191 205 } 192 206 } -
branches/2.2/expressoMail1_2/js/common_functions.js
r3270 r3336 66 66 content_folders.style.height = (clientHeight - (contentFoldersY + (contentFoldersY > findPosY(search_div) ? 0 : (search_div.clientHeight ? search_div.clientHeight : search_div.offsetHeight) + 5))) + "px"; 67 67 } 68 redim_borders(count_borders()); 68 69 } 69 70 // END: FUNCTION RESIZE WINDOW -
branches/2.2/expressoMail1_2/js/main.js
r3298 r3336 1354 1354 // END Tab event 1355 1355 1356 var offWidth = Element('border_blank').offsetWidth ? Element('border_blank').offsetWidth : Element('border_blank').clientWidth;1357 var resize = false;1358 1359 if (offWidth < 200) {1360 resize = Element("border_id_" + new_border_ID).style.width;1361 }1362 1363 if (title.length > 21){1364 title = title.substring(0,21) + "...";1365 }1366 1367 if(resize)1368 title = title.substring(0, parseInt(resize)*0.08);1369 1370 1356 // Load default style for <PRE> tag, inside RichTextEditor. 1371 RichTextEditor.loadStyle("pre","main.css"); 1372 1373 Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/"+template+"/images/close_button.gif'></td></tr></table>"; 1357 RichTextEditor.loadStyle("pre","main.css"); 1358 1359 var caption = ""; 1360 var resize = Element("border_id_" + new_border_ID).width; 1361 if (title.substring(0, (resize-44)*0.14).length == title.length) 1362 caption = title; 1363 else 1364 caption = title.substring(0, (resize-44)*0.14) + "..."; 1365 1366 Element("border_id_" + new_border_ID).title = title; 1367 Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +caption + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/"+template+"/images/close_button.gif'></td></tr></table>"; 1368 1374 1369 return new_border_ID; //Preciso retornar o ID da nova mensagem. 1375 1370 }
Note: See TracChangeset
for help on using the changeset viewer.