projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d01bfd
)
Implémentation d’une méthode utilitaire pour indexer les cases à cocher.
author
Benoît Pin
<benoit.pin@gmail.com>
Sun, 8 Dec 2013 09:15:32 +0000
(10:15 +0100)
committer
Benoît Pin
<benoit.pin@gmail.com>
Sun, 8 Dec 2013 09:15:32 +0000
(10:15 +0100)
skins/ajax_scripts/folder_contents_script.js
patch
|
blob
|
history
diff --git
a/skins/ajax_scripts/folder_contents_script.js
b/skins/ajax_scripts/folder_contents_script.js
index
00bdeb9
..
5033108
100644
(file)
--- a/
skins/ajax_scripts/folder_contents_script.js
+++ b/
skins/ajax_scripts/folder_contents_script.js
@@
-25,6
+25,8
@@
FolderDDropControler = function(listing) {
this.prevDirUp = null;
this.noOver = true;
this.listing = 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);};
var thisControler = this;
this.listing.onmousedown = function(evt) {thisControler.drag(evt);};
this.listing.onmouseover = function(evt) {thisControler.moveRow(evt);};
@@
-37,6
+39,20
@@
FolderDDropControler = function(listing) {
}
}
}
}
+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;
FolderDDropControler.prototype.drag = function(evt){
var target = getTargetedObject(evt);
if (target.nodeName == "INPUT") return true;