disable editing the internal metadata

This commit is contained in:
Jacky 2017-11-05 10:41:17 -05:00
parent facffdca37
commit e958dfc4c2

View File

@ -14,29 +14,31 @@ function EditMetadataDialog(metaData, targetRowElem) {
var td2 = tr.insertCell(2); var td2 = tr.insertCell(2);
$('<button class="button">').text($.i18n._('core-index')["edit"]).appendTo(td2).click(function() { if (key !== "modified" && key !== "rowNumber" && key !== "importOptionMetaData" && key !== "id") {
var newValue = window.prompt($.i18n._('core-index')["change-metadata-value"]+" " + key, value); $('<button class="button">').text($.i18n._('core-index')["edit"]).appendTo(td2).click(function() {
if (newValue !== null) { var newValue = window.prompt($.i18n._('core-index')["change-metadata-value"]+" " + key, value);
$(td1).text(newValue); if (newValue !== null) {
metaData[key] = newValue; $(td1).text(newValue);
$.post( metaData[key] = newValue;
"command/core/set-metaData", $.post(
{ "command/core/set-metaData",
project : project, {
name : key, project : project,
value : newValue name : key,
}, value : newValue
function(o) { },
if (o.code === "error") { function(o) {
alert(o.message); if (o.code === "error") {
} alert(o.message);
}, }
"json" },
); "json"
} );
}
Refine.OpenProjectUI.refreshProject(targetRowElem, metaData);
}); Refine.OpenProjectUI.refreshProject(targetRowElem, metaData);
});
}
}; };
this._createDialog(); this._createDialog();