SGGR#38472 mobile collapsible labels toegevoegd

svn path=/Website/trunk/; revision=34289
This commit is contained in:
2017-06-15 11:40:40 +00:00
parent 6f8b2a427c
commit bdf3d92673

View File

@@ -1397,10 +1397,12 @@ function listKenmerk(sql, module, key, props)
kenmerk_write('<td class="label' + (ktype == 'L' || ktype == 'l'? ' flexlabel' : '')+ (kenmerk_search? ' flexsearch' : '') + '"'
+ (props.label_colspan? ' colspan=' + props.label_colspan : '')
+ '>');
if (!nolabel)
kenmerk_write('<label for="' + nameprefix + idCounter + 'val" class="label' + (ktype == 'L' || ktype == 'l'? ' flexlabellabel' : '') + (isExpression ? ' expression' : '') + '">'
+ '<span title="' + safe.htmlattr(hint) + '">'
+ val_label + ((kdim != null && kdim != "xxx")? ' [' + kdim + ']' : '') + val_seperator + '</span></label>');
kenmerk_write((formobile && ktype == 'l'? '<div data-role="collapsible" data-theme="c" data-content-theme="c"><h3>' : '')
+ '<label for="' + nameprefix + idCounter + 'val" class="label' + (ktype == 'L' || ktype == 'l'? ' flexlabellabel' : '')
+ (isExpression ? ' expression' : '') + '">' + '<span title="' + safe.htmlattr(hint) + '">'
+ val_label + ((kdim != null && kdim != "xxx")? ' [' + kdim + ']' : '') + val_seperator + '</span></label>'+(formobile && ktype == 'l' ? '</h3>' : ''));
// labelwaardes (vaak invulinstructie) in apart te stylen span
if (formobile && (ktype == 'L' || ktype == 'l') && kv) {
@@ -1472,13 +1474,21 @@ function listKenmerk(sql, module, key, props)
// Collapse code er achteraan als de *volgende* een ander label is
if (allCollapsable && (oRs.Eof || oRs("kenmerk_kenmerktype").value.toUpperCase() == 'L')) // einde huidige label
{
kenmerk_write('<script>$(document).ready(function(){$("#' + nameprefix + 'clabel' + clabelCounter + '").addClass("flexcollapsed").nextUntil($("#' + nameprefix + 'clabel' + (clabelCounter + 1) + '")).hide();})</script>');
if (formobile)
kenmerk_write('</div>');
else
kenmerk_write('<script>$(document).ready(function(){$("#' + nameprefix + 'clabel' + clabelCounter + '").addClass("flexcollapsed").nextUntil($("#' + nameprefix + 'clabel' + (clabelCounter + 1) + '")).hide();})</script>');
allCollapsable = false;
}
}
oRs.close();
if (allCollapsable) // allerlaatste ook nog
kenmerk_write('<script>$(document).ready(function(){$("#' + nameprefix + 'clabel' + clabelCounter + '").addClass("flexcollapsed").nextUntil($("#' + nameprefix + 'clabel' + (clabelCounter + 1) + '")).hide();})</script>');
{
if (formobile)
kenmerk_write('</div>');
else
kenmerk_write('<script>$(document).ready(function(){$("#' + nameprefix + 'clabel' + clabelCounter + '").addClass("flexcollapsed").nextUntil($("#' + nameprefix + 'clabel' + (clabelCounter + 1) + '")).hide();})</script>');
}
var counterName = (extraserie? nameprefix + "_all" : "k_all");
if (!formobile)