Browse Source

removed extraneous save button

pull/820/merge
Justin Richer 10 years ago
parent
commit
a9f531bffe
  1. 35
      uma-server-webapp/src/main/webapp/resources/js/policy.js
  2. 2
      uma-server-webapp/src/main/webapp/resources/template/policy.html

35
uma-server-webapp/src/main/webapp/resources/js/policy.js

@ -272,41 +272,6 @@ var PolicyListView = Backbone.View.extend({
app.navigate('user/policy', {trigger: true});
},
savePolicy:function(e) {
e.preventDefault();
var _self = this;
console.log(this);
this.model.sync('update', this.model, {
success:function() {
// update our copy of the resource set object (if we have it)
if (_self.options.rs != null) {
_self.options.rs.set({claimsRequired: _self.model.toJSON()}, {trigger: false});
}
app.navigate('user/policy', {trigger: true});
},
error:function (error, response) {
console.log("An error occurred when saving a policy set");
//Pull out the response text.
var responseJson = JSON.parse(response.responseText);
//Display an alert with an error message
$('#modalAlert div.modal-header').html(responseJson.error);
$('#modalAlert div.modal-body').html(responseJson.error_description);
$("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog
"backdrop" : "static",
"keyboard" : true,
"show" : true // ensure the modal is shown immediately
});
}
});
},
addPolicy:function(e) {
e.preventDefault();

2
uma-server-webapp/src/main/webapp/resources/template/policy.html

@ -69,7 +69,6 @@
<script type="text/html" id="tmpl-policy-table">
<div class="well well-small">
<button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> <span data-i18n="common.save">Save</span></button> &nbsp;
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
</div>
@ -102,7 +101,6 @@
</table>
<div class="well well-small">
<button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> <span data-i18n="common.save">Save</span></button> &nbsp;
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
</div>

Loading…
Cancel
Save