mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ef10672364
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92488 467b73ca-7a2a-4603-9d3b-597d59a354a9
26 lines
627 B
JavaScript
26 lines
627 B
JavaScript
/**
|
|
* $Id: JSON.js 920 2008-09-09 14:05:33Z spocke $
|
|
*
|
|
* @author Moxiecode
|
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
|
*/
|
|
|
|
tinymce.create('static tinymce.util.JSONP', {
|
|
callbacks : {},
|
|
count : 0,
|
|
|
|
send : function(o) {
|
|
var t = this, dom = tinymce.DOM, count = o.count !== undefined ? o.count : t.count, id = 'tinymce_jsonp_' + count;
|
|
|
|
t.callbacks[count] = function(json) {
|
|
dom.remove(id);
|
|
delete t.callbacks[count];
|
|
|
|
o.callback(json);
|
|
};
|
|
|
|
dom.add(dom.doc.body, 'script', {id : id , src : o.url, type : 'text/javascript'});
|
|
t.count++;
|
|
}
|
|
});
|