summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/dialog.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-11-04 18:11:00 +0100
committerMartin Kosek <mkosek@redhat.com>2014-01-21 12:04:03 +0100
commit38cb39b67f0f504048ecfb9700db28f413e0d570 (patch)
tree591c495086194e8dafb93a1232f454c5274eb4b9 /install/ui/src/freeipa/dialog.js
parent2d1e8d2e4938a74264c471aadd6d2e350c755a7f (diff)
downloadfreeipa.git-38cb39b67f0f504048ecfb9700db28f413e0d570.tar.gz
freeipa.git-38cb39b67f0f504048ecfb9700db28f413e0d570.tar.xz
freeipa.git-38cb39b67f0f504048ecfb9700db28f413e0d570.zip
Remove last usage of jQuery UI
https://fedorahosted.org/freeipa/ticket/3904
Diffstat (limited to 'install/ui/src/freeipa/dialog.js')
-rw-r--r--install/ui/src/freeipa/dialog.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js
index eb27a05c..18e2dc50 100644
--- a/install/ui/src/freeipa/dialog.js
+++ b/install/ui/src/freeipa/dialog.js
@@ -20,7 +20,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define(['./ipa', './jquery', './text', './field', './widget'], function(IPA, $, text) {
+define([
+ 'dojo/keys',
+ './ipa',
+ './jquery',
+ './text',
+ './field',
+ './widget'],
+ function(keys, IPA, $, text) {
/**
* Opened dialogs
@@ -371,14 +378,14 @@ IPA.dialog = function(spec) {
that.on_key_down = function(event) {
if ( that.close_on_escape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
+ event.keyCode === keys.ESCAPE ) {
event.preventDefault();
that.close();
return;
}
// prevent tabbing out of dialogs
- if ( event.keyCode !== $.ui.keyCode.TAB ) {
+ if ( event.keyCode !== keys.TAB ) {
return;
}
@@ -718,7 +725,7 @@ IPA.adder_dialog = function(spec) {
type: 'text',
name: 'filter',
keyup: function(event) {
- if (event.keyCode === $.ui.keyCode.ENTER) {
+ if (event.keyCode === keys.ENTER) {
that.search();
return false;
}
@@ -1256,12 +1263,12 @@ IPA.confirm_mixin = function() {
* @param {Event} event
*/
on_key_up: function(event) {
- if (event.keyCode === $.ui.keyCode.ENTER &&
+ if (event.keyCode === keys.ENTER &&
!this.test_ignore(event) &&
!!this.on_confirm) {
event.preventDefault();
this.on_confirm();
- } else if (event.keyCode === $.ui.keyCode.ESCAPE &&
+ } else if (event.keyCode === keys.ESCAPE &&
!!this.on_cancel) {
event.preventDefault();
this.on_cancel();