Procházet zdrojové kódy

Intégration page d'édition AdminLTE

tags/0.1
Fab před 3 roky
rodič
revize
4c7f4ba867
33 změnil soubory, kde provedl 255 přidání a 13 odebrání
  1. +1
    -1
      Field/FileManagerField.php
  2. +144
    -0
      Resources/assets/apps/backend-common/_fonts.scss
  3. +74
    -2
      Resources/assets/apps/backend-common/app.common.js
  4. +0
    -7
      Resources/assets/apps/backend-common/common.scss
  5. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff
  6. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff2
  7. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff
  8. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff2
  9. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff
  10. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff2
  11. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff
  12. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff2
  13. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff
  14. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff2
  15. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff
  16. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff2
  17. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff
  18. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff2
  19. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff
  20. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff2
  21. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff
  22. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff2
  23. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff
  24. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff2
  25. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff
  26. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff2
  27. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff
  28. binární
      Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff2
  29. +30
    -0
      Resources/assets/fields/filemanager/app.field-filemanager.js
  30. +0
    -0
      Resources/assets/fields/filemanager/form.scss
  31. +1
    -3
      Resources/views/adminlte/crud/new.html.twig
  32. +0
    -0
      Resources/views/adminlte/filemanager/file-manager-modal.html.twig
  33. +5
    -0
      Resources/views/adminlte/layout.html.twig

+ 1
- 1
Field/FileManagerField.php Zobrazit soubor

@@ -23,7 +23,7 @@ final class FileManagerField implements FieldInterface
->setProperty($propertyName)
->setLabel($label)
->setTemplatePath('@LcSov/tabler/crud/field/image.html.twig')
->addJsFiles('bundles/lcsov/js/form-type-file-manager.js')
->addWebpackEncoreEntries('field-filemanager')
->setFormType(FileManagerType::class)
->addCssClass('field-text')
->setCustomOption(self::OPTION_MAX_LENGTH, null)

+ 144
- 0
Resources/assets/apps/backend-common/_fonts.scss Zobrazit soubor

@@ -0,0 +1,144 @@
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on May 17, 2021 */



