mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
elofgren:USABILITY: Add ajax network-save.gif icon to all 'Save' buttons while they are being submitted. Also add it to 'Save & Publish' and 'Unpublish' buttons. Fulfills: http://www.silverstripe.com/google-summer-of-code-forum/flat/1654?showPost=1730#post1730
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41879 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1741cf99cb
commit
ad25e8b900
@ -379,6 +379,13 @@ table.CMSList tbody td.current td {
|
||||
background: #ce0000;
|
||||
color: #fff;
|
||||
}
|
||||
.ajaxActions input.loading {
|
||||
background-color: #fff;
|
||||
background-image: url(../images/network-save.gif);
|
||||
background-position: middle left;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.right form div.tab {
|
||||
clear: left;
|
||||
|
@ -1,9 +1,12 @@
|
||||
function action_publish_right() {
|
||||
$('Form_EditForm_action_publish').value = 'Publishing...';
|
||||
$('Form_EditForm_action_publish').className = 'action loading';
|
||||
var publish = true;
|
||||
$('Form_EditForm').save(false, null, 'save', publish);
|
||||
}
|
||||
function action_revert_right() {
|
||||
$('Form_EditForm_action_unpublish').value = 'Unpublishing...';
|
||||
$('Form_EditForm_action_unpublish').className = 'action loading';
|
||||
Ajax.SubmitForm('Form_EditForm', 'action_revert', {
|
||||
onSuccess : Ajax.Evaluator,
|
||||
onFailure : function(response) {
|
||||
|
@ -295,6 +295,7 @@ CMSRightForm.applyTo('#Form_EditForm', 'right');
|
||||
function action_save_right() {
|
||||
_AJAX_LOADING = true;
|
||||
$('Form_EditForm_action_save').value = 'Saving...';
|
||||
$('Form_EditForm_action_save').className = 'action loading';
|
||||
$('Form_EditForm').save(false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user