-
Notifications
You must be signed in to change notification settings - Fork 1
/
sidemenu.html
executable file
·100 lines (84 loc) · 3.11 KB
/
sidemenu.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
<!DOCTYPE html>
<html>
<head>
<link href="https://ssl.gstatic.com/docs/script/css/add-ons.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<style>
.branding-below {
bottom: 56px;
top: 0;
}
</style>
<base target="_top">
<script>
$(function() {
// $('#add-item').click(function(e){
// var select = $("#dynamic-list");
// var candidate = $("#candidate");
// var op = $(document.createElement("option"));
// op.prop('value', candidate.val());
// op.append(document.createTextNode(candidate.val()));
// select.append(op);
// //google.script.run.insertDS(candidate.val());
// candidate.val('');
// });
// $('#remove').click(function(e){
// $("#dynamic-list option:selected").remove();
// });
// $('#print').click(function(e){
// var selected = $("#dynamic-list option:selected");
// if ( selected.length > 0 ){
// google.script.run.printDS();
// }
// });
$('#save').click(function(e){
var settings = {
zenodoToken: $('#zenodoToken').val(),
enableZenodo: $('#enableZenodo').prop('checked')
};
google.script.run.saveSettings(settings);
});
});
</script>
</head>
<body>
<?
var props = PropertiesService.getUserProperties();
var enabled = props.getProperty('enableZenodo') === 'true';
var token = props.getProperty('zenodoToken');
?>
<div class="sidebar branding-below">
<div classs="zenodo-settings">
<div class="inline form-group">
<label for="zenodoToken">Zenodo Token:</label>
<input type="text" id="zenodoToken" value="<?= token ?>"/>
</div>
<div>
<input type="checkbox" id="enableZenodo" <? if(enabled) { ?> checked <? } ?>/>
<label for="enableZenodo">Enable Zenodo Upload</label>
</div>
</div>
<span class="separator"></span>
<!-- <div class="standards">
<div class="block">
<input type="text" id="candidate"/>
<button id="add-item">Add item</button>
</div>
<div class="block form-group">
<label for="standards">Data Standards:</label>
<? var standards = getStandards(); ?>
<? for(var i = 0; i < standards.length; i++) { ?>
<div>
<input type="checkbox" id="<?= i ?>" <? if(standards[i].checked) { ?> checked <? } ?>/>
<label for="<?= i ?>"><?= standards[i].name ?></label>
</div>
<? } ?>
<select id="dynamic-list" size="5" style="width:100%;" multiple></select>
</div>
<button id="remove">Remove</button>
<button id="print">Print</button>
</div> -->
<button id="save" class="action">Save</button>
</div>
</body>
</html>