Changeset 7016
- Timestamp:
- May 7, 2008, 7:03:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/public_html/js/pne.js
r6703 r7016 94 94 95 95 var button = document.getElementById("mce_textmode_button_op_color"); 96 var x = button.offsetLeft;97 96 98 97 var button_container = document.getElementById("mce_editor_buttonmenu"); … … 111 110 112 111 var td = document.createElement("td"); 113 td.style.backgroundColor = "#" + settings.colors[i]; 114 td.style.height = "10px"; 115 td.style.border = "1px solid white"; 112 td.style.border = "0 none"; 113 td.style.width = "12px"; 114 td.style.padding = "2px"; 115 td.style.margin = "0"; 116 116 117 117 var a = document.createElement("a"); … … 121 121 a.style.height = "9px"; 122 122 a.style.display = "block"; 123 a.style.overflow = "hidden"; 124 a.style.border = "1px solid #808080"; 125 a.style.backgroundColor = "#" + settings.colors[i]; 123 126 a.onclick = function() { 124 127 pne_mce_insert_tagname(id, tagname, ' code="' + this.colorCode + '"'); … … 127 130 }; 128 131 132 var span = document.createElement("span"); 133 span.style.display = "none"; 134 span.appendChild(document.createTextNode(code)); 135 136 a.appendChild(span); 129 137 td.appendChild(a); 130 138 tr.appendChild(td); … … 133 141 var table = document.createElement("table"); 134 142 table.id = "mce_editor_color_table"; 135 table.style.width = " 150px";143 table.style.width = "auto"; 136 144 table.style.position = "absolute"; 137 table.style.left = x + 150 + "px";138 145 table.style.zIndex = 150; 139 table.style.padding = "5px";140 146 table.style.border = "1px solid gray"; 141 147 table.style.backgroundColor = "#fff"; … … 143 149 144 150 button_container.appendChild(table); 151 152 if (Prototype.Browser.IE) { 153 table.style.left = button.parentNode.offsetWidth + button.offsetWidth + "px"; 154 table.style.top = table.offsetTop + button.offsetHeight; 155 } else { 156 table.style.left = button.offsetLeft + table.offsetLeft + "px"; 157 } 145 158 } 146 159
Note: See TracChangeset
for help on using the changeset viewer.