forked from znjRoLS/bootstrap-imageupload
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
119 lines (97 loc) · 4.76 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<title>bootstrap-imageupload</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="dist/css/bootstrap-imageupload.css" rel="stylesheet">
<style>
body {
padding-top: 70px;
}
.imageupload {
margin: 20px 0;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="">bootstrap-imageupload</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">
<a href="">Demo</a>
</li>
<li>
<a href="/~https://github.com/nerdy-harry/bootstrap-imageupload">GitHub</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<p>A Bootstrap/jQuery plugin to preview image uploads.</p>
<!-- bootstrap-imageupload. -->
<div class="imageupload panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title pull-left">Upload Image</h3>
<div class="btn-group pull-right">
<button type="button" class="btn btn-default active">File</button>
<button type="button" class="btn btn-default">URL</button>
</div>
</div>
<div class="file-tab panel-body">
<label class="btn btn-default btn-file">
<span>Browse</span>
<!-- The file is stored here. -->
<input type="file" name="image-file">
</label>
<button type="button" class="btn btn-default">Remove</button>
</div>
<div class="url-tab panel-body">
<div class="input-group">
<input type="text" class="form-control hasclear" placeholder="Image URL">
<div class="input-group-btn">
<button type="button" class="btn btn-default">Submit</button>
</div>
</div>
<button type="button" class="btn btn-default">Remove</button>
<!-- The URL is stored here. -->
<input type="hidden" name="image-url">
</div>
</div>
<!-- bootstrap-imageupload method buttons. -->
<button type="button" id="imageupload-disable" class="btn btn-danger">Disable</button>
<button type="button" id="imageupload-enable" class="btn btn-success">Enable</button>
<button type="button" id="imageupload-reset" class="btn btn-primary">Reset</button>
</div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="dist/js/bootstrap-imageupload.js"></script>
<script>
var $imageupload = $('.imageupload');
$imageupload.imageupload({ imgSrc: "http://www.gstatic.com/webp/gallery/5.jpg" });
$('#imageupload-disable').on('click', function() {
$imageupload.imageupload('disable');
$(this).blur();
})
$('#imageupload-enable').on('click', function() {
$imageupload.imageupload('enable');
$(this).blur();
})
$('#imageupload-reset').on('click', function() {
$imageupload.imageupload('reset');
$(this).blur();
});
</script>
</body>
</html>