<h1>{{ trans('settings.settings') }}</h1>
- <form action="{{ baseUrl("/settings") }}" method="POST" ng-cloak>
+ <form action="{{ baseUrl("/settings") }}" method="POST">
{!! csrf_field() !!}
<h3>{{ trans('settings.app_settings') }}</h3>
<div class="form-group" id="logo-control">
<label for="setting-app-logo">{{ trans('settings.app_logo') }}</label>
<p class="small">{!! trans('settings.app_logo_desc') !!}</p>
- <image-picker resize-height="43" show-remove="true" resize-width="200" current-image="{{ setting('app-logo', '') }}" default-image="{{ baseUrl('/logo.png') }}" name="setting-app-logo" image-class="logo-image"></image-picker>
+
+ @include('components.image-picker', [
+ 'resizeHeight' => '43',
+ 'resizeWidth' => '200',
+ 'showRemove' => true,
+ 'defaultImage' => baseUrl('/logo.png'),
+ 'currentImage' => setting('app-logo'),
+ 'name' => 'setting-app-logo',
+ 'imageClass' => 'logo-image',
+ 'currentId' => false
+ ])
+
</div>
<div class="form-group" id="color-control">
<label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
</div>
-@include('partials/image-manager', ['imageType' => 'system'])
+@include('components.image-manager', ['imageType' => 'system'])
@stop
var isEmpty = $.trim($elm.val()).length === 0;
if (!isEmpty) $elm.val(hexVal);
$('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
- // Set page elements to provide preview
- $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
- $('.faded-small').css('background-color', rgbLightVal);
- $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important');
+
+ var customStyles = document.getElementById('custom-styles');
+ var oldColor = customStyles.getAttribute('data-color');
+ var oldColorLight = customStyles.getAttribute('data-color-light');
+
+ customStyles.innerHTML = customStyles.innerHTML.split(oldColor).join(hexVal);
+ customStyles.innerHTML = customStyles.innerHTML.split(oldColorLight).join(rgbLightVal);
+
+ customStyles.setAttribute('data-color', hexVal);
+ customStyles.setAttribute('data-color-light', rgbLightVal);
}
});
</script>