Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task #166808 feat: Copy Multiple records to Multiple Organisation #409

Open
wants to merge 2 commits into
base: release-1.2.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions src/components/com_tjucm/media/js/ui/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jQuery(window).load(function()
if (response.data)
{
jQuery.each(response.data, function(key, value) {
jQuery('#target_ucm').append(jQuery('<option></option>').attr('value',value.value).text(value.text));
jQuery('#target_ucm').append(jQuery('<option></option>').attr('value',value.value).text(value.text));
jQuery('#target_ucm').trigger('liszt:updated');
});
}
Expand All @@ -19,7 +19,7 @@ jQuery(window).load(function()
jQuery('.ucmListField').addClass('hide');
}
};

// Code to check ucm type compatibility to copy item
com_tjucm.Services.Items.chekCompatibility(currentUcmType, afterCheckCompatibilityOfUcmType);

Expand All @@ -28,7 +28,7 @@ jQuery(window).load(function()
if (response.data != null)
{
jQuery.each(response.data, function(key, value) {
jQuery('#cluster_list').append(jQuery('<option></option>').attr('value',value.value).text(value.text));
jQuery('#cluster_list').append(jQuery('<option></option>').attr('value',value.value).text(value.text));
jQuery('#cluster_list').trigger('liszt:updated');
});
}
Expand All @@ -37,7 +37,7 @@ jQuery(window).load(function()
jQuery('.clusterListField').addClass('hide');
}
};

// To get the cluster fields options
com_tjucm.Services.Items.getClusterFieldOptions(currentUcmType, afterGetClusterField);
});
Expand All @@ -51,7 +51,7 @@ var tjUcmItems = {
jQuery("html, body").animate({scrollTop: jQuery("#item-form #tjucm_loader").position().top}, "slow");

response = JSON.parse(response);

sessionStorage.setItem('message', response.message);
if(response.data !== null)
{
Expand All @@ -63,7 +63,16 @@ var tjUcmItems = {
}
}

var copyItemData = jQuery('#adminForm').serialize();
var copyItemData = jQuery('#adminForm').serializeArray();
var clusterId = jQuery('.cluster_list').val();

// Update cluster Ids
copyItemData.push({
name: "cluster_list",
value: clusterId
});

copyItemData = jQuery.param(copyItemData);

// Code to copy item to ucm type
com_tjucm.Services.Items.copyItem(copyItemData, afterCopyItem);
Expand Down
2 changes: 1 addition & 1 deletion src/components/com_tjucm/media/js/ui/items.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading