You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/03/28 10:47:59 UTC
[19/50] [abbrv] ignite git commit: IGNITE-2676 Minor refactoring.
IGNITE-2676 Minor refactoring.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/767a2ebf
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/767a2ebf
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/767a2ebf
Branch: refs/heads/ignite-2875
Commit: 767a2ebf42b320eff30415eed6a50e23356e60b3
Parents: b30b52b
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Mar 21 16:09:32 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Mar 21 16:09:32 2016 +0700
----------------------------------------------------------------------
.../src/main/js/app/decorator/select.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/767a2ebf/modules/control-center-web/src/main/js/app/decorator/select.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/decorator/select.js b/modules/control-center-web/src/main/js/app/decorator/select.js
index 13a4041..9a6d07b 100644
--- a/modules/control-center-web/src/main/js/app/decorator/select.js
+++ b/modules/control-center-web/src/main/js/app/decorator/select.js
@@ -24,14 +24,14 @@ import angular from 'angular';
angular.module('mgcrea.ngStrap.select')
.decorator('$select', ($delegate) => {
function SelectFactoryDecorated(element, controller, config) {
- const deligate = $delegate(element, controller, config);
+ const delegate = $delegate(element, controller, config);
// Common vars.
const options = angular.extend({}, $delegate.defaults, config);
- const scope = deligate.$scope;
+ const scope = delegate.$scope;
- const _valueMap = (index) => {
+ const valueByIndex = (index) => {
if (angular.isUndefined(scope.$matches[index]))
return null;
@@ -46,9 +46,9 @@ angular.module('mgcrea.ngStrap.select')
if (scope.$isActive(i) === active) {
selected[i] = scope.$matches[i].value;
- deligate.activate(i);
+ delegate.activate(i);
- controller.$setViewValue(scope.$activeIndex.map(_valueMap));
+ controller.$setViewValue(scope.$activeIndex.map(valueByIndex));
}
}
});
@@ -56,7 +56,7 @@ angular.module('mgcrea.ngStrap.select')
// Emit events.
for (let i = 0; i < selected.length; i++) {
if (selected[i])
- scope.$emit(options.prefixEvent + '.select', selected[i], i, deligate);
+ scope.$emit(options.prefixEvent + '.select', selected[i], i, delegate);
}
};
@@ -68,7 +68,7 @@ angular.module('mgcrea.ngStrap.select')
scope.$$postDigest(selectAll.bind(this, true));
};
- return deligate;
+ return delegate;
}
SelectFactoryDecorated.defaults = $delegate.defaults;