diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/theming/preview/widgets.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/documentation/theming/preview/widgets.php b/documentation/theming/preview/widgets.php index ca45132df..beef33e16 100644 --- a/documentation/theming/preview/widgets.php +++ b/documentation/theming/preview/widgets.php @@ -59,5 +59,19 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) { } ?> </div> +<script type="text/javascript"> + // widgets do not have guids so we override the edit toggle and delete button + $(document).ready(function() { + $('.elgg-widget-edit-button').unbind('click'); + $('.elgg-widget-edit-button').click(function() { + $(this).closest('.elgg-module-widget').find('.elgg-widget-edit').slideToggle('medium'); + return false; + }); + $('.elgg-widget-delete-button').click(function() { + $(this).closest('.elgg-module-widget').remove(); + return false; + }); + }); +</script> </body> </html>
\ No newline at end of file |