This commit is contained in:
Ludovic CANDELLIER
2021-08-24 22:26:37 +02:00
parent 8d51ced269
commit f32ac13f1e
7 changed files with 65 additions and 79 deletions

View File

@@ -14,7 +14,6 @@ var jsCompat = [
'node_modules/es6-promise/dist/es6-promise.min.js', 'node_modules/es6-promise/dist/es6-promise.min.js',
] ]
var jsAdminLTE = [ var jsAdminLTE = [
jsBase, jsBase,
jsBootstrap, jsBootstrap,
@@ -281,30 +280,6 @@ module.exports = function(grunt) {
src: ['**'], src: ['**'],
dest: 'public/assets/fonts/glyphicons' dest: 'public/assets/fonts/glyphicons'
}, },
{
expand: true,
cwd: 'node_modules/summernote/dist/',
src: ['**'],
dest: 'public/assets/plugins/summernote'
},
{
expand: true,
cwd: 'node_modules/jquery.filer/assets/fonts/jquery.filer-icons/',
src: ['**'],
dest: 'public/assets/assets/fonts/jquery.filer-icons/'
},
{
expand: true,
cwd: 'node_modules/icheck/skins/square/',
src: ['blue.png'],
dest: 'public/assets/apps/Admin/css/'
},
{
expand: true,
cwd: 'node_modules/icheck/skins/square/',
src: ['blue@2x.png'],
dest: 'public/assets/apps/Admin/css/'
},
{ {
expand: true, expand: true,
cwd: 'node_modules/@claviska/jquery-minicolors/', cwd: 'node_modules/@claviska/jquery-minicolors/',
@@ -371,12 +346,6 @@ module.exports = function(grunt) {
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/nestable2' dest: 'public/assets/plugins/nestable2'
}, },
{
expand: true,
cwd: 'node_modules/jquery.fancytree/dist/',
src: ['**'],
dest: 'public/assets/plugins/fancytree'
},
{ {
expand: true, expand: true,
cwd: 'node_modules/bootstrap-autocomplete/dist/latest/', cwd: 'node_modules/bootstrap-autocomplete/dist/latest/',
@@ -407,36 +376,6 @@ module.exports = function(grunt) {
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/bootstrap4-toggle', dest: 'public/assets/plugins/bootstrap4-toggle',
}, },
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/css/',
src: ['**/*.min.css'],
dest: 'public/assets/plugins/bootstrap-fileinput/css',
},
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/js/',
src: ['**'],
dest: 'public/assets/plugins/bootstrap-fileinput/js',
},
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/img/',
src: ['**'],
dest: 'public/assets/plugins/bootstrap-fileinput/img',
},
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/themes/fa/',
src: ['**'],
dest: 'public/assets/plugins/bootstrap-fileinput/themes/fa',
},
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/themes/fas/',
src: ['**'],
dest: 'public/assets/plugins/bootstrap-fileinput/themes/fas',
},
{ {
expand: true, expand: true,
cwd: 'node_modules/pdfobject/', cwd: 'node_modules/pdfobject/',
@@ -473,29 +412,35 @@ module.exports = function(grunt) {
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/moment', dest: 'public/assets/plugins/moment',
}, },
{
expand: true,
cwd: 'node_modules/bootstrap-fileinput/css/',
src: ['**/*.min.css'],
dest: 'public/assets/plugins/bootstrap-fileinput/css',
},
{ {
expand: true, expand: true,
cwd: 'node_modules/bootstrap-fileinput/js/', cwd: 'node_modules/bootstrap-fileinput/js/',
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/fileinput', dest: 'public/assets/plugins/bootstrap-fileinput/js',
}, },
{ {
expand: true, expand: true,
cwd: 'node_modules/bootstrap-fileinput/css/', cwd: 'node_modules/bootstrap-fileinput/img/',
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/fileinput', dest: 'public/assets/plugins/bootstrap-fileinput/img',
}, },
{ {
expand: true, expand: true,
cwd: 'node_modules/bootstrap-fileinput/themes/', cwd: 'node_modules/bootstrap-fileinput/themes/fa/',
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/fileinput', dest: 'public/assets/plugins/bootstrap-fileinput/themes/fa',
}, },
{ {
expand: true, expand: true,
cwd: 'node_modules/tinymce/', cwd: 'node_modules/bootstrap-fileinput/themes/fas/',
src: ['**'], src: ['**'],
dest: 'public/assets/plugins/tinymce', dest: 'public/assets/plugins/bootstrap-fileinput/themes/fas',
}, },
{ {
expand: true, expand: true,
@@ -503,6 +448,12 @@ module.exports = function(grunt) {
src: ['*.json'], src: ['*.json'],
dest: 'public/assets/plugins/datatables_lang', dest: 'public/assets/plugins/datatables_lang',
}, },
{
expand: true,
cwd: 'node_modules/tinymce/',
src: ['**'],
dest: 'public/assets/plugins/tinymce',
},
{ {
expand: true, expand: true,
cwd: 'vendor/sebastienheyd/boilerplate/src/public/plugins/tinymce/plugins/', cwd: 'vendor/sebastienheyd/boilerplate/src/public/plugins/tinymce/plugins/',
@@ -539,6 +490,30 @@ module.exports = function(grunt) {
src: ['icheck-bootstrap.min.css'], src: ['icheck-bootstrap.min.css'],
dest: 'public/assets/plugins/icheck/' dest: 'public/assets/plugins/icheck/'
}, },
{
expand: true,
cwd: 'node_modules/jstree/dist/',
src: ['**'],
dest: 'public/assets/plugins/jstree/'
},
{
expand: true,
cwd: 'node_modules/jquery.fancytree/dist/',
src: ['**'],
dest: 'public/assets/plugins/fancytree'
},
{
expand: true,
cwd: 'node_modules/jqtree/',
src: ['tree.jquery.js'],
dest: 'public/assets/plugins/jqtree'
},
{
expand: true,
cwd: 'node_modules/jqtree/',
src: ['jqtree.css'],
dest: 'public/assets/plugins/jqtree'
},
{ {
expand: true, expand: true,
cwd: 'build/js/include/', cwd: 'build/js/include/',

View File

@@ -91,6 +91,7 @@
"inputmask": "^5.0.3", "inputmask": "^5.0.3",
"izimodal": "^1.5.1", "izimodal": "^1.5.1",
"jq-bootstrap-validation": "^1.3.8", "jq-bootstrap-validation": "^1.3.8",
"jqtree": "^1.6.1",
"jquery": "3.5.1", "jquery": "3.5.1",
"jquery-confirm": "^3.3.4", "jquery-confirm": "^3.3.4",
"jquery-file-download": "^1.4.6", "jquery-file-download": "^1.4.6",
@@ -114,6 +115,7 @@
"jquery.uniform": "^4.3.0", "jquery.uniform": "^4.3.0",
"jqvmap": "^1.5.1", "jqvmap": "^1.5.1",
"jscroll": "^2.4.1", "jscroll": "^2.4.1",
"jstree": "^3.3.11",
"jszip": "^3.6.0", "jszip": "^3.6.0",
"laravel-echo": "^1.8.1", "laravel-echo": "^1.8.1",
"modernizr": "^3.11.3", "modernizr": "^3.11.3",

View File

@@ -4,11 +4,11 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-3"> <div class="col-3">
{{ Form::label('model', 'Familles de produit') }}<br> {{ Form::label('model', 'Familles de produit') }}<br>
@include('components.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2']) @include('components.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('model_id', 'Produit') }}<br> {{ Form::label('model_id', 'Produit') }}<br>
@include('components.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2']) @include('components.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div> </div>
<div class="col-3"> <div class="col-3">
{{ Form::label('ref', 'Référence') }}<br> {{ Form::label('ref', 'Référence') }}<br>
@@ -23,7 +23,7 @@
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('article_nature_id', __('Shop.article_natures.name')) }}<br> {{ Form::label('article_nature_id', __('Shop.article_natures.name')) }}<br>
@include('components.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2']) @include('components.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div> </div>
</div> </div>

View File

@@ -1,7 +1,3 @@
@include('boilerplate::load.fileinput')
@include('boilerplate::load.select2')
@include('boilerplate::load.tinymce')
<input type="hidden" name="category_id" value="{{ $category_id }}"> <input type="hidden" name="category_id" value="{{ $category_id }}">
<div class="row"> <div class="row">
@@ -37,11 +33,12 @@
@include('components.save') @include('components.save')
@include('boilerplate::load.select2')
@push('js') @push('js')
<script> <script>
$(function() { $(function() {
$(".select2").select2(); initSelect2();
$('.editor').tinymce({});
}); });
</script> </script>
@endpush @endpush

View File

@@ -10,8 +10,9 @@
</div> </div>
</div> </div>
@include('load.form.tree')
@push('scripts') @push('js')
<script> <script>
var position = ''; var position = '';
var target_node = ''; var target_node = '';
@@ -45,7 +46,6 @@
console.log("Parent node", parent_node); console.log("Parent node", parent_node);
}); });
}); });
function handleMove(node, e) { function handleMove(node, e) {

View File

@@ -0,0 +1,12 @@
@if(!defined('LOAD_TREE'))
@push('scripts')
<script src="{{ asset('/assets/plugins/jqtree/tree.jquery.js') }}"></script>
@endpush
@push('css')
<link rel="stylesheet" href="{{ asset('/assets/plugins/jqtree/jqtree.css') }}">
@endpush
@php(define('LOAD_TREE', true))
@endif