Skip to content

Commit 028f382

Browse files
committed
slight refactoring
1 parent f67f3b1 commit 028f382

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ActionBar Changelog
2-
====================
2+
===================
33

44
Version 1.0.0 July 15, 2014
55
---------------------------
@@ -9,4 +9,9 @@ Version 1.0.0 July 15, 2014
99
Version 1.1.0 December 09, 2016
1010
---------------------------
1111

12-
- Request parameter "ids" change support
12+
- Update of the `ids` request parameter support
13+
14+
Version 1.1.1 March 10, 2017
15+
---------------------------
16+
17+
- Slight refactoring

Widget.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ protected function renderElements($template)
214214
$this->view->registerJs("$('#{$id} #{$this->_bulkActionsId}').change(function() {
215215
if (this.value) {
216216
var ids = $('#{$this->grid}').yiiGridView('getSelectedRows'),
217-
dataConfirm = this.options[this.selectedIndex].getAttribute('data-confirm'),
218-
opts = this.options[this.selectedIndex],
219-
url = opts.getAttribute('url');
217+
options = this.options[this.selectedIndex],
218+
dataConfirm = options.getAttribute('data-confirm'),
219+
url = options.getAttribute('url');
220220
221221
if (!ids.length) {
222222
alert('" . $this->t('widget', 'Please select one or more items from the list.') . "');
@@ -233,7 +233,7 @@ protected function renderElements($template)
233233
form.append('<input type=\"hidden\" name=' + csrfParam + ' value=' + csrfToken + ' />');
234234
}
235235
$.each(ids, function(index, id) {
236-
form.append('<input type=\"hidden\" name=\"' + (opts.getAttribute('name') ? opts.getAttribute('name') : 'ids') + '[]\" value=' + id + ' />');
236+
form.append('<input type=\"hidden\" name=\"' + (options.getAttribute('name') ? options.getAttribute('name') : 'ids') + '[]\" value=' + id + ' />');
237237
});
238238
form.appendTo('body').submit();
239239
}

0 commit comments

Comments
 (0)