Changeset 3525 for branches/2.2/expressoMail1_2/js
- Timestamp:
- 11/19/10 16:41:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/js/abas.js
r3372 r3525 144 144 borderTitle = borderTitle.substring(0, resize*0.08); 145 145 146 td.innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + ID+" class='font-menu' width=*>" + borderTitle + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + ID + "','false') src='templates/"+template+"/images/close_button.gif'></td></tr></table>"; 146 td.innerHTML = "<div style='width:100%;border:0;padding:0;'>\n\ 147 <div id='font_border_id_" + ID+"' class='font-menu' style='width:*;'>" + 148 borderTitle + 149 "</div>\n\ 150 <div style='width:1px;float:left;clear:right;'>\n\ 151 <img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + ID + "','false') src='templates/"+template+"/images/close_button.gif'/>\n\ 152 </div>\n\ 153 </div>"; 147 154 148 155 bb = document.getElementById("border_blank"); … … 199 206 if ((children[i].nodeName === 'TD') && (children[i].id!=='border_id_0') && (children[i].id!=='border_blank')){ 200 207 children[i].style.width = newWidthTD; 201 set_border_caption(children[i].id, children[i].title );208 set_border_caption(children[i].id, children[i].title, newWidthTD); 202 209 } 203 210 } … … 205 212 } 206 213 207 function set_border_caption(border_id, title) 208 { 209 var border = document.getElementById(border_id); 210 var border_width = border.clientWidth; 214 function set_border_caption(border_id, title, border_width) 215 { 216 var border = document.getElementById(border_id); 217 if (border_width == null) 218 { 219 border_width = border.clientWidth; 220 } 211 221 var caption = ""; 212 if (title.substring(0, (border_width-44)*0.14).length < title.length) 213 title = title.substring(0, (border_width-44)*0.14) + "..."; 222 Element("font_"+border.id).style.width = (border_width - 25)+'px'; 214 223 Element("font_"+border.id).innerHTML = title; 215 224 return(title);
Note: See TracChangeset
for help on using the changeset viewer.