X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3f727ea05aae7e2b69274046075b4d13feba2223..f61191c91350eb99f555105fbb1ad52ae276b3f8:/skins/ajax_scripts/folder_contents_script.js?ds=sidebyside 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) {