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