re-attached options for backbone upgrade compatibility
parent
5e2fbd49c0
commit
c49b347cb3
|
@ -112,8 +112,8 @@ var ListWidgetChildView = Backbone.View.extend({
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-list-widget-child').html());
|
this.template = _.template($('#tmpl-list-widget-child').html());
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,8 @@ var ListWidgetView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-list-widget').html());
|
this.template = _.template($('#tmpl-list-widget').html());
|
||||||
|
@ -232,7 +233,8 @@ var BreadCrumbView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'ul',
|
tagName: 'ul',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-breadcrumbs').html());
|
this.template = _.template($('#tmpl-breadcrumbs').html());
|
||||||
|
@ -269,7 +271,8 @@ var BreadCrumbView = Backbone.View.extend({
|
||||||
var BlackListListView = Backbone.View.extend({
|
var BlackListListView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-blacklist-form').html());
|
this.template = _.template($('#tmpl-blacklist-form').html());
|
||||||
}
|
}
|
||||||
|
@ -324,7 +327,8 @@ var BlackListListView = Backbone.View.extend({
|
||||||
var BlackListWidgetView = ListWidgetView.extend({
|
var BlackListWidgetView = ListWidgetView.extend({
|
||||||
|
|
||||||
childView: ListWidgetChildView.extend({
|
childView: ListWidgetChildView.extend({
|
||||||
render:function() {
|
render:function(options) {
|
||||||
|
this.options = options;
|
||||||
var uri = this.model.get('uri');
|
var uri = this.model.get('uri');
|
||||||
|
|
||||||
this.$el.html(this.template({item: uri}));
|
this.$el.html(this.template({item: uri}));
|
||||||
|
@ -389,7 +393,8 @@ var StatsModel = Backbone.Model.extend({
|
||||||
var UserProfileView = Backbone.View.extend({
|
var UserProfileView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-user-profile-element').html());
|
this.template = _.template($('#tmpl-user-profile-element').html());
|
||||||
}
|
}
|
||||||
|
@ -1000,6 +1005,11 @@ $(function () {
|
||||||
// grab all hashed URLs and send them through the app router instead
|
// grab all hashed URLs and send them through the app router instead
|
||||||
$(document).on('click', 'a[href^="manage/#"]', function(event) {
|
$(document).on('click', 'a[href^="manage/#"]', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
$('.sidebar-nav li.active').removeClass('active');
|
||||||
|
|
||||||
|
$(this).parent().addClass('active');
|
||||||
|
|
||||||
app.navigate(this.hash.slice(1), {trigger: true});
|
app.navigate(this.hash.slice(1), {trigger: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,8 @@ var ClientView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-client').html());
|
this.template = _.template($('#tmpl-client').html());
|
||||||
|
@ -297,7 +298,8 @@ var ClientListView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
this.filteredModel = this.model;
|
this.filteredModel = this.model;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -469,7 +471,8 @@ var ClientFormView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName:"span",
|
tagName:"span",
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-client-form').html());
|
this.template = _.template($('#tmpl-client-form').html());
|
||||||
|
|
|
@ -78,7 +78,8 @@ var DynRegRootView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -155,7 +156,8 @@ var DynRegEditView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-dynreg-client-form').html());
|
this.template = _.template($('#tmpl-dynreg-client-form').html());
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,9 @@ var ApprovedSiteCollection = Backbone.Collection.extend({
|
||||||
var ApprovedSiteListView = Backbone.View.extend({
|
var ApprovedSiteListView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() { },
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
|
},
|
||||||
|
|
||||||
load:function(callback) {
|
load:function(callback) {
|
||||||
if (this.model.isFetched &&
|
if (this.model.isFetched &&
|
||||||
|
@ -154,7 +156,8 @@ var ApprovedSiteListView = Backbone.View.extend({
|
||||||
var ApprovedSiteView = Backbone.View.extend({
|
var ApprovedSiteView = Backbone.View.extend({
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-grant').html());
|
this.template = _.template($('#tmpl-grant').html());
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,8 @@ var ResRegRootView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -155,7 +156,8 @@ var ResRegEditView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-rsreg-resource-form').html());
|
this.template = _.template($('#tmpl-rsreg-resource-form').html());
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,8 @@ var SystemScopeView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-system-scope').html());
|
this.template = _.template($('#tmpl-system-scope').html());
|
||||||
|
@ -151,6 +152,10 @@ var SystemScopeView = Backbone.View.extend({
|
||||||
var SystemScopeListView = Backbone.View.extend({
|
var SystemScopeListView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
|
},
|
||||||
|
|
||||||
load:function(callback) {
|
load:function(callback) {
|
||||||
if (this.model.isFetched) {
|
if (this.model.isFetched) {
|
||||||
callback();
|
callback();
|
||||||
|
@ -221,7 +226,8 @@ var SystemScopeListView = Backbone.View.extend({
|
||||||
var SystemScopeFormView = Backbone.View.extend({
|
var SystemScopeFormView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-system-scope-form').html());
|
this.template = _.template($('#tmpl-system-scope-form').html());
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@ var AccessTokenView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-access-token').html());
|
this.template = _.template($('#tmpl-access-token').html());
|
||||||
|
@ -193,7 +194,8 @@ var RefreshTokenView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-refresh-token').html());
|
this.template = _.template($('#tmpl-refresh-token').html());
|
||||||
|
@ -317,6 +319,10 @@ var RefreshTokenView = Backbone.View.extend({
|
||||||
var TokenListView = Backbone.View.extend({
|
var TokenListView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
|
},
|
||||||
|
|
||||||
events:{
|
events:{
|
||||||
"click .refresh-table":"refreshTable",
|
"click .refresh-table":"refreshTable",
|
||||||
'page .paginator-access':'changePageAccess',
|
'page .paginator-access':'changePageAccess',
|
||||||
|
|
|
@ -46,8 +46,8 @@ var WhiteListCollection = Backbone.Collection.extend({
|
||||||
var WhiteListListView = Backbone.View.extend({
|
var WhiteListListView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
//this.model.bind("reset", this.render, this);
|
this.options = options;
|
||||||
},
|
},
|
||||||
|
|
||||||
load:function(callback) {
|
load:function(callback) {
|
||||||
|
@ -133,7 +133,8 @@ var WhiteListListView = Backbone.View.extend({
|
||||||
var WhiteListView = Backbone.View.extend({
|
var WhiteListView = Backbone.View.extend({
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
initialize:function() {
|
initialize:function(options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-whitelist').html());
|
this.template = _.template($('#tmpl-whitelist').html());
|
||||||
}
|
}
|
||||||
|
@ -240,7 +241,8 @@ var WhiteListView = Backbone.View.extend({
|
||||||
var WhiteListFormView = Backbone.View.extend({
|
var WhiteListFormView = Backbone.View.extend({
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
|
|
||||||
initialize:function () {
|
initialize:function (options) {
|
||||||
|
this.options = options;
|
||||||
if (!this.template) {
|
if (!this.template) {
|
||||||
this.template = _.template($('#tmpl-whitelist-form').html());
|
this.template = _.template($('#tmpl-whitelist-form').html());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue