N°4460 Fix run-query highlight color on error for Full Moon and Darkmoon

This commit is contained in:
Stephen Abello
2022-02-22 10:06:15 +01:00
parent 815870fe6b
commit 5e0c7c211b
4 changed files with 17 additions and 4 deletions

View File

@@ -12,4 +12,5 @@
@import "datamodel-viewer";
@import "csv-import";
@import "global-search";
@import "run-query";
@import "welcome-popup";

View File

@@ -0,0 +1,10 @@
/*
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-run-query--highlight--background-color: $ibo-color-primary-300 !default;
.ibo-run-query--highlight{
background-color: $ibo-run-query--highlight--background-color;
}

View File

@@ -247,3 +247,5 @@ $ibo-vendors-c3--legend--fill: $ibo-color-white-200;
$ibo-vendors-c3--legend--background-color: $ibo-color-white-100;
$ibo-vendors-c3--legend-item--fill: $ibo-color-grey-100;
$ibo-vendors-c3--axis--fill: $ibo-color-grey-200;
$ibo-run-query--highlight--background-color: $ibo-color-primary-700;

View File

@@ -66,7 +66,7 @@ function ShowExamples($oP, $sExpression)
$sDisable = '';
if ($sOql == $sExpression) {
// this one is currently being tested, highlight it
$sHighlight = "background-color:yellow;";
$sHighlight = "ibo-run-query--highlight";
$sDisable = 'disabled';
// and remember we are testing a query of the list
$bUsingExample = true;
@@ -79,8 +79,8 @@ function ShowExamples($oP, $sExpression)
$oFormButton->AddSubBlock(new Html($sContext));
//$aDisplayData[$sTopic][] = array(
$aDisplayData[Dict::S('UI:RunQuery:QueryExamples')][] = array(
'desc' => "<div style=\"$sHighlight\">".utils::EscapeHtml($sDescription)."</div>",
'oql' => "<div style=\"$sHighlight\">".utils::EscapeHtml($sOql)."</div>",
'desc' => "<div class=\"$sHighlight\">".utils::EscapeHtml($sDescription)."</div>",
'oql' => "<div class=\"$sHighlight\">".utils::EscapeHtml($sOql)."</div>",
'go' => BlockRenderer::RenderBlockTemplates($oFormButton),
);
}
@@ -313,7 +313,7 @@ EOF
$sBefore = substr($sExpression, 0, $e->GetColumn());
$sAfter = substr($sExpression, $e->GetColumn() + strlen($sWrongWord));
$sFixedExpression = $sBefore.$sSuggestedWord.$sAfter;
$sFixedExpressionHtml = $sBefore.'<span style="background-color:yellow">'.$sSuggestedWord.'</span>'.$sAfter;
$sFixedExpressionHtml = $sBefore.'<span class="ibo-run-query--highlight">'.$sSuggestedWord.'</span>'.$sAfter;
$sSyntaxErrorText .= "<p>Suggesting: $sFixedExpressionHtml</p>";
$oSyntaxErrorPanel->AddSubBlock(new Html($sSyntaxErrorText));