Selaa lähdekoodia

Structure webpack

tags/0.1
Guillaume 3 vuotta sitten
vanhempi
commit
d710ee2a38
46 muutettua tiedostoa jossa 97 lisäystä ja 267 poistoa
  1. +1
    -2
      Controller/Admin/DashboardController.php
  2. +1
    -1
      Field/FileManagerField.php
  3. +2
    -2
      Field/GalleryManagerField.php
  4. +1
    -1
      Field/ImageManagerField.php
  5. +11
    -18
      Resources/assets/app/adminlte/common/app.common.js
  6. +1
    -0
      Resources/assets/app/adminlte/common/common.js
  7. +9
    -0
      Resources/assets/app/adminlte/common/common.scss
  8. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-black-webfont.woff
  9. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-black-webfont.woff2
  10. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-blackit-webfont.woff
  11. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-blackit-webfont.woff2
  12. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-bold-webfont.woff
  13. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-bold-webfont.woff2
  14. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-boldit-webfont.woff
  15. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-boldit-webfont.woff2
  16. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralight-webfont.woff
  17. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralight-webfont.woff2
  18. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralightit-webfont.woff
  19. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralightit-webfont.woff2
  20. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-it-webfont.woff
  21. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-it-webfont.woff2
  22. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-light-webfont.woff
  23. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-light-webfont.woff2
  24. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-lightit-webfont.woff
  25. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-lightit-webfont.woff2
  26. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-regular-webfont.woff
  27. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-regular-webfont.woff2
  28. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-semibold-webfont.woff
  29. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-semibold-webfont.woff2
  30. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-semiboldit-webfont.woff
  31. +0
    -0
      Resources/assets/app/adminlte/common/fonts/sourcesanspro-semiboldit-webfont.woff2
  32. +0
    -14
      Resources/assets/app/adminlte/common/scss/_card.scss
  33. +9
    -0
      Resources/assets/app/adminlte/common/scss/_modal.scss
  34. +0
    -0
      Resources/assets/app/adminlte/common/scss/form/_checkboxradio.scss
  35. +0
    -0
      Resources/assets/app/adminlte/common/scss/form/_footer.scss
  36. +0
    -0
      Resources/assets/app/adminlte/common/utils/log.js
  37. +0
    -0
      Resources/assets/app/adminlte/field/collection/app.collection.js
  38. +0
    -0
      Resources/assets/app/adminlte/field/collection/form.scss
  39. +0
    -1
      Resources/assets/app/adminlte/field/filemanager/app.filemanager.js
  40. +0
    -0
      Resources/assets/app/adminlte/field/filemanager/form.scss
  41. +0
    -144
      Resources/assets/apps/backend-common/_fonts.scss
  42. +0
    -50
      Resources/assets/apps/backend-common/utils.js
  43. +0
    -16
      Resources/assets/apps/form/app.form.js
  44. +0
    -9
      Resources/assets/apps/form/form.js
  45. +0
    -9
      Resources/assets/apps/form/form.scss
  46. +62
    -0
      Resources/assets/tools/tools.js

+ 1
- 2
Controller/Admin/DashboardController.php Näytä tiedosto

@@ -36,8 +36,7 @@ class DashboardController extends AbstractDashboardController
public function configureAssets(): Assets
{
$assets = parent::configureAssets();
$assets->addWebpackEncoreEntry('backend-common');
$assets->addWebpackEncoreEntry('form');
$assets->addWebpackEncoreEntry('adminlte-common');

return $assets;
}

+ 1
- 1
Field/FileManagerField.php Näytä tiedosto

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

+ 2
- 2
Field/GalleryManagerField.php Näytä tiedosto

@@ -27,8 +27,8 @@ class GalleryManagerField implements FieldInterface
->setTemplatePath('@LcSov/tabler/crud/field/collection.html.twig')
->setFormType(CollectionType::class)
->addCssClass('field-collection')
->addWebpackEncoreEntries('field-collection')
->addWebpackEncoreEntries('field-filemanager')
->addWebpackEncoreEntries('adminlte-field-collection')
->addWebpackEncoreEntries('adminlte-field-filemanager')
->setFormTypeOption('allow_add', true)
->setFormTypeOption('allow_delete', true)
->setFormTypeOption('entry_options', array('label'=> false))

