... | in editor_color_button.naml |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<macro name="editor_color_button">
<n.put_in_head.>
<script type="text/javascript">
var colorTable = "<n.javascript_string_encode.compress.color_table/>";
Nabble.color2 = function(cod,name) {
var textarea = Nabble.get(textareaID);
var s = this.getSelection(textarea);
if( s != "" || (s=prompt("Enter text to make "+name+":","")) != null ) {
this.setSelection( textarea, "<span style ='color: "+cod+" ;'>" + s + "</span>" );
}
textarea.focus();
};
var colorsLoaded = false;
Nabble.openColors = function() {
Nabble.closeWindows();
var $colors = $('#color-dropdown');
if (!colorsLoaded) {
$colors.html(colorTable);
colorsLoaded = true;
}
$colors.show();
};
</script>
</n.put_in_head.>
<td class="has-dropdown">
<div id="color-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="margin-left:1em"></div>
<button type="button" onclick="Nabble.openColors()" class="toolbar" title="[t]Add colors to your text.[/t]">
<img src="http://cdn1.iconfinder.com/data/icons/aspneticons_v1.0_Nov2006/color2_16x16.gif" border="0" style="vertical-align:middle; padding-bottom: .15em;"/>
<img src="/images/more.png" width="10" height="10"/>
</button>
<n.tooltip use_title="true"/>
</td>
</macro>
|
Free forum by Nabble | Naml |