Skip to content

Commit d2c8dcd

Browse files
committed
Updates to release v1.0.6
1 parent 55d8ff4 commit d2c8dcd

13 files changed

+242
-32
lines changed

.github/CONTRIBUTING.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
Contributing to yii2-widget-fileinput
2+
=====================================
3+
Looking to contribute something to yii2-widget-fileinput? **Here's how you can help.**
4+
5+
Please take a moment to review this document in order to make the contribution
6+
process easy and effective for everyone involved.
7+
8+
Following these guidelines helps to communicate that you respect the time of
9+
the developers managing and developing this open source project. In return,
10+
they should reciprocate that respect in addressing your issue or assessing
11+
patches and features.
12+
13+
Using the issue tracker
14+
-----------------------
15+
When [reporting bugs][reporting-bugs] or
16+
[requesting features][requesting-features], the
17+
[issue tracker on GitHub][issue-tracker] is the recommended channel to use.
18+
19+
The issue tracker **is not** a place for support requests. Refer the
20+
[widget documentation and demos](http://demos.krajee.com/widget-details/fileinput) and/or refer to the
21+
[webtips Q & A forum](http://webtips.krajee.com/questions) which are the better places to get help.
22+
23+
Reporting bugs with yii2-widget-fileinput
24+
-----------------------------------------
25+
We really appreciate clear bug reports that _consistently_ show an issue
26+
_within yii2-widget-fileinput_.
27+
28+
The ideal bug report follows these guidelines:
29+
30+
1. **Use the [GitHub issue search][issue-search]** — Check if the issue
31+
has already been reported.
32+
2. **Check if the issue has been fixed** — Try to reproduce the problem
33+
using the code in the `master` branch.
34+
3. **Isolate the problem** — Try to create an
35+
[isolated js fiddle][isolated-case] that consistently reproduces the problem
36+
in case of javascript/client level code issues.
37+
38+
Please try to be as detailed as possible in your bug report, especially if an
39+
isolated test case cannot be made. Some useful questions to include the answer
40+
to are:
41+
42+
- What steps can be used to reproduce the issue?
43+
- What is the bug and what is the expected outcome?
44+
- What browser(s) and Operating System have you tested with?
45+
- Does the bug happen consistently across all tested browsers?
46+
- What version of jQuery are you using? And what version of yii2-widget-fileinput?
47+
- Are you using yii2-widget-fileinput with other plugins?
48+
49+
All of these questions will help others fix and identify any potential bugs.
50+
51+
Requesting features in yii2-widget-fileinput
52+
--------------------------------------------
53+
Before starting work on a major feature for yii2-widget-fileinput, **read the
54+
[documentation](http://demos.krajee.com/widget-details/fileinput) first** or you may risk spending a considerable amount of
55+
time on something which the project developers are not interested in bringing into the project.
56+
57+
### Submitting a pull request
58+
59+
We use GitHub's pull request system for submitting patches. Here are some
60+
guidelines to follow when creating the pull request for your fix.
61+
62+
1. Make sure to create a ticket for your pull request. This will serve as the
63+
bug ticket, and any discussion about the bug will take place there. Your pull
64+
request will be focused on the specific changes that fix the bug.
65+
2. Make sure to reference the ticket you are fixing within your pull request.
66+
This will allow us to close off the ticket once we merge the pull request, or
67+
follow up on the ticket if there are any related blocking issues.
68+
3. Explain why the specific change was made. Not everyone who is reviewing your
69+
pull request will be familiar with the problem it is fixing.
70+
4. Run your tests first. If your tests aren't passing, the pull request won't
71+
be able to be merged. If you're breaking existing tests, make sure that you
72+
aren't causing any breaking changes.
73+
5. Only include source changes. While it's not required, only including changes
74+
from the `src` directory will prevent merge conflicts from occuring. Making
75+
this happen can be as a simple as not committing changes from the `dist`
76+
directory.
77+
78+
By following these steps, you will make it easier for your pull request to be
79+
reviewed and eventually merged.
80+
81+
Triaging issues and pull requests
82+
---------------------------------
83+
Anyone can help the project maintainers triage issues and review pull requests.
84+
85+
### Handling new issues
86+
87+
yii2-widget-fileinput regularly receives new issues which need to be tested and organized.
88+
89+
When a new issue that comes in that is similar to another existing issue, it
90+
should be checked to make sure it is not a duplicate. Duplicates issues should
91+
be marked by replying to the issue with "Duplicate of #[issue number]" where
92+
`[issue number]` is the url or issue number for the existing issue. This will
93+
allow the project maintainers to quickly close off additional issues and keep
94+
the discussion focused within a single issue.
95+
96+
If you can test issues that are reported to yii2-widget-fileinput that contain test cases and
97+
confirm under what conditions bugs happen, that will allow others to identify
98+
what causes a bug quicker.
99+
100+
### Reviewing pull requests
101+
102+
It is very common for pull requests to be opened for issues that contain a clear
103+
solution to the problem. These pull requests should be rigorously reviewed by
104+
the community before being accepted. If you are not sure about a piece of
105+
submitted code, or know of a better way to do something, do not hesitate to make
106+
a comment on the pull request.
107+
108+
### Reviving old tickets
109+
110+
If you come across tickets which have not been updated for a while, you are
111+
encouraged to revive them. While this can be as simple as saying `:+1:`, it is
112+
best if you can include more information on the issue. Common bugs and feature
113+
requests are more likely to be fixed, whether it is by the community or the
114+
developers, so keeping tickets up to date is encouraged.
115+
116+
Licensing
117+
---------
118+
119+
It should also be made clear that **all code contributed to yii2-widget-fileinput** must be
120+
licensable under the [BSD-3 license][licensing]. Code that cannot be released
121+
under this license **cannot be accepted** into the project.
122+
123+
[isolated-case]: https://jsfiddle.net/
124+
[issue-search]: https://github.com/kartik-v/yii2-widget-fileinput/search?q=&type=Issues
125+
[issue-tracker]: https://github.com/kartik-v/yii2-widget-fileinput/issues
126+
[licensing]: https://github.com/kartik-v/yii2-widget-fileinput/blob/master/LICENSE.md
127+
[reporting-bugs]: #reporting-bugs-with-yii2-widget-fileinput
128+
[requesting-features]: #requesting-features-in-yii2-widget-fileinput

.github/ISSUE_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Prerequisites
2+
3+
- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
4+
- [ ] The issue still exists against the latest `master` branch of yii2-widget-fileinput.
5+
- [ ] This is not an usage question. I confirm having read the [widget documentation and demos](http://demos.krajee.com/widget-details/fileinput).
6+
- [ ] This is not a general programming / coding question. (Those should be directed to the [webtips Q & A forum](http://webtips.krajee.com/questions)).
7+
- [ ] This is not a source plugin (fileinput) issue. (Those should be directed to the [plugin issues repo](https://github.com/fileinput/fileinput/search?q=&type=Issues)).
8+
- [ ] I have attempted to find the simplest possible steps to reproduce the issue.
9+
- [ ] I have included a failing test as a pull request (Optional).
10+
11+
## Steps to reproduce the issue
12+
13+
1.
14+
2.
15+
3.
16+
17+
## Expected behavior and actual behavior
18+
19+
When I follow those steps, I see...
20+
21+
I was expecting...
22+
23+
## Environment
24+
25+
Browsers
26+
27+
- [ ] Google Chrome
28+
- [ ] Mozilla Firefox
29+
- [ ] Internet Explorer
30+
- [ ] Safari
31+
32+
Operating System
33+
34+
- [ ] Windows
35+
- [ ] Mac OS X
36+
- [ ] Linux
37+
- [ ] Mobile
38+
39+
Libraries
40+
41+
- jQuery version:
42+
- yii2-widget-fileinput version:
43+
44+
## Isolating the problem
45+
46+
- [ ] This bug happens [on the widget demos page](http://demos.krajee.com/widget-details/fileinput)
47+
- [ ] The bug happens consistently across all tested browsers
48+
- [ ] This bug happens when using yii2-widget-fileinput without other plugins
49+
- [ ] I can reproduce this bug in [a jsbin](https://jsbin.com/)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Scope
2+
This pull request includes a
3+
4+
- [ ] Bug fix
5+
- [ ] New feature
6+
- [ ] Translation
7+
8+
## Changes
9+
The following changes were made
10+
11+
-
12+
-
13+
-
14+
15+
## Related Issues
16+
If this is related to an existing ticket, include a link to it as well.

CHANGE.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
Change Log: `yii2-widget-fileinput`
22
===================================
33

4+
## Version 1.0.6
5+
6+
**Date:** 26-May-2017
7+
8+
- Enhancements for plugin v4.4.1 (inclusion of `PiExifAsset` and removal of `CanvasBlobAsset`).
9+
- Add github contribution and issue/PR log templates.
10+
- Update copyright year to current.
11+
- (enh #117): Add Bulgarian Translations.
12+
- (enh #114): Automatically add `enctype` to form options when using with Yii Active Field and Active Form.
13+
- (enh #112): Add Explorer Theme support.
14+
- (enh #90): Fixed namespace fatal error.
15+
- (enh #88): Add Vietnamese Translations.
16+
- (enh #79): Add Lithuanian Translations.
17+
418
## Version 1.0.5
519

620
**Date:** 16-Jun-2016
721

8-
- (enh #70): Add Estonian Translations.
22+
- (enh #74): Add Ukranian Translations.
923
- (enh #71): Enhancements for plugin v4.3.2.
24+
- (enh #70): Add Estonian Translations.
1025
- Add branch alias for dev-master latest release.
11-
- (enh #74): Add Ukranian Translations.
1226

1327
## Version 1.0.4
1428

1529
**Date:** 10-Jan-2016
1630

17-
- (enh #36): Add Indonesian Translations
18-
- (enh #37): Add Greek Translations
19-
- (enh #40): Add Persian Translations
20-
- (enh #57): Enhance localizations and allow yii to generate message files via config.
2131
- (enh #58): Enhancements for PJAX based reinitialization. Complements enhancements in kartik-v/yii2-krajee-base#52 and kartik-v/yii2-krajee-base#53.
32+
- (enh #57): Enhance localizations and allow yii to generate message files via config.
33+
- (enh #40): Add Persian Translations
34+
- (enh #37): Add Greek Translations
35+
- (enh #36): Add Indonesian Translations
2236

2337
## Version 1.0.3
2438

@@ -30,24 +44,24 @@ Change Log: `yii2-widget-fileinput`
3044

3145
**Date:** 03-May-2015
3246

33-
- (enh #23): Add Chinese translations.
34-
- (enh kartik-v/yii2-krajee-base#34, kartik-v/yii2-krajee-base#35): Enhance i18n translation locales.
3547
- (enh #29): Better validation for graceful downgrade for older browsers.
48+
- (enh kartik-v/yii2-krajee-base#34, kartik-v/yii2-krajee-base#35): Enhance i18n translation locales.
49+
- (enh #23): Add Chinese translations.
3650

3751
## Version 1.0.1
3852

3953
**Date:** 30-Mar-2015
4054

41-
- (enh #4): Hungarian translations
42-
- (enh #20): Croatian translations
55+
- (enh #22): Added Thai language translations.
4356
- (enh #21): Updates to widget for v4.1.8 bootstrap-fileinput plugin
4457
- All plugin related translations now reside in the [locales files in the plugin folder](http://github.com/kartik-v/bootstrap-fileinput/js). Pull requests for new translations or editing translations needs to be done in the plugin folder.
4558
- The `language` property can be set at the widget level to set the language (this will default to `Yii::$app->language`).
46-
- (enh #22): Added Thai language translations.
59+
- (enh #20): Croatian translations
60+
- (enh #4): Hungarian translations
4761

4862
## Version 1.0.0
4963

5064
**Date:** 08-Nov-2014
5165

52-
- Initial release
5366
- Sub repo split from [yii2-widgets](https://github.com/kartik-v/yii2-widgets)
67+
- Initial release

DomPurifyAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
55
* @package yii2-widgets
66
* @subpackage yii2-widget-fileinput
7-
* @version 1.0.5
7+
* @version 1.0.6
88
*/
99

1010
namespace kartik\file;

FileInput.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
55
* @package yii2-widgets
66
* @subpackage yii2-widget-fileinput
7-
* @version 1.0.5
7+
* @version 1.0.6
88
*/
99

1010
namespace kartik\file;
@@ -86,6 +86,9 @@ public function init()
8686
if ($this->pluginLoading) {
8787
Html::addCssClass($this->options, 'file-loading');
8888
}
89+
if (isset($this->field) && isset($this->field->form) && !isset($this->field->form->options['enctype'])) {
90+
$this->field->form->options['enctype'] = 'multipart/form-data';
91+
}
8992
$input = $this->getInput('fileInput');
9093
$script = 'document.getElementById("' . $this->options['id'] . '").className.replace(/\bfile-loading\b/,"");';
9194
if ($this->showMessage) {
@@ -124,7 +127,7 @@ public function registerAssetBundle()
124127
{
125128
$view = $this->getView();
126129
if ($this->resizeImages) {
127-
CanvasBlobAsset::register($view);
130+
PiExifAsset::register($view);
128131
$this->pluginOptions['resizeImage'] = true;
129132
}
130133
$theme = ArrayHelper::getValue($this->pluginOptions, 'theme');

FileInputAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
55
* @package yii2-widgets
66
* @subpackage yii2-widget-fileinput
7-
* @version 1.0.5
7+
* @version 1.0.6
88
*/
99

1010
namespace kartik\file;

FileInputThemeAsset.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
55
* @package yii2-widgets
66
* @subpackage yii2-widget-fileinput
7-
* @version 1.0.5
7+
* @version 1.0.6
88
*/
99

1010
namespace kartik\file;
@@ -53,7 +53,7 @@ public function addTheme($theme)
5353
*
5454
* @param string $path the file path
5555
*
56-
* @return bool
56+
* @return boolean
5757
*/
5858
protected function checkExists($path)
5959
{

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 - 2016, Kartik Visweswaran
1+
Copyright (c) 2014 - 2017, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
55
* @package yii2-widgets
66
* @subpackage yii2-widget-fileinput
7-
* @version 1.0.5
7+
* @version 1.0.6
88
*/
99

1010
namespace kartik\file;
1111

1212
use kartik\base\AssetBundle;
1313

1414
/**
15-
* CanvasToBlob Asset bundle for FileInput Widget
15+
* PiExif Asset bundle for FileInput Widget
1616
*
1717
* @author Kartik Visweswaran <[email protected]>
1818
* @since 1.0
1919
*/
20-
class CanvasBlobAsset extends AssetBundle
20+
class PiExifAsset extends AssetBundle
2121
{
2222
/**
2323
* @inheritdoc
2424
*/
2525
public function init()
2626
{
2727
$this->setSourcePath('@vendor/kartik-v/bootstrap-fileinput');
28-
$this->setupAssets('js', ['js/plugins/canvas-to-blob']);
28+
$this->setupAssets('js', ['js/plugins/piexif']);
2929
parent::init();
3030
}
3131
}

0 commit comments

Comments
 (0)