Changeset 10549 for OpenPNE/trunk
- Timestamp:
- Jan 29, 2009, 2:20:15 PM (12 years ago)
- Location:
- OpenPNE/trunk/public_html/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/public_html/js/pne_decoration.js
r8642 r10549 13 13 return;} 14 14 Event.observe(document,'mousedown',pne_mce_hide_color_table);var color=null;var settings={colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","999999","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],grid_width:8,default_color:"#888888"};var button=document.getElementById("mce_textmode_button_op_color");var button_container=document.getElementById("mce_editor_buttonmenu");var tbody=document.createElement("tbody");Element.addClassName(tbody,'disabledHideColorTable');var tr;for(var i=0;i<settings.colors.length;i++){var code="#"+settings.colors[i];if(i==0||i%settings.grid_width==0){tr=document.createElement("tr");Element.addClassName(tr,'disabledHideColorTable');tbody.appendChild(tr);} 15 var td=document.createElement("td");td.style.border="0 none";td.style.width="12px";td.style.padding="2px";td.style.margin="0";Element.addClassName(td,'disabledHideColorTable');var a=document.createElement("a");a.setAttribute("href"," javascript:;");a.colorCode=code;a.style.width="9px";a.style.height="9px";a.style.display="block";a.style.overflow="hidden";a.style.border="1px solid #808080";a.style.backgroundColor="#"+settings.colors[i];Element.addClassName(a,'disabledHideColorTable');a.onmousedown=function(){pne_mce_insert_tagname(id,tagname,' code="'+this.colorCode+'"');pne_mce_hide_color_table();};var span=document.createElement("span");span.style.display="none";span.appendChild(document.createTextNode(code));a.appendChild(span);td.appendChild(a);tr.appendChild(td);}15 var td=document.createElement("td");td.style.border="0 none";td.style.width="12px";td.style.padding="2px";td.style.margin="0";Element.addClassName(td,'disabledHideColorTable');var a=document.createElement("a");a.setAttribute("href","#");a.colorCode=code;a.style.width="9px";a.style.height="9px";a.style.display="block";a.style.overflow="hidden";a.style.border="1px solid #808080";a.style.backgroundColor="#"+settings.colors[i];Element.addClassName(a,'disabledHideColorTable');a.onmousedown=function(){pne_mce_insert_tagname(id,tagname,' code="'+this.colorCode+'"');pne_mce_hide_color_table();return false;};var span=document.createElement("span");span.style.display="none";span.appendChild(document.createTextNode(code));a.appendChild(span);td.appendChild(a);tr.appendChild(td);} 16 16 var table=document.createElement("table");table.id="mce_editor_color_table";table.style.width="auto";table.style.position="absolute";table.style.zIndex=150;table.style.border="1px solid gray";table.style.backgroundColor="#fff";table.appendChild(tbody);Element.addClassName(table,'disabledHideColorTable');button_container.appendChild(table);if(Prototype.Browser.IE){table.style.left=button.parentNode.offsetWidth+button.offsetWidth+"px";table.style.top=table.offsetTop+button.offsetHeight;}else{table.style.left=button.offsetLeft+table.offsetLeft+"px";}} 17 17 function pne_mce_hide_color_table(e) -
OpenPNE/trunk/public_html/js/pne_decoration.js.src
r8642 r10549 123 123 124 124 var a = document.createElement("a"); 125 a.setAttribute("href", " javascript:;");125 a.setAttribute("href", "#"); 126 126 a.colorCode = code; 127 127 a.style.width = "9px"; … … 135 135 pne_mce_insert_tagname(id, tagname, ' code="' + this.colorCode + '"'); 136 136 pne_mce_hide_color_table(); 137 return false; 137 138 }; 138 139
Note: See TracChangeset
for help on using the changeset viewer.