| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 CKEDITOR.on( 'dialogDefinition', function( ev ) 2 { 3 var dialogName = ev.data.name; 4 var dialogDefinition = ev.data.definition; 5 6 if ( dialogName == 'uicolor' ) 7 { 8 // Get a reference to the configBox and hide it (cannot be removed). 9 var configBox = dialogDefinition.getContents( 'tab1' ).get( 'configBox' ); 10 configBox.style = 'display:none'; 11 } 12 }); 13 14 $(document).ready(function() { 15 if (typeof(CKEDITOR) == "undefined") 16 return; 17 18 $('#edit-uicolor-textarea').show(); 19 20 Drupal.ckeditorUiColorOnChange = function() { 21 var color = CKEDITOR.instances["edit-uicolor-textarea"].getUiColor(); 22 if ($("#edit-uicolor").val() == "custom" && typeof(color) != "undefined") { 23 $('#edit-uicolor-user').val(color); 24 } 25 }; 26 27 CKEDITOR.replace("edit-uicolor-textarea", 28 { 29 extraPlugins : 'uicolor', 30 height: 60, 31 uiColor: $('#edit-uicolor-user').val() || '#D3D3D3', 32 width: 400, 33 toolbar : [[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList'],[ 'UIColor' ]], 34 on: 35 { 36 focus : Drupal.ckeditorUiColorOnChange, 37 blur : Drupal.ckeditorUiColorOnChange 38 } 39 }); 40 41 $("#edit-uicolor").bind("change", function() { 42 if (typeof(Drupal.settings.ckeditor_uicolor) != "undefined") { 43 CKEDITOR.instances["edit-uicolor-textarea"].setUiColor(Drupal.settings.ckeditor_uicolor[$(this).val()]); 44 } 45 if ($(this).val() != "custom") { 46 $('#edit-uicolor-user').val(""); 47 } 48 else { 49 var color = CKEDITOR.instances["edit-uicolor-textarea"].getUiColor(); 50 if (typeof(color) != "undefined") { 51 $('#edit-uicolor-user').val(color); 52 } 53 } 54 }); 55 });
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 |