From e920fb0c2489e797d1a062a210c34545a62f98b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Sun, 8 Dec 2013 21:59:09 +0100 Subject: [PATCH] =?utf8?q?L=E2=80=99objet=20FolderDDropControler=20doit=20?= =?utf8?q?=C3=AAtre=20instanci=C3=A9=20=C3=A0=20chaque=20fois=20(m=C3=AAme?= =?utf8?q?=20quand=20le=20crit=C3=A8re=20de=20tri=20n=E2=80=99est=20pas=20?= =?utf8?q?l=E2=80=99ordre)=20car=20il=20g=C3=A8re=20d=C3=A9sormais=20la=20?= =?utf8?q?s=C3=A9lection=20de=20cases=20=C3=A0=20cocher.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/ajax_scripts/folder_contents_script.js | 12 ++++---- skins/photo_theme/folder_contents_macros.pt | 30 +++++++------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/skins/ajax_scripts/folder_contents_script.js b/skins/ajax_scripts/folder_contents_script.js index 7edda7d..45ec76a 100644 --- a/skins/ajax_scripts/folder_contents_script.js +++ b/skins/ajax_scripts/folder_contents_script.js @@ -18,7 +18,7 @@ function getTargetRow(evt){ return target; } -FolderDDropControler = function(listing, firstItemPos) { +FolderDDropControler = function(listing, orderable, firstItemPos) { this.folderUrl = document.getElementById("FolderUrl").innerHTML; this.targetRow = null; this.lastOverPosition = null; @@ -29,10 +29,12 @@ FolderDDropControler = function(listing, firstItemPos) { this._updatePositions(); this.lastCBChecked = undefined; var thisControler = this; - this.listing.onmousedown = function(evt) {thisControler.drag(evt);}; - this.listing.onmouseover = function(evt) {thisControler.moveRow(evt);}; - this.listing.onmouseup = function(evt) {thisControler.drop(evt);}; - addListener(this.listing, 'click', function(evt) {thisControler.disableClickAfterDrop(evt);}); + if (orderable) { + this.listing.onmousedown = function(evt) {thisControler.drag(evt);}; + this.listing.onmouseover = function(evt) {thisControler.moveRow(evt);}; + this.listing.onmouseup = function(evt) {thisControler.drop(evt);}; + addListener(this.listing, 'click', function(evt) {thisControler.disableClickAfterDrop(evt);}); + } addListener(this.listing, 'click', function(evt) {thisControler.selectCBRange(evt);}); if (browser.isIE) { diff --git a/skins/photo_theme/folder_contents_macros.pt b/skins/photo_theme/folder_contents_macros.pt index 042dfbc..a9d046a 100644 --- a/skins/photo_theme/folder_contents_macros.pt +++ b/skins/photo_theme/folder_contents_macros.pt @@ -75,37 +75,29 @@ -- 2.20.1