(retrofit from trunk) Bug fix: support the display of HTML fields in the lists in the new portal.

SVN:2.3[4325]
This commit is contained in:
Denis Flaven
2016-08-11 09:32:07 +00:00
parent 593f1fadbe
commit 5e2e6b393c
4 changed files with 7 additions and 8 deletions

View File

@@ -545,7 +545,7 @@ class BrowseBrickController extends BrickController
$aRow[$key] = array( $aRow[$key] = array(
'level_alias' => $key, 'level_alias' => $key,
'id' => $value->GetKey(), 'id' => $value->GetKey(),
'name' => $value->Get($aLevelsProperties[$key]['name_att']), 'name' => $value->GetAsHTML($aLevelsProperties[$key]['name_att']),
'class' => get_class($value), 'class' => get_class($value),
'action_rules_token' => static::PrepareActionRulesForItem($value, $key, $aLevelsProperties) 'action_rules_token' => static::PrepareActionRulesForItem($value, $key, $aLevelsProperties)
); );
@@ -561,7 +561,7 @@ class BrowseBrickController extends BrickController
$aRow[$key]['fields'] = array(); $aRow[$key]['fields'] = array();
foreach ($aLevelsProperties[$key]['fields'] as $aField) foreach ($aLevelsProperties[$key]['fields'] as $aField)
{ {
$aRow[$key]['fields'][$aField['code']] = $value->Get($aField['code']); $aRow[$key]['fields'][$aField['code']] = $value->GetAsHTML($aField['code']);
} }
} }
} }
@@ -610,7 +610,7 @@ class BrowseBrickController extends BrickController
$aItems[$sCurrentIndex] = array( $aItems[$sCurrentIndex] = array(
'level_alias' => $aCurrentRowKeys[0], 'level_alias' => $aCurrentRowKeys[0],
'id' => $aCurrentRowValues[0]->GetKey(), 'id' => $aCurrentRowValues[0]->GetKey(),
'name' => $aCurrentRowValues[0]->Get($aLevelsProperties[$aCurrentRowKeys[0]]['name_att']), 'name' => $aCurrentRowValues[0]->GetAsHTML($aLevelsProperties[$aCurrentRowKeys[0]]['name_att']),
'class' => get_class($aCurrentRowValues[0]), 'class' => get_class($aCurrentRowValues[0]),
'subitems' => array(), 'subitems' => array(),
'action_rules_token' => static::PrepareActionRulesForItem($aCurrentRowValues[0], $aCurrentRowKeys[0], $aLevelsProperties) 'action_rules_token' => static::PrepareActionRulesForItem($aCurrentRowValues[0], $aCurrentRowKeys[0], $aLevelsProperties)

View File

@@ -389,7 +389,7 @@ class ManageBrickController extends BrickController
} }
else else
{ {
$sValue = $oAttDef->GetValueLabel($oCurrentRow->Get($sItemAttr)); $sValue = $oCurrentRow->GetAsHTML($sItemAttr);
} }
unset($oAttDef); unset($oAttDef);

View File

@@ -73,11 +73,11 @@
// For the same reason, tooltip widget is created in "drawCallback" instead of here. // For the same reason, tooltip widget is created in "drawCallback" instead of here.
if( (data.tooltip !== undefined) && (data.tooltip !== '')) if( (data.tooltip !== undefined) && (data.tooltip !== ''))
{ {
cellElem.html( $('<span></span>').attr('title', data.tooltip).attr('data-toggle', 'tooltip').text(data.name).prop('outerHTML') ); cellElem.html( $('<span></span>').attr('title', data.tooltip).attr('data-toggle', 'tooltip').html(data.name).prop('outerHTML') );
} }
else else
{ {
cellElem.text(data.name); cellElem.html(data.name);
} }
// Building actions // Building actions

View File

@@ -103,7 +103,7 @@
// Preparing the cell data // Preparing the cell data
cellElem = (itemActions.length > 0) ? $('<a></a>') : $('<span></span>'); cellElem = (itemActions.length > 0) ? $('<a></a>') : $('<span></span>');
cellElem.text(row.attributes[att_code].value); cellElem.html(row.attributes[att_code].value);
// Building actions // Building actions
if(itemActions.length > 0) if(itemActions.length > 0)
{ {
@@ -227,7 +227,6 @@
// Note : The '.off()' call is to unbind event from DataTables that where triggered before we could intercept anything // Note : The '.off()' call is to unbind event from DataTables that where triggered before we could intercept anything
$('#table-{{ sAreaId }}_filter input').off().on('keyup', function(){ $('#table-{{ sAreaId }}_filter input').off().on('keyup', function(){
var me = this; var me = this;
console.log('here');
clearTimeout(oKeyTimeout); clearTimeout(oKeyTimeout);
oKeyTimeout = setTimeout(function() { oKeyTimeout = setTimeout(function() {
oTable{{ sAreaId }}.search(me.value.latinise()).draw(); oTable{{ sAreaId }}.search(me.value.latinise()).draw();