Skip to content

Commit

Permalink
Fix kb revision overflowing content
Browse files Browse the repository at this point in the history
  • Loading branch information
Lainow authored and trasher committed Oct 4, 2024
1 parent e2a96d7 commit fc4894a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/KnowbaseItem_Revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ public static function showForItem(CommonDBTM $item, $withtemplate = 0)
title: __('Show revision %rev').replace(/%rev/, _this.data('rev')),
body: `<div>
<h2>\${__('Subject')}</h2>
<div>\${data.name}</div>
<div class='text-wrap text-break'>\${data.name}</div>
<h2>\${__('Content')}</h2>
<div>\${data.answer}</div>
<div class='text-wrap text-break'>\${data.answer}</div>
</div>`,
});
})
Expand Down Expand Up @@ -271,18 +271,19 @@ public static function showForItem(CommonDBTM $item, $withtemplate = 0)
</tr>
<tr>
<th>\${__('Subject')}</th>
<td class='original'>\${data['old']['name']}</td>
<td class='changed'>\${data['diff']['name']}</td>
<td class='diff'></td>
<td class='original text-wrap text-break'>\${data['old']['name']}</td>
<td class='changed text-wrap text-break'>\${data['diff']['name']}</td>
<td class='diff text-wrap text-break'></td>
</tr>
<tr>
<th>\${__('Content')}</th>
<td class='original'>\${data['old']['answer']}</td>
<td class='changed'>\${data['diff']['answer']}</td>
<td class='diff'></td>
<td class='original text-wrap text-break'>\${data['old']['answer']}</td>
<td class='changed text-wrap text-break'>\${data['diff']['answer']}</td>
<td class='diff text-wrap text-break'></td>
</tr>
</table>
</div>`,
dialogclass: 'modal-xl'
});
$('#compare_view tr').prettyTextDiff();
Expand Down

0 comments on commit fc4894a

Please sign in to comment.