mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Merge remote-tracking branch 'origin/support/3.0' into develop
# Conflicts: # core/config.class.inc.php # setup/itopdesignformat.class.inc.php
This commit is contained in:
@@ -413,7 +413,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
$oCriteria = $oSearch->GetCriteria();
|
||||
$aArgs = MetaModel::PrepareQueryArguments(array(), $oSearch->GetInternalParams(), $oSearch->GetExpectedArguments() );
|
||||
$oSearch->ResetCondition();
|
||||
$sCondition = $oCriteria->Render($aArgs);
|
||||
$sCondition = $oCriteria->RenderExpression(false, $aArgs);
|
||||
}
|
||||
} catch (Exception $e)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ abstract class Controller
|
||||
private $m_sOperation;
|
||||
/** @var string */
|
||||
private $m_sModule;
|
||||
/** @var iTopWebPage|\ajax_page */
|
||||
/** @var iTopWebPage|\AjaxPage */
|
||||
private $m_oPage;
|
||||
/** @var bool */
|
||||
private $m_bCheckDemoMode = false;
|
||||
@@ -332,7 +332,7 @@ abstract class Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an AJAX page (ajax_page)
|
||||
* Display an AJAX page (AjaxPage)
|
||||
*
|
||||
* @api
|
||||
*
|
||||
@@ -347,7 +347,7 @@ abstract class Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an AJAX page (ajax_page)
|
||||
* Display an AJAX page (AjaxPage)
|
||||
*
|
||||
* @api
|
||||
*
|
||||
|
||||
@@ -157,11 +157,11 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
}
|
||||
if ($oDataTable->GetOption("select_mode") == 'multiple')
|
||||
{
|
||||
$sSubTitle =Dict::Format('UI:Pagination:HeaderSelection', $iCount, '<span class="ibo-datatable--selected-count">0</span>');
|
||||
$sSubTitle =Dict::Format('UI:Pagination:HeaderSelection', '<span class="ibo-datatable--result-count">'.$iCount.'</span>', '<span class="ibo-datatable--selected-count">0</span>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sSubTitle = Dict::Format('UI:Pagination:HeaderNoSelection', $iCount);
|
||||
$sSubTitle = Dict::Format('UI:Pagination:HeaderNoSelection', '<span class="ibo-datatable--result-count">'.$iCount.'</span>');
|
||||
}
|
||||
$oContainer->AddSubTitleBlock(new Html($sSubTitle));
|
||||
if(isset($aExtraParams["panel_icon"]) && strlen($aExtraParams["panel_icon"]) > 0){
|
||||
|
||||
@@ -1566,29 +1566,31 @@ JS;
|
||||
*/
|
||||
protected function output_dict_entries($bReturnOutput = false)
|
||||
{
|
||||
/** @var \iBackofficeDictEntriesExtension $oExtensionInstance */
|
||||
foreach (MetaModel::EnumPlugins('iBackofficeDictEntriesExtension') as $oExtensionInstance) {
|
||||
foreach ($oExtensionInstance->GetDictEntries() as $sDictEntry) {
|
||||
$this->add_dict_entry($sDictEntry);
|
||||
}
|
||||
}
|
||||
/** @var \iBackofficeDictEntriesPrefixesExtension $oExtensionInstance */
|
||||
foreach (MetaModel::EnumPlugins('iBackofficeDictEntriesPrefixesExtension') as $oExtensionInstance) {
|
||||
foreach ($oExtensionInstance->GetDictEntriesPrefixes() as $sDictEntryPrefix) {
|
||||
$this->add_dict_entries($sDictEntryPrefix);
|
||||
}
|
||||
}
|
||||
if ((count($this->a_dict_entries) > 0) || (count($this->a_dict_entries_prefixes) > 0)) {
|
||||
if (class_exists('Dict')) {
|
||||
// The dictionary may not be available for example during the setup...
|
||||
// Create a specific dictionary file and load it as a JS script
|
||||
$sSignature = $this->get_dict_signature();
|
||||
$sJSFileName = utils::GetCachePath().$sSignature.'.js';
|
||||
if (!file_exists($sJSFileName) && is_writable(utils::GetCachePath())) {
|
||||
file_put_contents($sJSFileName, $this->get_dict_file_content());
|
||||
if ($this->sContentType != 'text/plain' && $this->sContentType != 'application/json') {
|
||||
/** @var \iBackofficeDictEntriesExtension $oExtensionInstance */
|
||||
foreach (MetaModel::EnumPlugins('iBackofficeDictEntriesExtension') as $oExtensionInstance) {
|
||||
foreach ($oExtensionInstance->GetDictEntries() as $sDictEntry) {
|
||||
$this->add_dict_entry($sDictEntry);
|
||||
}
|
||||
}
|
||||
/** @var \iBackofficeDictEntriesPrefixesExtension $oExtensionInstance */
|
||||
foreach (MetaModel::EnumPlugins('iBackofficeDictEntriesPrefixesExtension') as $oExtensionInstance) {
|
||||
foreach ($oExtensionInstance->GetDictEntriesPrefixes() as $sDictEntryPrefix) {
|
||||
$this->add_dict_entries($sDictEntryPrefix);
|
||||
}
|
||||
}
|
||||
if ((count($this->a_dict_entries) > 0) || (count($this->a_dict_entries_prefixes) > 0)) {
|
||||
if (class_exists('Dict')) {
|
||||
// The dictionary may not be available for example during the setup...
|
||||
// Create a specific dictionary file and load it as a JS script
|
||||
$sSignature = $this->get_dict_signature();
|
||||
$sJSFileName = utils::GetCachePath().$sSignature.'.js';
|
||||
if (!file_exists($sJSFileName) && is_writable(utils::GetCachePath())) {
|
||||
file_put_contents($sJSFileName, $this->get_dict_file_content());
|
||||
}
|
||||
// Load the dictionary as the first javascript file, so that other JS file benefit from the translations
|
||||
array_unshift($this->a_linked_scripts, utils::GetAbsoluteUrlAppRoot().'pages/ajax.document.php?operation=dict&s='.$sSignature);
|
||||
}
|
||||
// Load the dictionary as the first javascript file, so that other JS file benefit from the translations
|
||||
array_unshift($this->a_linked_scripts, utils::GetAbsoluteUrlAppRoot().'pages/ajax.document.php?operation=dict&s='.$sSignature);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,10 +841,6 @@ HTML;
|
||||
foreach (MetaModel::EnumPlugins('iBackofficeStyleExtension') as $oExtensionInstance) {
|
||||
$this->add_style($oExtensionInstance->GetStyle());
|
||||
}
|
||||
// - Generate necessary dict. files
|
||||
if ($this->bAddJSDict) {
|
||||
$this->output_dict_entries();
|
||||
}
|
||||
|
||||
// TODO 3.0.0 not displayed ?
|
||||
$this->GetContentLayout()->SetExtraHtmlContent(utils::FilterXSS($this->s_content));
|
||||
@@ -909,9 +905,13 @@ HTML;
|
||||
|
||||
// Components
|
||||
// Note: For now all components are either included in the layouts above or put in page through the AddUiBlock() API, so there is no need to do anything more.
|
||||
|
||||
$this->InitializeKeyboardShortcuts();
|
||||
|
||||
// - Generate necessary dict. files
|
||||
if ($this->bAddJSDict) {
|
||||
$this->output_dict_entries();
|
||||
}
|
||||
|
||||
// Variable content of the page
|
||||
$aData['aPage'] = array_merge(
|
||||
$aData['aPage'],
|
||||
|
||||
Reference in New Issue
Block a user