This resolves an issue where the control set can be incompletely
initialized when jumping from creating a new bib to opening
in in catalog view.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
$scope.save_stack_depth = 0;
$scope.controlfields = [];
$scope.datafields = [];
- $scope.controlSet = new egTagTable.authorityControlSet();
+ $scope.controlSet = egTagTable.getAuthorityControlSet();
egTagTable.loadTagTable({ marcRecordType : $scope.record_type });
authority_control_set : {
_remote_loaded : false,
_controlsets : [ ]
- }
+ },
+ _active_control_set : undefined
};
service.initialized = function() {
}
+ service.getAuthorityControlSet = function() {
+ if (!service._active_control_set) {
+ service.authority_control_set._remote_loaded = false;
+ service._active_control_set = new service.authorityControlSet();
+ }
+ return service._active_control_set;
+ }
+
return service;
}]);