summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/plugins
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-04-29 15:02:18 +0200
committerPetr Vobornik <pvoborni@redhat.com>2016-06-03 16:18:26 +0200
commitb16e59bdaa4acba7b8a190a4ca32b7a113b32cd1 (patch)
treecd5c5d27b8b4134c3d393b06561601da5c02263e /install/ui/src/freeipa/plugins
parent46e3245fdedbf88050fffa6039d176914c242418 (diff)
Change lang.hitch to javascript bind method
Also remove the dojo/_base/lang module in cases it is not needed any more. https://fedorahosted.org/freeipa/ticket/5702 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/plugins')
-rw-r--r--install/ui/src/freeipa/plugins/api_browser.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/install/ui/src/freeipa/plugins/api_browser.js b/install/ui/src/freeipa/plugins/api_browser.js
index 88dbe59c7..6fe2ee539 100644
--- a/install/ui/src/freeipa/plugins/api_browser.js
+++ b/install/ui/src/freeipa/plugins/api_browser.js
@@ -3,7 +3,6 @@
//
define(['dojo/_base/declare',
- 'dojo/_base/lang',
'dojo/on',
'../facets/Facet',
'../phases',
@@ -13,7 +12,7 @@ define(['dojo/_base/declare',
'../builder'
],
- function(declare, lang, on, Facet, phases, reg, widget,
+ function(declare, on, Facet, phases, reg, widget,
APIBrowserWidget, builder) {
@@ -54,7 +53,7 @@ plugins.api_browser.APIBrowserFacet = declare([Facet], {
this.inherited(arguments);
var browser = this.get_widget('apibrowser');
- on(this, 'show', lang.hitch(this, function(args) {
+ on(this, 'show', function(args) {
var state = this.get_state();
var t = state.type;
@@ -74,16 +73,16 @@ plugins.api_browser.APIBrowserFacet = declare([Facet], {
}
browser.show_default();
return;
- }));
+ }.bind(this));
// Reflect item change in facet state and therefore URL hash
- browser.watch('current', lang.hitch(this, function(name, old, value) {
+ browser.watch('current', function(name, old, value) {
var state = {};
if (value.type && value.name) {
state = { type: value.type, name: value.name };
}
this.set_state(state);
- }));
+ }.bind(this));
}
});
@@ -103,4 +102,4 @@ phases.on('registration', function() {
return plugins.api_browser;
-}); \ No newline at end of file
+});