Merge pull request #11310 from snipe/fixes/statuslabels_bulk_edit

Fixes #11308 - bulk edit on statuslabels detail page
This commit is contained in:
snipe 2022-06-14 12:55:56 -07:00 committed by GitHub
commit 766e59acde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 20 deletions

View file

@ -71,6 +71,7 @@
data-toolbar="#assetsBulkEditToolbar"
data-bulk-button-id="#bulkAssetEditButton"
data-bulk-form-id="#assetsBulkForm"
data-click-to-select="true"
data-export-options='{
"fileName": "export-{{ str_slug($category->name) }}-assets-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]

View file

@ -90,7 +90,7 @@
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
data-cookie-id-table="usersTable"
data-pagination="true"
data-id-table="#usersTable"
data-id-table="usersTable"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
@ -100,6 +100,7 @@
data-toolbar="#userBulkEditToolbar"
data-bulk-button-id="#bulkUserEditButton"
data-bulk-form-id="#usersBulkForm"
data-click-to-select="true"
id="usersTable"
class="table table-striped snipe-table"
data-url="{{route('api.users.index', ['location_id' => $location->id])}}"
@ -131,6 +132,7 @@
data-toolbar="#assetsBulkEditToolbar"
data-bulk-button-id="#bulkAssetEditButton"
data-bulk-form-id="#assetsBulkForm"
data-click-to-select="true"
id="assetsListingTable"
class="table table-striped snipe-table"
data-url="{{route('api.assets.index', ['location_id' => $location->id]) }}"

View file

@ -59,6 +59,7 @@
data-toolbar="#assetsBulkEditToolbar"
data-bulk-button-id="#bulkAssetEditButton"
data-bulk-form-id="#assetsBulkForm"
data-click-to-select="true"
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"

View file

@ -124,8 +124,7 @@
$('.snipe-table').on('uncheck.bs.table .btSelectItem', function (row, $element) {
var tableId = $(this).data('id-table');
$( "#" + tableId + "checkbox_" + $element.id).remove();
console.log("#" + tableId + "checkbox_" + $element.id);
$( "#" + tableId + "_checkbox_" + $element.id).remove();
});

View file

@ -12,23 +12,7 @@
<div class="col-md-12">
<div class="box">
<div class="box-body">
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-inline',
'id' => 'bulkForm']) }}
<div class="row">
<div class="col-md-12">
@if (Request::get('status')!='Deleted')
<div id="toolbar">
<select name="bulk_actions" class="form-control select2">
<option value="edit">{{ trans('button.edit') }}</option>
<option value="delete">{{ trans('button.delete') }}</option>
<option value="labels">{{ trans_choice('button.generate_labels', 1) }}</option>
</select>
<button class="btn btn-default" id="bulkEdit" disabled>{{ trans('button.go') }}</button>
</div>
@endif
@include('partials.asset-bulk-actions')
<table
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
@ -41,6 +25,10 @@
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"
data-toolbar="#assetsBulkEditToolbar"
data-bulk-button-id="#bulkAssetEditButton"
data-bulk-form-id="#assetsBulkForm"
data-click-to-select="true"
id="assetsListingTable"
class="table table-striped snipe-table"
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"