1
0
Fork 0

Frontend: Added other Route to Modal foxx edit view

This commit is contained in:
Michael Hackstein 2013-03-28 10:41:58 +01:00
parent 93557543f0
commit ccc90d35ce
3 changed files with 8 additions and 12 deletions

View File

@ -184,21 +184,17 @@ $(document).ready(function() {
applicationEdit: function(appkey) {
if (this.foxxList === undefined) {
var self = this;
this.foxxList = new window.FoxxCollection();
this.foxxList.fetch({
success: function() {
console.log(this.foxxList.findWhere({_key: appkey}));
/*var editAppView = new window.ApplicationEditView();
window.applicationEditView.options.colId = colid;
window.collectionView.render();*/
var editAppView = new window.foxxEditView({model: self.foxxList.findWhere({_key: appkey})});
editAppView.render();
}
});
} else {
window.meierei = this.foxxList;
console.log(this.foxxList.findWhere({_key: appkey}));
/*var editAppView = new window.ApplicationEditView{}
window.applicationEditView.options.colId = colid;
window.collectionView.render();*/
var editAppView = new window.foxxEditView({model: this.foxxList.findWhere({_key: appkey})});
editAppView.render();
}
},

View File

@ -1,4 +1,4 @@
<% var appInfos = attributes.app.split(":"); %>
<%var appInfos = attributes.app.split(":"); %>
<div id="change-foxx" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
@ -10,7 +10,7 @@
<th class="collectionTh">Name:</th>
<th class="collectionTh"><%=appInfos[1] %></th>
</tr>
<tr id="collectionSizeBox" style="display:none">
<tr id="collectionSizeBox">
<th class="collectionTh">Mount-Point:</th>
<th class="collectionTh"><input type="text" id="change-mount-point" name="mountpoint" value="<%=attributes.mount%>" disabled/></th>
<th><a class="modalTooltips" title="The path where the App can be reached."><i class="icon-info-sign"></i></a></th>
@ -46,6 +46,5 @@
<%} else {%>
<button id="activate" class="btn btn-success pull-right" style="margin-right:8px">Activate</button>
<%}%>
</div>
</div>

View File

@ -6,6 +6,7 @@ window.foxxEditView = Backbone.View.extend({
template: new EJS({url: '/_admin/html/js/templates/foxxEditView.ejs'}),
render: function() {
console.log(this.model);
$(this.el).html(this.template.render(this.model));
$('#change-foxx').modal('show');
$('.modalTooltips').tooltip({