Merge remote-tracking branch 'origin/datatable' into feature/backoffice-full-moon-design

This commit is contained in:
Eric
2020-11-16 15:24:07 +01:00
101 changed files with 3838 additions and 1521 deletions

View File

@@ -17,9 +17,11 @@
* You should have received a copy of the GNU Affero General Public License
*/
use Combodo\iTop\Application\Search\SearchForm;
use Combodo\iTop\Application\UI\Component\Alert\AlertFactory;
use Combodo\iTop\Application\UI\Component\Button\Button;
use Combodo\iTop\Application\UI\Component\Button\ButtonFactory;
use Combodo\iTop\Application\UI\Component\DataTable\DataTableSettings;
use Combodo\iTop\Application\UI\Component\Field\Field;
use Combodo\iTop\Application\UI\Component\FieldSet\FieldSet;
use Combodo\iTop\Application\UI\Component\Form\Form;
@@ -50,13 +52,15 @@ require_once(APPROOT.'application/ui.linksdirectwidget.class.inc.php');
require_once(APPROOT.'application/ui.passwordwidget.class.inc.php');
require_once(APPROOT.'application/ui.extkeywidget.class.inc.php');
require_once(APPROOT.'application/ui.htmleditorwidget.class.inc.php');
require_once(APPROOT.'application/datatable.class.inc.php');
require_once(APPROOT.'sources/application/search/searchform.class.inc.php');
require_once(APPROOT.'sources/application/search/criterionparser.class.inc.php');
require_once(APPROOT.'sources/application/search/criterionconversionabstract.class.inc.php');
require_once(APPROOT.'sources/application/search/criterionconversion/criteriontooql.class.inc.php');
require_once(APPROOT.'sources/application/search/criterionconversion/criteriontosearchform.class.inc.php');
use Combodo\iTop\Application\UI\Component\DataTable\DataTableFactory;
use Combodo\iTop\Renderer\Console\ConsoleFormRenderer;
/**
* Class cmdbAbstractObject
*/
@@ -389,11 +393,11 @@ EOF
$aIcons[] = "<div class=\"tag\" title=\"$sTitle\"><span class=\"object-obsolete fas fa-eye-slash fa-1x\">&nbsp;</span>&nbsp;$sLabel</div>";
}
if (count($aIcons) > 0) {
$sTags = '<div class="tags">'.implode('&nbsp;', $aIcons).'</div>';
} else {
$sTags = '';
}
// if (count($aIcons) > 0) {
// $sTags = '<div class="tags">'.implode('&nbsp;', $aIcons).'</div>';
// } else {
// $sTags = '';
// }
$oPage->AddUiBlock(TitleFactory::MakeForObjectDetails($this));
}
@@ -1042,7 +1046,7 @@ HTML
*/
public static function DisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oPage->add(self::GetDisplaySet($oPage, $oSet, $aExtraParams));
$oPage->AddUiBlock(self::GetDisplaySetBlock($oPage, $oSet, $aExtraParams));
}
/**
@@ -1100,14 +1104,16 @@ HTML
*
* @throws \CoreException*@throws \Exception
* @throws \ApplicationException
* @deprecated 3.0.0 use GetDisplaySetBlock
*/
public static function GetDisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
if ($oPage->IsPrintableVersion() || $oPage->is_pdf())
{
return self::GetDisplaySetForPrinting($oPage, $oSet, $aExtraParams);
$oPage->AddUiBlock(static::GetDisplaySetBlock( $oPage, $oSet, $aExtraParams ));
return "";
}
public static function GetDisplaySetBlock(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
if (empty($aExtraParams['currentId']))
{
$iListId = $oPage->GetUniqueId(); // Works only if not in an Ajax page !!
@@ -1117,136 +1123,8 @@ HTML
$iListId = $aExtraParams['currentId'];
}
// Initialize and check the parameters
$bViewLink = isset($aExtraParams['view_link']) ? $aExtraParams['view_link'] : true;
$sLinkageAttribute = isset($aExtraParams['link_attr']) ? $aExtraParams['link_attr'] : '';
$iLinkedObjectId = isset($aExtraParams['object_id']) ? $aExtraParams['object_id'] : 0;
$sTargetAttr = isset($aExtraParams['target_attr']) ? $aExtraParams['target_attr'] : '';
if (!empty($sLinkageAttribute))
{
if ($iLinkedObjectId == 0)
{
// if 'links' mode is requested the id of the object to link to must be specified
throw new ApplicationException(Dict::S('UI:Error:MandatoryTemplateParameter_object_id'));
}
if ($sTargetAttr == '')
{
// if 'links' mode is requested the d of the object to link to must be specified
throw new ApplicationException(Dict::S('UI:Error:MandatoryTemplateParameter_target_attr'));
}
}
$bDisplayMenu = isset($aExtraParams['menu']) ? $aExtraParams['menu'] == true : true;
$bSelectMode = isset($aExtraParams['selection_mode']) ? $aExtraParams['selection_mode'] == true : false;
$bSingleSelectMode = isset($aExtraParams['selection_type']) ? ($aExtraParams['selection_type'] == 'single') : false;
$aExtraFieldsRaw = isset($aExtraParams['extra_fields']) ? explode(',',
trim($aExtraParams['extra_fields'])) : array();
$aExtraFields = array();
foreach($aExtraFieldsRaw as $sFieldName)
{
// Ignore attributes not of the main queried class
if (preg_match('/^(.*)\.(.*)$/', $sFieldName, $aMatches))
{
$sClassAlias = $aMatches[1];
$sAttCode = $aMatches[2];
if ($sClassAlias == $oSet->GetFilter()->GetClassAlias())
{
$aExtraFields[] = $sAttCode;
}
}
else
{
$aExtraFields[] = $sFieldName;
}
}
$sClassName = $oSet->GetFilter()->GetClass();
$sZListName = isset($aExtraParams['zlist']) ? ($aExtraParams['zlist']) : 'list';
if ($sZListName !== false)
{
$aList = self::FlattenZList(MetaModel::GetZListItems($sClassName, $sZListName));
$aList = array_merge($aList, $aExtraFields);
}
else
{
$aList = $aExtraFields;
}
// Filter the list to removed linked set since we are not able to display them here
foreach($aList as $index => $sAttCode)
{
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
if ($oAttDef instanceof AttributeLinkedSet)
{
// Removed from the display list
unset($aList[$index]);
}
}
if (!empty($sLinkageAttribute))
{
// The set to display is in fact a set of links between the object specified in the $sLinkageAttribute
// and other objects...
// The display will then group all the attributes related to the link itself:
// | Link_attr1 | link_attr2 | ... || Object_attr1 | Object_attr2 | Object_attr3 | .. | Object_attr_n |
$aDisplayList = array();
$aAttDefs = MetaModel::ListAttributeDefs($sClassName);
assert(isset($aAttDefs[$sLinkageAttribute]));
$oAttDef = $aAttDefs[$sLinkageAttribute];
assert($oAttDef->IsExternalKey());
// First display all the attributes specific to the link record
foreach($aList as $sLinkAttCode)
{
$oLinkAttDef = $aAttDefs[$sLinkAttCode];
if ((!$oLinkAttDef->IsExternalKey()) && (!$oLinkAttDef->IsExternalField()))
{
$aDisplayList[] = $sLinkAttCode;
}
}
// Then display all the attributes neither specific to the link record nor to the 'linkage' object (because the latter are constant)
foreach($aList as $sLinkAttCode)
{
$oLinkAttDef = $aAttDefs[$sLinkAttCode];
if (($oLinkAttDef->IsExternalKey() && ($sLinkAttCode != $sLinkageAttribute))
|| ($oLinkAttDef->IsExternalField() && ($oLinkAttDef->GetKeyAttCode() != $sLinkageAttribute)))
{
$aDisplayList[] = $sLinkAttCode;
}
}
// First display all the attributes specific to the link
// Then display all the attributes linked to the other end of the relationship
$aList = $aDisplayList;
}
$sSelectMode = 'none';
if ($bSelectMode)
{
$sSelectMode = $bSingleSelectMode ? 'single' : 'multiple';
}
$sClassAlias = $oSet->GetClassAlias();
$bDisplayLimit = isset($aExtraParams['display_limit']) ? $aExtraParams['display_limit'] : true;
$sTableId = isset($aExtraParams['table_id']) ? $aExtraParams['table_id'] : null;
$aClassAliases = array($sClassAlias => $sClassName);
$oDataTable = new DataTable($iListId, $oSet, $aClassAliases, $sTableId);
$oSettings = DataTableSettings::GetDataModelSettings($aClassAliases, $bViewLink, array($sClassAlias => $aList));
if ($bDisplayLimit)
{
$iDefaultPageSize = appUserPreferences::GetPref('default_page_size',
MetaModel::GetConfig()->GetMinDisplayLimit());
$oSettings->iDefaultPageSize = $iDefaultPageSize;
}
else
{
$oSettings->iDefaultPageSize = 0;
}
$oSettings->aSortOrder = MetaModel::GetOrderByDefault($sClassName);
return $oDataTable->Display($oPage, $oSettings, $bDisplayMenu, $sSelectMode, $bViewLink, $aExtraParams);
return DataTableFactory::MakeForResult($oPage, $iListId, $oSet, $aExtraParams);
}
/**
* @param \WebPage $oPage
* @param \CMDBObjectSet $oSet
@@ -1265,6 +1143,7 @@ HTML
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
* @deprecated since 3.0.0
*/
public static function GetDisplayExtendedSet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
@@ -1844,7 +1723,7 @@ HTML
*/
public static function GetSearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oSearchForm = new \Combodo\iTop\Application\Search\SearchForm();
$oSearchForm = new SearchForm();
return $oSearchForm->GetSearchForm($oPage, $oSet, $aExtraParams);
}
@@ -2266,7 +2145,7 @@ EOF
$sHTMLValue .= "<input name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" type=\"hidden\" id=\"$iId\" value=\"\"/>\n";
$oForm = $value->GetForm($sFormPrefix);
$oRenderer = new \Combodo\iTop\Renderer\Console\ConsoleFormRenderer($oForm);
$oRenderer = new ConsoleFormRenderer($oForm);
$aRenderRes = $oRenderer->Render();
$aFieldSetOptions = array(
@@ -2537,8 +2416,7 @@ JS
if (isset($aExtraParams['wizard_container']) && $aExtraParams['wizard_container']) {
$sClassLabel = MetaModel::GetName($sClass);
$sHeaderTitle = Dict::Format('UI:ModificationTitle_Class_Object', $sClassLabel,
$this->GetName());
//$sHeaderTitle = Dict::Format('UI:ModificationTitle_Class_Object', $sClassLabel, $this->GetName());
$oPage->set_title(Dict::Format('UI:ModificationPageTitle_Object_Class', $this->GetRawName(),
$sClassLabel)); // Set title will take care of the encoding
@@ -2615,6 +2493,7 @@ CSS
$oForm->AddSubBlock(InputFactory::MakeForHidden('id', $iKey, "{$sPrefix}_id"));
}
$oForm->AddSubBlock(InputFactory::MakeForHidden('operation', $sOperation));
$oForm->AddSubBlock(InputFactory::MakeForHidden('class', $sClass));
$oCancelButton = ButtonFactory::MakeForSecondaryAction(Dict::S('UI:Button:Cancel'));
$oCancelButton->AddCSSClasses('action cancel');
@@ -2648,6 +2527,7 @@ CSS
$sButtonsPosition = MetaModel::GetConfig()->Get('buttons_position');
$iTransactionId = isset($aExtraParams['transaction_id']) ? $aExtraParams['transaction_id'] : utils::GetNewTransactionId();
$oPage->SetTransactionId($iTransactionId);
$oForm->AddSubBlock(InputFactory::MakeForHidden('transaction_id', $iTransactionId));
$sStatesSelection = '';
if (!isset($aExtraParams['custom_operation']) && $this->IsNew())
{
@@ -4315,12 +4195,9 @@ EOF
if ((!$bEditMode) || ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE)))
{
// Check if the attribute is not read-only because of a synchro...
$sSynchroIcon = '';
if ($iFlags & OPT_ATT_SLAVE)
{
$aReasons = array();
$iSynchroFlags = $this->GetSynchroReplicaFlags($sAttCode, $aReasons);
$sSynchroIcon = "&nbsp;<img id=\"synchro_$sInputId\" src=\"../images/transp-lock.png\" style=\"vertical-align:middle\"/>";
$sTip = '';
foreach($aReasons as $aRow)
{
@@ -4339,7 +4216,6 @@ EOF
$sHTMLValue .= '<input type="hidden" id="'.$sInputId.'" name="attr_'.$sPrefix.$sAttCode.'" value="'.htmlentities($this->GetEditValue($sAttCode),
ENT_QUOTES, 'UTF-8').'"/>';
$aFieldsMap[$sAttCode] = $sInputId;
$sComment .= $sSynchroIcon;
}
else
{
@@ -4388,7 +4264,6 @@ HTML
public function GetExpectedAttributes($sCurrentState, $sStimulus, $bOnlyNewOnes)
{
$aTransitions = $this->EnumTransitions();
$aStimuli = MetaModel::EnumStimuli(get_class($this));
if (!isset($aTransitions[$sStimulus]))
{
// Invalid stimulus
@@ -4709,6 +4584,7 @@ EOF
*/
public static function DoBulkModify($oP, $sClass, $aSelectedObj, $sCustomOperation, $bPreview, $sCancelUrl, $aContextData = array())
{
/** @var string[] $aHeaders */
$aHeaders = array(
'form::select' => array(
'label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList:not(:disabled)', this.checked);\"></input>",
@@ -4745,7 +4621,7 @@ EOF
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
foreach($aSelectedObj as $iId)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
/** @var \cmdbAbstractObject $oObj */
$oObj = MetaModel::GetObject($sClass, $iId);
$aErrors = $oObj->UpdateObjectFromPostedForm('');
@@ -4777,14 +4653,13 @@ EOF
$oObj->DBUpdate();
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$oP->Table($aHeaders, $aRows);
if ($bPreview)
{
$sFormAction = utils::GetAbsoluteUrlAppRoot().'pages/UI.php'; // No parameter in the URL, the only parameter will be the ones passed through the form
// Form to submit:
$oP->add("<form method=\"post\" action=\"$sFormAction\" enctype=\"multipart/form-data\">\n");
$aDefaults = utils::ReadParam('default', array());
$oAppContext = new ApplicationContext();
$oP->add($oAppContext->GetForForm());
foreach($aContextData as $sKey => $value)
@@ -5000,7 +4875,6 @@ EOF
if (count($aObjects) == 1)
{
$oObj = $aObjects[0];
$id = $oObj->GetKey();
$oP->p('<h1>'.Dict::Format('UI:Delect:Confirm_Object', $oObj->GetHyperLink()).'</h1>');
}
else

View File

@@ -20,6 +20,8 @@
use Combodo\iTop\Application\UI\Component\Button\ButtonFactory;
use Combodo\iTop\Application\UI\Component\Toolbar\Toolbar;
use Combodo\iTop\Application\UI\Component\DataTable\DataTableSettings;
require_once(APPROOT.'application/dashboardlayout.class.inc.php');
require_once(APPROOT.'application/dashlet.class.inc.php');
require_once(APPROOT.'core/modelreflection.class.inc.php');

View File

@@ -28,7 +28,7 @@ class DataTable
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
protected $oSet; // The set of objects to display
protected $aClassAliases; // The aliases (alias => class) inside the set
protected $iNbObjects; // Total number of objects inthe set
protected $iNbObjects; // Total number of objects in the set
protected $bUseCustomSettings; // Whether or not the current display uses custom settings
protected $oDefaultSettings; // the default settings for displaying such a list
protected $bShowObsoleteData;
@@ -211,7 +211,7 @@ class DataTable
return $sHtml;
}
/**
* When refreshing the body of a paginated table, get the rows of the table (inside the TBODY)
* return string The HTML rows to insert inside the <tbody> node
@@ -525,6 +525,7 @@ EOF;
return $aAttribs;
}
/**
* @param $aColumns
* @param $sSelectMode
@@ -872,396 +873,3 @@ class PrintableDataTable extends DataTable
return $sHtml;
}
}
class DataTableSettings implements Serializable
{
public $aClassAliases;
public $sTableId;
public $iDefaultPageSize;
public $aColumns;
/**
* DataTableSettings constructor.
*
* @param $aClassAliases
* @param null $sTableId
*/
public function __construct($aClassAliases, $sTableId = null)
{
$this->aClassAliases = $aClassAliases;
$this->sTableId = $sTableId;
$this->iDefaultPageSize = 10;
$this->aColumns = array();
}
/**
* @param $iDefaultPageSize
* @param $aSortOrder
* @param $aColumns
*/
protected function Init($iDefaultPageSize, $aSortOrder, $aColumns)
{
$this->iDefaultPageSize = $iDefaultPageSize;
$this->aColumns = $aColumns;
$this->FixVisibleColumns();
}
/**
* @return string
*/
public function serialize()
{
// Save only the 'visible' columns
$aColumns = array();
foreach($this->aClassAliases as $sAlias => $sClass)
{
$aColumns[$sAlias] = array();
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
{
unset($aData['label']); // Don't save the display name
unset($aData['alias']); // Don't save the alias (redundant)
unset($aData['code']); // Don't save the code (redundant)
if ($aData['checked'])
{
$aColumns[$sAlias][$sAttCode] = $aData;
}
}
}
return serialize(
array(
'iDefaultPageSize' => $this->iDefaultPageSize,
'aColumns' => $aColumns,
)
);
}
/**
* @param string $sData
*
* @throws \Exception
*/
public function unserialize($sData)
{
$aData = unserialize($sData);
$this->iDefaultPageSize = $aData['iDefaultPageSize'];
$this->aColumns = $aData['aColumns'];
foreach($this->aClassAliases as $sAlias => $sClass)
{
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
{
$aFieldData = false;
if ($sAttCode == '_key_')
{
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, null, true /* bChecked */, $aData['sort']);
}
else if (MetaModel::isValidAttCode($sClass, $sAttCode))
{
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, true /* bChecked */, $aData['sort']);
}
if ($aFieldData)
{
$this->aColumns[$sAlias][$sAttCode] = $aFieldData;
}
else
{
unset($this->aColumns[$sAlias][$sAttCode]);
}
}
}
$this->FixVisibleColumns();
}
/**
* @param $aClassAliases
* @param $bViewLink
* @param $aDefaultLists
*
* @return \DataTableSettings
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
public static function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
{
$oSettings = new DataTableSettings($aClassAliases);
// Retrieve the class specific settings for each class/alias based on the 'list' ZList
//TODO let the caller pass some other default settings (another Zlist, extre fields...)
$aColumns = array();
foreach ($aClassAliases as $sAlias => $sClass)
{
if ($aDefaultLists == null)
{
$aList = cmdbAbstract::FlattenZList(MetaModel::GetZListItems($sClass, 'list'));
}
else
{
$aList = $aDefaultLists[$sAlias];
}
$aSortOrder = MetaModel::GetOrderByDefault($sClass);
if ($bViewLink)
{
$sSort = 'none';
if(array_key_exists('friendlyname', $aSortOrder))
{
$sSort = $aSortOrder['friendlyname'] ? 'asc' : 'desc';
}
$sNormalizedFName = MetaModel::NormalizeFieldSpec($sClass, 'friendlyname');
if(array_key_exists($sNormalizedFName, $aSortOrder))
{
$sSort = $aSortOrder[$sNormalizedFName] ? 'asc' : 'desc';
}
$aColumns[$sAlias]['_key_'] = $oSettings->GetFieldData($sAlias, '_key_', null, true /* bChecked */, $sSort);
}
foreach($aList as $sAttCode)
{
$sSort = 'none';
if(array_key_exists($sAttCode, $aSortOrder))
{
$sSort = $aSortOrder[$sAttCode] ? 'asc' : 'desc';
}
$oAttDef = Metamodel::GetAttributeDef($sClass, $sAttCode);
$aFieldData = $oSettings->GetFieldData($sAlias, $sAttCode, $oAttDef, true /* bChecked */, $sSort);
if ($aFieldData) $aColumns[$sAlias][$sAttCode] = $aFieldData;
}
}
$iDefaultPageSize = appUserPreferences::GetPref('default_page_size', MetaModel::GetConfig()->GetMinDisplayLimit());
$oSettings->Init($iDefaultPageSize, $aSortOrder, $aColumns);
return $oSettings;
}
/**
* @throws \CoreException
*/
protected function FixVisibleColumns()
{
foreach($this->aClassAliases as $sAlias => $sClass)
{
if (!isset($this->aColumns[$sAlias]))
{
continue;
}
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
{
// Remove non-existent columns
// TODO: check if the existing ones are still valid (in case their type changed)
if (($sAttCode != '_key_') && (!MetaModel::IsValidAttCode($sClass, $sAttCode)))
{
unset($this->aColumns[$sAlias][$sAttCode]);
}
}
$aList = MetaModel::ListAttributeDefs($sClass);
// Add the other (non visible ones), sorted in alphabetical order
$aTempData = array();
foreach($aList as $sAttCode => $oAttDef)
{
if ( (!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!($oAttDef instanceof AttributeLinkedSet || $oAttDef instanceof AttributeDashboard)))
{
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, false /* bChecked */, 'none');
if ($aFieldData) $aTempData[$aFieldData['label']] = $aFieldData;
}
}
ksort($aTempData);
foreach($aTempData as $sLabel => $aFieldData)
{
$this->aColumns[$sAlias][$aFieldData['code']] = $aFieldData;
}
}
}
/**
* @param $aClassAliases
* @param null $sTableId
* @param bool $bOnlyOnTable
*
* @return \DataTableSettings|null
* @throws \Exception
*/
static public function GetTableSettings($aClassAliases, $sTableId = null, $bOnlyOnTable = false)
{
$pref = null;
$oSettings = new DataTableSettings($aClassAliases, $sTableId);
if ($sTableId != null)
{
// An identified table, let's fetch its own settings (if any)
$pref = appUserPreferences::GetPref($oSettings->GetPrefsKey($sTableId), null);
}
if ($pref == null)
{
if (!$bOnlyOnTable)
{
// Try the global preferred values for this class / set of classes
$pref = appUserPreferences::GetPref($oSettings->GetPrefsKey(null), null);
}
if ($pref == null)
{
// no such settings, use the default values provided by the data model
return null;
}
}
$oSettings->unserialize($pref);
return $oSettings;
}
/**
* @return array
*/
public function GetSortOrder()
{
$aSortOrder = array();
foreach($this->aColumns as $sAlias => $aColumns)
{
foreach($aColumns as $aColumn)
{
if ($aColumn['sort'] != 'none')
{
$sCode = ($aColumn['code'] == '_key_') ? 'friendlyname' : $aColumn['code'];
$aSortOrder[$sCode] = ($aColumn['sort']=='asc'); // true for ascending, false for descending
}
}
break; // TODO: For now the Set object supports only sorting on the first class of the set
}
return $aSortOrder;
}
/**
* @param null $sTargetTableId
*
* @return bool
*/
public function Save($sTargetTableId = null)
{
$sSaveId = is_null($sTargetTableId) ? $this->sTableId : $sTargetTableId;
if ($sSaveId == null) return false; // Cannot save, the table is not identified, use SaveAsDefault instead
$sSettings = $this->serialize();
appUserPreferences::SetPref($this->GetPrefsKey($sSaveId), $sSettings);
return true;
}
/**
* @return bool
*/
public function SaveAsDefault()
{
$sSettings = $this->serialize();
appUserPreferences::SetPref($this->GetPrefsKey(null), $sSettings);
return true;
}
/**
* Clear the preferences for this particular table
* @param $bResetAll boolean If true,the settings for all tables of the same class(es)/alias(es) are reset
*/
public function ResetToDefault($bResetAll)
{
if (($this->sTableId == null) && (!$bResetAll)) return false; // Cannot reset, the table is not identified, use force $bResetAll instead
if ($bResetAll)
{
// Turn the key into a suitable PCRE pattern
$sKey = $this->GetPrefsKey(null);
$sPattern = str_replace(array('|'), array('\\|'), $sKey); // escape the | character
$sPattern = '#^'.str_replace(array('*'), array('.*'), $sPattern).'$#'; // Don't use slash as the delimiter since it's used in our key to delimit aliases
appUserPreferences::UnsetPref($sPattern, true);
}
else
{
appUserPreferences::UnsetPref($this->GetPrefsKey($this->sTableId), false);
}
return true;
}
/**
* @param null $sTableId
*
* @return string
*/
protected function GetPrefsKey($sTableId = null)
{
return static::GetAppUserPreferenceKey($this->aClassAliases, $sTableId);
}
public static function GetAppUserPreferenceKey($aClassAliases, $sTableId)
{
if ($sTableId === null)
{
$sTableId = '*';
}
$aKeys = array();
foreach($aClassAliases as $sAlias => $sClass)
{
$aKeys[] = $sAlias.'-'.$sClass;
}
return implode('/', $aKeys).'|'.$sTableId;
}
/**
* @param $sAlias
* @param $sAttCode
* @param $oAttDef
* @param $bChecked
* @param $sSort
*
* @return array|bool
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
protected function GetFieldData($sAlias, $sAttCode, $oAttDef, $bChecked, $sSort)
{
$ret = false;
if ($sAttCode == '_key_')
{
$sLabel = Dict::Format('UI:ExtKey_AsLink', MetaModel::GetName($this->aClassAliases[$sAlias]));
$ret = array(
'label' => $sLabel,
'checked' => true,
'disabled' => true,
'alias' => $sAlias,
'code' => $sAttCode,
'sort' => $sSort,
);
}
else if (!$oAttDef->IsLinkSet())
{
$sLabel = $oAttDef->GetLabel();
if ($oAttDef->IsExternalKey())
{
$sLabel = Dict::Format('UI:ExtKey_AsLink', $oAttDef->GetLabel());
}
else if ($oAttDef->IsExternalField())
{
if ($oAttDef->IsFriendlyName())
{
$sLabel = Dict::Format('UI:ExtKey_AsFriendlyName', $oAttDef->GetLabel());
}
else
{
$oExtAttDef = $oAttDef->GetExtAttDef();
$sLabel = Dict::Format('UI:ExtField_AsRemoteField', $oAttDef->GetLabel(), $oExtAttDef->GetLabel());
}
}
elseif ($oAttDef instanceof AttributeFriendlyName)
{
$sLabel = Dict::Format('UI:ExtKey_AsFriendlyName', $oAttDef->GetLabel());
}
$ret = array(
'label' => $sLabel,
'checked' => $bChecked,
'disabled' => false,
'alias' => $sAlias,
'code' => $sAttCode,
'sort' => $sSort,
);
}
return $ret;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -15,6 +15,7 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
use Combodo\iTop\Application\UI\Component\DataTable\DataTableSettings;
/**

View File

@@ -184,7 +184,7 @@ class UILinksWidgetDirect
// For security reasons: check that the "proposed" class is actually a subclass of the linked class
// and that the current user is allowed to create objects of this class
$sRealClass = '';
$oPage->add('<div class="wizContainer" style="vertical-align:top;"><div>');
//$oPage->add('<div class="wizContainer" style="vertical-align:top;"><div>');
$aSubClasses = MetaModel::EnumChildClasses($this->sLinkedClass, ENUM_CHILD_CLASSES_ALL); // Including the specified class itself
$aPossibleClasses = array();
foreach($aSubClasses as $sCandidateClass)
@@ -294,7 +294,7 @@ class UILinksWidgetDirect
*/
public function GetObjectsSelectionDlg($oPage, $oCurrentObj, $aAlreadyLinked, $aPrefillFormParam = array())
{
$oPage->add("<div class=\"wizContainer\" style=\"vertical-align:top;\">\n");
//$oPage->add("<div class=\"wizContainer\" style=\"vertical-align:top;\">\n");
$oHiddenFilter = new DBObjectSearch($this->sLinkedClass);
if (($oCurrentObj != null) && MetaModel::IsSameFamilyBranch($this->sLinkedClass, $this->sClass)) {
@@ -355,7 +355,6 @@ class UILinksWidgetDirect
<input type="hidden" id="count_{$this->sInputid}" value="0"/>
<button type="button" class="cancel">{$sCancel}</button>&nbsp;&nbsp;<button type="button" class="ok" disabled="disabled">{$sAdd}</button>
</form>
</div>
HTML
);
}

View File

