aboutsummaryrefslogtreecommitdiff
path: root/documentation/theming
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-05 17:35:49 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-05 17:35:49 +0000
commite4689067e1c27cfc1ac7dbdcf8d3ab835eec0971 (patch)
tree3b57911ca7b8170abe042b45cc045fa639abbe07 /documentation/theming
parent1ad3a9ab1696958ffe513d915047d2962c0144ef (diff)
downloadelgg-e4689067e1c27cfc1ac7dbdcf8d3ab835eec0971.tar.gz
elgg-e4689067e1c27cfc1ac7dbdcf8d3ab835eec0971.tar.bz2
fixed widgets theming preview by overriding some javascript
git-svn-id: http://code.elgg.org/elgg/trunk@8033 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'documentation/theming')
-rw-r--r--documentation/theming/preview/widgets.php14
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