move modal definition to management page
parent
8736c24310
commit
d12751a5b6
|
@ -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 -->
|
|
@ -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">×</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/>
|
||||
|
|
|
@ -555,6 +555,15 @@ var ClientFormView = Backbone.View.extend({
|
|||
var _self = this;
|
||||
this.model.save(attrs, {
|
||||
success:function () {
|
||||
|
||||
$('#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});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue