mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
WebUI: fix draw events for datatables
sometimes the context menu was not working because the draw action was called too early Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -432,12 +432,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,12 +328,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,11 +235,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
|
|||||||
@@ -274,12 +274,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,12 +332,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
@@ -815,7 +815,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
@@ -979,7 +979,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
|
|||||||
@@ -350,12 +350,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,12 +285,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,11 +387,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
|
|||||||
@@ -286,12 +286,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -619,12 +619,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
dt.on('column-reorder', function(e, settings, details){
|
dt.on('columns-reordered', function(e, settings, details){
|
||||||
drawAction();
|
drawAction();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -840,11 +840,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#file_manager_list_container').removeClass("d-none");
|
$('#file_manager_list_container').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
//{{- if .CanAddFiles}}
|
//{{- if .CanAddFiles}}
|
||||||
|
|||||||
@@ -414,11 +414,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
$('#card_content').removeClass("d-none");
|
$('#card_content').removeClass("d-none");
|
||||||
let api = $.fn.dataTable.Api(settings);
|
let api = $.fn.dataTable.Api(settings);
|
||||||
api.columns.adjust().draw("page");
|
api.columns.adjust().draw("page");
|
||||||
drawAction();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dt.on('draw', drawAction);
|
dt.on('draw.dt', drawAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawAction() {
|
function drawAction() {
|
||||||
|
|||||||
Reference in New Issue
Block a user