@@ -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; | |||
} |
@@ -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) |
@@ -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)) |
@@ -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) |
@@ -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' ; |
@@ -1,3 +1,4 @@ | |||
/* Tooltip */ | |||
$('[data-toggle="tooltip"]').tooltip(); | |||
@@ -0,0 +1,9 @@ | |||
@import "adminlte-css"; | |||
@import "fontawesome-css"; | |||
@import 'scss/form/checkboxradio'; | |||
@import 'scss/form/footer'; | |||
@import 'scss/card'; | |||
@import 'scss/modal'; | |||
@@ -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% ; | |||
} | |||
} | |||
} |
@@ -0,0 +1,9 @@ | |||
.modal { | |||
.modal-body { | |||
img { | |||
max-width: 100% ; | |||
} | |||
} | |||
} |
@@ -1,7 +1,6 @@ | |||
import "./form.scss" | |||
$(document).ready(function () { | |||
initFileManager(); | |||
}); |
@@ -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; | |||
} |
@@ -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; | |||
} |
@@ -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,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; | |||
} | |||
} |