|
|
|
@ -340,7 +340,11 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
root:function() {
|
|
|
|
|
if (isAdmin()) {
|
|
|
|
|
this.navigate('admin/clients', {trigger: true});
|
|
|
|
|
} else {
|
|
|
|
|
this.navigate('user/approved', {trigger: true});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize:function () {
|
|
|
|
@ -410,6 +414,11 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
|
|
|
|
|
listClients:function () {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -424,6 +433,11 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
|
|
|
|
|
newClient:function() {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -450,6 +464,11 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
|
|
|
|
|
editClient:function(id) {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -483,6 +502,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
whiteList:function () {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -496,6 +521,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
newWhitelist:function(cid) {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var client = this.clientList.get(cid);
|
|
|
|
|
|
|
|
|
|
// if there's no client this is an error
|
|
|
|
@ -525,6 +556,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editWhitelist:function(id) {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -551,7 +588,6 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
approvedSites:function() {
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -578,6 +614,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
blackList:function() {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -596,6 +638,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
siteScope:function() {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -609,6 +657,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
newScope:function() {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -625,6 +679,12 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editScope:function(sid) {
|
|
|
|
|
|
|
|
|
|
if (!isAdmin()) {
|
|
|
|
|
this.root()();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.breadCrumbView.collection.reset();
|
|
|
|
|
this.breadCrumbView.collection.add([
|
|
|
|
|
{text:"Home", href:""},
|
|
|
|
@ -676,6 +736,7 @@ var AppRouter = Backbone.Router.extend({
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
setPageTitle("Edit a New Client");
|
|
|
|
|
// note that this doesn't actually load the client, that's supposed to happen elsewhere...
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|