Ver código fonte

Suppression CKFinder

master
Guillaume 4 anos atrás
pai
commit
0fc4db7ee5
1 arquivos alterados com 0 adições e 49 exclusões
  1. +0
    -49
      ShopBundle/Resources/public/js/backend/script/default/init-edit.js

+ 0
- 49
ShopBundle/Resources/public/js/backend/script/default/init-edit.js Ver arquivo

@@ -1,20 +1,13 @@
jQuery(document).ready(function () {

initLcCkEditor();
initCkFinder();
//generateNotice('error', 'Ceci est une notice');

});

function checkForm(){
$('form').addClass('form-sent');
//Panel vues js
if($('form').find('.panel').length){
log('here');

$('form').find('.panel').each(function(i, panel){
log(i);
log($(panel).find(':invalid').length);
if($(panel).find(':invalid').length){
$('#nav-params').find('.nav-item:eq('+i+')').addClass('has-invalid');
}else{
@@ -24,47 +17,6 @@ function checkForm(){
}
}

function initCkFinder(){

$('.lc-ckfinder-wrap').each(function(){
$widget = $(this);

if($widget.find('.lc-ckfinder-field').val() !== ''){
$widget.find('.lc-ckfinder-illu').css('background-image', "url('"+$widget.find('.lc-ckfinder-field').val()+"')");
$widget.find('.lc-ckfinder-remove').show();
}

$widget.find('.lc-ckfinder-button').on( 'click', function( e ) {
e.preventDefault();
CKFinder.popup( {
chooseFiles: true,
onInit: function( finder ) {
finder.on( 'files:choose', function( evt ) {
var file = evt.data.files.first();
$widget.find('.lc-ckfinder-illu').css('background-image', "url('"+file.getUrl()+"')");
$widget.find('.lc-ckfinder-remove').show();
$widget.find('.lc-ckfinder-field').val(file.getUrl());
} );
finder.on( 'file:choose:resizedImage', function( evt ) {
var output = document.getElementById( '{{ id }}' );
output.value = evt.data.resizedUrl;
} );
}
} );
} );
$widget.find('.lc-ckfinder-remove').on('click', function () {
$widget.find('.lc-ckfinder-remove').hide();
$widget.find('.lc-ckfinder-illu').css('background-image', 'none');
$widget.find('.lc-ckfinder-field').val("");
})
});

if ($('.field-ckfinder_file_chooser').length > 0) {
CKFinder.config({connectorPath: '/ckfinder/connector'});
}
}


/* CKEditor */

function initLcCkEditor(){
@@ -84,7 +36,6 @@ function initLcCkEditor(){
],
"language": "fr"
});
CKFinder.setupCKEditor(editor);
}
}
}

Carregando…
Cancelar
Salvar