]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3888 correcting initialization of avatar cropping library
authorCash Costello <cash.costello@gmail.com>
Sun, 2 Oct 2011 00:28:07 +0000 (20:28 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 2 Oct 2011 00:28:07 +0000 (20:28 -0400)
views/default/forms/avatar/crop.php

index b97db939c2851d52969d9e2759050a43e20d2414..1f39ff73ced9db2aad7ba37a36955bb192a7ac68 100644 (file)
@@ -62,9 +62,12 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
                $('<div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>').insertAfter($('#user-avatar'));
                $('<div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>').insertBefore($('#user-avatar-preview'));
 
-               // this produces the coordinates
-               $('#user-avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
-               // show the preview
-               $('#user-avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
+               // init the cropping
+               $('#user-avatar').imgAreaSelect({
+                       selectionOpacity: 0,
+                       aspectRatio: '1:1',
+                       onSelectEnd: selectChange,
+                       onSelectChange: preview
+               });
        });
 </script>