mirror of https://gitee.com/bigwinds/arangodb
Removed unused routes and views and templates
This commit is contained in:
parent
e9d8392e48
commit
b100eb85e4
|
@ -22,8 +22,6 @@
|
||||||
"databases" : "databases",
|
"databases" : "databases",
|
||||||
"application/installed/:key" : "applicationEdit",
|
"application/installed/:key" : "applicationEdit",
|
||||||
"application/available/:key" : "applicationInstall",
|
"application/available/:key" : "applicationInstall",
|
||||||
"applications/installed" : "applicationsInstalled",
|
|
||||||
"applications/available" : "applicationsAvailable",
|
|
||||||
"applications" : "applications",
|
"applications" : "applications",
|
||||||
"application/documentation/:key" : "appDocumentation",
|
"application/documentation/:key" : "appDocumentation",
|
||||||
"graph" : "graph",
|
"graph" : "graph",
|
||||||
|
@ -389,26 +387,6 @@
|
||||||
this.naviView.selectMenuItem('applications-menu');
|
this.naviView.selectMenuItem('applications-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
applicationsAvailable: function() {
|
|
||||||
if (this.applicationsInstalledView === undefined) {
|
|
||||||
this.applicationsInstalledView = new window.FoxxInstalledListView({
|
|
||||||
collection: this.foxxList
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.applicationsInstalledView.reload();
|
|
||||||
this.naviView.selectMenuItem('applications-menu');
|
|
||||||
},
|
|
||||||
|
|
||||||
applicationsInstalled: function() {
|
|
||||||
if (this.applicationsActiveView === undefined) {
|
|
||||||
this.applicationsActiveView = new window.FoxxActiveListView({
|
|
||||||
collection: this.foxxList
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.applicationsActiveView.reload();
|
|
||||||
this.naviView.selectMenuItem('applications-menu');
|
|
||||||
},
|
|
||||||
|
|
||||||
applicationEdit: function(appkey) {
|
applicationEdit: function(appkey) {
|
||||||
this.foxxList.fetch({
|
this.foxxList.fetch({
|
||||||
async: false
|
async: false
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
<script id="foxxInstalledView.ejs" type="text/template">
|
|
||||||
<ul class="thumbnails2">
|
|
||||||
<div class="headerBar">
|
|
||||||
<a class="arangoHeader">Applications</a>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group pull-right">
|
|
||||||
<button class="btn btn-inverse btn-small disabledHover">Filter:</button>
|
|
||||||
<button data-toggle="dropdown" class="btn btn-inverse btn-small dropdown-toggle"><span class="caret"></span></button>
|
|
||||||
|
|
||||||
<ul class="dropdown-menu dashboard-dropdown" id="menuGroups">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<ul class="contentDiv" id="foxxList">
|
|
||||||
</ul>
|
|
||||||
</script>
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
|
|
||||||
/*global Backbone, EJS, $, window, _, templateEngine*/
|
|
||||||
(function () {
|
|
||||||
"use strict";
|
|
||||||
window.FoxxActiveListView = Backbone.View.extend({
|
|
||||||
el: '#content',
|
|
||||||
template: templateEngine.createTemplate("foxxListView.ejs"),
|
|
||||||
|
|
||||||
events: {
|
|
||||||
// 'click button#add': 'callback'
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function() {
|
|
||||||
this._subViews = {};
|
|
||||||
var self = this;
|
|
||||||
this.collection.fetch({
|
|
||||||
success: function() {
|
|
||||||
_.each(self.collection.where({type: "mount"}), function (foxx) {
|
|
||||||
var subView = new window.FoxxActiveView({model: foxx});
|
|
||||||
self._subViews[foxx.get('_id')] = subView;
|
|
||||||
});
|
|
||||||
self.render();
|
|
||||||
},
|
|
||||||
error: function() {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.render();
|
|
||||||
},
|
|
||||||
|
|
||||||
reload: function() {
|
|
||||||
var self = this;
|
|
||||||
this.collection.fetch({
|
|
||||||
success: function() {
|
|
||||||
self._subViews = {};
|
|
||||||
_.each(self.collection.where({type: "mount"}), function (foxx) {
|
|
||||||
var subView = new window.FoxxActiveView({model: foxx});
|
|
||||||
self._subViews[foxx.get('_id')] = subView;
|
|
||||||
});
|
|
||||||
self.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
$(this.el).html(this.template.render({}));
|
|
||||||
_.each(this._subViews, function (v) {
|
|
||||||
$("#foxxList").append(v.render());
|
|
||||||
});
|
|
||||||
this.delegateEvents();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}());
|
|
|
@ -1,51 +0,0 @@
|
||||||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
|
|
||||||
/*global Backbone, EJS, $, window, _, templateEngine*/
|
|
||||||
(function() {
|
|
||||||
"use strict";
|
|
||||||
window.FoxxInstalledListView = Backbone.View.extend({
|
|
||||||
el: '#content',
|
|
||||||
template: templateEngine.createTemplate("applicationsView.ejs"),
|
|
||||||
|
|
||||||
events: {
|
|
||||||
// 'click button#add': 'callback'
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function() {
|
|
||||||
this._subViews = {};
|
|
||||||
var self = this;
|
|
||||||
this.collection.fetch({
|
|
||||||
success: function() {
|
|
||||||
_.each(self.collection.where({type: "app"}), function (foxx) {
|
|
||||||
var subView = new window.FoxxInstalledView({model: foxx});
|
|
||||||
self._subViews[foxx.get('_id')] = subView;
|
|
||||||
});
|
|
||||||
self.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
reload: function() {
|
|
||||||
var self = this;
|
|
||||||
this.collection.fetch({
|
|
||||||
success: function() {
|
|
||||||
self._subViews = {};
|
|
||||||
_.each(self.collection.where({type: "app"}), function (foxx) {
|
|
||||||
var subView = new window.FoxxInstalledView({model: foxx});
|
|
||||||
self._subViews[foxx.get('_id')] = subView;
|
|
||||||
});
|
|
||||||
self.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
$(this.el).html(this.template.render({}));
|
|
||||||
_.each(this._subViews, function (v) {
|
|
||||||
$("#foxxList").append(v.render());
|
|
||||||
});
|
|
||||||
this.delegateEvents();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}());
|
|
Loading…
Reference in New Issue