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} * Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
*/ */
public static final int BUILD = 3060510; public static final int BUILD = 3060511;
static { static {
// Driver for DB // Driver for DB

View file

@ -254,18 +254,18 @@ class ChartTable extends BaseChart {
.css('height', $tb.height() - 20) .css('height', $tb.height() - 20)
.perfectScrollbar() .perfectScrollbar()
// selected try {
$tb.find('table').tableCellsSelection() $tb.find('table').tableCellsSelection()
} catch (ignored) {
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' })
})
} }
// 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 this._$tb = $tb
}) })
} }

View file

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

View file

@ -624,7 +624,7 @@ class FormulaCode extends React.Component {
// 格式化显示 // 格式化显示
static textCode(code) { static textCode(code) {
code = code.substr(4, code.length - 8) // Remove {{{{ xxx }}}} 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 }} /> return <code style={{ lineHeight: 1.2 }} dangerouslySetInnerHTML={{ __html: code }} />
} }
} }