forked from alexusmai/laravel-file-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfm-button.blade.php
46 lines (39 loc) · 1.35 KB
/
fm-button.blade.php
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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<title>File Manager and standalone button</title>
</head>
<body>
<div class="container">
<div class="form-row">
<div class="form-group col-md-6">
<label for="image_label">Image</label>
<div class="input-group">
<input type="text" id="image_label" class="form-control" name="image"
aria-label="Image" aria-describedby="button-image">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="button-image">Select</button>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.getElementById('button-image').addEventListener('click', (event) => {
event.preventDefault();
window.open('/file-manager/fm-button', 'fm', 'width=1400,height=800');
});
});
// set file link
function fmSetLink($url) {
document.getElementById('image_label').value = $url;
}
</script>
</body>
</html>