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) { applicationEdit: function(appkey) {
if (this.foxxList === undefined) { if (this.foxxList === undefined) {
var self = this;
this.foxxList = new window.FoxxCollection(); this.foxxList = new window.FoxxCollection();
this.foxxList.fetch({ this.foxxList.fetch({
success: function() { success: function() {
console.log(this.foxxList.findWhere({_key: appkey})); var editAppView = new window.foxxEditView({model: self.foxxList.findWhere({_key: appkey})});
/*var editAppView = new window.ApplicationEditView(); editAppView.render();
window.applicationEditView.options.colId = colid;
window.collectionView.render();*/
} }
}); });
} else { } else {
window.meierei = this.foxxList; var editAppView = new window.foxxEditView({model: this.foxxList.findWhere({_key: appkey})});
console.log(this.foxxList.findWhere({_key: appkey})); editAppView.render();
/*var editAppView = new window.ApplicationEditView{}
window.applicationEditView.options.colId = colid;
window.collectionView.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 id="change-foxx" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
@ -10,7 +10,7 @@
<th class="collectionTh">Name:</th> <th class="collectionTh">Name:</th>
<th class="collectionTh"><%=appInfos[1] %></th> <th class="collectionTh"><%=appInfos[1] %></th>
</tr> </tr>
<tr id="collectionSizeBox" style="display:none"> <tr id="collectionSizeBox">
<th class="collectionTh">Mount-Point:</th> <th class="collectionTh">Mount-Point:</th>
<th class="collectionTh"><input type="text" id="change-mount-point" name="mountpoint" value="<%=attributes.mount%>" disabled/></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> <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 {%> <%} else {%>
<button id="activate" class="btn btn-success pull-right" style="margin-right:8px">Activate</button> <button id="activate" class="btn btn-success pull-right" style="margin-right:8px">Activate</button>
<%}%> <%}%>
</div> </div>
</div> </div>

View File

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