'on-keydown="onKeydown" '+
'id="r{{field.record.subfield(\'901\',\'c\')[1]}}f{{field.position}}data"'+
'/></span>'+
+ // TODO: move to TT2 template
+ '<button class="btn btn-info btn-xs" '+
+ 'aria-label="Physical Characteristics Wizard" '+
+ 'ng-show="showPhysCharLink()"'+
+ 'ng-click="spawnPhysCharWizard()"'+
+ '>'+
+ '<span class="glyphicon glyphicon-link"></span>'+
+ '</button>'+
'</div>',
- scope: { field: "=", onKeydown: '=' }
+ scope: { field: "=", onKeydown: '=' },
+ controller : ['$scope','$modal',
+ function ( $scope, $modal ) {
+ $scope.showPhysCharLink = function () {
+ return ($scope.$parent.$parent.record_type == 'bre')
+ && $scope.field.tag == '007';
+ }
+ $scope.spawnPhysCharWizard = function() {
+ console.log('HERE');
+ }
+ }
+ ]
}
})
// Fetches + caches the config.marc21_physical_characteristic_value_map
// for the requested ptype_subfield (subfield_map.id).
// Maps are ordered by value.
- serivice.getPhysCharValueMap = function(ptype_subfield) {
+ service.getPhysCharValueMap = function(ptype_subfield) {
if (service.phys_char_value_map[ptype_subfield]) {
return $q.when(service.phys_char_value_map[ptype_subfield]);
}