Hi,
I would like to know if there's a feature or - a way around - to avoid that more than one editors modify the same assets when being worked on.
As of now there's the manual option to Checkout an asset to lock it BUT when it is being worked on on an asset, the asset should be automatically locked so another editor cannot go in and overwrite the other’s work.
Also, when an asset is locked manually until published (scheduled publication) is there a way to unlock it automatically after the publication so that after can be edited by other editors?
Is there a way to achieve that?
Thank you so much in advance,
Tina
Solved! Go to Solution.
Views
Replies
Total Likes
@Tina_Iu :
I think , you can do it by writing javascript as below. when you click on edit option, this script will get invoked for checkout. Based on your use case you can restrict this to assets.
var z = $('.aem-assets-admin-actions-edit-activator');
var assetUrl = "/content/dam/test/abc.jpg.checkout.json"
z[0].onclick = function(){
$.ajax({
url: assetUrl,
type: "POST",
data: {action:'checkout'},
success: function(data){
// alert(data[message]);
},
error: function(data){
//alert("error!");
}
});
}
same way you can write a click event even on publish option to check in
only change is that in ajax call , you can send the action as check in as below.
var x= $('.cq-damadmin-admin-actions-publish-activator');
x[0].onclick = function(){
$.ajax({
url: assetUrl,
type: "POST",
data: {action:'checkin'},
success: function(data){
// alert(data[message]);
},
error: function(data){
//alert("error!");
}
}
@Tina_Iu :
I think , you can do it by writing javascript as below. when you click on edit option, this script will get invoked for checkout. Based on your use case you can restrict this to assets.
var z = $('.aem-assets-admin-actions-edit-activator');
var assetUrl = "/content/dam/test/abc.jpg.checkout.json"
z[0].onclick = function(){
$.ajax({
url: assetUrl,
type: "POST",
data: {action:'checkout'},
success: function(data){
// alert(data[message]);
},
error: function(data){
//alert("error!");
}
});
}
same way you can write a click event even on publish option to check in
only change is that in ajax call , you can send the action as check in as below.
var x= $('.cq-damadmin-admin-actions-publish-activator');
x[0].onclick = function(){
$.ajax({
url: assetUrl,
type: "POST",
data: {action:'checkin'},
success: function(data){
// alert(data[message]);
},
error: function(data){
//alert("error!");
}
}
Views
Likes
Replies
Views
Likes
Replies