Newer
Older
Sonia Zorba
committed
var restPath;
Sonia Zorba
committed
init: function (path) {
restPath = path;
},
saveClicked: function (event) {
Sonia Zorba
committed
$('#main\\:save-credentials').click();
editClicked: function (event) {
if (event.status === 'success') {
$('#credentials-modal').modal('show');
}
},
credentialsSaved: function (event) {
if (event.status === 'success') {
if ($('#credentials-modal .text-danger').length === 0) {
$('#credentials-modal').modal('hide');
}
}
}
};
Sonia Zorba
committed
$(document).ready(function () {
$('body').on('shown.bs.modal', '#credentials-modal', function ( ) {
$.post(restPath + "/credentialsDialog?opened=true");
});
$('body').on('hidden.bs.modal', '#credentials-modal', function ( ) {
$.post(restPath + "/credentialsDialog?opened=false");
});
});