menu_change_appearance

NAML documentation   Watch a video
   Usages of this macro
... in dropdown.naml
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<macro name="menu_change_appearance" requires="node">
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_in_command
Binary
Namespace: BasicNamespace
Parameters: name
 name="dropdown">
        <then>
            dropdown.add('changeAppearance', '<n.javascript_string_encode
Binary
Namespace: NabbleNamespace
Parameters: text
.change_appearance_link
Macro
Parameters: text, title, class
/>', 'display:none');
        </then>
        <else>
            <n.set_local_node
Macro
Parameters: node
.this_node
Binary
Namespace: NodeNamespace
Parameters: do
/>
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.local_node
Macro
Parameters: do
.is_root
Binary
Namespace: NodeNamespace
/]" condition2="[n.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.can_edit
Macro
Requires: user
Parameters: node_attr
.local_node
Macro
Parameters: do
/]">
                <then>
                    function hasChangeAppearanceToolbar() {
                        try {
                            if (parent.isChangeAppearance)
                                return true
                        } catch (err) {}
                        return false;
                    };
                    /* Avoid duplicate toolbars */
                    if (!hasChangeAppearanceToolbar())
                        NabbleDropdown.show('changeAppearance');
                </then>
            </n.if.both>
        </else>
    </n.if.is_in_command>
</macro>