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