[Rt-commit] rt branch, 4.0/div-name, created. rt-4.0.19-10-gaed50ba

Alex Vandiver alexmv at bestpractical.com
Fri Feb 7 13:11:54 EST 2014


The branch, 4.0/div-name has been created
        at  aed50ba745992303993aaa529122c1723044dea1 (commit)

- Log -----------------------------------------------------------------
commit aed50ba745992303993aaa529122c1723044dea1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 5 20:24:29 2014 +0800

    div doesn't have "name" attribute, use "data-name" instead

diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect
index 3607e86..b343d82 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -104,7 +104,7 @@ jQuery(  function () {
 
 % if ( $RenderType eq 'List' ) {
 <fieldset class="cfedit">
-<div name="<%$id%>-Values" id="<%$id%>-Values">
+<div data-name="<%$id%>-Values" id="<%$id%>-Values">
 %   if ( $checktype eq 'radio' ) {
   <div class="none">
   <input class="none" type="<% $checktype %>" name="<% $name %>" id="<% $name %>-none" value="" <% keys %default ? '' : ' checked="checked"' |n%> />
@@ -115,7 +115,7 @@ jQuery(  function () {
 %   while ( my $value = $CFVs->Next ) {
 %     my $content = $value->Name;
 %     my $labelid = "$name-". $value->id;
-<div name="<% $value->Category || '' %>">
+<div data-name="<% $value->Category || '' %>">
   <input type="<% $checktype %>" name="<% $name %>" id="<% $labelid %>" value="<% $content %>" <% $default{ lc $content }? ' checked="checked"' : '' |n%> />
   <label for="<% $labelid %>"><% $content %></label><br />
 </div>
diff --git a/share/html/NoAuth/js/cascaded.js b/share/html/NoAuth/js/cascaded.js
index b72a33f..1611fd1 100644
--- a/share/html/NoAuth/js/cascaded.js
+++ b/share/html/NoAuth/js/cascaded.js
@@ -64,10 +64,10 @@ function filter_cascade (id, vals) {
         }
         else {
             jQuery(element).find('div').hide().find('input').attr('disabled', 'disabled');
-            jQuery(element).find('div[name=]').show().find('input').attr('disabled', '');
+            jQuery(element).find('div[data-name=]').show().find('input').attr('disabled', '');
             jQuery(element).find('div.none').show().find('input').attr('disabled','');
             for ( var j = 0; j < vals.length; j++ ) {
-                jQuery(element).find('div[name^=' + vals[j] + ']').show().find('input').attr('disabled', '');
+                jQuery(element).find('div[data-name^=' + vals[j] + ']').show().find('input').attr('disabled', '');
             }
         }
     }

-----------------------------------------------------------------------


More information about the rt-commit mailing list