mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
moodlemedia.htm
73 lines (62 loc) · 2.73 KB
/
moodlemedia.htm
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{#moodlemedia.desc}</title>
<script type="text/javascript">
// Because there is no relative path to TinyMCE, we have to use JavaScript
// to work out correct path from the .js files from TinyMCE. Only files
// inside this plugin can be included with relative path (below).
var editor_tinymce_include = function(path) {
document.write('<script type="text/javascript" src="' +
parent.tinyMCE.baseURL + '/' + path + '"></' + 'script>');
};
editor_tinymce_include('tiny_mce_popup.js');
editor_tinymce_include('utils/validate.js');
editor_tinymce_include('utils/form_utils.js');
editor_tinymce_include('utils/editable_selects.js');
var getFileBrowserHTML = function(id, target_form_element, type, prefix) {
var option = prefix + "_" + type + "_browser_callback", cb, html;
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
if (!cb)
return "";
html = '<a class="moodlebutton" id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;">';
html += '<span id="' + id + '">' + tinyMCEPopup.getLang('browsemedia') + '</span>';
html += '</a>';
return html;
}
</script>
<script type="text/javascript" src="js/media.js"></script>
<link href="css/media.css" rel="stylesheet" type="text/css" />
</head>
<body style="display: none">
<form onsubmit="insertMedia();return false;" action="#">
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<input id="src" name="src" type="hidden" value="" class="mceFocus" onchange="generatePreview();" />
<input id="filename" name="filename" type="hidden" value="" />
<fieldset>
<legend>{#media_dlg.general}</legend>
<table align="center" border="0" cellpadding="4" cellspacing="0">
<tr align="center">
<td colspan='2' id="filebrowsercontainer"> </td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{#media_dlg.preview}</legend>
<div id="prev"></div>
</fieldset>
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>
</body>
</html>