mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 16:18:42 -05:00
23 lines
626 B
JavaScript
23 lines
626 B
JavaScript
Discourse.AdminBackupsView = Discourse.View.extend({
|
|
classNames: ["admin-backups"],
|
|
|
|
_hijackDownloads: function() {
|
|
this.$().on("mouseup.admin-backups", "a.download", function (e) {
|
|
var $link = $(e.currentTarget);
|
|
|
|
if (!$link.data("href")) {
|
|
$link.addClass("no-href");
|
|
$link.data("href", $link.attr("href"));
|
|
$link.attr("href", null);
|
|
$link.data("auto-route", true);
|
|
}
|
|
|
|
Discourse.URL.redirectTo($link.data("href"));
|
|
});
|
|
}.on("didInsertElement"),
|
|
|
|
_removeBindings: function() {
|
|
this.$().off("mouseup.admin-backups");
|
|
}.on("willDestroyElement")
|
|
|
|
});
|