mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 10:45:54 +02:00
Fix ProcessTemplate and asmSelect issue processwire/processwire-issues#472
This commit is contained in:
@@ -619,11 +619,15 @@
|
||||
var $asmSetDesc = $icontents.find('#' + options.listItemDescClass); // first try to find by ID
|
||||
if($asmSetDesc.length == 0) $asmSetDesc = $icontents.find(':input.' + options.listItemDescClass); // then by class, if not ID
|
||||
if($asmSetDesc.length > 0) {
|
||||
$asmSetDesc = $asmSetDesc.eq(0);
|
||||
$asmSetDesc = $asmSetDesc.eq(0);
|
||||
var asmSetDesc = $('<textarea />').text($asmSetDesc.val()).html();
|
||||
var $desc = $asmItem.find('.' + options.listItemDescClass);
|
||||
var $descA = $desc.find('a'); // does it have an <a> in there?
|
||||
if($descA.length > 0) $descA.html($asmSetDesc.val());
|
||||
else $desc.html($asmSetDesc.val());
|
||||
if($descA.length > 0) {
|
||||
$descA.html(asmSetDesc);
|
||||
} else {
|
||||
$desc.html(asmSetDesc);
|
||||
}
|
||||
}
|
||||
}
|
||||
$iframe.dialog('close');
|
||||
|
File diff suppressed because one or more lines are too long
@@ -993,10 +993,10 @@ class ProcessTemplate extends Process {
|
||||
$desc = $field->label;
|
||||
$maxDesc = 30;
|
||||
if(strlen($desc) > $maxDesc) {
|
||||
$desc = $this->wire('sanitizer')->entities(substr($desc, 0, $maxDesc));
|
||||
$desc = substr($desc, 0, $maxDesc);
|
||||
$pos = strrpos($desc, ' ');
|
||||
if($pos) $desc = substr($desc, 0, strrpos($desc, ' '));
|
||||
$desc .= '…';
|
||||
$desc .= '…';
|
||||
}
|
||||
|
||||
$status = str_replace('Fieldtype', '', $field->type);
|
||||
@@ -1010,7 +1010,7 @@ class ProcessTemplate extends Process {
|
||||
|
||||
$attrs = array(
|
||||
'data-status' => $icons . $status,
|
||||
'data-desc' => $desc
|
||||
'data-desc' => $this->wire('sanitizer')->entities($desc)
|
||||
);
|
||||
|
||||
if($field->icon) {
|
||||
|
Reference in New Issue
Block a user