... | in editor_smiley_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 35 36 37
|
<override_macro name="editor_smiley_button">
<n.put_in_head Binary Namespace: HtmlNamespace
Parameters:
in_head
♦ ♦
<script type="text/javascript">
var smileyTable = "<n.javascript_string_encode Binary Namespace: NabbleNamespace
Parameters:
text
♦ ♦ Macro Parameters:
text
♦ ♦ Macro ♦ ♦
<![CDATA[
Nabble.smiley = function(image) {
var textarea = Nabble.get(textareaID);
if (image.indexOf('http://')==0)
this.setSelection( textarea, "<img class='smiley' src=\""+image+"\"/>" );
else
this.setSelection( textarea, "<smiley image=\""+image+"\"/>" );
textarea.focus();
Nabble.closeWindows();
};
var smileysLoaded = false;
Nabble.openSmileys = function() {
Nabble.closeWindows();
var $smileys = $('#smiley-dropdown');
if (!smileysLoaded) {
$smileys.html(smileyTable);
smileysLoaded = true;
}
$smileys.show();
};
]]>
</script>
</n.put_in_head.>
<td class="has-dropdown">
<div id="smiley-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="margin-left:-15em"></div>
<button type="button" onclick="Nabble.openSmileys()" class="toolbar" title="[t]Add smileys and funny animations[/t]">
<img src="/images/icon_happy.png" border="0" style="vertical-align:middle"/>
<img src="/images/more.png" width="10" height="10"/>
</button>
<n.tooltip Macro Parameters:
use_title, delay, contents, position
♦ ♦
</td>
</override_macro>
|
... | in text_editor.naml |
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
|
<macro name="editor_smiley_button">
<n.put_in_head.>
<script type="text/javascript">
var smileyTable = "<n.javascript_string_encode.compress.smiley_table/>";
<![CDATA[
Nabble.smiley = function(image) {
var textarea = Nabble.get(textareaID);
if (image.indexOf('http://')==0)
this.setSelection( textarea, "<img src=\""+image+"\"/>" );
else
this.setSelection( textarea, "<smiley image=\""+image+"\"/>" );
textarea.focus();
Nabble.closeWindows();
};
var smileysLoaded = false;
Nabble.openSmileys = function() {
Nabble.closeWindows();
var $smileys = $('#smiley-dropdown');
if (!smileysLoaded) {
$smileys.html(smileyTable);
smileysLoaded = true;
}
$smileys.show();
};
]]>
</script>
</n.put_in_head.>
<td class="has-dropdown">
<div id="smiley-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="margin-left:-15em"></div>
<button type="button" onclick="Nabble.openSmileys()" class="toolbar" title="[t]Add smileys and funny animations[/t]">
<img src="/images/icon_happy.png" border="0" style="vertical-align:middle"/>
<img src="/images/more.png" width="10" height="10"/>
</button>
<n.tooltip use_title="true"/>
</td>
</macro>
|