move modal definition to management page

pull/576/head
Justin Richer 2014-02-18 22:21:05 -05:00
parent 8736c24310
commit d12751a5b6
3 changed files with 25 additions and 12 deletions

View File

@ -134,15 +134,6 @@
<body>
<div id="modalAlert" class="modal hide fade">
<div class="alert alert-error">
<strong>Warning!</strong>
<div class="modal-body"></div>
</div>
<div class="modal-footer">
<button class="btn primary" type="button"
onclick="$('#modalAlert').modal('hide');">OK</button>
</div>
</div>
<div id="wrap">
<!-- Start body -->

View File

@ -3,6 +3,19 @@
<o:header title="Management Console"/>
<o:topbar pageName="Home" />
<!-- Modal dialogue for management UI -->
<div id="modalAlert" class="modal hide fade" role="dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modalAlert">&times;</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modalAlert">OK</button>
</div>
</div>
<div class="container-fluid main">
<div class="row-fluid">
<o:sidebar/>

View File

@ -555,7 +555,16 @@ var ClientFormView = Backbone.View.extend({
var _self = this;
this.model.save(attrs, {
success:function () {
app.clientList.add(_self.model);
$('#modalAlert div.modal-body').html('Client Saved');
$('#modalAlert').modal({
'backdrop': 'static',
'keyboard': true,
'show': true
});
app.clientList.add(_self.model);
app.navigate('admin/clients', {trigger:true});
},
error:function (error, response) {