+ 1
- 1
Field/ImageManagerField.php Näytä tiedosto

@@ -23,7 +23,7 @@ final class ImageManagerField implements FieldInterface
->setProperty($propertyName)
->setLabel($label)
->setTemplatePath('@LcSov/adminlte/crud/field/image.html.twig')
->addWebpackEncoreEntries('field-filemanager')
->addWebpackEncoreEntries('adminlte-field-filemanager')
->setFormType(FileManagerType::class)
->addCssClass('field-text')
->setCustomOption(self::OPTION_MAX_LENGTH, null)

Resources/assets/apps/backend-common/app.common.js → Resources/assets/app/adminlte/common/app.common.js Näytä tiedosto

@@ -1,35 +1,28 @@


//JQUERY
// JQuery
import 'jquery';
global.$ = global.jQuery = $;


//ADMINLTE
// Adminlte
import 'adminlte-js' ;


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

// SELECT 2
// Select2
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
// Tools
import { Tools } from '../../../tools/tools.js';
global.Tools = Tools;

// Common
import './common.scss';
import './common.js'


import log from './utils/log.js';
//log('ncnnc');

// JAVASCRIPT
import './common.js'

//require('select2');
//require('adminlte');
//import 'adminltePlugin/bootstrap/js/bootstrap.min.js'
///import 'admin-lte/dist/css/adminlte.min.css' ;
//require('admin-lte-css') ;
// import './common.js' ;

Resources/assets/apps/backend-common/common.js → Resources/assets/app/adminlte/common/common.js Näytä tiedosto

@@ -1,3 +1,4 @@

/* Tooltip */
$('[data-toggle="tooltip"]').tooltip();


+ 9
- 0
Resources/assets/app/adminlte/common/common.scss Näytä tiedosto

@@ -0,0 +1,9 @@

@import "adminlte-css";
@import "fontawesome-css";
@import 'scss/form/checkboxradio';
@import 'scss/form/footer';
@import 'scss/card';
@import 'scss/modal';



Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-black-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-black-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-black-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-blackit-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-blackit-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-blackit-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-bold-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-bold-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-bold-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-boldit-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-boldit-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-boldit-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralight-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-extralight-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralight-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralightit-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-extralightit-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-extralightit-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-it-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-it-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-it-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-light-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-light-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-light-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-lightit-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-lightit-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-lightit-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-regular-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-regular-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-regular-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-semibold-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-semibold-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-semibold-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff → Resources/assets/app/adminlte/common/fonts/sourcesanspro-semiboldit-webfont.woff Näytä tiedosto


Resources/assets/apps/backend-common/fonts/sourcesanspro-semiboldit-webfont.woff2 → Resources/assets/app/adminlte/common/fonts/sourcesanspro-semiboldit-webfont.woff2 Näytä tiedosto


Resources/assets/apps/backend-common/common.scss → Resources/assets/app/adminlte/common/scss/_card.scss Näytä tiedosto

@@ -1,9 +1,4 @@
@import 'scss/_formchecboxradio.scss';
@import "adminlte-css";
@import "fontawesome-css";
@import "scss/_formfooter.scss";

/* card */
.card {
&.card-table {
.card-header {
@@ -46,13 +41,4 @@
}
}
}
}

/* modal */
.modal {
.modal-body {
img {
max-width: 100% ;
}
}
}

+ 9
- 0
Resources/assets/app/adminlte/common/scss/_modal.scss Näytä tiedosto

@@ -0,0 +1,9 @@


.modal {
.modal-body {
img {
max-width: 100% ;
}
}
}

Resources/assets/apps/backend-common/scss/_formchecboxradio.scss → Resources/assets/app/adminlte/common/scss/form/_checkboxradio.scss Näytä tiedosto


