Changeset 3276
- Timestamp:
- 03/25/09 10:30:05 (4 years ago)
- Location:
- CKEditor/trunk/_source
- Files:
-
- 26 edited
-
plugins/clipboard/dialogs/paste.js (modified) (1 diff)
-
plugins/dialog/plugin.js (modified) (26 diffs)
-
plugins/dialogui/plugin.js (modified) (1 diff)
-
plugins/find/dialogs/find.js (modified) (1 diff)
-
plugins/flash/dialogs/flash.js (modified) (1 diff)
-
plugins/forms/dialogs/button.js (modified) (1 diff)
-
plugins/forms/dialogs/checkbox.js (modified) (1 diff)
-
plugins/forms/dialogs/form.js (modified) (1 diff)
-
plugins/forms/dialogs/hiddenfield.js (modified) (1 diff)
-
plugins/forms/dialogs/radio.js (modified) (1 diff)
-
plugins/forms/dialogs/select.js (modified) (1 diff)
-
plugins/forms/dialogs/textarea.js (modified) (1 diff)
-
plugins/forms/dialogs/textfield.js (modified) (1 diff)
-
plugins/image/dialogs/image.js (modified) (1 diff)
-
plugins/link/dialogs/anchor.js (modified) (1 diff)
-
plugins/link/dialogs/link.js (modified) (1 diff)
-
plugins/pastefromword/dialogs/pastefromword.js (modified) (1 diff)
-
plugins/pastetext/dialogs/pastetext.js (modified) (1 diff)
-
plugins/smiley/dialogs/smiley.js (modified) (2 diffs)
-
plugins/specialchar/dialogs/specialchar.js (modified) (2 diffs)
-
plugins/table/dialogs/table.js (modified) (1 diff)
-
plugins/templates/dialogs/templates.js (modified) (1 diff)
-
plugins/wsc/dialogs/wsc.js (modified) (1 diff)
-
skins/default/dialog.css (modified) (7 diffs)
-
skins/default/skin.js (modified) (1 diff)
-
themes/default/theme.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/plugins/clipboard/dialogs/paste.js
r3260 r3276 56 56 title : editor.lang.clipboard.title, 57 57 58 minWidth : 400,59 minHeight : 330,58 minWidth : 350, 59 minHeight : 240, 60 60 61 61 onShow : function() -
CKEditor/trunk/_source/plugins/dialog/plugin.js
r3269 r3276 73 73 return null; 74 74 } 75 76 // Stores dialog related data from skin definitions. e.g. margin sizes. 77 var skinData = {}; 75 78 76 79 /** … … 109 112 , editor ).definition; 110 113 114 var doc = CKEDITOR.document; 115 111 116 var themeBuilt = editor.theme.buildDialog( editor ); 112 117 … … 137 142 }; 138 143 139 /** 140 * An associative map of elements in the dialog. It has the following members: 141 * <ul> 142 * <li>tl - top left corner.</li> 143 * <li>tl_resize - resize handle at the top left corner.</li> 144 * <li>t - top side.</li> 145 * <li>t_resize - resize handle at the top.</li> 146 * <li>tr - top right corner.</li> 147 * <li>tr_resize - resize handle at the top right.</li> 148 * <li>l - left side.</li> 149 * <li>l_resize - resize handle at the left side.</li> 150 * <li>c - center area.</li> 151 * <li>r - right side.</li> 152 * <li>r_resize - resize handle at the right side.</li> 153 * <li>bl - bottom left corner.</li> 154 * <li>bl_resize - resize handle at the bottom left.</li> 155 * <li>b - bottom side.</li> 156 * <li>b_resize - resize handle at the bottom.</li> 157 * <li>br - bottom right corner.</li> 158 * <li>br_resize - resize handle at the bottom right.</li> 159 * <li>title - title area.</li> 160 * <li>close - close button.</li> 161 * <li>tabs - tabs area.</li> 162 * <li>contents - the content page area.</li> 163 * <li>footer - the footer area.</li> 164 * </ul> 165 * @type Object 166 * @field 167 */ 168 this.parts = { 169 'tl' : [0,0], 170 'tl_resize' : [0,0,0], 171 't' : [0,1], 172 't_resize' : [0,1,0], 173 'tr' : [0,2], 174 'tr_resize' : [0,2,0], 175 'l' : [1,0], 176 'l_resize' : [1,0,0], 177 'c' : [1,1], 178 'r' : [1,2], 179 'r_resize' : [1,2,0], 180 'bl' : [2,0], 181 'bl_resize' : [2,0,0], 182 'b' : [2,1], 183 'b_resize' : [2,1,0], 184 'br' : [2,2], 185 'br_resize' : [2,2,0], 186 'title' : [1,1,0], 187 'close' : [1,1,0,0], 188 'tabs' : [1,1,1,0,0], 189 'tabs_table' : [1,1,1], 190 'contents' : [1,1,2], 191 'footer' : [1,1,3] 192 }; 193 194 // Initialize the parts map. 195 var element = this._.element.getFirst(); 196 for ( var i in this.parts ) 197 this.parts[i] = element.getChild( this.parts[i] ); 198 144 this.parts = themeBuilt.parts; 145 199 146 // Call the CKEDITOR.event constructor to initialize this instance. 200 147 CKEDITOR.event.call( this ); … … 331 278 var nextId = shiftPressed ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ); 332 279 me.selectPage( nextId ); 333 me._.tabs[ nextId ][ 0 ]. getFirst().focus();280 me._.tabs[ nextId ][ 0 ].focus(); 334 281 } 335 282 else … … 345 292 // Alt-F10 puts focus into the current tab item in the tab bar. 346 293 me._.tabBarMode = true; 347 me._.tabs[ me._.currentTabId ][ 0 ]. getFirst().focus();294 me._.tabs[ me._.currentTabId ][ 0 ].focus(); 348 295 processed = true; 349 296 } … … 353 300 var nextId = ( keystroke == 37 ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ) ); 354 301 me.selectPage( nextId ); 355 me._.tabs[ nextId ][ 0 ]. getFirst().focus();302 me._.tabs[ nextId ][ 0 ].focus(); 356 303 processed = true; 357 304 } … … 424 371 425 372 // Find the outer <td> container of the tab. 426 while ( target.getName() != 'td' || !tabOuterRegex.test( target.$.className ) ) 427 { 428 target = target.getParent(); 429 } 430 id = target.$.id.substr( 0, target.$.id.lastIndexOf( '_' ) ); 373 var id = target.$.id.substr( 0, target.$.id.lastIndexOf( '_' ) ); 431 374 this.selectPage( id ); 432 375 … … 455 398 // Insert dummy text box for grabbing focus away from the editing area. 456 399 this._.dummyText = CKEDITOR.dom.element.createFromHtml( '<input type="text" style="position: absolute; left: -100000px; top: -100000px" />' ); 457 this._.dummyText.appendTo( element );400 this._.dummyText.appendTo( themeBuilt.element ); 458 401 459 402 CKEDITOR.skins.load( editor.config.skin, 'dialog' ); … … 497 440 getSize : function() 498 441 { 499 return CKEDITOR.tools.extend( {}, this._.size ); 442 var element = this._.element.getFirst(); 443 return { width : element.$.offsetWidth, height : element.$.offsetHeight }; 500 444 }, 501 445 … … 515 459 // The dialog may be fixed positioned or absolute positioned. Ask the 516 460 // browser what is the current situation first. 461 var element = this._.element.getElementsByTag( 'div' ).getItem( 0 ); 517 462 if ( isFixed === undefined ) 518 isFixed = this._.element.getFirst().getComputedStyle( 'position' ) == 'fixed';463 isFixed = element.getComputedStyle( 'position' ) == 'fixed'; 519 464 520 465 if ( isFixed && this._.position && this._.position.x == x && this._.position.y == y ) … … 532 477 } 533 478 534 this._.element.getFirst().setStyles(479 element.setStyles( 535 480 { 536 481 'left' : x + 'px', … … 733 678 className : 'cke_dialog_page_contents', 734 679 children : contents.elements, 735 expand : !!contents.expand 680 expand : !!contents.expand, 681 padding : contents.padding, 682 style : 'width: 100%; height: 100%;' 736 683 }, pageHtml ); 737 684 … … 739 686 var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) ); 740 687 var tab = CKEDITOR.dom.element.createFromHtml( [ 741 '<table><tbody><tr><td class="cke_dialog_tab">', 742 '<a href="javascript: void(0)"', titleHtml, ' style="display: block; outline: none;" hidefocus="true">', 743 '<table border="0" cellspacing="0" cellpadding="0"><tbody><tr>', 744 '<td class="cke_dialog_tab_left"></td>', 745 '<td class="cke_dialog_tab_center">', 746 CKEDITOR.tools.htmlEncode( contents.label.replace( / /g, '\xa0' ) ), 747 '</td>', 748 '<td class="cke_dialog_tab_right"></td>', 749 '</tr></tbody></table></a></td></tr></tbody></table>' 688 '<a class="cke_dialog_tab"', 689 ( this._.pageCount > 0 ? ' cke_last' : 'cke_first' ), 690 titleHtml, 691 ' id="', contents.id + '_', CKEDITOR.tools.getNextNumber(), '"' + 692 ' href="javascript:void(0)"', 693 ' hidefocus="true">', 694 contents.label, 695 '</a>' 750 696 ].join( '' ) ); 751 tab = tab.getChild( [0,0,0] );752 753 // First and last tab styles classes.754 if ( this._.lastTab )755 this._.lastTab.removeClass( 'last' );756 tab.addClass( this._.pageCount > 0 ? 'last' : 'first' );757 697 758 698 // If only a single page exist, a different style is used in the central pane. 759 699 if ( this._.pageCount === 0 ) 760 this.parts. c.addClass( 'single_page' );700 this.parts.dialog.addClass( 'cke_single_page' ); 761 701 else 762 this.parts. c.removeClass( 'single_page' );702 this.parts.dialog.removeClass( 'cke_single_page' ); 763 703 764 704 // Take records for the tabs and elements created. … … 767 707 this._.pageCount++; 768 708 this._.lastTab = tab; 709 769 710 var contentMap = this._.contents[ contents.id ] = {}, 770 711 cursor, 771 712 children = vbox.getChild(); 713 772 714 while ( ( cursor = children.shift() ) ) 773 715 { … … 778 720 779 721 // Attach the DOM nodes. 722 723 page.setAttribute( 'name', contents.id ); 724 page.appendTo( this.parts.contents ); 725 780 726 tab.unselectable(); 781 page.appendTo( this.parts.contents ); 782 tab.insertBefore( this.parts.tabs.getChild( this.parts.tabs.getChildCount() - 1 ) ); 783 tab.setAttribute( 'id', contents.id + '_' + CKEDITOR.tools.getNextNumber() ); 784 page.setAttribute( 'name', contents.id ); 727 this.parts.tabs.append( tab ); 785 728 786 729 // Add access key handlers if access key is defined. … … 1061 1004 type : 'button', 1062 1005 label : editor.lang.common.ok, 1063 style : 'width: 60px',1064 1006 onClick : function( evt ) 1065 1007 { … … 1095 1037 type : 'button', 1096 1038 label : editor.lang.common.cancel, 1097 style : 'width: 60px',1098 1039 onClick : function( evt ) 1099 1040 { … … 1121 1062 addUIElement : function( typeName, builder ) 1122 1063 { 1123 this._.uiElementBuilders[typeName] = builder; 1124 }, 1125 1126 /** 1127 * Sets the width of margins of dialogs, which is used for the dialog moving and resizing logic. 1128 * The margin here means the area between the dialog's container <div> and the visual boundary of the dialog. 1129 * Typically this area is used for dialog shadows. 1130 * This function is typically called in a skin's JavaScript files. 1131 * @param {Number} top The top margin in pixels. 1132 * @param {Number} right The right margin in pixels. 1133 * @param {Number} bottom The bottom margin in pixels. 1134 * @param {Number} left The left margin in pixels. 1135 * @example 1136 */ 1137 setMargins : function( top, right, bottom, left ) 1138 { 1139 this._.margins = [ top, right, bottom, left ]; 1064 this._.uiElementBuilders[ typeName ] = builder; 1140 1065 } 1141 1066 }); … … 1149 1074 currentTop : null, 1150 1075 1151 currentZIndex : null, 1152 1153 margins : [0, 0, 0, 0] 1076 currentZIndex : null 1154 1077 }; 1155 1078 … … 1352 1275 * } ); 1353 1276 */ 1354 var contentObject = function( dialog, contentDefinition )1277 function contentObject( dialog, contentDefinition ) 1355 1278 { 1356 1279 this._ = … … 1360 1283 1361 1284 CKEDITOR.tools.extend( this, contentDefinition ); 1362 } ;1285 } 1363 1286 1364 1287 contentObject.prototype = … … 1405 1328 }; 1406 1329 1407 var initDragAndDrop = function( dialog )1330 function initDragAndDrop( dialog ) 1408 1331 { 1409 1332 var lastCoords = null, 1410 1333 abstractDialogCoords = null, 1411 1334 element = dialog.getElement().getFirst(), 1412 magnetDistance = dialog._.editor.config.dialog_magnetDistance, 1413 mouseMoveHandler = function( evt ) 1414 { 1415 var dialogSize = dialog.getSize(), 1416 viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), 1417 x = evt.data.$.screenX, 1418 y = evt.data.$.screenY, 1419 dx = x - lastCoords.x, 1420 dy = y - lastCoords.y, 1421 realX, realY; 1422 1423 lastCoords = { x : x, y : y }; 1424 abstractDialogCoords.x += dx; 1425 abstractDialogCoords.y += dy; 1426 1427 if ( abstractDialogCoords.x + CKEDITOR.dialog._.margins[3] < magnetDistance ) 1428 realX = - CKEDITOR.dialog._.margins[3]; 1429 else if ( abstractDialogCoords.x - CKEDITOR.dialog._.margins[1] > viewPaneSize.width - dialogSize.width - magnetDistance ) 1430 realX = viewPaneSize.width - dialogSize.width + CKEDITOR.dialog._.margins[1]; 1431 else 1432 realX = abstractDialogCoords.x; 1433 1434 if ( abstractDialogCoords.y + CKEDITOR.dialog._.margins[0] < magnetDistance ) 1435 realY = - CKEDITOR.dialog._.margins[0]; 1436 else if ( abstractDialogCoords.y - CKEDITOR.dialog._.margins[2] > viewPaneSize.height - dialogSize.height - magnetDistance ) 1437 realY = viewPaneSize.height - dialogSize.height + CKEDITOR.dialog._.margins[2]; 1438 else 1439 realY = abstractDialogCoords.y; 1440 1441 dialog.move( realX, realY ); 1335 editor = dialog.getParentEditor(), 1336 magnetDistance = editor.config.dialog_magnetDistance, 1337 margins = skinData[ editor.config.skin ].margins || [ 0, 0, 0, 0 ]; 1338 1339 function mouseMoveHandler( evt ) 1340 { 1341 var dialogSize = dialog.getSize(), 1342 viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), 1343 x = evt.data.$.screenX, 1344 y = evt.data.$.screenY, 1345 dx = x - lastCoords.x, 1346 dy = y - lastCoords.y, 1347 realX, realY; 1348 1349 lastCoords = { x : x, y : y }; 1350 abstractDialogCoords.x += dx; 1351 abstractDialogCoords.y += dy; 1352 1353 if ( abstractDialogCoords.x + margins[3] < magnetDistance ) 1354 realX = - margins[3]; 1355 else if ( abstractDialogCoords.x - margins[1] > viewPaneSize.width - dialogSize.width - magnetDistance ) 1356 realX = viewPaneSize.width - dialogSize.width + margins[1]; 1357 else 1358 realX = abstractDialogCoords.x; 1359 1360 if ( abstractDialogCoords.y + margins[0] < magnetDistance ) 1361 realY = - margins[0]; 1362 else if ( abstractDialogCoords.y - margins[2] > viewPaneSize.height - dialogSize.height - magnetDistance ) 1363 realY = viewPaneSize.height - dialogSize.height + margins[2]; 1364 else 1365 realY = abstractDialogCoords.y; 1366 1367 dialog.move( realX, realY ); 1368 1369 evt.data.preventDefault(); 1370 } 1371 1372 function mouseUpHandler( evt ) 1373 { 1374 CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); 1375 CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); 1376 1377 if ( CKEDITOR.env.ie6Compat ) 1378 { 1379 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1380 coverDoc.removeListener( 'mousemove', mouseMoveHandler ); 1381 coverDoc.removeListener( 'mouseup', mouseUpHandler ); 1382 } 1383 } 1384 1385 dialog.parts.title.on( 'mousedown', function( evt ) 1386 { 1387 lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; 1388 1389 CKEDITOR.document.on( 'mousemove', mouseMoveHandler ); 1390 CKEDITOR.document.on( 'mouseup', mouseUpHandler ); 1391 abstractDialogCoords = dialog.getPosition(); 1392 1393 if ( CKEDITOR.env.ie6Compat ) 1394 { 1395 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1396 coverDoc.on( 'mousemove', mouseMoveHandler ); 1397 coverDoc.on( 'mouseup', mouseUpHandler ); 1398 } 1442 1399 1443 1400 evt.data.preventDefault(); 1444 }, 1445 mouseUpHandler = function( evt ) 1446 { 1447 CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); 1448 CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); 1449 1450 if ( CKEDITOR.env.ie6Compat ) 1451 { 1452 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1453 coverDoc.removeListener( 'mousemove', mouseMoveHandler ); 1454 coverDoc.removeListener( 'mouseup', mouseUpHandler ); 1455 } 1456 }; 1457 1458 dialog.parts.title.on( 'mousedown', function( evt ) 1459 { 1460 lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; 1461 1462 CKEDITOR.document.on( 'mousemove', mouseMoveHandler ); 1463 CKEDITOR.document.on( 'mouseup', mouseUpHandler ); 1464 abstractDialogCoords = dialog.getPosition(); 1465 1466 if ( CKEDITOR.env.ie6Compat ) 1467 { 1468 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1469 coverDoc.on( 'mousemove', mouseMoveHandler ); 1470 coverDoc.on( 'mouseup', mouseUpHandler ); 1471 } 1472 1473 evt.data.preventDefault(); 1474 }, dialog ); 1475 }; 1476 1477 var initResizeHandles = function( dialog ) 1401 }, dialog ); 1402 } 1403 1404 function initResizeHandles( dialog ) 1478 1405 { 1479 1406 var definition = dialog.definition, … … 1481 1408 minHeight = definition.minHeight || 0, 1482 1409 resizable = definition.resizable, 1483 topSizer = function( coords, dy ) 1484 { 1485 coords.y += dy; 1486 }, 1487 rightSizer = function( coords, dx ) 1488 { 1489 coords.x2 += dx; 1490 }, 1491 bottomSizer = function( coords, dy ) 1492 { 1493 coords.y2 += dy; 1494 }, 1495 leftSizer = function( coords, dx ) 1496 { 1497 coords.x += dx; 1498 }, 1499 lastCoords = null, 1410 margins = skinData[ dialog.getParentEditor().config.skin ].margins || [ 0, 0, 0, 0 ]; 1411 1412 function topSizer( coords, dy ) 1413 { 1414 coords.y += dy; 1415 } 1416 1417 function rightSizer( coords, dx ) 1418 { 1419 coords.x2 += dx; 1420 } 1421 1422 function bottomSizer( coords, dy ) 1423 { 1424 coords.y2 += dy; 1425 } 1426 1427 function leftSizer( coords, dx ) 1428 { 1429 coords.x += dx; 1430 } 1431 1432 var lastCoords = null, 1500 1433 abstractDialogCoords = null, 1501 1434 magnetDistance = dialog._.editor.config.magnetDistance, 1502 parts = [ 'tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br' ], 1503 mouseDownHandler = function( evt ) 1504 { 1505 var partName = evt.listenerData.part, size = dialog.getSize(); 1506 abstractDialogCoords = dialog.getPosition(); 1507 CKEDITOR.tools.extend( abstractDialogCoords, 1508 { 1509 x2 : abstractDialogCoords.x + size.width, 1510 y2 : abstractDialogCoords.y + size.height 1511 } ); 1512 lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; 1513 1514 CKEDITOR.document.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); 1515 CKEDITOR.document.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); 1516 1517 if ( CKEDITOR.env.ie6Compat ) 1518 { 1519 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1520 coverDoc.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); 1521 coverDoc.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); 1522 } 1523 1524 evt.data.preventDefault(); 1525 }, 1526 mouseMoveHandler = function( evt ) 1527 { 1528 var x = evt.data.$.screenX, 1529 y = evt.data.$.screenY, 1530 dx = x - lastCoords.x, 1531 dy = y - lastCoords.y, 1532 viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), 1533 partName = evt.listenerData.part; 1534 1535 if ( partName.search( 't' ) != -1 ) 1536 topSizer( abstractDialogCoords, dy ); 1537 if ( partName.search( 'l' ) != -1 ) 1538 leftSizer( abstractDialogCoords, dx ); 1539 if ( partName.search( 'b' ) != -1 ) 1540 bottomSizer( abstractDialogCoords, dy ); 1541 if ( partName.search( 'r' ) != -1 ) 1542 rightSizer( abstractDialogCoords, dx ); 1543 1544 lastCoords = { x : x, y : y }; 1545 1546 var realX, realY, realX2, realY2; 1547 1548 if ( abstractDialogCoords.x + CKEDITOR.dialog._.margins[3] < magnetDistance ) 1549 realX = - CKEDITOR.dialog._.margins[3]; 1550 else if ( partName.search( 'l' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) 1551 realX = abstractDialogCoords.x2 - minWidth; 1552 else 1553 realX = abstractDialogCoords.x; 1554 1555 if ( abstractDialogCoords.y + CKEDITOR.dialog._.margins[0] < magnetDistance ) 1556 realY = - CKEDITOR.dialog._.margins[0]; 1557 else if ( partName.search( 't' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) 1558 realY = abstractDialogCoords.y2 - minHeight; 1559 else 1560 realY = abstractDialogCoords.y; 1561 1562 if ( abstractDialogCoords.x2 - CKEDITOR.dialog._.margins[1] > viewPaneSize.width - magnetDistance ) 1563 realX2 = viewPaneSize.width + CKEDITOR.dialog._.margins[1] ; 1564 else if ( partName.search( 'r' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) 1565 realX2 = abstractDialogCoords.x + minWidth; 1566 else 1567 realX2 = abstractDialogCoords.x2; 1568 1569 if ( abstractDialogCoords.y2 - CKEDITOR.dialog._.margins[2] > viewPaneSize.height - magnetDistance ) 1570 realY2= viewPaneSize.height + CKEDITOR.dialog._.margins[2] ; 1571 else if ( partName.search( 'b' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) 1572 realY2 = abstractDialogCoords.y + minHeight; 1573 else 1574 realY2 = abstractDialogCoords.y2 ; 1575 1576 dialog.move( realX, realY ); 1577 dialog.resize( realX2 - realX, realY2 - realY ); 1578 1579 evt.data.preventDefault(); 1580 }, 1581 mouseUpHandler = function( evt ) 1582 { 1583 CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); 1584 CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); 1585 1586 if ( CKEDITOR.env.ie6Compat ) 1587 { 1588 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1589 coverDoc.removeListener( 'mouseup', mouseUpHandler ); 1590 coverDoc.removeListener( 'mousemove', mouseMoveHandler ); 1591 } 1592 }; 1593 1594 var widthTest = /[lr]/, 1595 heightTest = /[tb]/; 1596 for ( var i = 0 ; i < parts.length ; i++ ) 1597 { 1598 var element = dialog.parts[ parts[i] + '_resize' ]; 1599 if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE || 1600 resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT && widthTest.test( parts[i] ) || 1601 resizable == CKEDITOR.DIALOG_RESIZE_WIDTH && heightTest.test( parts[i] ) ) 1602 { 1603 element.hide(); 1604 continue; 1605 } 1606 element.on( 'mousedown', mouseDownHandler, dialog, { part : parts[i] } ); 1607 } 1608 }; 1435 parts = [ 'tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br' ]; 1436 1437 function mouseDownHandler( evt ) 1438 { 1439 var partName = evt.listenerData.part, size = dialog.getSize(); 1440 abstractDialogCoords = dialog.getPosition(); 1441 CKEDITOR.tools.extend( abstractDialogCoords, 1442 { 1443 x2 : abstractDialogCoords.x + size.width, 1444 y2 : abstractDialogCoords.y + size.height 1445 } ); 1446 lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; 1447 1448 CKEDITOR.document.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); 1449 CKEDITOR.document.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); 1450 1451 if ( CKEDITOR.env.ie6Compat ) 1452 { 1453 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1454 coverDoc.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); 1455 coverDoc.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); 1456 } 1457 1458 evt.data.preventDefault(); 1459 } 1460 1461 function mouseMoveHandler( evt ) 1462 { 1463 var x = evt.data.$.screenX, 1464 y = evt.data.$.screenY, 1465 dx = x - lastCoords.x, 1466 dy = y - lastCoords.y, 1467 viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), 1468 partName = evt.listenerData.part; 1469 1470 if ( partName.search( 't' ) != -1 ) 1471 topSizer( abstractDialogCoords, dy ); 1472 if ( partName.search( 'l' ) != -1 ) 1473 leftSizer( abstractDialogCoords, dx ); 1474 if ( partName.search( 'b' ) != -1 ) 1475 bottomSizer( abstractDialogCoords, dy ); 1476 if ( partName.search( 'r' ) != -1 ) 1477 rightSizer( abstractDialogCoords, dx ); 1478 1479 lastCoords = { x : x, y : y }; 1480 1481 var realX, realY, realX2, realY2; 1482 1483 if ( abstractDialogCoords.x + margins[3] < magnetDistance ) 1484 realX = - margins[3]; 1485 else if ( partName.search( 'l' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) 1486 realX = abstractDialogCoords.x2 - minWidth; 1487 else 1488 realX = abstractDialogCoords.x; 1489 1490 if ( abstractDialogCoords.y + margins[0] < magnetDistance ) 1491 realY = - margins[0]; 1492 else if ( partName.search( 't' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) 1493 realY = abstractDialogCoords.y2 - minHeight; 1494 else 1495 realY = abstractDialogCoords.y; 1496 1497 if ( abstractDialogCoords.x2 - margins[1] > viewPaneSize.width - magnetDistance ) 1498 realX2 = viewPaneSize.width + margins[1] ; 1499 else if ( partName.search( 'r' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) 1500 realX2 = abstractDialogCoords.x + minWidth; 1501 else 1502 realX2 = abstractDialogCoords.x2; 1503 1504 if ( abstractDialogCoords.y2 - margins[2] > viewPaneSize.height - magnetDistance ) 1505 realY2= viewPaneSize.height + margins[2] ; 1506 else if ( partName.search( 'b' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) 1507 realY2 = abstractDialogCoords.y + minHeight; 1508 else 1509 realY2 = abstractDialogCoords.y2 ; 1510 1511 dialog.move( realX, realY ); 1512 dialog.resize( realX2 - realX, realY2 - realY ); 1513 1514 evt.data.preventDefault(); 1515 } 1516 1517 function mouseUpHandler( evt ) 1518 { 1519 CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); 1520 CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); 1521 1522 if ( CKEDITOR.env.ie6Compat ) 1523 { 1524 var coverDoc = CKEDITOR.document.getById( 'cke_dialog_background_iframe' ).getFrameDocument(); 1525 coverDoc.removeListener( 'mouseup', mouseUpHandler ); 1526 coverDoc.removeListener( 'mousemove', mouseMoveHandler ); 1527 } 1528 } 1529 1530 // TODO : Simplify the resize logic, having just a single resize grip <div>. 1531 // var widthTest = /[lr]/, 1532 // heightTest = /[tb]/; 1533 // for ( var i = 0 ; i < parts.length ; i++ ) 1534 // { 1535 // var element = dialog.parts[ parts[i] + '_resize' ]; 1536 // if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE || 1537 // resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT && widthTest.test( parts[i] ) || 1538 // resizable == CKEDITOR.DIALOG_RESIZE_WIDTH && heightTest.test( parts[i] ) ) 1539 // { 1540 // element.hide(); 1541 // continue; 1542 // } 1543 // element.on( 'mousedown', mouseDownHandler, dialog, { part : parts[i] } ); 1544 // } 1545 } 1609 1546 1610 1547 var resizeCover; … … 1664 1601 var size = win.getViewPaneSize(); 1665 1602 element.setStyles( 1666 {1667 width : size.width + 'px',1668 height : size.height + 'px'1669 });1603 { 1604 width : size.width + 'px', 1605 height : size.height + 'px' 1606 } ); 1670 1607 }; 1671 1608 … … 2025 1962 }; 2026 1963 2027 CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type : 'hbox' }, htmlList, 'table', styles, 2028 { align : ( elementDefinition && elementDefinition.align ) || 2029 ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) }, innerHTML ); 1964 CKEDITOR.ui.dialog.uiElement.call( 1965 this, 1966 dialog, 1967 elementDefinition || { type : 'hbox' }, 1968 htmlList, 1969 'table', 1970 styles, 1971 elementDefinition && elementDefinition.align && { align : elementDefinition.align } || null, 1972 innerHTML ); 2030 1973 }, 2031 1974 … … 2598 2541 })(); 2599 2542 2543 // Grab the margin data from skin definition and store it away. 2544 CKEDITOR.skins.add = ( function() 2545 { 2546 var original = CKEDITOR.skins.add; 2547 return function( skinName, skinDefinition ) 2548 { 2549 skinData[ skinName ] = { margins : skinDefinition.margins }; 2550 return original.apply( this, arguments ); 2551 }; 2552 } )(); 2600 2553 })(); 2601 2554 -
CKEditor/trunk/_source/plugins/dialogui/plugin.js
r3269 r3276 435 435 button : function( dialog, elementDefinition, htmlList ) 436 436 { 437 if ( arguments.length < 3)437 if ( !arguments.length ) 438 438 return; 439 439 440 if ( typeof ( elementDefinition )== 'function' )440 if ( typeof elementDefinition == 'function' ) 441 441 elementDefinition = elementDefinition( dialog.getParentEditor() ); 442 442 443 initPrivateObject.call( this, elementDefinition, { disabled : elementDefinition.disabled || false } ); 443 444 /** @ignore */445 var innerHTML = function()446 {447 var styles = [],448 align = elementDefinition.align || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' );449 450 if ( elementDefinition.style )451 {452 var defStyle = CKEDITOR.tools.trim( elementDefinition.style );453 styles.push( defStyle );454 if ( defStyle.charAt( defStyle.length - 1 ) != ';' )455 styles.push( ';' );456 }457 458 // IE6 & 7 BUG: Need to set margin as well as align.459 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )460 {461 styles.push( [462 'margin:',463 'auto',464 align == 'right' ? '0px' : 'auto',465 'auto',466 align == 'left' ? '0px' : 'auto' ].join( ' ' ), ';' );467 }468 469 return [470 '<table align="', align, '" ', styles.length > 0 ? 'style="' + styles.join( '' ) + '">' : '>',471 '<tbody><tr><td class="cke_dialog_ui_button_txt">',472 CKEDITOR.tools.htmlEncode( elementDefinition.label ),473 '</td></tr></tbody></table>'474 ].join( '' );475 };476 444 477 445 // Add OnClick event to this input. 478 446 CKEDITOR.event.implementOn( this ); 479 447 448 var me = this; 449 480 450 // Register an event handler for processing button clicks. 481 var me = this;482 451 dialog.on( 'load', function( eventInfo ) 452 { 453 var element = this.getElement(); 454 455 element.on( 'mousedown', function( evt ) 456 { 457 // If button is disabled, don't do anything. 458 if ( me._.disabled ) 459 return; 460 461 // Store the currently active button. 462 CKEDITOR.ui.dialog.button._.activeButton = [ me, me.getElement() ]; 463 } ); 464 465 element.on( 'keydown', function( evt ) 466 { 467 // Click if Enter is pressed. 468 if ( evt.data.$.keyCode == 13 ) 469 { 470 me.fire( 'click', { dialog : me.getDialog() } ); 471 evt.data.preventDefault(); 472 } 473 } ); 474 475 if ( !eventInfo.data.buttonHandlerRegistered ) 483 476 { 484 var element = this.getElement(); 485 (function() 486 { 487 element.on( 'mousedown', function( evt ) 488 { 489 // If button is disabled, don't do anything. 490 if ( me._.disabled ) 491 return; 492 493 // Store the currently active button. 494 CKEDITOR.ui.dialog.button._.activeButton = [ me, me.getElement() ]; 495 } ); 496 497 element.on( 'keydown', function( evt ) 498 { 499 // Click if Enter is pressed. 500 if ( evt.data.$.keyCode == 13 ) 501 { 502 me.fire( 'click', { dialog : me.getDialog() } ); 503 evt.data.preventDefault(); 504 } 505 } ); 506 })(); 507 508 // IE BUG: Padding attributes are ignored for <td> cells. 509 if ( CKEDITOR.env.ie ) 510 element.getChild( [0, 0, 0, 0] ).$.innerHTML += ''; 511 512 if ( !eventInfo.data.buttonHandlerRegistered ) 513 { 514 CKEDITOR.document.on( 'mouseup', function( evt ) 515 { 516 var target = evt.data.getTarget(), 517 activeButton = CKEDITOR.ui.dialog.button._.activeButton; 518 519 // If there's no active button, bail out. 520 if ( !activeButton ) 521 return; 522 523 // Fire the click event - but only if the 524 // active button is the same as target. 525 if ( activeButton[1].equals( target.getAscendant( 'a' ) ) ) 526 activeButton[0].fire( 'click', { dialog : activeButton[0].getDialog() } ); 527 528 // Clear active button flag. 529 CKEDITOR.ui.dialog.button._.activeButton = null; 530 } ); 531 532 eventInfo.data.buttonHandlerRegistered = true; 533 } 534 535 this.getElement().getFirst().unselectable(); 536 }, this ); 477 CKEDITOR.document.on( 'mouseup', function( evt ) 478 { 479 var target = evt.data.getTarget(), 480 activeButton = CKEDITOR.ui.dialog.button._.activeButton; 481 482 // If there's no active button, bail out. 483 if ( !activeButton ) 484 return; 485 486 // Fire the click event - but only if the 487 // active button is the same as target. 488 if ( activeButton[1].equals( target.getAscendant( 'a' ) ) ) 489 activeButton[0].fire( 'click', { dialog : activeButton[0].getDialog() } ); 490 491 // Clear active button flag. 492 CKEDITOR.ui.dialog.button._.activeButton = null; 493 } ); 494 495 eventInfo.data.buttonHandlerRegistered = true; 496 } 497 498 this.getElement().getFirst().unselectable(); 499 }, this ); 537 500 538 501 var outerDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); 539 502 delete outerDefinition.style; 540 503 541 CKEDITOR.ui.dialog.uiElement.call( this, dialog, outerDefinition, htmlList, 'a', { display : 'block', outline : 'none' }, 542 { href : 'javascript:void(0);', title : elementDefinition.label, hidefocus : 'true' }, 543 innerHTML ); 504 CKEDITOR.ui.dialog.uiElement.call( 505 this, 506 dialog, 507 outerDefinition, 508 htmlList, 509 'a', 510 null, 511 { 512 style : elementDefinition.style, 513 href : 'javascript:void(0);', 514 title : elementDefinition.label, 515 hidefocus : 'true' 516 }, 517 '<span class="cke_dialog_ui_button">' + 518 CKEDITOR.tools.htmlEncode( elementDefinition.label ) + 519 '</span>' ); 544 520 }, 545 521 -
CKEditor/trunk/_source/plugins/find/dialogs/find.js
r3260 r3276 555 555 title : editor.lang.findAndReplace.title, 556 556 resizable : CKEDITOR.DIALOG_RESIZE_NONE, 557 minWidth : 400,558 minHeight : 255,557 minWidth : 350, 558 minHeight : 165, 559 559 buttons : [ CKEDITOR.dialog.cancelButton ], //Cancel button only. 560 560 contents : [ -
CKEditor/trunk/_source/plugins/flash/dialogs/flash.js
r3260 r3276 180 180 return { 181 181 title : editor.lang.flash.title, 182 minWidth : 4 50,183 minHeight : 400,182 minWidth : 400, 183 minHeight : 310, 184 184 onLoad : function() 185 185 { -
CKEditor/trunk/_source/plugins/forms/dialogs/button.js
r3114 r3276 7 7 return { 8 8 title : editor.lang.button.title, 9 minWidth : 400,10 minHeight : 230,9 minWidth : 350, 10 minHeight : 140, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/checkbox.js
r3260 r3276 7 7 return { 8 8 title : editor.lang.checkboxAndRadio.checkboxTitle, 9 minWidth : 400,10 minHeight : 230,9 minWidth : 350, 10 minHeight : 140, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/form.js
r3164 r3276 7 7 return { 8 8 title : editor.lang.form.title, 9 minWidth : 400,10 minHeight : 270,9 minWidth : 350, 10 minHeight : 190, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/hiddenfield.js
r3114 r3276 7 7 return { 8 8 title : editor.lang.hidden.title, 9 minWidth : 400,10 minHeight : 200,9 minWidth : 350, 10 minHeight : 110, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/radio.js
r3114 r3276 7 7 return { 8 8 title : editor.lang.checkboxAndRadio.radioTitle, 9 minWidth : 400,10 minHeight : 200,9 minWidth : 350, 10 minHeight : 130, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/select.js
r3260 r3276 131 131 return { 132 132 title : editor.lang.select.title, 133 minWidth : 400,134 minHeight : 370,133 minWidth : 375, 134 minHeight : 270, 135 135 onShow : function() 136 136 { -
CKEditor/trunk/_source/plugins/forms/dialogs/textarea.js
r3114 r3276 7 7 return { 8 8 title : editor.lang.textarea.title, 9 minWidth : 400,10 minHeight : 230,9 minWidth : 350, 10 minHeight : 140, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/forms/dialogs/textfield.js
r3268 r3276 7 7 return { 8 8 title : editor.lang.textfield.title, 9 minWidth : 400,10 minHeight : 230,9 minWidth : 350, 10 minHeight : 140, 11 11 onShow : function() 12 12 { -
CKEditor/trunk/_source/plugins/image/dialogs/image.js
r3262 r3276 187 187 return { 188 188 title : ( dialogType == 'image' ) ? editor.lang.image.title : editor.lang.image.titleButton, 189 minWidth : 4 50,190 minHeight : 400,189 minWidth : 420, 190 minHeight : 310, 191 191 onShow : function() 192 192 { -
CKEditor/trunk/_source/plugins/link/dialogs/anchor.js
r3049 r3276 22 22 return { 23 23 title : editor.lang.anchor.title, 24 minWidth : 3 50,25 minHeight : 150,24 minWidth : 300, 25 minHeight : 60, 26 26 onOk : function() 27 27 { -
CKEditor/trunk/_source/plugins/link/dialogs/link.js
r3260 r3276 240 240 return { 241 241 title : editor.lang.link.title, 242 minWidth : 400,243 minHeight : 320,242 minWidth : 350, 243 minHeight : 230, 244 244 contents : [ 245 245 { -
CKEditor/trunk/_source/plugins/pastefromword/dialogs/pastefromword.js
r3260 r3276 8 8 return { 9 9 title : editor.lang.pastefromword.title, 10 minWidth : 400,11 minHeight : 340,10 minWidth : 350, 11 minHeight : 250, 12 12 htmlToLoad : '<!doctype html><script type="text/javascript">' 13 13 + 'window.onload = function()' -
CKEditor/trunk/_source/plugins/pastetext/dialogs/pastetext.js
r3260 r3276 13 13 title : editor.lang.pasteText.title, 14 14 15 minWidth : 400,16 minHeight : 330,15 minWidth : 350, 16 minHeight : 240, 17 17 18 18 onShow : function() -
CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
r3020 r3276 80 80 return { 81 81 title : editor.lang.smiley.title, 82 minWidth : 320,83 minHeight : 210,82 minWidth : 270, 83 minHeight : 120, 84 84 contents : [ 85 85 { … … 88 88 title : '', 89 89 expand : true, 90 padding : 0, 90 91 elements : [ 91 92 smileySelector -
CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
r3089 r3276 8 8 return { 9 9 title : editor.lang.specialChar.title, 10 minWidth : 4 50,11 minHeight : 350,10 minWidth : 420, 11 minHeight : 270, 12 12 buttons : [ CKEDITOR.dialog.cancelButton ], 13 13 charColumns : 17, … … 83 83 label : editor.lang.common.generalTab, 84 84 title : editor.lang.common.generalTab, 85 padding : 0, 85 86 align : top, 86 87 elements : [ -
CKEditor/trunk/_source/plugins/table/dialogs/table.js
r3260 r3276 85 85 return { 86 86 title : editor.lang.table.title, 87 minWidth : 4 80,88 minHeight : 260,87 minWidth : 430, 88 minHeight : 180, 89 89 onShow : function() 90 90 { -
CKEditor/trunk/_source/plugins/templates/dialogs/templates.js
r3260 r3276 109 109 title :editor.lang.templates.title, 110 110 111 minWidth : 450,112 minHeight : 400,111 minWidth : 400, 112 minHeight : 310, 113 113 114 114 contents : -
CKEditor/trunk/_source/plugins/wsc/dialogs/wsc.js
r3260 r3276 119 119 return { 120 120 title : editor.lang.spellCheck.title, 121 minWidth : 540,122 minHeight : 480,121 minWidth : 490, 122 minHeight : 390, 123 123 buttons : [ CKEDITOR.dialog.cancelButton ], 124 124 onShow : function() -
CKEditor/trunk/_source/skins/default/dialog.css
r3231 r3276 10 10 } 11 11 12 .cke_skin_default .cke_dialog_tl, 13 .cke_skin_default .cke_dialog_t, 14 .cke_skin_default .cke_dialog_tr, 15 .cke_skin_default .cke_dialog_l, 16 .cke_skin_default .cke_dialog_c, 17 .cke_skin_default .cke_dialog_r, 18 .cke_skin_default .cke_dialog_bl, 19 .cke_skin_default .cke_dialog_b, 20 .cke_skin_default .cke_dialog_br 21 { 22 float: left; 23 } 24 25 .cke_skin_default .cke_dialog_tl, 26 .cke_skin_default .cke_dialog_l, 27 .cke_skin_default .cke_dialog_bl 28 { 29 clear: left; 12 .cke_skin_default .cke_dialog_body 13 { 14 margin-left: 16px; 15 margin-right: 16px; 16 margin-top: 2px; 17 margin-bottom: 20px; 18 position: relative; 19 z-index: 1; 30 20 } 31 21 32 22 .cke_skin_default .cke_dialog_tl, 33 23 .cke_skin_default .cke_dialog_tr, 34 .cke_skin_default .cke_dialog_l, 35 .cke_skin_default .cke_dialog_r 36 { 37 width: 16px; 38 } 39 40 .cke_skin_default .cke_dialog_tl, 41 .cke_skin_default .cke_dialog_t, 42 .cke_skin_default .cke_dialog_tr 43 { 44 height: 16px; 45 } 46 47 .cke_skin_default .cke_dialog_tl, 48 .cke_skin_default .cke_dialog_t, 49 .cke_skin_default .cke_dialog_tr, 24 .cke_skin_default .cke_dialog_tc, 50 25 .cke_skin_default .cke_dialog_bl, 51 .cke_skin_default .cke_dialog_b ,52 .cke_skin_default .cke_dialog_b r26 .cke_skin_default .cke_dialog_br, 27 .cke_skin_default .cke_dialog_bc 53 28 { 54 29 background-image: url(images/sprites.png); 30 background-repeat: no-repeat; 31 position: absolute; 32 55 33 /* IE6 does not support full color transparent PNG. */ 56 34 _background-image: url(images/sprites.gif); 57 background-repeat: no-repeat; 58 } 59 60 .cke_skin_default .cke_dialog_l, 61 .cke_skin_default .cke_dialog_r 35 } 36 37 .cke_skin_default .cke_dialog_tl 38 { 39 background-position: -16px -16px; 40 height: 16px; 41 width: 16px; 42 top: 0; 43 left: 0; 44 } 45 46 .cke_skin_default .cke_dialog_tr 47 { 48 background-position: -16px -76px; 49 height: 16px; 50 width: 16px; 51 top: 0; 52 right: 0; 53 } 54 55 .cke_skin_default .cke_dialog_tc 56 { 57 background-position: 0 -136px; 58 background-repeat: repeat-x; 59 height: 16px; 60 top: 0; 61 left: 16px; 62 right: 16px; 63 } 64 65 .cke_skin_default .cke_dialog_bl 66 { 67 background-position: -16px -196px; 68 height: 51px; 69 width: 30px; 70 bottom: 0; 71 left: 0; 72 } 73 74 .cke_skin_default .cke_dialog_br 75 { 76 background-position: -16px -263px; 77 height: 51px; 78 width: 30px; 79 bottom: 0; 80 right: 0; 81 } 82 83 .cke_skin_default .cke_dialog_bc 84 { 85 background-position: 0 -330px; 86 background-repeat: repeat-x; 87 height: 51px; 88 bottom: 0; 89 left: 30px; 90 right: 30px; 91 } 92 93 .cke_skin_default .cke_dialog_ml, 94 .cke_skin_default .cke_dialog_mr 62 95 { 63 96 background-image: url(images/dialog.sides.png); 97 background-repeat: repeat-y; 98 position: absolute; 99 width: 16px; 100 top: 16px; 101 bottom: 51px; 102 64 103 /* IE6 does not support full color transparent PNG. */ 65 104 _background-image: url(images/dialog.sides.gif); 66 background-repeat: repeat-y; 67 } 68 69 .cke_skin_default.cke_rtl .cke_dialog_l, 70 .cke_skin_default.cke_rtl .cke_dialog_r 71 { 72 background-image: url(images/dialog.sides.rtl.png); 73 _background-image: url(images/dialog.sides.gif); 74 } 75 76 .cke_skin_default .cke_dialog_bl, 77 .cke_skin_default .cke_dialog_b, 78 .cke_skin_default .cke_dialog_br 79 { 80 height: 51px; 81 } 82 83 .cke_skin_default .cke_dialog_bl, 84 .cke_skin_default .cke_dialog_br 85 { 86 width: 30px; 87 } 88 89 .cke_skin_default .cke_dialog_tl 90 { 91 background-position: -16px -16px; 92 } 93 94 .cke_skin_default.cke_rtl .cke_dialog_tl 95 { 96 background-position: -16px -397px; 97 } 98 99 .cke_skin_default .cke_dialog_tr 100 { 101 background-position: -16px -76px; 102 } 103 104 .cke_skin_default.cke_rtl .cke_dialog_tr 105 { 106 background-position: -16px -457px; 107 } 108 109 .cke_skin_default .cke_dialog_t 110 { 111 background-position: 0px -136px; 112 background-repeat: repeat-x; 113 } 114 115 .cke_skin_default .cke_dialog_l 116 { 117 background-position: 0px 0px; 118 } 119 120 .cke_skin_default .cke_dialog_r 121 { 122 background-position: -16px 0px; 123 } 124 125 .cke_skin_default .cke_dialog_bl 126 { 127 background-position: -16px -196px; 128 } 129 130 .cke_skin_default.cke_rtl .cke_dialog_bl 131 { 132 background-position: -16px -517px; 133 } 134 135 .cke_skin_default .cke_dialog_b 136 { 137 background-position: 0px -330px; 138 background-repeat: repeat-x; 139 } 140 141 .cke_skin_default .cke_dialog_br 142 { 143 background-position: -16px -263px; 144 } 145 146 .cke_skin_default.cke_rtl .cke_dialog_br 147 { 148 background-position: -16px -584px; 105 } 106 107 .cke_skin_default .cke_dialog_ml 108 { 109 background-position: 0 0; 110 left: 0; 111 } 112 113 .cke_skin_default .cke_dialog_mr 114 { 115 background-position: -16px 0; 116 right: 0; 117 } 118 119 .cke_skin_default .cke_browser_iequirks .cke_dialog_ml, 120 .cke_skin_default .cke_browser_iequirks .cke_dialog_mr 121 { 122 margin-top: 3px; 149 123 } 150 124 151 125 .cke_skin_default .cke_dialog_title 152 126 { 153 position: absolute;154 top: 2px;155 left: 16px;156 height: 23px;157 right: 16px;158 127 font-weight: bold; 159 128 font-size: 14pt; 160 129 color: #737357; 161 130 background-color: #e3e3c7; 162 padding: 3px 10px 3px 10px; 163 overflow: hidden; 131 padding: 3px 10px 26px 10px; 164 132 cursor: move; 165 } 166 167 .cke_skin_default .single_page .cke_dialog_tabs 168 { 169 display: none; 170 } 133 position: relative; 134 } 135 136 .cke_skin_default .cke_dialog_contents 137 { 138 background-color: #f1f1e3; 139 border: #d5d59d 1px solid; 140 overflow: auto; 141 padding: 5px 10px; 142 } 143 144 .cke_skin_default .cke_dialog_footer 145 { 146 background-color: #e3e3c7; 147 text-align: right; 148 } 149 150 /* tabs */ 171 151 172 152 .cke_skin_default .cke_dialog_tabs 173 153 { 154 height: 23px; 155 background-color: #e3e3c7; 156 float:left; 157 margin-left:10px; 158 margin-top:-23px; 174 159 position: absolute; 175 top: 31px; 176 left: 16px; 177 height: 23px; 178 right: 16px; 179 background-color: #e3e3c7; 180 z-index: 1; 181 border-collapse: separate; 182 } 183 184 .cke_skin_default.cke_browser_ie .cke_dialog_tabs 185 { 186 border-collapse: collapse; 187 } 188 189 .cke_skin_default .cke_dialog_tabs .head_filler 190 { 191 padding-left: 10px; 192 border-bottom: 1px solid #D5D59D; 193 line-height: 50%; 194 } 195 196 .cke_skin_default .cke_dialog_tabs .tail_filler 197 { 198 width: 100%; 199 border-bottom: 1px solid #D5D59D; 200 line-height: 50%; 201 } 202 203 .cke_skin_default .cke_dialog_contents 204 { 205 position: absolute; 206 background-color: #f1f1e3; 207 top: 54px; 208 left: 16px; 209 bottom: 51px; 210 right: 16px; 211 border: #d5d59d 1px solid; 212 border-top: none; 213 } 214 215 .cke_skin_default .single_page .cke_dialog_contents 216 { 217 top: 31px; 218 border-top: #d5d59d 1px solid; 219 } 220 221 .cke_skin_default .cke_dialog_footer 222 { 223 position: absolute; 224 background-color: #e3e3c7; 225 height: 31px; 226 left: 16px; 227 right: 16px; 228 bottom: 20px; 229 } 230 231 .cke_skin_default .cke_dialog_page_contents 232 { 233 position: absolute; 234 top: 0px; 235 bottom: 0px; 236 left: 0px; 237 right: 0px; 238 padding: 5px 10px; 239 } 240 241 .cke_skin_default .cke_dialog_tab_center 242 { 243 cursor: pointer; 244 } 245 246 .cke_skin_default .cke_dialog_tab 247 { 248 border-bottom: 1px solid #D5D59D; 249 } 250 251 .cke_skin_default .cke_dialog_tab_left, 252 .cke_skin_default .cke_dialog_tab_right 253 { 254 cursor: pointer; 255 } 256 257 .cke_skin_default .cke_dialog_tab_center 160 z-index: 2; 161 } 162 163 .cke_skin_default a.cke_dialog_tab, 164 .cke_skin_default a:link.cke_dialog_tab, 165 .cke_skin_default a:active.cke_dialog_tab, 166 .cke_skin_default a:hover.cke_dialog_tab, 167 .cke_skin_default a:visited.cke_dialog_tab 258 168 { 259 169 color: #737357; … … 261 171 border-right: 1px solid #d5d59d; 262 172 border-top: 1px solid #d5d59d; 263 height: 1 5px;173 height: 14px; 264 174 padding: 4px 5px; 265 } 266 267 .cke_skin_default.cke_browser_webkit.cke_mode_quirks .cke_dialog_tab_center 268 { 269 padding: 4px 5px 5px 5px; 270 } 271 272 .cke_skin_default.cke_browser_webkit.cke_mode_standards .cke_dialog_tab_center 273 { 274 padding: 4px 5px 2px 5px; 275 } 276 277 278 .cke_skin_default .cke_dialog_tab_selected 279 { 280 border-bottom: 1px solid #F1F1E3; 281 } 282 283 .cke_skin_default .cke_dialog_tab_selected .cke_dialog_tab_left, 284 .cke_skin_default .cke_dialog_tab_selected .cke_dialog_tab_center, 285 .cke_skin_default .cke_dialog_tab_selected .cke_dialog_tab_right 286 { 287 cursor: default; 288 } 289 290 .cke_skin_default .cke_dialog_tab_selected .cke_dialog_tab_center 291 { 175 display: block; 176 float: left; 177 cursor: pointer; 178 } 179 180 .cke_skin_default a:hover.cke_dialog_tab 181 { 182 background-color: #f1f1e3; 183 } 184 185 .cke_skin_default a.cke_dialog_tab_selected, 186 .cke_skin_default a:link.cke_dialog_tab_selected, 187 .cke_skin_default a:active.cke_dialog_tab_selected, 188 .cke_skin_default a:hover.cke_dialog_tab_selected, 189 .cke_skin_default a:visited.cke_dialog_tab_selected 190 { 191 border-bottom: 1px solid #f1f1e3; 292 192 background-color: #f1f1e3; 293 193 font-weight: bold; 194 cursor: default; 195 } 196 197 /* single_page */ 198 199 .cke_skin_default .cke_single_page .cke_dialog_tabs 200 { 201 display: none; 202 } 203 204 .cke_skin_default .cke_single_page .cke_dialog_title 205 { 206 padding-bottom: 3px; 294 207 } 295 208 … … 376 289 } 377 290 378 .cke_skin_default .cke_dialog_ui_button table 291 /* button */ 292 293 .cke_skin_default a.cke_dialog_ui_button 294 { 295 border-collapse: separate; 296 } 297 298 .cke_skin_default span.cke_dialog_ui_button 379 299 { 380 300 border: #737357 1px solid; 381 }382 383 .cke_skin_default .cke_dialog_ui_button.disabled table384 {385 border: #898980 1px solid;386 }387 388 .cke_skin_default .cke_dialog_ui_button_txt389 {390 301 padding: 2px 10px; 391 302 text-align: center; 392 303 color: #3b3b1f; 393 304 background-color: #c7c78f; 394 } 395 396 .cke_skin_default .cke_dialog_ui_button.disabled .cke_dialog_ui_button_txt 397 { 305 display: inline-block; 306 } 307 308 .cke_skin_default a.cke_dialog_ui_button span.cke_disabled 309 { 310 border: #898980 1px solid; 398 311 color: #5e5e55; 399 312 background-color: #c5c5b3; 400 313 } 401 314 402 .cke_skin_default a:focus .cke_dialog_ui_button .cke_dialog_ui_button_txt,403 .cke_skin_default a:active .cke_dialog_ui_button .cke_dialog_ui_button_txt315 .cke_skin_default a:focus span.cke_dialog_ui_button, 316 .cke_skin_default a:active span.cke_dialog_ui_button 404 317 { 405 318 background-color: #e3e3c7; 406 319 } 407 320 321 .cke_skin_default .cke_dialog_footer_buttons 322 { 323 display: inline-table; 324 margin-right: 12px; 325 width: auto; 326 position: relative; 327 } 328 329 .cke_skin_default .cke_dialog_footer_buttons span.cke_dialog_ui_button 330 { 331 width: 60px; 332 margin: 7px 0; 333 } 334 408 335 .cke_skin_default strong 409 336 { … … 411 338 } 412 339 413 .cke_skin_default .cke_dialog_footer_buttons 414 { 415 width: auto; 416 position: absolute; 417 right: 10px; 418 top: 7px; 419 } 420 421 .cke_skin_default.cke_rtl .cke_dialog_footer_buttons 422 { 423 right: auto; 424 left: 10px; 425 } 340 /* close_button */ 426 341 427 342 .cke_skin_default .cke_dialog_close_button 428 343 { 429 344 background-image: url(images/sprites.png); 430 /* IE6 does not support full color transparent PNG. */431 _background-image: url(images/sprites.gif);432 345 background-repeat: no-repeat; 433 346 background-position: -16px -651px; … … 438 351 right: 10px; 439 352 top: 5px; 353 354 _right: 22px; 355 356 /* IE6 does not support full color transparent PNG. */ 357 _background-image: url(images/sprites.gif); 440 358 } 441 359 … … 451 369 } 452 370 453 .cke_skin_default .cke_dialog_tl_resize,454 .cke_skin_default .cke_dialog_t_resize,455 .cke_skin_default .cke_dialog_tr_resize,456 .cke_skin_default .cke_dialog_bl_resize,457 .cke_skin_default .cke_dialog_b_resize,458 .cke_skin_default .cke_dialog_br_resize459 {460 position: absolute;461 height: 5px;462 overflow: hidden;463 background-color: transparent;464 }465 466 .cke_skin_default .cke_dialog_l_resize,467 .cke_skin_default .cke_dialog_r_resize468 {469 position: absolute;470 width: 5px;471 overflow: hidden;472 background-color: transparent;473 }474 475 .cke_skin_default .cke_dialog_tl_resize476 {477 width: 5px;478 left: 11px;479 top: -3px;480 cursor: nw-resize;481 }482 483 .cke_skin_default .cke_dialog_t_resize484 {485 left: 16px;486 top: -3px;487 cursor: n-resize;488 }489 490 .cke_skin_default .cke_dialog_tr_resize491 {492 width: 5px;493 right: 14px;494 top: -3px;495 cursor: ne-resize;496 }497 498 .cke_skin_default .cke_dialog_l_resize499 {500 top: 2px;501 left: 11px;502 cursor: w-resize;503 }504 505 .cke_skin_default .cke_dialog_r_resize506 {507 top: 2px;508 right: 14px;509 cursor: e-resize;510 }511 512 .cke_skin_default .cke_dialog_bl_resize513 {514 bottom: 18px;515 left: 11px;516 width: 5px;517 cursor: sw-resize;518 }519 520 .cke_skin_default .cke_dialog_b_resize521 {522 bottom: 18px;523 left: 16px;524 cursor: s-resize;525 }526 527 .cke_skin_default .cke_dialog_br_resize528 {529 bottom: 18px;530 right: 14px;531 width: 8px;532 height: 8px;533 cursor: se-resize;534 }535 536 371 .cke_skin_default .cke_dialog_ui_input_select 537 372 { … … 549 384 { 550 385 height: 25px; 551 }552 553 /*554 * Safari and Gecko on Mac actually distinguish between single-sided and555 * double-sided resize cursors. The double-sided resize cursors should be used.556 */557 .cke_skin_default.cke_browser_gecko .cke_dialog_tl_resize,558 .cke_skin_default.cke_browser_webkit .cke_dialog_tl_resize,559 .cke_skin_default.cke_browser_gecko .cke_dialog_br_resize,560 .cke_skin_default.cke_browser_webkit .cke_dialog_br_resize561 {562 cursor: nwse-resize;563 }564 565 .cke_skin_default.cke_browser_gecko .cke_dialog_tr_resize,566 .cke_skin_default.cke_browser_webkit .cke_dialog_tr_resize,567 .cke_skin_default.cke_browser_gecko .cke_dialog_bl_resize,568 .cke_skin_default.cke_browser_webkit .cke_dialog_bl_resize569 {570 cursor: nesw-resize;571 }572 573 .cke_skin_default.cke_browser_gecko .cke_dialog_l_resize,574 .cke_skin_default.cke_browser_webkit .cke_dialog_l_resize,575 .cke_skin_default.cke_browser_gecko .cke_dialog_r_resize,576 .cke_skin_default.cke_browser_webkit .cke_dialog_r_resize577 {578 cursor: ew-resize;579 }580 581 .cke_skin_default.cke_browser_gecko .cke_dialog_t_resize,582 .cke_skin_default.cke_browser_webkit .cke_dialog_t_resize,583 .cke_skin_default.cke_browser_gecko .cke_dialog_b_resize,584 .cke_skin_default.cke_browser_webkit .cke_dialog_b_resize585 {586 cursor: ns-resize;587 386 } 588 387 -
CKEditor/trunk/_source/skins/default/skin.js
r3260 r3276 7 7 { 8 8 var preload = []; 9 var dialogJs = [];10 9 11 if ( CKEDITOR.env.ie && CKEDITOR.env.version < = 6)10 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) 12 11 { 13 12 // For IE6, we need to preload some images, otherwhise they will be 14 13 // downloaded several times (CSS background bug). 15 14 preload.push( 'icons.gif', 'images/sprites.gif', 'images/dialog.sides.gif' ); 16 17 // The dialog must be fixed by code in IE6, as it doesn't support18 // several CSS features (absolute positioning).19 // dialogJs.push( 'dialog_ie6.js' );20 15 } 21 16 22 17 return { 23 preload : preload, 24 editor : { css : [ 'editor.css' ] }, 25 dialog : { css : [ 'dialog.css' ], js : dialogJs }, 26 templates : { css : [ 'templates.css' ] } 18 preload : preload, 19 editor : { css : [ 'editor.css' ] }, 20 dialog : { css : [ 'dialog.css' ] }, 21 templates : { css : [ 'templates.css' ] }, 22 margins : [ 0, 14, 18, 14 ] 27 23 }; 28 24 })() ); 29 25 30 (function()26 if ( CKEDITOR.dialog ) 31 27 { 32 // Define the function for resizing dialog parts at load to speed up 33 // the actual resize operation. 34 var skinName = 'default', 35 setSize = function( dialog, partName, width, height ) 28 CKEDITOR.dialog.on( 'resize', function( evt ) 36 29 { 37 var element = partName ? dialog.parts[partName] : dialog._.element.getFirst(); 38 if ( width ) 39 element.setStyle( 'width', width + 'px' ); 40 if ( height ) 41 element.setStyle( 'height', height + 'px' ); 42 }; 30 var data = evt.data, 31 width = data.width, 32 height = data.height, 33 dialog = data.dialog, 34 standardsMode = !CKEDITOR.env.quirk; 43 35 44 if ( CKEDITOR.dialog ) 45 { 46 CKEDITOR.dialog.setMargins( 0, 14, 18, 14 ); 36 if ( data.skin != 'default' ) 37 return; 47 38 48 CKEDITOR.dialog.on( 'resize', function( evt ) 49 { 50 var data = evt.data, 51 width = data.width, 52 height = data.height, 53 dialog = data.dialog, 54 standardsMode = ( CKEDITOR.document.$.compatMode == 'CSS1Compat' ); 55 if ( data.skin != skinName ) 56 return; 39 dialog.parts.contents.setStyles( 40 { 41 width : width + 'px', 42 height : height + 'px' 43 }); 57 44 58 // Dialog parts dimensions. 59 // 16x16 | ?x16 | 16x16 60 // 16x? | ?x? | 16x? 61 // 30x51 | ?x51 | 30x51 62 setSize( dialog, 't', width - 32, 16 ); 63 setSize( dialog, 't_resize', width - 32, null ); 64 setSize( dialog, 'l', 16, height - 67 ); 65 setSize( dialog, 'l_resize', null, height - 22 ); 66 setSize( dialog, 'c', width - 32, height - 67 ); 67 setSize( dialog, 'r', 16, height - 67 ); 68 setSize( dialog, 'r_resize', null, height - 22 ); 69 setSize( dialog, 'b', width - 60, 51 ); 70 setSize( dialog, 'b_resize', width - 32, null ); 71 setSize( dialog, 'tabs_table', width - 32, null ); 45 if ( !CKEDITOR.env.ie ) 46 return; 72 47 73 /* 74 * Although the following fix seems to be for IE6 only, it's also for IE7. 75 * While IE7 can render DIV nodes with left: and right: defined, it cannot 76 * put 100% height TABLES correctly inside those DIVs. Unless the width is 77 * set as well. 78 */ 79 if ( CKEDITOR.env.ie ) 48 // Fix the size of the elements which have flexible lengths. 49 setTimeout( function() 80 50 { 81 var content Width = width - 34,82 contentHeight = dialog.getPageCount() > 1 ? height - 106 : height - 84,83 contentsLength = dialog.parts.contents.getChildCount();51 var content = dialog.parts.contents, 52 body = content.getParent(), 53 innerDialog = body.getParent(); 84 54 85 if ( !standardsMode ) 86 { 87 contentWidth += 2; 88 contentHeight += 2; 89 dialog.parts.tabs.setStyle( 'top', '33px' ); 90 } 55 // tc 56 el = innerDialog.getChild( 2 ); 57 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 91 58 92 setSize( dialog, 'title', standardsMode ? width - 52 : width - 32, standardsMode ? null : 31 );93 setSize( dialog, 'contents', contentWidth, contentHeight);94 setSize( dialog, 'footer', width - 32);59 // bc 60 el = innerDialog.getChild( 7 ); 61 el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' ); 95 62 96 for ( var i = 0 ; i < contentsLength ; i++ ) 97 { 98 var child = dialog.parts.contents.getChild( i ); 99 if ( ( child instanceof CKEDITOR.dom.element ) && ( child.$.className || '' ).search( 'cke_dialog_page_contents' ) > -1 ) 100 child.setStyles( 101 { 102 width : contentWidth - ( standardsMode ? 20 : 0 ) + 'px', 103 height : contentHeight - ( standardsMode ? 20 : 0 ) + 'px' 104 } ); 105 } 106 } 63 // ml 64 el = innerDialog.getChild( 4 ); 65 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 107 66 108 setSize( dialog, null, width, height ); 109 }); 110 } 111 })(); 67 // mr 68 el = innerDialog.getChild( 5 ); 69 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 70 }, 71 0 ); 72 }); 73 } -
CKEditor/trunk/_source/themes/default/theme.js
r3260 r3276 113 113 114 114 var element = CKEDITOR.dom.element.createFromHtml( [ 115 '<div class="cke_skin_', editor.config.skin, ' ', browserCssClass, ' ', 116 CKEDITOR.document.$.compatMode == 'CSS1Compat' ? 'cke_mode_standards' : 'cke_mode_quirks', 115 '<div class="cke_skin_', editor.config.skin, 116 ' ', browserCssClass, 117 ' ', CKEDITOR.env.quirks ? 'cke_mode_quirks' : 'cke_mode_standards', 117 118 ' cke_', editor.lang.dir, 118 119 '" dir="', editor.lang.dir, '">' + 119 '<div id="%#" class="cke_dialog" style="position:', 120 ( CKEDITOR.env.ie6Compat ? 'absolute;' : 'fixed;' ), '">', 121 '<div>'+ 122 '<div id="%tl_#" class="%tl">' + 123 '<div id="%tl_resize_#" class="%tl_resize"></div>' + 124 '</div>' + 125 '<div id="%t_#" class="%t">' + 126 '<div id="%t_resize_#" class="%t_resize"></div>' + 127 '</div>' + 128 '<div id="%tr_#" class="%tr">' + 129 '<div id="%tr_resize_#" class="%tr_resize"></div>' + 130 '</div>' + 120 121 '<div class="cke_dialog" style="position:absolute">' + 122 '<div class="%body">' + 123 '<div id="%title#" class="%title"></div>' + 124 '<div id="%close_button#" class="%close_button"></div>' + 125 '<div id="%tabs#" class="%tabs"></div>' + 126 '<div id="%contents#" class="%contents"></div>' + 127 '<div id="%footer#" class="%footer"></div>' + 131 128 '</div>' + 132 '<div>' + 133 '<div id="%l_#" class="%l">' + 134 '<div id="%l_resize_#" class="%l_resize"></div>' + 135 '</div>' + 136 '<div id="%c_#" class="%c">' + 137 '<div id="%title_#" class="%title">' + 138 '<div id="%close_button_#" class="%close_button"></div>' + 139 '</div>' + 140 '<table id="%tabs_#" class="%tabs" cellpadding="0" border="0" cellspacing="0"><tbody><tr>' + 141 '<td class="head_filler"> </td>' + 142 '<td class="tail_filler"> </td>' + 143 '</tr></tbody></table>' + 144 '<div id="%contents_#" class="%contents"></div>' + 145 '<div id="%footer_#" class="%footer"></div>' + 146 '</div>' + 147 '<div id="%r_#" class="%r">' + 148 '<div id="%r_resize_#" class="%r_resize"></div>' + 149 '</div>' + 150 '</div>' + 151 '<div>' + 152 '<div id="%bl_#" class="%bl">' + 153 '<div id="%bl_resize_#" class="%bl_resize"></div>' + 154 '</div>' + 155 '<div id="%b_#" class="%b">' + 156 '<div id="%b_resize_#" class="%b_resize"></div>' + 157 '</div>' + 158 '<div id="%br_#" class="%br">' + 159 '<div id="%br_resize_#" class="%br_resize"></div>' + 160 '</div>' + 161 '</div>' + 129 '<div id="%tl#" class="%tl"></div>' + 130 '<div id="%tc#" class="%tc"></div>' + 131 '<div id="%tr#" class="%tr"></div>' + 132 '<div id="%ml#" class="%ml"></div>' + 133 '<div id="%mr#" class="%mr"></div>' + 134 '<div id="%bl#" class="%bl"></div>' + 135 '<div id="%bc#" class="%bc"></div>' + 136 '<div id="%br#" class="%br"></div>' + 162 137 '</div>', 138 163 139 //Hide the container when loading skins, later restored by skin css. 164 140 ( CKEDITOR.env.ie ? '' : '<style>.cke_dialog{visibility:hidden;}</style>' ), 141 165 142 '</div>' 166 143 ].join( '' ) 167 .replace( /#/g, baseIdNumber )144 .replace( /#/g, '_' + baseIdNumber ) 168 145 .replace( /%/g, 'cke_dialog_' ) ); 169 146 147 var body = element.getChild( [ 0, 0 ] ); 148 170 149 // Make the Title unselectable. 171 element.getChild( [0, 1, 1, 0] ).unselectable(); 150 body.getChild( 0 ).unselectable(); 151 172 152 173 153 return { 174 154 element : element, 175 titleId : 'cke_dialog_title_' + baseIdNumber, 176 contentsId : 'cke_dialog_contents_' + baseIdNumber, 177 footerId : 'cke_dialog_footer_' + baseIdNumber, 178 closeIds : [ 'cke_dialog_close_button_' + baseIdNumber ], 179 dragIds : [ 'cke_dialog_title_' + baseIdNumber, 'cke_dialog_tabs_' + baseIdNumber ] 155 parts : 156 { 157 dialog : element.getChild( 0 ), 158 title : body.getChild( 0 ), 159 close : body.getChild( 1 ), 160 tabs : body.getChild( 2 ), 161 contents : body.getChild( 3 ), 162 footer : body.getChild( 4 ) 163 } 180 164 }; 181 165 },
Note: See TracChangeset
for help on using the changeset viewer.
