Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Thumbnail resize bug (Jcrop don't work)

edited September 2010 in Vanilla 2.0 - 2.8
Thumbnail resize don't work at Webkit (Safari, Chrome) and Opera browsers in every Vanilla site.

Links goes to proof-pictures.
Chrome 6.0.472.62 and Safari 5.02 has no picture to resize.
In Opera 10.62 picture don't crop.

But I'm edit applications/dashboard/views/profile/thumnail.php:
<?php if (!defined('APPLICATION')) exit(); ?> <script language="Javascript"> // Remember to invoke within jQuery(window).load(...) // If you don't, Jcrop may not initialize properly jQuery(window).load(function(){ jQuery('#cropbox').Jcrop({ onChange: showPreview, onSelect: showPreview, aspectRatio: 1 }); }); // Our simple event handler, called from onChange and onSelect // event handlers, as per the Jcrop invocation above function showPreview(coords) { if (parseInt(coords.w) > 0) { var rx = 100 / coords.w; var ry = 100 / coords.h; jQuery('#preview').css({ width: Math.round(rx * 500) + 'px', height: Math.round(ry * 370) + 'px', marginLeft: '-' + Math.round(rx * coords.x) + 'px', marginTop: '-' + Math.round(ry * coords.y) + 'px' }); } } </script> <?php echo '<h2>'.T('Edit My Thumbnail').'</h2>'; echo $this->Form->Errors(); echo $this->Form->Open(array('class' => 'Thumbnail')); ?> <div class="Info"><?php echo T('Drag around and resize the square below to define your thumbnail icon.'); ?></div> <table> <thead> <tr> <th><?php echo T('Original'); ?></th> <td><?php echo T('Thumbnail'); ?></td> </tr> </thead> <tbody> <tr> <th> <?php echo Img('uploads/'.ChangeBasename($this->User->Photo,'p%s'), array('id' => 'cropbox')); ?> </th> <td> <div style="<?php echo 'width:'.$this->ThumbSize.'px;height:'.$this->ThumbSize.'px;'; ?>overflow:hidden;"> <?php echo Img('uploads/'.ChangeBasename($this->User->Photo, 'p%s'), array('id' => 'preview')); ?> </div> </td> </tr> </tbody> </table> <?php echo $this->Form->Close('Save');
And crop works fine everywhere exept Safari (same bug - no pict)

Any ideas how to do it work in Safari?

PS. Sorry my pure bad English.
Tagged:

Comments

  • Options

    noticed the same today, and this post is even from sep. 2010.

    two years and no fix yet?

  • Options
    peregrineperegrine MVP
    edited November 2012

    works in chrome. I can only assume you are using the browser versions mentioned and they are two years old. update your browser or restate your questions with some details. This "me too" stuff on two year old issues is hard to decipher - because the me too is NOT the same parameters.

    good idea to start new posts when you are not using any of the same versions even remotely - unless you are trying to prove a point rather than getting an answer.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.