Resources/assets/apps/backend-common/scss/_formfooter.scss → Resources/assets/app/adminlte/common/scss/form/_footer.scss Näytä tiedosto


Resources/assets/apps/backend-common/utils/log.js → Resources/assets/app/adminlte/common/utils/log.js Näytä tiedosto


Resources/assets/fields/collection/app.field-collection.js → Resources/assets/app/adminlte/field/collection/app.collection.js Näytä tiedosto


Resources/assets/fields/collection/form.scss → Resources/assets/app/adminlte/field/collection/form.scss Näytä tiedosto


Resources/assets/fields/filemanager/app.field-filemanager.js → Resources/assets/app/adminlte/field/filemanager/app.filemanager.js Näytä tiedosto

@@ -1,7 +1,6 @@

import "./form.scss"


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

Resources/assets/fields/filemanager/form.scss → Resources/assets/app/adminlte/field/filemanager/form.scss Näytä tiedosto


+ 0
- 144
Resources/assets/apps/backend-common/_fonts.scss Näytä tiedosto

@@ -1,144 +0,0 @@
/*! 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;

}

+ 0
- 50
Resources/assets/apps/backend-common/utils.js Näytä tiedosto

@@ -1,50 +0,0 @@

function arrayRemove(arr, value) { return arr.filter(function(ele){ return ele != value; });}

const scratchDiv = document.createElement('div');
function toPlainText(html) {
scratchDiv.innerHTML = html;
return scratchDiv.textContent;
}

function getDateFormatted(date, separator) {
if(date) {
var date = new Date(date);
var _d = date.getDate(),
d = _d > 9 ? _d : '0' + _d,
_m = date.getMonth() + 1,
m = _m > 9 ? _m : '0' + _m,
formatted = d + separator + m + separator + date.getFullYear();
return formatted;
}else{
return '';
}
}


var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;

for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');

if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
};

function indexOfFirstDigit(input) {
let i = 0;
for (; input[i] < '0' || input[i] > '9'; i++) ;
return i == input.length ? -1 : i;
}

function indexOfLastDigit(input) {
let i = input.length - 1;
for (; input[i] < '0' || input[i] > '9'; i--) ;
return i == input.length ? -1 : i;
}

+ 0
- 16
Resources/assets/apps/form/app.form.js Näytä tiedosto

@@ -1,16 +0,0 @@
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/

// any CSS you import will output into a single css file (app.css in this case)

//import 'adminltePlugin/bootstrap/js/bootstrap.min.js';

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

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

// start the Stimulus application

+ 0
- 9
Resources/assets/apps/form/form.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 9
Resources/assets/apps/form/form.scss
File diff suppressed because it is too large
Näytä tiedosto


+ 62
- 0
Resources/assets/tools/tools.js Näytä tiedosto

@@ -0,0 +1,62 @@

export class Tools {

static log(value) {
try {
console.log(value) ;
}
catch {}
}

static arrayRemove(arr, value) {
return arr.filter(function(ele){ return ele != value; });
}

static toPlainText(html) {
let scratchDiv = document.createElement('div');
scratchDiv.innerHTML = html;
return scratchDiv.textContent;
}

static getDateFormatted(date, separator) {
if(date) {
var date = new Date(date);
var _d = date.getDate(),
d = _d > 9 ? _d : '0' + _d,
_m = date.getMonth() + 1,
m = _m > 9 ? _m : '0' + _m,
formatted = d + separator + m + separator + date.getFullYear();
return formatted;
}
else {
return '';
}
}

static getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;

for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');

if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
}

static indexOfFirstDigit(input) {
let i = 0;
for (; input[i] < '0' || input[i] > '9'; i++) ;
return i == input.length ? -1 : i;
}

static indexOfLastDigit(input) {
let i = input.length - 1;
for (; input[i] < '0' || input[i] > '9'; i--) ;
return i == input.length ? -1 : i;
}
}

Loading…
Peruuta
Tallenna