diff --git a/Gruntfile.js b/Gruntfile.js index 7dc36ba7..34a3bf61 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,6 @@ var jsCompat = [ 'node_modules/es6-promise/dist/es6-promise.min.js', ] - var jsAdminLTE = [ jsBase, jsBootstrap, @@ -281,30 +280,6 @@ module.exports = function(grunt) { src: ['**'], 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, cwd: 'node_modules/@claviska/jquery-minicolors/', @@ -371,12 +346,6 @@ module.exports = function(grunt) { src: ['**'], dest: 'public/assets/plugins/nestable2' }, - { - expand: true, - cwd: 'node_modules/jquery.fancytree/dist/', - src: ['**'], - dest: 'public/assets/plugins/fancytree' - }, { expand: true, cwd: 'node_modules/bootstrap-autocomplete/dist/latest/', @@ -407,36 +376,6 @@ module.exports = function(grunt) { src: ['**'], 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, cwd: 'node_modules/pdfobject/', @@ -473,29 +412,35 @@ module.exports = function(grunt) { src: ['**'], 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, cwd: 'node_modules/bootstrap-fileinput/js/', src: ['**'], - dest: 'public/assets/plugins/fileinput', + dest: 'public/assets/plugins/bootstrap-fileinput/js', }, { expand: true, - cwd: 'node_modules/bootstrap-fileinput/css/', + cwd: 'node_modules/bootstrap-fileinput/img/', src: ['**'], - dest: 'public/assets/plugins/fileinput', + dest: 'public/assets/plugins/bootstrap-fileinput/img', }, { expand: true, - cwd: 'node_modules/bootstrap-fileinput/themes/', + cwd: 'node_modules/bootstrap-fileinput/themes/fa/', src: ['**'], - dest: 'public/assets/plugins/fileinput', + dest: 'public/assets/plugins/bootstrap-fileinput/themes/fa', }, { expand: true, - cwd: 'node_modules/tinymce/', + cwd: 'node_modules/bootstrap-fileinput/themes/fas/', src: ['**'], - dest: 'public/assets/plugins/tinymce', + dest: 'public/assets/plugins/bootstrap-fileinput/themes/fas', }, { expand: true, @@ -503,6 +448,12 @@ module.exports = function(grunt) { src: ['*.json'], dest: 'public/assets/plugins/datatables_lang', }, + { + expand: true, + cwd: 'node_modules/tinymce/', + src: ['**'], + dest: 'public/assets/plugins/tinymce', + }, { expand: true, cwd: 'vendor/sebastienheyd/boilerplate/src/public/plugins/tinymce/plugins/', @@ -539,6 +490,30 @@ module.exports = function(grunt) { src: ['icheck-bootstrap.min.css'], 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, cwd: 'build/js/include/', diff --git a/package.json b/package.json index 341424cf..728daa8f 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "inputmask": "^5.0.3", "izimodal": "^1.5.1", "jq-bootstrap-validation": "^1.3.8", + "jqtree": "^1.6.1", "jquery": "3.5.1", "jquery-confirm": "^3.3.4", "jquery-file-download": "^1.4.6", @@ -114,6 +115,7 @@ "jquery.uniform": "^4.3.0", "jqvmap": "^1.5.1", "jscroll": "^2.4.1", + "jstree": "^3.3.11", "jszip": "^3.6.0", "laravel-echo": "^1.8.1", "modernizr": "^3.11.3", diff --git a/resources/views/Admin/Shop/Articles/partials/characteristics.blade.php b/resources/views/Admin/Shop/Articles/partials/characteristics.blade.php index c01666ed..d68d7021 100644 --- a/resources/views/Admin/Shop/Articles/partials/characteristics.blade.php +++ b/resources/views/Admin/Shop/Articles/partials/characteristics.blade.php @@ -4,11 +4,11 @@
{{ Form::label('model', 'Familles de produit') }}
- @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' => ''])
{{ Form::label('model_id', 'Produit') }}
- @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' => ''])
{{ Form::label('ref', 'Référence') }}
@@ -23,7 +23,7 @@
{{ Form::label('article_nature_id', __('Shop.article_natures.name')) }}
- @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' => ''])
diff --git a/resources/views/Admin/Shop/Categories/form.blade.php b/resources/views/Admin/Shop/Categories/form.blade.php index ece795bc..9fbc4919 100644 --- a/resources/views/Admin/Shop/Categories/form.blade.php +++ b/resources/views/Admin/Shop/Categories/form.blade.php @@ -1,7 +1,3 @@ -@include('boilerplate::load.fileinput') -@include('boilerplate::load.select2') -@include('boilerplate::load.tinymce') -
@@ -37,11 +33,12 @@ @include('components.save') +@include('boilerplate::load.select2') + @push('js') @endpush \ No newline at end of file diff --git a/resources/views/Admin/Shop/Categories/partials/tree.blade.php b/resources/views/Admin/Shop/Categories/partials/tree.blade.php index 2372b8b2..915c69f7 100644 --- a/resources/views/Admin/Shop/Categories/partials/tree.blade.php +++ b/resources/views/Admin/Shop/Categories/partials/tree.blade.php @@ -10,8 +10,9 @@
+@include('load.form.tree') -@push('scripts') +@push('js') + @endpush + + @push('css') + + @endpush + + @php(define('LOAD_TREE', true)) +@endif diff --git a/resources/views/load/fancytree.blade.php b/resources/views/load/form/tree/fancytree.blade.php similarity index 100% rename from resources/views/load/fancytree.blade.php rename to resources/views/load/form/tree/fancytree.blade.php