|
85 | 85 | {*<a class="{button_style}" href="{$backlink}">{'Done'|gettext}</a>*} |
86 | 86 | {br}{icon button=true class=reply link=$backlink text='Exit Forms Designer'|gettext} |
87 | 87 | </p> |
88 | | - <div id="trash" class="trash" title="{'Drag a control from the form and drop it on this box to remove it'|gettext}"> |
89 | | - <strong>{'Trash Can'|gettext}</strong>{br} |
90 | | - {img class="img-center" src="`$smarty.const.PATH_RELATIVE`framework/modules/recyclebin/assets/images/trashcan_full_large.png"} |
| 88 | + <div id="palette-button" class="btn btn-secondary"> |
| 89 | + Tools |
| 90 | + <i class="fas fa-bars bi bi-list"></i> |
| 91 | + </div> |
| 92 | + <div id="palette"> |
| 93 | + <div id="trash" class="trash" title="{'Drag a control from the form and drop it on this box to remove it'|gettext}"> |
| 94 | + <strong>{'Trash Can'|gettext}</strong>{br} |
| 95 | + {img class="img-center" src="`$smarty.const.PATH_RELATIVE`framework/modules/recyclebin/assets/images/trashcan_full_large.png"} |
| 96 | + </div> |
| 97 | + <ul id="controls" class="controls" title="{'Drag a control from this box and drop it on the form to add it to the selected location'|gettext}"> |
| 98 | + <strong>{'Available Form Controls'|gettext}</strong> |
| 99 | + {foreach from=$types key=value item=caption} |
| 100 | + <li class="item" type="{$value}"{if $smarty.const.DEVELOPMENT} title="{$value}"{/if}> |
| 101 | + {$caption} |
| 102 | + </li> |
| 103 | + {/foreach} |
| 104 | + </ul> |
91 | 105 | </div> |
92 | | - <ul id="controls" class="controls" title="{'Drag a control from this box and drop it on the form to add it to the selected location'|gettext}"> |
93 | | - <strong>{'Available Form Controls'|gettext}</strong> |
94 | | - {foreach from=$types key=value item=caption} |
95 | | - <li class="item" type="{$value}"{if $smarty.const.DEVELOPMENT} title="{$value}"{/if}> |
96 | | - {$caption} |
97 | | - </li> |
98 | | - {/foreach} |
99 | | - </ul> |
100 | 106 | </div> |
101 | 107 |
|
102 | 108 | {script unique="design-form" jquery="Sortable,bootbox.all" bootstrap="modal"} |
|
141 | 147 | }); |
142 | 148 | }); |
143 | 149 |
|
| 150 | + // display tool palette on/off |
| 151 | + $('#palette-button').on('click', function(evt) { |
| 152 | + evt.preventDefault(); |
| 153 | + $('#palette').toggle(); |
| 154 | + }); |
| 155 | + |
144 | 156 | // we need to catch 'edit' button clicks |
145 | 157 | $('#fakeform').on('click', '.edit', function(evt) { |
146 | 158 | evt.preventDefault(); |
|
0 commit comments