mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Created solution for JS translations
Also tidied up existing components and JS
This commit is contained in:
@@ -56,7 +56,8 @@
|
||||
'defaultImage' => baseUrl('/logo.png'),
|
||||
'currentImage' => setting('app-logo'),
|
||||
'name' => 'setting-app-logo',
|
||||
'imageClass' => 'logo-image'
|
||||
'imageClass' => 'logo-image',
|
||||
'currentId' => false
|
||||
])
|
||||
|
||||
</div>
|
||||
@@ -125,7 +126,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
@include('partials/image-manager', ['imageType' => 'system'])
|
||||
@include('components.image-manager', ['imageType' => 'system'])
|
||||
|
||||
@stop
|
||||
|
||||
@@ -142,10 +143,16 @@
|
||||
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>
|
||||
|
@@ -20,13 +20,13 @@
|
||||
<tr>
|
||||
<th>{{ trans('settings.role_name') }}</th>
|
||||
<th></th>
|
||||
<th class="text-right">{{ trans('settings.users') }}</th>
|
||||
<th class="text-center">{{ trans('settings.users') }}</th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td class="text-right">{{ $role->users->count() }}</td>
|
||||
<td class="text-center">{{ $role->users->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user