diff --git a/public/css/app.css b/public/css/app.css
index 7f0795f..c9e8cb3 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -34,13 +34,13 @@
max-height: 200px;
}
-.canvas-container .btn-drag, .canvas-container .btn-rotate, .canvas-container .btn-delete, .canvas-container .btn-select, .canvas-container .btn-download, .canvas-container .btn-restore, .canvas-container .btn-drag-here, .canvas-container .btn-cancel {
+.canvas-container .btn-drag, .canvas-container .btn-rotate, .canvas-container .btn-delete, .canvas-container .btn-select, .canvas-container .btn-download, .canvas-container .btn-restore, .canvas-container .btn-drag-here, .canvas-container .btn-drag-here_mobile, .canvas-container .btn-cancel {
font-size: 30px;
cursor: move;
background: rgb(255,255,255,0.6);
}
-.canvas-container .btn-drag-here, .canvas-container .btn-cancel {
+.canvas-container .btn-drag-here, .canvas-container .btn-drag-here_mobile, .canvas-container .btn-cancel {
cursor: pointer;
z-index: 9999;
}
diff --git a/public/js/organization.js b/public/js/organization.js
index c0a0d5d..bb5de4a 100644
--- a/public/js/organization.js
+++ b/public/js/organization.js
@@ -70,7 +70,8 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) {
pageHTML += '
';
pageHTML += '
';
pageHTML += '
';
- pageHTML += '
';
+ pageHTML += '
';
+ pageHTML += '
';
pageHTML += '
';
pageHTML += '
';
pageHTML += '
';
@@ -179,7 +180,11 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) {
}
toggleDragPage(this.parentNode);
});
+ canvasContainer.querySelector('.btn-drag-here_mobile').addEventListener('click', function(e) {
+ canvasContainer.querySelector('.btn-drag-here').click();
+ });
canvasContainer.querySelector('.btn-drag-here').addEventListener('click', function(e) {
+ e.stopPropagation();
let pageHere = this.parentNode;
let after = false;
let pageHereFound = false;
@@ -408,6 +413,7 @@ var updatePageState = function(page) {
page.querySelector('.btn-drag').classList.add('d-none');
page.querySelector('.btn-cancel').classList.add('d-none');
page.querySelector('.btn-drag-here').classList.add('d-none');
+ page.querySelector('.btn-drag-here_mobile').classList.add('d-none');
page.querySelector('.btn-restore').classList.add('d-none');
page.querySelector('.page-title').classList.add('d-none');
@@ -448,9 +454,13 @@ var updatePageState = function(page) {
page.querySelector('.canvas-pdf').style.zIndex = 9999;
}
- if(!isPageDragged(page) && isDraggedMode()) {
+ if(!is_mobile() && !isPageDragged(page) && isDraggedMode()) {
page.querySelector('.btn-drag-here').classList.remove('d-none');
}
+
+ if(is_mobile() && !isPageDragged(page) && isDraggedMode()) {
+ page.querySelector('.btn-drag-here_mobile').classList.remove('d-none');
+ }
}
var updateFilesState = function() {
@@ -621,6 +631,16 @@ var createEventsListener = function() {
pageRender(index);
}
});
+ document.getElementById('btn_drag_select').addEventListener('click', function(event) {
+ let pages = getPagesSelected();
+ for(index in pages) {
+ toggleDragPage(pages[index]);
+ }
+ });
+ document.getElementById('btn_drag_select_mobile').addEventListener('click', function(event) {
+ document.getElementById('btn_drag_select').click();
+ this.blur();
+ });
}
async function getPDFBlobFromCache(cacheUrl) {
diff --git a/templates/organization.html.php b/templates/organization.html.php
index 64f873b..c83f329 100644
--- a/templates/organization.html.php
+++ b/templates/organization.html.php
@@ -7,7 +7,7 @@
-
+
Organiser un PDF
@@ -72,6 +72,7 @@
+
@@ -104,7 +105,7 @@
Aucune page(s) séléctionnée(s)
-
+
@@ -127,6 +128,6 @@
-
+