Skip to content

Commit

Permalink
fixed vals
Browse files Browse the repository at this point in the history
  • Loading branch information
markusslima committed Aug 17, 2017
1 parent 7d4e352 commit 8d885e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/bootstrap-filestyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@
// Getting input file value
_self.$element.change(function() {
var files = _self.pushNameFiles();

if (_self.options.badge) {
if (_self.$elementFilestyle.find('.badge').length == 0) {
_self.$elementFilestyle.find('label').append(' <span class="badge '+_self.options.badgeName+'">' + files.length + '</span>');
Expand Down Expand Up @@ -336,7 +335,7 @@
'size' : $this.attr('data-size'),
'text' : $this.attr('data-text'),
'btnClass' : $this.attr('data-btnClass'),
'badge' : $this.attr('data-badge') !== 'true',
'badge' : $this.attr('data-badge') === 'true',
'badgeName' : $this.attr('data-badgeName'),
'placeholder': $this.attr('data-placeholder')
};
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap-filestyle.min.js

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

2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h3>Testing initialize via data attributes</h3>
</div>
<div class="form-group">
<label class="control-label">Multiples data attributes</label>
<input type="file" class="filestyle" data-text="Open" data-input="false" data-iconName="glyphicon-plus" data-classButton="btn btn-primary">
<input type="file" class="filestyle" data-text="Open" data-input="false" data-iconName="glyphicon-plus" data-btnClass="btn-primary">
</div>
</form>
</div>
Expand Down

0 comments on commit 8d885e0

Please sign in to comment.