--- /dev/null
+CKEDITOR.dialog.add( 'html5video', function( editor ) {\r
+ return {\r
+ title: editor.lang.html5video.title,\r
+ minWidth: 500,\r
+ minHeight: 100,\r
+ contents: [ {\r
+ id: 'info',\r
+ label: editor.lang.html5video.infoLabel,\r
+ elements: [ {\r
+ type: 'vbox',\r
+ padding: 0,\r
+ children: [\r
+ {\r
+ type: 'hbox',\r
+ widths: [ '365px', '110px' ],\r
+ align: 'right',\r
+ children: [ {\r
+ type: 'text',\r
+ id: 'url',\r
+ label: editor.lang.html5video.allowed,\r
+ required: true,\r
+ validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5video.urlMissing ),\r
+ setup: function( widget ) {\r
+ this.setValue( widget.data.src );\r
+ },\r
+ commit: function( widget ) {\r
+ widget.setData( 'src', this.getValue() );\r
+ }\r
+ },\r
+ {\r
+ type: 'button',\r
+ id: 'browse',\r
+ // v-align with the 'txtUrl' field.\r
+ // TODO: We need something better than a fixed size here.\r
+ style: 'display:inline-block;margin-top:14px;',\r
+ align: 'center',\r
+ label: editor.lang.common.browseServer,\r
+ hidden: true,\r
+ filebrowser: 'info:url'\r
+ } ]\r
+ } ]\r
+ },\r
+ {\r
+ type: 'hbox',\r
+ id: 'size',\r
+ children: [ {\r
+ type: 'text',\r
+ id: 'width',\r
+ label: editor.lang.common.width,\r
+ 'default': 400,\r
+ setup: function( widget ) {\r
+ if ( widget.data.width ) {\r
+ this.setValue( widget.data.width );\r
+ }\r
+ },\r
+ commit: function( widget ) {\r
+ widget.setData( 'width', this.getValue() );\r
+ }\r
+ },\r
+ {\r
+ type: 'text',\r
+ id: 'height',\r
+ label: editor.lang.common.height,\r
+ 'default': 300,\r
+ setup: function( widget ) {\r
+ if ( widget.data.height ) {\r
+ this.setValue( widget.data.height );\r
+ }\r
+ },\r
+ commit: function( widget ) {\r
+ widget.setData( 'height', this.getValue() );\r
+ }\r
+ },\r
+ ]\r
+ },\r
+\r
+ {\r
+ type: 'hbox',\r
+ id: 'alignment',\r
+ children: [ {\r
+ type: 'radio',\r
+ id: 'align',\r
+ label: editor.lang.common.align,\r
+ items: [\r
+ [editor.lang.common.alignCenter, 'center'],\r
+ [editor.lang.common.alignLeft, 'left'],\r
+ [editor.lang.common.alignRight, 'right'],\r
+ [editor.lang.common.alignNone, 'none']\r
+ ],\r
+ 'default': 'center',\r
+ setup: function( widget ) {\r
+ if ( widget.data.align ) {\r
+ this.setValue( widget.data.align );\r
+ }\r
+ },\r
+ commit: function( widget ) {\r
+ widget.setData( 'align', this.getValue() );\r
+ }\r
+ } ]\r
+ } ]\r
+ },\r
+ {\r
+ id: 'Upload',\r
+ hidden: true,\r
+ filebrowser: 'uploadButton',\r
+ label: editor.lang.html5video.upload,\r
+ elements: [ {\r
+ type: 'file',\r
+ id: 'upload',\r
+ label: editor.lang.html5video.btnUpload,\r
+ style: 'height:40px',\r
+ size: 38\r
+ },\r
+ {\r
+ type: 'fileButton',\r
+ id: 'uploadButton',\r
+ filebrowser: 'info:url',\r
+ label: editor.lang.html5video.btnUpload,\r
+ 'for': [ 'Upload', 'upload' ]\r
+ } ]\r
+ },\r
+ {\r
+ id: 'advanced',\r
+ label: editor.lang.html5video.advanced,\r
+ elements: [ {\r
+ type: 'vbox',\r
+ padding: 0,\r
+ children: [ {\r
+ type: 'hbox',\r
+ children: [ {\r
+ type: 'radio',\r
+ id: 'autoplay',\r
+ label: editor.lang.html5video.autoplay,\r
+ items: [\r
+ [editor.lang.html5video.yes, 'yes'],\r
+ [editor.lang.html5video.no, 'no']\r
+ ],\r
+ 'default': 'no',\r
+ setup: function( widget ) {\r
+ if ( widget.data.autoplay ) {\r
+ this.setValue( widget.data.autoplay );\r
+ }\r
+ },\r
+ commit: function( widget ) {\r
+ widget.setData( 'autoplay', this.getValue() );\r
+ }\r
+ } ]\r
+ } ]\r
+ } ]\r
+ } ]\r
+ };\r
+} );\r