Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #43 from bupy7/dev
Browse files Browse the repository at this point in the history
v5.1.0
  • Loading branch information
bupy7 committed May 20, 2017
2 parents e213e1b + 797d005 commit 5c293f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
/composer.lock
/build
/.php_cs.cache
/nbproject
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
yii2-widget-cropbox
===================

v5.1.0 [2017-05-20]
-------------------

- Update js-cropbox extension.

v5.0.2 [2017-05-13]
-------------------

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -3,7 +3,7 @@
"description": "This is widget wrapper of https://github.com/bupy7/js-cropbox. This widget allows crop image before to upload to server and send informations about crop as JSON string.",
"keywords": ["yii2", "extension", "widget", "crop", "image"],
"homepage": "https://github.com/bupy7/yii2-widget-cropbox",
"version": "5.0.2",
"version": "5.1.0",
"type": "yii2-extension",
"license": "BSD-3-Clause",
"authors": [
Expand All @@ -17,7 +17,7 @@
"require": {
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"bower-asset/js-cropbox": "0.11.0"
"bower-asset/js-cropbox": "~0.12.0"
},
"autoload": {
"psr-4": {
Expand All @@ -41,3 +41,4 @@
"test": "php vendor/bin/phpunit"
}
}

5 changes: 3 additions & 2 deletions src/resources/cropbox.js
Expand Up @@ -62,6 +62,7 @@
fileReader.readAsDataURL(this.files[0]);
fileReader.onload = function(event) {
$th.cropbox('load', event.target.result);
$(s.fileInput).val(null);
};
});
// reset
Expand All @@ -87,8 +88,8 @@
$(s.croppedDataInput).val('');
};
$th.on('cb:reset', resetHandler);
// the loaded event
$th.on('cb:loaded', resetHandler);
// the ready event
$th.on('cb:ready', resetHandler);
// the disabled/enabled event
function disabledHandler() {
$(s.btnScaleIn).attr('disabled', 'disabled');
Expand Down
6 changes: 3 additions & 3 deletions src/resources/cropbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c293f9

Please sign in to comment.