diff --git a/standards/models.py b/standards/models.py
index c1b7593..e6fc628 100644
--- a/standards/models.py
+++ b/standards/models.py
@@ -100,4 +100,4 @@ class Standards(models.Model):
class NCFile(models.Model):
agency = models.ForeignKey(Agency, on_delete=models.CASCADE)
nc_id = models.IntegerField(default=0)
- file_id = models.ForeignKey(DataFile, on_delete=models.CASCADE)
+ file_id = models.ForeignKey(DataFile, on_delete=models.CASCADE, null=True, blank=True, default=None)
diff --git a/standards/templates/standards/standards_add.html b/standards/templates/standards/standards_add.html
index 4f55610..a6be5e2 100644
--- a/standards/templates/standards/standards_add.html
+++ b/standards/templates/standards/standards_add.html
@@ -144,27 +144,29 @@
Verlinkte Dateien:
-
klicken/hineinziehenDateien werden im Uploadordner für Standards gespeichert.
+ klicken/hineinziehen
Dateien werden im Verzeichnis Agenturdaten/Standards Uploadbereich gespeichert.
{% endif %}
@@ -720,8 +722,9 @@
var ua = window.navigator.userAgent;
var isIE = /MSIE|Trident/.test(ua);
var isSafari = /Safari/.test(ua);
-
-if ( isIE || isSafari) {
+var isChrome = /Chrome/.test(ua);
+if ( isIE || (isSafari && !isChrome)) {
+
//IE specific code goes here
setInterval(function()
{
@@ -765,7 +768,7 @@ function checkGroupVerant(){
$("#id_group_verant").val(act_verant_group);
}
- console.log($("#id_group_verant").val());
+ //console.log($("#id_group_verant").val());
}
function removeGroupFromVeran(id, name){
@@ -775,7 +778,7 @@ function removeGroupFromVeran(id, name){
$("#id_group_verant").val(act_verant_group);
$("#span_btn_verant_group_" + id).remove();
- console.log($("#id_group_verant").val());
+ //console.log($("#id_group_verant").val());
}
//AUSFÜHRENDER
@@ -801,7 +804,7 @@ function checkGroupEx(){
$("#id_group_ex").val(act_ex_group);
}
- console.log($("#id_group_ex").val());
+ //console.log($("#id_group_ex").val());
}
function removeGroupFromEx(id, name){
@@ -811,7 +814,7 @@ function removeGroupFromEx(id, name){
$("#id_group_ex").val(act_ex_group);
$("#span_btn_ex_group_" + id).remove();
- console.log($("#id_group_ex").val());
+ //console.log($("#id_group_ex").val());
}
//VERTRETER
@@ -1008,8 +1011,8 @@ actualStandards = [];
actualFiles = [];
{% if update == True %}
actualFiles = [
- {% for f in standard.addedfiles.all %}
- '{{f.pk}}',
+ {% for f in standard.addedfiles_nc.all %}
+ '{{f.nc_id}}',
{% endfor %}
];
$("#id_added_files").val(actualFiles);
@@ -1057,8 +1060,7 @@ function clearSearchField(type){
function updateLinkedElements(type){
var g = $('#searchfield_' + type).val();
var id = $('#poss_' + type).find('option[value="' + g + '"]').attr('id');
-
- if(id != undefined && id.length > 0){
+ if((id != undefined || id != "undefined") && id.length > 0){
clearSearchField(type);
tempid = id.split("_")[1];
diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc
index a3356be..1d330fb 100644
Binary files a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc and b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc differ
diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py
index aeeabd0..0d81ed1 100644
--- a/standards/templatetags/counter_tag.py
+++ b/standards/templatetags/counter_tag.py
@@ -1120,15 +1120,18 @@ def getAbsenceLastHistory(absence):
import urllib.parse
@register.simple_tag
def getNCFileInfos(request, ncid):
- filesearchdata = '