mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 18:00:30 +02:00
Possible fix for issue #2351.
This commit is contained in:
@@ -173,12 +173,40 @@ $(document).ready(function()
|
||||
|
||||
$("#uiModal").draggable({
|
||||
handle: ".modal-header"
|
||||
});
|
||||
|
||||
|
||||
$('div.e-container').editable({
|
||||
selector: '.e-editable'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('div.e-container').editable({
|
||||
selector: '.e-editable',
|
||||
display: function (value, sourceData)
|
||||
{
|
||||
// HTML entities decoding... fix for:
|
||||
// @see https://github.com/e107inc/e107/issues/2351
|
||||
$.each(sourceData, function (index, element)
|
||||
{
|
||||
element.text = $("<div/>").html(element.text).text();
|
||||
sourceData[index] = element;
|
||||
});
|
||||
|
||||
// Display checklist as comma-separated values.
|
||||
var html = [];
|
||||
var checked = $.fn.editableutils.itemsByValue(value, sourceData);
|
||||
|
||||
if(checked.length)
|
||||
{
|
||||
$.each(checked, function (i, v)
|
||||
{
|
||||
html.push($.fn.editableutils.escape(v.text));
|
||||
});
|
||||
|
||||
$(this).html(html.join(', '));
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// $('.e-editable').editable();
|
||||
|
||||
|
Reference in New Issue
Block a user