Save and close vs. Save.

master
Nick Sergeant 2012-05-03 22:46:40 -04:00
parent b555a28c01
commit 6674481907
4 changed files with 10 additions and 4 deletions

View File

@ -1022,11 +1022,11 @@ body.editing header.fixed-save div.inner {
padding-top: 6px;
width: 940px;
}
body.editing header.fixed-save div.inner .cancel, body.editing header.fixed-save div.inner .save {
body.editing header.fixed-save div.inner .cancel, body.editing header.fixed-save div.inner .save, body.editing header.fixed-save div.inner .save-and-close {
float: right;
margin-left: 10px;
}
body.editing header.fixed-save div.inner .save {
body.editing header.fixed-save div.inner .save-and-close {
margin-right: 242px;
}
body.editing section.main div.inner section.snipts article.editing {

View File

@ -1151,11 +1151,11 @@ body.editing {
padding-top: 6px;
width: 940px;
.cancel, .save {
.cancel, .save, .save-and-close {
float: right;
margin-left: 10px;
}
.save {
.save-and-close {
margin-right: 242px;
}
}

View File

@ -135,6 +135,11 @@
return false;
});
$('button.save', window.site.$main_edit).on('click', function() {
$('button.cancel').text('Close');
that.save();
return false;
});
$('button.save-and-close', window.site.$main_edit).on('click', function() {
that.save();
window.site.snipt_list.escapeUI();
return false;

View File

@ -9,6 +9,7 @@
<% if (snipt.id) { %>
<button class="delete btn btn-secondary">Delete</button>
<% } %>
<button class="save-and-close btn btn-success">Save and Close</button>
<button class="save btn btn-success">Save</button>
<button class="cancel btn btn-secondary">Cancel</button>
</div>