From d9bf3339d2a50f8bcf383b1970d7329a59b8337a Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 13 May 2019 09:57:24 +0200 Subject: [PATCH] linkswidget : remove dead (unreachable) code --- js/linkswidget.js | 50 ----------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/js/linkswidget.js b/js/linkswidget.js index fa2655f868..fd368927cf 100644 --- a/js/linkswidget.js +++ b/js/linkswidget.js @@ -159,56 +159,6 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH $("#fs_SearchFormToAdd_"+me.id).trigger('itop.search.form.submit'); return false; // Don't submit the form, stay in the current page ! - - var theMap = { sAttCode: me.sAttCode, - iInputId: me.iInputId, - sSuffix: me.sSuffix, - bDuplicates: me.bDuplicates - }; - - me.UpdateButtons(0); - // Gather the parameters from the search form - $('#SearchFormToAdd_'+me.id+' :input').each( function() { - if (this.name != '') - { - var val = $(this).val(); // supports multiselect as well - if (val !== null) - { - theMap[this.name] = val; - } - } - }); - - // Gather the already linked target objects - theMap.aAlreadyLinked = []; - $('#linkedset_'+me.id+' .selection:input').each(function(i) { - var iRemote = $(this).attr('data-remote-id'); - theMap.aAlreadyLinked.push(iRemote); - }); - theMap['sRemoteClass'] = theMap['class']; // swap 'class' (defined in the form) and 'remoteClass' - theMap['class'] = me.sClass; - theMap.operation = 'searchObjectsToAdd'; // Override what is defined in the form itself - - sSearchAreaId = '#SearchResultsToAdd_'+me.id; - $(sSearchAreaId).block(); - - // Run the query and display the results - $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap, - function(data) - { - $(sSearchAreaId).html(data); - $(sSearchAreaId+' .listResults').tableHover(); - $('#count_'+me.id).change(function(){ - var c = this.value; - me.UpdateButtons(c); - }); - me.UpdateSizes(null, null); - $(sSearchAreaId).unblock(); - }, - 'html' - ); - - return false; // Don't submit the form, stay in the current page ! }; this.UpdateButtons = function(iCount)