mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 23:54:12 -08:00
Merge branch 'develop'
This commit is contained in:
commit
167cd4e4a0
|
@ -67,7 +67,7 @@ class UsersController extends Controller
|
|||
}
|
||||
|
||||
if ($request->has('group_id')) {
|
||||
$users = $users->ByGroup($request->has('group_id'));
|
||||
$users = $users->ByGroup($request->get('group_id'));
|
||||
}
|
||||
|
||||
if ($request->has('department_id')) {
|
||||
|
|
|
@ -381,7 +381,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
|
|||
|
||||
public function scopeByGroup($query, $id) {
|
||||
return $query->whereHas('groups', function ($query) use ($id) {
|
||||
$query->where('id', '=', $id);
|
||||
$query->where('groups.id', '=', $id);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
BIN
public/css/bootstrap-tables-sticky-header.css
vendored
Normal file
BIN
public/css/bootstrap-tables-sticky-header.css
vendored
Normal file
Binary file not shown.
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
|
@ -11,10 +11,28 @@
|
|||
<script src="{{ asset('js/jspdf.plugin.autotable.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/toolbar/bootstrap-table-toolbar.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/sticky-header/bootstrap-table-sticky-header.js') }}"></script>
|
||||
@endif
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
$('.snipe-table').bootstrapTable({
|
||||
|
||||
var $table = $('.snipe-table');
|
||||
$(function () {
|
||||
buildTable($table, 20, 50);
|
||||
});
|
||||
function buildTable($el) {
|
||||
var stickyHeaderOffsetY = 0;
|
||||
|
||||
if ( $('.navbar-fixed-top').css('height') ) {
|
||||
stickyHeaderOffsetY = +$('.navbar-fixed-top').css('height').replace('px','');
|
||||
}
|
||||
if ( $('.navbar-fixed-top').css('margin-bottom') ) {
|
||||
stickyHeaderOffsetY += +$('.navbar-fixed-top').css('margin-bottom').replace('px','');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.snipe-table').bootstrapTable('destroy').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
|
@ -38,6 +56,11 @@ $('.snipe-table').bootstrapTable({
|
|||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
showExport: true,
|
||||
|
||||
stickyHeader: true,
|
||||
stickyHeaderOffsetY: stickyHeaderOffsetY + 'px',
|
||||
|
||||
|
||||
@if (isset($showFooter))
|
||||
showFooter: true,
|
||||
@endif
|
||||
|
@ -101,6 +124,8 @@ $('.snipe-table').bootstrapTable({
|
|||
},
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function dateRowCheckStyle(value) {
|
||||
|
|
|
@ -23,7 +23,8 @@ mix.styles([
|
|||
'resources/assets/css/font-awesome/font-awesome.min.css',
|
||||
'./bower_components/iCheck/skins/minimal/minimal.css',
|
||||
'./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.standalone.css',
|
||||
'public/css/overrides.css',
|
||||
'public/css/bootstrap-tables-sticky-header.css',
|
||||
'public/css/overrides.css'
|
||||
], 'public/css/dist/all.css');
|
||||
|
||||
mix.js(
|
||||
|
|
Loading…
Reference in a new issue