-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathselect_worksheet.html
38 lines (32 loc) · 1.02 KB
/
select_worksheet.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
{{#extend "layout" pageTitle="Select worksheet" containerClass="container-fluid"}}
{{#content "head" mode="append"}}
<link rel="stylesheet" href="../assets/css/select-worksheet.css" />
{{/content}}
{{#content "body"}}
<form>
<p><select id="worksheets" class="form-control"></select></p>
<div class="well">
<button id="submit" class="btn btn-default">Go</button> <button id="cancel" class="btn btn-default">Cancel</button>
</div>
</form>
{{/content}}
{{#content "foot" mode="prepend"}}
<script>
ipc.on('loadSheets', function(e, sheets) {
worksheets = $('#worksheets')
$.each(sheets, function( i, sheet ){
worksheets.append($("<option></option>")
.attr("value",sheet)
.text(sheet))
});
$('#submit').click(function(e) {
ipc.send('worksheetSelected', $('#worksheets').val());
e.preventDefault();
})
$('#cancel').click(function() {
ipc.send('worksheetCanceled');
})
});
</script>
{{/content}}
{{/extend}}