]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blob - sources/plugins/html5audio/dialogs/html5audio.js
Update to 4.7.3
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / plugins / html5audio / dialogs / html5audio.js
1 CKEDITOR.dialog.add( 'html5audio', function( editor ) {
2 return {
3 title: editor.lang.html5audio.title,
4 minWidth: 500,
5 minHeight: 100,
6 contents: [ {
7 id: 'info',
8 label: editor.lang.html5audio.infoLabel,
9 elements: [ {
10 type: 'vbox',
11 padding: 0,
12 children: [ {
13 type: 'hbox',
14 widths: [ '365px', '110px' ],
15 align: 'right',
16 children: [ {
17 type: 'text',
18 id: 'url',
19 label: editor.lang.common.url,
20 required: true,
21 validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5audio.urlMissing ),
22 setup: function( widget ) {
23 this.setValue( widget.data.src );
24 },
25 commit: function( widget ) {
26 widget.setData( 'src', this.getValue() );
27 }
28 },
29 {
30 type: 'button',
31 id: 'browse',
32 // v-align with the 'txtUrl' field.
33 // TODO: We need something better than a fixed size here.
34 style: 'display:inline-block;margin-top:14px;',
35 align: 'center',
36 label: editor.lang.common.browseServer,
37 hidden: true,
38 filebrowser: 'info:url'
39 } ]
40 } ]
41 },
42 {
43 type: 'hbox',
44 id: 'alignment',
45 children: [ {
46 type: 'radio',
47 id: 'align',
48 label: editor.lang.common.align,
49 items: [
50 [editor.lang.common.alignCenter, 'center'],
51 [editor.lang.common.alignLeft, 'left'],
52 [editor.lang.common.alignRight, 'right'],
53 [editor.lang.common.alignNone, 'none']
54 ],
55 'default': 'center',
56 setup: function( widget ) {
57 if ( widget.data.align ) {
58 this.setValue( widget.data.align );
59 }
60 },
61 commit: function( widget ) {
62 widget.setData( 'align', this.getValue() );
63 }
64 } ]
65 } ]
66 },
67 {
68 id: 'Upload',
69 hidden: true,
70 filebrowser: 'uploadButton',
71 label: editor.lang.html5audio.upload,
72 elements: [ {
73 type: 'file',
74 id: 'upload',
75 label: editor.lang.html5audio.btnUpload,
76 style: 'height:40px',
77 size: 38
78 },
79 {
80 type: 'fileButton',
81 id: 'uploadButton',
82 filebrowser: 'info:url',
83 label: editor.lang.html5audio.btnUpload,
84 'for': [ 'Upload', 'upload' ]
85 } ]
86 },
87 {
88 id: 'advanced',
89 label: editor.lang.html5audio.advanced,
90 elements: [ {
91 type: 'vbox',
92 padding: 0,
93 children: [ {
94 type: 'hbox',
95 children: [ {
96 type: 'radio',
97 id: 'autoplay',
98 label: editor.lang.html5audio.autoplay,
99 items: [
100 [editor.lang.html5audio.yes, 'yes'],
101 [editor.lang.html5audio.no, 'no']
102 ],
103 'default': 'no',
104 setup: function( widget ) {
105 if ( widget.data.autoplay ) {
106 this.setValue( widget.data.autoplay );
107 }
108 },
109 commit: function( widget ) {
110 widget.setData( 'autoplay', this.getValue() );
111 }
112 },
113 {
114 type: 'radio',
115 id: 'allowdownload',
116 label: editor.lang.html5audio.allowdownload,
117 items: [
118 [editor.lang.html5audio.yes, 'yes'],
119 [editor.lang.html5audio.no, 'no']
120 ],
121 'default': 'no',
122 setup: function( widget ) {
123 if ( widget.data.allowdownload ) {
124 this.setValue(widget.data.allowdownload);
125 }
126 },
127 commit: function( widget ) {
128 widget.setData( 'allowdownload', this.getValue() );
129 }
130 } ]
131 } ]
132 } ]
133 } ]
134 };
135 } );