'subfield="subfield" '+
'content="subfield[1]" '+
'on-keydown="onKeydown" '+
+ 'context-item-generator="sf_val_options" '+
'id="r{{field.record.subfield(\'901\',\'c\')[1]}}f{{field.position}}s{{subfield[2]}}value" '+
'/></span>'+
'</span>',
$scope.sf_code_options = function () {
return egTagTable.getSubfieldCodes($scope.field.tag);
}
+ $scope.sf_val_options = function () {
+ return egTagTable.getSubfieldValues($scope.field.tag, $scope.subfield[0]);
+ }
}
]
}
return list;
}
+ service.getSubfieldValues = function(tag, sf_code) {
+ var list = [];
+ if (!tag) return list;
+ if (!service.fields[tag]) return;
+ if (!service.fields[tag]) return;
+ angular.forEach(service.fields[tag].subfields, function(sf) {
+ if (sf.code == sf_code && sf.hasOwnProperty('value_list')) {
+ angular.forEach(sf.value_list, function(value) {
+ var label = (value.code == value.description) ?
+ value.code :
+ value.code + ': ' + value.description;
+ this.push({
+ value: value.code,
+ label: label
+ });
+ }, this);
+ }
+ }, list);
+ return list;
+ }
+
service.getIndicatorValues = function(tag, pos) {
var list = [];
if (!tag) return list;