@@ -24,6 +24,10 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\Application\UI\Component\DataTable\DataTableFactory;
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\FormTableRow\FormTableRow;
use Combodo\iTop\Renderer\BlockRenderer;
require_once(APPROOT.'application/displayblock.class.inc.php');
class UILinksWidget
@@ -335,67 +339,30 @@ JS
);
}
/**
* Display one row of the whole form
*
* @param WebPage $oP
* @param array $aConfig
* @param array $aRow
* @param int $iRowId
*
* @return string
*/
protected function DisplayFormRow(WebPage $oP, $aConfig, $aRow, $iRowId)
{
$sHtml = '';
$sHtml .= "<tr id=\"{$this->m_sAttCode}{$this->m_sNameSuffix}_row_$iRowId\">\n";
foreach($aConfig as $sName=>$void)
{
$sHtml .= "<td>".$aRow[$sName]."</td>\n";
}
$sHtml .= "</tr>\n";
return $sHtml;
}
/**
* Display the table with the form for editing all the links at once
*
* @param WebPage $oP The web page used for the output
* @param array $aConfig The table's header configuration
* @param array $aData The tabular data to be displayed
*
* @return string Html fragment representing the form table
* @throws \ReflectionException
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
protected function DisplayFormTable(WebPage $oP, $aConfig, $aData)
{
$sHtml = "<input type=\"hidden\" name=\"attr_{$this->m_sAttCode}{$this->m_sNameSuffix}\" value=\"\">";
$sHtml .= "<table class=\"listResults\">\n";
// Header
$sHtml .= "<thead>\n";
$sHtml .= "<tr>\n";
foreach($aConfig as $sName=>$aDef)
{
$sHtml .= "<th title=\"".$aDef['description']."\">".$aDef['label']."</th>\n";
}
$sHtml .= "</tr>\n";
$sHtml .= "</thead>\n";
// Content
$sHtml .= "</tbody>\n";
$sEmptyRowStyle = '';
if (count($aData) != 0)
{
$sEmptyRowStyle = 'style="display:none;"';
}
$oTable = DataTableFactory::MakeForForm("{$this->m_sAttCode}{$this->m_sNameSuffix}", $aConfig);
foreach ($aData as $iRowId => $aRow)
{
$sHtml .= $this->DisplayFormRow($oP, $aConfig, $aRow, $iRowId);
$oRow = new FormTableRow("{$this->m_sAttCode}{$this->m_sNameSuffix}", $aConfig, $aRow, $iRowId);
$oTable->AddRow($oRow);
}
$sHtml .= "<tr $sEmptyRowStyle id=\"{$this->m_sAttCode}{$this->m_sNameSuffix}_empty_row\"><td colspan=\"".count($aConfig)."\" style=\"text-align:center;\">".Dict::S('UI:Message:EmptyList:UseAdd')."</td></tr>";
$sHtml .= "</tbody>\n";
// Footer
$sHtml .= "</table>\n";
$sHtml = BlockRenderer::RenderBlockTemplates($oTable);
return $sHtml;
}
@@ -463,6 +430,7 @@ JS
$aForm[$key] = $this->GetFormRow($oPage, $oLinkedObj, $oCurrentLink, $aArgs, $oCurrentObj, $key, $bReadOnly);
}
$sHtmlValue .= $this->DisplayFormTable($oPage, $this->m_aTableConfig, $aForm);
// To prevent adding forms inside the main form
$sHtmlValue .= "<span style=\"float:left;\">&nbsp;&nbsp;&nbsp;<img src=\"../images/tv-item-last.gif\">&nbsp;&nbsp;<input id=\"{$this->m_sAttCode}{$this->m_sNameSuffix}_btnRemove\" type=\"button\" value=\"".Dict::S('UI:RemoveLinkedObjectsOf_Class')."\" onClick=\"oWidget{$this->m_iInputId}.RemoveSelected();\" >";
$sHtmlValue .= "&nbsp;&nbsp;&nbsp;<input id=\"{$this->m_sAttCode}{$this->m_sNameSuffix}_btnAdd\" type=\"button\" value=\"".Dict::Format('UI:AddLinkedObjectsOf_Class', MetaModel::GetName($this->m_sRemoteClass))."\" onClick=\"oWidget{$this->m_iInputId}.AddObjects();\"><span id=\"{$this->m_sAttCode}{$this->m_sNameSuffix}_indicatorAdd\"></span></span>\n";
@@ -513,13 +481,13 @@ JS
*/
public function GetObjectPickerDialog($oPage, $oCurrentObj, $sJson, $aAlreadyLinkedIds = array(), $aPrefillFormParam = array())
{
$oPage->add("<div class=\"wizContainer\" style=\"vertical-align:top;\">\n");
//$oPage->add("<div class=\"wizContainer\" style=\"vertical-align:top;\">\n");
$oAlreadyLinkedFilter = new DBObjectSearch($this->m_sRemoteClass);
if (!$this->m_bDuplicatesAllowed && count($aAlreadyLinkedIds) > 0) {
$oAlreadyLinkedFilter->AddCondition('id', $aAlreadyLinkedIds, 'NOTIN');
$oAlreadyLinkedExpression = $oAlreadyLinkedFilter->GetCriteria();
$sAlreadyLinkedExpression = $oAlreadyLinkedExpression->Render();
$sAlreadyLinkedExpression = $oAlreadyLinkedExpression->RenderExpression();
} else {
$sAlreadyLinkedExpression = '';
}
@@ -537,7 +505,7 @@ JS
array(
'menu' => false,
'result_list_outer_selector' => "SearchResultsToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}",
'table_id' => 'add_'.$this->m_sAttCode,
'table_id' => "add_{$this->m_sAttCode}{$this->m_sNameSuffix}",
'table_inner_id' => "ResultsToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}",
'selection_mode' => true,
'json' => $sJson,
@@ -555,14 +523,13 @@ JS
<div style="background: #fff; border:0; text-align:center; vertical-align:middle;"><p>{$sEmptyList}</p></div>
</div>
<input type="hidden" id="count_{$this->m_sAttCode}{$this->m_sNameSuffix}" value="0"/>
<input type="button" value="{$sCancel}" onClick="$('#dlg_{$this->m_sAttCode}{$this->m_sNameSuffix}').dialog('close');">&nbsp;&nbsp;<input id="btn_ok_{$this->m_sAttCode}{$this->m_sNameSuffix}" disabled="disabled" type="button" onclick="return oWidget{$this->m_iInputId}.DoAddObjects(this.id);" value="{$sAdd}">
<input type="button" value="{$sCancel}" onClick="$('#dlg_{$this->m_sAttCode}{$this->m_sNameSuffix}').dialog('close');">&nbsp;&nbsp;
<input id="btn_ok_add_{$this->m_sAttCode}{$this->m_sNameSuffix}" disabled="disabled" type="button" onclick="return oWidget{$this->m_iInputId}.DoAddObjects(this.id);" value="{$sAdd}">
</form>
</div>
HTML
);
$oPage->add_ready_script("$('#dlg_{$this->m_sAttCode}{$this->m_sNameSuffix}').dialog({ width: $(window).width()*0.8, height: $(window).height()*0.8, autoOpen: false, modal: true, resizeStop: oWidget{$this->m_iInputId}.UpdateSizes });");
$oPage->add_ready_script("$('#dlg_{$this->m_sAttCode}{$this->m_sNameSuffix}').dialog('option', {title:'".addslashes(Dict::Format('UI:AddObjectsOf_Class_LinkedWith_Class', MetaModel::GetName($this->m_sLinkedClass), MetaModel::GetName($this->m_sClass)))."'});");
$oPage->add_ready_script("$('#dlg_{$this->m_sAttCode}{$this->m_sNameSuffix}').dialog({ width: $(window).width()*0.8, height: $(window).height()*0.8, title:'".addslashes(Dict::Format('UI:AddObjectsOf_Class_LinkedWith_Class', MetaModel::GetName($this->m_sLinkedClass), MetaModel::GetName($this->m_sClass)))."' , autoOpen: false, modal: true, resizeStop: oWidget{$this->m_iInputId}.UpdateSizes });");
$oPage->add_ready_script("$('#SearchFormToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix} form').bind('submit.uilinksWizard', oWidget{$this->m_iInputId}.SearchObjectsToAdd);");
$oPage->add_ready_script("$('#SearchFormToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}').resize(oWidget{$this->m_iInputId}.UpdateSizes);");
}
@@ -620,7 +587,8 @@ HTML
if (is_object($oLinkedObj))
{
$aRow = $this->GetFormRow($oP, $oLinkedObj, $iObjectId, array(), $oCurrentObj, $iAdditionId); // Not yet created link get negative Ids
$oP->add($this->DisplayFormRow($oP, $this->m_aTableConfig, $aRow, -$iAdditionId));
$oRow = new FormTableRow("{$this->m_sAttCode}{$this->m_sNameSuffix}", $this->m_aTableConfig, $aRow, -$iAdditionId);
$oP->AddUiBlock($oRow);
$iAdditionId++;
}
else

View File

@@ -40,7 +40,6 @@ class UISearchFormForeignKeys
*/
public function ShowModalSearchForeignKeys($oPage, $sTitle)
{
$oPage->add("<div class=\"wizContainer\" style=\"vertical-align:top;\">\n");
$oFilter = new DBObjectSearch($this->m_sRemoteClass);
@@ -65,9 +64,9 @@ class UISearchFormForeignKeys
<div style="background: #fff; border:0; text-align:center; vertical-align:middle;"><p>{$sEmptyList}</p></div>
</div>
<input type="hidden" id="count_{$this->m_iInputId}" value="0"/>
<input type="button" value="{$sCancel}" onClick="$('#dlg_{$this->m_iInputId}').dialog('close');">&nbsp;&nbsp;<input id="btn_ok_{$this->m_iInputId}" disabled="disabled" type="button" onclick="return oForeignKeysWidget{$this->m_iInputId}.DoAddObjects(this.id);" value="{$sAdd}">
<input type="button" value="{$sCancel}" onClick="$('#dlg_{$this->m_iInputId}').dialog('close');">&nbsp;&nbsp;
<input id="btn_ok_add_{$this->m_iInputId}" disabled="disabled" type="button" onclick="return oForeignKeysWidget{$this->m_iInputId}.DoAddObjects(this.id);" value="{$sAdd}">
</form>
</div>
HTML
);

View File

@@ -1697,7 +1697,7 @@ class utils
set_time_limit(0);
// Compiling SASS
$sCss = $oSass->compile($sSassContent);
set_time_limit($iCurrentMaxExecTime);
set_time_limit(intval($iCurrentMaxExecTime));
return $sCss;
}

View File

@@ -1273,6 +1273,15 @@ abstract class AttributeDefinition
{
return (string)$value;
}
/*
* return string
*/
public function GetRenderForDataTable(string $sClassAlias) :string
{
$sRenderFunction = "return data;";
return $sRenderFunction;
}
}
class AttributeDashboard extends AttributeDefinition
@@ -4906,6 +4915,11 @@ class AttributeEmailAddress extends AttributeString
return '<a class="mailto" href="mailto:'.$sValue.'"><span class="text_decoration '.$sUrlDecorationClass.'"></span>'.parent::GetAsHTML($sValue).'</a>';
}
public function GetRenderForDataTable(string $sClassAlias) :string
{
$sRenderFunction = "return '<a class=\'mailto\' href= \'mailto:'+data+'\'><span class=\'fas fa-envelope\'></span> '+data+'</a>' ;";
return $sRenderFunction;
}
}
/**
@@ -4992,6 +5006,12 @@ class AttributePhoneNumber extends AttributeString
return '<a class="tel" href="'.$sUrl.'"><span class="text_decoration '.$sUrlDecorationClass.'"></span>'.parent::GetAsHTML($sValue).'</a>';
}
public function GetRenderForDataTable(string $sClassAlias) :string
{
$sRenderFunction = "return '<a class=\'tel\' href= \'tel:'+data+'\'><span class=\'fas fa-phone\'></span> '+data+'</a>' ;";
return $sRenderFunction;
}
}
/**
@@ -6781,6 +6801,14 @@ class AttributeExternalKey extends AttributeDBFieldVoid
return DBObject::MakeHyperLink($this->GetTargetClass(), $sValue);
}
public function GetRenderForDataTable(string $sClassAlias) :string
{
$oRemoteAtt = $this->GetFinalAttDef();
$sTargetClass = $oRemoteAtt->GetTargetClass();
$sRenderFunction = "return '<a class=\'object-ref-link\' href= \'UI.php?operation=details&class=".$sTargetClass."&id='+data+'\'>'+row['".$sClassAlias."/".$this->GetCode()."_friendlyname']+'</a>' ;";
return $sRenderFunction;
}
}
/**

View File

@@ -948,7 +948,7 @@ class BulkChange
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
foreach($this->m_aData as $iRow => $aRowData)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
if (isset($aResult[$iRow]["__STATUS__"]))
{
// An issue at the earlier steps - skip the rest
@@ -1067,13 +1067,13 @@ class BulkChange
$iObj = $oObj->GetKey();
if (!in_array($iObj, $aVisited))
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$iRow++;
$this->UpdateMissingObject($aResult, $iRow, $oObj, $oChange);
}
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(itval($iPreviousTimeLimit));
// Fill in the blanks - the result matrix is expected to be 100% complete
//

View File

@@ -301,7 +301,7 @@ EOF
}
while($aRow = $oSet->FetchAssoc())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$aData = array();
foreach($this->aStatusInfo['fields'] as $iCol => $aFieldSpec)
{
@@ -339,7 +339,7 @@ EOF
// Restore original date & time formats
AttributeDateTime::SetFormat($oPrevDateTimeFormat);
AttributeDate::SetFormat($oPrevDateFormat);
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$this->aStatusInfo['position'] += $this->iChunkSize;
if ($this->aStatusInfo['total'] == 0)
{

View File

@@ -135,7 +135,7 @@ class CSVParser
// More time for the next row
if ($this->m_iTimeLimitPerRow !== null)
{
set_time_limit($this->m_iTimeLimitPerRow);
set_time_limit(intval($this->m_iTimeLimitPerRow));
}
}
protected function __AddCellTrimmed($c = null, $aFieldMap = null)
@@ -194,7 +194,7 @@ class CSVParser
{
// Give some time for the first row
$iTimeLimit = ini_get('max_execution_time');
set_time_limit($this->m_iTimeLimitPerRow);
set_time_limit(intval($this->m_iTimeLimitPerRow));
}
for($i = 0; $i <= $iDataLength ; $i++)
{
@@ -255,7 +255,7 @@ class CSVParser
if ($iTimeLimit !== null)
{
// Restore the previous time limit
set_time_limit($iTimeLimit);
set_time_limit(intval($iTimeLimit));
}
return $this->m_aDataSet;
}

View File

@@ -3599,7 +3599,7 @@ abstract class DBObject implements iDisplay
// As a temporary fix: delete only the objects that are still to be deleted...
if ($oToDelete->m_bIsInDB)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oToDelete->DBDeleteSingleObject();
}
}
@@ -3614,13 +3614,13 @@ abstract class DBObject implements iDisplay
foreach ($aData['attributes'] as $sRemoteExtKey => $aRemoteAttDef)
{
$oToUpdate->Set($sRemoteExtKey, $aData['values'][$sRemoteExtKey]);
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oToUpdate->DBUpdate();
}
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
return $oDeletionPlan;
}
@@ -4565,7 +4565,7 @@ abstract class DBObject implements iDisplay
{
foreach ($aPotentialDeletes as $sRemoteExtKey => $aData)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
/** @var \AttributeExternalKey $oAttDef */
$oAttDef = $aData['attribute'];
@@ -4597,7 +4597,7 @@ abstract class DBObject implements iDisplay
}
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
}
/**

View File

@@ -603,11 +603,11 @@ abstract class DBSearch
elseif (($iPos = strpos($sParam, '->')) !== false)
{
$sParamName = substr($sParam, 0, $iPos);
if (isset($aContextParams[$sParamName.'->object()']))
if (isset($aContextParams[$sParamName.'->object()']) || isset($aContextParams[$sParamName]))
{
$sAttCode = substr($sParam, $iPos + 2);
/** @var \DBObject $oObj */
$oObj = $aContextParams[$sParamName.'->object()'];
$oObj = isset($aContextParams[$sParamName.'->object()']) ? $aContextParams[$sParamName.'->object()'] : $aContextParams[$sParamName];
if ($oObj->IsModified())
{
if ($sAttCode == 'id')

View File

@@ -116,7 +116,7 @@ class DeletionPlan
{
foreach($aToUpdate as $iId => $aData)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$this->m_iToUpdate++;
$oObject = $aData['to_reset'];
@@ -142,7 +142,7 @@ class DeletionPlan
}
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
}
public function GetIssues()

View File

@@ -874,7 +874,7 @@ class DisplayableGraph extends SimpleGraph
$oNodesIter = new RelationTypeIterator($oGraph, 'Node');
foreach($oNodesIter as $oNode)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
switch(get_class($oNode))
{
case 'RelationObjectNode':
@@ -921,7 +921,7 @@ class DisplayableGraph extends SimpleGraph
$oEdgesIter = new RelationTypeIterator($oGraph, 'Edge');
foreach($oEdgesIter as $oEdge)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oSourceNode = $oNewGraph->GetNode($oEdge->GetSourceNode()->GetId());
$oSinkNode = $oNewGraph->GetNode($oEdge->GetSinkNode()->GetId());
$oNewEdge = new DisplayableEdge($oNewGraph, $oEdge->GetId(), $oSourceNode, $oSinkNode);
@@ -932,7 +932,7 @@ class DisplayableGraph extends SimpleGraph
$aEdgeKeys = array();
foreach($oEdgesIter as $oEdge)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$sSourceId = $oEdge->GetSourceNode()->GetId();
$sSinkId = $oEdge->GetSinkNode()->GetId();
if ($sSourceId == $sSinkId)
@@ -958,7 +958,7 @@ class DisplayableGraph extends SimpleGraph
$oNodesIter = new RelationTypeIterator($oNewGraph, 'Node');
foreach($oNodesIter as $oNode)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
if ($bDirectionDown && $oNode->GetProperty('source'))
{
$oNode->GroupSimilarNeighbours($oNewGraph, $iGroupingThreshold, true, $bDirectionDown);
@@ -973,7 +973,7 @@ class DisplayableGraph extends SimpleGraph
$iGroupIdx = 0;
foreach($oIterator as $oNode)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
if ($oNode instanceof DisplayableGroupNode)
{
if ($oNode->GetObjectCount() == 0)
@@ -995,7 +995,7 @@ class DisplayableGraph extends SimpleGraph
$aEdgeKeys = array();
foreach($oEdgesIter as $oEdge)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$sSourceId = $oEdge->GetSourceNode()->GetId();
$sSinkId = $oEdge->GetSinkNode()->GetId();
if ($sSourceId == $sSinkId)
@@ -1017,7 +1017,7 @@ class DisplayableGraph extends SimpleGraph
}
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
return $oNewGraph;
}
@@ -1257,14 +1257,14 @@ class DisplayableGraph extends SimpleGraph
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
foreach($oIterator as $sId => $oEdge)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oEdge->RenderAsPDF($oPdf, $this, $fScale, $aContextDefs);
}
$oIterator = new RelationTypeIterator($this, 'Node');
foreach($oIterator as $sId => $oNode)
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oNode->RenderAsPDF($oPdf, $this, $fScale, $aContextDefs);
}

View File

@@ -296,7 +296,7 @@ EOF
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
while($aRow = $oSet->FetchAssoc())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$aData = array();
foreach($this->aStatusInfo['fields'] as $iCol => $aFieldSpec)
{
@@ -314,7 +314,7 @@ EOF
fwrite($hFile, json_encode($aData)."\n");
$iCount++;
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$this->aStatusInfo['position'] += $this->iChunkSize;
if ($this->aStatusInfo['total'] == 0)
{

View File

@@ -128,7 +128,7 @@ class HTMLBulkExport extends TabularBulkExport
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
while($aRow = $oSet->FetchAssoc())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$oMainObj = $aRow[$sFirstAlias];
$sHilightClass = '';
if ($oMainObj)
@@ -160,7 +160,7 @@ class HTMLBulkExport extends TabularBulkExport
$sData .= "</tr>";
$iCount++;
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$this->aStatusInfo['position'] += $this->iChunkSize;
if ($this->aStatusInfo['total'] == 0)
{

View File

@@ -472,7 +472,7 @@ class RelationGraph extends SimpleGraph
{
do
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$sObjectRef = RelationObjectNode::MakeId($oRelatedObj);
$oRelatedNode = $this->GetNode($sObjectRef);
@@ -501,7 +501,7 @@ class RelationGraph extends SimpleGraph
while ($oRelatedObj = $oObjSet->Fetch());
}
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
}
}
}

View File

@@ -266,7 +266,7 @@ EOF
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
while($aRow = $oSet->FetchAssoc())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$sData .= "<tr>";
foreach($this->aStatusInfo['fields'] as $iCol => $aFieldSpec)
@@ -362,7 +362,7 @@ EOF
$sData .= "</tr>";
$iCount++;
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$this->aStatusInfo['position'] += $this->iChunkSize;
if ($this->aStatusInfo['total'] == 0)
{

View File

@@ -144,7 +144,7 @@ class XMLBulkExport extends BulkExport
while ($aObjects = $oSet->FetchAssoc())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
if (count($aAuthorizedClasses) > 1)
{
$sData .= "<Row>\n";
@@ -182,7 +182,7 @@ class XMLBulkExport extends BulkExport
$iCount++;
}
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
$this->aStatusInfo['position'] += $this->iChunkSize;
if ($this->aStatusInfo['total'] == 0)
{

View File

@@ -18,8 +18,11 @@
@import "input/all";
@import "title";
@import "datatable";
@import "form";
@import "fieldset";
@import "field";
@import "toolbar";
@import "richtext";
@import "richtext";
@import "formtable";
@import "formtablerow";

View File

@@ -0,0 +1,118 @@
.ibo-datatable {
padding-bottom: 2em;
padding-top: 2em;
thead tr th, tbody tr td {
line-height: 30px;
padding-right: 1em;
padding-left: 1em;
@extend %ibo-font-ral-nor-100;
a {
color: $ibo-color-primary-600;
}
}
tbody tr:nth-child(odd) {
background-color: $ibo-color-secondary-500;
}
}
.dataTables_length
{
@extend %ibo-font-ral-med-100;
color: $ibo-color-grey-700;
position: relative;
float: right;
padding-top: 0.755em;
padding-right: 0.5em;
}
.dataTables_info
{
@extend %ibo-font-ral-med-100;
color: $ibo-color-grey-700;
position: relative;
float: right;
padding-top: 0.755em;
padding-right: 2em;
padding-left: 0em;
}
.select-info{
padding-left: 2em;
}
.pagination
{
color: $ibo-color-grey-800;
left: 1.21%;
right: 1.21%;
top: 91.58%;
bottom: 4.85%;
.paginate_button {
margin-left: 1em;
margin-right: 1em;
}
}
.dataTables_paginate
{
/* position: relative;*/
float: left;
padding-top: 0.755em;
padding-left: 2em;
}
.paginate_button {
box-sizing: border-box;
display: inline-block;
}
.paginate_button a{
color: $ibo-color-grey-800;
@extend %ibo-font-ral-nor-100;
}
.paginate_button a:hover {
color: $ibo-color-blue-grey-200;
}
.paginate_button.active a {
color: $ibo-color-grey-900;
border: 2px solid var(--ibo-color-grey-300);
background-color: $ibo-color-grey-200;
}
.ibo-datatable thead tr th{
position: relative;
}
.ibo-datatable thead tr th.sorting::after{
font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0dc";
opacity: 0.3;
right: 1em;
position: absolute;
}
.ibo-datatable thead tr th.sorting_desc:after{
font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0d7";
right: 1em;
position: absolute;
}
.ibo-datatable thead tr th.sorting_asc:after{
font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0d8";
right: 1em;
position: absolute;
}
.ibo-datatable-toolbar {
/*position: relative;*/
//height: 30px;
}
.ibo-criterion-area{
font-size: $ibo-font-size-50 ;
}
.ibo-search-form{
padding-top: $ibo-panel--spacing-top ;
}
.ibo-form-group{
position: fixed;
}
.sf_more_criterion.opened > .sfm_content{
position: fixed !important;
left: auto !important;
}

View File

@@ -0,0 +1,4 @@
/*!
* copyright Copyright (C) 2010-2020 Combodo SARL
* license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -0,0 +1,4 @@
/*!
* copyright Copyright (C) 2010-2020 Combodo SARL
* license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -77,6 +77,7 @@ $ibo-panel-colors: (
.ibo-panel--header {
display: flex;
align-items: stretch;
}
.ibo-panel--title {

View File

@@ -79,4 +79,30 @@ $ibo-title--status-dot--border-radius: $ibo-border-radius-full !default;
color: map-get($aColors, 'secondary-color');
background-color: map-get($aColors, 'primary-color');
}
}
.ibo-title-for-dashlet {
padding-top: 2em;
}
.ibo-title-for-dashlet--title {
@extend %ibo-font-ral-nor-350;
}
.ibo-title-for-dashlet--content{
background-color: $ibo-color-white-100;
border-radius: 5px;
border: 1px solid ;
border-color:$ibo-color-grey-400;
padding-bottom:1em;
}
.ibo-title-separator{
border-radius: 5px 5px 0px 0px;
border-color:$ibo-color-blue-600;
color:$ibo-color-blue-600;
background-color:$ibo-color-blue-600;
border: 3px solid ;
margin:0;
padding:0;
}

View File

@@ -93,66 +93,66 @@
text-decoration: none;
}
table.datatable {
width: 100%;
border: 0;
padding: 0;
}
//table.datatable {
// width: 100%;
// border: 0;
// padding: 0;
//}
td.menucontainer {
text-align: right;
}
table.listResults {
padding: 0px;
border-top: 3px solid $frame-background-color;
border-left: 3px solid $frame-background-color;
border-bottom: 3px solid #e6e6e1;
border-right: 3px solid #e6e6e1;
width: 100%;
background-color: $white;
}
//table.listResults {
// padding: 0px;
// border-top: 3px solid $frame-background-color;
// border-left: 3px solid $frame-background-color;
// border-bottom: 3px solid #e6e6e1;
// border-right: 3px solid #e6e6e1;
// width: 100%;
// background-color: $white;
//}
table.listResults td {
padding: 2px;
}
//table.listResults td {
// padding: 2px;
//}
table.listResults td .view-image {
//table.listResults td .view-image {
// Counteract the forced dimensions (usefull for displaying in the details view)
width: inherit !important;
height: inherit !important;
// width: inherit !important;
// height: inherit !important;
img {
max-width: 48px !important;
max-height: 48px !important;
display: block;
margin-left: auto;
margin-right: auto;
}
}
// img {
// max-width: 48px !important;
// max-height: 48px !important;
// display: block;
// margin-left: auto;
// margin-right: auto;
// }
//}
table.listResults > tbody > tr.selected > * {
}
//table.listResults > tbody > tr.selected > * {
//}
table.listResults > tbody > tr > * {
transition: background-color 400ms linear;
}
//table.listResults > tbody > tr > * {
// transition: background-color 400ms linear;
//}
table.listResults > tbody > tr:hover > * {
cursor: pointer;
}
//table.listResults > tbody > tr:hover > * {
// cursor: pointer;
//}
table.listResults > tbody > tr.selected:hover > * {
//table.listResults > tbody > tr.selected:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: $brand-primary-lightest;
color: $text-color;
}
// background-color: $brand-primary-lightest;
// color: $text-color;
//}
table.listResults > tbody > tr:hover > * {
//table.listResults > tbody > tr:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: $table-hover-background;
color: $text-color;
}
// background-color: $table-hover-background;
// color: $text-color;
//}
.edit-image {
.view-image {
@@ -278,13 +278,13 @@
color: $text-color;
}
th {
font-family: Tahoma, Verdana, Arial, Helvetica;
font-size: 8pt;
color: $complement-color;
height: 20px;
background: $frame-background-color bottom repeat-x;
}
//th {
// font-family: Tahoma, Verdana, Arial, Helvetica;
// font-size: 8pt;
// color: $complement-color;
// height: 20px;
// background: $frame-background-color bottom repeat-x;
//}
th.header {
cursor: pointer;
@@ -987,14 +987,14 @@
}
.search_form_handler {
position: relative;
z-index: 10;
width: 100%;
margin-left: auto;
margin-right: auto;
font-size: 12px;
text-align: left; /* To compensate .search_box:text-align */
border: 1px solid $search-form-container-bg-color;
// position: relative;
// z-index: 10;
// width: 100%;
// margin-left: auto;
// margin-right: auto;
// font-size: 12px;
// text-align: left; /* To compensate .search_box:text-align */
// border: 1px solid $search-form-container-bg-color;
//transition: width 0.3s ease-in-out;
/* Sizing reset */
@@ -1138,7 +1138,6 @@
background-color: $white;
.sf_criterion_row {
position: relative;;
&:not(:first-child) {
margin-top: 20px;
@@ -1166,6 +1165,11 @@
.sf_criterion_group {
display: inline;
.sfc_fg_button,
.sfc_header {
border: 1px solid #E1E7EC; /* Must be equal to .search_form_criteria:margin-bottom + this:padding-bottom */
border-radius: 3px;
}
}
}
@@ -1198,7 +1202,6 @@
box-shadow: $box-shadow-regular;
}
.sfc_form_group,
.sfm_content {
position: absolute;
z-index: -1;
@@ -2643,7 +2646,6 @@
}
> .field_input_btn {
display: table-cell;
width: 25px;
padding-left: 0.4em;

View File

@@ -40,7 +40,7 @@ class DatabaseAnalyzer
{
if (!is_null($this->iTimeLimitPerOperation))
{
set_time_limit($this->iTimeLimitPerOperation);
set_time_limit(intval($this->iTimeLimitPerOperation));
}
$aWrongRecords = CMDBSource::QueryToArray($sSelWrongRecs);

View File

@@ -31,12 +31,12 @@
{# - Bootstrap Datetime picker #}
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css'|add_itop_version }}" rel="stylesheet">
{# - Datatables #}
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/dataTables.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/fixedHeader.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/responsive.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/scroller.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/select.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/css/select.dataTables.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/dataTables.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/fixedHeader.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/responsive.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/scroller.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/select.bootstrap.min.css'|add_itop_version }}" rel="stylesheet">
<link href="{{ app['combodo.absolute_url'] ~ 'lib/datatables/css/select.dataTables.min.css'|add_itop_version }}" rel="stylesheet">
{# - Font OpenSans #}
<link href="{{ app['combodo.absolute_url'] ~ 'css/font-open-sans/font-open-sans.css'|add_itop_version }}" rel="stylesheet">
{# - Font Combodo #}
@@ -112,13 +112,13 @@
{# Moment.js with locales#}
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'js/moment-with-locales.min.js'|add_itop_version }}"></script>
{# Datatables #}
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/jquery.dataTables.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/dataTables.bootstrap.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/dataTables.fixedHeader.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/dataTables.responsive.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/dataTables.scroller.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/dataTables.select.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/datatables/js/datetime-moment.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/jquery.dataTables.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/dataTables.bootstrap.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/dataTables.fixedHeader.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/dataTables.responsive.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/dataTables.scroller.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/dataTables.select.min.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'lib/datatables/js/datetime-moment.js'|add_itop_version }}"></script>
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'js/dataTables.accentNeutraliseForFilter.js'|add_itop_version }}"></script>
{# Export for Datatables #}
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'js/export.js'|add_itop_version }}"></script>

View File

@@ -1,6 +1,6 @@
/*
=== SIGNATURE BEGIN ===
{"variables":"d751713988987e9331980363e24189ce","stylesheets":{"css-variables":"732f501302c538f594fb3c668d85b46c","jqueryui":"a887ad1c00f29132beba3bf729b981c7","main":"b04966c35dbdc85a2cd96abb6cd5fd6a"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
{"variables":"d751713988987e9331980363e24189ce","stylesheets":{"css-variables":"732f501302c538f594fb3c668d85b46c","jqueryui":"a887ad1c00f29132beba3bf729b981c7","main":"d5d2002c5bcf8fcf592d8e028bbed2fb"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
=== SIGNATURE END ===
*/
/*!
@@ -99,7 +99,7 @@
background-repeat: no-repeat;
width: 16px;
height: 16px;
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
filter: hue-rotate(0deg);
}
.ui-widget-icon-block {
@@ -232,7 +232,7 @@
.ui-menu .ui-menu-item {
margin: 0;
cursor: pointer;
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=1605021905");
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=1605536038");
}
.ui-menu .ui-menu-item-wrapper {
position: relative;
@@ -298,7 +298,7 @@
color: #EA7D1E;
}
.ui-button:hover .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button:active {
text-decoration: none;
@@ -306,20 +306,20 @@
color: #EA7D1E;
}
.ui-button:active .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button:focus {
font-weight: bold;
color: #EA7D1E;
}
.ui-button:focus .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button .ui-state-highlight.ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605536038");
}
.ui-button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605536038");
}
.ui-button-icon-only {
width: 2em;
@@ -901,7 +901,7 @@ body .ui-tooltip {
background-image: none;
}
.ui-widget-content .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
}
.ui-widget-header .ui-priority-secondary {
opacity: 0.7;
@@ -913,7 +913,7 @@ body .ui-tooltip {
background-image: none;
}
.ui-widget-header .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
}
.ui-state-default a {
text-decoration: none;
@@ -925,7 +925,7 @@ body .ui-tooltip {
text-decoration: none;
}
.ui-state-default .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605536038");
}
a.ui-button {
text-decoration: none;
@@ -955,7 +955,7 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-hover .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-state-focus a {
text-decoration: none;
@@ -970,7 +970,7 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-focus .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px #5e9ed6;
@@ -988,19 +988,19 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-active .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-icon-background {
background-color: #EA7D1E;
}
.ui-state-highlight .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605536038");
}
.ui-state-error .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605536038");
}
.ui-state-error-text .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605536038");
}
.ui-priority-primary {
font-weight: bold;
@@ -1643,52 +1643,10 @@ a:visited.ui-button {
color: #EA7D1E;
text-decoration: none;
}
#ibo-main-content table.datatable, .ui-dialog table.datatable {
width: 100%;
border: 0;
padding: 0;
}
#ibo-main-content td.menucontainer, .ui-dialog td.menucontainer {
text-align: right;
}
#ibo-main-content table.listResults, .ui-dialog table.listResults {
padding: 0px;
border-top: 3px solid #F1F1F1;
border-left: 3px solid #F1F1F1;
border-bottom: 3px solid #e6e6e1;
border-right: 3px solid #e6e6e1;
width: 100%;
background-color: #FFFFFF;
}
#ibo-main-content table.listResults td, .ui-dialog table.listResults td {
padding: 2px;
}
#ibo-main-content table.listResults td .view-image, .ui-dialog table.listResults td .view-image {
width: inherit !important;
height: inherit !important;
}
#ibo-main-content table.listResults td .view-image img, .ui-dialog table.listResults td .view-image img {
max-width: 48px !important;
max-height: 48px !important;
display: block;
margin-left: auto;
margin-right: auto;
}
#ibo-main-content table.listResults > tbody > tr > *, .ui-dialog table.listResults > tbody > tr > * {
transition: background-color 400ms linear;
}
#ibo-main-content table.listResults > tbody > tr:hover > *, .ui-dialog table.listResults > tbody > tr:hover > * {
cursor: pointer;
}
#ibo-main-content table.listResults > tbody > tr.selected:hover > *, .ui-dialog table.listResults > tbody > tr.selected:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: #f1a564;
color: #000;
}
#ibo-main-content table.listResults > tbody > tr:hover > *, .ui-dialog table.listResults > tbody > tr:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: #fdf5d0;
color: #000;
}
#ibo-main-content .edit-image .view-image, .ui-dialog .edit-image .view-image {
display: inline-block;
@@ -1697,7 +1655,7 @@ a:visited.ui-button {
visibility: hidden;
}
#ibo-main-content .edit-image .view-image.dirty.compat, .ui-dialog .edit-image .view-image.dirty.compat {
background-image: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
}
#ibo-main-content .edit-image .view-image.dirty.compat img, .ui-dialog .edit-image .view-image.dirty.compat img {
opacity: 0.3;
@@ -1720,7 +1678,7 @@ a:visited.ui-button {
opacity: 0.3;
}
#ibo-main-content .edit-image .edit-buttons .button .ui-icon, .ui-dialog .edit-image .edit-buttons .button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
}
#ibo-main-content .edit-image .file-input, .ui-dialog .edit-image .file-input {
display: block;
@@ -1781,13 +1739,6 @@ a:visited.ui-button {
#ibo-main-content tr td.hover, .ui-dialog tr td.hover, #ibo-main-content tr.even td.hover, .ui-dialog tr.even td.hover, #ibo-main-content .hover a, .ui-dialog .hover a, #ibo-main-content .hover a:visited, .ui-dialog .hover a:visited, #ibo-main-content .hover a:hover, .ui-dialog .hover a:hover, #ibo-main-content .wizContainer tr.even td.hover, .ui-dialog .wizContainer tr.even td.hover, #ibo-main-content .wizContainer tr td.hover, .ui-dialog .wizContainer tr td.hover {
color: #000;
}
#ibo-main-content th, .ui-dialog th {
font-family: Tahoma, Verdana, Arial, Helvetica;
font-size: 8pt;
color: #1c94c4;
height: 20px;
background: #F1F1F1 bottom repeat-x;
}
#ibo-main-content th.header, .ui-dialog th.header {
cursor: pointer;
background-repeat: no-repeat;
@@ -1940,7 +1891,7 @@ a:visited.ui-button {
background: #EA7D1E;
}
#ibo-main-content .actions_details span, .ui-dialog .actions_details span {
background: url("../../../../images/actions_right.png?v=1605021905") no-repeat right;
background: url("../../../../images/actions_right.png?v=1605536038") no-repeat right;
color: #fff;
font-weight: bold;
padding-top: 2px;
@@ -1963,7 +1914,7 @@ a:visited.ui-button {
}
#ibo-main-content .ac_input, .ui-dialog .ac_input {
border: 1px solid #7f9db9;
background: #fff url("../../../../images/ac-background.gif?v=1605021905") no-repeat right;
background: #fff url("../../../../images/ac-background.gif?v=1605536038") no-repeat right;
/* By Rom */
}
#ibo-main-content .csvimport_createobj, .ui-dialog .csvimport_createobj {
@@ -2018,7 +1969,7 @@ a:visited.ui-button {
noborder-top: 1px solid #8b8b8b;
padding: 4px 0px 0px 16px;
font-size: 8pt;
background: url("../../../../images/green-square.gif?v=1605021905") no-repeat bottom left;
background: url("../../../../images/green-square.gif?v=1605536038") no-repeat bottom left;
color: #83b217;
font-weight: bold;
text-decoration: none;
@@ -2094,22 +2045,22 @@ a:visited.ui-button {
margin-top: -8px;
}
#ibo-main-content .notreeview li, .ui-dialog .notreeview li {
background: url("../../../../images/tv-item.gif?v=1605021905") 0 0 no-repeat;
background: url("../../../../images/tv-item.gif?v=1605536038") 0 0 no-repeat;
}
#ibo-main-content .notreeview .collapsable, .ui-dialog .notreeview .collapsable {
background-image: url("../../../../images/tv-collapsable.gif?v=1605021905");
background-image: url("../../../../images/tv-collapsable.gif?v=1605536038");
}
#ibo-main-content .notreeview .expandable, .ui-dialog .notreeview .expandable {
background-image: url("../../../../images/tv-expandable.gif?v=1605021905");
background-image: url("../../../../images/tv-expandable.gif?v=1605536038");
}
#ibo-main-content .notreeview .last, .ui-dialog .notreeview .last {
background-image: url("../../../../images/tv-item-last.gif?v=1605021905");
background-image: url("../../../../images/tv-item-last.gif?v=1605536038");
}
#ibo-main-content .notreeview .lastCollapsable, .ui-dialog .notreeview .lastCollapsable {
background-image: url("../../../../images/tv-collapsable-last.gif?v=1605021905");
background-image: url("../../../../images/tv-collapsable-last.gif?v=1605536038");
}
#ibo-main-content .notreeview .lastExpandable, .ui-dialog .notreeview .lastExpandable {
background-image: url("../../../../images/tv-expandable-last.gif?v=1605021905");
background-image: url("../../../../images/tv-expandable-last.gif?v=1605536038");
}
#ibo-main-content #OrganizationSelection, .ui-dialog #OrganizationSelection {
padding: 5px 0px 16px 20px;
@@ -2285,7 +2236,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.red, .ui-dialog th.red {
background: url("../../../../images/red-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/red-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
}
#ibo-main-content .green, .ui-dialog .green {
@@ -2293,7 +2244,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.green, .ui-dialog th.green {
background: url("../../../../images/green-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/green-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
}
#ibo-main-content .orange, .ui-dialog .orange {
@@ -2301,7 +2252,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.orange, .ui-dialog th.orange {
background: url("../../../../images/orange-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/orange-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
/* For Date Picker: Creates a little calendar icon
* instead of a text link for "Choose date"
@@ -2316,7 +2267,7 @@ a:visited.ui-button {
display: block;
text-indent: -2000px;
overflow: hidden;
background: url("../../../../images/calendar.png?v=1605021905") no-repeat;
background: url("../../../../images/calendar.png?v=1605536038") no-repeat;
}
#ibo-main-content td a.dp-choose-date.dp-disabled, .ui-dialog td a.dp-choose-date.dp-disabled, #ibo-main-content a.dp-choose-date.dp-disabled, .ui-dialog a.dp-choose-date.dp-disabled {
background-position: 0 -20px;
@@ -2368,15 +2319,6 @@ a:visited.ui-button {
box-sizing: border-box;
}
#ibo-main-content .search_form_handler, .ui-dialog .search_form_handler {
position: relative;
z-index: 10;
width: 100%;
margin-left: auto;
margin-right: auto;
font-size: 12px;
text-align: left;
/* To compensate .search_box:text-align */
border: 1px solid #1c94c4;
/* Sizing reset */
}
#ibo-main-content .search_form_handler *, .ui-dialog .search_form_handler * {
@@ -2475,9 +2417,6 @@ a:visited.ui-button {
/* padding-bottom must equals to padding-top - .search_form_criteria:margin-bottom */
background-color: #FFFFFF;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row {
position: relative;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row:not(:first-child), .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row:not(:first-child) {
margin-top: 20px;
}
@@ -2503,6 +2442,11 @@ a:visited.ui-button {
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group {
display: inline;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_fg_button, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_fg_button, #ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_header, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_header {
border: 1px solid #E1E7EC;
/* Must be equal to .search_form_criteria:margin-bottom + this:padding-bottom */
border-radius: 3px;
/* Common style between criterion and more criterion */
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button, .ui-dialog .search_form_handler .sf_criterion_area .sf_button {
@@ -2529,14 +2473,14 @@ a:visited.ui-button {
border-radius: 1px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content {
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content {
position: absolute;
z-index: -1;
min-width: 100%;
left: 0px;
margin-top: -1px;
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons {
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons {
white-space: nowrap;
/* Criteria tags */
}
@@ -2983,19 +2927,19 @@ a:visited.ui-button {
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.odd td.truncated, .ui-dialog table.listResults tr.odd td.truncated, #ibo-main-content table.listResults tr td.truncated, .ui-dialog table.listResults tr td.truncated, #ibo-main-content .wizContainer table.listResults tr.odd td.truncated, .ui-dialog .wizContainer table.listResults tr.odd td.truncated, #ibo-main-content .wizContainer table.listResults tr td.truncated, .ui-dialog .wizContainer table.listResults tr td.truncated {
background: url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.even td.truncated, .ui-dialog table.listResults tr.even td.truncated, #ibo-main-content .wizContainer table.listResults tr.even td.truncated, .ui-dialog .wizContainer table.listResults tr.even td.truncated {
background: #f9f9f1 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #f9f9f1 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.even td.hover.truncated, .ui-dialog table.listResults tr.even td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr.even td.hover.truncated, .ui-dialog .wizContainer table.listResults tr.even td.hover.truncated {
background: #fdf5d0 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #fdf5d0 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.odd td.hover.truncated, .ui-dialog table.listResults tr.odd td.hover.truncated, #ibo-main-content table.listResults tr td.hover.truncated, .ui-dialog table.listResults tr td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr.odd td.hover.truncated, .ui-dialog .wizContainer table.listResults tr.odd td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr td.hover.truncated, .ui-dialog .wizContainer table.listResults tr td.hover.truncated {
background: #fdf5d0 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #fdf5d0 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
}
#ibo-main-content table.listResults.truncated, .ui-dialog table.listResults.truncated {
border-bottom: 0;
@@ -3097,7 +3041,7 @@ a:visited.ui-button {
#ibo-main-content div#logo div, .ui-dialog div#logo div {
height: 88px;
width: 244px;
background: url("../../../../images/itop-logo-2.png?v=1605021905") left no-repeat;
background: url("../../../../images/itop-logo-2.png?v=1605536038") left no-repeat;
}
#ibo-main-content #left-pane .ui-layout-north, .ui-dialog #left-pane .ui-layout-north {
overflow: hidden;
@@ -3246,7 +3190,7 @@ a:visited.ui-button {
margin: 0 2px;
}
#ibo-main-content .ui-layout-button-pin-down, .ui-dialog .ui-layout-button-pin-down {
background: url("../../../../images/splitter-bkg.png?v=1605021905") transparent;
background: url("../../../../images/splitter-bkg.png?v=1605536038") transparent;
width: 16px;
background-position: -144px -144px;
}
@@ -3383,13 +3327,13 @@ a:visited.ui-button {
#ibo-main-content .caselog_header, .ui-dialog .caselog_header {
padding: 3px;
border-top: 1px solid #fff;
background: #ddd url("../../../../images/plus.gif?v=1605021905") left no-repeat;
background: #ddd url("../../../../images/plus.gif?v=1605536038") left no-repeat;
padding-left: 16px;
cursor: pointer;
width: 100%;
}
#ibo-main-content .caselog_header.open, .ui-dialog .caselog_header.open {
background: #ddd url("../../../../images/minus.gif?v=1605021905") left no-repeat;
background: #ddd url("../../../../images/minus.gif?v=1605536038") left no-repeat;
}
#ibo-main-content .caselog_entry, .ui-dialog .caselog_entry, #ibo-main-content .caselog_entry_html, .ui-dialog .caselog_entry_html {
overflow-x: auto;
@@ -3565,7 +3509,7 @@ a:visited.ui-button {
height: 15px;
border: 1px #A6A6A6 solid;
cursor: pointer;
background-image: url("../../../../images/full-screen.png?v=1605021905");
background-image: url("../../../../images/full-screen.png?v=1605536038");
background-repeat: no-repeat;
background-position: center center;
background-size: 98%;
@@ -3612,7 +3556,7 @@ a:visited.ui-button {
padding: 2px;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_document .button .ui-icon, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_document .button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
background-color: #EA7D1E;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_image input, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_image input {
@@ -3634,7 +3578,6 @@ a:visited.ui-button {
width: 100%;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_extkey > .field_input_btn, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_extkey > .field_input_btn {
display: table-cell;
width: 25px;
padding-left: 0.4em;
}
@@ -3679,7 +3622,7 @@ a:visited.ui-button {
height: 15px;
border: 1px #A6A6A6 solid;
cursor: pointer;
background-image: url("../../../../images/full-screen.png?v=1605021905");
background-image: url("../../../../images/full-screen.png?v=1605536038");
background-repeat: no-repeat;
background-position: center center;
background-size: 98%;
@@ -3744,7 +3687,7 @@ a:visited.ui-button {
padding-left: 0.4em;
}
#ibo-main-content .ac_dlg_loading, .ui-dialog .ac_dlg_loading {
background: white url("../../../../images/indicator.gif?v=1605021905") right center no-repeat;
background: white url("../../../../images/indicator.gif?v=1605536038") right center no-repeat;
}
#ibo-main-content table.pagination, .ui-dialog table.pagination {
display: inline-block;
@@ -3811,10 +3754,10 @@ a:visited.ui-button {
cursor: not-allowed;
}
#ibo-main-content .dragHover, .ui-dialog .dragHover {
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
}
#ibo-main-content .edit_mode .dashlet, .ui-dialog .edit_mode .dashlet {
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
padding: 5px;
margin: 0;
position: relative;
@@ -3859,7 +3802,7 @@ a:visited.ui-button {
top: 0;
right: 0;
z-index: 10;
background: transparent url("../../../../images/delete.png?v=1605021905") no-repeat center;
background: transparent url("../../../../images/delete.png?v=1605536038") no-repeat center;
}
#ibo-main-content td.prop_value, .ui-dialog td.prop_value {
text-align: left;
@@ -4088,23 +4031,23 @@ a:visited.ui-button {
}
#ibo-main-content .message_info, .ui-dialog .message_info {
border: 1px solid #993;
background: url("../../../../images/info-mini.png?v=1605021905") 1em 1em no-repeat #ffc;
background: url("../../../../images/info-mini.png?v=1605536038") 1em 1em no-repeat #ffc;
padding-left: 3em;
}
#ibo-main-content .message_ok, .ui-dialog .message_ok {
border: 1px solid #393;
background: url("../../../../images/ok.png?v=1605021905") 1em 1em no-repeat #cfc;
background: url("../../../../images/ok.png?v=1605536038") 1em 1em no-repeat #cfc;
padding-left: 3em;
}
#ibo-main-content .message_warning, .ui-dialog .message_warning {
border: 1px solid #ec9800;
background: url("../../../../images/error.png?v=1605021905") 1em 1em no-repeat #ffd78d;
background: url("../../../../images/error.png?v=1605536038") 1em 1em no-repeat #ffd78d;
color: #000;
padding-left: 3em;
}
#ibo-main-content .message_error, .ui-dialog .message_error {
border: 1px solid #933;
background: url("../../../../images/error.png?v=1605021905") 1em 1em no-repeat #fcc;
background: url("../../../../images/error.png?v=1605536038") 1em 1em no-repeat #fcc;
padding-left: 3em;
}
#ibo-main-content .fg-menu a img, .ui-dialog .fg-menu a img {
@@ -4235,18 +4178,18 @@ a:visited.ui-button {
}
#ibo-main-content #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter span, .ui-dialog #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter span {
padding-left: 20px;
background: url("../../../../images/eye-open-555.png?v=1605021905") 2px center no-repeat;
background: url("../../../../images/eye-open-555.png?v=1605536038") 2px center no-repeat;
}
#ibo-main-content #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter.strikethrough span, .ui-dialog #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter.strikethrough span {
text-decoration: line-through;
background: url("../../../../images/eye-closed-555.png?v=1605021905") 2px center no-repeat;
background: url("../../../../images/eye-closed-555.png?v=1605536038") 2px center no-repeat;
}
#ibo-main-content .printable-version legend, .ui-dialog .printable-version legend {
padding-left: 26px;
background: #1c94c4 url("../../../../images/eye-open-fff.png?v=1605021905") 8px center no-repeat;
background: #1c94c4 url("../../../../images/eye-open-fff.png?v=1605536038") 8px center no-repeat;
}
#ibo-main-content .printable-version .strikethrough legend, .ui-dialog .printable-version .strikethrough legend {
background: #1c94c4 url("../../../../images/eye-closed-fff.png?v=1605021905") 8px center no-repeat;
background: #1c94c4 url("../../../../images/eye-closed-fff.png?v=1605536038") 8px center no-repeat;
}
#ibo-main-content .printable-version fieldset.strikethrough span, .ui-dialog .printable-version fieldset.strikethrough span {
display: none;
@@ -4319,7 +4262,7 @@ a:visited.ui-button {
cursor: pointer;
width: 16px;
height: 16px;
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
background-position: -16px -192px;
}
#ibo-main-content .history_entry_truncated .history_truncated_toggler, .ui-dialog .history_entry_truncated .history_truncated_toggler {
@@ -4404,7 +4347,7 @@ a:visited.ui-button {
#ibo-main-content #itop-breadcrumb .breadcrumb-item a::after, .ui-dialog #itop-breadcrumb .breadcrumb-item a::after {
content: '';
position: absolute;
background-image: url("../../../../images/breadcrumb-separator.png?v=1605021905");
background-image: url("../../../../images/breadcrumb-separator.png?v=1605536038");
background-repeat: no-repeat;
width: 8px;
height: 16px;

View File

@@ -1,6 +1,6 @@
/*
=== SIGNATURE BEGIN ===
{"variables":"8cfe86f2c55d8eff36d57eb4e83d89f1","stylesheets":{"css-variables":"732f501302c538f594fb3c668d85b46c","jqueryui":"a887ad1c00f29132beba3bf729b981c7","main":"b04966c35dbdc85a2cd96abb6cd5fd6a","environment-banner":"3de3ffb8232b9a649e912b570a64bf5d"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
{"variables":"8cfe86f2c55d8eff36d57eb4e83d89f1","stylesheets":{"css-variables":"732f501302c538f594fb3c668d85b46c","jqueryui":"a887ad1c00f29132beba3bf729b981c7","main":"d5d2002c5bcf8fcf592d8e028bbed2fb","environment-banner":"3de3ffb8232b9a649e912b570a64bf5d"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
=== SIGNATURE END ===
*/
/*!
@@ -99,7 +99,7 @@
background-repeat: no-repeat;
width: 16px;
height: 16px;
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
filter: hue-rotate(0deg);
}
.ui-widget-icon-block {
@@ -232,7 +232,7 @@
.ui-menu .ui-menu-item {
margin: 0;
cursor: pointer;
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=1605021905");
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=1605536038");
}
.ui-menu .ui-menu-item-wrapper {
position: relative;
@@ -298,7 +298,7 @@
color: #EA7D1E;
}
.ui-button:hover .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button:active {
text-decoration: none;
@@ -306,20 +306,20 @@
color: #EA7D1E;
}
.ui-button:active .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button:focus {
font-weight: bold;
color: #EA7D1E;
}
.ui-button:focus .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-button .ui-state-highlight.ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605536038");
}
.ui-button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605536038");
}
.ui-button-icon-only {
width: 2em;
@@ -901,7 +901,7 @@ body .ui-tooltip {
background-image: none;
}
.ui-widget-content .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
}
.ui-widget-header .ui-priority-secondary {
opacity: 0.7;
@@ -913,7 +913,7 @@ body .ui-tooltip {
background-image: none;
}
.ui-widget-header .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
}
.ui-state-default a {
text-decoration: none;
@@ -925,7 +925,7 @@ body .ui-tooltip {
text-decoration: none;
}
.ui-state-default .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png?v=1605536038");
}
a.ui-button {
text-decoration: none;
@@ -955,7 +955,7 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-hover .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-state-focus a {
text-decoration: none;
@@ -970,7 +970,7 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-focus .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px #5e9ed6;
@@ -988,19 +988,19 @@ a:visited.ui-button {
text-decoration: none;
}
.ui-state-active .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png?v=1605536038");
}
.ui-icon-background {
background-color: #EA7D1E;
}
.ui-state-highlight .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png?v=1605536038");
}
.ui-state-error .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605536038");
}
.ui-state-error-text .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png?v=1605536038");
}
.ui-priority-primary {
font-weight: bold;
@@ -1643,52 +1643,10 @@ a:visited.ui-button {
color: #EA7D1E;
text-decoration: none;
}
#ibo-main-content table.datatable, .ui-dialog table.datatable {
width: 100%;
border: 0;
padding: 0;
}
#ibo-main-content td.menucontainer, .ui-dialog td.menucontainer {
text-align: right;
}
#ibo-main-content table.listResults, .ui-dialog table.listResults {
padding: 0px;
border-top: 3px solid #F1F1F1;
border-left: 3px solid #F1F1F1;
border-bottom: 3px solid #e6e6e1;
border-right: 3px solid #e6e6e1;
width: 100%;
background-color: #FFFFFF;
}
#ibo-main-content table.listResults td, .ui-dialog table.listResults td {
padding: 2px;
}
#ibo-main-content table.listResults td .view-image, .ui-dialog table.listResults td .view-image {
width: inherit !important;
height: inherit !important;
}
#ibo-main-content table.listResults td .view-image img, .ui-dialog table.listResults td .view-image img {
max-width: 48px !important;
max-height: 48px !important;
display: block;
margin-left: auto;
margin-right: auto;
}
#ibo-main-content table.listResults > tbody > tr > *, .ui-dialog table.listResults > tbody > tr > * {
transition: background-color 400ms linear;
}
#ibo-main-content table.listResults > tbody > tr:hover > *, .ui-dialog table.listResults > tbody > tr:hover > * {
cursor: pointer;
}
#ibo-main-content table.listResults > tbody > tr.selected:hover > *, .ui-dialog table.listResults > tbody > tr.selected:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: #f1a564;
color: #000;
}
#ibo-main-content table.listResults > tbody > tr:hover > *, .ui-dialog table.listResults > tbody > tr:hover > * {
/* hover on lines is currently done toggling td.hover, and having a rule for links */
background-color: #fdf5d0;
color: #000;
}
#ibo-main-content .edit-image .view-image, .ui-dialog .edit-image .view-image {
display: inline-block;
@@ -1697,7 +1655,7 @@ a:visited.ui-button {
visibility: hidden;
}
#ibo-main-content .edit-image .view-image.dirty.compat, .ui-dialog .edit-image .view-image.dirty.compat {
background-image: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
}
#ibo-main-content .edit-image .view-image.dirty.compat img, .ui-dialog .edit-image .view-image.dirty.compat img {
opacity: 0.3;
@@ -1720,7 +1678,7 @@ a:visited.ui-button {
opacity: 0.3;
}
#ibo-main-content .edit-image .edit-buttons .button .ui-icon, .ui-dialog .edit-image .edit-buttons .button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
}
#ibo-main-content .edit-image .file-input, .ui-dialog .edit-image .file-input {
display: block;
@@ -1781,13 +1739,6 @@ a:visited.ui-button {
#ibo-main-content tr td.hover, .ui-dialog tr td.hover, #ibo-main-content tr.even td.hover, .ui-dialog tr.even td.hover, #ibo-main-content .hover a, .ui-dialog .hover a, #ibo-main-content .hover a:visited, .ui-dialog .hover a:visited, #ibo-main-content .hover a:hover, .ui-dialog .hover a:hover, #ibo-main-content .wizContainer tr.even td.hover, .ui-dialog .wizContainer tr.even td.hover, #ibo-main-content .wizContainer tr td.hover, .ui-dialog .wizContainer tr td.hover {
color: #000;
}
#ibo-main-content th, .ui-dialog th {
font-family: Tahoma, Verdana, Arial, Helvetica;
font-size: 8pt;
color: #1c94c4;
height: 20px;
background: #F1F1F1 bottom repeat-x;
}
#ibo-main-content th.header, .ui-dialog th.header {
cursor: pointer;
background-repeat: no-repeat;
@@ -1940,7 +1891,7 @@ a:visited.ui-button {
background: #EA7D1E;
}
#ibo-main-content .actions_details span, .ui-dialog .actions_details span {
background: url("../../../../images/actions_right.png?v=1605021905") no-repeat right;
background: url("../../../../images/actions_right.png?v=1605536038") no-repeat right;
color: #fff;
font-weight: bold;
padding-top: 2px;
@@ -1963,7 +1914,7 @@ a:visited.ui-button {
}
#ibo-main-content .ac_input, .ui-dialog .ac_input {
border: 1px solid #7f9db9;
background: #fff url("../../../../images/ac-background.gif?v=1605021905") no-repeat right;
background: #fff url("../../../../images/ac-background.gif?v=1605536038") no-repeat right;
/* By Rom */
}
#ibo-main-content .csvimport_createobj, .ui-dialog .csvimport_createobj {
@@ -2018,7 +1969,7 @@ a:visited.ui-button {
noborder-top: 1px solid #8b8b8b;
padding: 4px 0px 0px 16px;
font-size: 8pt;
background: url("../../../../images/green-square.gif?v=1605021905") no-repeat bottom left;
background: url("../../../../images/green-square.gif?v=1605536038") no-repeat bottom left;
color: #83b217;
font-weight: bold;
text-decoration: none;
@@ -2094,22 +2045,22 @@ a:visited.ui-button {
margin-top: -8px;
}
#ibo-main-content .notreeview li, .ui-dialog .notreeview li {
background: url("../../../../images/tv-item.gif?v=1605021905") 0 0 no-repeat;
background: url("../../../../images/tv-item.gif?v=1605536038") 0 0 no-repeat;
}
#ibo-main-content .notreeview .collapsable, .ui-dialog .notreeview .collapsable {
background-image: url("../../../../images/tv-collapsable.gif?v=1605021905");
background-image: url("../../../../images/tv-collapsable.gif?v=1605536038");
}
#ibo-main-content .notreeview .expandable, .ui-dialog .notreeview .expandable {
background-image: url("../../../../images/tv-expandable.gif?v=1605021905");
background-image: url("../../../../images/tv-expandable.gif?v=1605536038");
}
#ibo-main-content .notreeview .last, .ui-dialog .notreeview .last {
background-image: url("../../../../images/tv-item-last.gif?v=1605021905");
background-image: url("../../../../images/tv-item-last.gif?v=1605536038");
}
#ibo-main-content .notreeview .lastCollapsable, .ui-dialog .notreeview .lastCollapsable {
background-image: url("../../../../images/tv-collapsable-last.gif?v=1605021905");
background-image: url("../../../../images/tv-collapsable-last.gif?v=1605536038");
}
#ibo-main-content .notreeview .lastExpandable, .ui-dialog .notreeview .lastExpandable {
background-image: url("../../../../images/tv-expandable-last.gif?v=1605021905");
background-image: url("../../../../images/tv-expandable-last.gif?v=1605536038");
}
#ibo-main-content #OrganizationSelection, .ui-dialog #OrganizationSelection {
padding: 5px 0px 16px 20px;
@@ -2285,7 +2236,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.red, .ui-dialog th.red {
background: url("../../../../images/red-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/red-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
}
#ibo-main-content .green, .ui-dialog .green {
@@ -2293,7 +2244,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.green, .ui-dialog th.green {
background: url("../../../../images/green-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/green-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
}
#ibo-main-content .orange, .ui-dialog .orange {
@@ -2301,7 +2252,7 @@ a:visited.ui-button {
color: #000;
}
#ibo-main-content th.orange, .ui-dialog th.orange {
background: url("../../../../images/orange-header.gif?v=1605021905") bottom left repeat-x;
background: url("../../../../images/orange-header.gif?v=1605536038") bottom left repeat-x;
color: #000;
/* For Date Picker: Creates a little calendar icon
* instead of a text link for "Choose date"
@@ -2316,7 +2267,7 @@ a:visited.ui-button {
display: block;
text-indent: -2000px;
overflow: hidden;
background: url("../../../../images/calendar.png?v=1605021905") no-repeat;
background: url("../../../../images/calendar.png?v=1605536038") no-repeat;
}
#ibo-main-content td a.dp-choose-date.dp-disabled, .ui-dialog td a.dp-choose-date.dp-disabled, #ibo-main-content a.dp-choose-date.dp-disabled, .ui-dialog a.dp-choose-date.dp-disabled {
background-position: 0 -20px;
@@ -2368,15 +2319,6 @@ a:visited.ui-button {
box-sizing: border-box;
}
#ibo-main-content .search_form_handler, .ui-dialog .search_form_handler {
position: relative;
z-index: 10;
width: 100%;
margin-left: auto;
margin-right: auto;
font-size: 12px;
text-align: left;
/* To compensate .search_box:text-align */
border: 1px solid #1c94c4;
/* Sizing reset */
}
#ibo-main-content .search_form_handler *, .ui-dialog .search_form_handler * {
@@ -2475,9 +2417,6 @@ a:visited.ui-button {
/* padding-bottom must equals to padding-top - .search_form_criteria:margin-bottom */
background-color: #FFFFFF;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row {
position: relative;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row:not(:first-child), .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row:not(:first-child) {
margin-top: 20px;
}
@@ -2503,6 +2442,11 @@ a:visited.ui-button {
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group {
display: inline;
}
#ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_fg_button, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_fg_button, #ibo-main-content .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_header, .ui-dialog .search_form_handler .sf_criterion_area .sf_criterion_row .sf_criterion_group .sfc_header {
border: 1px solid #E1E7EC;
/* Must be equal to .search_form_criteria:margin-bottom + this:padding-bottom */
border-radius: 3px;
/* Common style between criterion and more criterion */
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button, .ui-dialog .search_form_handler .sf_criterion_area .sf_button {
@@ -2529,14 +2473,14 @@ a:visited.ui-button {
border-radius: 1px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfc_form_group, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfc_form_group, #ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content {
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content {
position: absolute;
z-index: -1;
min-width: 100%;
left: 0px;
margin-top: -1px;
}
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfc_form_group .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfc_form_group .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons {
#ibo-main-content .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .search_form_criteria .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_more_criterion .sfm_content .sfc_fg_buttons, #ibo-main-content .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons, .ui-dialog .search_form_handler .sf_criterion_area .sf_button .sfm_content .sfc_fg_buttons {
white-space: nowrap;
/* Criteria tags */
}
@@ -2983,19 +2927,19 @@ a:visited.ui-button {
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.odd td.truncated, .ui-dialog table.listResults tr.odd td.truncated, #ibo-main-content table.listResults tr td.truncated, .ui-dialog table.listResults tr td.truncated, #ibo-main-content .wizContainer table.listResults tr.odd td.truncated, .ui-dialog .wizContainer table.listResults tr.odd td.truncated, #ibo-main-content .wizContainer table.listResults tr td.truncated, .ui-dialog .wizContainer table.listResults tr td.truncated {
background: url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.even td.truncated, .ui-dialog table.listResults tr.even td.truncated, #ibo-main-content .wizContainer table.listResults tr.even td.truncated, .ui-dialog .wizContainer table.listResults tr.even td.truncated {
background: #f9f9f1 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #f9f9f1 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.even td.hover.truncated, .ui-dialog table.listResults tr.even td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr.even td.hover.truncated, .ui-dialog .wizContainer table.listResults tr.even td.hover.truncated {
background: #fdf5d0 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #fdf5d0 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
/* Beware: IE6 does not support multiple selector with multiple classes, only the last class is used */
}
#ibo-main-content table.listResults tr.odd td.hover.truncated, .ui-dialog table.listResults tr.odd td.hover.truncated, #ibo-main-content table.listResults tr td.hover.truncated, .ui-dialog table.listResults tr td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr.odd td.hover.truncated, .ui-dialog .wizContainer table.listResults tr.odd td.hover.truncated, #ibo-main-content .wizContainer table.listResults tr td.hover.truncated, .ui-dialog .wizContainer table.listResults tr td.hover.truncated {
background: #fdf5d0 url("../../../../images/truncated.png?v=1605021905") bottom repeat-x;
background: #fdf5d0 url("../../../../images/truncated.png?v=1605536038") bottom repeat-x;
}
#ibo-main-content table.listResults.truncated, .ui-dialog table.listResults.truncated {
border-bottom: 0;
@@ -3097,7 +3041,7 @@ a:visited.ui-button {
#ibo-main-content div#logo div, .ui-dialog div#logo div {
height: 88px;
width: 244px;
background: url("../../../../images/itop-logo-2.png?v=1605021905") left no-repeat;
background: url("../../../../images/itop-logo-2.png?v=1605536038") left no-repeat;
}
#ibo-main-content #left-pane .ui-layout-north, .ui-dialog #left-pane .ui-layout-north {
overflow: hidden;
@@ -3246,7 +3190,7 @@ a:visited.ui-button {
margin: 0 2px;
}
#ibo-main-content .ui-layout-button-pin-down, .ui-dialog .ui-layout-button-pin-down {
background: url("../../../../images/splitter-bkg.png?v=1605021905") transparent;
background: url("../../../../images/splitter-bkg.png?v=1605536038") transparent;
width: 16px;
background-position: -144px -144px;
}
@@ -3383,13 +3327,13 @@ a:visited.ui-button {
#ibo-main-content .caselog_header, .ui-dialog .caselog_header {
padding: 3px;
border-top: 1px solid #fff;
background: #ddd url("../../../../images/plus.gif?v=1605021905") left no-repeat;
background: #ddd url("../../../../images/plus.gif?v=1605536038") left no-repeat;
padding-left: 16px;
cursor: pointer;
width: 100%;
}
#ibo-main-content .caselog_header.open, .ui-dialog .caselog_header.open {
background: #ddd url("../../../../images/minus.gif?v=1605021905") left no-repeat;
background: #ddd url("../../../../images/minus.gif?v=1605536038") left no-repeat;
}
#ibo-main-content .caselog_entry, .ui-dialog .caselog_entry, #ibo-main-content .caselog_entry_html, .ui-dialog .caselog_entry_html {
overflow-x: auto;
@@ -3565,7 +3509,7 @@ a:visited.ui-button {
height: 15px;
border: 1px #A6A6A6 solid;
cursor: pointer;
background-image: url("../../../../images/full-screen.png?v=1605021905");
background-image: url("../../../../images/full-screen.png?v=1605536038");
background-repeat: no-repeat;
background-position: center center;
background-size: 98%;
@@ -3612,7 +3556,7 @@ a:visited.ui-button {
padding: 2px;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_document .button .ui-icon, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_document .button .ui-icon {
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=1605536038");
background-color: #EA7D1E;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_image input, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_image input {
@@ -3634,7 +3578,6 @@ a:visited.ui-button {
width: 100%;
}
#ibo-main-content .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_extkey > .field_input_btn, .ui-dialog .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_extkey > .field_input_btn {
display: table-cell;
width: 25px;
padding-left: 0.4em;
}
@@ -3679,7 +3622,7 @@ a:visited.ui-button {
height: 15px;
border: 1px #A6A6A6 solid;
cursor: pointer;
background-image: url("../../../../images/full-screen.png?v=1605021905");
background-image: url("../../../../images/full-screen.png?v=1605536038");
background-repeat: no-repeat;
background-position: center center;
background-size: 98%;
@@ -3744,7 +3687,7 @@ a:visited.ui-button {
padding-left: 0.4em;
}
#ibo-main-content .ac_dlg_loading, .ui-dialog .ac_dlg_loading {
background: white url("../../../../images/indicator.gif?v=1605021905") right center no-repeat;
background: white url("../../../../images/indicator.gif?v=1605536038") right center no-repeat;
}
#ibo-main-content table.pagination, .ui-dialog table.pagination {
display: inline-block;
@@ -3811,10 +3754,10 @@ a:visited.ui-button {
cursor: not-allowed;
}
#ibo-main-content .dragHover, .ui-dialog .dragHover {
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
}
#ibo-main-content .edit_mode .dashlet, .ui-dialog .edit_mode .dashlet {
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605021905");
background: url("../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png?v=1605536038");
padding: 5px;
margin: 0;
position: relative;
@@ -3859,7 +3802,7 @@ a:visited.ui-button {
top: 0;
right: 0;
z-index: 10;
background: transparent url("../../../../images/delete.png?v=1605021905") no-repeat center;
background: transparent url("../../../../images/delete.png?v=1605536038") no-repeat center;
}
#ibo-main-content td.prop_value, .ui-dialog td.prop_value {
text-align: left;
@@ -4088,23 +4031,23 @@ a:visited.ui-button {
}
#ibo-main-content .message_info, .ui-dialog .message_info {
border: 1px solid #993;
background: url("../../../../images/info-mini.png?v=1605021905") 1em 1em no-repeat #ffc;
background: url("../../../../images/info-mini.png?v=1605536038") 1em 1em no-repeat #ffc;
padding-left: 3em;
}
#ibo-main-content .message_ok, .ui-dialog .message_ok {
border: 1px solid #393;
background: url("../../../../images/ok.png?v=1605021905") 1em 1em no-repeat #cfc;
background: url("../../../../images/ok.png?v=1605536038") 1em 1em no-repeat #cfc;
padding-left: 3em;
}
#ibo-main-content .message_warning, .ui-dialog .message_warning {
border: 1px solid #ec9800;
background: url("../../../../images/error.png?v=1605021905") 1em 1em no-repeat #ffd78d;
background: url("../../../../images/error.png?v=1605536038") 1em 1em no-repeat #ffd78d;
color: #000;
padding-left: 3em;
}
#ibo-main-content .message_error, .ui-dialog .message_error {
border: 1px solid #933;
background: url("../../../../images/error.png?v=1605021905") 1em 1em no-repeat #fcc;
background: url("../../../../images/error.png?v=1605536038") 1em 1em no-repeat #fcc;
padding-left: 3em;
}
#ibo-main-content .fg-menu a img, .ui-dialog .fg-menu a img {
@@ -4235,18 +4178,18 @@ a:visited.ui-button {
}
#ibo-main-content #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter span, .ui-dialog #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter span {
padding-left: 20px;
background: url("../../../../images/eye-open-555.png?v=1605021905") 2px center no-repeat;
background: url("../../../../images/eye-open-555.png?v=1605536038") 2px center no-repeat;
}
#ibo-main-content #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter.strikethrough span, .ui-dialog #hiddeable_chapters .ui-tabs .ui-tabs-nav li.hideable-chapter.strikethrough span {
text-decoration: line-through;
background: url("../../../../images/eye-closed-555.png?v=1605021905") 2px center no-repeat;
background: url("../../../../images/eye-closed-555.png?v=1605536038") 2px center no-repeat;
}
#ibo-main-content .printable-version legend, .ui-dialog .printable-version legend {
padding-left: 26px;
background: #1c94c4 url("../../../../images/eye-open-fff.png?v=1605021905") 8px center no-repeat;
background: #1c94c4 url("../../../../images/eye-open-fff.png?v=1605536038") 8px center no-repeat;
}
#ibo-main-content .printable-version .strikethrough legend, .ui-dialog .printable-version .strikethrough legend {
background: #1c94c4 url("../../../../images/eye-closed-fff.png?v=1605021905") 8px center no-repeat;
background: #1c94c4 url("../../../../images/eye-closed-fff.png?v=1605536038") 8px center no-repeat;
}
#ibo-main-content .printable-version fieldset.strikethrough span, .ui-dialog .printable-version fieldset.strikethrough span {
display: none;
@@ -4319,7 +4262,7 @@ a:visited.ui-button {
cursor: pointer;
width: 16px;
height: 16px;
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605021905");
background-image: url("../../../../css/ui-lightness/images/ui-icons_222222_256x240.png?v=1605536038");
background-position: -16px -192px;
}
#ibo-main-content .history_entry_truncated .history_truncated_toggler, .ui-dialog .history_entry_truncated .history_truncated_toggler {
@@ -4404,7 +4347,7 @@ a:visited.ui-button {
#ibo-main-content #itop-breadcrumb .breadcrumb-item a::after, .ui-dialog #itop-breadcrumb .breadcrumb-item a::after {
content: '';
position: absolute;
background-image: url("../../../../images/breadcrumb-separator.png?v=1605021905");
background-image: url("../../../../images/breadcrumb-separator.png?v=1605536038");
background-repeat: no-repeat;
width: 8px;
height: 16px;

View File

@@ -1167,7 +1167,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'UI:ColumnsAndSortOrder' => 'Sloupce a jejich řazení:',
'UI:UseDefaultSettings' => 'Použít výchozí nastavení',
'UI:UseSpecificSettings' => 'Použít následující nastavení:',
'UI:Display_X_ItemsPerPage' => 'Zobrazit %1$s položek na stránku',
'UI:Display_X_ItemsPerPage_prefix' => 'Zobrazit',
'UI:Display_X_ItemsPerPage_suffix' => 'položek na stránku',
'UI:UseSavetheSettings' => 'Uložit nastavení',
'UI:OnlyForThisList' => 'Jen pro tento seznam',
'UI:ForAllLists' => 'Pro všechny seznamy',

View File

@@ -1156,7 +1156,8 @@ Ved tilknytningen til en trigger, bliver hver handling tildelt et "rækkefølge"
'UI:ColumnsAndSortOrder' => 'Kolonner og sortering:',
'UI:UseDefaultSettings' => 'Brug de anbefalede indstillinger',
'UI:UseSpecificSettings' => 'Brug følgende indstillinger:',
'UI:Display_X_ItemsPerPage' => 'Vis %1$s emner per side',
'UI:Display_X_ItemsPerPage_prefix' => 'Vis',
'UI:Display_X_ItemsPerPage_suffix' => 'emner per side',
'UI:UseSavetheSettings' => 'Gem indstillinger',
'UI:OnlyForThisList' => 'Kun for denne liste',
'UI:ForAllLists' => 'For alle lister',

View File

@@ -1154,7 +1154,8 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
'UI:ColumnsAndSortOrder' => 'Spalten und Sortierrheienfolge:',
'UI:UseDefaultSettings' => 'Verwende Default-Einstellungen',
'UI:UseSpecificSettings' => 'Verwende folgende Einstellungen:',
'UI:Display_X_ItemsPerPage' => '%1$s Elemente pro Seite anzeigen',
'UI:Display_X_ItemsPerPage_prefix' => '',
'UI:Display_X_ItemsPerPage_suffix' => 'Elemente pro Seite anzeigen',
'UI:UseSavetheSettings' => 'Einstellungen speichern',
'UI:OnlyForThisList' => 'Nur für diese Liste',
'UI:ForAllLists' => 'Standard für alle Listen',

View File

@@ -1173,7 +1173,8 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:ColumnsAndSortOrder' => 'Columns and sort order:',
'UI:UseDefaultSettings' => 'Use the Default Settings',
'UI:UseSpecificSettings' => 'Use the Following Settings:',
'UI:Display_X_ItemsPerPage' => 'Display %1$s items per page',
'UI:Display_X_ItemsPerPage_prefix' => 'Display',
'UI:Display_X_ItemsPerPage_suffix' => 'items per page',
'UI:UseSavetheSettings' => 'Save the Settings',
'UI:OnlyForThisList' => 'Only for this list',
'UI:ForAllLists' => 'Default for all lists',

View File

@@ -1169,7 +1169,8 @@ Cuando se asocien con un disparador, cada acción recibe un número de "orden",
'UI:ColumnsAndSortOrder' => 'Columnas y Ordenamiento:',
'UI:UseDefaultSettings' => 'Usar Configuración por Omisión',
'UI:UseSpecificSettings' => 'Usar la Siguiente Configuración:',
'UI:Display_X_ItemsPerPage' => 'Desplegar %1$s elementos por página',
'UI:Display_X_ItemsPerPage_prefix' => 'Desplegar',
'UI:Display_X_ItemsPerPage_suffix' => 'elementos por página',
'UI:UseSavetheSettings' => 'Guardar Configuraciones',
'UI:OnlyForThisList' => 'Sólo esta Lista',
'UI:ForAllLists' => 'Defecto en todas las listas',

View File

@@ -1153,7 +1153,8 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
'UI:ColumnsAndSortOrder' => 'Colonnes et ordre de tri:',
'UI:UseDefaultSettings' => 'Utiliser les réglages par défaut',
'UI:UseSpecificSettings' => 'Utiliser les réglages suivants:',
'UI:Display_X_ItemsPerPage' => 'Afficher %1$s éléments par page',
'UI:Display_X_ItemsPerPage_prefix' => 'Afficher',
'UI:Display_X_ItemsPerPage_suffix' => 'éléments par page',
'UI:UseSavetheSettings' => 'Enregistrer ces réglages',
'UI:OnlyForThisList' => 'Seulement pour cette liste',
'UI:ForAllLists' => 'Défaut pour toutes les listes',

View File

@@ -1154,7 +1154,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'UI:ColumnsAndSortOrder' => 'カラムと並び順:',
'UI:UseDefaultSettings' => '既定のセッティングを使用',
'UI:UseSpecificSettings' => '次のセッティングを使用:',
'UI:Display_X_ItemsPerPage' => '1ページに %1$s アイテムを表示',
'UI:Display_X_ItemsPerPage_prefix' => '1ページに',
'UI:Display_X_ItemsPerPage_suffix' => 'アイテムを表示',
'UI:UseSavetheSettings' => 'セッティングを保存',
'UI:OnlyForThisList' => 'このリストのみ',
'UI:ForAllLists' => 'すべてのリストのデフォルト',

View File

@@ -1177,7 +1177,8 @@ Bij die koppeling wordt aan elke actie een volgorde-nummer gegeven. Dit bepaalt
'UI:ColumnsAndSortOrder' => 'Kolommen en sorteervolgorde:',
'UI:UseDefaultSettings' => 'Gebruik de standaard instellingen',
'UI:UseSpecificSettings' => 'Gebruik de volgende instellingen:',
'UI:Display_X_ItemsPerPage' => 'Geef %1$s items per pagina weer',
'UI:Display_X_ItemsPerPage_prefix' => 'Geef',
'UI:Display_X_ItemsPerPage_suffix' => 'items per pagina weer',
'UI:UseSavetheSettings' => 'Sla de instellingen op',
'UI:OnlyForThisList' => 'Alleen voor deze lijst',
'UI:ForAllLists' => 'Standaard voor alle lijsten',

View File

@@ -1167,7 +1167,8 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:ColumnsAndSortOrder' => 'Colunas e ordem de classificação:',
'UI:UseDefaultSettings' => 'Use a configuração padrão',
'UI:UseSpecificSettings' => 'Use as seguintes configurações:',
'UI:Display_X_ItemsPerPage' => 'Mostrar %1$s itens por página',
'UI:Display_X_ItemsPerPage_prefix' => 'Mostrar',
'UI:Display_X_ItemsPerPage_suffix' => 'itens por página',
'UI:UseSavetheSettings' => 'Salvar configurações',
'UI:OnlyForThisList' => 'Somente para esta lista',
'UI:ForAllLists' => 'Para todas as listas',

View File

@@ -1145,7 +1145,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'UI:ColumnsAndSortOrder' => 'Колонки и порядок сортировки:',
'UI:UseDefaultSettings' => 'Использовать настройки по умолчанию',
'UI:UseSpecificSettings' => 'Использовать эти настройки:',
'UI:Display_X_ItemsPerPage' => 'Показывать %1$s элементов на странице',
'UI:Display_X_ItemsPerPage_prefix' => 'Показывать',
'UI:Display_X_ItemsPerPage_suffix' => 'элементов на странице',
'UI:UseSavetheSettings' => 'Сохранить настройки',
'UI:OnlyForThisList' => 'Только для текущего списка',
'UI:ForAllLists' => 'Для всех списков',

View File

@@ -1156,7 +1156,8 @@ Keď sú priradené spúštačom, každej akcii je dané číslo "príkazu", šp
'UI:ColumnsAndSortOrder' => 'Stĺpce a triediaci príkaz:',
'UI:UseDefaultSettings' => 'Použite štandardné nastavenia',
'UI:UseSpecificSettings' => 'Použite nasledovné nastavenia:',
'UI:Display_X_ItemsPerPage' => 'Zobraziť %1$s položiek na stránku',
'UI:Display_X_ItemsPerPage_prefix' => 'Zobraziť',
'UI:Display_X_ItemsPerPage_suffix' => 'položiek na stránku',
'UI:UseSavetheSettings' => 'Uložiť nastavenia',
'UI:OnlyForThisList' => 'Iba pre tento zoznam',
'UI:ForAllLists' => 'Pre všetky zoznamy',

View File

@@ -0,0 +1,33 @@
<?php
/**
* Copyright (C) 2013-2020 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
*/
// Global search
Dict::Add('EN US', 'English', 'English', array(
'UI:Datatables:Language:Processing' => 'Please wait...',
'UI:Datatables:Language:Search' => 'Filter:',
'UI:Datatables:Language:LengthMenu' => 'Showing _MENU_ out of',
'UI:Datatables:Language:ZeroRecords' => 'No result',
'UI:Datatables:Language:Info' => '_TOTAL_ items',
'UI:Datatables:Language:InfoEmpty' => 'No information',
'UI:Datatables:Language:InfoFiltered' => 'filtered out of _MAX_ items',
'UI:Datatables:Language:EmptyTable' => 'No data available in this table',
'UI:Datatables:Language:DisplayLength:All' => 'All',
'UI:Datatables:Language:Sort:Ascending' => 'enable for an ascending sort',
'UI:Datatables:Language:Sort:Descending' => 'enable for a descending sort',
));

View File

@@ -1167,7 +1167,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'UI:ColumnsAndSortOrder' => '列和排序顺序:',
'UI:UseDefaultSettings' => '使用默认配置',
'UI:UseSpecificSettings' => '使用下面的配置:',
'UI:Display_X_ItemsPerPage' => '每页显示 %1$s 个项目',
'UI:Display_X_ItemsPerPage_prefix' => '每页显示',
'UI:Display_X_ItemsPerPage_suffix' => '个项目',
'UI:UseSavetheSettings' => '保存设置',
'UI:OnlyForThisList' => '仅这个列表',
'UI:ForAllLists' => '默认所有列表',

View File

@@ -1,4 +1,4 @@
# Deprecated in 2.8.0
# Deprecated in 3.0.0
* TabManager::GetCurrentTabLength()
* TabManager::TruncateTab()
@@ -6,8 +6,9 @@
* TabManager::RenderIntoContent()
* iTopWebPage::SelectTab()
*cmdbabstract->GetDisplaySet
*cmdbabstract->GetDisplayExtendedSet
# Modified in 2.8.0
# Modified in 3.0.0
* iTabbedPage::AddTabContainer -> one optional parameter added

125
js/dataTables.pipeline.js Normal file
View File

@@ -0,0 +1,125 @@
//
// Pipelining function for DataTables. To be used to the `ajax` option of DataTables
//
$.fn.dataTable.pipeline = function ( opts ) {
// Configuration options
var conf = $.extend( {
pages: 5, // number of pages to cache
url: '', // script url
data: null, // function or object with parameters to send to the server
// matching how `ajax.data` works in DataTables
method: 'GET' // Ajax HTTP method
}, opts );
// Private variables for storing the cache
var cacheLower = -1;
var cacheUpper = null;
var cacheLastRequest = null;
var cacheLastJson = null;
var draw_number = 1;
return function ( request, drawCallback, settings ) {
var ajax = false;
var requestStart = request.start;
var drawStart = request.start;
var requestLength = request.length;
if(request.start=undefined)
{
requestStart = settings._iDisplayStart;
drawStart = settings._iDisplayStart;
requestLength = settings._iDisplayLength;
}
var requestEnd = requestStart + requestLength;
if ( settings.clearCache ) {
// API requested that the cache be cleared
ajax = true;
settings.clearCache = false;
}
else if ( cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper ) {
// outside cached data - need to make a request
ajax = true;
}
else if ( JSON.stringify( request.order ) !== JSON.stringify( cacheLastRequest.order ) ||
JSON.stringify( request.columns ) !== JSON.stringify( cacheLastRequest.columns ) ||
JSON.stringify( request.search ) !== JSON.stringify( cacheLastRequest.search )
) {
// properties changed (ordering, columns, searching)
ajax = true;
}
else if(cacheLastJson == undefined || cacheLastJson.length==0)
{
ajax = true;
}
// Store the request for checking next time around
cacheLastRequest = $.extend( true, {}, request );
if ( ajax ) {
// Need data from the server
if ( requestStart < cacheLower ) {
requestStart = requestStart - (requestLength*(conf.pages-1));
if ( requestStart < 0 ) {
requestStart = 0;
}
}
cacheLower = requestStart;
cacheUpper = requestStart + (requestLength * conf.pages);
request.start = requestStart;
request.length = requestLength*conf.pages;
request.end = requestStart+ requestLength*conf.pages;
// Provide the same `data` options as DataTables.
if ( typeof conf.data === 'function' ) {
// As a function it is executed with the data object as an arg
// for manipulation. If an object is returned, it is used as the
// data object to submit
var d = conf.data( request );
if ( d ) {
$.extend( request, d );
}
}
else if ( $.isPlainObject( conf.data ) ) {
// As an object, the data given extends the default
$.extend( request, conf.data );
}
return $.ajax( {
"type": conf.method,
"url": conf.url,
"data": request,
"dataType": "json",
"cache": false,
"success": function ( json ) {
cacheLastJson = $.extend(true, {}, json);
if ( cacheLower != drawStart ) {
json.data.splice( 0, drawStart-cacheLower );
}
if ( requestLength >= -1 ) {
json.data.splice( requestLength, json.data.length );
}
drawCallback( json );
}
} );
}
else {
json = $.extend( true, {}, cacheLastJson );
json.draw = request.draw; // Update the echo for each response
json.data.splice( 0, requestStart-cacheLower );
json.data.splice( requestLength, json.data.length );
drawCallback(json);
}
}
};
// Register an API method that will empty the pipelined data, forcing an Ajax
// fetch on the next draw (i.e. `table.clearPipeline().draw()`)
$.fn.dataTable.Api.register( 'clearPipeline()', function () {
return this.iterator( 'table', function ( settings ) {
settings.clearCache = true;
} );
} );

334
js/dataTables.settings.js Normal file
View File

@@ -0,0 +1,334 @@
// jQuery UI style "widget" for selecting and sorting "fields"
$(function()
{
// the widget definition, where "itop" is the namespace,
// "DataTableSettings" the widget name
$.widget( "itop.DataTableSettings",
{
// default options
options:
{
sListId: '',
oColumns: {},
sSelectMode: '',
sViewLink: 'true',
iPageSize: -1,
oClassAliases: {},
sTableId : null,
oExtraParams: {},
sRenderUrl: 'index.php',
oRenderParameters: {},
oDefaultSettings: {},
oLabels: { moveup: 'Move Up', movedown: 'Move Down' }
},
// the constructor
_create: function(mydatatable, options)
{
this.aDlgStateParams = ['iDefaultPageSize', 'oColumns'];
this.element.addClass('itop-datatable');
var me = this;
var bViewLink = (this.options.sViewLink == 'true');
$('#sfl_'+me.options.sListId).fieldsorter({hasKeyColumn: bViewLink, labels: this.options.oLabels, fields: this.options.oColumns, onChange: function() { me._onSpecificSettings(); } });
$('#datatable_dlg_'+me.options.sListId).find('input[name=page_size]').click(function() { me._onSpecificSettings(); });
$('#datatable_dlg_'+me.options.sListId).find('input[name=save_settings]').click(function() { me._updateSaveScope(); });
this.element.find('.itop_popup > ul li').popupmenu();
this._updateSaveScope();
this._saveDlgState();
},
// called when created, and later when changing options
_refresh: function()
{
oParams = this.options.oData;
oParams.operation = 'search_and_refresh';
oParams.start = 0;
oParams.end = this.options.iPageSize;
oParams.select_mode = this.options.sSelectMode;
oParams.display_key = this.options.sViewLink;
oParams.class_aliases = this.options.oClassAliases;
oParams.columns = this.options.oColumns;
var iSortCol = 0;
var aCurrentSort = [];
for(var k1 in oParams.columns) //Aliases
{
for(var k2 in oParams.columns[k1]) //Attribute codes
{
if (oParams.columns[k1][k2].sort != 'none')
{
oParams.sort_col = iSortCol;
oParams.sort_order = oParams.columns[k1][k2].sort;
aCurrentSort.push([iSortCol, (oParams.columns[k1][k2].sort == 'asc') ? 0 : 1]);
break; //TODO make this more generic, Sort on just one column for now
}
iSortCol++;
}
break; //TODO: DBObjectSet supports only sorting on the first alias of the set
}
oParams.list_id = this.options.sListId;
var me = this;
this.element.block();
$('#'+me.options.sListId).DataTable().ajax.reload();
$.post(this.options.sRenderUrl, oParams, function(data) {
// Nasty workaround to clear the pager's state for paginated lists !!!
// See jquery.tablesorter.pager.js / saveParams / restoreParams
if (window.pager_params)
{
window.pager_params['pager'+me.options.sListId] = undefined;
}
// try {
var parentElt = $('#'+me.options.sListId).parent().parent();
$('#'+me.options.sListId).DataTable().destroy(true);
var sThead="";
if(me.options.sSelectMode !=""){
sThead += "<th></th>";
}
var aOptions = JSON.parse(data);
$.each(aOptions['allColumns'], function(i, item) {
$.each(item, function(j, champs) {
if(champs.checked == 'true') {
sThead += "<th>"+champs.label+"</th>";
}
});
});
$.each(aOptions['columns'], function(i, item) {
aOptions["columns"][i]["render"]["display"] = new Function ( "data, type, row" , aOptions["columns"][i]["render"]["display"]);
});
parentElt.append( "<table id=\""+me.options.sListId+"\" width=\"100%\" class=\"ibo-datatable\">" +
"<thead><tr>"+sThead+"</tr></thead></table>" );
aOptions["lengthMenu"]= [[oParams.end, oParams.end*2, oParams.end*3, oParams.end*4, -1], [oParams.end, oParams.end*2, oParams.end*3, oParams.end*4, aOptions["lengthMenu"]]];
aOptions["ajax"]=eval(aOptions["ajax"]);
$('#'+me.options.sListId).DataTable(aOptions);
me.element.unblock();
}, 'html' );
},
_useDefaultSettings: function(bResetAll)
{
var oParams = this.options.oData;
oParams.operation = 'datatable_reset_settings';
oParams.table_id = this.options.sTableId;
oParams.defaults = bResetAll;
oParams.class_aliases = this.options.oClassAliases;
var me = this;
$.post(this.options.sRenderUrl, oParams, function(data) {
// Do nothing...
}, 'html' );
},
_saveSettings: function(bSaveAsDefaults)
{
var oParams = this.options.oData ;
oParams.operation = 'datatable_save_settings';
oParams.page_size = this.options.iPageSize;
oParams.table_id = this.options.sTableId;
oParams.defaults = bSaveAsDefaults;
oParams.columns = this.options.oColumns;
var iSortCol = 0;
var sSortOrder = '';
for(var i in this.options.oColumns)
{
if (this.options.oColumns[i].checked)
{
if (this.options.oColumns[i].sort != 'none')
{
sSortOrder = this.options.oColumns[i].sort;
}
else
{
iSortCol++;
}
}
}
oParams.sort_col = iSortCol;
oParams.sort_order = sSortOrder;
var me = this;
$.post(this.options.sRenderUrl, oParams, function(data) {
// Do nothing...
}, 'html' );
},
onDlgOk: function()
{
var oOptions = {};
oSettings = $('#datatable_dlg_'+this.options.sListId).find('input[name=settings]:checked');
if (oSettings.val() == 'defaults')
{
oOptions = { iPageSize: this.options.oDefaultSettings.iDefaultPageSize,
oColumns: this.options.oDefaultSettings.oColumns
};
}
else
{
var oDisplayColumns = {};
var iColIdx = 0;
var iSortIdx = 0;
var sSortDirection = 'asc';
var oColumns = $('#datatable_dlg_'+this.options.sListId).find(':itop-fieldsorter').fieldsorter('get_params');
var iPageSize = parseInt($('#datatable_dlg_'+this.options.sListId+' input[name=page_size]').val(), 10);
oOptions = {oColumns: oColumns, iPageSize: iPageSize, iDefaultPageSize: iPageSize };
}
this._setOptions(oOptions);
this._refresh();
// Check if we need to save the settings or not...
var oSaveCheck = $('#datatable_dlg_'+this.options.sListId).find('input[name=save_settings]');
var oSaveScope = $('#datatable_dlg_'+this.options.sListId).find('input[name=scope]:checked');
if (oSaveCheck.prop('checked'))
{
if (oSettings.val() == 'defaults')
{
this._useDefaultSettings((oSaveScope.val() == 'defaults'));
}
else
{
this._saveSettings((oSaveScope.val() == 'defaults'));
}
}
this._saveDlgState();
},
onDlgCancel: function()
{
this._restoreDlgState();
},
_onSpecificSettings: function()
{
$('#datatable_dlg_'+this.options.sListId).find('input.specific_settings').prop('checked', true);
},
_updateSaveScope: function()
{
var oSaveCheck = $('#datatable_dlg_'+this.options.sListId).find('input[name=save_settings]');
if (oSaveCheck.prop('checked'))
{
$('#datatable_dlg_'+this.options.sListId).find('input[name=scope]').each(function() {
if ($(this).attr('stay-disabled') != 'true')
{
$(this).prop('disabled', false);
}
});
}
else
{
$('#datatable_dlg_'+this.options.sListId).find('input[name=scope]').prop('disabled', true);
}
},
// events bound via _bind are removed automatically
// revert other modifications here
_destroy: function()
{
this.element.removeClass('itop-datatable');
$('#sfl_'+this.options.sListId).remove();
$('#datatable_dlg_'+this.options.sListId).remove();
},
// _setOptions is called with a hash of all options that are changing
_setOptions: function()
{
// in 1.9 would use _superApply
this._superApply(arguments);
},
// _setOption is called for each individual option that is changing
_setOption: function( key, value )
{
// in 1.9 would use _super
this._superApply(arguments);
},
UpdateState: function( config )
{
var iPageSize = config.page_size;
if (iPageSize == -1)
{
iPageSize = 0;
}
this.options.iPageSize = iPageSize;
var iPos = 0;
for (alias in this.options.oColumns)
{
for (attcode in this.options.oColumns[alias])
{
this.options.oColumns[alias][attcode]['sort'] = 'none';
if (this.options.oColumns[alias][attcode]['checked'])
{
if (iPos == config.sort_index)
{
this.options.oColumns[alias][attcode]['sort'] = config.sort_order;
}
iPos++;
}
}
}
var dlgElement = $('#datatable_dlg_'+this.options.sListId);
dlgElement.find('input[name=page_size]').val(iPageSize);
dlgElement.find(':itop-fieldsorter').fieldsorter('option', { fields: this.options.oColumns });
},
_saveDlgState: function()
{
this.originalState = {};
for(k in this.aDlgStateParams)
{
this.originalState[this.aDlgStateParams[k]] = this.options[this.aDlgStateParams[k]];
}
this.originalState.oFields = $('#datatable_dlg_'+this.options.sListId).find(':itop-fieldsorter').fieldsorter('get_params');
},
_restoreDlgState: function()
{
var dlgElement = $('#datatable_dlg_'+this.options.sListId);
for(k in this.aDlgStateParams)
{
this._setOption(this.aDlgStateParams[k], this.originalState[this.aDlgStateParams[k]]);
this._refresh();
}
dlgElement.find('input[name=page_size]').val(this.originalState.iDefaultPageSize);
dlgElement.find(':itop-fieldsorter').fieldsorter('option', { fields: this.originalState.oFields });
$('#datatable_dlg_'+this.options.sListId).unblock();
},
IsDialogOpen: function()
{
var oDlgOpen = $('#datatable_dlg_'+this.options.sListId+' :visible');
return (oDlgOpen.length > 0);
},
DoRefresh: function()
{
this._refresh();
},
GetMultipleSelectionParams: function()
{
var oRes = {};
oRes.selectionMode = '';
if (this.element.find(':input[name=selectionMode]').length > 0)
{
oRes.selectionMode = this.element.find(':input[name=selectionMode]').val();
}
oRes.selectObject = [];
this.element.find(':input[name^=selectObject]:checked').each(function() {
oRes.selectObject.push($(this).val());
});
oRes.storedSelection = [];
this.element.find(':input[name^=storedSelection]').each(function() {
oRes.storedSelection.push($(this).val());
});
return oRes;
}
});
});

View File

@@ -1,4 +1,5 @@
// jQuery UI style "widget" for selecting and sorting "fields"
//@deprecated
$(function()
{
// the widget definition, where "itop" is the namespace,

View File

@@ -193,7 +193,10 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
theMap['selectionMode'] = sMode;
$('#fs_SearchFormToAdd_'+me.id+' :input').each(
function (i) {
theMap[this.name] = this.value;
if(this.name !="")
{
theMap[this.name] = this.value;
}
}
);
theMap['sRemoteClass'] = theMap['class']; // swap 'class' (defined in the form) and 'remoteClass'
@@ -206,10 +209,11 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
theMap[this.name].push(this.value);
$(this).remove(); // Remove the selection for the next time the dialog re-opens
});
theMap["storedSelection[]"]=eval("oSelectedItemsadd_"+me.id);
// Retrieve the 'filter' definition
var table = $('#ResultsToAdd_'+me.id).find('table.listResults')[0];
theMap['filter'] = table.config.filter;
theMap['extra_params'] = table.config.extra_params;
theMap['filter'] = $(':input[name=filter]', context).val();
theMap['extra_params'] = $(':input[name=extra_params]', context).val();
}
// else
// {

View File

@@ -380,7 +380,7 @@ $(function()
// Prepare base DOM structure
this.element
.append('<div class="sfc_header"><div class="sfc_title"></div><span class="sfc_toggle"><a class="fas fa-caret-down"' + ' href="#"></a></span></div>')
.append('<div class="sfc_form_group"><div class="sfc_fg_operators"></div><div class="sfc_fg_buttons"></div></div>');
.append('<div class="sfc_form_group ibo-form-group"><div class="sfc_fg_operators"></div><div class="sfc_fg_buttons"></div></div>');
// Bind events
// Note: No event to handle criteria closing when clicking outside of it as it is already handle by the form handler.

View File

@@ -203,8 +203,8 @@ $(function()
$('#ibo-breadcrumbs')
.breadcrumb('destroy')
.breadcrumb({
.breadcrumbs('destroy')
.breadcrumbs({
itop_instance_id: oData['breadcrumb_instance_id'],
max_count: oData['breadcrumb_max_count'],
new_entry: {
@@ -348,14 +348,14 @@ $(function()
me._submit();
});
// - Toggle icon
this.element.find('.sf_title').on('click', function(oEvent){
this.element.find('.ibo-panel--header').on('click', function(oEvent){
// Prevent anchors
oEvent.preventDefault();
// Prevent toggle on <select>
if(oEvent.target.nodeName.toLowerCase() !== 'select' && oEvent.target.nodeName.toLowerCase() !== 'option')
{
me.element.toggleClass('closed');
me.element.find('ibo-panel--body').toggle();
}
});
},
@@ -373,17 +373,17 @@ $(function()
{
oCriterionAreaElem = $('<div></div>').appendTo(this.element);
}
oCriterionAreaElem.addClass('sf_criterion_area');
oCriterionAreaElem.addClass('sf_criterion_area ibo-criterion-area');
this.elements.criterion_area = oCriterionAreaElem;
// Clean area
oCriterionAreaElem
.html('')
.append('<div class="sf_criterion_row"></div>');
.append('<div class="sf_criterion_row ibo-criterion-row"></div>');
// Prepare content
this._prepareMoreCriterionMenu();
this._prepareExistingCriterion();
this._prepareMoreCriterionMenu();
this._prepareSubmitButton();
},
// - Prepare "more" button
@@ -398,7 +398,7 @@ $(function()
// Header part
var oHeaderElem = $('<div class="sfm_header"></div>')
.append('<a class="sfm_toggler" href="#"><span class="sfm_tg_title">' + Dict.S('UI:Search:Criterion:MoreMenu:AddCriteria') + '</span><span class="sfm_tg_icon fas fa-plus"></span></a>')
.append('<a class="sfm_toggler" href="#"><span class="sfm_tg_icon fas fa-plus"></span></a>')
.appendTo(this.elements.more_criterion);
// Content part
@@ -695,7 +695,7 @@ $(function()
else
{
var oCriterionRowElem = $('<div></div>')
.addClass('sf_criterion_row')
.addClass('sf_criterion_row ibo-criterion-row')
.appendTo(this.elements.criterion_area);
}
@@ -706,7 +706,7 @@ $(function()
else
{
var oCriterionGroupElem = $('<div></div>')
.addClass('sf_criterion_group')
.addClass('sf_criterion_group ibo-criterion-group')
.appendTo(oCriterionRowElem);
}
@@ -754,7 +754,7 @@ $(function()
oResultAreaElem = $('<div class="display_block"></div>').insertAfter(this.element.closest('.display_block'));
}
}
oResultAreaElem.addClass('sf_results_area');
//oResultAreaElem.addClass('display_block sf_results_area');
// Make placeholder if nothing yet
if(oResultAreaElem.html() === '')

View File

@@ -262,11 +262,11 @@ function UpdateFileName(id, sNewFileName) {
* Reload a search form for the specified class
*/
function ReloadSearchForm(divId, sClassName, sBaseClass, sContext, sTableId, sExtraParams) {
var oDiv = $('#ds_'+divId);
var oDiv = $('#'+divId);
oDiv.block();
// deprecated in jQuery 1.8
//var oFormEvents = $('#ds_'+divId+' form').data('events');
var oForm = $('#ds_'+divId+' form');
var oForm = $('#'+divId+' form');
var oFormEvents = $._data(oForm[0], "events");
// Save the submit handlers
@@ -276,11 +276,11 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext, sTableId, sEx
aSubmit [index] = {data: oFormEvents.submit[index].data, namespace: oFormEvents.submit[index].namespace, handler: oFormEvents.submit[index].handler};
}
}
sAction = $('#ds_'+divId+' form').attr('action');
sAction = $('#'+divId+' form').attr('action');
// Save the current values in the form
var oMap = {};
$('#ds_'+divId+" form :input[name!='']").each(function () {
$('#'+divId+" form :input[name!='']").each(function () {
oMap[this.name] = this.value;
});
oMap.operation = 'search_form';

View File

@@ -37,8 +37,8 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
@@ -60,7 +60,7 @@ class ClassLoader
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();

View File

@@ -161,6 +161,12 @@ return array(
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletContainer' => $baseDir . '/sources/application/UI/Component/Dashlet/DashletContainer.php',
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletFactory' => $baseDir . '/sources/application/UI/Component/Dashlet/DashletFactory.php',
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletHeaderStatic' => $baseDir . '/sources/application/UI/Component/Dashlet/DashletHeaderStatic.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableBlock' => $baseDir . '/sources/application/UI/Component/DataTable/DataTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableFactory' => $baseDir . '/sources/application/UI/Component/DataTable/DataTableFactory.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableSettings' => $baseDir . '/sources/application/UI/Component/DataTable/DataTableSettings.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\FormTableRow\\FormTableRow' => $baseDir . '/sources/application/UI/Component/DataTable/StaticTable/FormTableRow/FormTableRow.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\FormTable\\FormTable' => $baseDir . '/sources/application/UI/Component/DataTable/StaticTable/FormTable/FormTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\StaticTable' => $baseDir . '/sources/application/UI/Component/DataTable/StaticTable/StaticTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\FieldSet\\FieldSet' => $baseDir . '/sources/application/UI/Component/FieldSet/FieldSet.php',
'Combodo\\iTop\\Application\\UI\\Component\\Field\\Field' => $baseDir . '/sources/application/UI/Component/Field/Field.php',
'Combodo\\iTop\\Application\\UI\\Component\\Form\\Form' => $baseDir . '/sources/application/UI/Component/Form/Form.php',
@@ -288,6 +294,7 @@ return array(
'Combodo\\iTop\\Renderer\\RenderingOutput' => $baseDir . '/sources/Renderer/RenderingOutput.php',
'Combodo\\iTop\\TwigExtension' => $baseDir . '/application/twigextension.class.inc.php',
'CompileCSSService' => $baseDir . '/application/themehandler.class.inc.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Config' => $baseDir . '/core/config.class.inc.php',
'ConfigException' => $baseDir . '/core/config.class.inc.php',
'ConfigPlaceholdersResolver' => $baseDir . '/core/config.class.inc.php',
@@ -331,7 +338,6 @@ return array(
'DashletProxy' => $baseDir . '/application/dashlet.class.inc.php',
'DashletUnknown' => $baseDir . '/application/dashlet.class.inc.php',
'DataTable' => $baseDir . '/application/datatable.class.inc.php',
'DataTableSettings' => $baseDir . '/application/datatable.class.inc.php',
'Datamatrix' => $vendorDir . '/combodo/tcpdf/include/barcodes/datamatrix.php',
'DateTimeFormat' => $baseDir . '/core/datetimeformat.class.inc.php',
'DeadLockLog' => $baseDir . '/core/log.class.inc.php',
@@ -487,7 +493,6 @@ return array(
'PDFBulkExport' => $baseDir . '/core/pdfbulkexport.class.inc.php',
'PDFPage' => $baseDir . '/sources/application/WebPage/PDFPage.php',
'PEAR' => $vendorDir . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_Error' => $vendorDir . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_ErrorStack' => $vendorDir . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
'PHP_LexerGenerator' => $baseDir . '/core/oql/build/PHP/LexerGenerator.php',
@@ -1038,7 +1043,6 @@ return array(
'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapterInterface.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableAdapterEvent' => $vendorDir . '/symfony/cache/Adapter/TraceableAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php',
'Symfony\\Component\\Cache\\CacheItem' => $vendorDir . '/symfony/cache/CacheItem.php',
'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => $vendorDir . '/symfony/cache/DataCollector/CacheDataCollector.php',
@@ -1061,7 +1065,6 @@ return array(
'Symfony\\Component\\Cache\\Simple\\Psr6Cache' => $vendorDir . '/symfony/cache/Simple/Psr6Cache.php',
'Symfony\\Component\\Cache\\Simple\\RedisCache' => $vendorDir . '/symfony/cache/Simple/RedisCache.php',
'Symfony\\Component\\Cache\\Simple\\TraceableCache' => $vendorDir . '/symfony/cache/Simple/TraceableCache.php',
'Symfony\\Component\\Cache\\Simple\\TraceableCacheEvent' => $vendorDir . '/symfony/cache/Simple/TraceableCache.php',
'Symfony\\Component\\Cache\\Traits\\AbstractTrait' => $vendorDir . '/symfony/cache/Traits/AbstractTrait.php',
'Symfony\\Component\\Cache\\Traits\\ApcuTrait' => $vendorDir . '/symfony/cache/Traits/ApcuTrait.php',
'Symfony\\Component\\Cache\\Traits\\ArrayTrait' => $vendorDir . '/symfony/cache/Traits/ArrayTrait.php',
@@ -1150,8 +1153,6 @@ return array(
'Symfony\\Component\\Config\\Resource\\FileResource' => $vendorDir . '/symfony/config/Resource/FileResource.php',
'Symfony\\Component\\Config\\Resource\\GlobResource' => $vendorDir . '/symfony/config/Resource/GlobResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionMethodHhvmWrapper' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionParameterHhvmWrapper' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ResourceInterface' => $vendorDir . '/symfony/config/Resource/ResourceInterface.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceChecker.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceInterface.php',
@@ -1328,8 +1329,6 @@ return array(
'Symfony\\Component\\DependencyInjection\\Compiler\\FactoryReturnTypePass' => $vendorDir . '/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\LoggingFormatter' => $vendorDir . '/symfony/dependency-injection/Compiler/LoggingFormatter.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationContainerBuilder' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationParameterBag' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => $vendorDir . '/symfony/dependency-injection/Compiler/PassConfig.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => $vendorDir . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php',
@@ -1439,7 +1438,6 @@ return array(
'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/GlobFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/IniFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\ProtectedPhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/XmlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/YamlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Parameter' => $vendorDir . '/symfony/dependency-injection/Parameter.php',
@@ -1463,7 +1461,6 @@ return array(
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php',
@@ -1731,7 +1728,6 @@ return array(
'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/routing/Loader/GlobFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => $vendorDir . '/symfony/routing/Loader/ObjectRouteLoader.php',
'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php',
'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/DumperCollection.php',

View File

@@ -13,12 +13,17 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'));
@@ -29,7 +34,7 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::getInitializer($loader));
} else {

View File

@@ -391,6 +391,12 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletContainer' => __DIR__ . '/../..' . '/sources/application/UI/Component/Dashlet/DashletContainer.php',
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletFactory' => __DIR__ . '/../..' . '/sources/application/UI/Component/Dashlet/DashletFactory.php',
'Combodo\\iTop\\Application\\UI\\Component\\Dashlet\\DashletHeaderStatic' => __DIR__ . '/../..' . '/sources/application/UI/Component/Dashlet/DashletHeaderStatic.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableBlock' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/DataTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableFactory' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/DataTableFactory.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\DataTableSettings' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/DataTableSettings.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\FormTableRow\\FormTableRow' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/StaticTable/FormTableRow/FormTableRow.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\FormTable\\FormTable' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/StaticTable/FormTable/FormTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\DataTable\\StaticTable\\StaticTable' => __DIR__ . '/../..' . '/sources/application/UI/Component/DataTable/StaticTable/StaticTable.php',
'Combodo\\iTop\\Application\\UI\\Component\\FieldSet\\FieldSet' => __DIR__ . '/../..' . '/sources/application/UI/Component/FieldSet/FieldSet.php',
'Combodo\\iTop\\Application\\UI\\Component\\Field\\Field' => __DIR__ . '/../..' . '/sources/application/UI/Component/Field/Field.php',
'Combodo\\iTop\\Application\\UI\\Component\\Form\\Form' => __DIR__ . '/../..' . '/sources/application/UI/Component/Form/Form.php',
@@ -518,6 +524,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Combodo\\iTop\\Renderer\\RenderingOutput' => __DIR__ . '/../..' . '/sources/Renderer/RenderingOutput.php',
'Combodo\\iTop\\TwigExtension' => __DIR__ . '/../..' . '/application/twigextension.class.inc.php',
'CompileCSSService' => __DIR__ . '/../..' . '/application/themehandler.class.inc.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Config' => __DIR__ . '/../..' . '/core/config.class.inc.php',
'ConfigException' => __DIR__ . '/../..' . '/core/config.class.inc.php',
'ConfigPlaceholdersResolver' => __DIR__ . '/../..' . '/core/config.class.inc.php',
@@ -561,7 +568,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'DashletProxy' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php',
'DashletUnknown' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php',
'DataTable' => __DIR__ . '/../..' . '/application/datatable.class.inc.php',
'DataTableSettings' => __DIR__ . '/../..' . '/application/datatable.class.inc.php',
'Datamatrix' => __DIR__ . '/..' . '/combodo/tcpdf/include/barcodes/datamatrix.php',
'DateTimeFormat' => __DIR__ . '/../..' . '/core/datetimeformat.class.inc.php',
'DeadLockLog' => __DIR__ . '/../..' . '/core/log.class.inc.php',
@@ -717,7 +723,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'PDFBulkExport' => __DIR__ . '/../..' . '/core/pdfbulkexport.class.inc.php',
'PDFPage' => __DIR__ . '/../..' . '/sources/application/WebPage/PDFPage.php',
'PEAR' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_Error' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_ErrorStack' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
'PHP_LexerGenerator' => __DIR__ . '/../..' . '/core/oql/build/PHP/LexerGenerator.php',
@@ -1268,7 +1273,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapterInterface.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableAdapterEvent' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableAdapter.php',
'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php',
'Symfony\\Component\\Cache\\CacheItem' => __DIR__ . '/..' . '/symfony/cache/CacheItem.php',
'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => __DIR__ . '/..' . '/symfony/cache/DataCollector/CacheDataCollector.php',
@@ -1291,7 +1295,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\Cache\\Simple\\Psr6Cache' => __DIR__ . '/..' . '/symfony/cache/Simple/Psr6Cache.php',
'Symfony\\Component\\Cache\\Simple\\RedisCache' => __DIR__ . '/..' . '/symfony/cache/Simple/RedisCache.php',
'Symfony\\Component\\Cache\\Simple\\TraceableCache' => __DIR__ . '/..' . '/symfony/cache/Simple/TraceableCache.php',
'Symfony\\Component\\Cache\\Simple\\TraceableCacheEvent' => __DIR__ . '/..' . '/symfony/cache/Simple/TraceableCache.php',
'Symfony\\Component\\Cache\\Traits\\AbstractTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/AbstractTrait.php',
'Symfony\\Component\\Cache\\Traits\\ApcuTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ApcuTrait.php',
'Symfony\\Component\\Cache\\Traits\\ArrayTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ArrayTrait.php',
@@ -1380,8 +1383,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\Config\\Resource\\FileResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileResource.php',
'Symfony\\Component\\Config\\Resource\\GlobResource' => __DIR__ . '/..' . '/symfony/config/Resource/GlobResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionMethodHhvmWrapper' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionParameterHhvmWrapper' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/ResourceInterface.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceChecker.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceInterface.php',
@@ -1558,8 +1559,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\DependencyInjection\\Compiler\\FactoryReturnTypePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\LoggingFormatter' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/LoggingFormatter.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationContainerBuilder' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PassConfig.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php',
@@ -1669,7 +1668,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/GlobFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/IniFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\ProtectedPhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/XmlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/YamlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Parameter' => __DIR__ . '/..' . '/symfony/dependency-injection/Parameter.php',
@@ -1693,7 +1691,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php',
@@ -1961,7 +1958,6 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/GlobFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ObjectRouteLoader.php',
'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php',
'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/DumperCollection.php',

View File

@@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70103)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View File

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

View File

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View File

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

View File

@@ -208,6 +208,7 @@ function SetObjectBreadCrumbEntry(DBObject $oObj, WebPage $oPage)
*/
function DisplaySearchSet($oP, $oFilter, $bSearchForm = true, $sBaseClass = '', $sFormat = '', $bDoSearch = true, $bSearchFormOpen = true)
{
$oBlockForm=null;
if ($bSearchForm)
{
$aParams = array('open' => $bSearchFormOpen, 'table_id' => '1');
@@ -215,22 +216,24 @@ function DisplaySearchSet($oP, $oFilter, $bSearchForm = true, $sBaseClass = '',
{
$aParams['baseClass'] = $sBaseClass;
}
$oBlock = new DisplayBlock($oFilter, 'search', false /* Asynchronous */, $aParams);
$oBlock->Display($oP, 0);
$oBlockForm = new DisplayBlock($oFilter, 'search', false /* Asynchronous */, $aParams);
if (!$bDoSearch)
{
$oBlockForm->Display($oP, 0);
}
}
if ($bDoSearch)
{
if (strtolower($sFormat) == 'csv')
{
$oBlock = new DisplayBlock($oFilter, 'csv', false);
$oBlock->Display($oP, 1);
// Adjust the size of the Textarea containing the CSV to fit almost all the remaining space
$oP->add_ready_script(" $('#1>textarea').height($('#1').parent().height() - $('#0').outerHeight() - 30).width( $('#1').parent().width() - 20);"); // adjust the size of the block
}
else
{
$oBlock = new DisplayBlock($oFilter, 'list', false);
$oBlock->Display($oP, 1);
// Breadcrumb
//$iCount = $oBlock->GetDisplayedCount();
@@ -238,6 +241,22 @@ function DisplaySearchSet($oP, $oFilter, $bSearchForm = true, $sBaseClass = '',
$sLabel = MetaModel::GetName($oFilter->GetClass());
$oP->SetBreadCrumbEntry($sPageId, $sLabel, '', '', 'fas fa-search', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
}
if ($bSearchForm) {
$oUIBlockForm=$oBlockForm->GetDisplay($oP,'0');
$sTableId = utils::ReadParam('_table_id_', null, false, 'raw_data');
if($sTableId=='')
{
$sTableId = '1';
}
$oUIBlock=$oBlock->GetDisplay($oP, $sTableId);
$oUIBlock->AddCSSClasses("display_block sf_results_area");
//$oUIBlockForm->AddSubBlock($oUIBlock);
$oP->AddUiBlock($oUIBlockForm);
$oP->AddUiBlock($oUIBlock);
}
else {
$oBlock->Display($oP, 1);
}
}
}

View File

@@ -17,10 +17,12 @@
* You should have received a copy of the GNU Affero General Public License
*/
use Combodo\iTop\Application\UI\Component\DataTable\DataTableSettings;
use Combodo\iTop\Application\UI\Layout\ActivityPanel\ActivityEntry\ActivityEntryFactory;
use Combodo\iTop\Controller\AjaxRenderController;
use Combodo\iTop\Renderer\BlockRenderer;
use Combodo\iTop\Renderer\Console\ConsoleFormRenderer;
use Combodo\iTop\Application\UI\Component\DataTable\DataTableFactory;
require_once('../approot.inc.php');
require_once(APPROOT.'application/application.inc.php');
@@ -67,7 +69,7 @@ try
}
LoginWebPage::DoLoginEx($sRequestedPortalId, false);
$oPage = new ajax_page("");
$oPage = new AjaxPage("");
$oPage->no_cache();
@@ -230,6 +232,199 @@ try
$oKPI->ComputeAndReport('Data fetch and format');
break;
case 'search_and_refresh':
$oPage->SetContentType('application/json');
$extraParams = utils::ReadParam('extra_param', '', false, 'raw_data');
$aExtraParams = array();
if (is_array($extraParams))
{
$aExtraParams = $extraParams;
}
else
{
$sExtraParams = stripslashes($extraParams);
if (!empty($sExtraParams))
{
$val = json_decode(str_replace("'", '"', $sExtraParams), true /* associative array */);
if ($val !== null)
{
$aExtraParams = $val;
}
}
}
$iLength = utils::ReadParam('end', 10);
$aColumns = utils::ReadParam('columns', array(), false, 'raw_data');
$sSelectMode = utils::ReadParam('select_mode', '');
$aResult = DataTableFactory::GetOptionsForRendering( $aColumns, $sSelectMode, $sFilter, $iLength, $aExtraParams);
$oPage->add(json_encode($aResult));
break;
case 'search':
$oPage->SetContentType('application/json');
$extraParams = utils::ReadParam('extra_params', '', false, 'raw_data');
$aExtraParams = array();
if (is_array($extraParams))
{
$aExtraParams = $extraParams;
}
else
{
$sExtraParams = stripslashes($extraParams);
if (!empty($sExtraParams))
{
$val = json_decode(str_replace("'", '"', $sExtraParams), true /* associative array */);
if ($val !== null)
{
$aExtraParams = $val;
}
}
}
if ($sEncoding == 'oql')
{
$oFilter = DBSearch::FromOQL($sFilter);
}
else
{
$oFilter = DBSearch::unserialize($sFilter);
}
$iStart = utils::ReadParam('start', 0);
$iEnd = utils::ReadParam('end', 1);
$iDrawNumber= utils::ReadParam('draw', 1);
$aSort = utils::ReadParam('order', [], false, 'array');
if(count($aSort)>0){
$iSortCol = $aSort[0]["column"];
$sSortOrder = $aSort[0]["dir"];
}
else{
$iSortCol = 0;
$sSortOrder = "asc";
}
$sSelectMode = utils::ReadParam('select_mode', '');
if (!empty($sSelectMode) && ($sSelectMode != 'none'))
{
// The first column is used for the selection (radio / checkbox) and is not sortable
$iSortCol--;
}
$bDisplayKey = utils::ReadParam('display_key', 'true') == 'true';
$aColumns = utils::ReadParam('columns', array(), false, 'raw_data');
$aClassAliases = utils::ReadParam('class_aliases', array());
$iListId = utils::ReadParam('list_id', 0);
// Filter the list to removed linked set since we are not able to display them here
$sIdName ="";
$aOrderBy = array();
$iSortIndex = 0;
$aColumnsLoad = array();
foreach($aClassAliases as $sAlias => $sClassName)
{
$aColumnsLoad[$sAlias] = array();
foreach($aColumns[$sAlias] as $sAttCode => $aData)
{
if ($aData['checked'] == 'true')
{
$aColumns[$sAlias][$sAttCode]['checked'] = true;
if ($sAttCode == '_key_')
{
if($sIdName == ""){
$sIdName = $sAlias."/_key_";
}
if ($iSortCol == $iSortIndex)
{
if (!MetaModel::HasChildrenClasses($oFilter->GetClass()))
{
$aNameSpec = MetaModel::GetNameSpec($oFilter->GetClass());
if ($aNameSpec[0] == '%1$s')
{
// The name is made of a single column, let's sort according to the sort algorithm for this column
$aOrderBy[$sAlias.'.'.$aNameSpec[1][0]] = ($sSortOrder == 'asc');
}
else
{
$aOrderBy[$sAlias.'.'.'friendlyname'] = ($sSortOrder == 'asc');
}
}
else
{
$aOrderBy[$sAlias.'.'.'friendlyname'] = ($sSortOrder == 'asc');
}
}
}
else
{
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
if ($oAttDef instanceof AttributeLinkedSet)
{
// Removed from the display list
unset($aColumns[$sAlias][$sAttCode]);
}
else
{
$aColumnsLoad[$sAlias][] = $sAttCode;
}
if ($iSortCol == $iSortIndex)
{
if ($oAttDef->IsExternalKey())
{
$sSortCol = $sAttCode.'_friendlyname';
}
else
{
$sSortCol = $sAttCode;
}
$aOrderBy[$sAlias.'.'.$sSortCol] = ($sSortOrder == 'asc');
}
}
$iSortIndex++;
}
else
{
$aColumns[$sAlias][$sAttCode]['checked'] = false;
}
}
}
$aQueryParams = isset($aExtraParams['query_params']) ? $aExtraParams['query_params'] : [];
// Load only the requested columns
$oSet = new DBObjectSet($oFilter, $aOrderBy, $aQueryParams, null, $iEnd - $iStart, $iStart);
$oSet->OptimizeColumnLoad($aColumnsLoad);
if (isset($aExtraParams['show_obsolete_data'])) {
$bShowObsoleteData = $aExtraParams['show_obsolete_data'];
}
else {
$bShowObsoleteData = utils::ShowObsoleteData();
}
$oSet->SetShowObsoleteData($bShowObsoleteData);
$oKPI = new ExecutionKPI();
$aResult["draw"] = $iDrawNumber;
$aResult["recordsTotal"] = $oSet->Count() ;
$aResult["recordsFiltered"] = $oSet->Count() ;
$aResult["data"] = [];
while ($aObject = $oSet->FetchAssoc()) {
foreach($aClassAliases as $sAlias=>$sClass) {
foreach($aColumns[$sAlias] as $sAttCode => $oAttDef) {
if($sAttCode=="_key_") {
$aObj[$sAlias."/".$sAttCode ] = $aObject[$sAlias]->GetKey();
}
else {
$aObj[$sAlias."/".$sAttCode ] = $aObject[$sAlias]->Get($sAttCode);
}
}
}
if($sIdName!="")
{
$aObj["id" ] = $aObj[$sIdName];
}
array_push($aResult["data"], $aObj);
}
$oPage->add(json_encode($aResult));
$oKPI->ComputeAndReport('Data fetch and format');
break;
case 'datatable_save_settings':
$oPage->SetContentType('text/plain');
$iPageSize = utils::ReadParam('page_size', 10);

View File

@@ -47,7 +47,7 @@ try
throw new AjaxSearchException("Invalid query (empty filter)", 400);
}
$oPage = new ajax_page("");
$oPage = new AjaxPage("");
$oPage->no_cache();
$oPage->SetContentType('text/html');
@@ -64,8 +64,6 @@ try
$sHiddenCriteria = '';
}
$oFilter = CriterionParser::Parse($aParams['base_oql'], $aParams['criterion'], $sHiddenCriteria);
//IssueLog::Info('Search OQL: "'.$oFilter->ToOQL().'"');
$oDisplayBlock = new DisplayBlock($oFilter, 'list_search', false);
foreach($aListParams as $key => $value)
@@ -92,11 +90,6 @@ try
{
$aExtraParams['query_params'] = array('this->object()' => $oObj);
}
// // Current extkey value, so we can display event if it is not available anymore (eg. archived).
// $iCurrentExtKeyId = (is_null($oObj)) ? 0 : $oObj->Get($this->sAttCode);
// $aExtraParams['current_extkey_id'] = $iCurrentExtKeyId;
}
if (!isset($aExtraParams['update_history']))
@@ -116,7 +109,6 @@ try
$oDisplayBlock->RenderContent($oPage, $aExtraParams);
}
if (isset($aListParams['debug']) || UserRights::IsAdministrator())
{
$oPage->StartCollapsibleSection(Dict::S('UI:RunQuery:MoreInfo'), false, 'SearchQuery');

View File

@@ -0,0 +1,136 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\DataTable;
use Combodo\iTop\Application\UI\Layout\UIContentBlock;
/**
* Class DataTable
*
* @package Combodo\iTop\Application\UI\Component\DataTable
* @since 3.0.0
*/
class DataTableBlock extends UIContentBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-datatable';
public const HTML_TEMPLATE_REL_PATH = 'components/datatable/layout';
public const JS_TEMPLATE_REL_PATH = 'components/datatable/layout';
protected $aOptions;//list of specific options for display datatable
protected $sAjaxUrl;
protected $sAjaxData;
protected $aDisplayColumns;
protected $aResultColumns;
/**
* Panel constructor.
*
*/
public function __construct(?string $sId = null)
{
parent::__construct($sId);
}
/**
* @return mixed
*/
public function GetAjaxUrl(): string
{
return $this->sAjaxUrl;
}
/**
* @param mixed $sAjaxUrl
*/
public function SetAjaxUrl(string $sAjaxUrl): void
{
$this->sAjaxUrl = $sAjaxUrl;
}
/**
* @return mixed
*/
public function GetAjaxData(): string
{
return $this->sAjaxData;
}
/**
* @param mixed $sAjaxData
*/
public function SetAjaxData(string $sAjaxData): void
{
$this->sAjaxData = $sAjaxData;
}
/**
* @return mixed
*/
public function GetDisplayColumns(): array
{
return $this->aDisplayColumns;
}
/**
* @param mixed $aColumns
*/
public function SetDisplayColumns($aColumns): void
{
$this->aDisplayColumns = $aColumns;
}
/**
* @return mixed
*/
public function GetResultColumns(): array
{
return $this->aResultColumns;
}
/**
* @return mixed
*/
public function GetResultColumnsAsJson(): string
{
return json_encode($this->aResultColumns);
}
/**
* @param mixed $aColumns
*/
public function SetResultColumns($aColumns): void
{
$this->aResultColumns = $aColumns;
}
public function GetOption(string $sOption)
{
if (isset($this->aOptions[$sOption])) {
return $this->aOptions[$sOption];
}
return null;
}
/**
* @return mixed
*/
public function GetOptions(): array
{
return $this->aOptions;
}
/**
* @param mixed $aOptions
*/
public function SetOptions($aOptions): void
{
$this->aOptions = $aOptions;
}
}

View File

@@ -0,0 +1,718 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\DataTable;
use ApplicationException;
use appUserPreferences;
use AttributeLinkedSet;
use cmdbAbstractObject;
use CMDBObjectSet;
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\FormTable\FormTable;
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\StaticTable;
use Combodo\iTop\Application\UI\Component\Panel\PanelFactory;
use Combodo\iTop\Application\UI\Component\Title\TitleFactory;
use Combodo\iTop\Application\UI\Layout\UIContentBlock;
use DBObjectSet;
use Dict;
use MenuBlock;
use MetaModel;
use UserRights;
use WebPage;
/**
* Class DataTableFactory
*
* @internal
* @package Combodo\iTop\Application\UI\Component\DataTable
* @since 3.0.0
*/
class DataTableFactory
{
/**
* @param \WebPage $oPage
* @param string $sListId
* @param \CMDBObjectSet $oSet
* @param array $aExtraParams
*
* @return \Combodo\iTop\Application\UI\Component\Panel\Panel
* @throws \ApplicationException
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
* @throws \OQLException
* @throws \ReflectionException
*/
public static function MakeForResult(WebPage $oPage, string $sListId, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oPanel = PanelFactory::MakeForClass($oSet->GetClass(), "Result");
$oDataTable = DataTableFactory::MakeForRendering($sListId, $oSet, $aExtraParams);
$oPanel->AddMainBlock($oDataTable);
$oMenuBlock = new MenuBlock($oSet->GetFilter(), 'list');
$oBlock = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $sListId);
$oBlockMenu = new UIContentBlock();
$oBlockMenu->AddSubBlock($oBlock);
$oPanel->AddToolbarBlock($oBlockMenu);
return $oPanel;
}
/**
* @param \WebPage $oPage
* @param string $sListId
* @param DBObjectSet $oSet
* @param array $aExtraParams
*
* @return \Combodo\iTop\Application\UI\Component\Panel\Panel
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
* @throws \OQLException
* @throws \ReflectionException
*/
public static function MakeForObject(WebPage $oPage, string $sListId, DBObjectSet $oSet, $aExtraParams = array())
{
$oPanel = PanelFactory::MakeForClass($oSet->GetClass(), "Result");
$oDataTable = DataTableFactory::MakeForRenderingObject($sListId, $oSet, $aExtraParams);
$oPanel->AddMainBlock($oDataTable);
$oMenuBlock = new MenuBlock($oSet->GetFilter(), 'list');
$oBlock = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $sListId);
$oBlockMenu = new UIContentBlock();
$oBlockMenu->AddSubBlock($oBlock);
$oPanel->AddToolbarBlock($oBlockMenu);
return $oPanel;
}
/**
* Make a basis Panel component
*
* @param string $sListId
* @param \CMDBObjectSet $oSet
* @param array $aExtraParams
*
* @return DataTableBlock
* @throws \ApplicationException
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MySQLException
*/
public static function MakeForRendering(string $sListId, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oDataTable = new DataTableBlock('datatable_'.$sListId);
///////////////////////////////////////////////////
/*TODO 3.0.0 PrintableVersion
if ($oPage->IsPrintableVersion() || $oPage->is_pdf())
{
return self::GetDisplaySetForPrinting($oPage, $oSet, $aExtraParams);
}
*/
// Initialize and check the parameters
$bViewLink = isset($aExtraParams['view_link']) ? $aExtraParams['view_link'] : true;
$sLinkageAttribute = isset($aExtraParams['link_attr']) ? $aExtraParams['link_attr'] : '';
$iLinkedObjectId = isset($aExtraParams['object_id']) ? $aExtraParams['object_id'] : 0;
$sTargetAttr = isset($aExtraParams['target_attr']) ? $aExtraParams['target_attr'] : '';
if (!empty($sLinkageAttribute)) {
if ($iLinkedObjectId == 0) {
// if 'links' mode is requested the id of the object to link to must be specified
throw new ApplicationException(Dict::S('UI:Error:MandatoryTemplateParameter_object_id'));
}
if ($sTargetAttr == '') {
// if 'links' mode is requested the d of the object to link to must be specified
throw new ApplicationException(Dict::S('UI:Error:MandatoryTemplateParameter_target_attr'));
}
}
$bSelectMode = isset($aExtraParams['selection_mode']) ? $aExtraParams['selection_mode'] == true : false;
$bSingleSelectMode = isset($aExtraParams['selection_type']) ? ($aExtraParams['selection_type'] == 'single') : false;
$aExtraFieldsRaw = isset($aExtraParams['extra_fields']) ? explode(',',
trim($aExtraParams['extra_fields'])) : array();
$aExtraFields = array();
foreach ($aExtraFieldsRaw as $sFieldName) {
// Ignore attributes not of the main queried class
if (preg_match('/^(.*)\.(.*)$/', $sFieldName, $aMatches)) {
$sClassAlias = $aMatches[1];
$sAttCode = $aMatches[2];
if ($sClassAlias == $oSet->GetFilter()->GetClassAlias()) {//$oSet->GetFilter()->GetSelectedClasses()
$aExtraFields[] = $sAttCode;
}
} else {
$aExtraFields[] = $sFieldName;
}
}
$sClassName = $oSet->GetFilter()->GetClass();
$sZListName = isset($aExtraParams['zlist']) ? ($aExtraParams['zlist']) : 'list';
if ($sZListName !== false) {
$aList = cmdbAbstractObject::FlattenZList(MetaModel::GetZListItems($sClassName, $sZListName));
$aList = array_merge($aList, $aExtraFields);
} else {
$aList = $aExtraFields;
}
// Filter the list to removed linked set since we are not able to display them here
foreach ($aList as $index => $sAttCode) {
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
if ($oAttDef instanceof AttributeLinkedSet) {
// Removed from the display list
unset($aList[$index]);
}
}
if (!empty($sLinkageAttribute)) {
// The set to display is in fact a set of links between the object specified in the $sLinkageAttribute
// and other objects...
// The display will then group all the attributes related to the link itself:
// | Link_attr1 | link_attr2 | ... || Object_attr1 | Object_attr2 | Object_attr3 | .. | Object_attr_n |
$aDisplayList = array();
$aAttDefs = MetaModel::ListAttributeDefs($sClassName);
assert(isset($aAttDefs[$sLinkageAttribute]));
$oAttDef = $aAttDefs[$sLinkageAttribute];
assert($oAttDef->IsExternalKey());
// First display all the attributes specific to the link record
foreach ($aList as $sLinkAttCode) {
$oLinkAttDef = $aAttDefs[$sLinkAttCode];
if ((!$oLinkAttDef->IsExternalKey()) && (!$oLinkAttDef->IsExternalField())) {
$aDisplayList[] = $sLinkAttCode;
}
}
// Then display all the attributes neither specific to the link record nor to the 'linkage' object (because the latter are constant)
foreach ($aList as $sLinkAttCode) {
$oLinkAttDef = $aAttDefs[$sLinkAttCode];
if (($oLinkAttDef->IsExternalKey() && ($sLinkAttCode != $sLinkageAttribute))
|| ($oLinkAttDef->IsExternalField() && ($oLinkAttDef->GetKeyAttCode() != $sLinkageAttribute))) {
$aDisplayList[] = $sLinkAttCode;
}
}
// First display all the attributes specific to the link
// Then display all the attributes linked to the other end of the relationship
$aList = $aDisplayList;
}
$sSelectMode = 'none';
if ($bSelectMode) {
$sSelectMode = $bSingleSelectMode ? 'single' : 'multiple';
}
$sClassAlias = $oSet->GetClassAlias();
$bDisplayLimit = isset($aExtraParams['display_limit']) ? $aExtraParams['display_limit'] : true;
$sTableId = isset($aExtraParams['table_id']) ? $aExtraParams['table_id'] : null;
$aClassAliases = array($sClassAlias => $sClassName);
$oDefaultSettings = DataTableSettings::GetDataModelSettings($aClassAliases, $bViewLink, array($sClassAlias => $aList));
if ($bDisplayLimit) {
$iDefaultPageSize = appUserPreferences::GetPref('default_page_size', MetaModel::GetConfig()->GetMinDisplayLimit());
$oDefaultSettings->iDefaultPageSize = $iDefaultPageSize;
} else {
$oDefaultSettings->iDefaultPageSize = 0;
}
$oDefaultSettings->aSortOrder = MetaModel::GetOrderByDefault($sClassName);
$bUseCustomSettings = false;
// Identified tables can have their own specific settings
$oCustomSettings = DataTableSettings::GetTableSettings($aClassAliases, $sTableId);
if ($oCustomSettings != null) {
// Custom settings overload the default ones
$bUseCustomSettings = true;
if ($oDefaultSettings->iDefaultPageSize == 0) {
$oCustomSettings->iDefaultPageSize = 0;
}
} else {
$oCustomSettings = $oDefaultSettings;
}
if ($oCustomSettings->iDefaultPageSize > 0) {
$oSet->SetLimit($oCustomSettings->iDefaultPageSize);
}
// Load only the requested columns
$aColumnsToLoad = array();
foreach ($oCustomSettings->aColumns as $sAlias => $aColumnsInfo) {
foreach ($aColumnsInfo as $sAttCode => $aData) {
if ($sAttCode != '_key_') {
if ($aData['checked']) {
$aColumnsToLoad[$sAlias][] = $sAttCode;
} else {
// See if this column is a must to load
$sClass = $aClassAliases[$sAlias];
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
if ($oAttDef->alwaysLoadInTables()) {
$aColumnsToLoad[$sAlias][] = $sAttCode;
}
}
}
}
}
$oSet->OptimizeColumnLoad($aColumnsToLoad);
$aSortOrder=[];
$aSortDatable=[];
$aColumnDefinition = [];
$iIndexColumn=0;
if($sSelectMode!="") {
$iIndexColumn++;
}
foreach ($aClassAliases as $sClassAlias => $sClassName) {
foreach ($oCustomSettings->aColumns[$sClassAlias] as $sAttCode => $aData) {
if ($aData['sort'] != 'none') {
$sCode = ($aData['code'] == '_key_') ? 'friendlyname' : $aData['code'];
$aSortOrder[$sAlias.$sCode] = ($aData['sort'] == 'asc'); // true for ascending, false for descending
$aSortDatable=[$iIndexColumn,$aData['sort']];
}
if ($aData['checked']) {
if ($sAttCode == '_key_') {
$aColumnDefinition[] = [
'description' => $aData['label'],
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => '_key_',
'attribute_label' => $aData['alias'],
"render" => "return '<a class=\'object-ref-link\' href= \'UI.php?operation=details&class=".$sClassName."&id='+data+'\'>'+row['".$sClassAlias."/friendlyname']+'</a>' ;",
];
} else {
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
$sAttDefClass = get_class($oAttDef);
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
$aColumnDefinition[] = [
'description' => $oAttDef->GetOrderByHint(),
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => $sAttDefClass,
'attribute_label' => $sAttLabel,
"render" => $oAttDef->GetRenderForDataTable($sClassAlias),
];
}
$iIndexColumn++;
}
}
}
$oSet->SetOrderBy($aSortOrder);
$aOptions = [];
if ($oDefaultSettings != null) {
$aOptions['oDefaultSettings'] = json_encode(array('iDefaultPageSize' => $oDefaultSettings->iDefaultPageSize, 'oColumns' => $oDefaultSettings->aColumns));
}
$aOptions['sort'] = $aSortDatable;
if ($sSelectMode == 'multiple') {
$aOptions['select_mode'] = "multiple";
} else {
if ($sSelectMode == 'single') {
$aOptions['select_mode'] = "single";
}
}
$aOptions['iPageSize'] = 10;
if ($oCustomSettings->iDefaultPageSize > 0) {
$aOptions['iPageSize'] = $oCustomSettings->iDefaultPageSize;
}
$aOptions['sTableId'] = $sTableId;
$aOptions['bUseCustomSettings'] = $bUseCustomSettings;
$aOptions['bViewLink'] = $bViewLink;
$oDataTable->SetOptions($aOptions);
$oDataTable->SetAjaxUrl("ajax.render.php");
$oDataTable->SetAjaxData(json_encode([
"operation" => 'search',
"filter" => $oSet->GetFilter()->serialize(),
"columns" => $oCustomSettings->aColumns,
"extra_params" => $aExtraParams,
"class_aliases" => $aClassAliases,
"select_mode" => $sSelectMode,
]));
$oDataTable->SetDisplayColumns($aColumnDefinition);
$oDataTable->SetResultColumns($oCustomSettings->aColumns);
return $oDataTable;
}
/**
* @param string $sListId
* @param DBObjectSet $oSet
* @param array $aExtraParams
*
* @return \Combodo\iTop\Application\UI\Component\DataTable\DataTableBlock
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MySQLException
*/
public static function MakeForRenderingObject(string $sListId, DBObjectSet $oSet, $aExtraParams = array())
{
$oDataTable = new DataTableBlock('datatable_'.$sListId);
$aList = array();
// Initialize and check the parameters
$bViewLink = isset($aExtraParams['view_link']) ? $aExtraParams['view_link'] : true;
// Check if there is a list of aliases to limit the display to...
$aDisplayAliases = isset($aExtraParams['display_aliases']) ? explode(',',
$aExtraParams['display_aliases']) : array();
$sZListName = isset($aExtraParams['zlist']) ? ($aExtraParams['zlist']) : 'list';
$aExtraFieldsRaw = isset($aExtraParams['extra_fields']) ? explode(',',
trim($aExtraParams['extra_fields'])) : array();
$aExtraFields = array();
$sAttCode = '';
foreach ($aExtraFieldsRaw as $sFieldName) {
// Ignore attributes not of the main queried class
if (preg_match('/^(.*)\.(.*)$/', $sFieldName, $aMatches)) {
$sClassAlias = $aMatches[1];
$sAttCode = $aMatches[2];
if (array_key_exists($sClassAlias, $oSet->GetSelectedClasses())) {
$aExtraFields[$sClassAlias][] = $sAttCode;
}
} else {
$aExtraFields['*'] = $sAttCode;
}
}
$aClassAliases = $oSet->GetFilter()->GetSelectedClasses();
$aAuthorizedClasses = array();
foreach ($aClassAliases as $sAlias => $sClassName) {
if ((UserRights::IsActionAllowed($sClassName, UR_ACTION_READ, $oSet) != UR_ALLOWED_NO) &&
((count($aDisplayAliases) == 0) || (in_array($sAlias, $aDisplayAliases)))) {
$aAuthorizedClasses[$sAlias] = $sClassName;
}
}
foreach ($aAuthorizedClasses as $sAlias => $sClassName) {
if (array_key_exists($sAlias, $aExtraFields)) {
$aList[$sAlias] = $aExtraFields[$sAlias];
} else {
$aList[$sAlias] = array();
}
if ($sZListName !== false) {
$aDefaultList = MetaModel::FlattenZList(MetaModel::GetZListItems($sClassName, $sZListName));
$aList[$sAlias] = array_merge($aDefaultList, $aList[$sAlias]);
}
// Filter the list to removed linked set since we are not able to display them here
foreach ($aList[$sAlias] as $index => $sAttCode) {
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
if ($oAttDef instanceof AttributeLinkedSet) {
// Removed from the display list
unset($aList[$sAlias][$index]);
}
}
if (empty($aList[$sAlias])) {
unset($aList[$sAlias], $aAuthorizedClasses[$sAlias]);
}
}
$sSelectMode = 'none';
$oDefaultSettings = DataTableSettings::GetDataModelSettings($aAuthorizedClasses, $bViewLink, $aList);
$bDisplayLimit = isset($aExtraParams['display_limit']) ? $aExtraParams['display_limit'] : true;
if ($bDisplayLimit) {
$iDefaultPageSize = appUserPreferences::GetPref('default_page_size',
MetaModel::GetConfig()->GetMinDisplayLimit());
$oDefaultSettings->iDefaultPageSize = $iDefaultPageSize;
}
$sTableId = isset($aExtraParams['table_id']) ? $aExtraParams['table_id'] : null;
$oDefaultSettings->aSortOrder = MetaModel::GetOrderByDefault($sClassName);
$bUseCustomSettings = false;
// Identified tables can have their own specific settings
$oCustomSettings = DataTableSettings::GetTableSettings($aClassAliases, $sTableId);
if ($oCustomSettings != null) {
// Custom settings overload the default ones
$bUseCustomSettings = true;
if ($oDefaultSettings->iDefaultPageSize == 0) {
$oCustomSettings->iDefaultPageSize = 0;
}
} else {
$oCustomSettings = $oDefaultSettings;
}
if ($oCustomSettings->iDefaultPageSize > 0) {
$oSet->SetLimit($oCustomSettings->iDefaultPageSize);
}
// Load only the requested columns
$aColumnsToLoad = array();
foreach ($oCustomSettings->aColumns as $sAlias => $aColumnsInfo) {
foreach ($aColumnsInfo as $sAttCode => $aData) {
if ($sAttCode != '_key_') {
if ($aData['checked']) {
$aColumnsToLoad[$sAlias][] = $sAttCode;
} else {
// See if this column is a must to load
$sClass = $aClassAliases[$sAlias];
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
if ($oAttDef->alwaysLoadInTables()) {
$aColumnsToLoad[$sAlias][] = $sAttCode;
}
}
}
}
}
$oSet->OptimizeColumnLoad($aColumnsToLoad);
$aColumnDefinition = [];
$aSortOrder=[];
$aSortDatable=[];
$iIndexColumn=0;
if($sSelectMode!="") {
$iIndexColumn++;
}
$aSortDatable = [];
foreach ($aClassAliases as $sClassAlias => $sClassName) {
foreach ($oCustomSettings->aColumns[$sClassAlias] as $sAttCode => $aData) {
if ($aData['sort'] != 'none') {
$sCode = ($aData['code'] == '_key_') ? 'friendlyname' : $aData['code'];
$aSortOrder[$sAlias.$sCode] = ($aData['sort'] == 'asc'); // true for ascending, false for descending
$aSortDatable=[$iIndexColumn,$aData['sort']];
}
if ($aData['checked']) {
if ($sAttCode == '_key_') {
$aColumnDefinition[] = [
'description' => $aData['label'],
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => '_key_',
'attribute_label' => $aData['alias'],
"render" => "return '<a class=\'object-ref-link\' href= \'UI.php?operation=details&class=".$sClassName."&id='+data+'\'>'+row['".$sClassAlias."/friendlyname']+'</a>' ;",
];
} else {
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
$sAttDefClass = get_class($oAttDef);
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
$aColumnDefinition[] = [
'description' => $oAttDef->GetOrderByHint(),
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => $sAttDefClass,
'attribute_label' => $sAttLabel,
"render" => $oAttDef->GetRenderForDataTable($sClassAlias),
];
}
$iIndexColumn++;
}
}
}
$oSet->SetOrderBy($oCustomSettings->GetSortOrder());
$aOptions = [];
if ($oDefaultSettings != null) {
$aOptions['oDefaultSettings'] = json_encode(array('iDefaultPageSize' => $oDefaultSettings->iDefaultPageSize, 'oColumns' => $oDefaultSettings->aColumns));
}
if ($sSelectMode == 'multiple') {
$aOptions['select_mode'] = "multiple";
} else {
if ($sSelectMode == 'single') {
$aOptions['select_mode'] = "single";
}
}
$aOptions['sort'] = $aSortDatable;
$aOptions['iPageSize'] = 10;
if ($oCustomSettings->iDefaultPageSize > 0) {
$aOptions['iPageSize'] = $oCustomSettings->iDefaultPageSize;
}
$aOptions['sTableId'] = $sTableId;
$aOptions['bUseCustomSettings'] = $bUseCustomSettings;
$aOptions['bViewLink'] = $bViewLink;
$oDataTable->SetOptions($aOptions);
$oDataTable->SetAjaxUrl("ajax.render.php");
$oDataTable->SetAjaxData(json_encode([
"operation" => 'search',
"filter" => $oSet->GetFilter()->serialize(),
"columns" => $oCustomSettings->aColumns,
"extra_params" => $aExtraParams,
"class_aliases" => $aClassAliases,
"select_mode" => $sSelectMode,
]));
$oDataTable->SetDisplayColumns($aColumnDefinition);
$oDataTable->SetResultColumns($oCustomSettings->aColumns);
return $oDataTable;
}
/**
* @param array $aColumns
* @param string $sSelectMode
* @param string $sFilter
* @param int $iLength
* @param array $aExtraParams
*
* @return array
* @throws \Exception
*/
public static function GetOptionsForRendering(array $aColumns, string $sSelectMode, string $sFilter, int $iLength, array $aExtraParams)
{
$aOptions = [];
$aColumnsDefinitions = [];
$aColumnDefinition = [];
$aClassAliases = [];
if ($sSelectMode!=""){
$aColumnDefinition["width"] = "auto";
$aColumnDefinition["searchable"] = false;
$aColumnDefinition["sortable"] = false;
$aColumnDefinition["title"] = "<span class=\"row_input\"><input type=\"checkbox\" onclick=\"checkAllDataTable(\'#{{ oUIBlock.GetId() }}\',this.checked);\" class=\"checkAll\" id=\"field_{{ oUIBlock.GetId() }}_check_all\" name=\"field_{{ oUIBlock.GetId() }}_check_all\" title=\"{{ 'UI:SearchValue:CheckAll'|dict_s }} / {{ 'UI:SearchValue:UncheckAll'|dict_s }}\" /></span>";
$aColumnDefinition["type"] = "html";
$aColumnDefinition["data"] = "";
$aColumnDefinition["render"] = "function (data, type, row) {
var oCheckboxElem = $('<span class=\"row_input\"><input type=\"checkbox\" class=\"selectList{{ oUIBlock.GetId() }}\" name=\"selectObject\" /></span>');
if (row.limited_access) {
oCheckboxElem.html('-');
} else {
oCheckboxElem.find(':input').attr('data-object-id', row.id).attr('data-target-object-id', row.target_id);
}
return oCheckboxElem.prop('outerHTML');
}";
array_push($aColumnsDefinitions, $aColumnDefinition);
}
foreach ($aColumns as $sClassName => $aClassColumns) {
$aClassAliases[$sClassName] = $sClassName;
foreach ($aClassColumns as $sAttCode => $aData) {
if ($aData['checked'] == "true") {
$aColumnDefinition["width"] = "auto";
$aColumnDefinition["searchable"] = false;
$aColumnDefinition["sortable"] = true;
$aColumnDefinition["defaultContent"] = "";
$aColumnDefinition["type"] = "html";
if ($sAttCode == '_key_') {
$aColumnDefinition["title"] = $aData['alias'];
$aColumnDefinition['metadata'] = [
'object_class' => $sClassName,
'attribute_code' => $sAttCode,
'attribute_type' => '_key_',
'attribute_label' => $aData['alias'],
];
$aColumnDefinition["data"] = $sClassName."/".$sAttCode;
$aColumnDefinition["render"] = [
"display" => "return '<a class=\'object-ref-link\' href=\'UI.php?operation=details&class=".$sClassName."&id='+data+'\'>'+row['".$sClassName."/friendlyname']+'</a>' ;",
"_" => $sClassName."/".$sAttCode,
];
} else {
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
$sAttDefClass = get_class($oAttDef);
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
$aColumnDefinition["title"] = $sAttLabel;
$aColumnDefinition['metadata'] = [
'object_class' => $sClassName,
'attribute_code' => $sAttCode,
'attribute_type' => $sAttDefClass,
'attribute_label' => $sAttLabel,
];
$aColumnDefinition["data"] = $sClassName."/".$sAttCode;
$aColumnDefinition["render"] = [
"display" => $oAttDef->GetRenderForDataTable($sClassName),
"_" => $sClassName."/".$sAttCode,
];
}
array_push($aColumnsDefinitions, $aColumnDefinition);
}
}
}
$aOptions['select'] = ["style"=>$sSelectMode];
$aOptions['pageLength'] = $iLength;
$sAjaxData = json_encode([
"operation" => 'search',
"filter" => $sFilter,
"columns" => $aColumns,
"extra_params" => $aExtraParams,
"class_aliases" => $aClassAliases,
"select_mode" => $sSelectMode,
]);
$aOptions =array_merge ($aOptions, [
"language" =>
[
"processing" => Dict::Format('UI:Datatables:Language:Processing'),
"search" => Dict::Format('UI:Datatables:Language:Search'),
"lengthMenu" => Dict::Format('UI:Datatables:Language:LengthMenu'),
"zeroRecords" => Dict::Format('UI:Datatables:Language:ZeroRecords'),
"info" => Dict::Format('UI:Datatables:Language:Info'),
"infoEmpty" => Dict::Format('UI:Datatables:Language:InfoEmpty'),
"infoFiltered" => Dict::Format('UI:Datatables:Language:InfoFiltered'),
"emptyTable" => Dict::Format('UI:Datatables:Language:EmptyTable'),
"paginate" => [
"first" => "<<",
"previous" => "<",
"next" => ">",
"last" => ">>"
],
"aria" => [
"sortAscending" => Dict::Format('UI:Datatables:Language:Sort:Ascending'),
"sortDescending" => Dict::Format('UI:Datatables:Language:Sort:Descending')
],
],
"lengthMenu" => Dict::Format('Portal:Datatables:Language:DisplayLength:All'),
"dom" => "<'ibo-datatable-toolbar'pil>t<'ibo-datatable-toolbar'pil>",
"ordering"=>true,
"order" => [],
"filter" => false,
"processing" => true,
"serverSide" => true,
"columns" => $aColumnsDefinitions,
"allColumns" => $aColumns,
'ajax' => '$.fn.dataTable.pipeline( {
"url": "ajax.render.php",
"data": '.$sAjaxData.',
"method": "post",
"pages": 5 // number of pages to cache
} )'
]);
return $aOptions;
}
public static function MakeForStaticData(string $sTitle, array $aColumns, array $aData, ?string $sId = null)
{
$oBlock = new UIContentBlock();
$oTitle = TitleFactory::MakeNeutral($sTitle, 3);
$oBlock->AddSubBlock($oTitle);
$oTable = new StaticTable($sId);
$oTable->SetColumns($aColumns);
$oTable->SetData($aData);
$oBlock->AddSubBlock($oTable);
return $oBlock;
}
public Static function MakeForForm(string $sRef, array $aColumns): FormTable
{
$oTable = new FormTable($sRef);
$oTable->SetColumns($aColumns);
return $oTable;
}
}

View File

@@ -0,0 +1,356 @@
<?php
namespace Combodo\iTop\Application\UI\Component\DataTable;
use appUserPreferences;
use AttributeDashboard;
use AttributeFriendlyName;
use AttributeLinkedSet;
use cmdbAbstract;
use cmdbAbstractObject;
use Dict;
use Metamodel;
use Serializable;
class DataTableSettings implements Serializable
{
public $aClassAliases;
public $sTableId;
public $iDefaultPageSize;
public $aColumns;
/**
* DataTableSettings constructor.
*
* @param $aClassAliases
* @param null $sTableId
*/
public function __construct($aClassAliases, $sTableId = null)
{
$this->aClassAliases = $aClassAliases;
$this->sTableId = $sTableId;
$this->iDefaultPageSize = 10;
$this->aColumns = array();
}
/**
* @param $iDefaultPageSize
* @param $aSortOrder
* @param $aColumns
*/
protected function Init($iDefaultPageSize, $aSortOrder, $aColumns)
{
$this->iDefaultPageSize = $iDefaultPageSize;
$this->aColumns = $aColumns;
$this->FixVisibleColumns();
}
/**
* @return string
*/
public function serialize()
{
// Save only the 'visible' columns
$aColumns = array();
foreach ($this->aClassAliases as $sAlias => $sClass) {
$aColumns[$sAlias] = array();
foreach ($this->aColumns[$sAlias] as $sAttCode => $aData) {
unset($aData['label']); // Don't save the display name
unset($aData['alias']); // Don't save the alias (redundant)
unset($aData['code']); // Don't save the code (redundant)
if ($aData['checked']) {
$aColumns[$sAlias][$sAttCode] = $aData;
}
}
}
return serialize(
array(
'iDefaultPageSize' => $this->iDefaultPageSize,
'aColumns' => $aColumns,
)
);
}
/**
* @param string $sData
*
* @throws \Exception
*/
public function unserialize($sData)
{
$aData = unserialize($sData);
$this->iDefaultPageSize = $aData['iDefaultPageSize'];
$this->aColumns = $aData['aColumns'];
foreach ($this->aClassAliases as $sAlias => $sClass) {
foreach ($this->aColumns[$sAlias] as $sAttCode => $aData) {
$aFieldData = false;
if ($sAttCode == '_key_') {
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, null, true /* bChecked */, $aData['sort']);
} else if (MetaModel::isValidAttCode($sClass, $sAttCode)) {
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, true /* bChecked */, $aData['sort']);
}
if ($aFieldData) {
$this->aColumns[$sAlias][$sAttCode] = $aFieldData;
} else {
unset($this->aColumns[$sAlias][$sAttCode]);
}
}
}
$this->FixVisibleColumns();
}
/**
* @param $aClassAliases
* @param $bViewLink
* @param $aDefaultLists
*
* @return DataTableSettings
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
public static function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
{
$oSettings = new DataTableSettings($aClassAliases);
// Retrieve the class specific settings for each class/alias based on the 'list' ZList
//TODO let the caller pass some other default settings (another Zlist, extre fields...)
$aColumns = array();
foreach ($aClassAliases as $sAlias => $sClass) {
if ($aDefaultLists == null) {
$aList = cmdbAbstractObject::FlattenZList(MetaModel::GetZListItems($sClass, 'list'));
} else {
$aList = $aDefaultLists[$sAlias];
}
$aSortOrder = MetaModel::GetOrderByDefault($sClass);
if ($bViewLink) {
$sSort = 'none';
if (array_key_exists('friendlyname', $aSortOrder)) {
$sSort = $aSortOrder['friendlyname'] ? 'asc' : 'desc';
}
$sNormalizedFName = MetaModel::NormalizeFieldSpec($sClass, 'friendlyname');
if (array_key_exists($sNormalizedFName, $aSortOrder)) {
$sSort = $aSortOrder[$sNormalizedFName] ? 'asc' : 'desc';
}
$aColumns[$sAlias]['_key_'] = $oSettings->GetFieldData($sAlias, '_key_', null, true /* bChecked */, $sSort);
}
foreach ($aList as $sAttCode) {
$sSort = 'none';
if (array_key_exists($sAttCode, $aSortOrder)) {
$sSort = $aSortOrder[$sAttCode] ? 'asc' : 'desc';
}
$oAttDef = Metamodel::GetAttributeDef($sClass, $sAttCode);
$aFieldData = $oSettings->GetFieldData($sAlias, $sAttCode, $oAttDef, true /* bChecked */, $sSort);
if ($aFieldData) $aColumns[$sAlias][$sAttCode] = $aFieldData;
}
}
$iDefaultPageSize = appUserPreferences::GetPref('default_page_size', MetaModel::GetConfig()->GetMinDisplayLimit());
$oSettings->Init($iDefaultPageSize, $aSortOrder, $aColumns);
return $oSettings;
}
/**
* @throws \CoreException
*/
protected function FixVisibleColumns()
{
foreach ($this->aClassAliases as $sAlias => $sClass) {
if (!isset($this->aColumns[$sAlias])) {
continue;
}
foreach ($this->aColumns[$sAlias] as $sAttCode => $aData) {
// Remove non-existent columns
// TODO: check if the existing ones are still valid (in case their type changed)
if (($sAttCode != '_key_') && (!MetaModel::IsValidAttCode($sClass, $sAttCode))) {
unset($this->aColumns[$sAlias][$sAttCode]);
}
}
$aList = MetaModel::ListAttributeDefs($sClass);
// Add the other (non visible ones), sorted in alphabetical order
$aTempData = array();
foreach ($aList as $sAttCode => $oAttDef) {
if ((!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!($oAttDef instanceof AttributeLinkedSet || $oAttDef instanceof AttributeDashboard))) {
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, false /* bChecked */, 'none');
if ($aFieldData) $aTempData[$aFieldData['label']] = $aFieldData;
}
}
ksort($aTempData);
foreach ($aTempData as $sLabel => $aFieldData) {
$this->aColumns[$sAlias][$aFieldData['code']] = $aFieldData;
}
}
}
/**
* @param $aClassAliases
* @param null $sTableId
* @param bool $bOnlyOnTable
*
* @return DataTableSettings|null
* @throws \Exception
*/
static public function GetTableSettings($aClassAliases, $sTableId = null, $bOnlyOnTable = false)
{
$pref = null;
$oSettings = new DataTableSettings($aClassAliases, $sTableId);
if ($sTableId != null) {
// An identified table, let's fetch its own settings (if any)
$pref = appUserPreferences::GetPref($oSettings->GetPrefsKey($sTableId), null);
}
if ($pref == null) {
if (!$bOnlyOnTable) {
// Try the global preferred values for this class / set of classes
$pref = appUserPreferences::GetPref($oSettings->GetPrefsKey(null), null);
}
if ($pref == null) {
// no such settings, use the default values provided by the data model
return null;
}
}
$oSettings->unserialize($pref);
return $oSettings;
}
/**
* @return array
*/
public function GetSortOrder()
{
$aSortOrder = array();
foreach ($this->aColumns as $sAlias => $aColumns) {
foreach ($aColumns as $aColumn) {
if ($aColumn['sort'] != 'none') {
$sCode = ($aColumn['code'] == '_key_') ? 'friendlyname' : $aColumn['code'];
$aSortOrder[$sCode] = ($aColumn['sort'] == 'asc'); // true for ascending, false for descending
}
}
break; // TODO: For now the Set object supports only sorting on the first class of the set
}
return $aSortOrder;
}
/**
* @param null $sTargetTableId
*
* @return bool
*/
public function Save($sTargetTableId = null)
{
$sSaveId = is_null($sTargetTableId) ? $this->sTableId : $sTargetTableId;
if ($sSaveId == null) return false; // Cannot save, the table is not identified, use SaveAsDefault instead
$sSettings = $this->serialize();
appUserPreferences::SetPref($this->GetPrefsKey($sSaveId), $sSettings);
return true;
}
/**
* @return bool
*/
public function SaveAsDefault()
{
$sSettings = $this->serialize();
appUserPreferences::SetPref($this->GetPrefsKey(null), $sSettings);
return true;
}
/**
* Clear the preferences for this particular table
* @param $bResetAll boolean If true,the settings for all tables of the same class(es)/alias(es) are reset
*/
public function ResetToDefault($bResetAll)
{
if (($this->sTableId == null) && (!$bResetAll)) return false; // Cannot reset, the table is not identified, use force $bResetAll instead
if ($bResetAll) {
// Turn the key into a suitable PCRE pattern
$sKey = $this->GetPrefsKey(null);
$sPattern = str_replace(array('|'), array('\\|'), $sKey); // escape the | character
$sPattern = '#^' . str_replace(array('*'), array('.*'), $sPattern) . '$#'; // Don't use slash as the delimiter since it's used in our key to delimit aliases
appUserPreferences::UnsetPref($sPattern, true);
} else {
appUserPreferences::UnsetPref($this->GetPrefsKey($this->sTableId), false);
}
return true;
}
/**
* @param null $sTableId
*
* @return string
*/
protected function GetPrefsKey($sTableId = null)
{
return static::GetAppUserPreferenceKey($this->aClassAliases, $sTableId);
}
public static function GetAppUserPreferenceKey($aClassAliases, $sTableId)
{
if ($sTableId === null) {
$sTableId = '*';
}
$aKeys = array();
foreach ($aClassAliases as $sAlias => $sClass) {
$aKeys[] = $sAlias . '-' . $sClass;
}
return implode('/', $aKeys) . '|' . $sTableId;
}
/**
* @param $sAlias
* @param $sAttCode
* @param $oAttDef
* @param $bChecked
* @param $sSort
*
* @return array|bool
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
protected function GetFieldData($sAlias, $sAttCode, $oAttDef, $bChecked, $sSort)
{
$ret = false;
if ($sAttCode == '_key_') {
$sLabel = Dict::Format('UI:ExtKey_AsLink', MetaModel::GetName($this->aClassAliases[$sAlias]));
$ret = array(
'label' => $sLabel,
'checked' => true,
'disabled' => true,
'alias' => $sAlias,
'code' => $sAttCode,
'sort' => $sSort,
);
} else if (!$oAttDef->IsLinkSet()) {
$sLabel = $oAttDef->GetLabel();
if ($oAttDef->IsExternalKey()) {
$sLabel = Dict::Format('UI:ExtKey_AsLink', $oAttDef->GetLabel());
} else if ($oAttDef->IsExternalField()) {
if ($oAttDef->IsFriendlyName()) {
$sLabel = Dict::Format('UI:ExtKey_AsFriendlyName', $oAttDef->GetLabel());
} else {
$oExtAttDef = $oAttDef->GetExtAttDef();
$sLabel = Dict::Format('UI:ExtField_AsRemoteField', $oAttDef->GetLabel(), $oExtAttDef->GetLabel());
}
} elseif ($oAttDef instanceof AttributeFriendlyName) {
$sLabel = Dict::Format('UI:ExtKey_AsFriendlyName', $oAttDef->GetLabel());
}
$ret = array(
'label' => $sLabel,
'checked' => $bChecked,
'disabled' => false,
'alias' => $sAlias,
'code' => $sAttCode,
'sort' => $sSort,
);
}
return $ret;
}
}

View File

@@ -0,0 +1,65 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\DataTable\StaticTable\FormTable;
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\FormTableRow\FormTableRow;
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\StaticTable;
use Combodo\iTop\Application\UI\iUIBlock;
/**
* Class FormTable
*
* @package Combodo\iTop\Application\UI\Component\FormTable
*/
class FormTable extends StaticTable
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-formtable';
public const HTML_TEMPLATE_REL_PATH = 'components/datatable/static/formtable/layout';
public const JS_TEMPLATE_REL_PATH = 'components/datatable/static/formtable/layout';
/** @var string */
private $sRef;
/** @var iUIBlock[] */
private $aRows;
public function __construct(string $sRef, string $sContainerCSSClass = '')
{
parent::__construct("dt_{$sRef}", $sContainerCSSClass);
$this->SetRef($sRef);
$this->aRows = [];
}
/**
* @return string
*/
public function GetRef(): string
{
return $this->sRef;
}
/**
* @param string $sRef
*/
public function SetRef(string $sRef): void
{
$this->sRef = $sRef;
}
public function GetRows(): array
{
return $this->aRows;
}
public function AddRow(FormTableRow $oRow): self
{
$this->aRows[] = $oRow;
return $this;
}
}

View File

@@ -0,0 +1,124 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\DataTable\StaticTable\FormTableRow;
use Combodo\iTop\Application\UI\UIBlock;
/**
* Class FormTableRow
*
* @package Combodo\iTop\Application\UI\Component\FormTableRow
*/
class FormTableRow extends UIBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-formtablerow';
public const HTML_TEMPLATE_REL_PATH = 'components/datatable/static/formtablerow/layout';
public const JS_TEMPLATE_REL_PATH = 'components/datatable/static/formtablerow/layout';
/** @var string */
private $sRef;
/** @var int */
private $iRowId;
/**
* @var array
* [
* 'entry name' => [
* 'description' => tooltip,
* 'label' => label to display,
* 'class' => cell CSS class,
* 'metadata' => [key => value] transformed into data-key="value"
* ], ...
* ]
*/
private $aColumns;
/**
* @var array
* [
* 'entry name' => [
* 'value_html' => value to display in the cell,
* 'value_raw' => real value put into data-value-raw
* ], ...
* ]
*/
private $aData;
public function __construct(string $sRef, array $aColumns, array $aData, int $iRowId)
{
parent::__construct();
$this->SetRef($sRef);
$this->SetColumns($aColumns);
$this->SetData($aData);
$this->SetRowId($iRowId);
}
/**
* @return string
*/
public function GetRef(): string
{
return $this->sRef;
}
/**
* @param string $sRef
*/
public function SetRef(string $sRef): void
{
$this->sRef = $sRef;
}
/**
* @return array
*/
public function GetColumns(): array
{
return $this->aColumns;
}
/**
* @param array $aColumns
*/
public function SetColumns(array $aColumns): void
{
$this->aColumns = $aColumns;
}
/**
* @return array
*/
public function GetData(): array
{
return $this->aData;
}
/**
* @param array $aData
*/
public function SetData(array $aData): void
{
$this->aData = $aData;
}
/**
* @return int
*/
public function GetRowId(): int
{
return $this->iRowId;
}
/**
* @param int $iRowId
*/
public function SetRowId(int $iRowId): void
{
$this->iRowId = $iRowId;
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace Combodo\iTop\Application\UI\Component\DataTable\StaticTable;
use Combodo\iTop\Application\UI\Layout\UIContentBlock;
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Tables with static data
* Class StaticTable
*/
class StaticTable extends UIContentBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-datatable';
public const HTML_TEMPLATE_REL_PATH = 'components/datatable/static/layout';
public const JS_TEMPLATE_REL_PATH = 'components/datatable/static/layout';
/**
* @var array of 'entry name' => [
* 'description' => tooltip,
* 'label' => label to display,
* 'class' => cell CSS class,
* 'metadata' => [key => value] transformed into data-key="value"
* ]
*/
private $aColumns;
/**
* @var array of [
* '@class' => css class of the row,
* 'entry name' => [
* 'value_html' => value to display in the cell,
* 'value_raw' => real value put into data-value-raw
* ], ...
* ]
*/
private $aData;
public function __construct(string $sId = null, string $sContainerCSSClass = '')
{
parent::__construct($sId, $sContainerCSSClass);
$this->aColumns = [];
$this->aData = [];
}
/**
* @return array
*/
public function GetColumns(): array
{
return $this->aColumns;
}
/**
* @param array $aColumns
*/
public function SetColumns(array $aColumns): void
{
$this->aColumns = $aColumns;
}
/**
* @return array
*/
public function GetData(): array
{
return $this->aData;
}
/**
* @param array $aData
*/
public function SetData(array $aData): void
{
$this->aData = $aData;
}
}

View File

@@ -66,4 +66,9 @@ class TitleFactory
return $oTitle;
}
public static function MakeNeutral(string $sTitle, int $iLevel = 1, ?string $sId = null)
{
return new Title($sTitle, $iLevel, $sId);
}
}

View File

@@ -40,13 +40,31 @@ class NiceWebPage extends WebPage
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui.custom.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/hovertip.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/table-selectable-lines.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
//TODO deprecated in 3.0.0
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
// table sorting
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.pager.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablehover.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/table-selectable-lines.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
//TODO end deprecated in 3.0.0
// Datatables added in 3.0.0
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/jquery.dataTables.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/dataTables.bootstrap.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/dataTables.fixedHeader.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/dataTables.responsive.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/dataTables.scroller.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'lib/datatables/js/dataTables.select.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/dataTables.settings.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/dataTables.pipeline.js');
/*$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/dataTables.bootstrap.min.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/fixedHeader.bootstrap.min.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/responsive.bootstrap.min.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/scroller.bootstrap.min.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/select.bootstrap.min.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'lib/datatables/css/select.dataTables.min.css');*/
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.popupmenu.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/searchformforeignkeys.js');
@@ -69,52 +87,7 @@ class NiceWebPage extends WebPage
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboardwidget.js');
$this->add_dict_entries('UI:Combo');
$this->add_ready_script(
<<< EOF
//add new widget called TruncatedList to properly display truncated lists when they are sorted
$.tablesorter.addWidget({
// give the widget a id
id: "truncatedList",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Check if there is a "truncated" line
this.truncatedList = false;
if ($("tr td.truncated",table).length > 0)
{
this.truncatedList = true;
}
if (this.truncatedList)
{
$("tr td",table).removeClass('truncated');
$("tr:last td",table).addClass('truncated');
}
}
});
$.tablesorter.addWidget({
// give the widget a id
id: "myZebra",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Replace the 'red even' lines by 'red_even' since most browser do not support 2 classes selector in CSS, etc..
$("tbody tr:even",table).addClass('even');
$("tbody tr.red:even",table).removeClass('red').removeClass('even').addClass('red_even');
$("tbody tr.orange:even",table).removeClass('orange').removeClass('even').addClass('orange_even');
$("tbody tr.green:even",table).removeClass('green').removeClass('even').addClass('green_even');
// In case we sort again the table, we need to remove the added 'even' classes on odd rows
$("tbody tr:odd",table).removeClass('even');
$("tbody tr.red_even:odd",table).removeClass('even').removeClass('red_even').addClass('red');
$("tbody tr.orange_even:odd",table).removeClass('even').removeClass('orange_even').addClass('orange');
$("tbody tr.green_even:odd",table).removeClass('even').removeClass('green_even').addClass('green');
}
});
$("table.listResults").tableHover(); // hover tables
EOF
);
$this->LoadTheme();
$this->LoadTheme();
$this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
$sAbsURLAppRoot = addslashes($this->m_sRootUrl);

View File

@@ -31,6 +31,11 @@ use AttributeFriendlyName;
use AttributeTagSet;
use CMDBObjectSet;
use Combodo\iTop\Application\Search\CriterionConversion\CriterionToSearchForm;
use Combodo\iTop\Application\UI\Component\Form\Form;
use Combodo\iTop\Application\UI\Component\Html\Html;
use Combodo\iTop\Application\UI\Component\Input\InputFactory;
use Combodo\iTop\Application\UI\Component\Panel\Panel;
use Combodo\iTop\Application\UI\Layout\UIContentBlock;
use CoreException;
use DBObjectSearch;
use DBObjectSet;
@@ -42,9 +47,9 @@ use IssueLog;
use MetaModel;
use MissingQueryArgument;
use TrueExpression;
use UserRights;
use utils;
use WebPage;
use UserRights;
class SearchForm
{
@@ -54,13 +59,16 @@ class SearchForm
* @param array $aExtraParams
*
* @return string
* @throws \CoreException
* @throws \DictExceptionMissingString
* @throws \Exception
*/
public function GetSearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
$sHtml = '';
$oPage->AddUiBlock($this->GetSearchFormUIBlock($oPage, $oSet, $aExtraParams));
return '';
}
public function GetSearchFormUIBlock(WebPage $oPage, DBObjectSet $oSet, $aExtraParams = array())
{
$oUiBlock = new UIContentBlock();
$oAppContext = new ApplicationContext();
$sClassName = $oSet->GetFilter()->GetClass();
$aListParams = array();
@@ -79,7 +87,7 @@ class SearchForm
{
$iSearchFormId = $oPage->GetUniqueId();
$sSearchFormId = 'SimpleSearchForm'.$iSearchFormId;
$sHtml .= "<div id=\"ds_$sSearchFormId\" class=\"mini_tab{$iSearchFormId}\">\n";
$oUiBlock->AddHtml("<div id=\"ds_$sSearchFormId\" class=\"mini_tab{$iSearchFormId}\">");
$aListParams['currentId'] = "$iSearchFormId";
}
// Check if the current class has some sub-classes
@@ -109,7 +117,7 @@ class SearchForm
if (!isset($aExtraParams['result_list_outer_selector']))
{
if (isset($aExtraParams['table_id']))
if (isset($aExtraParams['table_id']) )
{
$aExtraParams['result_list_outer_selector'] = $aExtraParams['table_id'];
}
@@ -168,23 +176,42 @@ class SearchForm
}
}
}
$bShowObsoleteData = \appUserPreferences::GetPref('show_obsolete_data', MetaModel::GetConfig()->Get('obsolescence.show_obsolete_data'));// ? What to do when true == utils::IsArchiveMode()
$sAction = (isset($aExtraParams['action'])) ? $aExtraParams['action'] : utils::GetAbsoluteUrlAppRoot().'pages/UI.php';
$sStyle = ($bOpen == 'true') ? '' : 'closed';
$sStyle = "ibo-search-form";
$sStyle .= ($bOpen == 'true') ? '' : ' closed';
$sStyle .= ($bAutoSubmit === true) ? '' : ' no_auto_submit';
$sHtml .= "<form id=\"fs_{$sSearchFormId}\" action=\"{$sAction}\" class=\"{$sStyle}\">\n"; // Don't use $_SERVER['SCRIPT_NAME'] since the form may be called asynchronously (from ajax.php)
$sHtml .= "<h2 class=\"sf_title\"><span class=\"sft_long\">" . Dict::Format('UI:SearchFor_Class_Objects', $sClassesCombo) . "</span><span class=\"sft_short\">" . Dict::S('UI:SearchToggle') . "</span>";
$sHtml .= "<a class=\"sft_toggler fas fa-caret-down pull-right\" href=\"#\" title=\"" . Dict::S('UI:Search:Toggle') . "\"></a>";
$sHtml .= "<span class=\"pull-right\">";
$sHtml .= "<span class=\"sfobs_hint pull-right\">" . Dict::S('UI:Search:Obsolescence:DisabledHint') . "</span>";
//(string $sTitle = '', array $aSubBlocks = [], string $sColor = self::DEFAULT_COLOR, ?string $sId = null)
$oUiSearchBlock = new Panel(Dict::Format('UI:SearchFor_Class_Objects', $sClassesCombo), [],Panel::DEFAULT_COLOR, $sSearchFormId);
$oUiSearchBlock->SetCSSClasses("display_block");
$oUiBlock->AddSubBlock($oUiSearchBlock);
$sHtml = "<a class=\"sft_toggler fas fa-caret-down pull-right\" href=\"#\" title=\"" . Dict::S('UI:Search:Toggle') . "\"></a>";
if ($bShowObsoleteData)
{
$sHtml .= "<span class=\"pull-right\">";
$sHtml .= "<span class=\"sfobs_hint pull-right\">" . Dict::S('UI:Search:Obsolescence:DisabledHint') . "</span>";
}
if($bAutoSubmit === false) {
$sHtml .= "<br class='clearboth' />";
$sHtml .= "<span class=\"sft_hint pull-right\">".Dict::S('UI:Search:AutoSubmit:DisabledHint')."</span>";
$sHtml .= "</span>";
}
$sHtml .= "<br class='clearboth' />";
$sHtml .= "<span class=\"sft_hint pull-right\">" . Dict::S('UI:Search:AutoSubmit:DisabledHint') . "</span>";
$sHtml .= "</span>";
$sHtml .= "<br class='clearboth' />";
$sHtml .= "</h2>\n";
$sHtml .= "<div id=\"fs_{$sSearchFormId}_message\" class=\"sf_message header_message\"></div>\n";
$sHtml .= "<div id=\"fs_{$sSearchFormId}_criterion_outer\">\n</div>\n";
$sHtml .= "</form>\n";
$oUiSearchBlock->AddToolbarBlock(new Html($sHtml));
$oFormSearch=new Form("fs_".$sSearchFormId);
$oFormSearch->SetAction($sAction)
->AddCSSClasses($sStyle);
$oUiSearchBlock->AddSubBlock($oFormSearch);
$oFormSearch->AddSubBlock(InputFactory::MakeForHidden("class", $sClassName));
$oFormSearch->AddHtml( "<div id=\"fs_{$sSearchFormId}_message\" class=\"sf_message header_message\"></div>");//class sf_message header_message
$oCriterionBlock = new UIContentBlock("fs_{$sSearchFormId}_criterion_outer","sf_criterion_area ibo-criterion-area");
$oFormSearch->AddSubBlock($oCriterionBlock);
if (isset($aExtraParams['query_params']))
{
@@ -256,8 +283,6 @@ class SearchForm
$sDateFormat = substr($sDateTimeFormat, 0, $iDateTimeSeparatorPos);
$sTimeFormat = substr($sDateTimeFormat, $iDateTimeSeparatorPos + 1);
$bShowObsoleteData = \appUserPreferences::GetPref('show_obsolete_data', MetaModel::GetConfig()->Get('obsolescence.show_obsolete_data'));// ? What to do when true == utils::IsArchiveMode()
$aSearchParams = array(
'criterion_outer_selector' => "#fs_{$sSearchFormId}_criterion_outer",
'result_list_outer_selector' => "#{$aExtraParams['result_list_outer_selector']}",
@@ -289,9 +314,8 @@ class SearchForm
$oPage->add_ready_script('$("#fs_'.$sSearchFormId.'").search_form_handler('.json_encode($aSearchParams).');');
return $sHtml;
return $oUiBlock;
}
/**
* @param \DBObjectSet $oSet
*

View File

@@ -491,7 +491,7 @@ try
$iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
$oMutex = new iTopMutex('synchro_import_'.$oDataSource->GetKey());
$oMutex->Lock();
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
foreach ($aData as $iRow => $aRow)
{
$sReconciliationCondition = '`primary_key` = '.CMDBSource::Quote($aRow[$iPrimaryKeyCol]);
@@ -633,7 +633,7 @@ try
}
}
$oMutex->Unlock();
set_time_limit($iPreviousTimeLimit);
set_time_limit(intval($iPreviousTimeLimit));
if (($sOutput === 'summary') || ($sOutput === 'details'))
{

View File

@@ -3466,7 +3466,7 @@ class SynchroExecution
/** @var SynchroReplica $oReplica */
while($oReplica = $oSetToProcess->Fetch())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$iLastReplicaProcessed = $oReplica->GetKey();
switch ($sDeletePolicy)
{
@@ -3595,7 +3595,7 @@ class SynchroExecution
/** @var \SynchroReplica $oReplica */
while ($oReplica = $oSetToProcess->Fetch())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$iLastReplicaProcessed = $oReplica->GetKey();
$this->m_oStatLog->AddTrace("Synchronizing replica id=$iLastReplicaProcessed.");
$oReplica->Synchro($this->m_oDataSource, $this->m_aReconciliationKeys, $this->m_aAttributes, $this->m_oChange,
@@ -3697,7 +3697,7 @@ class SynchroExecution
/** @var SynchroReplica $oReplica */
while($oReplica = $oSetToProcess->Fetch())
{
set_time_limit($iLoopTimeLimit);
set_time_limit(intval($iLoopTimeLimit));
$iLastReplicaProcessed = $oReplica->GetKey();
$this->m_oStatLog->AddTrace('Destination object to be DELETED', $oReplica);
$oReplica->DeleteDestObject($this->m_oChange, $this->m_oStatLog);

View File

@@ -0,0 +1,61 @@
{% for oSubBlock in oUIBlock.GetSubBlocks() %}{{ render_block(oSubBlock, {aPage: aPage}) }}{% endfor %}
{% if oUIBlock.GetOptions()["select_mode"] is defined %}
<input type="hidden" name="selectionMode" value="positive"/>
<input type="hidden" name="extra_params" value="{{ oUIBlock.GetAjaxData()["extra_params"]}}"/>
<input type="hidden" name="filter" value="{{ oUIBlock.GetAjaxData()["filter"]}}"/>
{% endif %}
<table id="{{ oUIBlock.GetId() }}" width="100%" class="ibo-datatable">
<thead>
{% if oUIBlock.GetOptions()["select_mode"] is defined %}
<th></th>
{% endif %}
{% for aColumn in oUIBlock.GetDisplayColumns() %}
<th class="ibo-datatable-header" title="{{ aColumn["description"] }}\">{{ aColumn["attribute_label"] }} </th>
{% endfor %}
</thead>
</table>
<div id="datatable_dlg_{{ oUIBlock.GetId() }}" style="display: none; background : white;" class="">
<form id="form_{{ oUIBlock.GetId() }}" onsubmit="return false">
<p>
<input id="dtbl_dlg_settings_{{ oUIBlock.GetId() }}" type="radio" name="settings" {% if (oUIBlock.GetOptions()['bUseCustomSettings'] == false) %} checked {% endif %} value="defaults">
<label for="dtbl_dlg_settings_{{ oUIBlock.GetId() }}">&nbsp;{{ 'UI:UseDefaultSettings'|dict_s }}</label>
</p>
<fieldset>
<legend class="transparent">
<input id="dtbl_dlg_specific_{{ oUIBlock.GetId() }}" type="radio" class="specific_settings" name="settings" {% if oUIBlock.GetOptions()["bUseCustomSettings"] %} checked {% endif %} value="specific">
<label for="dtbl_dlg_specific_{{ oUIBlock.GetId() }}">&nbsp;&nbsp;{{ 'UI:UseSpecificSettings'|dict_s }}</label>
</legend>
{{'UI:ColumnsAndSortOrder'|dict_s}}<br/>
<ul class="sortable_field_list" id="sfl_{{ oUIBlock.GetId() }}">
</ul>
<p> {{ 'UI:Display_X_ItemsPerPage_prefix'|dict_s }}<input type="text" size="4" name="page_size" value="{{ oUIBlock.GetOptions()["iPageSize"]}}">{{ 'UI:Display_X_ItemsPerPage_suffix'|dict_s }}</p>
</fieldset>
<fieldset>
<legend class="transparent">
<input id="dtbl_dlg_save_{{ oUIBlock.GetId() }}" type="checkbox" {% if oUIBlock.GetOptions()["sTableId"] != null %}checked{% endif %} name="save_settings">
<label for="dtbl_dlg_save_{{ oUIBlock.GetId() }}">&nbsp;&nbsp;{{ 'UI:UseSavetheSettings'|dict_s }}</label>
</legend>
<p>
<input id="dtbl_dlg_this_list_{{ oUIBlock.GetId() }}" type="radio" name="scope" {% if oUIBlock.GetOptions()["sTableId"] != null %} checked {% else %} disabled="disabled" stay-disabled="true"{% endif %} value="this_list">
<label for="dtbl_dlg_this_list_{{ oUIBlock.GetId() }}">&nbsp;&nbsp;{{ 'UI:OnlyForThisList'|dict_s }}</label>&nbsp;&nbsp;&nbsp;&nbsp;
<input id="dtbl_dlg_all_{{ oUIBlock.GetId() }}" type="radio" name="scope" {% if oUIBlock.GetOptions()["sTableId"] == null %} checked {% endif %} value="defaults">
<label for="dtbl_dlg_all_{{ oUIBlock.GetId() }}">&nbsp;&nbsp;{{ 'UI:ForAllLists'|dict_s }}</label>
</p>
</fieldset>
<table style="width:100%">
<tr>
<td style="text-align:center;">
<button type="button" onclick="$('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings('onDlgCancel'); $('#datatable_dlg_{{ oUIBlock.GetId() }}').dialog('close')">&nbsp;{{ 'UI:Button:Cancel'|dict_s }}</button>
</td>
<td style="text-align:center;">
<button type="submit" onclick="$('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings('onDlgOk'); $('#datatable_dlg_{{ oUIBlock.GetId() }}').dialog('close');">&nbsp;{{ 'UI:Button:Ok'|dict_s }}</button>
</td>
</tr>
</table>
</form>
</div>

View File

@@ -0,0 +1,257 @@
function checkAllDataTable(table, value) {
// Set the 'selectionMode' for the future objects to load
var selectionMode = 'positive';
if (value) {
selectionMode = 'negative';
}
// Mark all the displayed items as check or unchecked depending on the value
$(table).find(':checkbox[name^=selectObj]:not([disabled])').each(function () {
var $currentCheckbox = $(this);
$currentCheckbox.prop('checked', value);
$currentLine = $currentCheckbox.closest("tr");
(value) ? $currentLine.addClass("selected") : $currentLine.removeClass("selected");
});
$(table).parent().parent().find(':input[name=selectionMode]').val(selectionMode);
// Reset the list of saved selection...
$(':input[name^=storedSelection]').remove();
$(table).parent().find(':checkbox[name^=selectObj]').trigger("change");
if (value) {
$(table).DataTable().rows().select();
} else {
$(table).DataTable().rows({page: 'current'}).deselect();
}
return true;
}
$('#{{ oUIBlock.GetId() }}').closest("[role=dialog]").on("dialogbeforeclose", function () {
$('#{{ oUIBlock.GetId() }}').DataTable().clear();
});
{% if oUIBlock.GetOption("select_mode") is defined %}
var oSelectedItems{{ oUIBlock.GetOption('sTableId') }} = [];
{% endif %}
if ($.fn.dataTable.isDataTable('#{{ oUIBlock.GetId() }}')) {
$('#{{ oUIBlock.GetId() }}').DataTable().destroy(false);
}
var oTable{{ oUIBlock.GetId() }} = $('#{{ oUIBlock.GetId() }}').DataTable({
"language": {
"processing": "{{ 'UI:Datatables:Language:Processing'|dict_s }}",
"search": "{{ 'UI:Datatables:Language:Search'|dict_s }}",
"lengthMenu": "{{ 'UI:Datatables:Language:LengthMenu'|dict_s }}",
"zeroRecords": "{{ 'UI:Datatables:Language:ZeroRecords'|dict_s }}",
"info": "{{ 'UI:Datatables:Language:Info'|dict_s }}",
"infoEmpty": "{{ 'UI:Datatables:Language:InfoEmpty'|dict_s }}",
"infoFiltered": "({{ 'UI:Datatables:Language:InfoFiltered'|dict_s }})",
"emptyTable": "{{ 'UI:Datatables:Language:EmptyTable'|dict_s }}",
"paginate": {
"first": "<<",
previous: "<i class=\"fas fa-angle-left\"></i>",
next: "<i class=\"fas fa-angle-right\"></i>",
"last": ">>"
},
"aria": {
"sortAscending": ": {{ 'UI:Datatables:Language:Sort:Ascending'|dict_s }}",
"sortDescending": ": {{ 'UI:Datatables:Language:Sort:Descending'|dict_s }}"
}
},
"lengthMenu": [[ {{ oUIBlock.GetOptions()["iPageSize"] }}, {{ oUIBlock.GetOptions()["iPageSize"]*2 }}, {{ oUIBlock.GetOptions()["iPageSize"]*3 }}, {{ oUIBlock.GetOptions()["iPageSize"]*4 }}, -1], [ {{ oUIBlock.GetOptions()["iPageSize"] }}, {{ oUIBlock.GetOptions()["iPageSize"]*2 }}, {{ oUIBlock.GetOptions()["iPageSize"]*3 }}, {{ oUIBlock.GetOptions()["iPageSize"]*4 }}, "{{ 'Portal:Datatables:Language:DisplayLength:All'|dict_s }}"]],
"dom": "<'ibo-datatable-toolbar'pil>t<'ibo-datatable-toolbar'pil>",
{% if( oUIBlock.GetOptions()["sort"][0] is defined ) %}
"order": [[{{ oUIBlock.GetOptions()["sort"][0]}},'{{ oUIBlock.GetOptions()["sort"][1]}}']],
{% else %}
"order":[],
{% endif %}
"ordering": true,
{% if oUIBlock.GetOption("select_mode") is defined %}
"select": {
"style": "{{ oUIBlock.GetOption("select_mode") }}"
},
"rowCallback": function (oRow, oData) {
// Hiding pagination if only one page
if ($(this).closest('.ibo-panel--body').find('[name=selectionMode]') === "negative") {
if (!oData.id in oSelectedItems{{ oUIBlock.GetOption('sTableId') }}) {
$(oRow).select();
$(oRow).find('td:first-child input').prop('checked', true);
}
} else {
if (oData.id in oSelectedItems{{ oUIBlock.GetOption('sTableId') }}) {
$(oRow).select();
$(oRow).find('td:first-child input').prop('checked', true);
}
}
},
"drawCallback": function () {
// Hiding pagination if only one page
if ($(this).closest('.ibo-panel--body').find('[name=selectionMode]') === "negative") {
$(this).find('[name=selectAll]').checked();
$(table).DataTable().rows({page: 'current'}).select();
} else {
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
}
},
{% endif %}
"rowId": "id",
"filter": false,
"retrieve": true,
"destroy": true,
"processing": true,
"serverSide": true,
"columns": [
{% if oUIBlock.GetOption("select_mode") is not empty %}
{
"width": "auto",
"searchable": false,
"sortable": false,
"title":
{% if oUIBlock.GetOption("select_mode") != "single" %}
'<span class="row_input"><input type="checkbox" onclick="checkAllDataTable(\'#{{ oUIBlock.GetId() }}\',this.checked);" class="checkAll" id="field_{{ oUIBlock.GetId() }}_check_all" name="field_{{ oUIBlock.GetId() }}_check_all" title="{{ 'UI:SearchValue:CheckAll'|dict_s }} / {{ 'UI:SearchValue:UncheckAll'|dict_s }}" /></span>'
{% else %}
'<span class="row_input"><input type="checkbox" style="display: none;" onclick="checkAllDataTable(\'#{{ oUIBlock.GetId() }}\',this.checked);" class="checkAll" id="field_{{ oUIBlock.GetId() }}_check_all" name="field_{{ oUIBlock.GetId() }}_check_all" title="{{ 'UI:SearchValue:CheckAll'|dict_s }} / {{ 'UI:SearchValue:UncheckAll'|dict_s }}" /></span>'
{% endif %},
"type": "html",
"data": "",
"render": function (data, type, row) {
var oCheckboxElem =
{% if oUIBlock.GetOption("select_mode") != "single" %}
$('<span class="row_input"><input type="checkbox" class="selectList{{ oUIBlock.GetId() }}" name="selectObject[]" /></span>');
{% else %}
$('<span class="row_input"><input type="radio" class="selectList{{ oUIBlock.GetId() }}" name="selectObject[]" /></span>');
{% endif %}
if (row.limited_access) {
oCheckboxElem.html('-');
} else {
oCheckboxElem.find(':input').attr('data-object-id', row.id).attr('data-target-object-id', row.target_id);
}
return oCheckboxElem.prop('outerHTML');
}
},
{% endif %}
{% for aColumn in oUIBlock.GetDisplayColumns() %}
{
"width": "auto",
"searchable": false,
"sortable": true,
"title": "{{ aColumn["attribute_label"] }}",
"defaultContent": "",
"type": "html",
'metadata': {
'object_class': "{{ aColumn["object_class"] }}",
'attribute_code': "{{ aColumn["attribute_code"] }}",
'attribute_type': "{{ aColumn["attribute_type"] }}",
'attribute_label': "{{ aColumn["attribute_label"] }}"
},
"data": "{{ aColumn["class_alias"] }}/{{ aColumn["attribute_code"] }}",
"render": {
"display": function (data, type, row) { {{ aColumn["render"]|raw }}},
"_": "{{ aColumn["class_alias"] }}/{{ aColumn["attribute_code"] }}"
}
},
{% endfor %}
],
"ajax": $.fn.dataTable.pipeline({
"url": "{{ oUIBlock.GetAjaxUrl() }}",
"data": {{ oUIBlock.GetAjaxData() |raw }},
"method": "post",
"pages": 5 // number of pages to cache
}),
"initComplete": function() {
if (this.api().page.info().pages === 1) {
$('.dataTables_paginate').hide();
$('.dataTables_length').hide();
}
}
});
oTable{{ oUIBlock.GetId() }}.off('select').on('select', function (oEvent, dt, type, indexes) {
var aData = oTable{{ oUIBlock.GetId() }}.rows(indexes).data().toArray();
// Checking input
$('#{{ oUIBlock.GetId() }} tr[role="row"].selected td:first-child input').prop('checked', true);
// Saving values in temp array
for (var i in aData) {
var iItemId = aData[i].id;
if (oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.indexOf(iItemId) === -1) {
oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.push(iItemId);
}
}
if ((oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.length === oTable{{ oUIBlock.GetId() }}.page.info()["recordsTotal"] && $(this).closest('.ibo-panel--body').find('[name=selectionMode]').val() === "negative")) {
$('#btn_ok_{{ oUIBlock.GetOption('sTableId') }}').prop('disabled', true);
} else {
$('#btn_ok_{{ oUIBlock.GetOption('sTableId') }}').prop('disabled', false);
}
});
oTable{{ oUIBlock.GetId() }}.off('deselect').on('deselect', function (oEvent, dt, type, indexes) {
var aData = oTable{{ oUIBlock.GetId() }}.rows(indexes).data().toArray();
// Checking input
$('#{{ oUIBlock.GetId() }} tr[role="row"]:not(.selected) td:first-child input').prop('checked', false);
// Saving values in temp array
for (var i in aData) {
var iItemId = aData[i].id;
if (oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.indexOf(iItemId) > -1) {
oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.splice(oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.indexOf(iItemId), 1);
}
}
if ((oSelectedItems{{ oUIBlock.GetOption('sTableId') }}.length === 0 && $(this).closest('.ibo-panel--body').find('[name=selectionMode]').val() === "positive")) {
$('#btn_ok_{{ oUIBlock.GetOption('sTableId') }}').prop('disabled', true);
} else {
$('#btn_ok_{{ oUIBlock.GetOption('sTableId') }}').prop('disabled', false);
}
});
// Handles submit button
//$('#form_{{ oUIBlock.GetId() }} .form_buttons .form_btn_submit').off('click').on('click', function(oEvent){
// Extracting value(s) to be send back to the source form
{% if bMultipleSelect %}
//var oData = {values: oSelectedItems};
{% else %}
/*var oData = {value: {}};
var sItemId = Object.keys(oSelectedItems)[0];
var sItemName = oSelectedItems[sItemId];
oData.value[sItemId] = sItemName;*/
{% endif %}
// Triggering value setting on the source field
//$('[data-form-path="{{ aSource.sFormPath }}"][data-field-id="{{ aSource.sFieldId }}"]').triggerHandler('set_current_value', oData);
// Closing the modal
{% if tIsModal is defined and tIsModal == true %}
//$('#{{ sFormId }}').closest('.modal').modal('hide');
{% endif %}
//});
$('#datatable_dlg_{{ oUIBlock.GetId() }}').dialog(
{
autoOpen: false,
title: "{{ 'UI:ListConfigurationTitle'|dict_s }}",
width: 500,
close: function () { //save data and refresh
$('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings('onDlgCancel');
}
});
$aOptions = {
'sListId': '{{ oUIBlock.GetId() }}',
'oColumns': {{ oUIBlock.GetResultColumnsAsJson()|raw }},
'sViewLink': '{{ oUIBlock.GetOptions()["bViewLink"] }}',
'iPageSize': '{{ oUIBlock.GetOptions()["iPageSize"] }}',
'sTableId': '{{ oUIBlock.GetOptions()["sTableId"] }}',
"sRenderUrl": "{{ oUIBlock.GetAjaxUrl() }}",
"sSelectMode": "{{ oUIBlock.GetOptions()["select_mode"] }}",
"oData": {{ oUIBlock.GetAjaxData() |raw }},
'oLabels': {"moveup": "{{ 'UI:Button:MoveUp'|dict_s }}", "movedown": "{{ 'UI:Button:MoveDown'|dict_s }}"},
'oDefaultSettings': {{ oUIBlock.GetOptions()["oDefaultSettings"]|raw }}
};
//if (!typeof $('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings() !== "undefined")
if ($('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings()) {
$('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings("destroy");
}
$('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings($aOptions);

View File

@@ -0,0 +1,20 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<input type="hidden" name="attr_{{ oUIBlock.GetRef() }}" value="">
{% set columns = oUIBlock.GetColumns() %}
<table id="{{ oUIBlock.GetId() }}" class="ibo-datatable listResults" style="width:100%;">
<thead>
<tr>
{% for column in columns %}
<th class="ibo-datatable-header" title="{{ column.description }}">{{ column.label|raw }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for oSubBlock in oUIBlock.GetRows() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,6 @@
$('#{{ oUIBlock.GetId() }}').DataTable({
language: {
emptyTable: {{ 'UI:Message:EmptyList:UseAdd'|dict_s }}
},
search:false
});

View File

@@ -0,0 +1,19 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<tr role="row" id="{{ oUIBlock.GetRef() }}_row_{{ oUIBlock.GetRowId() }}">
{% for colName,column in oUIBlock.GetColumns() %}
<td>
{% set cellValueHtml = '' %}
{% for cellName,cellValue in oUIBlock.GetData() %}
{% if cellName == colName %}
{% set cellValueHtml = cellValue %}
{% endif %}
{% endfor %}
{% if cellValueHtml is empty %}
{% set cellValueHtml = '&nbsp;' %}
{% endif %}
{{ cellValueHtml|raw }}
</td>
{% endfor %}
</tr>

View File

@@ -0,0 +1,48 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% set columns = oUIBlock.GetColumns() %}
<table id="{{ oUIBlock.GetId() }}" class="ibo-datatable listResults" style="width:100%;">
<thead>
<tr>
{% for column in columns %}
<th class="ibo-datatable-header" title="{{ column.description }}">{{ column.label }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for data in oUIBlock.GetData() %}
{% if data['@class'] is not empty %}
<tr role="row" class="{{ data['@class'] }}">
{% else %}
<tr>
{% endif %}
{% for name,column in columns %}
<td {% if column.class is not empty %}class="{{ column.class }}" {% endif %}
{% if column.metadata is not empty %}
{% for prop,value in column.metadata %}
data-{{ prop|replace({'_': '-'}) }}="{{ value }}"
{% endfor %}
{% endif %}
{% set cellValueHtml = '' %}
{% for cellName,cellValue in data %}
{% if cellName == name %}
{% if cellValue.value_raw is empty %}
{% set cellValueHtml = cellValue %}
{% else %}
data-value-raw="{{ cellValue.value_raw }}"
{% if cellValue.value_html is not empty %}
{% set cellValueHtml = cellValue.value_html %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if cellValueHtml is empty %}
{% set cellValueHtml = '&nbsp;' %}
{% endif %}
>{{ cellValueHtml|raw }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,47 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% if oUIBlock.GetOptions() is not empty %}
{% set iPageSize = oUIBlock.GetOptions()["iPageSize"] %}
{% else %}
{% set iPageSize = 10 %}
{% endif %}
$('#{{ oUIBlock.GetId() }}').DataTable({
language: {
processing: "{{ 'UI:Datatables:Language:Processing'|dict_s }}",
search: "{{ 'UI:Datatables:Language:Search'|dict_s }}",
lengthMenu: "{{ 'UI:Datatables:Language:LengthMenu'|dict_s }}",
zeroRecords: "{{ 'UI:Datatables:Language:ZeroRecords'|dict_s }}",
info: "{{ 'UI:Datatables:Language:Info'|dict_s }}",
infoEmpty: "",
infoFiltered: "({{ 'UI:Datatables:Language:InfoFiltered'|dict_s }})",
emptyTable: "{{ 'UI:Datatables:Language:EmptyTable'|dict_s }}",
paginate: {
first: "<<",
previous: "<i class=\"fas fa-angle-left\"></i>",
next: "<i class=\"fas fa-angle-right\"></i>",
last: ">>"
},
aria: {
sortAscending: ": {{ 'UI:Datatables:Language:Sort:Ascending'|dict_s }}",
sortDescending: ": {{ 'UI:Datatables:Language:Sort:Descending'|dict_s }}"
}
},
order: [],
rowId: "id",
filter: false,
{% if oUIBlock.GetData()|length <= iPageSize %}
paging: false,
{% endif %}
dom: "<'ibo-datatable-toolbar'pil>t<'ibo-datatable-toolbar'pil>",
lengthMenu: [[ {{ iPageSize }}, {{ iPageSize*2 }}, {{ iPageSize*3 }}, {{ iPageSize*4 }}, -1], [ {{ iPageSize }}, {{ iPageSize*2 }}, {{ iPageSize*3 }}, {{ iPageSize*4 }}, "{{ 'Portal:Datatables:Language:DisplayLength:All'|dict_s }}"]],
columns: [
{% for column in oUIBlock.GetColumns() %}
{
width: "auto",
sortable: true
},
{% endfor %}
]
});

View File

@@ -1,10 +1,10 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="ibo-panel ibo-is-{{ oUIBlock.GetColor() }}">
<div id="{{ oUIBlock.GetId() }}" class="ibo-panel ibo-is-{{ oUIBlock.GetColor() }} {{ oUIBlock.GetCSSClasses() }}">
<div class="ibo-panel--header">
{% block iboPanelHeader %}
<div class="ibo-panel--title">{% block iboPanelTitle %}{{ oUIBlock.GetTitle() }}{% endblock %}</div>
<div class="ibo-panel--title">{% block iboPanelTitle %}{{ oUIBlock.GetTitle()|raw }}{% endblock %}</div>
<div class="ibo-panel--toolbar">
{% block iboPanelToolbar %}
{% for oToolbarBlock in oUIBlock.GetToolbarBlocks() %}

Some files were not shown because too many files have changed in this diff Show More