]> _ Git - cubist_cms-back.git/commitdiff
#2843
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Jun 2019 13:51:18 +0000 (15:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Jun 2019 13:51:18 +0000 (15:51 +0200)
src/app/helpers.php
src/public/bunchmultiple/bunchmultiple.css [new file with mode: 0644]
src/public/bunchmultiple/bunchmultiple.css.map [new file with mode: 0644]
src/resources/views/fields/bunch_multiple.blade.php

index 94828ac8dd34285cb66ef4a17c6a9381adc09c9c..e239dac17bf3f39e27c542819a9ded2b2bcc95b2 100644 (file)
@@ -2,6 +2,22 @@
 if (!function_exists('vendor_asset')) {
     function vendor_asset($path)
     {
+        $path = trim($path, '/');
+        $dest = public_path($path);
+
+        $e = explode('/', $path);
+        array_splice($e, 3, 0, ['public']);
+        $local = base_path(implode('/', $e));
+
+        if (!file_exists($local)) {
+            array_splice($e, 3, 0, ['src']);
+            $local = base_path(implode('/', $e));
+        }
+
+        if (!file_exists($dest) || filemtime($local) > filemtime($dest) || filesize($local) != filesize($dest)) {
+            copy($local, $dest);
+        }
+
         return asset($path);
     }
 }
diff --git a/src/public/bunchmultiple/bunchmultiple.css b/src/public/bunchmultiple/bunchmultiple.css
new file mode 100644 (file)
index 0000000..e222651
--- /dev/null
@@ -0,0 +1,17 @@
+.bunchmultiple .bunchmultiple__wrapper {
+  padding: 15px;
+  border: 1px solid #eee;
+  background: #fafafa;
+  margin-bottom: 15px;
+}
+.bunchmultiple .bunchmultiple__wrapper > .form-group {
+  padding: 0;
+}
+.bunchmultiple .bunchmultiple__wrapper > .form-group > label {
+  font-size: 1.2em;
+  margin-bottom: 24px;
+}
+.bunchmultiple .bunchmultiple__wrapper .sample {
+  display: none;
+}
+/*# sourceMappingURL=bunchmultiple.css.map */
\ No newline at end of file
diff --git a/src/public/bunchmultiple/bunchmultiple.css.map b/src/public/bunchmultiple/bunchmultiple.css.map
new file mode 100644 (file)
index 0000000..32c5f7f
--- /dev/null
@@ -0,0 +1 @@
+{"version":3,"sources":["bunchmultiple.less"],"names":[],"mappings":"AAAA,cACI;EACI,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,mBAAA;;AALR,cACI,wBAMI;EACI,UAAA;;AARZ,cACI,wBAMI,cAGI;EACI,gBAAA;EACA,mBAAA;;AAZhB,cACI,wBAeI;EACI,aAAA","file":"bunchmultiple.css"}
\ No newline at end of file
index 5fdfc7e1bd11bca2284903c8041d6efdcd769d15..32eec18993d590f9602cba412ee0f157ee9e8392 100644 (file)
@@ -46,12 +46,12 @@ $unique = 'bunchmultiple_' . rand(1, 100000);
 
     {{-- FIELD CSS - will be loaded in the after_styles section --}}
     @push('crud_fields_styles')
-        <link rel="stylesheet" type="text/css" href="{{ vendorasset('vendor/cubist/backpack/bunchmultiple.css') }}">
+        <link rel="stylesheet" type="text/css" href="{{ vendor_asset('vendor/cubist/backpack/bunchmultiple/bunchmultiple.css') }}">
     @endpush
 
     {{-- FIELD JS - will be loaded in the after_scripts section --}}
     @push('crud_fields_scripts')
-        <script type="text/javascript" src="{{ vendorasset('vendor/cubist/backpack/bunchmultiple.js') }}"></script>
+        <script type="text/javascript" src="{{ vendor_asset('vendor/cubist/backpack/bunchmultiple/bunchmultiple.js') }}"></script>
     @endpush
 
 @endif