Ticket #8124: 8124.patch

File 8124.patch, 2.4 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/dialog/plugin.js

     
    29392939                        integerRegex = /^\d*$/,
    29402940                        numberRegex = /^\d*(?:\.\d+)?$/,
    29412941                        htmlLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,
    2942                         cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i;
     2942                        cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
     2943                        inlineStyleRegex = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;
    29432944
    29442945                CKEDITOR.VALIDATE_OR = 1;
    29452946                CKEDITOR.VALIDATE_AND = 2;
     
    30313032                                return this.functions( function( val ){ return htmlLengthRegex.test( CKEDITOR.tools.trim( val ) ); }, msg );
    30323033                        },
    30333034
     3035                        'inlineStyle' : function( msg )
     3036                        {
     3037                                return this.functions( function( val ){ return inlineStyleRegex.test( CKEDITOR.tools.trim( val ) ); }, msg );
     3038                        },
     3039
    30343040                        equals : function( value, msg )
    30353041                        {
    30363042                                return this.functions( function( val ){ return val == value; }, msg );
  • _source/lang/en.js

     
    123123                invalidWidth    : 'Width must be a number.',
    124124                invalidCssLength        : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
    125125                invalidHtmlLength       : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',
     126                invalidInlineStyle      : 'Value specified for the inline style must be one or multiple tuples with the form "name : value" which are separated by semi-colon.',
    126127
    127128                // Put the voice-only part of the label in the span.
    128129                unavailable             : '%1<span class="cke_accessibility">, unavailable</span>'
  • _source/plugins/dialogadvtab/plugin.js

     
    132132                                                label : lang.styles,
    133133                                                'default' : '',
    134134
     135                                                validate : CKEDITOR.dialog.validate.inlineStyle( lang.invalidInlineStyle ),
    135136                                                onChange : function(){},
    136137
    137138                                                getStyle : function( name, defaultValue )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy