diff --git a/ajax.toolkit.php b/ajax.toolkit.php index 47e3c16..23d629f 100644 --- a/ajax.toolkit.php +++ b/ajax.toolkit.php @@ -827,11 +827,16 @@ function InitDataModel($sConfigFileName, $bModelOnly = true) if (count($aSQLFixesTables) > 0) { - $oButtonUpCodeAndDb = ButtonUIBlockFactory::MakeForPrimaryAction("Compile + Update DB tables and views","e","πŸ“€ Update iTop code and Database! ", true,"bt_up_code_and_db"); + $oButtonUpCodeAndDb = ButtonUIBlockFactory::MakeForPrimaryAction("πŸ“€ Update iTop code and Database!",null,null, true,"bt_up_code_and_db"); $oButtonUpCodeAndDb->SetOnClickJsCode("doApply(true);"); + $oButtonUpCodeAndDb->SetTooltip("Compile + Update DB tables and views"); $oPage->AddSubBlock($oButtonUpCodeAndDb); } + $oButtonSchema = ButtonUIBlockFactory::MakeForPrimaryAction("⟳ Refresh",null, null,false, "bt_content_schema"); + $oButtonSchema->SetOnClickJsCode('CheckDBSchema(true);'); + $oButtonSchema->SetIconClass("fas fa-redo"); + $oPage->AddSubBlock($oButtonSchema); break; @@ -844,14 +849,14 @@ function InitDataModel($sConfigFileName, $bModelOnly = true) if ($bUpdateNeeded) { - $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Compute HKeys","e","Compute HKeys ", false,"bt_compute_hk"); + $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Compute HKeys",null,null, false,"bt_compute_hk"); $oButtonBuildHK->SetOnClickJsCode("BuildHK(false);"); $oButtonBuildHK->AddCSSClass("mb-5"); $oPage->AddSubBlock($oButtonBuildHK); } else { - $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Rebuild HKeys Anyway","e","Rebuild HKeys Anyway ", false,"bt_compute_hk"); + $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Rebuild HKeys Anyway",null,null, false,"bt_compute_hk"); $oButtonBuildHK->SetOnClickJsCode("BuildHK(true);"); $oButtonBuildHK->AddCSSClass("mb-5"); $oPage->AddSubBlock($oButtonBuildHK); @@ -884,7 +889,7 @@ function InitDataModel($sConfigFileName, $bModelOnly = true) ob_end_clean(); if ($bUpdateNeeded) { - $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Fix Data Sources","e","Fix Data Sources ", false,"bt_fix_DS"); + $oButtonBuildHK = ButtonUIBlockFactory::MakeForPrimaryAction("Fix Data Sources",null,null, false,"bt_fix_DS"); $oButtonBuildHK->SetOnClickJsCode("FixDataSources();"); $oPage->AddSubBlock($oButtonBuildHK); } diff --git a/index.php b/index.php index 010ed32..c4fe84c 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ function CheckConsistency() $oDivAction=UIContentBlockUIBlockFactory::MakeStandard("content_php",['ibo-is-html-content']); $oBlock->AddSubBlock($oDivAction); - $oButton=ButtonUIBlockFactory::MakeForPrimaryAction("Check Consistency","a","b",false,"bt_content_php"); + $oButton=ButtonUIBlockFactory::MakeForPrimaryAction("Check Consistency",null,null,false,"bt_content_php"); $oButton->SetOnClickJsCode('CheckConsistency(true);'); $oBlock->AddSubBlock($oButton); return $oBlock; @@ -74,7 +74,7 @@ function CheckDBSchema() $oDivAction=UIContentBlockUIBlockFactory::MakeStandard("content_schema",['ibo-is-visible']); $oFieldSetDB->AddSubBlock($oDivAction); - $oButtonSchema=ButtonUIBlockFactory::MakeForPrimaryAction("πŸ“€ Check DB Schema","a","b",false, "bt_content_schema"); + $oButtonSchema=ButtonUIBlockFactory::MakeForPrimaryAction("πŸ“€ Check DB Schema",null,null,false, "bt_content_schema"); $oButtonSchema->SetOnClickJsCode('CheckDBSchema(true);'); $oDivAction->AddSubBlock($oButtonSchema); @@ -100,8 +100,9 @@ function CheckDBSchema() } $oDivButton = UIContentBlockUIBlockFactory::MakeStandard("div_bt_compilation",['ibo-is-visible','mt-5','mb-5']); $oFieldSetCompile->AddSubBlock($oDivButton); - $oButtonCompile=ButtonUIBlockFactory::MakeForPrimaryAction("πŸ“„ Update iTop code","Compile from $sSourceDirHtml to env-production","b",false, "bt_content_apply_sql"); + $oButtonCompile=ButtonUIBlockFactory::MakeForPrimaryAction("πŸ“„ Update iTop code",null,null,false, "bt_content_apply_sql"); $oButtonCompile->SetOnClickJsCode('doApply(false);'); + $oButtonCompile->SetTooltip("Compile from $sSourceDirHtml to env-production"); $oDivButton->AddSubBlock($oButtonCompile); $oFieldSetCompile->AddSubBlock(new Html('')); @@ -134,7 +135,7 @@ function CheckDataIntegrity() $oBlock->AddSubBlock($oFieldSetDatasources); $oDivDatasources=UIContentBlockUIBlockFactory::MakeStandard("content_datasources",['ibo-is-visible']); $oFieldSetDatasources->AddSubBlock($oDivDatasources); - $oButtonDatasources=ButtonUIBlockFactory::MakeForPrimaryAction("Check Data Sources","a","b", false, "bt_content_datasources"); + $oButtonDatasources=ButtonUIBlockFactory::MakeForPrimaryAction("Check Data Sources",null,null, false, "bt_content_datasources"); $oButtonDatasources->SetOnClickJsCode('CheckDataSources(true);'); $oFieldSetDatasources->AddSubBlock($oButtonDatasources); @@ -142,7 +143,7 @@ function CheckDataIntegrity() $oBlock->AddSubBlock($oFieldSetKeys); $oDivKeys=UIContentBlockUIBlockFactory::MakeStandard("content_hk",['ibo-is-html-content']); $oFieldSetKeys->AddSubBlock($oDivKeys); - $oButtonKeys=ButtonUIBlockFactory::MakeForPrimaryAction("Check Hierarchical Keys","a","b", false, "bt_content_hk"); + $oButtonKeys=ButtonUIBlockFactory::MakeForPrimaryAction("Check Hierarchical Keys",null,null, false, "bt_content_hk"); $oButtonKeys->SetOnClickJsCode('CheckHK(true);'); $oFieldSetKeys->AddSubBlock($oButtonKeys); @@ -166,7 +167,7 @@ function CheckDictionary() $oDivAction=UIContentBlockUIBlockFactory::MakeStandard("content_dictionary",['ibo-is-visible']); $oTabComplete->AddSubBlock($oDivAction); - $oButton=ButtonUIBlockFactory::MakeForPrimaryAction("🌐 Check Dictionary","a","b"); + $oButton=ButtonUIBlockFactory::MakeForPrimaryAction("🌐 Check Dictionary"); $oButton->SetOnClickJsCode('CheckDictionary(true);'); $oButton->AddCSSClass('mt-5'); $oTabComplete->AddSubBlock($oButton); @@ -198,7 +199,7 @@ function CheckDictionary() $oInputLocalized->GetInput()->SetPlaceholder("eg. FranΓ§ais"); $oFormPrepare->AddSubBlock($oInputLocalized); - $oButtonGenerate=ButtonUIBlockFactory::MakeForPrimaryAction("Generate","a","b",false, "bt_prepare_new_dictionary"); + $oButtonGenerate=ButtonUIBlockFactory::MakeForPrimaryAction("Generate",null,null,false, "bt_prepare_new_dictionary"); $oButtonGenerate->SetOnClickJsCode(' PrepareNewDictionary(true);'); $oButtonGenerate->AddCSSClass('mb-5'); $oFormPrepare->AddSubBlock($oButtonGenerate);