statcat_filter: undefined
};
+ // Returns true if we are editing multiple copies and at least
+ // one field contains multiple values.
+ $scope.hasMulti = function() {
+ var keys = Object.keys($scope.working.MultiMap);
+ // for-loop for shortcut exit
+ for (var i = 0; i < keys.length; i++) {
+ if ($scope.working.MultiMap[keys[i]].length > 1) {
+ return true;
+ }
+ }
+ return false;
+ }
+
$scope.copyAlertUpdate = function (alerts) {
if (!$scope.in_item_select &&
$scope.workingGridControls &&
}
});
} else {
- $timeout(function(){$window.close()});
+ $timeout(function(){
+ if (typeof BroadcastChannel != 'undefined') {
+ var bChannel = new BroadcastChannel("eg.holdings.update");
+ var bre_ids = cnList && cnList.length > 0 ? cnList.map(function(cn){ return Number(cn.record()) }) : [];
+ var cn_ids = cnList && cnList.length > 0 ? cnList.map(function(cn){ return cn.id() }) : [];
+ bChannel.postMessage({
+ copies : copy_ids,
+ volumes: cn_ids,
+ records: bre_ids
+ });
+ }
+
+ $window.close();
+ });
}
}
});
var n = new egCore.idl.acpn();
n.isnew(1);
n.creator(note.creator);
- n.pub(note.pub);
+ n.pub(note.pub ? 't' : 'f');
n.title(note.title);
n.value(note.value);
n.owning_copy(cp.id());
{ order_by : { 'acpt' : ['label'] } }, { atomic: true }
).then(function(list) {
return list.map(function(item) {
- return item.label();
+ return item.label() + " (" + egCore.org.get(item.owner()).shortname() + ")";
});
});
}