1 CKEDITOR.dialog.add( 'widgetfoundationAlert', function( editor ) {
2 var clientHeight = document.documentElement.clientHeight,
3 alertTypes = CKEDITOR.config.widgetfoundationAlert_alertTypes,
7 for ( alertName in alertTypes ) {
8 alertTypesSelect.push( [ alertTypes[ alertName ], alertName ] );
13 /*var size = CKEDITOR.document.getWindow().getViewPaneSize(),
14 // Make it maximum 800px wide, but still fully visible in the viewport.
15 width = Math.min( size.width - 70, 800 ),
16 // Make it use 2/3 of the viewport height.
17 height = size.height / 1.5;
18 // Low resolution settings.
19 if ( clientHeight < 650 )
20 height = clientHeight - 220;*/
23 title: 'Edit Alert Type',
34 items: alertTypesSelect,
36 validate: CKEDITOR.dialog.validate.notEmpty('Alert type required'),
37 setup: function( widget ) {
38 this.setValue( widget.data.type != undefined ? widget.data.type : 'alert');
40 commit: function( widget ) {
41 widget.setData( 'type', this.getValue() );
47 label: 'Alert Content',
48 setup: function( widget ) {
49 this.setValue( widget.data.alertText );
51 commit: function( widget ) {
52 widget.setData( 'alertText', this.getValue() );
55 validate: CKEDITOR.dialog.validate.notEmpty('Content required'),
56 inputStyle: 'cursor:auto;' +
57 'width:' + width + 'px;' +
58 'height:' + height + 'px;' +