- 下载/content/dam/xpace/en/liveSync.csv
- 在csv文件中搜索需要建立LiveCopy管理的path
- 如果存在,记住行数(例如:/content/xpace/en_au/covid-19-response)
- 如果不存在,在csv文件的最下面追加一行(from,to),并记住行数
- 在下方输入框中 (行数-1)。
- 点击“Live Sync Action”
$(function () {
$("#btnLiveSync").click(function() {
$.get('/libs/granite/csrf/token.json', function (data, status) {
let formData = new FormData($('#formLiveSync').get(0));
formData.append('_charset_', 'utf-8');
formData.append(':cq_csrf_token', data.token);
$.ajax({
type: 'POST',
dataType: 'json',
url: '/content/livesync.json',
data: formData,
processData: false,
contentType: false,
success: function (data) {
var d = new Date();
console.log("--------------------------");
console.log(data);
$("#divMsgError").html(data.error);
$("#divMsgSuccess").append("" + d + "");
$("#divMsgSuccess").append("
");
$.each(data.msgs,function(index,value){
console.log(value);
$("#divMsgSuccess").append(value + "
");
});
$("#divMsgSuccess").append("
");
$("#divMsgSuccess").append("
");
},
});
});
});
$("#btnClear").click(function() {
$("#divMsgError").empty();
$("#divMsgSuccess").empty();
});
});