Compare commits

...

5 Commits

Author SHA1 Message Date
Molkobain
78d8829d65 N°6131 - Improve robustness of tooltips helper when no DOM element passed to CombodoTooltip::InitTooltipFromMarkup() 2023-03-27 18:04:01 +02:00
Pierre Goiffon
307edd3f7a Fix AttributeDefinitionTest parse error in PHP 7.2 2023-03-21 09:03:54 +01:00
Molkobain
6bf906a72f Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	js/dashboard.js
2023-03-17 15:44:23 +01:00
Molkobain
0f016d7511 N°6112 - Dashboard: Improve robustness by trimming dashlet ID returned by server 2023-03-17 15:37:57 +01:00
Pierre Goiffon
d782987f50 README : fix requirements link 2023-03-14 17:08:55 +01:00
4 changed files with 27 additions and 15 deletions

View File

@@ -37,7 +37,7 @@ iTop also offers mass import tools to help you being even more efficient.
- [iTop Forums][1]: community support - [iTop Forums][1]: community support
- [iTop Tickets][2]: for feature requests and bug reports - [iTop Tickets][2]: for feature requests and bug reports
- [Releases download][3] - [Releases download][3]
- [Software requirements][4] - [iTop requirements][4]
- [Documentation][5] covering both iTop and its official extensions - [Documentation][5] covering both iTop and its official extensions
- [iTop Hub][6] : discover and install extensions ! - [iTop Hub][6] : discover and install extensions !
@@ -45,7 +45,7 @@ iTop also offers mass import tools to help you being even more efficient.
[1]: https://sourceforge.net/p/itop/discussion/ [1]: https://sourceforge.net/p/itop/discussion/
[2]: https://sourceforge.net/p/itop/tickets/ [2]: https://sourceforge.net/p/itop/tickets/
[3]: https://sourceforge.net/projects/itop/files/itop/ [3]: https://sourceforge.net/projects/itop/files/itop/
[4]: https://www.itophub.io/wiki/page?id=latest:install:upgrading_itop [4]: https://www.itophub.io/wiki/page?id=latest:install:requirements
[5]: https://www.itophub.io/wiki [5]: https://www.itophub.io/wiki
[6]: https://store.itophub.io/en_US/ [6]: https://store.itophub.io/en_US/

View File

@@ -323,7 +323,7 @@ $(function()
oParams.dashletid = sTempDashletId; oParams.dashletid = sTempDashletId;
$.post(this.options.new_dashletid_endpoint, oParams, function (data) { $.post(this.options.new_dashletid_endpoint, oParams, function (data) {
me.add_dashlet_prepare(options, data); me.add_dashlet_prepare(options, data.trim());
}); });
}, },
add_dashlet_ajax: function (options, sDashletId) { add_dashlet_ajax: function (options, sDashletId) {

View File

@@ -794,8 +794,12 @@ const CombodoTooltip = {
InitTooltipFromMarkup: function (oElem, bForce = false) { InitTooltipFromMarkup: function (oElem, bForce = false) {
const oOptions = {}; const oOptions = {};
// First, check if the tooltip isn't already instantiated // First, check if the jQuery element actually represent DOM elements
if ((oElem.attr('data-tooltip-instantiated') === 'true') && (bForce === false)) { if (oElem.length === 0) {
return false;
}
// Then, check if the tooltip isn't already instantiated
else if ((oElem.attr('data-tooltip-instantiated') === 'true') && (bForce === false)) {
return false; return false;
} }
else if((oElem.attr('data-tooltip-instantiated') === 'true') && (bForce === true) && (oElem[0]._tippy !== undefined)){ else if((oElem.attr('data-tooltip-instantiated') === 'true') && (bForce === true) && (oElem[0]._tippy !== undefined)){

View File

@@ -2,7 +2,6 @@
namespace Combodo\iTop\Test\UnitTest\Core; namespace Combodo\iTop\Test\UnitTest\Core;
use CMDBSource;
use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use MetaModel; use MetaModel;
@@ -76,7 +75,8 @@ class AttributeDefinitionTest extends ItopDataTestCase {
\$ormLinkset = \$oObject->Get('workorders_list'); \$ormLinkset = \$oObject->Get('workorders_list');
\$ormLinkset->AddItem(MetaModel::NewObject('WorkOrder', [])); \$ormLinkset->AddItem(MetaModel::NewObject('WorkOrder', []));
\$oObject->Set('workorders_list', \$ormLinkset); \$oObject->Set('workorders_list', \$ormLinkset);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -88,7 +88,8 @@ PHP,
\$ormLinkset = \$oObject->Get('contacts_list'); \$ormLinkset = \$oObject->Get('contacts_list');
\$ormLinkset->AddItem(MetaModel::NewObject('lnkContactToTicket', [])); \$ormLinkset->AddItem(MetaModel::NewObject('lnkContactToTicket', []));
\$oObject->Set('contacts_list', \$ormLinkset); \$oObject->Set('contacts_list', \$ormLinkset);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -97,7 +98,8 @@ PHP,
'value', 'value',
<<<PHP <<<PHP
\$oObject->Set('value', 100); \$oObject->Set('value', 100);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -106,7 +108,8 @@ PHP,
'speed', 'speed',
<<<PHP <<<PHP
\$oObject->Set('speed', 1024.5); \$oObject->Set('speed', 1024.5);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -115,7 +118,8 @@ PHP,
'title', 'title',
<<<PHP <<<PHP
\$oObject->Set('title', 'Some title'); \$oObject->Set('title', 'Some title');
PHP, PHP
,
false, false,
true, true,
], ],
@@ -124,7 +128,8 @@ PHP,
'item_id', 'item_id',
<<<PHP <<<PHP
\$oObject->Set('item_id', 12); \$oObject->Set('item_id', 12);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -133,7 +138,8 @@ PHP,
'org_id', 'org_id',
<<<PHP <<<PHP
\$oObject->Set('org_id', 3); \$oObject->Set('org_id', 3);
PHP, PHP
,
false, false,
true, true,
], ],
@@ -142,7 +148,8 @@ PHP,
'file', 'file',
<<<PHP <<<PHP
\$oObject->Set('file', new ormDocument('something', 'text/plain', 'something.txt')); \$oObject->Set('file', new ormDocument('something', 'text/plain', 'something.txt'));
PHP, PHP
,
false, false,
true, true,
], ],
@@ -167,7 +174,8 @@ PHP,
/** @var \ormPassword \$ormPassword */ /** @var \ormPassword \$ormPassword */
\$ormPassword = new ormPassword('somehash', 'somesalt'); \$ormPassword = new ormPassword('somehash', 'somesalt');
\$oObject->Set('password', \$ormPassword); \$oObject->Set('password', \$ormPassword);
PHP, PHP
,
false, false,
true, true,
], ],