summaryrefslogtreecommitdiff
path: root/modules/organize/js/organize.js
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-28 14:27:37 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-28 14:27:37 -0700
commitcb2171d0825251d619b53f6f80d217326fb6bab5 (patch)
tree3f4ebee66cdbe06a1aa2c61c9d4527e30d2c83b5 /modules/organize/js/organize.js
parent6dcfdb6432d556f43736d60de8f310f247868bfa (diff)
Display the sort order in the Organize dialog, and allow users to
change the sort order on the fly.
Diffstat (limited to 'modules/organize/js/organize.js')
-rw-r--r--modules/organize/js/organize.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index ec6bd924..96309787 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -125,9 +125,8 @@
$("#gOrganize .gProgressBar").progressbar("value", data.percent_complete);
if (data.done) {
var height = $("#gOrganizeProgress").height();
- $("#gOrganizeProgress").toggle();
+ $("#gOrganizeProgress").slideUp();
$("#gMicroThumbPanel").height($("#gDialog").innerHeight() - 90);
- //$("#gMicroThumbPanel").height($("#gMicroThumbPanel").height() + height);
if (data.tree) {
$("#gOrganizeAlbumTree").html(data.tree);
}
@@ -171,10 +170,14 @@
window.location.reload();
});
- $("#gDialog #gMicroThumbDone").click(function(event) {
+ $("#gDialog #gOrganizeClose").click(function(event) {
$("#gDialog").dialog("close");
});
+ $("#gOrganizeSortColumn,#gOrganizeSortDir").change(function(event) {
+ $.organize.resort($("#gOrganizeSortColumn").attr("value"), $("#gOrganizeSortDir").attr("value"));
+ });
+
$.organize.set_handlers();
},
@@ -219,6 +222,19 @@
$("#gMicroThumbGrid").html(data);
$.organize.set_handlers();
});
+ },
+
+ /**
+ * Change the sort order.
+ */
+ resort: function(column, dir) {
+ var url = sort_order_url
+ .replace("__COL__", column)
+ .replace("__DIR__", dir);
+ $.get(url, function(data) {
+ $("#gMicroThumbGrid").html(data);
+ $.organize.set_handlers();
+ });
}
};
})(jQuery);