includes/clientside/tinymce/themes/advanced/jscripts/about.js
changeset 335 67bd3121a12e
parent 334 c72b545f1304
child 336 bfa2e9c23f03
equal deleted inserted replaced
334:c72b545f1304 335:67bd3121a12e
     1 function init() {
       
     2 	var inst;
       
     3 
       
     4 	tinyMCEPopup.resizeToInnerSize();
       
     5 	inst = tinyMCE.selectedInstance;
       
     6 
       
     7 	// Give FF some time
       
     8 	window.setTimeout('insertHelpIFrame();', 10);
       
     9 
       
    10 	var tcont = document.getElementById('plugintablecontainer');
       
    11 	var plugins = tinyMCE.getParam('plugins', '', true, ',');
       
    12 	if (plugins.length == 0)
       
    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>' + tinyMCE.getLang('lang_plugin') + '</td>';
       
    20 	html += '<td>' + tinyMCE.getLang('lang_author') + '</td>';
       
    21 	html += '<td>' + tinyMCE.getLang('lang_version') + '</td>';
       
    22 	html += '</tr>';
       
    23 	html += '</thead>';
       
    24 	html += '<tbody>';
       
    25 
       
    26 	for (var i=0; i<inst.plugins.length; i++) {
       
    27 		var info = getPluginInfo(inst.plugins[i]);
       
    28 
       
    29 		html += '<tr>';
       
    30 
       
    31 		if (info.infourl != null && info.infourl != '')
       
    32 			html += '<td width="50%" title="' + plugins[i] + '"><a href="' + info.infourl + '" target="mceplugin">' + info.longname + '</a></td>';
       
    33 		else
       
    34 			html += '<td width="50%" title="' + plugins[i] + '">' + info.longname + '</td>';
       
    35 
       
    36 		if (info.authorurl != null && info.authorurl != '')
       
    37 			html += '<td width="35%"><a href="' + info.authorurl + '" target="mceplugin">' + info.author + '</a></td>';
       
    38 		else
       
    39 			html += '<td width="35%">' + info.author + '</td>';
       
    40 
       
    41 		html += '<td width="15%">' + info.version + '</td>';
       
    42 		html += '</tr>';
       
    43 	}
       
    44 
       
    45 	html += '</tbody>';
       
    46 	html += '</table>';
       
    47 
       
    48 	tcont.innerHTML = html;
       
    49 }
       
    50 
       
    51 function getPluginInfo(name) {
       
    52 	if (tinyMCE.plugins[name].getInfo)
       
    53 		return tinyMCE.plugins[name].getInfo();
       
    54 
       
    55 	return {
       
    56 		longname : name,
       
    57 		authorurl : '',
       
    58 		infourl : '',
       
    59 		author : '--',
       
    60 		version : '--'
       
    61 	};
       
    62 }
       
    63 
       
    64 function insertHelpIFrame() {
       
    65 	var html = '<iframe width="100%" height="300" src="' + tinyMCE.themeURL + "/docs/" + tinyMCE.settings['docs_language'] + "/index.htm" + '"></iframe>';
       
    66 
       
    67 	document.getElementById('iframecontainer').innerHTML = html;
       
    68 
       
    69 	html = '';
       
    70 	html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> ';
       
    71 	html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> ';
       
    72 	html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> ';
       
    73 
       
    74 	document.getElementById('buttoncontainer').innerHTML = html;
       
    75 }