%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
/*!
* Ajax Crud
* =================================
* Use for johnitvn/yii2-ajaxcrud extension
* @author John Martin john.itvn@gmail.com
*/
$(document).ready(function () {
// Create instance of Modal Remote
// This instance will be the controller of all business logic of modal
// Backwards compatible lookup of old ajaxCrubModal ID
if ($('#ajaxCrubModal').length > 0 && $('#ajaxCrudModal').length == 0) {
modal = new ModalRemote('#ajaxCrubModal');
} else {
modal = new ModalRemote('#ajaxCrudModal');
}
// Catch click event on all buttons that want to open a modal
$(document).on('click', '[role="modal-remote"]', function (event) {
event.preventDefault();
// Open modal
modal.open(this, null);
});
// Catch click event on all buttons that want to open a modal
// with bulk action
$(document).on('click', '[role="modal-remote-bulk"]', function (event) {
event.preventDefault();
// Collect all selected ID's
var selectedIds = [];
// See if we have a selector set
var selection = 'selection';
if ($(this).data("selector") != null) {
selection = $(this).data("selector");
}
$('input:checkbox[name="' + selection + '[]"]').each(function () {
if (this.checked)
selectedIds.push($(this).val());
});
if (selectedIds.length == 0) {
// If no selected ID's show warning
modal.show();
modal.setTitle('No selection');
modal.setContent('You must select item(s) to use this action');
modal.addFooterButton("Close", 'btn btn-default', function (button, event) {
this.hide();
});
} else {
// Open modal
modal.open(this, selectedIds);
}
});
});