define("Schema3Detail", [], function() {
return {
entitySchemaName: "FinApplicationSettings",
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
diff: /**SCHEMA_DIFF*/[
{
"operation": "merge",
"name": "DataGrid",
"values": {
"activeRowAction": {"bindTo": "onActiveRowAction"},
"activeRowActions": []
}
},
{
"operation": "insert",
"name": "Choose",
"parentName": "DataGrid",
"propertyName": "activeRowActions",
"values": {
"className": "Terrasoft.Button",
"style": this.Terrasoft.controls.ButtonEnums.style.GREEN,
"tag": "choose",
"caption": "Выбрать",
"visible": {"bindTo": "getChooseButtonVisible"}
}
}
]/**SCHEMA_DIFF*/,
methods:{
addColumnLink: function(item) {
debugger;
var self = this;
item.getChooseButtonVisible = function() {
return self.getChooseButtonVisible.call(self, this.get(this.primaryColumnName));
};
return this.callParent(arguments);
},
getChooseButtonVisible: function(activeRow) {
debugger;
if (!activeRow) return true;
var settingsSource = this.get("GridData").get(activeRow).get("FinAppSettSource");
return settingsSource && settingsSource.value == 'e7769f6c-d688-40a3-a609-e794ac5f862a' ? true : false;
}
};
});