Commit 4af8a8ef authored by efalcy's avatar efalcy
Browse files

Merge remote-tracking branch...

Merge remote-tracking branch 'origin/dev#56107_explo_1655_retro_sprint_73_pb_plugin_pour_afficher_des_donnees_metier_dans_un_articles_integrer_une_notice_une_sitotheque_avec_des_boutons_ckeditor' into dev#56107_bonus_1655_retro_sprint_73_pb_plugin_pour_afficher_des_donnees_metier_dans_un_articles_integrer_une_notice_une_sitotheque_avec_des_boutons_ckeditor
parents a0e14d00 748c52bb
- ticket #56107 : [EXPLO] 16/55 Retro Sprint 73 ! PB : plugin pour afficher des données métier dans un articles (intégrer une notice, une sitothèque...) avec des boutons ckEditor
\ No newline at end of file
CKEDITOR.dialog.add( 'basketDialog', function ( editor ) {
return {
title: 'Basket Properties',
minWidth: 400,
minHeight: 200,
contents: [
{
id: 'tab-adv',
label: 'Advanced Settings',
elements: [
{
onLoad: function () {
var htmlElement = this;
$.ajax({
url: "http://sandbox.pergame.net/stl/admin/widget/edit-widget/id/10/id_profil/78/render/popup",
type: "get",
datatype: 'json',
success: function (data) {
$('.mybasket').html(data['content']);
},
error: function (xhr, status) {
alert(status);
}
});
},
type: 'html',
className: 'mybasket',
html: ''
}
// UI elements of the second tab will be defined here.
]
}
],
onOk: function() {
var dialog = this;
var abbr = editor.document.createElement( 'div' );
$(abbr).attr('data-form', $('.mybasket form').serialize());
editor.insertElement( abbr );
}
};
});
CKEDITOR.plugins.add( 'bokehsample', {
icons: 'basket',
init: function( editor ) {
CKEDITOR.dialog.add( 'basketDialog', this.path + 'dialogs/basket.js' );
editor.addCommand( 'insertBasket', new CKEDITOR.dialogCommand( 'basketDialog'));
// Create a toolbar button that executes the above command.
editor.ui.addButton( 'Basket', {
label: 'Insert Bokeh basket',
command: 'insertBasket',
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'],
['Image','Flash','Table','Iframe','oembed','Slideshow', 'SpecialChar','Basket'],
];
$config['extraAllowedContent'] = [
......@@ -107,7 +107,7 @@ class ZendAfi_View_Helper_CkEditor extends ZendAfi_View_Helper_BaseHelper
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock']
]);
$config['extraPlugins'] = 'colordialog';
$config['extraPlugins'] = 'colordialog,bokehsample';
$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