var e = $(elements.root);
e.toggleClass('skip', !fields.isWanted);
e.toggleClass('complete', isDone());
+ $(e[0].checkbox).prop('disabled', !isEditable());
$(e[0].checkbox).prop('checked', fields.isWanted);
},
refreshProgressHTML = function()
isDone = function () {
return fields.have >= fields.size;
},
+ isEditable = function () {
+ return (fields.torrent.getFileCount()>1) && !isDone();
+ };
createRow = function(torrent, depth, name, even) {
var e, root, box;
this.getElement = function() {
return elements.root;
};
- this.isEditable = function () {
- return (fields.torrent.getFileCount()>1) && !isDone();
- };
this.refresh = function() {
refreshImpl();
};