X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/522ae82bd3a30e30ed50c444fd93164479a8e051..2e2304b15d0fd71d6ce99a009f30231f605295ec:/skins/ajax_scripts/folder_contents_script.js?ds=inline diff --git a/skins/ajax_scripts/folder_contents_script.js b/skins/ajax_scripts/folder_contents_script.js index d427939..5033108 100644 --- a/skins/ajax_scripts/folder_contents_script.js +++ b/skins/ajax_scripts/folder_contents_script.js @@ -25,17 +25,34 @@ FolderDDropControler = function(listing) { this.prevDirUp = null; this.noOver = true; this.listing = listing; + this.checkboxes = undefined; + this._updateCBIndex; 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);}; - this.listing.onclick = function(evt) {thisControler.disableClickAfterDrop(evt);}; + addListener(this.listing, 'click', function(evt) {thisControler.disableClickAfterDrop(evt);}); + addListener(this.listing, 'click', function(evt) {thisControler.selectCBRange(evt);}); if (browser.isIE) { this.listing.ondragstart = function() { window.event.returnValue = false;}; } } +FolderDDropControler.prototype._updateCBIndex = function() { + var cbs = this.listing.getElementsByTagName('INPUT'); + var index = 0; + var cb; + this.checkboxes = []; + for (var i=0 ; i < cbs.length ; i++) { + cb = cbs[i]; + if (cb.type === 'checkbox') { + cb.position = index++; + this.checkboxes[cb.position] = cb; + } + } +}; + FolderDDropControler.prototype.drag = function(evt){ var target = getTargetedObject(evt); if (target.nodeName == "INPUT") return true; @@ -134,6 +151,10 @@ FolderDDropControler.prototype.disableClickAfterDrop = function(evt) { this.reset(); }; +FolderDDropControler.prototype.selectCBRange = function(evt) { +}; + + FolderDDropControler.prototype.reset = function() { this.targetRow = null; this.lastOverPosition = null;