]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/javascript/tiny_mce/classes/adapter/prototype/adapter.js
Release 6.5.0
[Github/sugarcrm.git] / include / javascript / tiny_mce / classes / adapter / prototype / adapter.js
1 /**
2  * adapter.js
3  *
4  * Copyright 2009, Moxiecode Systems AB
5  * Released under LGPL License.
6  *
7  * License: http://tinymce.moxiecode.com/license
8  * Contributing: http://tinymce.moxiecode.com/contributing
9  */
10
11 // #ifdef prototype_adapter
12
13 (function() {
14         if (!window.Prototype)
15                 return alert("Load prototype first!");
16
17         // Patch in core NS functions
18         tinymce.extend(tinymce, {
19                 trim : function(s) {return s ? s.strip() : '';},
20                 inArray : function(a, v) {return a && a.indexOf ? a.indexOf(v) : -1;}
21         });
22
23         // Patch in functions in various clases
24         // Add a "#ifndefjquery" statement around each core API function you add below
25         var patches = {
26                 'tinymce.util.JSON' : {
27                         /*serialize : function(o) {
28                                 return o.toJSON();
29                         }*/
30                 },
31         };
32
33         // Patch functions after a class is created
34         tinymce.onCreate = function(ty, c, p) {
35                 tinymce.extend(p, patches[c]);
36         };
37 })();
38
39 // #endif