Files
modoboa/extensions/limits/static/js/resellers.js
T
Antoine Nguyen 99888a861b wip: limits and new reseller profile
We add an intermediate role : Reseller. It is somewhere between a super administrator and a domain administrator. A reseller can create objects (a limited or not amount) and then define permissions on those objects:

* Create a domain admins,
* Assign limits to those admins,
* ...

see #105
2012-01-12 16:49:09 +01:00

42 lines
1.1 KiB
JavaScript

var Resellers = new Class({
initialize: function() {
this.resellers_table = new HtmlTable($("resellers_table"), {
selectable: true
});
SqueezeBox.assign($("content").getElements('a[class=boxed]'), {
parse: 'rel'
});
$$("a[name=remove]").addEvent("click", this.remove_clickcb.bind(this));
},
remove_clickcb: function(evt) {
evt.stop();
if (this.resellers_table._selectedRows.length == 0) {
return;
}
if (!confirm(gettext("Remove this selection?"))) {
return;
}
var selection = "";
this.resellers_table._selectedRows.each(function(item) {
if (selection != "") {
selection += ",";
}
selection += item.get("id");
});
new Request.JSON.mdb({
url: evt.target.get("href"),
method: "GET",
onSuccess: function(res) {
if (res.status == "ok") {
window.location.reload();
}
}
}).send("selection=" + selection);
}
});