mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 14:58:43 +02:00
Portal: Update code to use the CombodoPortalToolbox.OpenModal() helper
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* 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;
|
||||
@@ -388,7 +386,7 @@ EOF
|
||||
<<<JS
|
||||
$('#{$sHierarchicalButtonId}').off('click').on('click', function(){
|
||||
// Creating a new modal
|
||||
CreatePortalModal({
|
||||
CombodoPortalToolbox.OpenModal({
|
||||
attributes: {
|
||||
'data-source-element': '{$sHierarchicalButtonId}',
|
||||
},
|
||||
@@ -448,7 +446,7 @@ JS
|
||||
'selector': '.modal[data-source-element="{$sSearchButtonId}"]:first'
|
||||
};
|
||||
}
|
||||
CreatePortalModal(oOptions);
|
||||
CombodoPortalToolbox.OpenModal(oOptions);
|
||||
});
|
||||
JS
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user