-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
2,132 additions
and
1,521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ const routes = [ | |
'help', | ||
'helpus', | ||
'invite', | ||
'spread', | ||
'legacy', | ||
'livemap', | ||
'localstorage', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,46 @@ | ||
define([ | ||
'jquery', | ||
'underscore', | ||
'backbone', | ||
'iznik/base' | ||
], function($, _, Backbone, Iznik) { | ||
Iznik.Models.Admin = Iznik.Model.extend({ | ||
urlRoot: API + 'admin', | ||
'jquery', | ||
'underscore', | ||
'backbone', | ||
'iznik/base' | ||
], function ($, _, Backbone, Iznik) { | ||
Iznik.Models.Admin = Iznik.Model.extend({ | ||
urlRoot: API + 'admin', | ||
|
||
parse: function (ret) { | ||
if (ret.hasOwnProperty('admin')) { | ||
return(ret.admin); | ||
} else { | ||
return(ret); | ||
} | ||
parse: function (ret) { | ||
if (ret.hasOwnProperty('admin')) { | ||
return (ret.admin) | ||
} else { | ||
return (ret) | ||
} | ||
}, | ||
|
||
delete: function (reason) { | ||
var self = this | ||
|
||
return $.ajax({ | ||
type: 'POST', | ||
headers: { | ||
'X-HTTP-Method-Override': 'DELETE' | ||
}, | ||
url: API + 'admin/' + self.get('id'), | ||
data: { | ||
id: self.get('id'), | ||
reason: reason | ||
}, success: function (ret) { | ||
self.destroy() | ||
} | ||
}); | ||
}) | ||
} | ||
}) | ||
|
||
Iznik.Collections.Admin = Iznik.Collection.extend({ | ||
url: API + 'admin', | ||
Iznik.Collections.Admin = Iznik.Collection.extend({ | ||
url: API + 'admin', | ||
|
||
model: Iznik.Models.Admin, | ||
model: Iznik.Models.Admin, | ||
|
||
parse: function (ret) { | ||
return (ret.admins); | ||
} | ||
}); | ||
}); | ||
parse: function (ret) { | ||
return (ret.admins) | ||
} | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.