]> _ Git - cubist_cms-back.git/commitdiff
wait #4597 @0:15
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 20 Jul 2021 10:10:01 +0000 (12:10 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 20 Jul 2021 10:10:01 +0000 (12:10 +0200)
src/resources/views/track-non-default-values.blade.php

index cbc0852311833b29bb5962136c3a9b59baa3c0dd..b6d2badd49e4505106bd59ddf21287ae7475168b 100644 (file)
@@ -6,6 +6,9 @@
                 markChangedFields();
             });
             markChangedFields();
+            setTimeout(function () {
+                markChangedFields();
+            }, 1000);
         });
 
         function markChangedFields() {
                     $(this).addClass('non-default');
                 }
             });
+
+            $('.dropzone').each(function () {
+                if ($(this).find('.dz-preview').length > 0) {
+                    $(this).closest('.form-group').addClass('non-default');
+                } else {
+                    $(this).closest('.form-group').removeClass('non-default');
+                }
+            });
+
+            $("#form_shortcuts nav a").each(function () {
+                var hasNonDefault = $($(this).attr('href')).closest('.card').find('.non-default').length > 0;
+                if (hasNonDefault) {
+                    $(this).addClass('non-default');
+                } else {
+                    $(this).removeClass('non-default');
+                }
+            });
         }
 
     </script>
@@ -31,7 +51,7 @@
 
 @push('crud_fields_styles')
     <style type="text/css">
-        .non-default,.live-change {
+        .non-default, .live-change {
             position: relative;
         }
 
             background-color: crimson;
             width: 3px;
 
-            right: -5px;
+            left: -5px;
             top: -8px;
             bottom: -8px;
         }
 
-        .non-default.live-change:after{
-            background-color:darkorange;
+        #form_shortcuts .non-default::after {
+            left: -30px;
+            top: -0px;
+            bottom: -0px;
+        }
+
+        .non-default.live-change:after {
+            background-color: darkorange;
         }
 
-        .live-change:after{
-            background-color:darkgreen;
+        .live-change:after {
+            background-color: darkgreen;
         }
     </style>
 @endpush