Skip to content

Commit

Permalink
Remove options color
Browse files Browse the repository at this point in the history
  • Loading branch information
markusslima committed Aug 18, 2015
1 parent 3c9315b commit c7667df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
22 changes: 2 additions & 20 deletions src/jquery-filestyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,6 @@
return this.options.placeholder;
}
},

color : function(value) {
if (typeof value !== 'object') {
window.console.error('color option not object');
return false;
} else if (value !== undefined) {
this.options.color = value;
this.$elementjFilestyle.find('label').css(value);
} else {
return this.options.color;
}
},

htmlInput: function () {
if (this.options.input) {
Expand Down Expand Up @@ -205,10 +193,6 @@
}
});

if (typeof _self.options.color === 'object') {
_self.$elementjFilestyle.find('label').css(_self.options.color);
}

// hidding input file and add filestyle
_self.$element
.css({'position': 'absolute', 'clip': 'rect(0px 0px 0px 0px)'})
Expand Down Expand Up @@ -281,8 +265,7 @@
'disabled': false,
'buttonBefore': false,
'inputSize': '200px',
'placeholder': '',
'color': 'default'
'placeholder': ''
};

$.fn.jfilestyle.noConflict = function () {
Expand All @@ -300,8 +283,7 @@
'disabled': $this.attr('data-disabled') === 'true' ? true : false,
'buttonBefore': $this.attr('data-buttonBefore') === 'true' ? true : false,
'inputSize': $this.attr('data-inputSize'),
'placeholder': $this.attr('data-placeholder'),
'color': $this.attr('data-color')
'placeholder': $this.attr('data-placeholder')
};

$this.jfilestyle(options);
Expand Down
9 changes: 1 addition & 8 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ <h2>Options</h2>
<label for="input03">No text field</label>
<input type="file" id="input03">
<br>

<label for="input04">Color button</label>
<input type="file" id="input04">
<br>

<label for="input06">Input size</label>
<input type="file" id="input06">
Expand Down Expand Up @@ -112,6 +108,7 @@ <h2>Data attributes</h2>
<input type="file" class="jfilestyle" data-size="300px">
<br>
<input type="file" class="jfilestyle" data-buttonText="Open">
<br>
</form>
<br>
<br>
Expand All @@ -132,10 +129,6 @@ <h2>Data attributes</h2>
input : false
});

$('#input04').jfilestyle({
color : {'background': '#555555', 'color': '#fff', 'border-color': '#000'}
});

$('#input06').jfilestyle({
inputSize : '100px'
});
Expand Down

0 comments on commit c7667df

Please sign in to comment.