mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk web) huge speed improments when initalize files
This commit is contained in:
parent
6ed3538e8c
commit
f8ff6b415a
1 changed files with 26 additions and 15 deletions
|
@ -653,21 +653,32 @@ TorrentFile.prototype = {
|
||||||
this.name = file_data.name;
|
this.name = file_data.name;
|
||||||
this.readAttributes(file_data);
|
this.readAttributes(file_data);
|
||||||
|
|
||||||
this._element = $('<li/>').append(
|
var li = document.createElement('li');
|
||||||
$('<div/>').addClass('file_wanted_control').
|
|
||||||
bind('click', { file: this }, this.fileWantedControlClicked)
|
|
||||||
|
|
||||||
).append(
|
var wanted_div = document.createElement('div');
|
||||||
this._priority_control = $('<div/>').addClass('file_priority_control').
|
wanted_div.className = "file_wanted_control";
|
||||||
bind('click', { file: this }, this.filePriorityControlClicked)
|
|
||||||
|
|
||||||
).append(
|
var pri_div = document.createElement('div');
|
||||||
$('<div/>').addClass('inspector_torrent_file_list_entry_name').
|
pri_div.className = "file_priority_control";
|
||||||
append(this.name)
|
|
||||||
|
|
||||||
).append(
|
var file_div = document.createElement('div');
|
||||||
this._progress = $('<div/>').addClass('inspector_torrent_file_list_entry_progress')
|
file_div.className = "inspector_torrent_file_list_entry_name";
|
||||||
)
|
file_div.textContent = this.name;
|
||||||
|
|
||||||
|
var prog_div = document.createElement('div');
|
||||||
|
prog_div.className = "inspector_torrent_file_list_entry_progress";
|
||||||
|
|
||||||
|
li.appendChild(wanted_div);
|
||||||
|
li.appendChild(pri_div);
|
||||||
|
li.appendChild(file_div);
|
||||||
|
li.appendChild(prog_div);
|
||||||
|
|
||||||
|
this._element = $(li);
|
||||||
|
this._priority_control = $(pri_div);
|
||||||
|
this._progress = $(prog_div);
|
||||||
|
|
||||||
|
$(wanted_div).bind('click', { file: this }, this.fileWantedControlClicked);
|
||||||
|
this._priority_control.bind('click', { file: this }, this.filePriorityControlClicked);
|
||||||
},
|
},
|
||||||
|
|
||||||
readAttributes: function(file_data) {
|
readAttributes: function(file_data) {
|
||||||
|
|
Loading…
Reference in a new issue