2 * Copyright (c) STMicroelectronics, 2004-2009. All rights reserved
4 * Originally written by Manuel VACELET, 2009
6 * This file is a part of Codendi.
8 * Codendi is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Codendi is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Codendi; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 var codendi = codendi || { };
28 codendi.PluginForumml = Class.create({
29 initialize: function(element) {
30 // Toggle mail class name when click on the right button
31 element.observe('click', function (event) {
32 var link = Event.element(event);
34 var msgId = link.id.replace('plugin_forumml_toogle_msg_', '');
35 var content = $('plugin_forumml_message_content_'+msgId);
37 if (content.className == 'plugin_forumml_message_content_pre') {
38 content.className = 'plugin_forumml_message_content_std';
40 content.className = 'plugin_forumml_message_content_pre';
49 document.observe('dom:loaded', function() {
50 $$('.plugin_forumml_toggle_font').each(function (elmt) {
51 new codendi.PluginForumml(elmt);