From: Benoît Pin Date: Sun, 8 Dec 2013 20:59:09 +0000 (+0100) Subject: L’objet FolderDDropControler doit être instancié à chaque fois (même quand le critère... X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/commitdiff_plain/e920fb0c2489e797d1a062a210c34545a62f98b8?ds=sidebyside;hp=-c L’objet FolderDDropControler doit être instancié à chaque fois (même quand le critère de tri n’est pas l’ordre) car il gère désormais la sélection de cases à cocher. --- e920fb0c2489e797d1a062a210c34545a62f98b8 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 @@