X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fplugins%2Fnoneditable%2Feditor_plugin_src.js;h=916dce29cfc37bd755c724d36cb5f9ffa5fbfd83;hb=eb5fb3f6c3b3e1d4d3d7ebbb92b8c60d70d13254;hp=77db577cf611abfaaf68b85641998e9cc54e020f;hpb=7ce246db4a173b9c738e8e160f8d0030d4e82d78;p=citadel.git diff --git a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js index 77db577cf..916dce29c 100644 --- a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 743 2008-03-23 17:47:33Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -10,7 +13,7 @@ tinymce.create('tinymce.plugins.NonEditablePlugin', { init : function(ed, url) { - var t = this, editClass, nonEditClass; + var t = this, editClass, nonEditClass, state; t.editor = ed; editClass = ed.getParam("noneditable_editable_class", "mceEditable"); @@ -30,10 +33,13 @@ // Block or unblock if (sc || ec) { + state = 1; t._setDisabled(1); return false; - } else + } else if (state == 1) { t._setDisabled(0); + state = 0; + } }); }, @@ -70,11 +76,13 @@ ed.onKeyPress.addToTop(t._block); ed.onKeyUp.addToTop(t._block); ed.onPaste.addToTop(t._block); + ed.onContextMenu.addToTop(t._block); } else { ed.onKeyDown.remove(t._block); ed.onKeyPress.remove(t._block); ed.onKeyUp.remove(t._block); ed.onPaste.remove(t._block); + ed.onContextMenu.remove(t._block); } t.disabled = s;