bgneal@312
|
1 tinyMCEPopup.requireLangPack();
|
bgneal@312
|
2
|
bgneal@312
|
3 function init() {
|
bgneal@312
|
4 var ed, tcont;
|
bgneal@312
|
5
|
bgneal@312
|
6 tinyMCEPopup.resizeToInnerSize();
|
bgneal@312
|
7 ed = tinyMCEPopup.editor;
|
bgneal@312
|
8
|
bgneal@312
|
9 // Give FF some time
|
bgneal@312
|
10 window.setTimeout(insertHelpIFrame, 10);
|
bgneal@312
|
11
|
bgneal@312
|
12 tcont = document.getElementById('plugintablecontainer');
|
bgneal@312
|
13 document.getElementById('plugins_tab').style.display = 'none';
|
bgneal@312
|
14
|
bgneal@312
|
15 var html = "";
|
bgneal@312
|
16 html += '<table id="plugintable">';
|
bgneal@312
|
17 html += '<thead>';
|
bgneal@312
|
18 html += '<tr>';
|
bgneal@312
|
19 html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
|
bgneal@312
|
20 html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
|
bgneal@312
|
21 html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
|
bgneal@312
|
22 html += '</tr>';
|
bgneal@312
|
23 html += '</thead>';
|
bgneal@312
|
24 html += '<tbody>';
|
bgneal@312
|
25
|
bgneal@312
|
26 tinymce.each(ed.plugins, function(p, n) {
|
bgneal@312
|
27 var info;
|
bgneal@312
|
28
|
bgneal@312
|
29 if (!p.getInfo)
|
bgneal@312
|
30 return;
|
bgneal@312
|
31
|
bgneal@312
|
32 html += '<tr>';
|
bgneal@312
|
33
|
bgneal@312
|
34 info = p.getInfo();
|
bgneal@312
|
35
|
bgneal@312
|
36 if (info.infourl != null && info.infourl != '')
|
bgneal@312
|
37 html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
|
bgneal@312
|
38 else
|
bgneal@312
|
39 html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
|
bgneal@312
|
40
|
bgneal@312
|
41 if (info.authorurl != null && info.authorurl != '')
|
bgneal@312
|
42 html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
|
bgneal@312
|
43 else
|
bgneal@312
|
44 html += '<td width="35%">' + info.author + '</td>';
|
bgneal@312
|
45
|
bgneal@312
|
46 html += '<td width="15%">' + info.version + '</td>';
|
bgneal@312
|
47 html += '</tr>';
|
bgneal@312
|
48
|
bgneal@312
|
49 document.getElementById('plugins_tab').style.display = '';
|
bgneal@312
|
50
|
bgneal@312
|
51 });
|
bgneal@312
|
52
|
bgneal@312
|
53 html += '</tbody>';
|
bgneal@312
|
54 html += '</table>';
|
bgneal@312
|
55
|
bgneal@312
|
56 tcont.innerHTML = html;
|
bgneal@312
|
57
|
bgneal@312
|
58 tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
|
bgneal@312
|
59 tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
|
bgneal@312
|
60 }
|
bgneal@312
|
61
|
bgneal@312
|
62 function insertHelpIFrame() {
|
bgneal@312
|
63 var html;
|
bgneal@312
|
64
|
bgneal@312
|
65 if (tinyMCEPopup.getParam('docs_url')) {
|
bgneal@312
|
66 html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
|
bgneal@312
|
67 document.getElementById('iframecontainer').innerHTML = html;
|
bgneal@312
|
68 document.getElementById('help_tab').style.display = 'block';
|
bgneal@442
|
69 document.getElementById('help_tab').setAttribute("aria-hidden", "false");
|
bgneal@312
|
70 }
|
bgneal@312
|
71 }
|
bgneal@312
|
72
|
bgneal@312
|
73 tinyMCEPopup.onInit.add(init);
|