| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <!-- 3 CKEditor - The text editor for Internet - http://ckeditor.com 4 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 5 --> 6 <head> 7 <title>CKEditor</title> 8 <!-- $id$ --> 9 <script type="text/javascript"> 10 var ckeditor_was_opened_in_popup_window = true; 11 var Drupal=window.opener['Drupal']; 12 document.write('<scr' + 'ipt src="' + window.opener['Drupal'].settings.basePath + 'misc/jquery.js"></scr' + 'ipt>'); 13 document.write('<scr' + 'ipt src="' + window.opener['Drupal'].settings.ckeditor.editor_path + '/ckeditor.js?I"></scr' + 'ipt>'); 14 document.write('<scr' + 'ipt src="' + window.opener['Drupal'].settings.ckeditor.module_path + '/includes/ckeditor.utils.js?I"></scr' + 'ipt>'); 15 document.write('<scr' + 'ipt src="' + window.opener['Drupal'].settings.ckeditor.module_path + '/ckeditor.config.js?I"></scr' + 'ipt>'); 16 17 function Ok() 18 { 19 var textarea_id=$(".content_editor").attr("id"); 20 var data=CKEDITOR.instances[textarea_id].getData(); 21 if (teaser=window.opener.Drupal.ckeditorTeaserInfo(textarea_id)) { 22 var brcode=/<!--break-->/; 23 data=data.split(brcode); 24 if(data.length>1){ 25 teaser.textareaContainer.show(); 26 teaser.textarea.attr('disabled', ''); 27 if (teaser.button.attr('value') != Drupal.t('Join summary')) { 28 try {teaser.button.click();} catch(e) {teaser.button.val(Drupal.t('Join summary'));} 29 } 30 teaser.textarea.val(data[0]); 31 window.opener.$("#"+textarea_id).val(data[1]); 32 } else { 33 window.opener.$("#"+textarea_id).val(data[0]); 34 teaser.textarea.attr('disabled', 'disabled'); 35 if (teaser.button.attr('value') != Drupal.t('Split summary at cursor')) { 36 try {teaser.button.click();} catch(e) {teaser.button.val(Drupal.t('Split summary at cursor'));} 37 } 38 } 39 teaser.buttonContainer.show(); 40 } else { 41 window.opener.$("#"+textarea_id).val(data); 42 } 43 window.opener.focus(); 44 window.close(); 45 } 46 function Cancel() 47 { 48 if ( CKEDITOR.instances[$(".content_editor").attr("id")].checkDirty() ) 49 { 50 if ( !confirm(Drupal.t('Are you sure you want to cancel? Your changes will be lost.')) ) 51 return ; 52 } 53 54 window.close(); 55 } 56 57 function get_element_id(){ 58 var regexp=/[?&]el=([^&#]*)/i; 59 var rs=regexp.exec(window.location.href); 60 if( rs == null ) { 61 return ""; 62 } else { 63 return rs[1]; 64 } 65 } 66 </script> 67 </head> 68 <body> 69 <script type="text/javascript"> 70 $(document).ready(function () { 71 var textarea_id=get_element_id(); 72 $(".content_editor").attr("id", textarea_id); 73 if (teaser=Drupal.ckeditorTeaserInfo(textarea_id)) { 74 if(teaser.textarea.val().length > 0){ 75 $(".content_editor").val( 76 teaser.textarea.val() + '\n<!--break-->\n' + window.opener.$("#"+textarea_id).val() 77 ); 78 } else { 79 $(".content_editor").val(window.opener.$("#"+textarea_id).val()); 80 } 81 } else { 82 $(".content_editor").val(window.opener.$("#"+textarea_id).val()); 83 } 84 if (($("#" + textarea_id).val().length > 0) && (window.opener.$("#" + textarea_id).attr('class').indexOf("filterxss1") != -1 || window.opener.$("#" + textarea_id).attr('class').indexOf("filterxss2") != -1)) { 85 $.post(Drupal.settings.basePath + 'index.php?q=ckeditor/xss', { 86 text: $('#' + textarea_id).val(), 87 'filters[]': Drupal.settings.ckeditor.settings[textarea_id].filters 88 }, function(text){ 89 $("#" + textarea_id).val(text); 90 }); 91 } 92 CKEDITOR.replace(textarea_id, Drupal.settings.ckeditor.settings[textarea_id]); 93 }); 94 </script> 95 <table width="100%" height="100%"> 96 <tr> 97 <td height="100%"> 98 <textarea class="content_editor"> 99 </textarea> 100 </td> 101 </tr> 102 <tr> 103 <td> 104 <input type="button" value="Ok" onclick="Ok();" style="width:120px" /> 105 <input type="button" value="Cancel" onclick="Cancel();" /> 106 </td> 107 </tr> 108 </table> 109 </body> 110 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |