hotfix: textCode, table-chart in asideWidgets, I9RURM

This commit is contained in:
RB 2024-05-24 17:43:10 +08:00
parent bcdd1e0292
commit 38875bd30f
4 changed files with 17 additions and 16 deletions

View file

@ -78,7 +78,7 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
/**
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
*/
public static final int BUILD = 3060510;
public static final int BUILD = 3060511;
static {
// Driver for DB

View file

@ -254,18 +254,18 @@ class ChartTable extends BaseChart {
.css('height', $tb.height() - 20)
.perfectScrollbar()
// selected
$tb.find('table').tableCellsSelection()
if (window.render_preview_chart) {
$tb.find('tbody td>a').removeAttr('href')
} else {
$tb.find('tbody td>a').each(function () {
const $a = $(this)
$a.attr({ href: `${rb.baseUrl}${$a.attr('href')}`, target: '_blank' })
})
try {
$tb.find('table').tableCellsSelection()
} catch (ignored) {
// 未引入
}
// a _blank
$tb.find('tbody td>a').each(function () {
const $a = $(this)
$a.attr({ href: `${rb.baseUrl}${$a.attr('href')}`, target: '_blank' })
})
this._$tb = $tb
})
}

View file

@ -30,7 +30,7 @@ const AdvFilters = {
this.__$customAdvWrap = $('#dropdown-menu-advfilter')
$(document.body).on('click', (e) => {
if (!e.target) return
var $target = $(e.target)
const $target = $(e.target)
if (
$target.hasClass('J_filterbtn') ||
$target.parent().hasClass('J_filterbtn') ||
@ -38,7 +38,8 @@ const AdvFilters = {
$target.parents('.dropdown-menu-advfilter')[0] ||
$target.hasClass('modal') ||
$target.parents('.modal')[0] ||
$target.parents('.select2-container')[0]
$target.parents('.select2-container')[0] ||
$target.hasClass('select2-selection__choice__remove')
) {
return
}
@ -48,8 +49,8 @@ const AdvFilters = {
}
})
const $alldata = $('.adv-search .dropdown-item:eq(0)')
$alldata.on('click', () => this._effectFilter($alldata, 'aside'))
const $alld = $('.adv-search .dropdown-item:eq(0)')
$alld.on('click', () => this._effectFilter($alld, 'aside'))
this.loadFilters()

View file

@ -624,7 +624,7 @@ class FormulaCode extends React.Component {
// 格式化显示
static textCode(code) {
code = code.substr(4, code.length - 8) // Remove {{{{ xxx }}}}
code = code.replace(/\n/gi, '<br/>').replace(/( )/gi, '&nbsp;')
code = code.replace(/( )/gi, '&nbsp;').replace(/</gi, '&lt;').replace(/\n/gi, '<br/>')
return <code style={{ lineHeight: 1.2 }} dangerouslySetInnerHTML={{ __html: code }} />
}
}