Skip to content

Commit

Permalink
Fix issue for checkbox when all-checked attribute value is List, to …
Browse files Browse the repository at this point in the history
…select multiple specific checkboxes.
  • Loading branch information
nirendra10695 committed Jun 11, 2018
1 parent a5eeb8d commit 774f78c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Expand Up @@ -47,6 +47,7 @@ Written in 2015 by Swapnil M Mane - swapnilmmane
Written in 2015 by Anton Akhiar - akhiar
Writter in 2015-2016 by Jens Hardings - jenshp
Written in 2016 by Mark Haney - mphaney
Written in 2018 by Nirendra Singh Panwar - nirendra10695

===========================================================================

Expand Down Expand Up @@ -80,3 +81,4 @@ Written in 2015 by Leonardo Carvalho - CarvalhoLeonardo
Written in 2015 by Anton Akhiar - akhiar
Writter in 2015-2016 by Jens Hardings - jenshp
Written in 2016 by Mark Haney - mphaney
Written in 2018 by Nirendra Singh Panwar - nirendra10695
2 changes: 1 addition & 1 deletion template/screen-macro/DefaultScreenMacros.html.ftl
Expand Up @@ -1747,7 +1747,7 @@ ${sri.renderIncludeScreen(.node["@location"], .node["@share-scope"]!)}
<#assign allChecked = ec.getResource().expandNoL10n(.node["@all-checked"]!, "")>
<#assign fullId = id>
<#if (key_index > 0)><#assign fullId = id + "_" + key_index></#if>
<span id="${fullId}"<#if containerStyle?has_content> class="${containerStyle}"</#if>><input type="checkbox" name="${curName}" value="${key?html}"<#if allChecked! == "true"> checked="checked"<#elseif currentValue?has_content && currentValue==key> checked="checked"</#if><#if .node?parent["@tooltip"]?has_content> data-toggle="tooltip" title="${ec.getResource().expand(.node?parent["@tooltip"], "")}"</#if><#if ownerForm?has_content> form="${ownerForm}"</#if>><#if options.get(key)! != ""><span class="checkbox-label" onclick="$('#${fullId}').children('input[type=checkbox]').click()" style="cursor: default">${options.get(key)}</span></#if></span>
<span id="${fullId}"<#if containerStyle?has_content> class="${containerStyle}"</#if>><input type="checkbox" name="${curName}" value="${key?html}"<#if allChecked! == "true"> checked="checked"<#elseif currentValue?has_content && (currentValue==key || currentValue.contains(key))> checked="checked"</#if><#if .node?parent["@tooltip"]?has_content> data-toggle="tooltip" title="${ec.getResource().expand(.node?parent["@tooltip"], "")}"</#if><#if ownerForm?has_content> form="${ownerForm}"</#if>><#if options.get(key)! != ""><span class="checkbox-label" onclick="$('#${fullId}').children('input[type=checkbox]').click()" style="cursor: default">${options.get(key)}</span></#if></span>
</#list>
</#macro>
Expand Down
2 changes: 1 addition & 1 deletion template/screen-macro/DefaultScreenMacros.vuet.ftl
Expand Up @@ -1441,7 +1441,7 @@ ${sri.renderIncludeScreen(.node["@location"], .node["@share-scope"]!)}
<#assign allChecked = ec.getResource().expandNoL10n(.node["@all-checked"]!, "")>
<#assign fullId = tlId>
<#if (key_index > 0)><#assign fullId = tlId + "_" + key_index></#if>
<span id="${fullId}"<#if containerStyle?has_content> class="${containerStyle}"</#if>><input type="checkbox" name="${curName}" value="${key?html}"<#if allChecked! == "true"> checked="checked"<#elseif currentValue?has_content && currentValue==key> checked="checked"</#if><#if .node?parent["@tooltip"]?has_content> data-toggle="tooltip" title="${ec.getResource().expand(.node?parent["@tooltip"], "")}"</#if><#if ownerForm?has_content> form="${ownerForm}"</#if>><#if options.get(key)! != ""><span class="checkbox-label" onclick="$('#${fullId}').children('input[type=checkbox]').click()" style="cursor: default">${options.get(key)}</span></#if></span>
<span id="${fullId}"<#if containerStyle?has_content> class="${containerStyle}"</#if>><input type="checkbox" name="${curName}" value="${key?html}"<#if allChecked! == "true"> checked="checked"<#elseif currentValue?has_content && (currentValue==key || currentValue.contains(key))> checked="checked"</#if><#if .node?parent["@tooltip"]?has_content> data-toggle="tooltip" title="${ec.getResource().expand(.node?parent["@tooltip"], "")}"</#if><#if ownerForm?has_content> form="${ownerForm}"</#if>><#if options.get(key)! != ""><span class="checkbox-label" onclick="$('#${fullId}').children('input[type=checkbox]').click()" style="cursor: default">${options.get(key)}</span></#if></span>
</#list>
</#macro>

Expand Down

0 comments on commit 774f78c

Please sign in to comment.