summaryrefslogtreecommitdiff
path: root/modules/server_add/js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-04-08 15:11:55 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-04-08 15:11:55 +0000
commit523c467eed670c59580ede2ab1dbe8b4ad59c800 (patch)
tree149ee450f7430c5f2fb34ff6e3143865cf5cce54 /modules/server_add/js
parentb6f59e17f1a7f5627eea807dcd049bbc6242d3e6 (diff)
Fixes issues with Server Add:
1) Fixes Ticket #208 2) Fixes Ticket #190 3) Fixes an unticketed issue where two items could collide when creating the thumbnail and/or resize. For example, loading a.flv and a.jpg would have generated the same thumbnail image. This change adds a random value to the name to avoid conflicts. 4) Added item::__set() to clear the relative path if the name changes
Diffstat (limited to 'modules/server_add/js')
-rw-r--r--modules/server_add/js/server_add.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js
index addc3121..570f3946 100644
--- a/modules/server_add/js/server_add.js
+++ b/modules/server_add/js/server_add.js
@@ -40,8 +40,6 @@ function open_close_branch(icon, event) {
$(parent).append(data);
$(icon).addClass("ui-icon-minus");
$(icon).removeClass("ui-icon-plus");
- var checkbox = $(parent).find(":checkbox")[0];
- checkbox_click(checkbox, null);
});
} else {
$(icon).addClass("ui-icon-minus");
@@ -63,9 +61,15 @@ function get_url(uri, task_id) {
}
function checkbox_click(checkbox, event) {
+ var _this = this;
var parents = $(checkbox).parents("li");
var parent = parents.get(0);
- $(parent).find(".gCheckboxTree :checkbox").attr("checked", checkbox.checked);
+ if ($(parent).hasClass("gDirectory") && $(parent).find(".gCheckboxTree").length == 0) {
+ load_children(parent, function(data, textStatus) {
+ $(parent).append(data);
+ });
+ }
+ $(parent).find(".gCheckboxTree :checkbox").click();
var checked = $("#gServerAdd :checkbox[checked]");
$("#gServerAdd form :submit").attr("disabled", checked.length == 0);
}
@@ -95,11 +99,7 @@ function do_add(submit, event) {
var parms = "";
$.each(check_list, function () {
var parent = $(this).parents("li")[0];
- // If its a file or a directory with no children
- if ($(parent).hasClass("gFile") ||
- ($(parent).hasClass("gDirectory") && $(parent).find(".gCheckboxTree").length == 0)) {
- parms += "&path[]=" + this.value;
- }
+ parms += "&path[]=" + this.value;
});
}
paused = false;