PageRenderTime 41ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/editors/tiny_mce_3_4_3_1/themes/advanced/js/about.js

#
JavaScript | 73 lines | 52 code | 20 blank | 1 comment | 10 complexity | 606c16492a17240ebded6e9fce75a555 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. tinyMCEPopup.requireLangPack();
  2. function init() {
  3. var ed, tcont;
  4. tinyMCEPopup.resizeToInnerSize();
  5. ed = tinyMCEPopup.editor;
  6. // Give FF some time
  7. window.setTimeout(insertHelpIFrame, 10);
  8. tcont = document.getElementById('plugintablecontainer');
  9. document.getElementById('plugins_tab').style.display = 'none';
  10. var html = "";
  11. html += '<table id="plugintable">';
  12. html += '<thead>';
  13. html += '<tr>';
  14. html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
  15. html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
  16. html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
  17. html += '</tr>';
  18. html += '</thead>';
  19. html += '<tbody>';
  20. tinymce.each(ed.plugins, function(p, n) {
  21. var info;
  22. if (!p.getInfo)
  23. return;
  24. html += '<tr>';
  25. info = p.getInfo();
  26. if (info.infourl != null && info.infourl != '')
  27. html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
  28. else
  29. html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
  30. if (info.authorurl != null && info.authorurl != '')
  31. html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
  32. else
  33. html += '<td width="35%">' + info.author + '</td>';
  34. html += '<td width="15%">' + info.version + '</td>';
  35. html += '</tr>';
  36. document.getElementById('plugins_tab').style.display = '';
  37. });
  38. html += '</tbody>';
  39. html += '</table>';
  40. tcont.innerHTML = html;
  41. tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
  42. tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
  43. }
  44. function insertHelpIFrame() {
  45. var html;
  46. if (tinyMCEPopup.getParam('docs_url')) {
  47. html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
  48. document.getElementById('iframecontainer').innerHTML = html;
  49. document.getElementById('help_tab').style.display = 'block';
  50. document.getElementById('help_tab').setAttribute("aria-hidden", "false");
  51. }
  52. }
  53. tinyMCEPopup.onInit.add(init);