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:
Ingo Schommer 2007-09-15 01:11:50 +00:00
parent 1741cf99cb
commit ad25e8b900
3 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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);
}