mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts: # sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php
This commit is contained in:
@@ -368,7 +368,7 @@ JS
|
||||
oData.items[i].target_id = oData.items[i].id;
|
||||
|
||||
// Adding item to table only if it's not already there
|
||||
if($('#{$sTableId} tr[role="row"] > td input[data-target-object-id="' + oData.items[i].target_id + '"], #{$sTableId} tr[role="row"] > td input[data-target-object-id="' + (oData.items[i].target_id*-1) + '"]').length === 0)
|
||||
if($('#{$sTableId} tr[id] > td input[data-target-object-id="' + oData.items[i].target_id + '"], #{$sTableId} tr[id] > td input[data-target-object-id="' + (oData.items[i].target_id*-1) + '"]').length === 0)
|
||||
{
|
||||
// Making id negative in order to recognize it when persisting
|
||||
oData.items[i].id = -1 * parseInt(oData.items[i].id);
|
||||
@@ -462,7 +462,7 @@ EOF
|
||||
// Checking removed objects
|
||||
for(var i in oValues.current)
|
||||
{
|
||||
if($('#{$sTableId} tr[role="row"][id="'+i+'"]').length === 0)
|
||||
if($('#{$sTableId} tr[id="'+i+'"]').length === 0)
|
||||
{
|
||||
oValues.remove[i] = {};
|
||||
}
|
||||
@@ -497,7 +497,7 @@ EOF
|
||||
$('#{$sButtonAddId}').off('click').on('click', function(){
|
||||
// Preparing current values
|
||||
var aObjectIdsToIgnore = [];
|
||||
$('#{$sTableId} tr[role="row"] > td input[data-target-object-id]').each(function(iIndex, oElem){
|
||||
$('#{$sTableId} tr[id] > td input[data-target-object-id]').each(function(iIndex, oElem){
|
||||
aObjectIdsToIgnore.push( $(oElem).attr('data-target-object-id') );
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user