1/**
2 * Add button action for the do button
3 *
4 * @param  {jQuery} $btn   Button element to add the action to
5 * @param  {Array}  props Associative array of button properties
6 * @param  {string} edid  ID of the editor textarea
7 * @return {string} If button should be appended return the id for in aria-controls, otherwise an empty string
8 *
9 * @author Andreas Gohr <gohr@cosmocode.de>
10 */
11function addBtnActionDo($btn, props, edid) {
12    'use strict';
13
14    PluginDo.initDialog(edid);
15
16    // add toolbar button action
17    $btn.click(PluginDo.toggleToolbarDialog);
18
19    return 'do';
20}
21
22/**
23 * Append button to toolbar
24 */
25if (typeof window.toolbar !== 'undefined') {
26    // icon from Yusuke Kamiyamane - http://www.pinvoke.com/
27    window.toolbar.push({
28        type: 'do',
29        title: LANG.plugins.do.toolbar_title,
30        icon: '../../plugins/do/pix/toolbar.png',
31    });
32}
33