[Rt-commit] rt branch, 4.2/div-name, created. rt-4.2.2-15-g3e1e3fd
? sunnavy
sunnavy at bestpractical.com
Wed Feb 5 07:45:57 EST 2014
The branch, 4.2/div-name has been created
at 3e1e3fdc76d160182a2938d24f8a1c5c1694b7bf (commit)
- Log -----------------------------------------------------------------
commit 3e1e3fdc76d160182a2938d24f8a1c5c1694b7bf
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Feb 5 20:28:38 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 c8b1a92..9e685f3 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -102,7 +102,7 @@ jQuery( function () {
% if ( $RenderType eq 'List' ) {
<fieldset class="cfedit">
-<div name="<%$name%>" id="<%$name%>">
+<div data-name="<%$name%>" id="<%$name%>">
% if ( $checktype eq 'radio' ) {
<div class="none">
<input class="none" type="<% $checktype %>" name="<% $name %>" id="<% $name %>-none" value="" <% keys %default ? '' : ' checked="checked"' |n%> />
@@ -113,7 +113,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/static/js/cascaded.js b/share/static/js/cascaded.js
index 015e821..c5ea64a 100644
--- a/share/static/js/cascaded.js
+++ b/share/static/js/cascaded.js
@@ -18,10 +18,10 @@ function filter_cascade_by_id (id, vals, is_hierarchical) {
}
else {
jQuery(element).find('div').hide().find('input').prop('disabled', true);
- jQuery(element).find('div[name=]').show().find('input').prop('disabled', false);
+ jQuery(element).find('div[data-name=]').show().find('input').prop('disabled', false);
jQuery(element).find('div.none').show().find('input').prop('disabled',false);
for ( var j = 0; j < vals.length; j++ ) {
- jQuery(element).find('div[name^=' + vals[j] + ']').show().find('input').prop('disabled', false);
+ jQuery(element).find('div[data-name^=' + vals[j] + ']').show().find('input').prop('disabled', false);
}
}
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list