djgentelella 0.3.19__py3-none-any.whl → 0.3.21__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.
- djgentelella/__init__.py +1 -1
- djgentelella/blog/forms.py +3 -3
- djgentelella/forms/decorators.py +3 -3
- djgentelella/forms/forms.py +153 -33
- djgentelella/forms/models.py +2 -2
- djgentelella/static/djgentelella.flags.vendors.min.css +1 -1
- djgentelella/static/djgentelella.readonly.vendors.min.js +1 -1
- djgentelella/static/djgentelella.vendors.header.min.js +1 -1
- djgentelella/static/djgentelella.vendors.min.js +3 -2
- djgentelella/static/gentelella/css/custom.css +6 -5
- djgentelella/static/gentelella/js/base/fileupload.widget.js +7 -2
- djgentelella/static/gentelella/js/base.js +7 -2
- djgentelella/static/gentelella/js/datatables.js +5 -5
- djgentelella/static/gentelella/js/obj_api_management.js +10 -4
- djgentelella/static/vendors/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css.map +2 -2
- djgentelella/static/vendors/flags/1x1/dg.svg +2 -2
- djgentelella/static/vendors/flags/1x1/ea.svg +2 -2
- djgentelella/static/vendors/flags/1x1/ta.svg +2 -2
- djgentelella/static/vendors/flags/1x1/xx.svg +2 -2
- djgentelella/static/vendors/flags/4x3/ac.svg +2 -2
- djgentelella/static/vendors/flags/4x3/cp.svg +2 -2
- djgentelella/static/vendors/flags/4x3/dg.svg +2 -2
- djgentelella/static/vendors/flags/4x3/ea.svg +2 -2
- djgentelella/static/vendors/flags/4x3/ic.svg +2 -2
- djgentelella/static/vendors/flags/4x3/ta.svg +2 -2
- djgentelella/static/vendors/flags/4x3/xx.svg +2 -2
- djgentelella/static/vendors/friconix/friconix.js +1 -1
- djgentelella/static/vendors/interact/interact.min.js +3 -2
- djgentelella/static/vendors/storymapjs/storymap.js +1 -1
- djgentelella/templates/forms/as_grid.html +39 -0
- djgentelella/templates/forms/as_horizontal.html +36 -0
- djgentelella/templates/forms/as_inline.html +38 -0
- djgentelella/templates/forms/as_plain.html +33 -0
- djgentelella/templates/gentelella/index.html +14 -14
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/METADATA +1 -1
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/RECORD +40 -36
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/WHEEL +1 -1
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/AUTHORS +0 -0
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/LICENSE.txt +0 -0
- {djgentelella-0.3.19.dist-info → djgentelella-0.3.21.dist-info}/top_level.txt +0 -0
|
@@ -1454,11 +1454,7 @@ td.details {
|
|
|
1454
1454
|
.example_alt_pagination div.dataTables_info {
|
|
1455
1455
|
width: 40%
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1458
|
-
width: 400px;
|
|
1459
|
-
height: 22px;
|
|
1460
|
-
line-height: 22px
|
|
1461
|
-
}
|
|
1457
|
+
|
|
1462
1458
|
.paging_full_numbers a:active {
|
|
1463
1459
|
outline: none
|
|
1464
1460
|
}
|
|
@@ -4652,3 +4648,8 @@ input-group > .custom-file {
|
|
|
4652
4648
|
margin: 0;
|
|
4653
4649
|
opacity: 0;
|
|
4654
4650
|
}
|
|
4651
|
+
|
|
4652
|
+
.no-export-col i {
|
|
4653
|
+
margin: 0em 1.2em;
|
|
4654
|
+
font-size: 1.3em;
|
|
4655
|
+
}
|
|
@@ -54,8 +54,13 @@ $.fn.fileuploadwidget = function(){
|
|
|
54
54
|
if(current_value.length==0){
|
|
55
55
|
current_value=parent.default_value;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
try{
|
|
58
|
+
let data = JSON.parse(current_value);
|
|
59
|
+
parent.render_widget_data(data);
|
|
60
|
+
}catch(e) {
|
|
61
|
+
// do nothing
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
}
|
|
60
65
|
},
|
|
61
66
|
icon_action_toggle: function(){
|
|
@@ -385,8 +385,13 @@ $.fn.fileuploadwidget = function(){
|
|
|
385
385
|
if(current_value.length==0){
|
|
386
386
|
current_value=parent.default_value;
|
|
387
387
|
}
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
try{
|
|
389
|
+
let data = JSON.parse(current_value);
|
|
390
|
+
parent.render_widget_data(data);
|
|
391
|
+
}catch(e) {
|
|
392
|
+
// do nothing
|
|
393
|
+
}
|
|
394
|
+
|
|
390
395
|
}
|
|
391
396
|
},
|
|
392
397
|
icon_action_toggle: function(){
|
|
@@ -181,12 +181,12 @@ function objshowlink(data, type, row, meta){ return data ? '<a href="'+data.url+
|
|
|
181
181
|
function objnode(data, type, row, meta){ return data ? '<'+data.tagName+' href="'+data.url+'" '+data.extraattr+' class="'+(data.class!=undefined ? data.class : 'link')+'"> '+data.display_name+ '</'+data.tagName+'>': ''; };
|
|
182
182
|
function objShowBool(data, type, row, meta){ return data ? '<i class="fa fa-check-circle" title="' + data + '">': '<i class="fa fa-times-circle" title="' + data + '">'; };
|
|
183
183
|
|
|
184
|
-
document.table_default_dom = "<'row mb-
|
|
185
|
-
"<'col-sm-
|
|
186
|
-
"<'col-sm-
|
|
184
|
+
document.table_default_dom = "<'row mb-1'<'col-sm-4 col-md-4 d-flex align-items-center justify-content-start'f>" +
|
|
185
|
+
"<'col-sm-4 col-md-4 d-flex align-items-center justify-content-center'B>" +
|
|
186
|
+
"<'col-sm-3 col-md-3 d-flex align-items-center justify-content-end 'l>>" +
|
|
187
187
|
"<'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>";
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
$.fn.dataTable.Buttons.defaults.dom.button.className="btn btn-sm";
|
|
190
190
|
|
|
191
191
|
function gtCreateDataTable(id, url, table_options={}){
|
|
192
192
|
const options = Object.assign({}, {
|
|
@@ -215,7 +215,7 @@ function gtCreateDataTable(id, url, table_options={}){
|
|
|
215
215
|
action: function ( e, dt, node, config ) {clearDataTableFilters(dt, id)},
|
|
216
216
|
text: '<i class="fa fa-eraser" aria-hidden="true"></i>',
|
|
217
217
|
titleAttr: gettext('Clear Filters'),
|
|
218
|
-
className: 'btn-
|
|
218
|
+
className: 'btn-outline-secondary mr-4'
|
|
219
219
|
},
|
|
220
220
|
],
|
|
221
221
|
ajax: {
|
|
@@ -278,6 +278,7 @@ function GTBaseFormModal(modal_id, datatable_element, form_config) {
|
|
|
278
278
|
if(datainstance[e]){
|
|
279
279
|
if(Array.isArray(datainstance[e])){
|
|
280
280
|
for(var x=0; x<datainstance[e].length; x++){
|
|
281
|
+
$('#id_'+instance.prefix+e+' option[value="'+datainstance[e][x]['id']+'"]').remove();
|
|
281
282
|
var newOption = new Option(datainstance[e][x][display_name_key], datainstance[e][x]['id'], true, true);
|
|
282
283
|
$('#id_'+instance.prefix+e).append(newOption);
|
|
283
284
|
}
|
|
@@ -503,7 +504,8 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
503
504
|
relation_render: {},
|
|
504
505
|
headers: {'X-CSRFToken': getCookie('csrftoken'), 'Content-Type': 'application/json'},
|
|
505
506
|
btn_class: {
|
|
506
|
-
create: 'btn-
|
|
507
|
+
create: 'btn-outline-success mr-4',
|
|
508
|
+
clear_filters: 'btn-outline-secondary mr-4'
|
|
507
509
|
},
|
|
508
510
|
icons: {
|
|
509
511
|
create: '<i class="fa fa-plus" aria-hidden="true"></i>',
|
|
@@ -619,7 +621,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
619
621
|
action: this.create(this),
|
|
620
622
|
text: this.config.icons.create,
|
|
621
623
|
titleAttr: gettext('Create'),
|
|
622
|
-
className: this.config.create
|
|
624
|
+
className: this.config.btn_class.create
|
|
623
625
|
})
|
|
624
626
|
}
|
|
625
627
|
if(this.can_list){
|
|
@@ -627,7 +629,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
627
629
|
action: function ( e, dt, node, config ) {clearDataTableFilters(dt, instance.config.datatable_element)},
|
|
628
630
|
text: this.config.icons.clear,
|
|
629
631
|
titleAttr: gettext('Clear Filters'),
|
|
630
|
-
className: this.
|
|
632
|
+
className: this.config.btn_class.clear_filters
|
|
631
633
|
})
|
|
632
634
|
}
|
|
633
635
|
if(!config.datatable_inits.hasOwnProperty("buttons")){
|
|
@@ -638,6 +640,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
638
640
|
{
|
|
639
641
|
'name': "detail",
|
|
640
642
|
'action': 'detail',
|
|
643
|
+
'title': gettext('Detail'),
|
|
641
644
|
'url': null,
|
|
642
645
|
'i_class': this.config.icons.detail,
|
|
643
646
|
}
|
|
@@ -648,6 +651,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
648
651
|
{
|
|
649
652
|
'name': "update",
|
|
650
653
|
'action': 'update',
|
|
654
|
+
'title': gettext("Update"),
|
|
651
655
|
'url': null,
|
|
652
656
|
'i_class': this.config.icons.update,
|
|
653
657
|
}
|
|
@@ -658,6 +662,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
658
662
|
{
|
|
659
663
|
'name': 'destroy',
|
|
660
664
|
'action': 'destroy',
|
|
665
|
+
'title': gettext('Delete'),
|
|
661
666
|
'url': null,
|
|
662
667
|
'i_class': this.config.icons.destroy,
|
|
663
668
|
}
|
|
@@ -691,6 +696,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
691
696
|
if(display_in_column){
|
|
692
697
|
let params = "'"+instance.uniqueid+"', '"+action.name+"', "+meta.row;
|
|
693
698
|
edittext += '<i onclick="javascript:call_obj_crud_event('+params+');"';
|
|
699
|
+
edittext += 'title="'+action.title+'"';
|
|
694
700
|
edittext += ' class="'+instance.object_actions[x].i_class+'" ></i>';
|
|
695
701
|
}
|
|
696
702
|
}
|
|
@@ -761,7 +767,7 @@ function ObjectCRUD(uniqueid, objconfig={}){
|
|
|
761
767
|
}
|
|
762
768
|
).then(response_manage_type_data(instance, error_fn, instance.error_text))
|
|
763
769
|
.then(instance.success(instance))
|
|
764
|
-
.catch(instance.
|
|
770
|
+
.catch(error => instance.handle_error(instance, error));
|
|
765
771
|
}
|
|
766
772
|
},
|
|
767
773
|
'retrieve_data': function(url, method, success){
|