Portal: Update code to use the CombodoPortalToolbox.OpenModal() helper

This commit is contained in:
Molkobain
2019-11-20 11:38:42 +01:00
parent 4a12635ea5
commit fbbdee242a
6 changed files with 25 additions and 150 deletions

View File

@@ -1,21 +1,22 @@
<?php
// Copyright (C) 2010-2018 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
// along with iTop. If not, see <http://www.gnu.org/licenses/>
/**
* Copyright (C) 2013-2019 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
*/
namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer;
@@ -253,7 +254,7 @@ EOF
oEvent.stopPropagation();
// Note : This could be better if we check for an existing modal first instead of always creating a new one
CreatePortalModal({
CombodoPortalToolbox.OpenModal({
content: {
endpoint: $(this).attr('href'),
},
@@ -531,7 +532,7 @@ EOF
'selector': '.modal[data-source-element="{$sButtonAddId}"]:first'
};
}
CreatePortalModal(oOptions);
CombodoPortalToolbox.OpenModal(oOptions);
});
JS
);