diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index c114942bb..39ca5fd4d 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -21,18 +21,20 @@ 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\DataTableFactory;
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;
use Combodo\iTop\Application\UI\Component\Input\InputFactory;
+use Combodo\iTop\Application\UI\Component\Panel\Panel;
use Combodo\iTop\Application\UI\Component\Title\TitleFactory;
use Combodo\iTop\Application\UI\Component\Toolbar\Toolbar;
use Combodo\iTop\Application\UI\Layout\MultiColumn\Column\Column;
use Combodo\iTop\Application\UI\Layout\MultiColumn\MultiColumn;
-use Combodo\iTop\Application\UI\Layout\UIContentBlock;
use Combodo\iTop\Application\UI\Layout\Object\ObjectFactory;
-use Combodo\iTop\Application\UI\Component\Panel\Panel;
+use Combodo\iTop\Application\UI\Layout\UIContentBlock;
+use Combodo\iTop\Renderer\Console\ConsoleFormRenderer;
define('OBJECT_PROPERTIES_TAB', 'ObjectProperties');
@@ -58,9 +60,6 @@ require_once(APPROOT.'sources/application/search/criterionconversionabstract.cla
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
*/
@@ -1086,10 +1085,8 @@ HTML
/**
* Get the HTML fragment corresponding to the display of a table representing a set of objects
*
- * @see DisplayBlock to get a similar table but with the JS for pagination & sorting
- *
* @param WebPage $oPage The page object is used for out-of-band information (mostly scripts) output
- * @param CMDBObjectSet $oSet The set of objects to display
+ * @param \DBObjectSet $oSet The set of objects to display
* @param array $aExtraParams key used :
*
*
view_link : if true then for extkey will display links with friendly name and make column sortable, default true
@@ -1102,24 +1099,21 @@ HTML
* @return String The HTML fragment representing the table of objects. Warning : no JS added to handled
* pagination or table sorting !
*
- * @throws \CoreException*@throws \Exception
- * @throws \ApplicationException
+ * @see DisplayBlock to get a similar table but with the JS for pagination & sorting
+ *
* @deprecated 3.0.0 use GetDisplaySetBlock
*/
- public static function GetDisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
+ public static function GetDisplaySet(WebPage $oPage, DBObjectSet $oSet, $aExtraParams = array())
{
- $oPage->AddUiBlock(static::GetDisplaySetBlock( $oPage, $oSet, $aExtraParams ));
+ $oPage->AddUiBlock(static::GetDisplaySetBlock($oPage, $oSet, $aExtraParams));
return "";
- }
+ }
- public static function GetDisplaySetBlock(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
+ public static function GetDisplaySetBlock(WebPage $oPage, DBObjectSet $oSet, $aExtraParams = array())
{
- if (empty($aExtraParams['currentId']))
- {
+ if (empty($aExtraParams['currentId'])) {
$iListId = $oPage->GetUniqueId(); // Works only if not in an Ajax page !!
- }
- else
- {
+ } else {
$iListId = $aExtraParams['currentId'];
}
diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php
index 3a0930756..3abfcbcfc 100644
--- a/application/ui.extkeywidget.class.inc.php
+++ b/application/ui.extkeywidget.class.inc.php
@@ -668,8 +668,8 @@ JS
{$sEmptyList}
-
-
+
+
HTML
diff --git a/js/extkeywidget.js b/js/extkeywidget.js
index d32df95c2..ff41cf6a9 100644
--- a/js/extkeywidget.js
+++ b/js/extkeywidget.js
@@ -276,13 +276,10 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
};
this.UpdateButtons = function () {
- var okBtn = $('#btn_ok_'+me.id);
- if ($('#count_'+me.id).val() > 0)
- {
+ var okBtn = $('#btn_ok_' + me.id + '_results');
+ if ($('#count_' + me.id + '_results').val() > 0) {
okBtn.prop('disabled', false);
- }
- else
- {
+ } else {
okBtn.prop('disabled', true);
}
};
@@ -350,18 +347,9 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
};
this.DoOk = function () {
- var s = $('#'+me.id+'_results').find(':input[name^=storedSelection]');
- var iObjectId = 0;
- if (s.length > 0)
- {
- iObjectId = s.val();
- }
- else
- {
- iObjectId = $('#fr_'+me.id+' input[name=selectObject]:checked').val();
- }
- $('#ac_dlg_'+this.id).dialog('close');
- $('#label_'+this.id).addClass('ac_dlg_loading');
+ var iObjectId = window['oSelectedItems' + me.id + '_results'][0];
+ $('#ac_dlg_' + this.id).dialog('close');
+ $('#label_' + this.id).addClass('ac_dlg_loading');
// Query the server again to get the display name of the selected object
var theMap = {
@@ -715,28 +703,26 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
// Run the query and get the result back directly in JSON
me.ajax_request = $.post(AddAppContext(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php'), theMap,
function (data) {
- var oTemp = $('