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>
@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