Commit 7d53a8d1 authored by efalcy's avatar efalcy
Browse files

dev #56107 : change bokehsample plugins names

parent ed95c02b
CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
CKEDITOR.dialog.add( 'kioskDialog', function ( editor ) {
return {
title: 'Bokeh Widget Properties',
title: 'Bokeh Kiosk Properties',
minWidth: 400,
minHeight: 200,
contents: [
......@@ -12,7 +12,7 @@ CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
elements: [
{
type: 'html',
className: 'bokeh-widget-form',
className: 'bokeh-kiosk-form',
html: '',
setupForm: function () {
......@@ -24,7 +24,7 @@ CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
data: this.getValue(),
datatype: 'json',
success: function (data) {
$('.bokeh-widget-form').html(data['content']);
$('.bokeh-kiosk-form').html(data['content']);
},
error: function (xhr, status) {
alert(status);
......@@ -48,8 +48,8 @@ CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
var selection = editor.getSelection();
var element = selection.getStartElement();
this.insertMode = true;
if ( $(element.$).hasClass('bokeh-widget') || $(element.$).closest('bokeh-widget').size ) {
element = $(element.$).closest( 'bokeh-widget' );
if ( $(element.$).hasClass('bokeh-kiosk') || $(element.$).closest('bokeh-kiosk').size ) {
element = $(element.$).closest( 'bokeh-kiosk' );
this.insertMode = false;
}
this.element = element;
......@@ -69,12 +69,12 @@ CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
}
widget.setText('KIOSQUE');
$('.bokeh-widget-form form').triggerHandler('submit');
$('.bokeh-kiosk-form form').triggerHandler('submit');
setTimeout(function() {
$(widget)
.attr('data-form', $('.bokeh-widget-form form').serialize())
.attr('class','bokeh-widget');
.attr('data-form', $('.bokeh-kiosk-form form').serialize())
.attr('class','bokeh-kiosk');
},10);
}
......
CKEDITOR.plugins.add( 'bokehsample', {
icons: 'basket',
CKEDITOR.plugins.add( 'bokeh-kiosk', {
icons: 'kiosk',
init: function( editor ) {
CKEDITOR.dialog.add( 'basketDialog', this.path + 'dialogs/basket.js' );
editor.addCommand( 'insertBasket', new CKEDITOR.dialogCommand( 'basketDialog'));
editor.addCommand( 'editBasket', new CKEDITOR.dialogCommand( 'basketDialog'));
CKEDITOR.dialog.add( 'kioskDialog', this.path + 'dialogs/kiosk.js' );
editor.addCommand( 'insertKiosk', new CKEDITOR.dialogCommand( 'kioskDialog'));
editor.addCommand( 'editKiosk', new CKEDITOR.dialogCommand( 'kioskDialog'));
editor.addContentsCss( this.path + 'plugin.css' );
......@@ -12,7 +12,7 @@ CKEDITOR.plugins.add( 'bokehsample', {
editor.addMenuItem( 'bokehWidgetItem', {
label: 'Edit widget',
icon: this.path + 'icons/basket.png',
command: 'editBasket',
command: 'editKiosk',
group: 'bokehWidgetGroup'
});
......@@ -26,9 +26,9 @@ CKEDITOR.plugins.add( 'bokehsample', {
// Create a toolbar button that executes the above command.
editor.ui.addButton( 'Basket', {
label: 'Insert Bokeh basket',
command: 'insertBasket',
editor.ui.addButton( 'Kiosk', {
label: 'Insert Bokeh kiosk',
command: 'insertKiosk',
toolbar: 'insert',
});
......
......@@ -66,7 +66,7 @@ class ZendAfi_View_Helper_CkEditor extends ZendAfi_View_Helper_BaseHelper
'/',
['HorizontalRule'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Iframe','oembed','Slideshow', 'SpecialChar','Basket'],
['Image','Flash','Table','Iframe','oembed','Slideshow', 'SpecialChar','Kiosk'],
];
$config['extraAllowedContent'] = [
......@@ -111,7 +111,7 @@ class ZendAfi_View_Helper_CkEditor extends ZendAfi_View_Helper_BaseHelper
'action' => 'get-form',
'code' => 'KIOSQUE',
'render' => 'popup']);
$config['extraPlugins'] = 'colordialog,bokehsample';
$config['extraPlugins'] = 'colordialog,bokeh-kiosk';
$oCKeditor = new CKeditor(CKBASEURL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment