Skip to content

Commit 30486cb

Browse files
authored
Merge pull request #11 from lucasmtav/master
Fix bug click button call together on click row
2 parents 8981030 + 5a3eecb commit 30486cb

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

dist/directive.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-rs-datagrid
33
*
4-
* Version: 1.0.68 - 2018-02-20T14:52:56.111Z
4+
* Version: 1.0.75 - 2018-02-26T14:22:27.040Z
55
* License: MIT
66
*/
77

dist/directive.js

Lines changed: 11 additions & 2 deletions
Large diffs are not rendered by default.

dist/directive.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/directive.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-rs-datagrid",
3-
"version": "1.0.68",
3+
"version": "1.0.75",
44
"description": "Angular directive for dataGrid with pagination in back-end and input, input-mask, chosen, combo, checkbox, multiChosen and others",
55
"repository": "[email protected]:lucrod1/angular-rs-datagrid.git",
66
"main": "dist/directive.css, dist/directive.js",

src/directive-template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h3 class="popover-title" ng-if="config.popoverRow.titleRender" ng-bind-html="ge
9595
<ng-include src="'templates/multi-chosen-select2-template.html'" ng-if="collumn.isMultiChosen"></ng-include>
9696
<!-- render buttons -->
9797
<div class="actions pull-right" ng-if="$last && buttons && buttons.length > 0">
98-
<button tooltip="{{button.tooltip}}" tooltip-append-to-body="true" data-original-title="{{button.tooltip}}" style="margin-left: 5px;" tooltip-placement="top" ng-if="isVisibleButton(button, row, $index)" type="button" ng-class="button.classButton" ng-click="button.onClick(row)" ng-repeat="button in buttons track by $index" ng-disabled="isDisabledButton(button, row, $index)">
98+
<button tooltip="{{button.tooltip}}" tooltip-append-to-body="true" data-original-title="{{button.tooltip}}" style="margin-left: 5px;" tooltip-placement="top" ng-if="isVisibleButton(button, row, $index)" type="button" ng-class="button.classButton" ng-click="clickButton(button, row)" ng-repeat="button in buttons track by $index" ng-disabled="isDisabledButton(button, row, $index)">
9999
<span ng-class="button.classIcon"></span> {{button.text}}
100100
</button>
101101
</div>

src/directive.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,15 @@ angular.module('rs.datagrid', ['ui.utils.masks', 'ui.select'])
887887
}
888888
};
889889

890+
///////////////////////////////////////////////////////////////////////////////////////////////
891+
// CALLBACK CLICK BUTTON
892+
///////////////////////////////////////////////////////////////////////////////////////////////
893+
894+
scope.clickButton = function (button, row) {
895+
event.stopImmediatePropagation();
896+
return button.onClick(row); // button is a reference of memory of the ng-repeat in template
897+
};
898+
890899
}
891900
};
892901
}])

0 commit comments

Comments
 (0)