-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuture.html
95 lines (82 loc) · 2.78 KB
/
future.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
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
function refreshPDF () {
document.getElementById('pdf').src = document.getElementById('pdf').src
}
function load () {
pad = location.search.substr(1) ? location.search.substr(1) : "welcome";
document.getElementById('editor').src = "https://beta.etherpad.org/p/"+pad+"?showControls=false";
$("#pageselect").val(pad);
}
var hash = {
'abstract' :'5',
'keywords' :'5',
'introduction' :'5',
'methods' :'5',
'background' :'5',
'rationale' :'5',
'findings1' :'1',
'findings2' :'2',
'findings3' :'3',
'discussion' :'4',
'rationale' :'5',
'acknowledgements' :'5',
'references' :'5'
};
function insertrandom() {
if (hash[location.search.substr(1)]) {
url = "http://fields.ace.ed.ac.uk/hadi/fe/getdata.php?q="+hash[location.search.substr(1)];
$.get(url).always(function( data ) {
$("#randomtext").val(data.responseText);
});
/* $.get(url, function( data ) {
alert ("got data");
$("#randomtext").val(data.responseText);
});
*/
}
else {
alert ("Generated text not available for this document.");
}
}
function goto () {
if ($("#pageselect").val()) window.location.href = "./future.html?" + $("#pageselect").val()
}
function openimages () {
alert ("feature disabled");
//window.open("http://it4se.com/upload/latex/images/", '_blank', "toolbar=yes, scrollbars=yes, resizable=yes, left=500, width=400, height=400");
}
</script>
<style>
.button {padding: 4px; font-weight: bold; border-radius: 2px; color: white; text-decoration: none; margin-right: 8px;}
.large {font-size: 0.9em; font-family: sans;}
.red {background: #900;}
.blue {background: #00A;}
.green {background: #0A0;}
.black {background: #555;}
body {background: #eee;}
</style>
</head>
<body onload="load()">
<span>
Editing:
<select class="button red large" onchange="goto()" id="pageselect">
<option>welcome</option>
<option>findings1</option>
<option>findings2</option>
<option>findings3</option>
<option>discussion</option>
</select>
</span>
<a class="button large black" href="javascript: openimages();">Images</a>
<a class="button large black" href="javascript: insertrandom();">Fetch text</a>
<input type="text" class="large" size=30 id="randomtext" value="">
<a class="button large green" href="javascript: refreshPDF();">Update preview</a>
<a class="button large blue" href="http://fields.ace.ed.ac.uk/fields/wp-content/uploads/2015/02/PuBliCDay1.pdf">Download</a>
<br/>
<iframe name='embed_readwrite' id="editor" width=50% height=600></iframe>
<iframe name='pdf-preview' id='pdf' src='http://fields.ace.ed.ac.uk/fields/wp-content/uploads/2015/02/PuBliCDay1.pdf' width=48% height=600></iframe>
</body>
</html>