localcosmos-server 0.24.9__py3-none-any.whl → 0.24.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- localcosmos_server/static/localcosmos_server/js/django-ajax.js +5 -2
- localcosmos_server/taxonomy/fields.py +22 -1
- localcosmos_server/taxonomy/widgets.py +23 -0
- {localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/METADATA +1 -1
- {localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/RECORD +8 -8
- {localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/WHEEL +0 -0
- {localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/licenses/LICENCE +0 -0
- {localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/top_level.txt +0 -0
|
@@ -75,8 +75,11 @@ function ajaxify(container_id){
|
|
|
75
75
|
var contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
|
76
76
|
var processData = true;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
|
|
79
|
+
// only disable button if it has not the class nodisable
|
|
80
|
+
if (!submit_button.hasClass('nodisable')) {
|
|
81
|
+
submit_button.attr('disabled','disabled');
|
|
82
|
+
}
|
|
80
83
|
|
|
81
84
|
$.ajax({
|
|
82
85
|
type: form.attr('method'),
|
|
@@ -3,7 +3,7 @@ from django.utils.translation import gettext_lazy as _
|
|
|
3
3
|
|
|
4
4
|
from localcosmos_server.taxonomy.lazy import LazyAppTaxon
|
|
5
5
|
|
|
6
|
-
from localcosmos_server.taxonomy.widgets import (TaxonAutocompleteWidget, SelectTaxonWidget, ListToLazyTaxon)
|
|
6
|
+
from localcosmos_server.taxonomy.widgets import (TaxonAutocompleteWidget, SelectTaxonWidget, HiddenTaxonWidget, ListToLazyTaxon)
|
|
7
7
|
|
|
8
8
|
'''
|
|
9
9
|
A field that returns a LazyTaxon instance
|
|
@@ -100,3 +100,24 @@ class SelectTaxonField(LazyTaxonField, forms.MultiValueField):
|
|
|
100
100
|
|
|
101
101
|
super().__init__(fields, *args, require_all_fields=True, **kwargs)
|
|
102
102
|
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class HiddenTaxonField(LazyTaxonField, forms.MultiValueField):
|
|
106
|
+
|
|
107
|
+
lazy_taxon_class = LazyAppTaxon
|
|
108
|
+
|
|
109
|
+
def __init__(self, *args, **kwargs):
|
|
110
|
+
|
|
111
|
+
include_descendants = kwargs.pop('include_descendants', False)
|
|
112
|
+
|
|
113
|
+
self.widget = HiddenTaxonWidget(include_descendants=include_descendants)
|
|
114
|
+
|
|
115
|
+
fields = [
|
|
116
|
+
forms.CharField(), # taxon_source
|
|
117
|
+
forms.CharField(), # taxon_latname
|
|
118
|
+
forms.CharField(required=False), # taxon_author
|
|
119
|
+
forms.CharField(), # name_uuid
|
|
120
|
+
forms.CharField(), # taxon_nuid
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
super().__init__(fields, *args, require_all_fields=True, **kwargs)
|
|
@@ -216,3 +216,26 @@ class SelectTaxonWidget(ListToLazyTaxon, MultiWidget):
|
|
|
216
216
|
value = self.get_lazy_taxon(value)
|
|
217
217
|
return value
|
|
218
218
|
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class HiddenTaxonWidget(MultiWidget):
|
|
222
|
+
def __init__(self, attrs=None, include_descendants=False):
|
|
223
|
+
widgets = [
|
|
224
|
+
HiddenInput(), # taxon_source
|
|
225
|
+
HiddenInput(), # taxon_latname
|
|
226
|
+
HiddenInput(), # taxon_author
|
|
227
|
+
HiddenInput(), # name_uuid
|
|
228
|
+
HiddenInput(), # taxon_nuid
|
|
229
|
+
]
|
|
230
|
+
if include_descendants:
|
|
231
|
+
widgets.append(HiddenInput()) # include_descendants
|
|
232
|
+
super().__init__(widgets, attrs)
|
|
233
|
+
|
|
234
|
+
def decompress(self, lazy_taxon):
|
|
235
|
+
|
|
236
|
+
if lazy_taxon:
|
|
237
|
+
data_list = [lazy_taxon.taxon_source, lazy_taxon.taxon_latname, lazy_taxon.taxon_author,
|
|
238
|
+
str(lazy_taxon.name_uuid), lazy_taxon.taxon_nuid]
|
|
239
|
+
return data_list
|
|
240
|
+
|
|
241
|
+
return []
|
|
@@ -944,7 +944,7 @@ localcosmos_server/static/localcosmos_server/interactive-image-field/Interactive
|
|
|
944
944
|
localcosmos_server/static/localcosmos_server/js/ajax_file_input.js,sha256=lF9gSbLwV0COAnTboWSQBws8BJGHnlnsOMzci-pDOW4,1239
|
|
945
945
|
localcosmos_server/static/localcosmos_server/js/bootstrap3-typeahead.js,sha256=qL2G4PGoEFnnWHBa7FLLDgkv7SWWTUViAIbgdML9HQ4,22466
|
|
946
946
|
localcosmos_server/static/localcosmos_server/js/django-ajax-csrf.js,sha256=y6yRBzfURudBpPMwaPmL1UbPRyLVHp7Oh3EJBSL8BzQ,1570
|
|
947
|
-
localcosmos_server/static/localcosmos_server/js/django-ajax.js,sha256
|
|
947
|
+
localcosmos_server/static/localcosmos_server/js/django-ajax.js,sha256=-MgCdL2r-pC30_SLAGfSTuIwBqXdSy9wGSzMC1tOzIw,2288
|
|
948
948
|
localcosmos_server/static/localcosmos_server/js/jquery-datasettaxon-autocomplete.js,sha256=ixTb5ItV5ktkiX1UNVbKVbRANJDeHdNAriutJtGm4qc,1172
|
|
949
949
|
localcosmos_server/static/localcosmos_server/js/jquery-taxon-autocomplete.js,sha256=RPzfhK4Ncv_frrRyz1Phd1t_Uyy0ynovuK3eynM9jpc,3946
|
|
950
950
|
localcosmos_server/static/localcosmos_server/js/jquery-user-autocomplete.js,sha256=Mg54Aesc-Uz-ZzKUgquLn-w2ulR6-nMb6fqPMEnP_F4,1006
|
|
@@ -2557,13 +2557,13 @@ localcosmos_server/static/phosphor-icons/youtube-logo.svg,sha256=fB9Vuc9r9KUVPOq
|
|
|
2557
2557
|
localcosmos_server/taxonomy/AppTaxonSearch.py,sha256=OixiqMD9rASgLdpuW2I5ZqNLkCRjTdjFNNyd1CaEA34,5085
|
|
2558
2558
|
localcosmos_server/taxonomy/TaxonManager.py,sha256=kc-T3edXw_kbw-guhEtF5Q00tL_WG636OtuuuCbupQA,11979
|
|
2559
2559
|
localcosmos_server/taxonomy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2560
|
-
localcosmos_server/taxonomy/fields.py,sha256=
|
|
2560
|
+
localcosmos_server/taxonomy/fields.py,sha256=7u_XYk3l-DK6Znoa1nAJshOJWBTfqbODOHeVFuhk1bM,3715
|
|
2561
2561
|
localcosmos_server/taxonomy/forms.py,sha256=EvEGvbGAq8c0hwSO-FUdPiwODHNG1PjF5OKcZ9rAIv4,1602
|
|
2562
2562
|
localcosmos_server/taxonomy/generic.py,sha256=xfDZr1eWTJZyy-5rLt07t45wfkIEWkr6soFshxzO5wc,7163
|
|
2563
2563
|
localcosmos_server/taxonomy/lazy.py,sha256=kSZ-vmt36EE4n3-4Ad6_OXJcFKcDG90_f_KDDJooy1E,13575
|
|
2564
2564
|
localcosmos_server/taxonomy/urls.py,sha256=HuAZJJrfltJpw3icjezG6aIHMYGbTidWPQzffzz7j_4,742
|
|
2565
2565
|
localcosmos_server/taxonomy/views.py,sha256=tKHiYIaksj_aqaKHpx1nYoIIospgZhmrSyYm1wKy2RA,5524
|
|
2566
|
-
localcosmos_server/taxonomy/widgets.py,sha256=
|
|
2566
|
+
localcosmos_server/taxonomy/widgets.py,sha256=6WZhbKxyo5HXybwK0kPs2Yn33Vptz-wKGigdyL2Wl6U,7338
|
|
2567
2567
|
localcosmos_server/template_content/Templates.py,sha256=lGKsQxjywy60nxvYz02Z5C618-H4H73XyGd2oxHx87Y,7296
|
|
2568
2568
|
localcosmos_server/template_content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2569
2569
|
localcosmos_server/template_content/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
|
|
@@ -2777,8 +2777,8 @@ localcosmos_server/tests/mixins.py,sha256=2k-zCrqndwQLABNULDWRftROij3kwhW_bTiV6r
|
|
|
2777
2777
|
localcosmos_server/tests/test_forms.py,sha256=axF1v-T0NGR16St3hueQAuREb2sbWzajdNFQDpFeYqI,9767
|
|
2778
2778
|
localcosmos_server/tests/test_models.py,sha256=h4d70Ps0hLbcgL6rL1OV_6zxJ_ewDfHgvzJTJDw1m6E,33000
|
|
2779
2779
|
localcosmos_server/tests/test_views.py,sha256=SaEuAFAfapsSJi1_R6WEgp41MB03sPruCIy_hJ_oGwc,4308
|
|
2780
|
-
localcosmos_server-0.24.
|
|
2781
|
-
localcosmos_server-0.24.
|
|
2782
|
-
localcosmos_server-0.24.
|
|
2783
|
-
localcosmos_server-0.24.
|
|
2784
|
-
localcosmos_server-0.24.
|
|
2780
|
+
localcosmos_server-0.24.10.dist-info/licenses/LICENCE,sha256=VnxALPSxXoU59rlNeRdJtwS_nU79IFpVWsZZCQUM4Mw,1086
|
|
2781
|
+
localcosmos_server-0.24.10.dist-info/METADATA,sha256=FZb4xNyPq7Nl8thNctVuFRJlj8FlMGs6SHzCc4wr-1w,1687
|
|
2782
|
+
localcosmos_server-0.24.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2783
|
+
localcosmos_server-0.24.10.dist-info/top_level.txt,sha256=hNVjlPGCtXvUF5CJY5HOFA_Dh5fYivfqVSyFMUDkqPY,19
|
|
2784
|
+
localcosmos_server-0.24.10.dist-info/RECORD,,
|
|
File without changes
|
{localcosmos_server-0.24.9.dist-info → localcosmos_server-0.24.10.dist-info}/licenses/LICENCE
RENAMED
|
File without changes
|
|
File without changes
|