@font-face {
font-family: 'source_sans_proregular';
src: url('fonts/sourcesanspro-regular-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-regular-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_prolight';
src: url('fonts/sourcesanspro-light-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-light-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_prolight_italic';
src: url('fonts/sourcesanspro-lightit-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-lightit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_proitalic';
src: url('fonts/sourcesanspro-it-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-it-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_proXLtIt';
src: url('fonts/sourcesanspro-extralightit-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-extralightit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_proextralight';
src: url('fonts/sourcesanspro-extralight-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-extralight-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_proSBdIt';
src: url('fonts/sourcesanspro-semiboldit-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-semiboldit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_prosemibold';
src: url('fonts/sourcesanspro-semibold-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-semibold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_probold_italic';
src: url('fonts/sourcesanspro-boldit-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-boldit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_probold';
src: url('fonts/sourcesanspro-bold-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-bold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_problack_italic';
src: url('fonts/sourcesanspro-blackit-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-blackit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}




@font-face {
font-family: 'source_sans_problack';
src: url('fonts/sourcesanspro-black-webfont.woff2') format('woff2'),
url('fonts/sourcesanspro-black-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}

+ 74
- 2
Resources/assets/apps/backend-common/app.common.js Zobrazit soubor

@@ -1,16 +1,88 @@

//JQUERY
import 'jquery';
global.$ = global.jQuery = $;
import './common.scss';


//ADMINLTE
import 'adminlte-js' ;
import "adminlte-css";
import "fontawesome-css";

//BOOTSTRAP
import 'adminlte-plugin/bootstrap/js/bootstrap.min.js';


// SELECT 2
import 'adminlte-plugin/select2/js/select2.min.js';
import 'adminlte-plugin/select2/js/i18n/fr.js';
import 'adminlte-plugin/select2/css/select2.min.css';
import 'adminlte-plugin/select2-bootstrap4-theme/select2-bootstrap4.min.css';

// SOV CSS
import './common.scss';

import log from './utils/log.js';

log('ncnnc');

$('#test22').modal('show');

if ($('.select2, select.form-control').length) {

$('form .form-widget>select.form-control, .select2').each(function (i, elm) {
if (!$(this).hasClass('disable-select2')) {
setSelect2($(elm));
}
});

$('form .form-inline>select.form-control').each(function (i, elm) {
if (!$(this).hasClass('disable-select2')) {
setSelect2($(elm));
}
});
}



function setSelect2($select) {
if (typeof $select.data('select2-id') === 'undefined') {

$select.data('init', 'set')
var options = {
width: "100%",
theme: "bootstrap4",
dropdownAutoWidth: false,
allowClear: true,
minimumResultsForSearch: 8
};

if ($select.data('allow-clear') == 'false') {
options.allowClear = false;
}
if ($select.data('width')) {
options.width = 'auto'
}
if ($select.find('option[value=""]')) {
options.placeholder = $select.find('option[value=""]').html()
}
/*if($select.is(':required') == false) {
options.allowclear = true
}*/
var myselect = $select.select2(options);

myselect.on('select2:select', function (e) {
var event = new Event('change');
e.target.dispatchEvent(event);
});
myselect.on('select2:unselect', function (e) {
var event = new Event('change');
e.target.dispatchEvent(event);
});

return myselect;
}
}




+ 0
- 7
Resources/assets/apps/backend-common/common.scss Zobrazit soubor

@@ -1,7 +0,0 @@

@import "adminlte-css";
@import "fontawesome-css";

body{
font-size: 0.9rem;
}

binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff2 Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff Zobrazit soubor


binární
Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff2 Zobrazit soubor


+ 30
- 0
Resources/assets/fields/filemanager/app.field-filemanager.js Zobrazit soubor

@@ -0,0 +1,30 @@


$(document).ready(function () {
initFileManager();
});

function initFileManager() {
$('.lc-filemanager-delete').off('click');
$('.lc-filemanager-delete').on('click', function (e) {
let $field = $(this);
$('#' + $field.data('id')).val("");
$('#' + $field.data('id') + '_preview').prop('src',"");
});
$('.lc-filemanager-open').off('click');
$('.lc-filemanager-open').on('click', function (e) {
let $field = $(this);
$('#lc-filemanager-frame').off('load');
$("#lc-filemanager-frame").on('load', function () {
$('#lc-filemanager-frame').contents().on('click', '.select', function () {
var path = $(this).attr('data-path')
$('#' + $field.data('id')).val(path);
$('#' + $field.data('id') + '_preview').prop('src',path);
$('#lc-filemanager-modal').modal('hide')
});
});
$("#lc-filemanager-frame").prop('src', $field.data('target'));
$('#lc-filemanager-modal').modal('show');
});

}

+ 0
- 0
Resources/assets/fields/filemanager/form.scss Zobrazit soubor


+ 1
- 3
Resources/views/adminlte/crud/new.html.twig Zobrazit soubor

@@ -60,11 +60,9 @@
<h2 class="card-title">{{ ea.crud.customPageTitle is null ? default_title|raw : ea.crud.customPageTitle('new')|trans(ea.i18n.translationParameters)|raw }}</h2>
</div>
<div class="card-body">

{#
{% block new_form %}
{{ form(new_form) }}
{% endblock new_form %} #}
{% endblock new_form %}
</div>
</div>
</div>

Resources/views/adminlte/crud/filemanager/file-manager-modal.html.twig → Resources/views/adminlte/filemanager/file-manager-modal.html.twig Zobrazit soubor


+ 5
- 0
Resources/views/adminlte/layout.html.twig Zobrazit soubor

@@ -19,6 +19,8 @@
<link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">
{% endblock %} #}

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback">

{% block configured_stylesheets %}
{% for css_asset in ea.assets.cssFiles ?? [] %}
<link rel="stylesheet" href="{{ asset(css_asset) }}">
@@ -169,6 +171,9 @@
{{ htmlContent|raw }}
{% endfor %}
{% endblock %}

{% include '@LcSov/adminlte/filemanager/file-manager-modal.html.twig' %}

</body>
{% endblock body %}
</html>

Načítá se…
Zrušit
Uložit