public_html/js

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Wed Apr 4 00:08:04 CEST 2012


 public_html/js/kolab_admin.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 32e406f90369cd09dcb05e81187365e89c331f28
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Apr 4 00:07:09 2012 +0200

    Only mark fields as disabled if they're actually disabled - not if they're just read-only. Resolves #670

diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index cd033ae..e9c7c2f 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -735,7 +735,8 @@ function kolab_admin()
   {
     var i, j = 0, len, elem, e = $(form_element),
       list = this.env.assoc_fields[form_element.name],
-      disabled = e.attr('disabled') || e.attr('readonly'),
+      disabled = e.attr('disabled'),
+      readonly = e.attr('readonly'),
       autocomplete = e.attr('data-autocomplete'),
       maxlength = e.attr('data-maxlength'),
       area = $('<span class="listarea"></span>');
@@ -743,7 +744,7 @@ function kolab_admin()
     e.hide();
 
     // add autocompletion input
-    if (!disabled && autocomplete) {
+    if (!disabled && !readonly && autocomplete) {
       elem = this.form_list_element(form_element.form, {
         maxlength: maxlength,
         autocomplete: autocomplete,
@@ -767,6 +768,7 @@ function kolab_admin()
         value: list[i],
         key: i,
         disabled: disabled,
+        readonly: readonly,
         maxlength: maxlength,
         autocomplete: autocomplete,
         element: e





More information about the commits mailing list