/* * This Plugin adds a button to the edit box to * call the JSP-Wiki-To-Mediawiki Translation page * * @author Pascal Bihler * */ /* * Callback function * * Adds text to the current textare */ function addTextFromJspWiki(text) { window.focus(); insertAtCarret('wiki__text',text); //preview page: document.getElementById('edbtn__preview').click(); } /* * Opens a new Window with the JSPWiki-Converter * which was written using the Google Web Toolkit * */ function openJspWikiTranslationPage () { jspw_converter = window.open("lib/plugins/jspwiki_import/importer/JspConverter.html", 'JspWikiConverter', "dependent=yes,locationbar=no,menubar=0,resizable=yes,status=no,width=560,height=400"); jspw_converter.focus(); } /* * Register the toolbar button (old fashioned way) */ function insertJspWikiImportButton() { // create ToolBar Button with ID and add it to the toolbar with null action var toolbarObj = document.getElementById('tool__bar'); if (toolbarObj == null) return; this.buttonObj = createToolButton('../../plugins/jspwiki_import/jspwiki_logo.png','Import JSPWiki-pagei','j','jsp__import'); this.buttonObj.onclick = function(){openJspWikiTranslationPage();}; toolbarObj.appendChild(this.buttonObj); } addInitEvent(function(){insertJspWikiImportButton();});