myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1417405 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Date Wed, 05 Dec 2012 13:08:30 GMT
Author: lofwyr
Date: Wed Dec  5 13:08:29 2012
New Revision: 1417405

URL: http://svn.apache.org/viewvc?rev=1417405&view=rev
Log:
readonly radio button aren't work
 - syntax error

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1417405&r1=1417404&r2=1417405&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Wed Dec  5 13:08:29 2012
@@ -2746,30 +2746,30 @@ Tobago.SelectOneRadio.init = function(el
     var radios = jQuery('input[name="' + ul.attr('id').replace(/:/g, '\\:') + '"]');
     radios.each(function () {
       var selectOneRadio = jQuery(this);
-      selectOneRadio.data('oldValue', selectOneRadio.attr('checked'));
+      selectOneRadio.data("oldValue", selectOneRadio.prop("checked"));
     });
     radios.click(function() {
       var selectOneRadio = jQuery(this);
-      var readonly = selectOneRadio.attr('readonly');
-      var required = selectOneRadio.attr('required');
+      var readonly = selectOneRadio.prop("readonly");
+      var required = selectOneRadio.prop("required");
       if (!required && !readonly) {
-        if (selectOneRadio.data('oldValue') == selectOneRadio.attr('checked')) {
-          selectOneRadio.attr('checked', false);
+        if (selectOneRadio.data("oldValue") == selectOneRadio.prop("checked")) {
+          selectOneRadio.prop("checked", false);
         }
-        selectOneRadio.data('oldValue', selectOneRadio.attr('checked'));
+        selectOneRadio.data("oldValue", selectOneRadio.prop("checked"));
       }
       var radios = jQuery('input[name="' + ul.attr('id').replace(/:/g, '\\:') + '"]');
       if (readonly) {
         radios.each(function () {
           var radio = jQuery(this);
-          radio.attr('checked'. radio.data('oldValue'));
+          radio.prop("checked", radio.data("oldValue"));
         });
       } else {
         radios.each(function () {
           if (this.id != selectOneRadio.get(0).id) {
             var radio = jQuery(this);
-            radio.attr('checked', false);
-            radio.data('oldValue', radio.attr('checked'));
+            radio.prop("checked", false);
+            radio.data("oldValue", radio.prop("checked"));
           }
         });
       }



Mime
View raw message