Ticket #4583: 4583.patch

File 4583.patch, 1.5 KB (added by Minh Nguyen, 14 years ago)
  • _source/plugins/link/dialogs/link.js

     
    22Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
    5 
    65CKEDITOR.dialog.add( 'link', function( editor )
    76{
    87        // Handles the event when the "Target" selection box is changed.
     
    1716                        return;
    1817
    1918                popupFeatures = popupFeatures.getElement();
    20 
    21                 if ( value == 'popup' )
     19               
     20                popupFeatures.hide();
     21                targetName.setValue( '' );
     22               
     23                switch ( value )
    2224                {
    23                         popupFeatures.show();
    24                         targetName.setLabel( editor.lang.link.targetPopupName );
     25                        case 'frame' :
     26                                targetName.setLabel( editor.lang.link.targetFrameName );
     27                                targetName.getElement().show();
     28                                break;
     29                        case 'popup' :
     30                                popupFeatures.show();
     31                                targetName.setLabel( editor.lang.link.targetPopupName );
     32                                targetName.getElement().show();
     33                                break;
     34                        default :
     35                                targetName.setValue( value );
     36                                targetName.getElement().hide();
     37                                break;
     38                       
    2539                }
    26                 else
    27                 {
    28                         popupFeatures.hide();
    29                         targetName.setLabel( editor.lang.link.targetFrameName );
    30                         this.getDialog().setValueOf( 'target', 'linkTargetName', value.charAt( 0 ) == '_' ? value : '' );
    31                 }
    3240        };
    3341
    3442        // Handles the event when the "Type" selection box is changed.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy