source: branches/2.2/filemanager/tp/ckeditor/_source/plugins/flash/dialogs/flash.js @ 3019

Revision 3019, 20.5 KB checked in by amuller, 14 years ago (diff)

Ticket #1135 - Corrigindo CSS e adicionando filemanager

Line 
1/*
2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6(function()
7{
8        /*
9         * It is possible to set things in three different places.
10         * 1. As attributes in the object tag.
11         * 2. As param tags under the object tag.
12         * 3. As attributes in the embed tag.
13         * It is possible for a single attribute to be present in more than one place.
14         * So let's define a mapping between a sementic attribute and its syntactic
15         * equivalents.
16         * Then we'll set and retrieve attribute values according to the mapping,
17         * instead of having to check and set each syntactic attribute every time.
18         *
19         * Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
20         */
21        var ATTRTYPE_OBJECT = 1,
22                ATTRTYPE_PARAM = 2,
23                ATTRTYPE_EMBED = 4;
24
25        var attributesMap =
26        {
27                id : [ { type : ATTRTYPE_OBJECT, name :  'id' } ],
28                classid : [ { type : ATTRTYPE_OBJECT, name : 'classid' } ],
29                codebase : [ { type : ATTRTYPE_OBJECT, name : 'codebase'} ],
30                pluginspage : [ { type : ATTRTYPE_EMBED, name : 'pluginspage' } ],
31                src : [ { type : ATTRTYPE_PARAM, name : 'movie' }, { type : ATTRTYPE_EMBED, name : 'src' } ],
32                name : [ { type : ATTRTYPE_EMBED, name : 'name' } ],
33                align : [ { type : ATTRTYPE_OBJECT, name : 'align' } ],
34                title : [ { type : ATTRTYPE_OBJECT, name : 'title' }, { type : ATTRTYPE_EMBED, name : 'title' } ],
35                'class' : [ { type : ATTRTYPE_OBJECT, name : 'class' }, { type : ATTRTYPE_EMBED, name : 'class'} ],
36                width : [ { type : ATTRTYPE_OBJECT, name : 'width' }, { type : ATTRTYPE_EMBED, name : 'width' } ],
37                height : [ { type : ATTRTYPE_OBJECT, name : 'height' }, { type : ATTRTYPE_EMBED, name : 'height' } ],
38                hSpace : [ { type : ATTRTYPE_OBJECT, name : 'hSpace' }, { type : ATTRTYPE_EMBED, name : 'hSpace' } ],
39                vSpace : [ { type : ATTRTYPE_OBJECT, name : 'vSpace' }, { type : ATTRTYPE_EMBED, name : 'vSpace' } ],
40                style : [ { type : ATTRTYPE_OBJECT, name : 'style' }, { type : ATTRTYPE_EMBED, name : 'style' } ],
41                type : [ { type : ATTRTYPE_EMBED, name : 'type' } ]
42        };
43
44        var names = [ 'play', 'loop', 'menu', 'quality', 'scale', 'salign', 'wmode', 'bgcolor', 'base', 'flashvars', 'allowScriptAccess',
45                'allowFullScreen' ];
46        for ( var i = 0 ; i < names.length ; i++ )
47                attributesMap[ names[i] ] = [ { type : ATTRTYPE_EMBED, name : names[i] }, { type : ATTRTYPE_PARAM, name : names[i] } ];
48        names = [ 'allowFullScreen', 'play', 'loop', 'menu' ];
49        for ( i = 0 ; i < names.length ; i++ )
50                attributesMap[ names[i] ][0]['default'] = attributesMap[ names[i] ][1]['default'] = true;
51
52        function loadValue( objectNode, embedNode, paramMap )
53        {
54                var attributes = attributesMap[ this.id ];
55                if ( !attributes )
56                        return;
57
58                var isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
59                for ( var i = 0 ; i < attributes.length ; i++ )
60                {
61                        var attrDef = attributes[ i ];
62                        switch ( attrDef.type )
63                        {
64                                case ATTRTYPE_OBJECT:
65                                        if ( !objectNode )
66                                                continue;
67                                        if ( objectNode.getAttribute( attrDef.name ) !== null )
68                                        {
69                                                var value = objectNode.getAttribute( attrDef.name );
70                                                if ( isCheckbox )
71                                                        this.setValue( value.toLowerCase() == 'true' );
72                                                else
73                                                        this.setValue( value );
74                                                return;
75                                        }
76                                        else if ( isCheckbox )
77                                                this.setValue( !!attrDef[ 'default' ] );
78                                        break;
79                                case ATTRTYPE_PARAM:
80                                        if ( !objectNode )
81                                                continue;
82                                        if ( attrDef.name in paramMap )
83                                        {
84                                                value = paramMap[ attrDef.name ];
85                                                if ( isCheckbox )
86                                                        this.setValue( value.toLowerCase() == 'true' );
87                                                else
88                                                        this.setValue( value );
89                                                return;
90                                        }
91                                        else if ( isCheckbox )
92                                                this.setValue( !!attrDef[ 'default' ] );
93                                        break;
94                                case ATTRTYPE_EMBED:
95                                        if ( !embedNode )
96                                                continue;
97                                        if ( embedNode.getAttribute( attrDef.name ) )
98                                        {
99                                                value = embedNode.getAttribute( attrDef.name );
100                                                if ( isCheckbox )
101                                                        this.setValue( value.toLowerCase() == 'true' );
102                                                else
103                                                        this.setValue( value );
104                                                return;
105                                        }
106                                        else if ( isCheckbox )
107                                                this.setValue( !!attrDef[ 'default' ] );
108                        }
109                }
110        }
111
112        function commitValue( objectNode, embedNode, paramMap )
113        {
114                var attributes = attributesMap[ this.id ];
115                if ( !attributes )
116                        return;
117
118                var isRemove = ( this.getValue() === '' ),
119                        isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
120
121                for ( var i = 0 ; i < attributes.length ; i++ )
122                {
123                        var attrDef = attributes[i];
124                        switch ( attrDef.type )
125                        {
126                                case ATTRTYPE_OBJECT:
127                                        if ( !objectNode )
128                                                continue;
129                                        var value = this.getValue();
130                                        if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
131                                                objectNode.removeAttribute( attrDef.name );
132                                        else
133                                                objectNode.setAttribute( attrDef.name, value );
134                                        break;
135                                case ATTRTYPE_PARAM:
136                                        if ( !objectNode )
137                                                continue;
138                                        value = this.getValue();
139                                        if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
140                                        {
141                                                if ( attrDef.name in paramMap )
142                                                        paramMap[ attrDef.name ].remove();
143                                        }
144                                        else
145                                        {
146                                                if ( attrDef.name in paramMap )
147                                                        paramMap[ attrDef.name ].setAttribute( 'value', value );
148                                                else
149                                                {
150                                                        var param = CKEDITOR.dom.element.createFromHtml( '<cke:param></cke:param>', objectNode.getDocument() );
151                                                        param.setAttributes( { name : attrDef.name, value : value } );
152                                                        if ( objectNode.getChildCount() < 1 )
153                                                                param.appendTo( objectNode );
154                                                        else
155                                                                param.insertBefore( objectNode.getFirst() );
156                                                }
157                                        }
158                                        break;
159                                case ATTRTYPE_EMBED:
160                                        if ( !embedNode )
161                                                continue;
162                                        value = this.getValue();
163                                        if ( isRemove || isCheckbox && value === attrDef[ 'default' ])
164                                                embedNode.removeAttribute( attrDef.name );
165                                        else
166                                                embedNode.setAttribute( attrDef.name, value );
167                        }
168                }
169        }
170
171        CKEDITOR.dialog.add( 'flash', function( editor )
172        {
173                var makeObjectTag = !editor.config.flashEmbedTagOnly,
174                        makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly;
175
176                var previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' +
177                        '<div id="FlashPreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>' +
178                        '<div id="FlashPreviewBox"></div></div>';
179
180                return {
181                        title : editor.lang.flash.title,
182                        minWidth : 420,
183                        minHeight : 310,
184                        onShow : function()
185                        {
186                                // Clear previously saved elements.
187                                this.fakeImage = this.objectNode = this.embedNode = null;
188
189                                // Try to detect any embed or object tag that has Flash parameters.
190                                var fakeImage = this.getSelectedElement();
191                                if ( fakeImage && fakeImage.getAttribute( '_cke_real_element_type' ) && fakeImage.getAttribute( '_cke_real_element_type' ) == 'flash' )
192                                {
193                                        this.fakeImage = fakeImage;
194
195                                        var realElement = editor.restoreRealElement( fakeImage ),
196                                                objectNode = null, embedNode = null, paramMap = {};
197                                        if ( realElement.getName() == 'cke:object' )
198                                        {
199                                                objectNode = realElement;
200                                                var embedList = objectNode.getElementsByTag( 'embed', 'cke' );
201                                                if ( embedList.count() > 0 )
202                                                        embedNode = embedList.getItem( 0 );
203                                                var paramList = objectNode.getElementsByTag( 'param', 'cke' );
204                                                for ( var i = 0, length = paramList.count() ; i < length ; i++ )
205                                                {
206                                                        var item = paramList.getItem( i ),
207                                                                name = item.getAttribute( 'name' ),
208                                                                value = item.getAttribute( 'value' );
209                                                        paramMap[ name ] = value;
210                                                }
211                                        }
212                                        else if ( realElement.getName() == 'cke:embed' )
213                                                embedNode = realElement;
214
215                                        this.objectNode = objectNode;
216                                        this.embedNode = embedNode;
217
218                                        this.setupContent( objectNode, embedNode, paramMap, fakeImage );
219                                }
220                        },
221                        onOk : function()
222                        {
223                                // If there's no selected object or embed, create one. Otherwise, reuse the
224                                // selected object and embed nodes.
225                                var objectNode = null,
226                                        embedNode = null,
227                                        paramMap = null;
228                                if ( !this.fakeImage )
229                                {
230                                        if ( makeObjectTag )
231                                        {
232                                                objectNode = CKEDITOR.dom.element.createFromHtml( '<cke:object></cke:object>', editor.document );
233                                                var attributes = {
234                                                        classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
235                                                        codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
236                                                };
237                                                objectNode.setAttributes( attributes );
238                                        }
239                                        if ( makeEmbedTag )
240                                        {
241                                                embedNode = CKEDITOR.dom.element.createFromHtml( '<cke:embed></cke:embed>', editor.document );
242                                                embedNode.setAttributes(
243                                                        {
244                                                                type : 'application/x-shockwave-flash',
245                                                                pluginspage : 'http://www.macromedia.com/go/getflashplayer'
246                                                        } );
247                                                if ( objectNode )
248                                                        embedNode.appendTo( objectNode );
249                                        }
250                                }
251                                else
252                                {
253                                        objectNode = this.objectNode;
254                                        embedNode = this.embedNode;
255                                }
256
257                                // Produce the paramMap if there's an object tag.
258                                if ( objectNode )
259                                {
260                                        paramMap = {};
261                                        var paramList = objectNode.getElementsByTag( 'param', 'cke' );
262                                        for ( var i = 0, length = paramList.count() ; i < length ; i++ )
263                                                paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
264                                }
265
266                                // Apply or remove flash parameters.
267                                var extraStyles = {};
268                                this.commitContent( objectNode, embedNode, paramMap, extraStyles );
269
270                                // Refresh the fake image.
271                                var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
272                                newFakeImage.setStyles( extraStyles );
273                                if ( this.fakeImage )
274                                        newFakeImage.replace( this.fakeImage );
275                                else
276                                        editor.insertElement( newFakeImage );
277                        },
278
279                        onHide : function()
280                        {
281                                if ( this.preview )
282                                        this.preview.setHtml('');
283                        },
284
285                        contents : [
286                                {
287                                        id : 'info',
288                                        label : editor.lang.common.generalTab,
289                                        accessKey : 'I',
290                                        elements :
291                                        [
292                                                {
293                                                        type : 'vbox',
294                                                        padding : 0,
295                                                        children :
296                                                        [
297                                                                {
298                                                                        type : 'html',
299                                                                        html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.image.url ) + '</span>'
300                                                                },
301                                                                {
302                                                                        type : 'hbox',
303                                                                        widths : [ '280px', '110px' ],
304                                                                        align : 'right',
305                                                                        children :
306                                                                        [
307                                                                                {
308                                                                                        id : 'src',
309                                                                                        type : 'text',
310                                                                                        label : '',
311                                                                                        validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ),
312                                                                                        setup : loadValue,
313                                                                                        commit : commitValue,
314                                                                                        onLoad : function()
315                                                                                        {
316                                                                                                var dialog = this.getDialog(),
317                                                                                                updatePreview = function( src ){
318
319                                                                                                        dialog.preview.setHtml( '<embed height="100%" width="100%" src="'
320                                                                                                                + CKEDITOR.tools.htmlEncode( src )
321                                                                                                                + '" type="application/x-shockwave-flash"></embed>' );
322                                                                                                };
323                                                                                                // Preview element
324                                                                                                dialog.preview = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 );
325
326                                                                                                // Sync on inital value loaded.
327                                                                                                this.on( 'change', function( evt ){
328
329                                                                                                                if ( evt.data && evt.data.value )
330                                                                                                                        updatePreview( evt.data.value );
331                                                                                                        } );
332                                                                                                // Sync when input value changed.
333                                                                                                this.getInputElement().on( 'change', function( evt ){
334
335                                                                                                        updatePreview( this.getValue() );
336                                                                                                }, this );
337                                                                                        }
338                                                                                },
339                                                                                {
340                                                                                        type : 'button',
341                                                                                        id : 'browse',
342                                                                                        filebrowser : 'info:src',
343                                                                                        hidden : true,
344                                                                                        align : 'center',
345                                                                                        label : editor.lang.common.browseServer
346                                                                                }
347                                                                        ]
348                                                                }
349                                                        ]
350                                                },
351                                                {
352                                                        type : 'hbox',
353                                                        widths : [ '25%', '25%', '25%', '25%', '25%' ],
354                                                        children :
355                                                        [
356                                                                {
357                                                                        type : 'text',
358                                                                        id : 'width',
359                                                                        style : 'width:95px',
360                                                                        label : editor.lang.flash.width,
361                                                                        validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateWidth ),
362                                                                        setup : function( objectNode, embedNode, paramMap, fakeImage )
363                                                                        {
364                                                                                loadValue.apply( this, arguments );
365                                                                                if ( fakeImage )
366                                                                                {
367                                                                                        var fakeImageWidth = parseInt( fakeImage.$.style.width, 10 );
368                                                                                        if ( !isNaN( fakeImageWidth ) )
369                                                                                                this.setValue( fakeImageWidth );
370                                                                                }
371                                                                        },
372                                                                        commit : function( objectNode, embedNode, paramMap, extraStyles )
373                                                                        {
374                                                                                commitValue.apply( this, arguments );
375                                                                                if ( this.getValue() )
376                                                                                        extraStyles.width = this.getValue() + 'px';
377                                                                        }
378                                                                },
379                                                                {
380                                                                        type : 'text',
381                                                                        id : 'height',
382                                                                        style : 'width:95px',
383                                                                        label : editor.lang.flash.height,
384                                                                        validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHeight ),
385                                                                        setup : function( objectNode, embedNode, paramMap, fakeImage )
386                                                                        {
387                                                                                loadValue.apply( this, arguments );
388                                                                                if ( fakeImage )
389                                                                                {
390                                                                                        var fakeImageHeight = parseInt( fakeImage.$.style.height, 10 );
391                                                                                        if ( !isNaN( fakeImageHeight ) )
392                                                                                                this.setValue( fakeImageHeight );
393                                                                                }
394                                                                        },
395                                                                        commit : function( objectNode, embedNode, paramMap, extraStyles )
396                                                                        {
397                                                                                commitValue.apply( this, arguments );
398                                                                                if ( this.getValue() )
399                                                                                        extraStyles.height = this.getValue() + 'px';
400                                                                        }
401                                                                },
402                                                                {
403                                                                        type : 'text',
404                                                                        id : 'hSpace',
405                                                                        style : 'width:95px',
406                                                                        label : editor.lang.flash.hSpace,
407                                                                        validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHSpace ),
408                                                                        setup : loadValue,
409                                                                        commit : commitValue
410                                                                },
411                                                                {
412                                                                        type : 'text',
413                                                                        id : 'vSpace',
414                                                                        style : 'width:95px',
415                                                                        label : editor.lang.flash.vSpace,
416                                                                        validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateVSpace ),
417                                                                        setup : loadValue,
418                                                                        commit : commitValue
419                                                                }
420                                                        ]
421                                                },
422
423                                                {
424                                                        type : 'vbox',
425                                                        children :
426                                                        [
427                                                                {
428                                                                        type : 'html',
429                                                                        id : 'preview',
430                                                                        style : 'width:95%;',
431                                                                        html : previewAreaHtml
432                                                                }
433                                                        ]
434                                                }
435                                        ]
436                                },
437                                {
438                                        id : 'Upload',
439                                        hidden : true,
440                                        filebrowser : 'uploadButton',
441                                        label : editor.lang.common.upload,
442                                        elements :
443                                        [
444                                                {
445                                                        type : 'file',
446                                                        id : 'upload',
447                                                        label : editor.lang.common.upload,
448                                                        size : 38
449                                                },
450                                                {
451                                                        type : 'fileButton',
452                                                        id : 'uploadButton',
453                                                        label : editor.lang.common.uploadSubmit,
454                                                        filebrowser : 'info:src',
455                                                        'for' : [ 'Upload', 'upload' ]
456                                                }
457                                        ]
458                                },
459                                {
460                                        id : 'properties',
461                                        label : editor.lang.flash.propertiesTab,
462                                        elements :
463                                        [
464                                                {
465                                                        type : 'hbox',
466                                                        widths : [ '50%', '50%' ],
467                                                        children :
468                                                        [
469                                                                {
470                                                                        id : 'scale',
471                                                                        type : 'select',
472                                                                        label : editor.lang.flash.scale,
473                                                                        'default' : '',
474                                                                        style : 'width : 100%;',
475                                                                        items :
476                                                                        [
477                                                                                [ editor.lang.common.notSet , ''],
478                                                                                [ editor.lang.flash.scaleAll, 'showall' ],
479                                                                                [ editor.lang.flash.scaleNoBorder, 'noborder' ],
480                                                                                [ editor.lang.flash.scaleFit, 'exactfit' ]
481                                                                        ],
482                                                                        setup : loadValue,
483                                                                        commit : commitValue
484                                                                },
485                                                                {
486                                                                        id : 'allowScriptAccess',
487                                                                        type : 'select',
488                                                                        label : editor.lang.flash.access,
489                                                                        'default' : '',
490                                                                        style : 'width : 100%;',
491                                                                        items :
492                                                                        [
493                                                                                [ editor.lang.common.notSet , ''],
494                                                                                [ editor.lang.flash.accessAlways, 'always' ],
495                                                                                [ editor.lang.flash.accessSameDomain, 'samedomain' ],
496                                                                                [ editor.lang.flash.accessNever, 'never' ]
497                                                                        ],
498                                                                        setup : loadValue,
499                                                                        commit : commitValue
500                                                                }
501                                                        ]
502                                                },
503                                                {
504                                                        type : 'hbox',
505                                                        widths : [ '50%', '50%' ],
506                                                        children :
507                                                        [
508                                                                {
509                                                                        id : 'wmode',
510                                                                        type : 'select',
511                                                                        label : editor.lang.flash.windowMode,
512                                                                        'default' : '',
513                                                                        style : 'width : 100%;',
514                                                                        items :
515                                                                        [
516                                                                                [ editor.lang.common.notSet , '' ],
517                                                                                [ editor.lang.flash.windowModeWindow, 'window' ],
518                                                                                [ editor.lang.flash.windowModeOpaque, 'opaque' ],
519                                                                                [ editor.lang.flash.windowModeTransparent, 'transparent' ]
520                                                                        ],
521                                                                        setup : loadValue,
522                                                                        commit : commitValue
523                                                                },
524                                                                {
525                                                                        id : 'quality',
526                                                                        type : 'select',
527                                                                        label : editor.lang.flash.quality,
528                                                                        'default' : 'high',
529                                                                        style : 'width : 100%;',
530                                                                        items :
531                                                                        [
532                                                                                [ editor.lang.common.notSet , '' ],
533                                                                                [ editor.lang.flash.qualityBest, 'best' ],
534                                                                                [ editor.lang.flash.qualityHigh, 'high' ],
535                                                                                [ editor.lang.flash.qualityAutoHigh, 'autohigh' ],
536                                                                                [ editor.lang.flash.qualityMedium, 'medium' ],
537                                                                                [ editor.lang.flash.qualityAutoLow, 'autolow' ],
538                                                                                [ editor.lang.flash.qualityLow, 'low' ]
539                                                                        ],
540                                                                        setup : loadValue,
541                                                                        commit : commitValue
542                                                                }
543                                                        ]
544                                                },
545                                                {
546                                                        type : 'hbox',
547                                                        widths : [ '50%', '50%' ],
548                                                        children :
549                                                        [
550                                                                {
551                                                                        id : 'align',
552                                                                        type : 'select',
553                                                                        label : editor.lang.flash.align,
554                                                                        'default' : '',
555                                                                        style : 'width : 100%;',
556                                                                        items :
557                                                                        [
558                                                                                [ editor.lang.common.notSet , ''],
559                                                                                [ editor.lang.image.alignLeft , 'left'],
560                                                                                [ editor.lang.image.alignAbsBottom , 'absBottom'],
561                                                                                [ editor.lang.image.alignAbsMiddle , 'absMiddle'],
562                                                                                [ editor.lang.image.alignBaseline , 'baseline'],
563                                                                                [ editor.lang.image.alignBottom , 'bottom'],
564                                                                                [ editor.lang.image.alignMiddle , 'middle'],
565                                                                                [ editor.lang.image.alignRight , 'right'],
566                                                                                [ editor.lang.image.alignTextTop , 'textTop'],
567                                                                                [ editor.lang.image.alignTop , 'top']
568                                                                        ],
569                                                                        setup : loadValue,
570                                                                        commit : commitValue
571                                                                },
572                                                                {
573                                                                        type : 'html',
574                                                                        html : '<div></div>'
575                                                                }
576                                                        ]
577                                                },
578                                                {
579                                                        type : 'vbox',
580                                                        padding : 0,
581                                                        children :
582                                                        [
583                                                                {
584                                                                        type : 'html',
585                                                                        html : CKEDITOR.tools.htmlEncode( editor.lang.flash.flashvars )
586                                                                },
587                                                                {
588                                                                        type : 'checkbox',
589                                                                        id : 'menu',
590                                                                        label : editor.lang.flash.chkMenu,
591                                                                        'default' : true,
592                                                                        setup : loadValue,
593                                                                        commit : commitValue
594                                                                },
595                                                                {
596                                                                        type : 'checkbox',
597                                                                        id : 'play',
598                                                                        label : editor.lang.flash.chkPlay,
599                                                                        'default' : true,
600                                                                        setup : loadValue,
601                                                                        commit : commitValue
602                                                                },
603                                                                {
604                                                                        type : 'checkbox',
605                                                                        id : 'loop',
606                                                                        label : editor.lang.flash.chkLoop,
607                                                                        'default' : true,
608                                                                        setup : loadValue,
609                                                                        commit : commitValue
610                                                                },
611                                                                {
612                                                                        type : 'checkbox',
613                                                                        id : 'allowFullScreen',
614                                                                        label : editor.lang.flash.chkFull,
615                                                                        'default' : true,
616                                                                        setup : loadValue,
617                                                                        commit : commitValue
618                                                                }
619                                                        ]
620                                                }
621                                        ]
622                                },
623                                {
624                                        id : 'advanced',
625                                        label : editor.lang.common.advancedTab,
626                                        elements :
627                                        [
628                                                {
629                                                        type : 'hbox',
630                                                        widths : [ '45%', '55%' ],
631                                                        children :
632                                                        [
633                                                                {
634                                                                        type : 'text',
635                                                                        id : 'id',
636                                                                        label : editor.lang.common.id,
637                                                                        setup : loadValue,
638                                                                        commit : commitValue
639                                                                },
640                                                                {
641                                                                        type : 'text',
642                                                                        id : 'title',
643                                                                        label : editor.lang.common.advisoryTitle,
644                                                                        setup : loadValue,
645                                                                        commit : commitValue
646                                                                }
647                                                        ]
648                                                },
649                                                {
650                                                        type : 'hbox',
651                                                        widths : [ '45%', '55%' ],
652                                                        children :
653                                                        [
654                                                                {
655                                                                        type : 'text',
656                                                                        id : 'bgcolor',
657                                                                        label : editor.lang.flash.bgcolor,
658                                                                        setup : loadValue,
659                                                                        commit : commitValue
660                                                                },
661                                                                {
662                                                                        type : 'text',
663                                                                        id : 'class',
664                                                                        label : editor.lang.common.cssClass,
665                                                                        setup : loadValue,
666                                                                        commit : commitValue
667                                                                }
668                                                        ]
669                                                },
670                                                {
671                                                        type : 'text',
672                                                        id : 'style',
673                                                        label : editor.lang.common.cssStyle,
674                                                        setup : loadValue,
675                                                        commit : commitValue
676                                                }
677                                        ]
678                                }
679                        ]
680                };
681        } );
682})();
Note: See TracBrowser for help on using the repository browser.