From 013090893d83aeb2524f8eddfc76038f997fc3c1 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 27 Feb 2015 12:28:07 +0530 Subject: [PATCH] make some input elements readonly(they can gain focus) instead of disabled --- static/js/usersDialog.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/js/usersDialog.js b/static/js/usersDialog.js index c04ad1c..c39937a 100644 --- a/static/js/usersDialog.js +++ b/static/js/usersDialog.js @@ -223,7 +223,7 @@ oml.ui.usersDialog = function() { .appendTo($form); Ox.Input({ - disabled: true, + readonly: true, label: Ox._('Your Public Key'), labelWidth: 128, value: oml.user.id, @@ -235,7 +235,7 @@ oml.ui.usersDialog = function() { .appendTo($form); Ox.Input({ - disabled: true, + readonly: true, label: Ox._('Download Link'), labelWidth: 128, value: 'http://openmedialibrary.com/#download', @@ -298,11 +298,11 @@ oml.ui.usersDialog = function() { isPeer = Ox.contains(peerIds, data.value), isValid = oml.validatePublicKey(data.value), peer = Ox.getObjectById(users, data.value), - disabled = isOwn || isPeer || !isValid; + readonly = isOwn || isPeer || !isValid; $buttons[0].options({ - disabled: disabled + readonly: readonly }); - if (data.value && disabled) { + if (data.value && readonly) { $warning.html( isOwn ? 'That\'s your own public key.' : isPeer ? 'That\'s ' @@ -326,7 +326,7 @@ oml.ui.usersDialog = function() { } else { Ox.Input({ - disabled: true, + readonly: true, label: Ox._('Username'), labelWidth: 128, value: user.username, @@ -338,7 +338,7 @@ oml.ui.usersDialog = function() { .appendTo($form); Ox.Input({ - disabled: true, + readonly: true, label: Ox._('Public Key'), labelWidth: 128, value: user.id, @@ -350,7 +350,7 @@ oml.ui.usersDialog = function() { .appendTo($form); Ox.Input({ - disabled: true, + readonly: true, label: Ox._('Contact'), labelWidth: 128, value: user.contact || '',