Mercurial > hg > rr-repo
comparison sites/all/modules/imce_wysiwyg/js/imce_wysiwyg.js @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ff03f76ab3fe |
---|---|
1 | |
2 /** | |
3 * Wysiwyg API integration helper function. | |
4 */ | |
5 function imceImageBrowser(field_name, url, type, win) { | |
6 // TinyMCE. | |
7 if (win !== 'undefined') { | |
8 win.open(Drupal.settings.imce.url + encodeURIComponent(field_name), '', 'width=760,height=560,resizable=1'); | |
9 } | |
10 } | |
11 | |
12 /** | |
13 * CKeditor integration. | |
14 */ | |
15 var imceCkeditSendTo = function (file, win) { | |
16 var parts = /\?(?:.*&)?CKEditorFuncNum=(\d+)(?:&|$)/.exec(win.location.href); | |
17 if (parts && parts.length > 1) { | |
18 CKEDITOR.tools.callFunction(parts[1], file.url); | |
19 win.close(); | |
20 } | |
21 else { | |
22 throw 'CKEditorFuncNum parameter not found or invalid: ' + win.location.href; | |
23 } | |
24 }; |