annotate static/js/tiny_mce/plugins/iespell/editor_plugin_src.js @ 791:0ca691cccf8d
Utilize select_related() for user & user profiles.
This commit also removes the caching of the avatar URL in the
avatar template tag. This is because we are now using select_related,
so we already have the profile & avatar when we get to the tag.
Thus we don't need to waste time querying the cache.
Removed an apparently unused member map template as well.
author |
Brian Neal <bgneal@gmail.com> |
date |
Fri, 23 May 2014 21:52:41 -0500 |
parents |
88b2b9cb8c1f |
children |
|
rev |
line source |
bgneal@312
|
1 /**
|
bgneal@312
|
2 * editor_plugin_src.js
|
bgneal@312
|
3 *
|
bgneal@312
|
4 * Copyright 2009, Moxiecode Systems AB
|
bgneal@312
|
5 * Released under LGPL License.
|
bgneal@312
|
6 *
|
bgneal@312
|
7 * License: http://tinymce.moxiecode.com/license
|
bgneal@312
|
8 * Contributing: http://tinymce.moxiecode.com/contributing
|
bgneal@312
|
9 */
|
bgneal@312
|
10
|
bgneal@312
|
11 (function() {
|
bgneal@312
|
12 tinymce.create('tinymce.plugins.IESpell', {
|
bgneal@312
|
13 init : function(ed, url) {
|
bgneal@312
|
14 var t = this, sp;
|
bgneal@312
|
15
|
bgneal@312
|
16 if (!tinymce.isIE)
|
bgneal@312
|
17 return;
|
bgneal@312
|
18
|
bgneal@312
|
19 t.editor = ed;
|
bgneal@312
|
20
|
bgneal@312
|
21 // Register commands
|
bgneal@312
|
22 ed.addCommand('mceIESpell', function() {
|
bgneal@312
|
23 try {
|
bgneal@312
|
24 sp = new ActiveXObject("ieSpell.ieSpellExtension");
|
bgneal@312
|
25 sp.CheckDocumentNode(ed.getDoc().documentElement);
|
bgneal@312
|
26 } catch (e) {
|
bgneal@312
|
27 if (e.number == -2146827859) {
|
bgneal@312
|
28 ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
|
bgneal@312
|
29 if (s)
|
bgneal@312
|
30 window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
bgneal@312
|
31 });
|
bgneal@312
|
32 } else
|
bgneal@312
|
33 ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
|
bgneal@312
|
34 }
|
bgneal@312
|
35 });
|
bgneal@312
|
36
|
bgneal@312
|
37 // Register buttons
|
bgneal@312
|
38 ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
|
bgneal@312
|
39 },
|
bgneal@312
|
40
|
bgneal@312
|
41 getInfo : function() {
|
bgneal@312
|
42 return {
|
bgneal@312
|
43 longname : 'IESpell (IE Only)',
|
bgneal@312
|
44 author : 'Moxiecode Systems AB',
|
bgneal@312
|
45 authorurl : 'http://tinymce.moxiecode.com',
|
bgneal@312
|
46 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
|
bgneal@312
|
47 version : tinymce.majorVersion + "." + tinymce.minorVersion
|
bgneal@312
|
48 };
|
bgneal@312
|
49 }
|
bgneal@312
|
50 });
|
bgneal@312
|
51
|
bgneal@312
|
52 // Register plugin
|
bgneal@312
|
53 tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
|
bgneal@312
|
54 })(); |