Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
markusslima committed Aug 14, 2015
1 parent 1298df4 commit 61f1a64
Showing 1 changed file with 17 additions and 71 deletions.
88 changes: 17 additions & 71 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<meta charset="utf-8">
<title>jQuery FileStyle - jquery customization input html file</title>

<link rel="icon" type="image/png" href="icons/favicon.png">
<link href="../src/css/jquery-filestyle.css" rel="stylesheet" />
<link href="../src/jquery-filestyle.css" rel="stylesheet" />
<style>
body {
font-family: sans-serif;
Expand All @@ -27,20 +26,6 @@ <h2>Upload Teste</h2>
</button>
</form>

<h2>Themes</h2>
<input type="file" class="jfilestyle">
<br>
<input type="file" class="jfilestyle" data-theme="green">
<br>
<input type="file" class="jfilestyle" data-theme="blue">
<br>
<input type="file" class="jfilestyle" data-theme="red">
<br>
<input type="file" class="jfilestyle" data-theme="orange">
<br>
<input type="file" class="jfilestyle" data-theme="black">
<br>

<h2>Options</h2>
<form>
<label for="input02">Custom button text</label>
Expand All @@ -51,19 +36,11 @@ <h2>Options</h2>
<input type="file" id="input03">
<br>

<label for="input04">No icon</label>
<input type="file" id="input04">
<br>

<label for="input05">Change theme</label>
<input type="file" id="input05">
<br>

<label for="input06">Input size</label>
<input type="file" id="input06">
<br>

<label for="input07">Change icon</label>
<label for="input07">Placeholder</label>
<input type="file" id="input07">
<br>
</form>
Expand All @@ -77,24 +54,13 @@ <h2>Methods</h2>
</button>
<br>

<label for="input09">Toggle button</label>
<label for="input09">Toggle input</label>
<input type="file" id="input09">
<button id="toggleInput" type="button">
Toggle input
</button>
<br>

<label for="input10">Toggle icon</label>
<input type="file" id="input10">
<button id="toggleIcon" type="button">
Toggle icon
</button>
<br>

<label for="input11">Remove text button</label>
<input type="file" id="input11">
<br>

<label for="input12">Destroy</label>
<input type="file" id="input12">
<button id="destroy" type="button">
Expand Down Expand Up @@ -139,8 +105,8 @@ <h2>Data attributes</h2>
<br>
<br>
<br>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../src/js/jquery-filestyle.js"></script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../src/jquery-filestyle.js"></script>
<script type="text/javascript">
$('#input01').jfilestyle()

Expand All @@ -152,31 +118,20 @@ <h2>Data attributes</h2>
input : false
});

$('#input04').jfilestyle({
icon : false
});

$('#input05').jfilestyle({
theme : 'blue'
});

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

$('#input07').jfilestyle({
iconName : 'icon-camera'
placeholder: 'My text placeholder'
});

$('#input08').jfilestyle();

$('#clear').click(function() {
$('#input08').jfilestyle('clear');
});

$('#input09').jfilestyle({
theme : 'orange'
});
$('#input09').jfilestyle();

$('#toggleInput').click(function() {
var fs = $('#input09');
Expand All @@ -186,21 +141,6 @@ <h2>Data attributes</h2>
fs.jfilestyle('input', true);
});

$('#input10').jfilestyle({
theme : 'green'
});

$('#toggleIcon').click(function() {
var fs = $('#input10');
if (fs.jfilestyle('icon'))
fs.jfilestyle('icon', false);
else
fs.jfilestyle('icon', true);
});

$('#input11').jfilestyle();
$('#input11').jfilestyle('buttonText', '');

$('#input12').jfilestyle({
theme : 'red'
});
Expand All @@ -210,7 +150,13 @@ <h2>Data attributes</h2>
$('#input15').jfilestyle({buttonBefore: true});

$('#destroy').click(function() {
$('#input12').jfilestyle('destroy');
if ($('#input12').data('jfilestyle')) {
$('#input12').jfilestyle('destroy');
$(this).html('Construct');
} else {
$('#input12').jfilestyle();
$(this).html('Destroy');
}
});

$('.test').jfilestyle();
Expand Down

0 comments on commit 61f1a64

Please sign in to comment.