source: trunk/plugins/NoteServer/popups/codenote.html @ 419

Last change on this file since 419 was 419, checked in by mokhet, 14 years ago

more ; fixed (a few were missing, a lot were used with no reason) for ticket #385

File size: 5.5 KB
Line 
1<html>
2
3<head>
4
5<title>Insert GUIDO Music Notation</title>
6<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
7<script type="text/javascript"  src="../note-server.js"></script>
8<script type="text/javascript" src="../../../popups/popup.js"></script>
9
10<script type="text/javascript">
11
12window.resizeTo(500, 200);
13
14NoteServer = window.opener.NoteServer;
15
16var editor = null;
17function Init() {
18  __dlg_translate('NoteServer');
19  __dlg_init();
20
21//   var param = window.dialogArguments;
22//  if (param) {
23//    document.getElementById("f_midi").value = param["f_midi"];
24//    document.getElementById("f_code").value = param["f_code"];
25//    document.getElementById("f_zoom").value = param["f_zoom"];
26//    document.getElementById("f_affcode").value = param["f_affcode"];
27//    document.getElementById("f_applet").value = param["f_applet"];
28//  }
29//  editor = param.editor;
30  document.getElementById("f_code").focus();
31//  document.getElementById("f_code").select();
32}
33
34function onOK() {
35  var f_code = document.getElementById("f_code");
36  if (!f_code.value) {
37    alert("You have to enter GUIDO code");
38    f_code.focus();
39    return false;
40}
41
42  // pass data back to the calling window
43
44  var param = {};
45  param["f_code"] = f_code.value;
46  var f_zoom = document.getElementById("f_zoom");
47  var z = "1.0";
48  if (f_zoom.value == "1.0" || f_zoom.value == "100%") z = 1.0;
49  else if (f_zoom.value == "0.8" || f_zoom.value == "80%") z = 0.8;
50  else if (f_zoom.value == "1.2" || f_zoom.value == "120%") z = 1.2;
51  else if (f_zoom.value == "1.5" || f_zoom.value == "150%") z = 1.5;
52
53  param["f_zoom"] = z;
54
55  param["f_midi"] = document.getElementById("f_midi").checked;
56
57  param["f_affcode"] = document.getElementById("f_affcode").checked;
58  param["f_applet"] = document.getElementById("f_applet").checked;
59
60  __dlg_close(param);
61  return false;
62}
63
64function onCancel() {
65  __dlg_close(null);
66  return false;
67
68}
69
70
71function message(){
72if (document.getElementById("f_applet").checked)
73  if (!((navigator.userAgent.toLowerCase().indexOf("msie") != -1)
74    && (navigator.userAgent.toLowerCase().indexOf("opera") == -1))) {
75    alert("With Mozilla, the applet will not be visible in editor, but only in Web page after submitting.");
76  }
77}
78
79function onPreview() {
80
81  var f_code = document.getElementById("f_code");
82  var f_zoom = document.getElementById("f_zoom");
83
84var z = "1.0";
85if (f_zoom.value == "1.0" || f_zoom.value == "100%") z = 1.0;
86else if (f_zoom.value == "0.8" || f_zoom.value == "80%") z = 0.8;
87else if (f_zoom.value == "1.2" || f_zoom.value == "120%") z = 1.2;
88else if (f_zoom.value == "1.5" || f_zoom.value == "150%") z = 1.5;
89
90  var url = GetGIFURL(f_code.value,z,"");
91  if (!f_code.value) {
92    alert("You have to enter GUIDO code");
93    f_code.focus();
94    return false;
95 }
96
97
98  window.ipreview.location.replace(url);
99
100  return false;
101}
102
103</script>
104</head>
105
106<body class="Dialog" onload="Init()">
107<div class="title">Insert GUIDO Music Notation</div>
108
109<span>Guido code</span> :
110  <br><textarea rows="7" id="f_code" cols="55"></textarea><br>
111
112<div class="space"></div>
113<fieldset style="float: left; margin-left: 5px;">
114<legend>Options</legend>
115  <input type="checkbox" id="f_midi" value="ON"> <span>Add MIDI link to allow students to hear the music</span>
116  <div class="space"></div>
117  <input type="checkbox" id="f_affcode" value="ON"> <span>Add GUIDO Code in a textbox on the page</span>
118  <div class="space"></div>
119</fieldset>
120
121<fieldset style="float: right; margin-left: 5px;">
122<legend>Format</legend>
123  <input type="checkbox" id="f_applet" value="ON" onclick="message();" > <span>Image in applet</span>
124  <div class="space"></div>
125  <span>Zoom</span> :
126  <select size="1" id="f_zoom" title="Zoom :">
127    <option value="0.8">80%</option>
128    <option selected="1.0">100%</option>
129    <option value="1.2">120%</option>
130    <option value="1.5">150%</option>
131  </select>
132  <div class="space"></div>
133</fieldset>
134
135<br clear="all" />
136
137<table width="100%" style="margin-bottom: 0.2em">
138 <tr>
139  <td valign="bottom">
140    <span>Image Preview</span>:<br />
141    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="350" src=""></iframe>
142  </td>
143
144  <td valign="bottom" style="text-align: right">
145    <button type="button" name="preview" onclick="return onPreview();"
146      title="Preview the image in a new window">Preview</button><br>
147    <button type="button" name="ok" onclick="return onOK();"><span>OK</span></button><br>
148    <button type="button" name="cancel" onclick="return onCancel();"><span>Cancel</span></button>
149  </td>
150 </tr>
151 <tr>
152  <td colspan="2">
153   <p>Sample Guido Codes:</p>
154   <p><a href="http://piano-go.chez.tiscali.fr/rachmaninoff.gmn" target="_blank">Code Sample 1</a> or type [ do re mi fa sol la si ] | <a href="http://www.informatik.tu-darmstadt.de/AFS/SALIERI/guido/demos.html" target="_blank">Code Sample 2</a></p>
155   <p>Resources: </p>
156   <p>The Guido Specification (<a href="http://piano-go.chez.tiscali.fr/GUIDO-Music%20Notation%20Format.pdf" target="_blank">PDF)</a> | <a href="http://www.salieri.org/guido/doc.html" target="_blank">(HTML)</a></p>
157   <p><a href="http://www.salieri.org/guido/" target="_blank">GUIDO Music Notation Format Site</a> | <a href="http://www.noteserver.org/" target="_blank">Guido Note Server</a> | <a href="http://sourceforge.net/projects/guidolib/" target="_blank">SourceForge Homepage</a></p>
158  </td>
159 </tr>
160</table>
161</body>
162</html>
Note: See TracBrowser for help on using the repository browser.